Allow a pretty-printer without a to_string method
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2018-09-08 Tom Tromey <tom@tromey.com>
2
3 PR python/16047:
4 * python/py-prettyprint.c (pretty_print_one_value): Check for
5 to_string method.
6
7 2018-09-08 Joel Brobecker <brobecker@adacore.com>
8
9 * ada-lang.c (resolve_subexp): Pass correct OPLEN in call to
10 replace_operator_with_call.
11
12 2018-09-08 Joel Brobecker <brobecker@adacore.com>
13
14 * ada-lang.c (ada_value_cast): Remove unnecessary parentheses.
15
16 2018-09-08 Joel Brobecker <brobecker@adacore.com>
17
18 * ada-typeprint.c (print_range): Print the bounds using TYPE
19 rather than its TYPE_TARGET_TYPE.
20
21 2018-09-08 Joel Brobecker <brobecker@adacore.com>
22
23 * ada-lang.c (ada_to_fixed_value): Minor reformatting in
24 call to ada_to_fixed_value_create.
25
26 2018-09-08 Jerome Guitton <guitton@adacore.com>
27
28 * ada-lang.c (ada_decode): strip dot prefix in symbol name.
29
30 2018-09-08 Joel Brobecker <brobecker@adacore.com>
31
32 * ada-lang.c (ada_exception_sal): Replace gdb_assert calls
33 by calls to error.
34
35 2018-09-08 Joel Brobecker <brobecker@adacore.com>
36
37 * ada-lang.c (ada_unhandled_exception_name_addr_from_raise):
38 Move update of loop variable "fi".
39
40 2018-09-08 Joel Brobecker <brobecker@adacore.com>
41
42 * ada-lang.c (value_assign_to_component): In the case of
43 big-endian targets, extract the bits of the given VAL
44 using an src_offset of zero if container is not a scalar.
45
46 2018-09-06 Simon Ser <contact@emersion.fr>
47
48 PR gdb/23105
49 * fbsd-nat.c (fbsd_nat_target::xfer_partial): Add support for
50 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
51 * fbsd-tdep.c (fbsd_make_note_desc): New.
52 (fbsd_make_corefile_notes): Write NT_PROCSTAT_AUXV,
53 NT_PROCSTAT_VMMAP and NT_PROCSTAT_PS_STRINGS notes.
54 * target.h (enum target_object) Add FreeBSD-specific
55 TARGET_OBJECT_FREEBSD_VMMAP and TARGET_OBJECT_FREEBSD_PS_STRINGS.
56
57 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
58
59 * compile/compile-c.h (generate_c_for_variable_locations):
60 Change reference to pointer.
61 * compile/compile-c-support.c (compile_program) <compute>:
62 Likewise.
63 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
64 (generate_c_for_for_one_variable): Likewise
65 (generate_c_for_variable_locations): Likewise
66 * compile/compile-c-types.c (compile_c_instance::convert_type):
67 Likewise
68 * compile/compile-cplus-symbols.c (convert_one_symbol):
69 std::move the scope passed to enter_scope.
70 * compile/compile-cplus-types.c
71 (compile_cplus_instance::enter_scope): Make parameter
72 rvalue-reference.
73 (compile_cplus_instance::new_scope): Change reference to
74 pointer.
75 (compile_cplus_instance::convert_type): Likewise
76 (compile_cplus_convert_typedef): std::move the scope passed to
77 enter_scope.
78 (compile_cplus_convert_struct_or_union): Likewise.
79 (compile_cplus_convert_enum): Likewise.
80 (compile_cplus_convert_namespace): Likewise.
81 * compile/compile-cplus.h (compile_cplus_instance)
82 <enter_scope>: Make parameter rvalue-reference.
83 * compile/compile-internal.h (compile_instance)
84 <get_cached_type>: Likewise
85 * compile/compile-loc2c.c (push): Likewise
86 (pushf): Likewise
87 (unary): Likewise
88 (binary): Likewise
89 (print_label): Likewise
90 (pushf_register_address): Likewise
91 (pushf_register): Likewise
92 (do_compile_dwarf_expr_to_c): Likewise
93 (compile_dwarf_expr_to_c): Likewise
94 (compile_dwarf_bounds_to_c): Likewise
95 * compile/compile.c (compile_instance::get_cached_type):
96 Likewise
97 * compile/compile.h (compile_dwarf_expr_to_c): Likewise.
98 (compile_dwarf_bounds_to_c): Likewise
99 * dwarf2loc.c (locexpr_generate_c_location): Likewise.
100 (dwarf2_compile_property_to_c): Likewise
101 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise
102 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
103 Likewise
104
105 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
106
107 * tui/tui-data.h (struct tui_win_element) <highlight>: Remove.
108 * tui/tui-data.c (init_content_element): Don't initialize it.
109
110 2018-09-06 Simon Marchi <simon.marchi@ericsson.com>
111
112 * tui/tui-data.h (struct tui_win_info)
113 <detail::opaque>: Remove.
114 * tui/tui-data.c (init_win_info): Remove assignment.
115
116 2018-09-05 Tom Tromey <tom@tromey.com>
117
118 * warning.m4 (AM_GDB_WARNINGS): Add -Wformat when testing
119 -Wformat-nonliteral.
120 * target-float.c (host_float_ops<T>::to_string)
121 (host_float_ops<T>::from_string): Use
122 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
123 * configure: Rebuild.
124
125 2018-09-05 Simon Marchi <simon.marchi@ericsson.com>
126
127 * printcmd.c (printf_c_string): Use
128 DIAGNOSTIC_IGNORE_FORMAT_NONLITERAL.
129 (printf_wide_c_string, printf_pointer, ui_printf): Likewise.
130
131 2018-09-05 Tom Tromey <tom@tromey.com>
132
133 * cli/cli-cmds.c (shell_escape, edit_command): Remove cast.
134
135 2018-09-05 Tom de Vries <tdevries@suse.de>
136
137 * dwarf2loc.c (sect_variable_value): Call indirect_synthetic_pointer
138 with resolve_abstract_p == true.
139 (indirect_synthetic_pointer): Add resolve_abstract_p parameter,
140 defaulting to false. Propagate resolve_abstract_p to
141 dwarf2_fetch_die_loc_sect_off.
142 * dwarf2loc.h (dwarf2_fetch_die_loc_sect_off): Add resolve_abstract_p
143 parameter, defaulting to false.
144 * dwarf2read.c (read_variable): Add variable to abstract_to_concrete.
145 (dwarf2_fetch_die_loc_sect_off): Add and handle resolve_abstract_p
146 parameter.
147 * dwarf2read.h (struct die_info): Forward-declare.
148 (die_info_ptr): New typedef.
149 (struct dwarf2_per_objfile): Add abstract_to_concrete field.
150
151 2018-09-05 Joel Brobecker <brobecker@adacore.com>
152
153 GDB 8.2 released.
154
155 2018-09-04 Sergio Durigan Junior <sergiodj@redhat.com>
156 Pedro Alves <palves@redhat.com>
157
158 * gnulib/Makefile.in (aclocal_m4_deps): Move to
159 "aclocal-m4-deps.mk". Include file here.
160 $(srcdir)/aclocal.m4: Add "configure.ac".
161 * gnulib/aclocal-m4-deps.mk: New file.
162 * gnulib/update-gnulib.sh: Automatically update
163 "aclocal-m4-deps.mk".
164
165 2018-09-04 Tom Tromey <tom@tromey.com>
166
167 * configure: Rebuild.
168 * configure.ac: Remove multi-ice code.
169
170 2018-09-04 Tom Tromey <tom@tromey.com>
171
172 * Makefile.in (GDB_WARN_CFLAGS_NO_DEFS): Remove.
173 (ada-exp.o): Update.
174
175 2018-09-04 Tom Tromey <tom@tromey.com>
176
177 * Makefile.in (printcmd.o, target-float.o): Remove.
178 (GDB_WARN_CFLAGS_NO_FORMAT): Remove.
179
180 2018-09-04 Tom Tromey <tom@tromey.com>
181
182 * gnulib/Makefile.in: Remove obsolete comment.
183 * Makefile.in: Remove obsolete comment.
184
185 2018-09-04 Andrew Burgess <andrew.burgess@embecosm.com>
186
187 * riscv-tdep.c (riscv_frame_cache): Fix ARI warning, don't end a
188 line with '+'.
189
190 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
191
192 * riscv-tdep.c: Add 'prologue-value.h' include.
193 (struct riscv_unwind_cache): New struct.
194 (riscv_debug_unwinder): New global.
195 (riscv_scan_prologue): Update arguments, capture register details
196 from prologue scan.
197 (riscv_skip_prologue): Reformat arguments line, move end of
198 prologue calculation into riscv_scan_prologue.
199 (riscv_frame_cache): Update return type, create
200 riscv_unwind_cache, scan the prologue, and fill in remaining cache
201 details.
202 (riscv_frame_this_id): Use frame id computed in riscv_frame_cache.
203 (riscv_frame_prev_register): Use the trad_frame within the
204 riscv_unwind_cache.
205 (_initialize_riscv_tdep): Add 'set/show debug riscv unwinder'
206 flag.
207
208 2018-09-03 Andrew Burgess <andrew.burgess@embecosm.com>
209
210 * trad-frame.h (trad_frame_set_realreg): Declare.
211 (trad_frame_set_addr): Declare.
212 * trad-frame.c (trad_frame_set_realreg): Define new function.
213 (trad_frame_set_addr): Define new function.
214 (trad_frame_set_reg_realreg): Use new function.
215 (trad_frame_set_reg_addr): Use new function.
216
217 2018-09-01 Keith Seitz <keiths@redhat.com>
218
219 * compile/compile-cplus-types.c (compile_cplus_debug_output_1): Use
220 pulongest instead of "%lld".
221 * compile/compile-cplus-symbols.c (gcc_cplus_convert_symbol): Remove
222 ATTRIBUTE_UNUSED.
223
224 2018-08-31 Tom Tromey <tom@tromey.com>
225
226 * dwarf2read.c (dwarf2_add_field): Set the TYPE_LENGTH of the
227 variant part type.
228
229 2018-08-31 Pedro Alves <palves@redhat.com>
230
231 * gdbarch.h: Regenerate.
232
233 2018-08-31 Pedro Alves <palves@redhat.com>
234
235 * gdbarch.sh (have_nonsteppable_watchpoint): Add comment.
236 * target.h (Hardware watchpoint interfaces): Describe
237 continuable/steppable/non-steppable watchpoints.
238 * gdbarch.h, gdbarch.c: Regenerate.
239
240 2018-08-31 Pedro Alves <palves@redhat.com>
241
242 * nto-procfs.c (nto_procfs_target::have_continuable_watchpoint):
243 Delete.
244 * s390-linux-nat.c
245 (s390_linux_nat_target::have_continuable_watchpoint): Delete.
246 * target.h (target_ops::have_continuable_watchpoint): Delete.
247 (target_have_continuable_watchpoint): Delete.
248 * x86-nat.h (x86_nat_target::have_continuable_watchpoint): Delete.
249 * target-delegates.c: Regenerate.
250
251 2018-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
252
253 * gnulib/Makefile.in (aclocal_m4_deps): Update according to
254 the files present in "gnulib/import/m4/".
255
256 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
257
258 * riscv-tdep.c (riscv_insn::decode): Decode c.addi4spn, c.sd,
259 c.sw, c.swsp, and c.sdsp.
260
261 2018-08-30 Andrew Burgess <andrew.burgess@embecosm.com>
262
263 * riscv-tdep.c (struct riscv_inferior_data): Delete.
264 (riscv_read_misa_reg): Don't cache value read into inferior data.
265 (riscv_new_inferior_data): Delete.
266 (riscv_inferior_data_cleanup): Delete.
267 (riscv_inferior_data): Delete.
268 (riscv_invalidate_inferior_data): Delete.
269 (_initialize_riscv_tdep): Remove initialisation of inferior data.
270
271 2018-08-30 Simon Marchi <simon.marchi@ericsson.com>
272
273 * compile/compile-cplus-types.c
274 (compile_cplus_instance::leave_scope): Take the address of scope
275 object.
276 (compile_cplus_instance::convert_qualified_base): Compare quals
277 to 0.
278
279 2018-08-30 Keith Seitz <keiths@redhat.com>
280
281 * compile/compile-cplus-types.c (compile_cplus_instance::enter_scope):
282 Use "%s" and host_address_to_string instead of "%p" in printf.
283
284 2018-08-29 Keith Seitz <keiths@redhat.com>
285
286 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Add compile-cplus-symbols.c
287 and compile-cplus-types.c.
288 (HFILES_NO_SRCDIR): Add gcc-cp-plugin.h.
289 * c-lang.c (cplus_language_defn): Set C++ compile functions.
290 * c-lang.h (cplus_get_compile_context, cplus_compute_program):
291 Declare.
292 * compile/compile-c-support.c: Include compile-cplus.h.
293 (load_libcompile): Templatize.
294 (get_compile_context): "New" function.
295 (c_get_compile_context): Use get_compile_context.
296 (cplus_get_compile_context): New function.
297 (cplus_push_user_expression, cplus_pop_user_expression)
298 (cplus_add_code_header, cplus_add_input, cplus_compile_program)
299 (cplus_compute_program): Define new structs/functions.
300 * compile/compile-cplus-symmbols.c: New file.
301 * compile/compile-cplus-types.c: New file.
302 * compile/compile-cplus.h: New file.
303 * compile/compile-internal.h (debug_compile_oracle, GCC_TYPE_NONE):
304 Declare.
305 * compile/compile-object-load.c (get_out_value_type): Use
306 strncmp_iw when comparing symbol names.
307 (compile_object_load): Add mst_bss and mst_data.
308 * compile/compile.c (_initialize_compile): Remove
309 -Wno-implicit-function-declaration from `compile_args'.
310 * compile/gcc-cp-plugin.h: New file.
311 * NEWS: Mention C++ compile support and new debug options.
312
313 2018-08-29 Keith Seitz <keiths@redhat.com>
314
315 * linespec.c (collect_info::add_symbol): Make virtual.
316 (struct symbol_searcher_collect_info): New struct.
317 (symbol_searcher::find_all_symbols): New method.
318 * symtab.h (class symbol_searcher): New class.
319
320 2018-08-29 Keith Seitz <keiths@redhat.com>
321
322 * linespec.c (struct linespec) <function_symbols, label_symbols>:
323 Change to vector of block_symbol. Update all users.
324 (struct collect_info) <symbols>: Likewise.
325 (collect_info::add_symbol): Take block_symbol as argument.
326 Update all callers.
327 (decode_compound_collector) <m_symbols>: Change type to vector
328 of block_symbol. Update all users.
329 (decode_compound_collector::operator ()): Change parameter type
330 to block_symbol.
331 (find_method, find_function_symbols, find_linespec_symbols)
332 (find_label_symbols_in_block, find_label_symbols): Change symbol
333 vectors to block_symbol vectors.
334 * symtab.h (symbol_found_callback_ftype): Change parameter type to
335 block_symbol.
336
337 2018-08-29 Keith Seitz <keiths@redhat.com>
338
339 * linespec.c (symbolp): Remove typedef and VEC definitions.
340 (bound_minimal_symbol_d): Likewise.
341
342 2018-08-29 Keith Seitz <keiths@redhat.com>
343
344 * linespec.c (decode_compound_collector::decode_compound_collector):
345 Remove initialization for `m_symtabs'.
346 (decode_compound_collector::release_symbols): Change return type
347 to std::vector. Update all callers.
348 (class decode_compound_collector) <m_symbols>: Change type to
349 std::vector.
350 (lookup_prefix_sym): Change return type to std::vector. Update all
351 callers.
352 (compare_symbols): Remove.
353 (std_compare_symbols): Rename to `compare_symbols'.
354 (find_method): Change `sym_classes' parameter to std::vector.
355 Update all callers. Use std::sort to sort sym_classes.
356 (find_linespec_symbols): Remove cleanup.
357
358 2018-08-29 Keith Seitz <keiths@redhat.com>
359
360 * linespec.c (struct linespec) <minimal_symbols>: Change type to
361 std::vector. Update all users.
362 (convert_linespec_to_sals): Use std::sort to sort minimal symbols.
363 (struct collect_info) <minimal_symbols>: Likewise.
364 (compare_msymbols): Return bool. Change parameters to const
365 bound_minimal_symbol references.
366 (find_method, find_function_symbols, find_linespec_symbols): Change
367 `minsyms' parameter to std::vector. Update all callers.
368
369 2018-08-29 Keith Seitz <keiths@redhat.com>
370
371 * linespec.c (struct linespec) <label_symbols>: Change type to
372 std::vector. Update all users.
373 (find_label_symbols_in_block): Change `result' parameter to
374 std::vector. Update all callers.
375 (find_label_symbols): Return std::vector. Update all callers.
376
377 2018-08-29 Keith Seitz <keiths@redhat.com>
378
379 * linespec.c (struct linespec) <function_symbols>: Change type to
380 std::vector. Update all users.
381 (struct collect_info) <function_symbols>: Likewise.
382 (convert_linespec_to_sals): Use std::sort to sort function_symbols.
383 (std_compare_symbols): New function.
384 (find_method, find_function_symbols, find_linespec_symbols)
385 (find_label_symbols_in_block): Change `symbols' parameter to
386 std::vector. Update all callers.
387 (find_label_symbols): Likewise for `function_symbols' and
388 `label_funcs_ret'.
389
390 2018-08-29 Keith Seitz <keiths@redhat.com>
391
392 * linespec.c (symtab_vector_up): Define.
393 (struct linespec) <file_symtabs>: Change type to std::vector *.
394 Update all uses.
395 (struct collect_info) <file_symtabs>: Likewise.
396 (collect_symtabs_from_filename): Return symtab_vector_up.
397 Update all callers.
398 (decode_objc): Remove cleanup.
399 (symtab_collector::symtab_collector): Initialize `m_symtabs'.
400 (symtab_collector::release_symtabs): Return symtab_vector_up.
401 Update all callers.
402 (class symtab_collector) <m_symtabs>: Change type to symtab_vector_up.
403 Update all users.
404 (collect_symtabs_from_filename, symtabs_from_filename): Return
405 symtab_vector_up. Update all callers.
406
407 2018-08-29 Tom Tromey <tom@tromey.com>
408
409 * csky-tdep.c (csky_analyze_prologue): Use
410 core_addr_to_string_nz.
411
412 2018-08-29 Tom Tromey <tom@tromey.com>
413
414 * windows-nat.c (struct xlate_exception) <them>: Change type to
415 DWORD.
416 (xlate): Fix formatting. Remove last entry.
417 (struct xlate_exception, xlate): Comment out.
418 (windows_nat_target::resume): Use ranged for.
419
420 2018-08-29 Jim Wilson <jimw@sifive.com>
421
422 * riscv-linux-nat.c: Include elf/common.h instead of elf.h.
423 (riscv_linux_nat_target::fetch_registers): Use NT_FPREGSET instead
424 of NT_PRFPREG.
425 (riscv_linux_nat_target::store_registers): Likewise.
426
427 2018-08-29 Sergio Durigan Junior <sergiodj@redhat.com>
428
429 PR gdb/23555
430 PR gdb/23558
431 * gnulib/aclocal.m4: Regenerate.
432 * gnulib/config.in: Regenerate.
433 * gnulib/configure: Regenerate.
434 * gnulib/import/Makefile.am: Update.
435 * gnulib/import/Makefile.in: Update.
436 * gnulib/import/extra/snippet/_Noreturn.h: Rename to...
437 * gnulib/import/_Noreturn.h: ... this.
438 * gnulib/import/alloca.in.h: Update.
439 * gnulib/import/extra/snippet/arg-nonnull.h: Rename to...
440 * gnulib/import/arg-nonnull.h: ... this.
441 * gnulib/import/assure.h: Update.
442 * gnulib/import/at-func.c: Update.
443 * gnulib/import/basename-lgpl.c: Update.
444 * gnulib/import/extra/snippet/c++defs.h: Rename to...
445 * gnulib/import/c++defs.h: ... this.
446 * gnulib/import/canonicalize-lgpl.c: Update.
447 * gnulib/import/cdefs.h: Update.
448 * gnulib/import/chdir-long.c: Update.
449 * gnulib/import/chdir-long.h: Update.
450 * gnulib/import/cloexec.c: Update.
451 * gnulib/import/cloexec.h: Update.
452 * gnulib/import/close.c: Update.
453 * gnulib/import/closedir.c: Update.
454 * gnulib/import/config.charset: Update.
455 * gnulib/import/dirent-private.h: Update.
456 * gnulib/import/dirent.in.h: Update.
457 * gnulib/import/dirfd.c: Update.
458 * gnulib/import/dirname-lgpl.c: Update.
459 * gnulib/import/dirname.h: Update.
460 * gnulib/import/dosname.h: Update.
461 * gnulib/import/dup-safer-flag.c: Update.
462 * gnulib/import/dup-safer.c: Update.
463 * gnulib/import/dup.c: Update.
464 * gnulib/import/dup2.c: Update.
465 * gnulib/import/errno.in.h: Update.
466 * gnulib/import/error.c: Update.
467 * gnulib/import/error.h: Update.
468 * gnulib/import/exitfail.c: Update.
469 * gnulib/import/exitfail.h: Update.
470 * gnulib/import/extra/update-copyright: Update.
471 * gnulib/import/fchdir.c: Update.
472 * gnulib/import/fcntl.c: Update.
473 * gnulib/import/fcntl.in.h: Update.
474 * gnulib/import/fd-hook.c: Update.
475 * gnulib/import/fd-hook.h: Update.
476 * gnulib/import/fd-safer-flag.c: Update.
477 * gnulib/import/fd-safer.c: Update.
478 * gnulib/import/fdopendir.c: Update.
479 * gnulib/import/filename.h: Update.
480 * gnulib/import/filenamecat-lgpl.c: Update.
481 * gnulib/import/filenamecat.h: Update.
482 * gnulib/import/flexmember.h: Update.
483 * gnulib/import/float+.h: Update.
484 * gnulib/import/float.c: Update.
485 * gnulib/import/float.in.h: Update.
486 * gnulib/import/fnmatch.c: Update.
487 * gnulib/import/fnmatch.in.h: Update.
488 * gnulib/import/fnmatch_loop.c: Update.
489 * gnulib/import/fpucw.h: Update.
490 * gnulib/import/frexp.c: Update.
491 * gnulib/import/frexpl.c: Update.
492 * gnulib/import/fstat.c: Update.
493 * gnulib/import/fstatat.c: Update.
494 * gnulib/import/getcwd-lgpl.c: Update.
495 * gnulib/import/getcwd.c: Update.
496 * gnulib/import/getdtablesize.c: Update.
497 * gnulib/import/getlogin_r.c: Update.
498 * gnulib/import/getprogname.c: Update.
499 * gnulib/import/getprogname.h: Update.
500 * gnulib/import/gettext.h: Update.
501 * gnulib/import/gettimeofday.c: Update.
502 * gnulib/import/glob-libc.h: Update.
503 * gnulib/import/glob.c: Update.
504 * gnulib/import/glob.in.h: Update.
505 * gnulib/import/glob_internal.h: Update.
506 * gnulib/import/glob_pattern_p.c: Update.
507 * gnulib/import/globfree.c: Update.
508 * gnulib/import/hard-locale.c: Update.
509 * gnulib/import/hard-locale.h: Update.
510 * gnulib/import/intprops.h: Update.
511 * gnulib/import/inttypes.in.h: Update.
512 * gnulib/import/isnan.c: Update.
513 * gnulib/import/isnand-nolibm.h: Update.
514 * gnulib/import/isnand.c: Update.
515 * gnulib/import/isnanl-nolibm.h: Update.
516 * gnulib/import/isnanl.c: Update.
517 * gnulib/import/itold.c: Update.
518 * gnulib/import/libc-config.h: Update.
519 * gnulib/import/limits.in.h: Update.
520 * gnulib/import/localcharset.c: Update.
521 * gnulib/import/localcharset.h: Update.
522 * gnulib/import/localtime-buffer.c: Update.
523 * gnulib/import/localtime-buffer.h: Update.
524 * gnulib/import/lstat.c: Update.
525 * gnulib/import/m4/00gnulib.m4: Update.
526 * gnulib/import/m4/__inline.m4: Update.
527 * gnulib/import/m4/absolute-header.m4: Update.
528 * gnulib/import/m4/alloca.m4: Update.
529 * gnulib/import/m4/builtin-expect.m4: Update.
530 * gnulib/import/m4/canonicalize.m4: Update.
531 * gnulib/import/m4/chdir-long.m4: Update.
532 * gnulib/import/m4/close.m4: Update.
533 * gnulib/import/m4/closedir.m4: Update.
534 * gnulib/import/m4/configmake.m4: Update.
535 * gnulib/import/m4/d-ino.m4: Update.
536 * gnulib/import/m4/d-type.m4: Update.
537 * gnulib/import/m4/dirent_h.m4: Update.
538 * gnulib/import/m4/dirfd.m4: Update.
539 * gnulib/import/m4/dirname.m4: Update.
540 * gnulib/import/m4/double-slash-root.m4: Update.
541 * gnulib/import/m4/dup.m4: Update.
542 * gnulib/import/m4/dup2.m4: Update.
543 * gnulib/import/m4/eealloc.m4: Update.
544 * gnulib/import/m4/environ.m4: Update.
545 * gnulib/import/m4/errno_h.m4: Update.
546 * gnulib/import/m4/error.m4: Update.
547 * gnulib/import/m4/exponentd.m4: Update.
548 * gnulib/import/m4/exponentl.m4: Update.
549 * gnulib/import/m4/extensions.m4: Update.
550 * gnulib/import/m4/extern-inline.m4: Update.
551 * gnulib/import/m4/fchdir.m4: Update.
552 * gnulib/import/m4/fcntl-o.m4: Update.
553 * gnulib/import/m4/fcntl.m4: Update.
554 * gnulib/import/m4/fcntl_h.m4: Update.
555 * gnulib/import/m4/fdopendir.m4: Update.
556 * gnulib/import/m4/filenamecat.m4: Update.
557 * gnulib/import/m4/flexmember.m4: Update.
558 * gnulib/import/m4/float_h.m4: Update.
559 * gnulib/import/m4/fnmatch.m4: Update.
560 * gnulib/import/m4/fnmatch_h.m4: Update.
561 * gnulib/import/m4/fpieee.m4: Update.
562 * gnulib/import/m4/frexp.m4: Update.
563 * gnulib/import/m4/frexpl.m4: Update.
564 * gnulib/import/m4/fstat.m4: Update.
565 * gnulib/import/m4/fstatat.m4: Update.
566 * gnulib/import/m4/getcwd-abort-bug.m4: Update.
567 * gnulib/import/m4/getcwd-path-max.m4: Update.
568 * gnulib/import/m4/getcwd.m4: Update.
569 * gnulib/import/m4/getdtablesize.m4: Update.
570 * gnulib/import/m4/getlogin.m4: Update.
571 * gnulib/import/m4/getlogin_r.m4: Update.
572 * gnulib/import/m4/getpagesize.m4: Update.
573 * gnulib/import/m4/getprogname.m4: Update.
574 * gnulib/import/m4/gettimeofday.m4: Update.
575 * gnulib/import/m4/glibc21.m4: Update.
576 * gnulib/import/m4/glob.m4: Update.
577 * gnulib/import/m4/glob_h.m4: Update.
578 * gnulib/import/m4/gnulib-cache.m4: Update.
579 * gnulib/import/m4/gnulib-common.m4: Update.
580 * gnulib/import/m4/gnulib-comp.m4: Update.
581 * gnulib/import/m4/gnulib-tool.m4: Update.
582 * gnulib/import/m4/hard-locale.m4: Update.
583 * gnulib/import/m4/include_next.m4: Update.
584 * gnulib/import/m4/inttypes-pri.m4: Update.
585 * gnulib/import/m4/inttypes.m4: Update.
586 * gnulib/import/m4/isnand.m4: Update.
587 * gnulib/import/m4/isnanl.m4: Update.
588 * gnulib/import/m4/largefile.m4: Update.
589 * gnulib/import/m4/limits-h.m4: Update.
590 * gnulib/import/m4/localcharset.m4: Update.
591 * gnulib/import/m4/locale-fr.m4: Update.
592 * gnulib/import/m4/locale-ja.m4: Update.
593 * gnulib/import/m4/locale-zh.m4: Update.
594 * gnulib/import/m4/localtime-buffer.m4: Update.
595 * gnulib/import/m4/longlong.m4: Update.
596 * gnulib/import/m4/lstat.m4: Update.
597 * gnulib/import/m4/malloc.m4: Update.
598 * gnulib/import/m4/malloca.m4: Update.
599 * gnulib/import/m4/math_h.m4: Update.
600 * gnulib/import/m4/mbrtowc.m4: Update.
601 * gnulib/import/m4/mbsinit.m4: Update.
602 * gnulib/import/m4/mbsrtowcs.m4: Update.
603 * gnulib/import/m4/mbstate_t.m4: Update.
604 * gnulib/import/m4/memchr.m4: Update.
605 * gnulib/import/m4/memmem.m4: Update.
606 * gnulib/import/m4/mempcpy.m4: Update.
607 * gnulib/import/m4/memrchr.m4: Update.
608 * gnulib/import/m4/mkdir.m4: Update.
609 * gnulib/import/m4/mkstemp.m4: Update.
610 * gnulib/import/m4/mmap-anon.m4: Update.
611 * gnulib/import/m4/mode_t.m4: Update.
612 * gnulib/import/m4/msvc-inval.m4: Update.
613 * gnulib/import/m4/msvc-nothrow.m4: Update.
614 * gnulib/import/m4/multiarch.m4: Update.
615 * gnulib/import/m4/nocrash.m4: Update.
616 * gnulib/import/m4/off_t.m4: Update.
617 * gnulib/import/m4/onceonly.m4: Update.
618 * gnulib/import/m4/open-cloexec.m4: Update.
619 * gnulib/import/m4/open.m4: Update.
620 * gnulib/import/m4/openat.m4: Update.
621 * gnulib/import/m4/opendir.m4: Update.
622 * gnulib/import/m4/pathmax.m4: Update.
623 * gnulib/import/m4/rawmemchr.m4: Update.
624 * gnulib/import/m4/readdir.m4: Update.
625 * gnulib/import/m4/readlink.m4: Update.
626 * gnulib/import/m4/realloc.m4: Update.
627 * gnulib/import/m4/rename.m4: Update.
628 * gnulib/import/m4/rewinddir.m4: Update.
629 * gnulib/import/m4/rmdir.m4: Update.
630 * gnulib/import/m4/save-cwd.m4: Update.
631 * gnulib/import/m4/secure_getenv.m4: Update.
632 * gnulib/import/m4/setenv.m4: Update.
633 * gnulib/import/m4/signal_h.m4: Update.
634 * gnulib/import/m4/ssize_t.m4: Update.
635 * gnulib/import/m4/stat-time.m4: Update.
636 * gnulib/import/m4/stat.m4: Update.
637 * gnulib/import/m4/std-gnu11.m4: Update.
638 * gnulib/import/m4/stdbool.m4: Update.
639 * gnulib/import/m4/stddef_h.m4: Update.
640 * gnulib/import/m4/stdint.m4: Update.
641 * gnulib/import/m4/stdio_h.m4: Update.
642 * gnulib/import/m4/stdlib_h.m4: Update.
643 * gnulib/import/m4/strchrnul.m4: Update.
644 * gnulib/import/m4/strdup.m4: Update.
645 * gnulib/import/m4/strerror.m4: Update.
646 * gnulib/import/m4/string_h.m4: Update.
647 * gnulib/import/m4/strstr.m4: Update.
648 * gnulib/import/m4/strtok_r.m4: Update.
649 * gnulib/import/m4/sys_socket_h.m4: Update.
650 * gnulib/import/m4/sys_stat_h.m4: Update.
651 * gnulib/import/m4/sys_time_h.m4: Update.
652 * gnulib/import/m4/sys_types_h.m4: Update.
653 * gnulib/import/m4/tempname.m4: Update.
654 * gnulib/import/m4/time_h.m4: Update.
655 * gnulib/import/m4/unistd-safer.m4: Update.
656 * gnulib/import/m4/unistd_h.m4: Update.
657 * gnulib/import/m4/warn-on-use.m4: Update.
658 * gnulib/import/m4/wchar_h.m4: Update.
659 * gnulib/import/m4/wchar_t.m4: Update.
660 * gnulib/import/m4/wctype_h.m4: Update.
661 * gnulib/import/m4/wint_t.m4: Update.
662 * gnulib/import/malloc.c: Update.
663 * gnulib/import/malloc/scratch_buffer.h: Update.
664 * gnulib/import/malloc/scratch_buffer_grow.c: Update.
665 * gnulib/import/malloc/scratch_buffer_grow_preserve.c: Update.
666 * gnulib/import/malloc/scratch_buffer_set_array_size.c: Update.
667 * gnulib/import/malloca.c: Update.
668 * gnulib/import/malloca.h: Update.
669 * gnulib/import/malloca.valgrind: Update.
670 * gnulib/import/math.in.h: Update.
671 * gnulib/import/mbrtowc.c: Update.
672 * gnulib/import/mbsinit.c: Update.
673 * gnulib/import/mbsrtowcs-impl.h: Update.
674 * gnulib/import/mbsrtowcs-state.c: Update.
675 * gnulib/import/mbsrtowcs.c: Update.
676 * gnulib/import/memchr.c: Update.
677 * gnulib/import/memmem.c: Update.
678 * gnulib/import/mempcpy.c: Update.
679 * gnulib/import/memrchr.c: Update.
680 * gnulib/import/mkdir.c: Update.
681 * gnulib/import/mkstemp.c: Update.
682 * gnulib/import/msvc-inval.c: Update.
683 * gnulib/import/msvc-inval.h: Update.
684 * gnulib/import/msvc-nothrow.c: Update.
685 * gnulib/import/msvc-nothrow.h: Update.
686 * gnulib/import/open.c: Update.
687 * gnulib/import/openat-die.c: Update.
688 * gnulib/import/openat-priv.h: Update.
689 * gnulib/import/openat-proc.c: Update.
690 * gnulib/import/openat.c: Update.
691 * gnulib/import/openat.h: Update.
692 * gnulib/import/opendir.c: Update.
693 * gnulib/import/pathmax.h: Update.
694 * gnulib/import/pipe-safer.c: Update.
695 * gnulib/import/rawmemchr.c: Update.
696 * gnulib/import/readdir.c: Update.
697 * gnulib/import/readlink.c: Update.
698 * gnulib/import/realloc.c: Update.
699 * gnulib/import/ref-add.sin: Update.
700 * gnulib/import/ref-del.sin: Update.
701 * gnulib/import/rename.c: Update.
702 * gnulib/import/rewinddir.c: Update.
703 * gnulib/import/rmdir.c: Update.
704 * gnulib/import/same-inode.h: Update.
705 * gnulib/import/save-cwd.c: Update.
706 * gnulib/import/save-cwd.h: Update.
707 * gnulib/import/scratch_buffer.h: Update.
708 * gnulib/import/secure_getenv.c: Update.
709 * gnulib/import/setenv.c: Update.
710 * gnulib/import/signal.in.h: Update.
711 * gnulib/import/stat-time.c: Update.
712 * gnulib/import/stat-time.h: Update.
713 * gnulib/import/stat-w32.c: Update.
714 * gnulib/import/stat-w32.h: Update.
715 * gnulib/import/stat.c: Update.
716 * gnulib/import/stdbool.in.h: Update.
717 * gnulib/import/stddef.in.h: Update.
718 * gnulib/import/stdint.in.h: Update.
719 * gnulib/import/stdio.in.h: Update.
720 * gnulib/import/stdlib.in.h: Update.
721 * gnulib/import/str-two-way.h: Update.
722 * gnulib/import/strchrnul.c: Update.
723 * gnulib/import/strdup.c: Update.
724 * gnulib/import/streq.h: Update.
725 * gnulib/import/strerror-override.c: Update.
726 * gnulib/import/strerror-override.h: Update.
727 * gnulib/import/strerror.c: Update.
728 * gnulib/import/string.in.h: Update.
729 * gnulib/import/stripslash.c: Update.
730 * gnulib/import/strnlen1.c: Update.
731 * gnulib/import/strnlen1.h: Update.
732 * gnulib/import/strstr.c: Update.
733 * gnulib/import/strtok_r.c: Update.
734 * gnulib/import/sys_stat.in.h: Update.
735 * gnulib/import/sys_time.in.h: Update.
736 * gnulib/import/sys_types.in.h: Update.
737 * gnulib/import/tempname.c: Update.
738 * gnulib/import/tempname.h: Update.
739 * gnulib/import/time.in.h: Update.
740 * gnulib/import/unistd--.h: Update.
741 * gnulib/import/unistd-safer.h: Update.
742 * gnulib/import/unistd.in.h: Update.
743 * gnulib/import/unsetenv.c: Update.
744 * gnulib/import/verify.h: Update.
745 * gnulib/import/extra/snippet/warn-on-use.h: Update.
746 * gnulib/import/wchar.in.h: Update.
747 * gnulib/import/wctype.in.h: Update.
748 * gnulib/import/xalloc-oversized.h: Update.
749 * gnulib/update-gnulib.sh (GNULIB_COMMIT_SHA1): Set to
750 "53e2c179f26a890fa6685af4b6c1397ee370433b".
751
752 2018-08-16 Gary Benson <gbenson@redhat.com>
753
754 PR gdb/13000:
755 * gdb/main.c (captured_main_1): Exit with nonzero status
756 in batch mode if the last command to be executed failed.
757 * NEWS: Mention the above.
758
759 2018-08-29 Simon Marchi <simon.marchi@ericsson.com>
760
761 * csky-tdep.c (csky_memory_insert_breakpoint): Remove newline at
762 end of warning message.
763
764 2018-08-29 Alan Hayward <alan.hayward@arm.com>
765
766 PR gdb/22943:
767 * aarch64-tdep.c (is_hfa_or_hva): Remove function.
768 (aarch64_extract_return_value): Use
769 aapcs_is_vfp_call_or_return_candidate.
770 (aarch64_return_in_memory): Likewise.
771 (aarch64_store_return_value): Likewise.
772
773 2018-08-29 Alan Hayward <alan.hayward@arm.com>
774
775 * aarch64-tdep.c
776 (aapcs_is_vfp_call_or_return_candidate): Make static
777 (pass_in_v_or_stack): Remove function.
778 (pass_in_v_vfp_candidate): New function.
779 (aarch64_push_dummy_call): Check for float register candidates.
780
781 2018-08-29 Alan Hayward <alan.hayward@arm.com>
782
783 * aarch64-tdep.c (HA_MAX_NUM_FLDS): New macro.
784 (aapcs_is_vfp_call_or_return_candidate_1): New function.
785 (aapcs_is_vfp_call_or_return_candidate): Likewise.
786
787 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
788
789 PR build/23399
790 * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
791 (struct ipa_sym_addresses): Rename to...
792 (struct ipa_sym_addresses_common): ... this.
793 * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
794
795 2018-08-28 Tom Tromey <tom@tromey.com>
796
797 * c-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
798 (token_fifo): Now a std::vector.
799 (yylex, c_parse): Update.
800 * d-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
801 (token_fifo): Now a std::vector.
802 (yylex, d_parse): Update.
803 * go-exp.y (struct token_and_value): Remove typedef and DEF_VEC.
804 (token_fifo): Now a std::vector.
805 (yylex, go_parse): Update.
806
807 2018-08-28 Simon Marchi <simon.marchi@ericsson.com>
808
809 * parser-defs.h (struct type_stack) <elements>: Change type to
810 std::vector<union type_stack_elt>.
811 <depth, size>: Remove.
812 * parse.c (parse_exp_in_context_1): Adjust.
813 (type_stack_reserve): Remove.
814 (check_type_stack_depth): Remove.
815 (insert_into_type_stack): Adjust to std::vector.
816 (insert_type): Likewise.
817 (push_type): Likewise.
818 (push_type_int): Likewise.
819 (insert_type_address_space): Likewise.
820 (pop_type): Likewise.
821 (pop_type_int): Likewise.
822 (pop_typelist): Likewise.
823 (pop_type_stack): Likewise.
824 (append_type_stack): Likewise.
825 (push_type_stack): Likewise.
826 (get_type_stack): Likewise.
827 (type_stack_cleanup): Likewise.
828 (push_typelist): Likewise.
829 (follow_types): Likewise.
830 (_initialize_parse): Likewise.
831
832 2018-08-28 Hafiz Abid Qadeer <abidh@codesourcery.com>
833
834 * NEWS: Mention csky target.
835
836 2018-08-28 Jiangshuai Li <jiangshuai_li@c-sky.com>
837 Hafiz Abid Qadeer <abidh@codesourcery.com>
838 Don Breazeal <donb@codesourcery.com>
839
840 * csky-linux-tdep.c: New file.
841 * csky-tdep.c: Likewise.
842 * csky-tdep.h: Likewise.
843 * Makefile.in (ALL_TARGET_OBS): Add csky-linux-tdep.o and
844 csky-tdep.o.
845 (HFILES_NO_SRCDIR): Add csky-tdep.h.
846 (ALLDEPFILES): Add csky-linux-tdep.c and csky-tdep.c
847 * configure.tgt: Add csky support.
848
849 2018-08-27 Jan Vrany <jan.vrany@fit.cvut.cz>
850
851 * python/py-framefilter.c (py_print_frame): Print frame architecture
852 when printing on an MI output.
853
854 2018-08-27 Tom Tromey <tom@tromey.com>
855
856 PR build/23087:
857 * configure: Rebuild.
858 * warning.m4 (AM_GDB_WARNINGS): Remove -Wno-narrowing.
859
860 2018-08-27 Tom Tromey <tom@tromey.com>
861
862 * aarch64-linux-tdep.c
863 (aarch64_linux_iterate_over_regset_sections) <sve_regmap>: Add
864 casts to int.
865
866 2018-08-27 Tom Tromey <tom@tromey.com>
867
868 * ppc64-tdep.c (insn_d, insn_ds, insn_xfx): Add casts to
869 unsigned.
870 (ppc64_standard_linkage1, ppc64_standard_linkage2)
871 (ppc64_standard_linkage3, ppc64_standard_linkage4)
872 (ppc64_standard_linkage5, ppc64_standard_linkage6)
873 (ppc64_standard_linkage7, ppc64_standard_linkage8): Add casts to
874 unsigned.
875
876 2018-08-27 Tom Tromey <tom@tromey.com>
877
878 * xtensa-tdep.h (XTREG_END): Add cast to unsigned.
879 (XTENSA_GDBARCH_TDEP_INSTANTIATE): Likewise.
880
881 2018-08-27 Tom Tromey <tom@tromey.com>
882
883 * tramp-frame.h (TRAMP_SENTINEL_INSN): Redefine.
884 * tilegx-linux-tdep.c (tilegx_linux_rt_sigframe): Use
885 ULONGEST_MAX.
886 * tic6x-linux-tdep.c (tic6x_linux_rt_sigreturn_tramp_frame): Use
887 ULONGEST_MAX.
888 * sparc64-linux-tdep.c (sparc64_linux_rt_sigframe): Use
889 ULONGEST_MAX.
890 * sparc-linux-tdep.c (sparc32_linux_sigframe)
891 (sparc32_linux_rt_sigframe): Use ULONGEST_MAX.
892 * ppc-nbsd-tdep.c (ppcnbsd_sigtramp, ppcnbsd2_sigtramp): Use
893 ULONGEST_MAX.
894 * ppc-linux-tdep.c (ppc32_linux_sigaction_tramp_frame)
895 (ppc64_linux_sigaction_tramp_frame)
896 (ppc32_linux_sighandler_tramp_frame)
897 (ppc64_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
898 * nios2-linux-tdep.c (nios2_r1_linux_rt_sigreturn_tramp_frame)
899 (nios2_r2_linux_rt_sigreturn_tramp_frame): Use ULONGEST_MAX.
900 * mn10300-linux-tdep.c (am33_linux_sigframe)
901 (am33_linux_rt_sigframe): Use ULONGEST_MAX.
902 * mips64-obsd-tdep.c (mips64obsd_sigframe): Use ULONGEST_MAX.
903 * mips-linux-tdep.c (mips_linux_o32_sigframe)
904 (mips_linux_o32_rt_sigframe, mips_linux_n32_rt_sigframe)
905 (mips_linux_n64_rt_sigframe, micromips_linux_o32_sigframe)
906 (micromips_linux_o32_rt_sigframe, micromips_linux_n32_rt_sigframe)
907 (micromips_linux_n64_rt_sigframe): Use ULONGEST_MAX.
908 * mips-fbsd-tdep.c (mips_fbsd_sigframe, mipsn32_fbsd_sigframe)
909 (mips64_fbsd_sigframe): Use ULONGEST_MAX.
910 * microblaze-linux-tdep.c
911 (microblaze_linux_sighandler_tramp_frame): Use ULONGEST_MAX.
912 * i386-nbsd-tdep.c (i386nbsd_sigtramp_sc16, i386nbsd_sigtramp_sc2)
913 (i386nbsd_sigtramp_si2, i386nbsd_sigtramp_si31)
914 (i386nbsd_sigtramp_si4): Use ULONGEST_MAX.
915 * hppa-nbsd-tdep.c (hppanbsd_sigtramp_si4): Use ULONGEST_MAX.
916 * common/common-types.h (ULONGEST_MAX): New define.
917 (CORE_ADDR_MAX): Fix formatting.
918 * bfin-linux-tdep.c (bfin_linux_sigframe): Use ULONGEST_MAX.
919 * arm-obsd-tdep.c (armobsd_sigframe): Use ULONGEST_MAX.
920 * arm-linux-tdep.c (arm_linux_sigreturn_tramp_frame)
921 (arm_linux_rt_sigreturn_tramp_frame)
922 (arm_eabi_linux_sigreturn_tramp_frame)
923 (arm_eabi_linux_rt_sigreturn_tramp_frame)
924 (thumb2_eabi_linux_sigreturn_tramp_frame)
925 (thumb2_eabi_linux_rt_sigreturn_tramp_frame)
926 (arm_linux_restart_syscall_tramp_frame)
927 (arm_kernel_linux_restart_syscall_tramp_frame): Use ULONGEST_MAX.
928 * arm-fbsd-tdep.c (arm_fbsd_sigframe): Use ULONGEST_MAX.
929 * aarch64-linux-tdep.c (aarch64_linux_rt_sigframe): Use
930 ULONGEST_MAX.
931 * aarch64-fbsd-tdep.c (aarch64_fbsd_sigframe): Use ULONGEST_MAX.
932
933 2018-08-27 Tom Tromey <tom@tromey.com>
934
935 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Use
936 CORE_ADDR_MAX.
937 * mips-tdep.c (mips_deal_with_atomic_sequence)
938 (micromips_deal_with_atomic_sequence): Use CORE_ADDR_MAX.
939 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw)
940 (arm_deal_with_atomic_sequence_raw): Use CORE_ADDR_MAX.
941 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Use
942 CORE_ADDR_MAX.
943 * aarch64-tdep.c (aarch64_software_single_step): Use
944 CORE_ADDR_MAX.
945
946 2018-08-27 Tom Tromey <tom@tromey.com>
947
948 * linespec.c (complete_linespec_component): Add cast to "char".
949 * completer.c (completion_tracker::build_completion_result): Add
950 cast to "char".
951
952 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
953
954 * solist.h (struct solist, struct target_so_ops): Fix
955 indentation.
956
957 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
958
959 * ada-tasks.c (ada_task_info_s): Remove typedef.
960 (DEF_VEC_O(ada_task_info_s)): Remove.
961 (struct ada_tasks_inferior_data): Initialize fields.
962 <task_list>: Make an std::vector.
963 (get_ada_tasks_inferior_data): Allocate with new.
964 (ada_get_task_number): Adjust.
965 (get_task_number_from_id): Likewise.
966 (valid_task_id): Likewise.
967 (ada_get_task_info_from_ptid): Likewise.
968 (iterate_over_live_ada_tasks): Likewise.
969 (add_ada_task): Likewise.
970 (read_known_tasks): Likewise.
971 (ada_build_task_list): Likewise.
972 (print_ada_task_info): Likewise.
973 (info_task): Likewise.
974 (task_command_1): Likewise.
975
976 2018-08-26 Simon Marchi <simon.marchi@polymtl.ca>
977
978 * ada-lang.c (add_angle_brackets): Return std::string.
979
980 2018-08-25 Simon Marchi <simon.marchi@polymtl.ca>
981
982 * python/py-threadevent.c (py_get_event_thread): Initialize
983 pythread.
984
985 2018-08-24 Pedro Alves <palves@redhat.com>
986
987 * python/py-bpevent.c (create_breakpoint_event_object): Use
988 copy-initialization.
989 * python/py-continueevent.c (emit_continue_event): Use
990 copy-initialization.
991 * python/py-exitedevent.c (create_exited_event_object): Return a
992 gdbpy_ref<>.
993 (emit_exited_event): Use copy-initialization.
994 * python/py-inferior.c (python_new_inferior)
995 (python_inferior_deleted, add_thread_object): Use
996 copy-initialization.
997 * python/py-infevents.c (create_inferior_call_event_object)
998 (create_register_changed_event_object)
999 (create_memory_changed_event_object): Return a gdbpy_ref<>.
1000 (emit_inferior_call_event, emit_memory_changed_event)
1001 (emit_register_changed_event): Use copy-initialization.
1002 * python/py-newobjfileevent.c (create_new_objfile_event_object):
1003 Return a gdbpy_ref<>.
1004 (emit_new_objfile_event): Use copy-initialization.
1005 (create_clear_objfiles_event_object): Return a gdbpy_ref<>.
1006 (emit_clear_objfiles_event): Use copy-initialization.
1007 * python/py-signalevent.c (create_signal_event_object): Use
1008 copy-initialization.
1009 * python/py-threadevent.c (create_thread_event_object): Use
1010 copy-initialization.
1011
1012 2018-08-24 Pedro Alves <palves@redhat.com>
1013 Simon Marchi <simon.marchi@ericsson.com>
1014
1015 PR gdb/23379
1016 * python/py-continueevent.c: Include "gdbthread.h".
1017 (create_continue_event_object): Add intro comment. Add 'ptid'
1018 parameter. Use it to find thread to pass to
1019 create_thread_event_object.
1020 (emit_continue_event): Pass PTID down to
1021 create_continue_event_object.
1022 * python/py-event.h (py_get_event_thread): Declare.
1023 (create_thread_event_object): Remove default from 'thread'
1024 parameter.
1025 * python/py-stopevent.c (create_stop_event_object): Use
1026 py_get_event_thread.
1027 * python/py-threadevent.c (get_event_thread): Rename to ...
1028 (py_get_event_thread): ... this, make extern, add 'ptid' parameter
1029 and use it to find the thread.
1030 (create_thread_event_object): Assert that THREAD isn't null.
1031 Don't find the event thread here.
1032
1033 2018-08-23 Kevin Buettner <kevinb@redhat.com>
1034
1035 * block.h (blockrange, blockranges): New struct declarations.
1036 (struct block): Add new field named `ranges'.
1037 (BLOCK_RANGES, BLOCK_NRANGES, BLOCK_RANGE, BLOCK_CONTIGUOUS_P)
1038 (BLOCK_RANGE_START, BLOCK_RANGE_END, BLOCK_ENTRY_PC): New
1039 macros for accessing ranges in struct block.
1040 (make_blockranges): New declaration.
1041 block.c (make_blockranges): New function.
1042 * dwarf2read.c (dwarf2_record_block_ranges): Fill in BLOCK_RANGES
1043 for block.
1044 * symtab.h (find_pc_partial_function): Add new parameter `block'.
1045 * blockframe.c (cache_pc_function_block): New static global.
1046 (clear_pc_function_cache): Clear cache_pc_function_block.
1047 (find_pc_partial_function): Move comment to symtab.h. Add
1048 support for non-contiguous blocks.
1049 * cli/cli-cmds.c (block.h): Include.
1050 (print_disassembly): Handle printing of non-contiguous blocks.
1051 (disassemble_current_function): Likewise.
1052 (disassemble_command): Likewise.
1053
1054 * ax-gdb.c (gen_var_ref): Use BLOCK_ENTRY_PC in place of
1055 BLOCK_START.
1056 * blockframe.c (get_pc_function_start): Likewise.
1057 * compile/compile-c-symbols.c (convert_one_symbol): Likewise.
1058 (gcc_symbol_address): Likewise.
1059 * compile/compile-object-run.c (compile_object_run): Likewise.
1060 * compile/compile.c (get_expr_block_and_pc): Likewise.
1061 * dwarf2loc.c (dwarf2_find_location_expression): Likewise.
1062 (func_addr_to_tail_call_list): Likewise.
1063 * findvar.c (default_read_var_value): Likewise.
1064 * inline-frame.c (inline_frame_this_id): Likewise.
1065 (skip-inline_frames): Likewise.
1066 * infcmd.c (until_next_command): Likewise.
1067 * linespec.c (convert_linespec_to_sals): Likewise.
1068 * parse.c (parse_exp_in_context_1): Likewise.
1069 * printcmd.c (build_address_symbolic): likewise.
1070 (info_address_command): Likewise.
1071 symtab.c (find_function_start_sal): Likewise.
1072 (skip_prologue_sal): Likewise.
1073 (find_function_alias_target): Likewise.
1074 (find_gnu_ifunc): Likewise.
1075 * stack.c (find_frame_funname): Likewise.
1076 * symtab.c (fixup_symbol_section): Likewise.
1077 (find_function_start_sal): Likewise.
1078 (skip_prologue_sal): Likewsie.
1079 (find_function_alias_target): Likewise.
1080 (find_gnu_ifunc): Likewise.
1081 * tracepoint.c (info_scope_command): Likewise.
1082 * value.c (value_fn_field): Likewise.
1083
1084 * infrun.c (fill_in_stop_func): Use find_function_entry_range_from_pc
1085 in place of find_pc_partial_function.
1086 * blockframe.c (find_function_entry_range_from_pc): New function.
1087 * symtab.h (find_function_entry_range_from_pc): Declare and document.
1088 * objfiles.c (objfile_relocate1): Relocate start and end addresses
1089 for each range in a block.
1090
1091
1092 2018-08-23 Xavier Roirand <roirand@adacore.com>
1093
1094 * machoread.c (macho_symfile_read_all_oso): Remove uneeded
1095 incrementation.
1096
1097 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1098
1099 * solib-svr4.c (read_program_headers_from_bfd): Return
1100 gdb::optional<gdb::byte_vector>.
1101 (svr4_exec_displacement): Adjust.
1102
1103 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1104
1105 * solib-svr4.c (read_program_header): Return
1106 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
1107 (find_program_interpreter): Return
1108 gdb::optional<gdb::byte_vector>.
1109 (scan_dyntag_auxv): Adjust.
1110 (enable_break): Adjust.
1111 (svr4_exec_displacement): Adjust.
1112
1113 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1114
1115 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
1116 * inf-child.c (inf_child_target::terminal_save_inferior): New.
1117
1118 2018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
1119
1120 * guile/scm-string.c (gdbscm_scm_from_printf): Use
1121 string_vprintf.
1122 * guile/scm-utils.c (gdbscm_printf): Likewise.
1123 * serial.c (serial_printf): Likewise.
1124 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
1125
1126 2018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
1127
1128 * stack.c (print_frame): Print frame architecture when printing on
1129 an MI output.
1130 * NEWS: Mention new "arch" attribute in frame output.
1131
1132 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1133
1134 * arch/aarch64.h (aarch64_regnum): Update comment.
1135
1136 2018-08-21 Alan Hayward <alan.hayward@arm.com>
1137
1138 * NEWS: Add SVE to 8.2 section.
1139
1140 2018-08-21 Pedro Alves <palves@redhat.com>
1141
1142 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
1143 out from gdbscm_parse_function_args.
1144 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
1145 gdbscm_parse_function_args_1.
1146
1147 2018-08-21 Simon Marchi <simon.marchi@ericsson.com>
1148
1149 PR gdb/17816
1150 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
1151 operator.
1152
1153 2018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
1154
1155 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
1156
1157 2018-08-19 Michael Spang <spang@google.com>
1158
1159 PR gdb/11786
1160 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
1161 for PT_TLS segments.
1162
1163 2018-08-18 Kevin Buettner <kevinb@redhat.com>
1164
1165 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
1166 dwarf_variable_value.
1167 * dwarf2-frame.c (class dwarf_expr_executor):
1168 Add override for dwarf_variable_value.
1169 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
1170 (class symbol_needs_eval_context): Likewise.
1171 (indirect_synthetic_pointer): Add forward declaration.
1172 (sect_variable_value): New function.
1173 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
1174 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
1175 for DW_OP_GNU_variable_value.
1176
1177 2018-08-16 Tom Tromey <tom@tromey.com>
1178
1179 * top.c (read_command_file): Update.
1180 (command_line_input): Remove "repeat" argument.
1181 * ada-lang.c (get_selections): Update.
1182 * linespec.c (decode_line_2): Update.
1183 * defs.h (command_line_input): Remove argument.
1184 * cli/cli-script.c (read_next_line): Update.
1185 * python/py-gdb-readline.c: Update.
1186
1187 2018-08-17 Tom Tromey <tom@tromey.com>
1188
1189 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
1190 command_line_input.
1191
1192 2018-08-15 Tom Tromey <tom@tromey.com>
1193
1194 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
1195
1196 2018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
1197
1198 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
1199 If used, use find_pc_partial_function to find address range
1200 to disassemble.
1201 * mi/mi-main.c (mi_cmd_list_features): Report
1202 "data-disassemble-a-option" feature.
1203 * NEWS: Mention new -data-disassemble option -a.
1204
1205 2018-08-13 Tom Tromey <tom@tromey.com>
1206
1207 * common/common-defs.h (_FORTIFY_SOURCE): Define.
1208
1209 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1210
1211 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
1212 (aarch64_linux_collect_sve_regset): Likewise.
1213 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
1214 * regcache.h (regcache_map_entry_size): New function.
1215
1216 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1217
1218 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
1219 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
1220 (SVE_HEADER_VL_LENGTH): Likewise.
1221 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
1222 (SVE_HEADER_FLAGS_LENGTH): Likewise.
1223 (SVE_HEADER_RESERVED_LENGTH): Likewise.
1224 (SVE_HEADER_SIZE_OFFSET): Likewise.
1225 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
1226 (SVE_HEADER_VL_OFFSET): Likewise.
1227 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
1228 (SVE_HEADER_FLAGS_OFFSET): Likewise.
1229 (SVE_HEADER_RESERVED_OFFSET): Likewise.
1230 (SVE_HEADER_SIZE): Likewise.
1231 (aarch64_linux_core_read_vq): Add function.
1232 (aarch64_linux_core_read_description): Check for SVE section.
1233
1234 2018-08-13 Alan Hayward <alan.hayward@arm.com>
1235
1236 * aarch64-fbsd-tdep.c
1237 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
1238 collect_size.
1239 * aarch64-linux-tdep.c
1240 (aarch64_linux_iterate_over_regset_sections): Likewise.
1241 * alpha-linux-tdep.c
1242 (alpha_linux_iterate_over_regset_sections):
1243 * alpha-nbsd-tdep.c
1244 (alphanbsd_iterate_over_regset_sections): Likewise.
1245 * amd64-fbsd-tdep.c
1246 (amd64fbsd_iterate_over_regset_sections): Likewise.
1247 * amd64-linux-tdep.c
1248 (amd64_linux_iterate_over_regset_sections): Likewise.
1249 * arm-bsd-tdep.c
1250 (armbsd_iterate_over_regset_sections): Likewise.
1251 * arm-fbsd-tdep.c
1252 (arm_fbsd_iterate_over_regset_sections): Likewise.
1253 * arm-linux-tdep.c
1254 (arm_linux_iterate_over_regset_sections): Likewise.
1255 * corelow.c (get_core_registers_cb): Likewise.
1256 (core_target::fetch_registers): Likewise.
1257 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
1258 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
1259 * gdbarch.h (void): Regenerate.
1260 * gdbarch.sh: Add supply_size and collect_size.
1261 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
1262 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
1263 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
1264 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
1265 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
1266 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
1267 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
1268 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
1269 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
1270 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
1271 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
1272 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
1273 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
1274 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
1275 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
1276 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
1277 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
1278 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
1279 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
1280 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
1281 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
1282 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
1283 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
1284 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
1285 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
1286 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
1287 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
1288 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
1289 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
1290 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
1291
1292 2018-08-10 Simon Marchi <simon.marchi@ericsson.com>
1293
1294 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
1295 with string_printf.
1296
1297 2018-08-10 Keith Seitz <keiths@redhat.com>
1298
1299 * compile/compile-c-support.c (add_code_header, add_code_footer):
1300 Move into policy class.
1301 (c_push_user_expression, pop_user_expression_nop)
1302 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
1303 (compile_program): New host class.
1304 (c_compile_program): New typedef.
1305 (c_compute_porgram): Use c_compile_program.
1306
1307 2018-08-10 Keith Seitz <keiths@redhat.com>
1308
1309 * compile/compile-internal.h (compile_instance::~compile_instance):
1310 Remove calls to htab_delete.
1311 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
1312 * compile.c (compile_instance::compile_instance): Initialize
1313 htab unique pointers.
1314 (compile_instance::get_cached_type, compile_instance::insert_type)
1315 (compile_instance::error_symbol_once): Update for unique_ptr.
1316
1317 2018-08-10 Keith Seitz <keiths@redhat.com>
1318
1319 * compile/compile-c-symbols.c (struct symbol_error)
1320 (hash_symbol_error, eq_symbol_error, del_symbol_error)
1321 (compile_instance::insert_symbol_error)
1322 (compile_instance::error_symbol_once): Move to ...
1323 * compile/compile.c: ... here.
1324
1325 2018-08-10 Keith Seitz <keiths@redhat.com>
1326
1327 * compile/compile-c-support.c (c_get_compile_context): Use `new'
1328 instead of `new_compile_instance'.
1329 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
1330 Update description.
1331 If the symbol error map is not initialized, create it.
1332 (generate_c_for_for_one_symbol): Do not check/initialize
1333 the symbol error map.
1334 * compile/compile-c-types.c (compile_c_instance): Make a class.
1335 Update all callers.
1336 (compile_instance::compile_instance): Initialize the type cache.
1337 (get_cached_type): New function.
1338 (insert_type): Update description.
1339 (compile_c_instance::m_default_cflags): Define.
1340 (convert_type): Update description. Use get_cached_type.
1341 (delete_instance): Moved to destructor.
1342 (new_compile_instance): Moved to constructor.
1343 * compile/compile-c.h (compile_c_instance): Make class inheriting
1344 from compile_instance.
1345 <base>: Remove field.
1346 <type_map, symbol_err_map>: Move to base class.
1347 <c_plugin>: Rename to `m_plugin' and remove pointer type.
1348 * compile/compile-internal.h (compile_instance): Make class.
1349 <type_map_t, symbol_err_map_t>: Define.
1350 <fe>: Rename to `m_gcc_fe'.
1351 <scope, block, gcc_target_options>: Add `m_' prefix.
1352 <m_type_map, m_symbol_err_map>: New fields, moved from
1353 compile_c_instance.
1354 <destroy>: Remove.
1355 (convert_type, new_compile_instance): Remove.
1356 * compile/compile.c (cleanup_compile_instance): Remove.
1357 (compile_to_object): Use unique_ptr to eliminate cleanups.
1358 (compile_instance::set_print_callback, compile_instance::version)
1359 (compile_instance::set_verbose)
1360 (compile_instance::set_driver_filename)
1361 (compile_instance::set_triplet_regexp)
1362 (compile_instance::set_arguments)
1363 (compile_instance::set_source_file)
1364 (compile_instance::compile): Define.
1365
1366 2018-08-10 Keith Seitz <keiths@redhat.com>
1367
1368 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
1369 * compile/compile-c-types.c: Define GCC_METHODN macros and include
1370 gcc-c-fe.def to define C plugin.
1371 (delete_instance): Delete `c_plugin'.
1372 (new_compile_instance): Initialize `c_plugin'.
1373 * compile/compile-c.h: Include gcc_c_plugin.h.
1374 (struct compile_c_instance) <c_plugin>: New member.
1375 * gcc-c-plugin.h: New file.
1376 Update all callers with API change.
1377
1378 2018-08-10 Keith Seitz <keiths@redhat.com>
1379
1380 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
1381 (HFILES_NO_SRCDIR): ... to here.
1382 Add compile-internal.h and compile-c.h.
1383 * compile/compile-c-support.c: Include compile-c.h.
1384 * compile/compile-c-symbols.c: Include compile-c.h.
1385 (generate_c_for_variable_locations): Update comment.
1386 * compile/compile-c-types.c: Include compile-c.h.
1387 * compile/compile-c.h: New file -- moved C language declarations
1388 from other files here.
1389 * compile/compile-internal.h: Do not include hashtab.h or
1390 common/enum-flags.h.
1391 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
1392 (gcc_convert_symbol, gcc_symbol_address)
1393 (generate_c_for_variable_locations, c_get_mode_for_size)
1394 (c_get_range_decl_name): Definitions moved to compile-c.h.
1395 * compile/compile-loc2c.c: Include compile-c.h.
1396
1397 2018-08-10 Keith Seitz <keiths@redhat.com>
1398
1399 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
1400 (c_symbol_substitution_name): ... this.
1401 Update all callers.
1402
1403 2018-08-10 Keith Seitz <keiths@redhat.com>
1404
1405 * compile/compile-c-support.c (c_compute_program): Use
1406 unique_xmalloc_ptr to eliminate cleanup.
1407 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
1408 Return a unique_xmalloc_ptr and eliminate cleanup.
1409 * compile/compile-internal.h (generate_c_for_variable_locations):
1410 Return unique_xmalloc_ptr and update description.
1411
1412 2018-08-10 Alan Hayward <alan.hayward@arm.com>
1413
1414 * corelow.c (core_target::get_core_register_section): Rename
1415 min_size to section_min_size.
1416
1417 2018-08-09 Jim Wilson <jimw@sifive.com>
1418
1419 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
1420 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
1421 * NEWS: Mention new GNU/Linux RISC-V target.
1422 * configure.host: Add riscv*-*-linux*.
1423 * configure.nat: Add riscv*.
1424 * configure.tgt: Add riscv*-*-linux*.
1425 * riscv-linux-nat.c: New file.
1426 * riscv-linux-tdep.c: New file.
1427
1428 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1429
1430 * infrun.c (resume): Make static, add forward declaration.
1431 (proceed): Update header comment.
1432 * infrun.h (resume): Delete declaration.
1433
1434 2018-08-09 Tom Tromey <tom@tromey.com>
1435
1436 * riscv-tdep.h: Minor formatting fixes.
1437
1438 2018-08-09 Simon Marchi <simon.marchi@ericsson.com>
1439
1440 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
1441 * dwarf-index-cache.c (create_dir_and_check): Likewise.
1442 (test_mkdir_recursive): Likewise.
1443 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
1444
1445 2018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
1446
1447 * valarith.c (value_subscripted_rvalue): If an array is not in
1448 memory, and we don't know the upper bound, then we can't know that
1449 the requested element exists or not.
1450
1451 2018-08-08 Simon Marchi <simon.marchi@ericsson.com>
1452
1453 * target.c (str_comma_list_concat_elem): Fix typo in comment.
1454 (target_options_to_string): Add comment.
1455
1456 2018-08-08 Tom Tromey <tom@tromey.com>
1457
1458 * unittests/scoped_mmap-selftests.c: Check result of "write".
1459
1460 2018-08-08 Jim Wilson <jimw@sifive.com>
1461
1462 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
1463 (decode_register_index_short): New.
1464 (decode_j_type_insn, decode_cj_type_insn): New.
1465 (decode_b_type_insn, decode_cb_type_insn): New.
1466 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
1467 local xlen. Check xlen when decoding ambiguous compressed insns. In
1468 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
1469 is_c_sw_insn instead of is_sw_insn.
1470 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
1471 (riscv_software_single_step): New.
1472 * riscv-tdep.h (riscv_software_single_step): Declare.
1473
1474 * riscv-tdep.c (riscv_isa_xlen): Drop static.
1475 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
1476
1477 2018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
1478
1479 PR gdb/18050:
1480 * target.c (dispose_inferior): Don't dispose of inferiors that are
1481 already killed.
1482
1483 2018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
1484
1485 * remote.c (remote_target::download_tracepoint): Change char* to
1486 const char*.
1487
1488 2018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
1489
1490 * target.h (target_options_to_string): Return an std::string.
1491 * target.c (str_comma_list_concat_elem): Return void, use
1492 std::string.
1493 (do_option): Likewise.
1494 (target_options_to_string): Return an std::string.
1495 * linux-nat.c (linux_nat_target::wait): Adjust.
1496 * target-debug.h (target_debug_print_options): Adjust.
1497
1498 2018-08-07 Tom Tromey <tom@tromey.com>
1499
1500 * Makefile.in (CPPFLAGS): New variable.
1501 (INTERNAL_CPPFLAGS): Use it.
1502
1503 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1504
1505 * NEWS: Mention the index cache.
1506
1507 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1508
1509 * common/pathstuff.h (get_standard_cache_dir): New.
1510 * common/pathstuff.c (get_standard_cache_dir): New.
1511 * build-id.h (build_id_to_string): New.
1512 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
1513 DEBUG_STR_SUFFIX): Move to here.
1514 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
1515 DEBUG_STR_SUFFIX): Move from there.
1516 (write_psymtabs_to_index): Make non-static, add basename
1517 parameter. Write to temporary files, rename when done.
1518 (save_gdb_index_command): Adjust call to
1519 write_psymtabs_to_index.
1520 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
1521 field.
1522 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
1523 (get_gdb_index_contents_from_cache): New.
1524 (get_gdb_index_contents_from_cache_dwz): New.
1525 (dwarf2_initialize_objfile): Read index from cache.
1526 (dwarf2_build_psymtabs): Save to index.
1527 * dwarf-index-cache.h: New file.
1528 * dwarf-index-cache.c: New file.
1529 * dwarf-index-write.h: New file.
1530
1531 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1532
1533 * gnulib/aclocal.m4: Re-generate.
1534 * gnulib/config.in: Re-generate.
1535 * gnulib/configure: Re-generate.
1536 * gnulib/import/Makefile.am: Re-generate.
1537 * gnulib/import/Makefile.in: Re-generate.
1538 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
1539 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1540 * gnulib/import/m4/mkdir.m4: New file.
1541 * gnulib/import/mkdir.c: New file.
1542 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
1543 module.
1544
1545 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1546
1547 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
1548 * common/scoped_mmap.c: New file.
1549 * common/scoped_mmap.h (destroy): New method.
1550 (~scoped_mmap, reset): Use destroy.
1551 (scoped_mmap): New move constructor.
1552 (mmap_file): New declaration.
1553 * unittests/scoped_mmap-selftests.c (test_normal,
1554 test_invalid_filename, run_tests): New functions.
1555 (_initialize_scoped_mmap_selftests): Register selftest.
1556
1557 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1558
1559 * dwarf2read.c (read_gdb_index_from_section): Rename to...
1560 (read_gdb_index_from_buffer): ... this. Remove section
1561 parameter, add buffer parameter.
1562 (get_gdb_index_contents_ftype,
1563 get_gdb_index_contents_dwz_ftype): New typedefs.
1564 (dwarf2_read_gdb_index): Add callback parameters to get the
1565 index contents.
1566 (get_gdb_index_contents_from_section): New.
1567 (dwarf2_initialize_objfile): Update call to
1568 dwarf2_read_gdb_index.
1569
1570 2018-08-07 Simon Marchi <simon.marchi@ericsson.com>
1571
1572 * common/filestuff.h (gdb_fopen_cloexec): New overload.
1573 (gdb_open_cloexec): Likewise.
1574 * nat/linux-osdata.c (command_from_pid): Use string_printf.
1575 (commandline_from_pid): Likewise.
1576 (linux_xfer_osdata_threads): Likewise.
1577 (linux_xfer_osdata_fds): Likewise.
1578 * ada-lang.c (is_package_name): Likewise.
1579 * auxv.c (procfs_xfer_auxv): Likewise.
1580 * breakpoint.c (print_one_breakpoint_location): Use
1581 uiout::field_fmt.
1582 (print_one_catch_solib): Use string_printf.
1583 * coff-pe-read.c (add_pe_exported_sym): Likewise.
1584 (add_pe_forwarded_sym): Likewise.
1585 * dwarf2read.c (create_type_unit_group): Likewise.
1586 (build_error_marker_type): Likewise.
1587 * infcall.c (get_function_name): Likewise.
1588 * valprint.c (print_converted_chars_to_obstack): Likewise.
1589 * xtensa-tdep.c (xtensa_register_type): Likewise.
1590
1591 2018-08-06 Simon Marchi <simon.marchi@ericsson.com>
1592
1593 * remote.c (remote_target::download_tracepoint): Fix format
1594 string errors.
1595
1596 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1597
1598 * tracefile.c: Include common/byte-vector.h.
1599 (trace_save): Change type of buf to gdb::byte_vector. Initialize
1600 with trace_regblock_size if needed. Update uses of buf.
1601
1602 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1603
1604 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
1605 std::vector<unsigned char>.
1606 * tracepoint.c (collection_list::collection_list): Remove
1607 m_regs_mask initializer from initializer list. Resize
1608 m_regs_mask using the largest remote register number.
1609 (collection_list::add_remote_register): Remove size check on
1610 m_regs_mask. Use at to access element.
1611 (collection_list::stringify): Change type of temp_buf to
1612 gdb::char_vector. Update uses of temp_buf. Resize if needed to
1613 stringify the register mask. Use pack_hex_byte for the register
1614 mask.
1615
1616 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1617
1618 * tracepoint.h (class collection_list) <add_register>: Remove.
1619 <add_remote_register, add_ax_registers, add_local_register>:
1620 Declare.
1621 <add_memrange>: Add scope parameter.
1622 * tracepoint.c (encode_actions_1): Likewise.
1623 (collection_list::add_register): Rename to ...
1624 (collection_list::add_remote_register): ... this. Update
1625 comment.
1626 (collection_list::add_ax_registers, add_local_register): New
1627 methods.
1628 (collection_list::add_memrange): Add scope parameter. Call
1629 add_local_register instead of add_register.
1630 (finalize_tracepoint_aexpr): New function.
1631 (collection_list::collect_symbol): Update calls to add_memrange.
1632 Call add_local_register instead of add_register. Call
1633 add_ax_registers. Call finalize_tracepoint_aexpr.
1634 (encode_actions_1): Get remote regnos for $reg action. Call
1635 add_remote_register, add_ax_registers, and add_local_register.
1636 Update call to add_memrange. Call finalize_tracepoint_aexpr.
1637 (validate_actionline): Call finalize_tracepoint_aexpr.
1638
1639 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1640
1641 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
1642 Replace array buf with gdb::char_vector buf, of size
1643 get_remote_packet_size (). Replace references to buf and
1644 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
1645 and xsnprintf with snprintf. Raise errors if the buffer is too
1646 small.
1647
1648 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1649
1650 * remote.c (remote_target::download_tracepoint): Fix the has_more
1651 predicate in the QTDP action list iteration.
1652
1653 2018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
1654
1655 * remote.c (remote_target::download_tracepoint): Fix indentation
1656 in for block.
1657
1658 2018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1659
1660 * proc-api.c (_initialize_proc_api): Remove c, unused.
1661 * procfs.c (procfs_init_inferior): Remove signals, unused.
1662 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
1663 unused.
1664
1665 2018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
1666 Andrew Burgess <andrew.burgess@embecosm.com>
1667
1668 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
1669 'W_STOPCODE (0)' as this could be ambiguous.
1670
1671 2018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
1672
1673 * ser-tcp.c (net_open): Fix thinko when deciding whether to
1674 disable TCP's Nagle algorithm (use "ai_protocol" instead of
1675 "ai_socktype").
1676
1677 2018-08-02 Tom Tromey <tom@tromey.com>
1678
1679 PR symtab/16842.
1680 * dwarf2read.c (read_func_scope): Set symtab on template parameter
1681 symbols.
1682 (process_structure_scope): Likewise.
1683
1684 2018-08-02 Xavier Roirand <roirand@adacore.com>
1685
1686 PR gdb/22629:
1687 * darwin-nat.c (darwin_kill_inferior): Fix handling of
1688 kill inferior.
1689
1690 2018-08-02 Tom Tromey <tom@tromey.com>
1691
1692 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
1693 (darwin_suspend_inferior, darwin_resume_inferior)
1694 (darwin_decode_notify_message, darwin_resume_inferior_threads)
1695 (darwin_check_new_threads): Check result of get_darwin_inferior.
1696
1697 2018-07-31 Joel Brobecker <brobecker@adacore.com>
1698
1699 GDB 8.1.1 released.
1700
1701 2018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
1702
1703 * varobj.c (varobj_get_path_expr_parent): Report an error if
1704 parent is a dynamic varobj.
1705
1706 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1707
1708 * gnulib/aclocal.m4: Re-generate.
1709 * gnulib/config.in: Re-generate.
1710 * gnulib/configure: Re-generate.
1711 * gnulib/import/Makefile.in: Re-generate.
1712 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
1713 * gnulib/import/m4/onceonly.m4: Re-generate.
1714
1715 2018-07-31 Simon Marchi <simon.marchi@ericsson.com>
1716
1717 * target-descriptions.c (struct xml_test_tdesc): New.
1718 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
1719 (record_xml_tdesc): Update.
1720 (maintenance_check_xml_descriptions): Update.
1721 * target-descriptions.h (record_xml_tdesc): Update comment.
1722
1723 2018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
1724
1725 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
1726 checking array bounds are defined.
1727
1728 2018-07-30 Tom Tromey <tom@tromey.com>
1729
1730 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
1731 irreflexivity violation.
1732
1733 2018-07-30 Tom Tromey <tom@tromey.com>
1734
1735 * cli/cli-decode.c (lookup_cmd): Remove lint code.
1736 * value.c (unpack_long): Remove lint code.
1737 * valops.c (value_ind): Remove lint code.
1738 * valarith.c (value_x_binop, value_x_unop, value_equal)
1739 (value_pos): Remove lint code.
1740
1741 2018-07-28 Tom de Vries <tdevries@suse.de>
1742
1743 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
1744 with undefined upper bound as <optimized out>.
1745
1746 2018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
1747
1748 * gcore.in: Rename variable "name" to "prefix". Expand
1749 "usage" text.
1750
1751 2018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
1752
1753 * windows-nat.c (windows_nat_target::create_inferior): Update to
1754 call close() in global namespace.
1755
1756 2018-07-26 Tom Tromey <tom@tromey.com>
1757
1758 * dwarf-index-write.c (add_address_entry): Don't add objfile
1759 offsets.
1760 * dbxread.c (find_stab_function): Rename from
1761 find_stab_function_addr. Return a bound_minimal_symbol.
1762 (read_dbx_symtab): Use raw_text_low, raw_text_high.
1763 Don't add objfile offsets.
1764 (end_psymtab): Use raw_text_low, raw_text_high,
1765 MSYMBOL_VALUE_RAW_ADDRESS.
1766 (read_ofile_symtab): Update.
1767 (process_one_symbol): Update.
1768 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
1769 offsets.
1770 (dw2_relocate): Remove.
1771 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
1772 searching addrmap.
1773 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
1774 Update.
1775 (process_psymtab_comp_unit_reader, add_partial_symbol)
1776 (add_partial_subprogram, dwarf2_ranges_read): Update.
1777 (load_partial_dies): Update.
1778 (add_address_entry): Don't add objfile offsets.
1779 (dwarf2_build_include_psymtabs): Update.
1780 (create_addrmap_from_aranges): Don't add objfile offsets.
1781 (dw2_find_pc_sect_compunit_symtab): Update.
1782 * mdebugread.c (parse_symbol): Don't add objfile offsets.
1783 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
1784 Update.
1785 (parse_partial_symbols): Don't add objfile offsets. Use
1786 raw_text_low, raw_text_high. Update.
1787 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
1788 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
1789 or call 'relocate' quick function. Clear psymbol_map.
1790 * psympriv.h (struct partial_symbol) <address>: Add section
1791 offset.
1792 <set_unrelocated_address>: Rename from set_address.
1793 <raw_text_low, raw_text_high>: New methods.
1794 <text_low, text_high>: Add objfile parameter.
1795 (add_psymbol_to_bcache): Add 'section' parameter. Call
1796 set_unrelocated_address.
1797 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1798 (find_pc_psymbol): Update.
1799 (fixup_psymbol_section, relocate_psymtabs): Remove.
1800 (dump_psymtab, psym_functions): Update.
1801 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
1802 parameter.
1803 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
1804 (start_psymtab_common): Update.
1805 * symfile-debug.c (debug_qf_relocate): Remove.
1806 (debug_sym_quick_functions): Update.
1807 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
1808 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
1809 Update.
1810
1811 2018-07-26 Tom Tromey <tromey@redhat.com>
1812
1813 * dbxread.c (end_psymtab): Use text_high_valid and
1814 text_low_valid.
1815 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
1816 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
1817 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1818 Update comment.
1819 <text_low_valid, text_high_valid>: New fields.
1820 <set_text_low, set_text_high>: Update.
1821 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
1822
1823 2018-07-26 Tom Tromey <tom@tromey.com>
1824
1825 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
1826 Update.
1827 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
1828 textlow and texthigh fields.
1829 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
1830 Update.
1831 * mdebugread.c (parse_lines, parse_partial_symbols)
1832 (psymtab_to_symtab_1): Update.
1833 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
1834 Rename fields. Update comment. Now private.
1835 <text_low, text_high, set_text_low, set_text_high>: New methods.
1836 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1837 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
1838 (start_psymtab_common, maintenance_info_psymtabs)
1839 (maintenance_check_psymtabs): Update.
1840 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
1841 texthigh fields.
1842 (scan_xcoff_symtab): Update.
1843
1844 2018-07-26 Tom Tromey <tromey@redhat.com>
1845
1846 * psympriv.h (struct partial_symbol) <unrelocated_address,
1847 address, set_address>: New methods.
1848 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
1849 (fixup_psymbol_section, relocate_psymtabs): Update.
1850 (print_partial_symbols): Add 'objfile' parameter. Update.
1851 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
1852 Update.
1853
1854 2018-07-26 Tom Tromey <tom@tromey.com>
1855
1856 * dwarf-index-write.c (write_psymbols, debug_names::insert)
1857 (debug_names::write_psymbols): Update.
1858 * psympriv.h (struct partial_symbol): Derive from
1859 general_symbol_info.
1860 <obj_section>: New method.
1861 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
1862 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
1863 (find_pc_sect_psymbol, fixup_psymbol_section)
1864 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
1865 (print_partial_symbols, recursively_search_psymtabs)
1866 (compare_psymbols, psymbol_hash, psymbol_compare)
1867 (add_psymbol_to_bcache, maintenance_check_psymtabs)
1868 (psymbol_name_matches, psym_fill_psymbol_map): Update.
1869
1870 2018-07-26 Tom Tromey <tromey@redhat.com>
1871
1872 * dbxread.c (end_psymtab): Remove dead code.
1873
1874 2018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
1875
1876 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
1877 DWARF unwinders are disabled.
1878 * dwarf2-frame.c: Add dwarf2read.h include.
1879 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
1880 disabled.
1881 (dwarf2_frame_unwinders_enabled_p): Define.
1882 (show_dwarf_unwinders_enabled_p): New function.
1883 (_initialize_dwarf2_frame): Register switch to control DWARF
1884 unwinder use.
1885 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
1886 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
1887 (show_dwarf_cmdlist): Remove static keyword.
1888 * dwarf2read.h (set_dwarf_cmdlist): Declare.
1889 (show_dwarf_cmdlist): Declare.
1890 * NEWS: Document new feature.
1891
1892 2018-07-26 Tom de Vries <tdevries@suse.de>
1893
1894 PR breakpoints/23366
1895 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
1896
1897 2018-07-26 Tom de Vries <tdevries@suse.de>
1898
1899 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
1900 DW_AT_count can't be translated to a dynamic prop.
1901
1902 2018-07-25 Tom de Vries <tdevries@suse.de>
1903
1904 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
1905 try/catch.
1906
1907 2018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
1908
1909 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
1910
1911 2018-07-25 Joel Brobecker <brobecker@adacore.com>
1912
1913 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
1914
1915 2018-07-24 Keith Seitz <keiths@redhat.comt
1916
1917 PR symtab/23010
1918 * dwarf2read.c (dw2_add_symbol_to_list): New function.
1919 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
1920 instead of add_symbol_to_list.
1921 (read_file_scope): Call prepare_one_comp_unit before reading
1922 any other DIEs.
1923
1924 2018-07-24 Simon Marchi <simon.marchi@ericsson.com>
1925
1926 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
1927
1928 2018-07-24 Tom Tromey <tom@tromey.com>
1929
1930 * utils.c (malloc, realloc, free): Don't declare.
1931 * configure, config.in: Rebuild.
1932 * configure.ac: Don't check for declarations of free, malloc, or
1933 realloc.
1934
1935 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1936
1937 * aarch64-linux-nat.c
1938 (aarch64_linux_nat_target::stopped_data_address): Remove unused
1939 variable.
1940 * arm-linux-nat.c (fetch_regs): Likewise.
1941 (store_regs): Likewise.
1942 (fetch_vfp_regs): Likewise.
1943 (store_vfp_regs): Likewise.
1944 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
1945 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
1946 (arm_linux_nat_target::insert_watchpoint): Likewise.
1947 (arm_linux_nat_target::remove_watchpoint): Likewise.
1948 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
1949 Likewise.
1950 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
1951 Likewise.
1952 * ppc-linux-nat.c (fetch_register): Likewise.
1953 (fetch_all_gp_regs): Likewise.
1954 (fetch_ppc_registers): Likewise.
1955 (store_all_gp_regs): Likewise.
1956 (store_ppc_registers): Likewise.
1957 (hwdebug_insert_point): Likewise.
1958 (can_use_watchpoint_cond_accel): Likewise.
1959 * remote-sim.c (gdb_os_write_stdout): Likewise.
1960
1961 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
1962 Tom Tromey <tom@tromey.com>
1963
1964 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
1965 test for it.
1966 * configure: Rebuild.
1967
1968 2018-07-22 Tom Tromey <tom@tromey.com>
1969
1970 * regformats/regdat.sh: Define xmltarget_${name} inside
1971 #ifndef IN_PROCESS_AGENT.
1972
1973 2018-07-22 Tom Tromey <tom@tromey.com>
1974
1975 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
1976
1977 2018-07-22 Tom Tromey <tom@tromey.com>
1978
1979 * symfile.c (reread_symbols): Notify iter, not objfile.
1980
1981 2018-07-22 Tom Tromey <tom@tromey.com>
1982
1983 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
1984 Use arch_ops.
1985 (ravenscar_thread_target::prepare_to_store): Likewise.
1986
1987 2018-07-22 Tom Tromey <tom@tromey.com>
1988
1989 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
1990 unused variable. Call value_fetch_lazy when needed.
1991 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
1992 Remove unused variable. Call value_fetch_lazy when needed.
1993
1994 2018-07-22 Tom Tromey <tom@tromey.com>
1995
1996 * m32c-tdep.c (mark_dma): Return void.
1997 (make_regs): Remove unused declarations.
1998
1999 2018-07-22 Tom Tromey <tom@tromey.com>
2000
2001 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
2002 cmdscm_get_valid_command_smob_arg_unsafe for effect.
2003 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
2004 bkscm_get_valid_block_smob_arg_unsafe for effect.
2005
2006 2018-07-22 Tom Tromey <tom@tromey.com>
2007
2008 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
2009 value_type.
2010
2011 2018-07-22 Tom Tromey <tom@tromey.com>
2012
2013 * windows-nat.c (saved_context): Conditionally define.
2014 * remote.c (remote_target::remote_btrace_maybe_reopen):
2015 Conditionally declare "warned".
2016 * inflow.c (sigquit_ours): Conditionally define.
2017 (new_tty): Move "tty" declaration inside #if.
2018 * guile/guile.c (guile_datadir): Conditionally define.
2019 * charset.c (set_be_le_names): Move some declarations inside #if.
2020 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
2021 #if.
2022 (parse_xml_btrace_conf): Likewise.
2023
2024 2018-07-22 Tom Tromey <tom@tromey.com>
2025
2026 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
2027
2028 2018-07-22 Tom Tromey <tom@tromey.com>
2029
2030 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
2031 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
2032 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
2033 * buildsym-legacy.c (get_macro_table): Remove unused variable.
2034 * stack.c (frame_apply_level_command): Remove unused variable.
2035 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
2036 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
2037 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
2038 unused variable.
2039 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
2040 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
2041 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
2042 variable.
2043 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
2044 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
2045 variable.
2046 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
2047 Remove unused variable.
2048 * cli/cli-script.c (recurse_read_control_structure): Remove unused
2049 variable.
2050 * common/tdesc.c (print_xml_feature::visit): Remove unused
2051 variable.
2052 * compile/compile-object-load.c (store_regs): Remove unused
2053 variables.
2054 * complaints.c (clear_complaints): Remove unused variable.
2055 * corelow.c (core_target_open): Remove unused variable.
2056 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
2057 variable.
2058 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
2059 variable.
2060 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
2061 variable.
2062 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
2063 variable.
2064 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
2065 variable.
2066 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
2067 variable.
2068 * ia64-tdep.c (examine_prologue): Remove unused variable.
2069 * infcall.c (run_inferior_call): Remove unused variable.
2070 * inferior.c (exit_inferior): Remove unused variable.
2071 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
2072 * linespec.c (decode_line_2): Remove unused variable.
2073 * linux-nat.c (super_close): Remove.
2074 * linux-tdep.c (linux_info_proc): Remove unused variable.
2075 * mi/mi-main.c (mi_execute_command): Remove unused variable.
2076 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
2077 Remove unused variable.
2078 * parse.c (find_minsym_type_and_address): Remove unused variable.
2079 * printcmd.c (info_symbol_command, printf_floating): Remove unused
2080 variable.
2081 * python/py-breakpoint.c (bppy_set_commands): Remove unused
2082 variable.
2083 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
2084 variables.
2085 * record-btrace.c (record_btrace_target::store_registers): Remove
2086 unused variable.
2087 (cmd_show_record_btrace_cpu): Remove unused variable.
2088 * riscv-tdep.c (riscv_register_reggroup_p)
2089 (riscv_push_dummy_call, riscv_return_value): Remove unused
2090 variable.
2091 * rust-exp.y (literal): Remove unused variable.
2092 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
2093 unused variable.
2094 <STRUCTOP_ANONYMOUS>: Likewise.
2095 * s390-linux-tdep.c (s390_linux_init_abi_31)
2096 (s390_linux_init_abi_64): Remove unused variable.
2097 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
2098 (file_select_thread, net_windows_open, _initialize_ser_windows):
2099 Remove unused variables.
2100 * symtab.c (find_pc_sect_line): Remove unused variable.
2101 * target-memory.c (compute_garbled_blocks): Remove unused
2102 variable.
2103 (target_write_memory_blocks): Remove unused variable.
2104 * target.c (target_stack::unpush): Remove unused variables.
2105 * tracepoint.c (start_tracing, all_tracepoint_actions)
2106 (merge_uploaded_trace_state_variables)
2107 (print_one_static_tracepoint_marker): Remove unused variable.
2108 * unittests/basic_string_view/element_access/char/1.cc (test01):
2109 Remove unused variable.
2110 * windows-nat.c (windows_continue, windows_add_all_dlls)
2111 (do_initial_windows_stuff, windows_nat_target::create_inferior):
2112 Remove unused variables.
2113
2114 2018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
2115
2116 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
2117 attr_profile in HAVE_ELF.
2118 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
2119 HAVE_ELF.
2120
2121 2018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
2122
2123 * frame.c (frame_register_unwind): Change parameter name.
2124 (frame_unwind_register): Likewise.
2125 (frame_unwind_register_value): Likewise.
2126 (frame_unwind_register_signed): Likewise.
2127 (frame_unwind_register_unsigned): Likewise.
2128 * frame.h (frame_register_unwind): Likewise.
2129 (frame_unwind_register): Likewise.
2130 (frame_unwind_register_value): Likewise.
2131 (frame_unwind_register_signed): Likewise.
2132 (frame_unwind_register_unsigned): Likewise.
2133 (frame_unwind_arch): Likewise.
2134
2135 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2136
2137 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
2138 ISA maintenance.
2139
2140 2018-07-20 Maciej W. Rozycki <macro@mips.com>
2141
2142 * mips-linux-nat.c (mips_linux_nat_target::read_description):
2143 Call `get_ptrace_pid' rather than extracting the ptrace PID by
2144 hand.
2145
2146 2018-07-20 Keith Seitz <keiths@redhat.com>
2147
2148 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
2149 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
2150 m_compunit_symtab, m_language>: Add "m_" prefix.
2151 Update all uses.
2152 * buildsym.c: Update all uses.
2153
2154 2018-07-20 Tom Tromey <tom@tromey.com>
2155
2156 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
2157 * buildsym.h (record_line_ftype): Remove typedef.
2158
2159 2018-07-20 Tom Tromey <tom@tromey.com>
2160
2161 * buildsym-legacy.h (augment_type_symtab): Don't declare.
2162 (end_expandable_symtab): Likewise.
2163 (end_symtab_get_static_block): Likewise.
2164 (end_symtab_from_static_block): Likewise.
2165 * buildsym-legacy.c (augment_type_symtab): Remove.
2166 (end_expandable_symtab): Remove.
2167 (end_symtab_get_static_block): Remove.
2168 (end_symtab_from_static_block): Remove.
2169
2170 2018-07-20 Tom Tromey <tom@tromey.com>
2171
2172 * dwarf2read.c: Include buildsym.h.
2173 (struct dwarf2_cu) <builder>: New method.
2174 (fixup_go_packaging): Update.
2175 (process_full_comp_unit, process_full_type_unit): Update. Don't
2176 use scoped_free_pendings.
2177 (using_directives): Add "cu" parameter, remove "language".
2178 (read_import_statement, setup_type_unit_groups, )
2179 (read_func_scope, read_lexical_block_scope)
2180 (dwarf2_record_block_ranges, read_namespace): Update.
2181 (lnp_state_machine::lnp_state_machine): Add cu parameter.
2182 (lnp_state_machine::handle_end_sequence): Update.
2183 (class lnp_state_machine) <m_cu>: New member.
2184 <m_record_line_callback>: Remove.
2185 <m_currently_recording_lines>: New member.
2186 (lnp_state_machine::handle_set_file): Update.
2187 (noop_record_line): Remove.
2188 (dwarf_record_line_p): Add cu parameter.
2189 (dwarf_record_line_1, dwarf_finish_line): Likewise.
2190 (lnp_state_machine::record_line)
2191 (lnp_state_machine::lnp_state_machine)
2192 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
2193 (dwarf_decode_lines): Update.
2194 (dwarf2_start_subfile): Add cu parameter.
2195 (dwarf2_start_symtab, new_symbol): Update.
2196 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
2197 Remove dwarf2_per_objfile parameter.
2198 (dwarf_decode_macros): Update.
2199
2200 2018-07-20 Tom Tromey <tom@tromey.com>
2201
2202 * stabsread.c (define_symbol): Update.
2203 * buildsym-legacy.h (get_buildsym_compunit): Declare.
2204 * dwarf2read.c (new_symbol): Update.
2205 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
2206 * cp-namespace.c: Include buildsym.h.
2207 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
2208 * buildsym-legacy.c (get_buildsym_compunit): New function.
2209
2210 2018-07-20 Tom Tromey <tom@tromey.com>
2211
2212 * xcoffread.c: Include buildsym-legacy.h.
2213 * windows-nat.c: Include buildsym-legacy.h.
2214 * stabsread.c: Include buildsym-legacy.h.
2215 * mdebugread.c: Include buildsym-legacy.h.
2216 * buildsym-legacy.h: New file.
2217 * buildsym-legacy.c: New file, from buildsym.c.
2218 * go32-nat.c: Include buildsym-legacy.h.
2219 * dwarf2read.c: Include buildsym-legacy.h.
2220 * dbxread.c: Include buildsym-legacy.h.
2221 * cp-namespace.c: Include buildsym-legacy.h.
2222 * coffread.c: Include buildsym-legacy.h.
2223 * buildsym.h: Move some contents to buildsym-legacy.h.
2224 * buildsym.c: Include buildsym-legacy.h. Move many functions to
2225 buildsym-legacy.c.
2226 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
2227
2228 2018-07-20 Tom Tromey <tom@tromey.com>
2229
2230 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
2231 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
2232 (buildsym_compunit::buildsym_compunit)
2233 (buildsym_compunit::~buildsym_compunit)
2234 (buildsym_compunit::get_macro_table): Define.
2235
2236 2018-07-20 Tom Tromey <tom@tromey.com>
2237
2238 * buildsym.c (reset_symtab_globals): Remove.
2239 (buildsym_compunit::end_symtab_from_static_block): Update.
2240 (buildsym_compunit::augment_type_symtab): Update.
2241 (end_symtab_from_static_block): Call free_buildsym_compunit.
2242 (augment_type_symtab, end_symtab, end_expandable_symtab):
2243 Likewise.
2244
2245 2018-07-20 Tom Tromey <tom@tromey.com>
2246
2247 * arch-utils.c: Do not include buildsym.h.
2248 * mipsread.c: Do not include buildsym.h.
2249 * machoread.c: Do not include buildsym.h.
2250 * elfread.c: Do not include buildsym.h.
2251
2252 2018-07-20 Tom Tromey <tom@tromey.com>
2253
2254 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
2255 initialization.
2256 (buildsym_compunit): Add new constructor.
2257 (struct buildsym_compunit) <get_last_source_file, finish_block,
2258 record_block_range, start_subfile, patch_subfile_names,
2259 push_subfile, pop_subfile, record_line, get_compunit_symtab,
2260 set_last_source_start_addr, get_last_source_start_addr,
2261 get_local_using_directives, set_local_using_directives,
2262 get_global_using_directives, outermost_context_p,
2263 get_current_context_stack, get_context_stack_depth,
2264 get_current_subfile, get_local_symbols, get_file_symbols,
2265 get_global_symbols, record_debugformat, record_producer,
2266 push_context, pop_context, end_symtab_get_static_block,
2267 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
2268 New public methods.
2269 <record_pending_block, finish_block_internal, make_blockvector,
2270 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
2271 private methods.
2272 Update all users.
2273
2274 2018-05-22 Tom Tromey <tom@tromey.com>
2275
2276 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2277 parameter.
2278 (finish_block_internal): Update.
2279
2280 2018-07-20 Tom Tromey <tom@tromey.com>
2281
2282 * buildsym.c (record_pending_block): Move earlier. Remove objfile
2283 parameter.
2284 (finish_block_internal): Update.
2285
2286 2018-07-20 Tom Tromey <tom@tromey.com>
2287
2288 * buildsym.h (EXTERN): Don't define or undef.
2289 * buildsym.c (EXTERN): Don't define.
2290
2291 2018-07-20 Tom Tromey <tom@tromey.com>
2292
2293 * buildsym.c: Remove TODO comment.
2294
2295 2018-07-20 Tom Tromey <tom@tromey.com>
2296
2297 * coffread.c (coff_symtab_read): Update.
2298 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
2299 (xcoff_new_init): Update.
2300 * mipsread.c (mipscoff_new_init): Update.
2301 * mdebugread.c (mdebug_build_psymtabs): Update.
2302 * elfread.c (elf_new_init): Update.
2303 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
2304 Update.
2305 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
2306 (coffstab_build_psymtabs, elfstab_build_psymtabs)
2307 (stabsect_build_psymtabs): Update.
2308 * buildsym.h (buildsym_init): Don't declare.
2309 * buildsym.c: Update comment.
2310 (prepare_for_building): Remove.
2311 (start_symtab, restart_symtab): Update.
2312 (reset_symtab_globals): Update comment.
2313 (buildsym_init): Remove.
2314
2315 2018-07-20 Tom Tromey <tom@tromey.com>
2316
2317 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
2318 * stabsread.c (patch_block_stabs, define_symbol, read_type)
2319 (read_enum_type, common_block_start, common_block_end)
2320 (cleanup_undefined_types_1, finish_global_stabs): Update.
2321 * mdebugread.c (psymtab_to_symtab_1): Update.
2322 * dwarf2read.c (fixup_go_packaging, read_func_scope)
2323 (read_lexical_block_scope, new_symbol): Update.
2324 * dbxread.c (process_one_symbol): Update.
2325 * coffread.c (coff_symtab_read, process_coff_symbol)
2326 (coff_read_enum_type): Update.
2327 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
2328 declare.
2329 (get_local_symbols, get_file_symbols, get_global_symbols): New
2330 functions.
2331 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
2332 m_global_symbols.
2333 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
2334 (~scoped_free_pendings): Update.
2335 (finish_block, prepare_for_building, reset_symtab_globals)
2336 (end_symtab_get_static_block, end_symtab_with_blockvector)
2337 (augment_type_symtab, push_context): Update.
2338 (get_local_symbols, get_file_symbols, get_global_symbols): New
2339 functions.
2340 (buildsym_init): Update.
2341
2342 2018-07-20 Tom Tromey <tom@tromey.com>
2343
2344 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
2345 (process_full_type_unit): Likewise.
2346 (dwarf2_start_symtab): Set list_in_scope.
2347
2348 2018-07-20 Tom Tromey <tom@tromey.com>
2349
2350 * dwarf2read.c (process_psymtab_comp_unit_reader)
2351 (build_type_psymtabs_reader): Do not set list_in_scope.
2352
2353 2018-07-20 Tom Tromey <tom@tromey.com>
2354
2355 * buildsym.c (free_pendings): Remove.
2356 (add_symbol_to_list, scoped_free_pendings)
2357 (finish_block_internal, buildsym_init): Update.
2358
2359 2018-07-20 Tom Tromey <tom@tromey.com>
2360
2361 * xcoffread.c (read_xcoff_symtab): Update.
2362 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
2363 Update.
2364 * dbxread.c (process_one_symbol): Update.
2365 * coffread.c (coff_symtab_read): Update.
2366 * buildsym.h (finish_block): Update.
2367 * buildsym.c (finish_block): Remove "listhead" argument.
2368 (end_symtab_get_static_block): Update.
2369
2370 2018-07-20 Tom Tromey <tom@tromey.com>
2371
2372 * buildsym.h (class scoped_free_pendings): Remove constructor.
2373 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
2374 method.
2375 <m_pending_block_obstack, m_pending_blocks>: New members.
2376 (pending_block_obstack, pending_blocks): Remove.
2377 (scoped_free_pendings::scoped_free_pendings): Default.
2378 (~scoped_free_pendings): Update.
2379 (free_pending_blocks): Remove.
2380 (finish_block_internal, record_pending_block, make_blockvector)
2381 (end_symtab_get_static_block, augment_type_symtab, push_context)
2382 (buildsym_init): Update.
2383
2384 2018-07-20 Tom Tromey <tom@tromey.com>
2385
2386 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
2387 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
2388 members.
2389 (pending_addrmap, pending_addrmap_obstack)
2390 (pending_addrmap_interesting): Remove.
2391 (scoped_free_pendings, record_block_range, make_blockvector)
2392 (prepare_for_building, reset_symtab_globals, buildsym_init):
2393 Update.
2394
2395 2018-07-20 Tom Tromey <tom@tromey.com>
2396
2397 * xcoffread.c (process_linenos): Update.
2398 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
2399 * mdebugread.c (psymtab_to_symtab_1): Update.
2400 * dwarf2read.c (setup_type_unit_groups)
2401 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
2402 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
2403 * dbxread.c (process_one_symbol): Update.
2404 * coffread.c (coff_symtab_read, enter_linenos)
2405 (process_coff_symbol): Update.
2406 * buildsym.h (current_subfile): Don't declare.
2407 (get_current_subfile): Declare.
2408 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
2409 member.
2410 (start_subfile, free_buildsym_compunit, push_subfile)
2411 (prepare_for_building, start_symtab): Update.
2412 (get_current_subfile): New function.
2413
2414 2018-07-20 Tom Tromey <tom@tromey.com>
2415
2416 * coffread.c (coff_symtab_read): Update.
2417 * xcoffread.c (read_xcoff_symtab): Update.
2418 * dwarf2read.c (new_symbol): Update.
2419 (read_func_scope, read_lexical_block_scope): Update.
2420 * dbxread.c (process_one_symbol): Update.
2421 * buildsym.h (context_stack, context_stack_depth): Don't declare.
2422 (outermost_context_p): Remove macro.
2423 (outermost_context_p, get_current_context_stack)
2424 (get_context_stack_depth): Declare.
2425 (pop_context): Return struct context_stack.
2426 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
2427 member.
2428 (context_stack_size): Remove.
2429 (INITIAL_CONTEXT_STACK_SIZE): Remove.
2430 (prepare_for_building, end_symtab_get_static_block)
2431 (augment_type_symtab, push_context): Update.
2432 (pop_context): Return struct context_stack.
2433 (outermost_context_p, get_current_context_stack)
2434 (get_context_stack_depth): New functions.
2435 (buildsym_init): Update.
2436
2437 2018-07-20 Tom Tromey <tom@tromey.com>
2438
2439 * rust-exp.y: Now a pure parser. Update all rules.
2440 (%union): Move earlier.
2441 (current_parser, work_obstack): Remove globals.
2442 (rust_parser, ~rust_parser): Update.
2443 (class rust_parser) <copy_name, concat3, crate_name, super_name,
2444 lex_character, lex_number, lex_string, lex_identifier,
2445 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
2446 convert_name, convert_params_to_expression,
2447 convert_ast_to_expression, ast_basic_type, ast_operation,
2448 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
2449 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
2450 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
2451 ast_array_type, ast_slice_type, ast_reference_type,
2452 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
2453 (rust_parse): Update.
2454 (rustyyerror, rustyylex): Add parser parameter.
2455 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
2456 (rust_lex_stringish_test, rust_lex_test_sequence)
2457 (rust_lex_test_trailing_dot, rust_lex_test_completion)
2458 (rust_lex_test_push_back, rust_lex_tests): Update.
2459
2460 2018-07-19 Pedro Alves <palves@redhat.com>
2461
2462 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
2463 gdb::unique_xmalloc_ptr.
2464 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
2465 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
2466 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
2467 copy-initialization.
2468 * guile/scm-pretty-print.c (ppscm_print_children): Use
2469 gdb::unique_xmalloc_ptr instead of cleanups.
2470 (gdbscm_apply_val_pretty_printer): Remove cleanups.
2471 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
2472 gdb::unique_xmalloc_ptr.
2473 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2474 Adjust to use gdb::unique_xmalloc_ptr.
2475 * guile/scm-utils.c (extract_arg): Adjust.
2476 * guile/scm-value.c (gdbscm_value_field): Adjust to use
2477 gdb::unique_xmalloc_ptr instead of a cleanup.
2478
2479 2018-07-19 Tom Tromey <tom@tromey.com>
2480
2481 * utils.c (do_value_free_to_mark)
2482 (make_cleanup_value_free_to_mark): Remove.
2483 * utils.h (make_cleanup_value_free_to_mark): Remove.
2484
2485 2018-07-19 Pedro Alves <palves@redhat.com>
2486
2487 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
2488 forwarding reference.
2489
2490 2018-07-18 Pedro Alves <palves@redhat.com>
2491
2492 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
2493 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
2494 cleanup.
2495
2496 2018-07-18 Pedro Alves <palves@redhat.com>
2497
2498 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
2499 exceptions.
2500 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
2501 (gdbscm_wrap): New.
2502 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
2503 directly instead of a cleanup.
2504 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
2505 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
2506 (vlscm_binop_gdbthrow): New, factored out from ...
2507 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
2508 (vlscm_rich_compare): Use gdbscm_wrap.
2509 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
2510 instead of a cleanup.
2511 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
2512 cleanup.
2513 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
2514 Use xfree directly instead of a cleanup.
2515 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
2516 Adjust to use gdbscm_wrap and scoped_value_mark.
2517 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
2518 (gdbscm_value_address, gdbscm_value_dereference)
2519 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
2520 scoped_value_mark.
2521 (gdbscm_value_dynamic_type): Use scoped_value_mark.
2522 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
2523 scoped_value_mark.
2524 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
2525 gdbscm_wrap and scoped_value_mark.
2526 (gdbscm_value_to_string): Use xfree directly instead of a
2527 cleanup. Move 'buffer' unique_ptr to TRY scope.
2528 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
2529 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
2530 scoped_value_mark.
2531 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
2532 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
2533 scoped_value_mark.
2534 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
2535 gdbscm_wrap.
2536
2537 2018-07-18 Tom de Vries <tdevries@suse.de>
2538
2539 * findvar.c (default_read_var_value): Also resolve dynamic type for
2540 LOC_OPTIMIZED_OUT vars.
2541
2542 2018-07-18 Maciej W. Rozycki <macro@mips.com>
2543
2544 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
2545 decoding.
2546
2547 2018-07-17 Tom Tromey <tom@tromey.com>
2548
2549 * guile/scm-param.c (pascm_set_func, pascm_show_func)
2550 (compute_enum_list, pascm_set_param_value_x)
2551 (gdbscm_parameter_value): Update.
2552 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
2553 (gdbscm_scm_to_host_string): Update.
2554 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
2555 Update.
2556 * guile/scm-cmd.c (cmdscm_add_completion): Update.
2557 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
2558 * guile/scm-string.c (gdbscm_scm_to_string): Return
2559 unique_xmalloc_ptr.
2560 (gdbscm_scm_to_host_string): Likewise.
2561
2562 2018-07-17 Tom Tromey <tom@tromey.com>
2563
2564 * guile/guile.c (gdbscm_eval_from_control_command): Update.
2565 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
2566 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
2567 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
2568 unique_xmalloc_ptr.
2569
2570 2018-07-17 Tom Tromey <tom@tromey.com>
2571
2572 * guile/scm-param.c (pascm_signal_setshow_error): Update.
2573 * guile/guile-internal.h (gdbscm_exception_message_to_string):
2574 Update.
2575 * guile/scm-cmd.c (cmdscm_function): Update.
2576 * guile/scm-pretty-print.c
2577 (ppscm_print_exception_unless_memory_error): Update.
2578 * guile/scm-exception.c (gdbscm_exception_message_to_string):
2579 Return unique_xmalloc_ptr.
2580
2581 2018-07-17 Tom Tromey <tom@tromey.com>
2582
2583 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
2584 Use string_printf.
2585
2586 2018-07-17 Jim Wilson <jimw@sifive.com>
2587
2588 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
2589 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
2590 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
2591 unecessary braces after EF_RISCV_RVC test. Delete call to
2592 set_gdbarch_decr_pc_after_break.
2593
2594 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
2595 RISCV_LAST_FP_REGNUM + 1.
2596 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
2597
2598 2018-07-17 Tom Tromey <tom@tromey.com>
2599
2600 * configure.ac: Remove --disable-gdbcli.
2601 * configure: Rebuild.
2602 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
2603 (SUBDIR_CLI_CFLAGS): Remove.
2604 (SFILES): Use SUBDIR_CLI_SRCS.
2605 (COMMON_OBS): Use SUBDIR_CLI_OBS.
2606
2607 2018-07-17 Tom Tromey <tom@tromey.com>
2608
2609 PR gdb/18624:
2610 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
2611
2612 2018-07-16 Jim Wilson <jimw@sifive.com>
2613
2614 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
2615
2616 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2617
2618 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
2619 variable.
2620 (libunwind_frame_sniffer): Likewise.
2621 (libunwind_frame_prev_register): Likewise.
2622 (libunwind_sigtramp_frame_sniffer): Likewise.
2623 * ia64-tdep.c (ia64_access_reg): Likewise.
2624 (ia64_access_rse_reg): Likewise.
2625 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
2626 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
2627
2628 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2629
2630 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
2631
2632 2018-07-16 Simon Marchi <simon.marchi@ericsson.com>
2633
2634 * remote-sim.c (gdbsim_target::close,
2635 gdbsim_target::mourn_inferior): Remove unused variables.
2636
2637 2018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
2638
2639 * ia64-tdep.c (ktab_buf): New global.
2640 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
2641 (get_kernel_table): Adjust.
2642
2643 2018-07-16 Tom Tromey <tom@tromey.com>
2644
2645 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
2646 * dwarf2read.c (using_directives, new_symbol): Use
2647 outermost_context_p.
2648 * dbxread.c (process_one_symbol): Use outermost_context_p.
2649 * coffread.c (coff_symtab_read): Use outermost_context_p.
2650
2651 2018-07-16 Tom Tromey <tom@tromey.com>
2652
2653 * dwarf2read.c (using_directives, read_func_scope)
2654 (read_lexical_block_scope): Update.
2655 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
2656 * buildsym.h (local_using_directives, global_using_directives):
2657 Don't declare.
2658 (get_local_using_directives, set_local_using_directives)
2659 (get_global_using_directives): Declare.
2660 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
2661 m_global_using_directives>: New members.
2662 (finish_block_internal, prepare_for_building)
2663 (reset_symtab_globals, end_symtab_get_static_block)
2664 (push_context): Update.
2665 (get_local_using_directives, set_local_using_directives)
2666 (get_global_using_directives): New functions.
2667 (buildsym_init): Update.
2668
2669 2018-07-16 Tom Tromey <tom@tromey.com>
2670
2671 * xcoffread.c (xcoff_initial_scan): Don't call
2672 free_pending_blocks.
2673 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
2674 * buildsym.h (class scoped_free_pendings): Add constructor.
2675 (free_pending_blocks): Don't declare.
2676 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
2677 (free_pending_blocks): Now static.
2678
2679 2018-07-16 Tom Tromey <tom@tromey.com>
2680
2681 * buildsym.h (push_subfile, pop_subfile): Update declarations.
2682 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
2683 member.
2684 (struct subfile_stack): Remove.
2685 (subfile_stack): Remove.
2686 (push_subfile, pop_subfile, buildsym_init): Update.
2687
2688 2018-07-16 Tom Tromey <tom@tromey.com>
2689
2690 * buildsym.c (push_subfile): Use gdb_assert.
2691 (pop_subfile): Use gdb_assert.
2692
2693 2018-07-16 Tom Tromey <tom@tromey.com>
2694
2695 * buildsym.h (merge_symbol_lists): Remove.
2696 * buildsym.c (merge_symbol_lists): Remove.
2697
2698 2018-07-16 Tom Tromey <tom@tromey.com>
2699
2700 * stabsread.c (scan_file_globals): Update comment.
2701 * stabsread.h (scan_file_globals): Move from buildsym.h.
2702 * buildsym.h (scan_file_globals): Move to stabsread.h.
2703
2704 2018-07-16 Tom Tromey <tom@tromey.com>
2705
2706 * xcoffread.c (xcoff_new_init): Update.
2707 * mipsread.c (mipscoff_new_init): Update.
2708 * mdebugread.c (mdebug_build_psymtabs): Update.
2709 * elfread.c (elf_new_init): Update.
2710 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
2711 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
2712 * buildsym.h (buildsym_new_init): Don't declare.
2713 * buildsym.c (buildsym_new_init): Remove.
2714
2715 2018-07-16 Tom Tromey <tom@tromey.com>
2716
2717 * stabsread.h (within_function): Move from buildsym.h.
2718 * stabsread.c (start_stabs): Clear within_function.
2719 * coffread.c (coff_start_symtab): Clear within_function.
2720 * buildsym.h (within_function): Move to stabsread.h.
2721 * buildsym.c (prepare_for_building): Update.
2722
2723 2018-07-16 Tom Tromey <tom@tromey.com>
2724
2725 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
2726 * dwarf2read.c (dwarf2_start_symtab): Don't set
2727 processing_gcc_compilation.
2728 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
2729
2730 2018-07-16 Tom Tromey <tom@tromey.com>
2731
2732 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
2733 (next_symbol_text_func): Move from buildsym.h.
2734 * stabsread.c (hashname): Move from buildsym.c.
2735 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
2736 (next_symbol_text_func, hashname): Move to stabsread.h.
2737 * buildsym.c: Don't include bcache.h
2738 (hashname): Move to stasbread.c.
2739
2740 2018-07-16 Tom Tromey <tom@tromey.com>
2741
2742 * buildsym.h (context_stack_size): Don't declare.
2743 * buildsym.c (context_stack_size): New global.
2744
2745 2018-07-16 Tom Tromey <tom@tromey.com>
2746
2747 * dbxread.c (processing_acc_compilation): New global.
2748 * buildsym.h (processing_acc_compilation): Don't declare.
2749
2750 2018-07-16 Tom Tromey <tom@tromey.com>
2751
2752 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
2753 * dbxread.c (read_ofile_symtab): Update.
2754 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
2755 * buildsym.h (last_source_start_addr): Remove.
2756 (set_last_source_start_addr, get_last_source_start_addr):
2757 Declare.
2758 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
2759 parameter.
2760 (struct buildsym_compunit) <m_last_source_start_addr>: New
2761 member.
2762 (prepare_for_building): Remove start_addr parameter.
2763 (start_symtab, restart_symtab, end_symtab_get_static_block)
2764 (end_symtab_with_blockvector): Update.
2765 (set_last_source_start_addr, get_last_source_start_addr): New
2766 functions.
2767
2768 2018-07-16 Tom Tromey <tom@tromey.com>
2769
2770 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
2771 member.
2772 (have_line_numbers): Remove.
2773 (record_line, prepare_for_building, end_symtab_get_static_block)
2774 (augment_type_symtab): Update.
2775
2776 2018-07-16 Tom Tromey <tom@tromey.com>
2777
2778 * buildsym.c (~buildsym_compunit): Free the macro table.
2779 (struct buildsym_compunit) <get_macro_table, release_macros>: New
2780 methods.
2781 <m_pending_macros>: New member.
2782 (pending_macros): Remove.
2783 (~scoped_free_pendings, get_macro_table, prepare_for_building)
2784 (reset_symtab_globals, end_symtab_get_static_block)
2785 (end_symtab_with_blockvector, augment_type_symtab)
2786 (buildsym_init): Update.
2787
2788 2018-07-16 Tom Tromey <tom@tromey.com>
2789
2790 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
2791 parameter.
2792 (buildsym_compunit::set_last_source_file): New method.
2793 <m_last_source_file>: New member.
2794 (prepare_for_building): Remove "name" parameter.
2795 (start_symtab, restart_symtab, reset_symtab_globals): Update.
2796 (last_source_file): Remove.
2797 (set_last_source_file, get_last_source_file): Update.
2798
2799 2018-07-16 Tom Tromey <tom@tromey.com>
2800
2801 * buildsym.c (prepare_for_building): Add assert.
2802
2803 2018-07-16 Tom Tromey <tom@tromey.com>
2804
2805 * buildsym.c (~buildsym_compunit): Update.
2806 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
2807 (start_subfile, patch_subfile_names)
2808 (end_symtab_with_blockvector): Update.
2809
2810 2018-07-16 Tom Tromey <tom@tromey.com>
2811
2812 * buildsym.c (struct buildsym_compunit): Add constructor,
2813 destructor, initializers.
2814 (start_buildsym_compunit): Remove.
2815 (free_buildsym_compunit): Use "delete".
2816 (start_symtab, restart_symtab): Use "new".
2817
2818 2018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
2819
2820 * symfile.c (set_objfile_default_section_offset): Remove struct
2821 keyword.
2822
2823 2018-07-14 Stafford Horne <shorne@gmail.com>
2824
2825 * (Responsible Maintainers): Add myself as or1k maintainer.
2826
2827 2018-07-13 Tom Tromey <tom@tromey.com>
2828
2829 * symfile.c (set_objfile_default_section_offset): Use extra braces
2830 around initializer.
2831
2832 2018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
2833
2834 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
2835 non-branching basr.
2836
2837 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2838
2839 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2840 unittests/cli-utils-selftests.c
2841 * unittests/cli-utils-selftests.c: New file.
2842
2843 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2844
2845 * NEWS: Mention new commands. Mention change to 'thread apply'.
2846
2847 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2848
2849 * thread.c (thr_try_catch_cmd): New function.
2850 (thread_apply_all_command): Handle qcs flags.
2851 (thread_apply_command): Handle qcs flags.
2852 (taas_command): New function.
2853 (tfaas_command): New function.
2854 (_initialize_thread): Update to setup the new commands 'taas
2855 and 'tfaas'. Change doc string for 'thread apply'.
2856
2857 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2858
2859 * stack.c: (trailing_outermost_frame): New function, mostly
2860 extracted from backtrace_command_1.
2861 (leading_innermost_frame): New function.
2862 (backtrace_command_1): Update to call trailing_outermost_frame.
2863 (frame_apply_command_count): New function.
2864 (frame_apply_level_command): New function.
2865 (frame_apply_all_command): New function.
2866 (frame_apply_command): New function.
2867 (faas_command): New function.
2868 (frame_cmd_list): New variable.
2869 (_initialize_stack): Update to setup the new commands 'frame apply'
2870 and 'faas'.
2871
2872 2018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2873
2874 * cli-utils.c (number_or_range_parser::get_number): Only handle
2875 numbers or convenience var as numbers.
2876 (parse_flags): New function.
2877 (parse_flags_qcs): New function.
2878 (number_or_range_parser::finished): Ensure parsing end is detected
2879 before end of string.
2880 * cli-utils.h (parse_flags): New function.
2881 (parse_flags_qcs): New function.
2882 (number_or_range_parser): Remove m_finished bool.
2883 (number_or_range_parser::skip_range): Set m_in_range to false.
2884
2885 2018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
2886
2887 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
2888 on Windows.
2889
2890 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2891 Jan Kratochvil <jan.kratochvil@redhat.com>
2892 Paul Fertser <fercerpav@gmail.com>
2893 Tsutomu Seki <sekiriki@gmail.com>
2894 Pedro Alves <palves@redhat.com>
2895
2896 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2897 'unittests/parse-connection-spec-selftests.c'.
2898 (COMMON_SFILES): Add 'common/netstuff.c'.
2899 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
2900 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
2901 * common/netstuff.c: New file.
2902 * common/netstuff.h: New file.
2903 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
2904 (wait_for_connect): Update comment. New parameter
2905 'gdb::optional<int> sock' instead of 'struct serial *scb'.
2906 Use 'sock' directly instead of 'scb->fd'.
2907 (try_connect): New function, with code from 'net_open'.
2908 (net_open): Rewrite main loop to deal with multiple
2909 sockets/addresses. Handle IPv6-style hostnames; implement
2910 support for IPv6 connections.
2911 * unittests/parse-connection-spec-selftests.c: New file.
2912
2913 2018-07-11 Pedro Alves <palves@redhat.com>
2914
2915 PR gdb/23377
2916 * remote.c (remote_target::remote_detach_pid): Call
2917 set_current_process.
2918
2919 2018-07-11 Pedro Alves <palves@redhat.com>
2920
2921 * h8300-tdep.c (h8300_gdbarch_init): Remove
2922 set_gdbarch_ecoff_reg_to_regnum calls.
2923
2924 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
2925
2926 PR c++/23373
2927 * c-typeprint.c (c_type_print_base_struct_union): Don't print
2928 offsets/sizes for static members of a class/struct.
2929
2930 2018-07-11 Alan Hayward <alan.hayward@arm.com>
2931
2932 * target-descriptions.c (tdesc_register_bitsize): Rename.
2933 * target-descriptions.h (tdesc_register_bitsize): Likewise.
2934 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
2935 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
2936
2937 2018-07-10 Tom Tromey <tom@tromey.com>
2938
2939 * breakpoint.c (moribund_locations): Now static and a
2940 std::vector.
2941 (breakpoint_init_inferior, moribund_breakpoint_here_p)
2942 (build_bpstat_chain, update_global_location_list)
2943 (breakpoint_retire_moribund): Update.
2944 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
2945 VEC.
2946
2947 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2948
2949 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
2950 (riscv_register_reggroup_p): Use new function, remove unneeded
2951 parenthesis.
2952 (riscv_push_dummy_call): Extend assert to compare against xlen or
2953 flen based on register type.
2954
2955 2018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
2956
2957 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
2958
2959 2018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
2960
2961 * remote.c (show_hardware_watchpoint_limit): New function.
2962 (show_hardware_watchpoint_length_limit): New function.
2963 (show_hardware_breakpoint_limit): New function.
2964 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
2965 where appropriate, update help text.
2966
2967 2018-07-09 Tom Tromey <tom@tromey.com>
2968
2969 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
2970 (CLIBS): Don't mention NAT_CLIBS.
2971
2972 2018-07-09 Tom Tromey <tom@tromey.com>
2973
2974 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
2975 (LIBGDB_OBS, clean mostlyclean): Update.
2976 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
2977
2978 2018-07-09 Tom Tromey <tom@tromey.com>
2979
2980 * Makefile.in (%.c: %.y): Use ECHO_YACC.
2981 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
2982 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
2983
2984 2018-07-09 Tom Tromey <tom@tromey.com>
2985
2986 * Makefile.in (ALLDEPFILES): Remove exec.c.
2987 (COMMON_OBS): Remove exec.o.
2988 (COMMON_SFILES): Add exec.c.
2989
2990 2018-07-09 Tom Tromey <tom@tromey.com>
2991
2992 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
2993
2994 2018-07-09 Tom Tromey <tom@tromey.com>
2995
2996 * Makefile.in (clean mostlyclean): Remove stamp-version.
2997 (version.c): Depend on stamp-version.
2998 (stamp-version): New rule, from version.c rule.
2999
3000 2018-07-09 Tom Tromey <tom@tromey.com>
3001
3002 * Makefile.in (init.c): Depend on stamp-init.
3003 (stamp-init): New rule, from init.c rule.
3004 (clean mostlyclean): Remove stamp-init.
3005
3006 2018-07-09 Tom Tromey <tom@tromey.com>
3007
3008 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
3009 SUBDIR_GCC_COMPILE_SRCS.
3010
3011 2018-07-09 Tom Tromey <tom@tromey.com>
3012
3013 * Makefile.in (init.c): Remove some unused sed rules.
3014
3015 2018-07-09 Tom Tromey <tom@tromey.com>
3016
3017 * Makefile.in (TSOBS): Remove.
3018 (INIT_FILES): Update.
3019 (LIBGDB_OBS): Update.
3020 (COMMON_SFILES): Add inflow.c.
3021 (SFILES): Remove inflow.c.
3022
3023 2018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
3024
3025 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
3026
3027 2018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
3028
3029 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
3030 get_saveloc_name, is_signal_frame_name, step_name,
3031 init_remote_name, create_addr_space_name,
3032 destroy_addr_space_name, search_unwind_table_name,
3033 find_dyn_list_name): Constify.
3034
3035 2018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
3036
3037 * darwin-nat.c (darwin_pthread_kill): New function.
3038 (darwin_resume_thread): Use darwin_pthread_kill.
3039
3040 2018-07-05 Tom de Vries <tdevries@suse.de>
3041
3042 * macroexp.c (macro_buffer) <operator=>: New member function.
3043
3044 2018-07-04 Tom Tromey <tom@tromey.com>
3045
3046 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
3047
3048 2018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
3049
3050 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
3051 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
3052 * maint.c: Likewise.
3053 * top.c: Likewise.
3054
3055 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3056
3057 * NEWS: Create a new section for the next release branch.
3058 Rename the section of the current branch, now that it has
3059 been cut.
3060
3061 2018-07-04 Joel Brobecker <brobecker@adacore.com>
3062
3063 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
3064 * version.in: Bump version to 8.2.50.DATE-git.
3065
3066 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
3067 Pedro Alves <palves@redhat.com>
3068
3069 * linux-nat.c (linux_init_ptrace): Rename to ...
3070 (linux_init_ptrace_procfs): ... this. Call
3071 linux_proc_init_warnings.
3072 (linux_nat_target::post_attach)
3073 (linux_nat_target::post_startup_inferior): Adjust.
3074 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
3075 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
3076
3077 2018-07-04 Tom de Vries <tdevries@suse.de>
3078
3079 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
3080 check ...
3081 (read_comp_unit_head): ... here.
3082
3083 2018-07-03 Tom Tromey <tom@tromey.com>
3084
3085 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
3086 (stop_tracing, tstatus_command)
3087 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
3088 (print_one_static_tracepoint_marker): Update.
3089 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
3090 std::vector.
3091 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
3092 VEC.
3093 (all_tracepoints, static_tracepoints_here): Return std::vector.
3094
3095 2018-07-03 Tom Tromey <tom@tromey.com>
3096
3097 * common/ptid.c (ptid_equal): Remove.
3098 * common/ptid.h (ptid_equal): Don't declare.
3099 * ada-tasks.c: Update.
3100 * breakpoint.c: Update.
3101 * common/agent.c: Update.
3102 * corelow.c: Update.
3103 * darwin-nat-info.c: Update.
3104 * darwin-nat.c: Update.
3105 * dcache.c: Update.
3106 * dtrace-probe.c: Update.
3107 * dummy-frame.c: Update.
3108 * fbsd-nat.c: Update.
3109 * frame.c: Update.
3110 * gdbthread.h: Update.
3111 * gnu-nat.c: Update.
3112 * go32-nat.c: Update.
3113 * inf-loop.c: Update.
3114 * inf-ptrace.c: Update.
3115 * infcall.c: Update.
3116 * infcmd.c: Update.
3117 * inflow.c: Update.
3118 * infrun.c: Update.
3119 * linux-fork.c: Update.
3120 * linux-nat.c: Update.
3121 * linux-thread-db.c: Update.
3122 * mi/mi-cmd-var.c: Update.
3123 * mi/mi-interp.c: Update.
3124 * mi/mi-main.c: Update.
3125 * nto-procfs.c: Update.
3126 * ppc-linux-tdep.c: Update.
3127 * procfs.c: Update.
3128 * python/py-inferior.c: Update.
3129 * python/py-record-btrace.c: Update.
3130 * python/py-record.c: Update.
3131 * ravenscar-thread.c: Update.
3132 * regcache.c: Update.
3133 * remote-sim.c: Update.
3134 * remote.c: Update.
3135 * sol-thread.c: Update.
3136 * solib.c: Update.
3137 * target.c: Update.
3138 * tui/tui-stack.c: Update.
3139 * varobj.c: Update.
3140 * windows-nat.c: Update.
3141 * windows-tdep.c: Update.
3142
3143 2018-07-03 Tom Tromey <tom@tromey.com>
3144
3145 * common/ptid.c (ptid_match): Remove.
3146 * common/ptid.h (ptid_match): Don't declare.
3147 * fbsd-nat.c: Update.
3148 * infcmd.c: Update.
3149 * infrun.c: Update.
3150 * linux-nat.c: Update.
3151 * record-btrace.c: Update.
3152 * regcache.c: Update.
3153 * remote.c: Update.
3154
3155 2018-07-03 Tom Tromey <tom@tromey.com>
3156
3157 * common/ptid.c (ptid_tid_p): Remove.
3158 * common/ptid.h (ptid_tid_p): Don't declare.
3159 * sol-thread.c: Update.
3160
3161 2018-07-03 Tom Tromey <tom@tromey.com>
3162
3163 * common/ptid.c (ptid_lwp_p): Remove.
3164 * common/ptid.h (ptid_lwp_p): Don't declare.
3165 * fbsd-nat.c: Update.
3166 * linux-nat.c: Update.
3167 * nat/linux-procfs.c: Update.
3168 * nat/x86-linux-dregs.c: Update.
3169 * sol-thread.c: Update.
3170
3171 2018-07-03 Tom Tromey <tom@tromey.com>
3172
3173 * common/ptid.c (ptid_is_pid): Remove.
3174 * common/ptid.h (ptid_is_pid): Don't declare.
3175 * infrun.c: Update.
3176 * linux-nat.c: Update.
3177 * mi/mi-interp.c: Update.
3178 * remote.c: Update.
3179 * thread.c: Update.
3180
3181 2018-07-03 Tom Tromey <tom@tromey.com>
3182
3183 * common/ptid.c (ptid_get_tid): Remove.
3184 * common/ptid.h (ptid_get_tid): Don't declare.
3185 * ada-tasks.c: Update.
3186 * aix-thread.c: Update.
3187 * bsd-uthread.c: Update.
3188 * darwin-nat.c: Update.
3189 * fbsd-nat.c: Update.
3190 * i386-darwin-nat.c: Update.
3191 * infrun.c: Update.
3192 * linux-tdep.c: Update.
3193 * nto-procfs.c: Update.
3194 * ppc-ravenscar-thread.c: Update.
3195 * python/py-infthread.c: Update.
3196 * ravenscar-thread.c: Update.
3197 * sol-thread.c: Update.
3198 * sparc-ravenscar-thread.c: Update.
3199 * windows-nat.c: Update.
3200
3201 2018-07-03 Tom Tromey <tom@tromey.com>
3202
3203 * common/ptid.c (ptid_get_lwp): Remove.
3204 * common/ptid.h (ptid_get_lwp): Don't declare.
3205 * aarch64-linux-nat.c: Update.
3206 * ada-tasks.c: Update.
3207 * aix-thread.c: Update.
3208 * amd64-linux-nat.c: Update.
3209 * arm-linux-nat.c: Update.
3210 * corelow.c: Update.
3211 * fbsd-nat.c: Update.
3212 * fbsd-tdep.c: Update.
3213 * gnu-nat.c: Update.
3214 * i386-cygwin-tdep.c: Update.
3215 * i386-gnu-nat.c: Update.
3216 * i386-linux-nat.c: Update.
3217 * ia64-linux-nat.c: Update.
3218 * inf-ptrace.c: Update.
3219 * infrun.c: Update.
3220 * linux-fork.c: Update.
3221 * linux-nat.c: Update.
3222 * linux-tdep.c: Update.
3223 * linux-thread-db.c: Update.
3224 * mips-linux-nat.c: Update.
3225 * nat/aarch64-linux-hw-point.c: Update.
3226 * nat/aarch64-linux.c: Update.
3227 * nat/linux-btrace.c: Update.
3228 * nat/linux-osdata.c: Update.
3229 * nat/linux-procfs.c: Update.
3230 * nat/x86-linux-dregs.c: Update.
3231 * obsd-nat.c: Update.
3232 * ppc-fbsd-nat.c: Update.
3233 * ppc-linux-nat.c: Update.
3234 * procfs.c: Update.
3235 * python/py-infthread.c: Update.
3236 * ravenscar-thread.c: Update.
3237 * remote.c: Update.
3238 * s390-linux-nat.c: Update.
3239 * sol-thread.c: Update.
3240 * sol2-tdep.c: Update.
3241 * spu-linux-nat.c: Update.
3242 * x86-linux-nat.c: Update.
3243 * xtensa-linux-nat.c: Update.
3244
3245 2018-07-03 Tom Tromey <tom@tromey.com>
3246
3247 * common/ptid.c (ptid_get_pid): Remove.
3248 * common/ptid.h (ptid_get_pid): Don't declare.
3249 * aarch64-linux-nat.c: Update.
3250 * ada-lang.c: Update.
3251 * aix-thread.c: Update.
3252 * alpha-bsd-nat.c: Update.
3253 * amd64-fbsd-nat.c: Update.
3254 * amd64-linux-nat.c: Update.
3255 * arm-linux-nat.c: Update.
3256 * arm-nbsd-nat.c: Update.
3257 * auxv.c: Update.
3258 * break-catch-syscall.c: Update.
3259 * breakpoint.c: Update.
3260 * bsd-uthread.c: Update.
3261 * corelow.c: Update.
3262 * ctf.c: Update.
3263 * darwin-nat.c: Update.
3264 * fbsd-nat.c: Update.
3265 * fbsd-tdep.c: Update.
3266 * gcore.c: Update.
3267 * gnu-nat.c: Update.
3268 * hppa-nbsd-nat.c: Update.
3269 * hppa-obsd-nat.c: Update.
3270 * i386-fbsd-nat.c: Update.
3271 * ia64-linux-nat.c: Update.
3272 * inf-ptrace.c: Update.
3273 * infcmd.c: Update.
3274 * inferior.c: Update.
3275 * inferior.h: Update.
3276 * inflow.c: Update.
3277 * infrun.c: Update.
3278 * linux-fork.c: Update.
3279 * linux-nat.c: Update.
3280 * linux-tdep.c: Update.
3281 * linux-thread-db.c: Update.
3282 * m68k-bsd-nat.c: Update.
3283 * mi/mi-interp.c: Update.
3284 * mi/mi-main.c: Update.
3285 * mips-linux-nat.c: Update.
3286 * mips-nbsd-nat.c: Update.
3287 * mips64-obsd-nat.c: Update.
3288 * nat/aarch64-linux-hw-point.c: Update.
3289 * nat/aarch64-linux.c: Update.
3290 * nat/linux-btrace.c: Update.
3291 * nat/linux-osdata.c: Update.
3292 * nat/linux-procfs.c: Update.
3293 * nat/x86-linux-dregs.c: Update.
3294 * nto-procfs.c: Update.
3295 * obsd-nat.c: Update.
3296 * ppc-linux-nat.c: Update.
3297 * ppc-nbsd-nat.c: Update.
3298 * ppc-obsd-nat.c: Update.
3299 * proc-service.c: Update.
3300 * procfs.c: Update.
3301 * python/py-inferior.c: Update.
3302 * python/py-infthread.c: Update.
3303 * ravenscar-thread.c: Update.
3304 * record.c: Update.
3305 * remote-sim.c: Update.
3306 * remote.c: Update.
3307 * rs6000-nat.c: Update.
3308 * s390-linux-nat.c: Update.
3309 * sh-nbsd-nat.c: Update.
3310 * sol-thread.c: Update.
3311 * sparc-nat.c: Update.
3312 * sparc64-tdep.c: Update.
3313 * spu-linux-nat.c: Update.
3314 * spu-tdep.c: Update.
3315 * target-debug.h: Update.
3316 * target.c: Update.
3317 * thread.c: Update.
3318 * tid-parse.c: Update.
3319 * tracefile-tfile.c: Update.
3320 * vax-bsd-nat.c: Update.
3321 * windows-nat.c: Update.
3322 * x86-linux-nat.c: Update.
3323 * x86-nat.c: Update.
3324
3325 2018-07-03 Tom Tromey <tom@tromey.com>
3326
3327 * common/ptid.c (pid_to_ptid): Remove.
3328 * common/ptid.h (pid_to_ptid): Don't declare.
3329 * aix-thread.c: Update.
3330 * arm-linux-nat.c: Update.
3331 * common/ptid.c: Update.
3332 * common/ptid.h: Update.
3333 * corelow.c: Update.
3334 * ctf.c: Update.
3335 * darwin-nat.c: Update.
3336 * fbsd-nat.c: Update.
3337 * fork-child.c: Update.
3338 * gnu-nat.c: Update.
3339 * go32-nat.c: Update.
3340 * inf-ptrace.c: Update.
3341 * infcmd.c: Update.
3342 * inferior.c: Update.
3343 * infrun.c: Update.
3344 * linux-fork.c: Update.
3345 * linux-nat.c: Update.
3346 * nat/aarch64-linux-hw-point.c: Update.
3347 * nat/fork-inferior.c: Update.
3348 * nat/x86-linux-dregs.c: Update.
3349 * nto-procfs.c: Update.
3350 * obsd-nat.c: Update.
3351 * procfs.c: Update.
3352 * progspace.c: Update.
3353 * remote.c: Update.
3354 * rs6000-nat.c: Update.
3355 * s390-linux-nat.c: Update.
3356 * sol-thread.c: Update.
3357 * spu-linux-nat.c: Update.
3358 * target.c: Update.
3359 * top.c: Update.
3360 * tracefile-tfile.c: Update.
3361 * windows-nat.c: Update.
3362
3363 2018-07-03 Tom Tromey <tom@tromey.com>
3364
3365 * common/ptid.h (ptid_build): Don't declare.
3366 * common/ptid.c (ptid_build): Remove.
3367 * aix-thread.c: Update.
3368 * bsd-kvm.c: Update.
3369 * bsd-uthread.c: Update.
3370 * common/agent.c: Update.
3371 * common/ptid.c: Update.
3372 * common/ptid.h: Update.
3373 * corelow.c: Update.
3374 * darwin-nat.c: Update.
3375 * fbsd-nat.c: Update.
3376 * gnu-nat.c: Update.
3377 * linux-fork.c: Update.
3378 * linux-nat.c: Update.
3379 * linux-thread-db.c: Update.
3380 * nat/linux-osdata.c: Update.
3381 * nat/linux-procfs.c: Update.
3382 * nto-procfs.c: Update.
3383 * obsd-nat.c: Update.
3384 * proc-service.c: Update.
3385 * procfs.c: Update.
3386 * ravenscar-thread.c: Update.
3387 * remote-sim.c: Update.
3388 * remote.c: Update.
3389 * sol-thread.c: Update.
3390 * target.c: Update.
3391 * windows-nat.c: Update.
3392
3393 2018-07-03 Tom Tromey <tom@tromey.com>
3394
3395 * infrun.c (follow_exec): Use exit_inferior_silent.
3396 * inferior.c (exit_inferior_num_silent): Remove.
3397 * inferior.h (exit_inferior_num_silent): Don't declare.
3398
3399 2018-07-03 Tom Tromey <tom@tromey.com>
3400
3401 PR cli/23340:
3402 * darwin-nat.c (darwin_attach_pid): Reset inferior and
3403 inferior_ptid on error.
3404
3405 2018-07-02 Maciej W. Rozycki <macro@mips.com>
3406 Simon Marchi <simon.marchi@polymtl.ca>
3407
3408 PR tdep/8282
3409 * disasm.h (gdb_disassembler): Add
3410 `m_disassembler_options_holder'. member
3411 * disasm.c (get_all_disassembler_options): New function.
3412 (gdb_disassembler::gdb_disassembler): Use it.
3413 (gdb_buffered_insn_length_init_dis): Likewise.
3414 (gdb_buffered_insn_length): Adjust accordingly.
3415 (set_disassembler_options): Handle options with arguments.
3416 (show_disassembler_options_sfunc): Likewise. Add a leading new
3417 line if showing options with descriptions.
3418 (disassembler_options_completer): Adapt to using the
3419 `disasm_options_and_args_t' structure.
3420 * mips-tdep.c (mips_disassembler_options): New variable.
3421 (mips_disassembler_options_o32): Likewise.
3422 (mips_disassembler_options_n32): Likewise.
3423 (mips_disassembler_options_n64): Likewise.
3424 (gdb_print_insn_mips): Don't set `disassembler_options'.
3425 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
3426 functions.
3427 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
3428 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
3429 `gdbarch_disassembler_options_implicit' and
3430 `gdbarch_valid_disassembler_options'.
3431 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
3432 `disasm_options_and_args_t' structure.
3433 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
3434 method.
3435 (valid_disassembler_options): Switch from `disasm_options_t' to
3436 the `disasm_options_and_args_t' structure.
3437 * NEWS: Document `set disassembler-options' support for the MIPS
3438 target.
3439 * gdbarch.h: Regenerate.
3440 * gdbarch.c: Regenerate.
3441
3442 2018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
3443
3444 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
3445
3446 2018-06-29 Joel Brobecker <brobecker@adacore.com>
3447
3448 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
3449 parameter in call to amd64_target_description.
3450 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
3451 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
3452 (amd64fbsd_init_abi): Likewise.
3453 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
3454 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
3455 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
3456 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
3457
3458 2018-06-29 Pedro Alves <palves@redhat.com>
3459
3460 * gdb/amd64-tdep.h (amd64_create_target_description): Add
3461 "segments" parameter.
3462 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
3463 (_initialize_amd64_tdep): Update call to
3464 amd64_create_target_description.
3465 (amd64_target_description): Add "segments" parameter. Adjust
3466 the implementation to use it.
3467 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
3468 call to amd64_create_target_description.
3469 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
3470 * gdb/arch/amd64.h (amd64_create_target_description): Add
3471 "segments" register.
3472 * gdb/arch/amd64.c (amd64_create_target_description): Add
3473 "segments" parameter. Call create_feature_i386_64bit_segments
3474 only if SEGMENTS is true.
3475 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
3476 call to amd64_create_target_description.
3477
3478 2018-06-29 Pedro Alves <palves@redhat.com>
3479
3480 * thread.c (thread_target_id_str): New, factored out from ...
3481 (print_thread_info_1): ... here. Use it to compute the max
3482 "Target Id" column width.
3483
3484 2018-06-29 Pedro Alves <palves@redhat.com>
3485
3486 * remote.c (remote_target::extra_thread_info): Delete
3487 'display_buf' and 'n' locals. from the cache, regardless of
3488 packet mechanims is in use. Use cache for qThreadExtra and qP
3489 methods too.
3490
3491 2018-06-29 Pedro Alves <palves@redhat.com>
3492
3493 * blockframe.c (find_pc_sect_containing_function): New function.
3494 * breakpoint.c (print_breakpoint_location): Don't call
3495 find_pc_sect_function.
3496 * linespec.c (create_sals_line_offset): Record the location's
3497 symbol in the sal.
3498 * linespec.c (convert_address_location_to_sals): Fill in sal's
3499 symbol with find_pc_sect_containing_function.
3500 * symtab.c (find_function_start_sal): Rename to ...
3501 (find_function_start_sal_1): ... this.
3502 (find_function_start_sal): Reimplement as wrapper around
3503 find_function_start_sal_1, and use
3504 find_pc_sect_containing_function to fill in the sal's symbol.
3505 (find_function_start_sal(symbol*, bool)): Adjust.
3506 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
3507 comments.
3508 (find_pc_sect_containing_function): Declare.
3509
3510 2018-06-29 Pedro Alves <palves@redhat.com>
3511
3512 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
3513 true if the the location has no symbol.
3514
3515 2018-06-28 Tom Tromey <tom@tromey.com>
3516
3517 * NEWS: Mention --enable-codesign.
3518 * silent-rules.mk (ECHO_SIGN): New variable.
3519 * configure.ac: Add --enable-codesign.
3520 * configure: Rebuild.
3521 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
3522 (gdb$(EXEEXT)): Optionally invoke codesign.
3523
3524 2018-06-28 Pedro Alves <palves@redhat.com>
3525
3526 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
3527 comments.
3528 (switch_to_thread_no_regs): Adjust comment.
3529 * infcmd.c (stop_pc): Delete.
3530 (post_create_inferior, info_program_command): Replace references
3531 to stop_pc with references to thread_info->suspend.stop_pc.
3532 * inferior.h (stop_pc): Delete declaration.
3533 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
3534 (handle_inferior_event_1, handle_signal_stop)
3535 (process_event_stop_test, keep_going_stepped_thread)
3536 (handle_step_into_function, handle_step_into_function_backward)
3537 (print_stop_location): Replace references to stop_pc with
3538 references to thread_info->suspend.stop_pc.
3539 (struct infcall_suspend_state) <stop_pc>: Delete field.
3540 (save_infcall_suspend_state, restore_infcall_suspend_state):
3541 Remove references to inf_stat->stop_pc.
3542 * linux-fork.c (fork_load_infrun_state): Likewise.
3543 * record-btrace.c (record_btrace_set_replay): Likewise.
3544 * record-full.c (record_full_goto_entry): Likewise.
3545 * remote.c (print_one_stopped_thread): Likewise.
3546 * target.c (target_resume): Extend comment.
3547 * thread.c (set_executing_thread): New.
3548 (set_executing): Use it.
3549 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
3550 Remove references to stop_pc.
3551
3552 2018-06-28 Pedro Alves <palves@redhat.com>
3553
3554 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
3555 Moving fetching stop_pc until after ecs->event_thread is refreshed.
3556
3557 2018-06-28 Tom Tromey <tom@tromey.com>
3558
3559 * coffread.c (coff_symfile_finish): Update.
3560 * xcoffread.c (xcoff_symfile_finish): Update.
3561 * elfread.c (elf_symfile_finish): Update.
3562 * symfile.h (dwarf2_free_objfile): Don't declare.
3563 * dwarf2read.c (_initialize_dwarf2_read): Use
3564 register_objfile_data_with_cleanup.
3565 (dwarf2_free_objfile): Now static. Change signature.
3566
3567 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3568
3569 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
3570 option "-o" to add-symbol-file-load to add an offset to each
3571 section's load address.
3572 * symfile.c (set_objfile_default_section_offset): New function.
3573
3574 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3575
3576 * symfile.c (add_symbol_file_command): Make sure that sections
3577 with the same name are sorted in the same order.
3578
3579 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3580
3581 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
3582 require the second argument. If omitted, load sections at the
3583 addresses specified in the file.
3584
3585 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3586
3587 * symfile.c (symbol_file_command, symbol_file_add_main_1)
3588 (_initialize_symfile): Add option "-o" to symbol-file to add an
3589 offset to each section of the symbol file.
3590
3591 2018-06-28 Petr Tesarik <ptesarik@suse.cz>
3592
3593 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
3594
3595 2018-06-27 Tom Tromey <tom@tromey.com>
3596
3597 * stack.c (_initialize_stack): Update "func" help text.
3598
3599 2018-06-27 Tom Tromey <tom@tromey.com>
3600
3601 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
3602 std::vector.
3603 (unwind_infopy_str, pyuw_create_unwind_info)
3604 (unwind_infopy_add_saved_register, pyuw_sniffer)
3605 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
3606 Update.
3607 (struct saved_reg): Add constructor.
3608 <value>: Now a gdbpy_ref<>.
3609
3610 2018-06-27 Tom Tromey <tom@tromey.com>
3611
3612 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
3613
3614 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3615
3616 * gdb-gdb.py.in: Format using autopep8.
3617
3618 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3619
3620 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
3621 (type_lookup_function): Recognize CORE_ADDR values.
3622
3623 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3624
3625 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
3626 print tag_name.
3627
3628 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3629
3630 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
3631 <__lt__>: Add.
3632
3633 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3634
3635 * gdb-gdb.py: Move to...
3636 * gdb-gdb.py.in: ... here.
3637 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
3638 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
3639 dependencies.
3640 (distclean): Remove gdb-gdb.py when cleaning.
3641 (gdb-gdb.py, gdb-gdb.gdb): New rules.
3642 * configure: Re-generate.
3643
3644 2018-06-27 Pedro Alves <palves@redhat.com>
3645
3646 * proc-service.c (get_ps_regcache): New.
3647 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3648 (ps_lsetfpregs): Use it.
3649
3650 2018-06-27 Omair Javaid <omair.javaid@linaro.org>
3651
3652 PR gdb/21695
3653 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
3654 (dwarf_decode_lines_1): Adjust.
3655
3656 2018-06-27 Simon Marchi <simon.marchi@ericsson.com>
3657
3658 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
3659 override.
3660 <info_proc>: Likewise.
3661
3662 2018-06-26 Joel Brobecker <brobecker@adacore.com>
3663
3664 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
3665 to windows_fetch_one_register, and only handle the case of
3666 fetching one register. Move the code that reloads the context
3667 and iterates over all registers if R is negative to...
3668 (windows_nat_target::fetch_registers): ... here.
3669 (do_windows_store_inferior_registers): Rename to
3670 windows_store_one_register, and only handle the case of storing
3671 one register. Move the code that handles the case where r is
3672 negative to...
3673 (windows_nat_target::store_registers) ... here.
3674
3675 2018-06-26 Tom Tromey <tom@tromey.com>
3676
3677 PR rust/22574:
3678 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
3679 * rust-lang.c (rust_print_struct_def): Add podata parameter.
3680 Update.
3681 (rust_internal_print_type): Add podata parameter.
3682 (rust_print_type): Update.
3683
3684 2018-06-26 Tom Tromey <tom@tromey.com>
3685
3686 * typeprint.h (struct print_offset_data) <update, finish,
3687 maybe_print_hole>: New methods.
3688 <indentation>: New constant.
3689 * typeprint.c (print_offset_data::indentation): Define.
3690 (print_offset_data::maybe_print_hole, print_offset_data::update)
3691 (print_offset_data::finish): Move from c-typeprint.c and rename.
3692 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
3693 (print_spaces_filtered_with_print_options): Update.
3694 (c_print_type_union_field_offset, maybe_print_hole)
3695 (c_print_type_struct_field_offset): Move to typeprint.c and
3696 rename.
3697 (c_type_print_base_struct_union): Update.
3698
3699 2018-06-25 Pedro Alves <palves@redhat.com>
3700
3701 * gdbthread.h (thread_info_ref, delete_thread)
3702 (delete_thread_silent, first_thread_of_inferior)
3703 (any_thread_of_inferior, switch_to_thread)
3704 (enable_thread_stack_temporaries)
3705 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3706 (get_last_thread_stack_temporary)
3707 (value_in_thread_stack_temporaries, can_access_registers_thread):
3708 Spell out "struct thread_info" instead of just "thread_info".
3709 * inferior.h (notice_new_inferior): Likewise.
3710
3711 2018-06-25 Pedro Alves <palves@redhat.com>
3712
3713 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3714 pass thread_info pointer to delete_thread.
3715 (windows_nat_target::detach): Pass inferior pointer to
3716 detach_inferior.
3717 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
3718 delete_thread.
3719 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
3720 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
3721 and pass a thread_info pointer to delete_thread.
3722 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
3723 pass thread_info pointer to delete_thread.
3724 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
3725 delete_thread_silent call.
3726 * procfs.c (procfs_target::detach): Pass inferior pointer to
3727 detach_inferior.
3728 (procfs_target::wait): Pass thread_info pointer to delete_thread.
3729 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
3730 delete_thread_silent call.
3731 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
3732 pass thread_info pointer to delete_thread.
3733 (windows_nat_target::detach): Pass inferior pointer to
3734 delete_inferior.
3735
3736 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3737
3738 * regcache.c (readable_regcache::read_part): Fix asserts.
3739 (reg_buffer::raw_collect_part): New function.
3740 (regcache::write_part): Fix asserts.
3741 (reg_buffer::raw_supply_part): New function.
3742 (regcache::transfer_regset_register): New helper function.
3743 (regcache::transfer_regset): Call new functions.
3744 (regcache_supply_regset): Use gdb_byte*.
3745 (regcache::supply_regset): Likewise.
3746 (regcache_collect_regset): Likewise.
3747 (regcache::collect_regset): Likewise.
3748 * regcache.h (reg_buffer::raw_collect_part): New declaration.
3749 (reg_buffer::raw_supply_part): Likewise.
3750 (regcache::transfer_regset_register): Likewise.
3751 (regcache::transfer_regset): Use gdb_byte*.
3752
3753 2018-06-22 Alan Hayward <alan.hayward@arm.com>
3754
3755 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
3756
3757 2018-06-21 Pedro Alves <palves@redhat.com>
3758
3759 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
3760 instead of a ptid_t. All callers adjusted.
3761 * ada-tasks.c (ada_get_task_number): Likewise. All callers
3762 adjusted.
3763 (print_ada_task_info, display_current_task_id, task_command_1):
3764 Adjust.
3765 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
3766 inferior_thread.
3767 (breakpoint_kind): Adjust.
3768 (remove_breakpoints_pid): Rename to ...
3769 (remove_breakpoints_inf): ... this. Adjust to take an inferior
3770 pointer. All callers adjusted.
3771 (bpstat_clear_actions): Use inferior_thread.
3772 (get_bpstat_thread): New.
3773 (bpstat_do_actions): Use it.
3774 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
3775 to take a thread_info pointer. All callers adjusted.
3776 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
3777 (breakpoint_re_set_thread): Use inferior_thread.
3778 * breakpoint.h (struct inferior): Forward declare.
3779 (bpstat_stop_status): Update.
3780 (remove_breakpoints_pid): Delete.
3781 (remove_breakpoints_inf): New.
3782 * bsd-uthread.c (bsd_uthread_target::wait)
3783 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
3784 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
3785 (maint_btrace_packet_history_cmd)
3786 (maint_btrace_clear_packet_history_cmd): Adjust.
3787 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
3788 inferior_thread.
3789 * cli/cli-interp.c: Include "inferior.h".
3790 * common/refcounted-object.h (struct
3791 refcounted_object_ref_policy): New.
3792 * compile/compile-object-load.c: Include gdbthread.h.
3793 (store_regs): Use inferior_thread.
3794 * corelow.c (core_target::close): Use current_inferior.
3795 (core_target_open): Adjust to use first_thread_of_inferior and use
3796 the current inferior.
3797 * ctf.c (ctf_target::close): Adjust to use current_inferior.
3798 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
3799 <thread>: ... this new field. All references adjusted.
3800 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
3801 Take a thread_info pointer instead of a ptid_t.
3802 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
3803 (dummy_frame_discard, register_dummy_frame_dtor): Take a
3804 thread_info pointer instead of a ptid_t.
3805 * elfread.c: Include "inferior.h".
3806 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
3807 Use inferior_thread.
3808 * eval.c (evaluate_subexp): Likewise.
3809 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
3810 inferior_thread.
3811 * gdb_proc_service.h (struct thread_info): Forward declare.
3812 (struct ps_prochandle) <ptid>: Delete, replaced by ...
3813 <thread>: ... this new field. All references adjusted.
3814 * gdbarch.h, gdbarch.c: Regenerate.
3815 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
3816 'thread' parameter. All implementations and callers adjusted.
3817 * gdbthread.h (thread_info) <set_running>: New method.
3818 (delete_thread, delete_thread_silent): Take a thread_info pointer
3819 instead of a ptid.
3820 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
3821 (first_thread_of_process): Delete, replaced by ...
3822 (first_thread_of_inferior): ... this new function. All callers
3823 adjusted.
3824 (any_live_thread_of_process): Delete, replaced by ...
3825 (any_live_thread_of_inferior): ... this new function. All callers
3826 adjusted.
3827 (switch_to_thread, switch_to_no_thread): Declare.
3828 (is_executing): Delete.
3829 (enable_thread_stack_temporaries): Update comment.
3830 <enable_thread_stack_temporaries>: Take a thread_info pointer
3831 instead of a ptid_t. Incref the thread.
3832 <~enable_thread_stack_temporaries>: Decref the thread.
3833 <m_ptid>: Delete
3834 <m_thr>: New.
3835 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
3836 (get_last_thread_stack_temporary)
3837 (value_in_thread_stack_temporaries, can_access_registers_thread):
3838 Take a thread_info pointer instead of a ptid_t. All callers
3839 adjusted.
3840 * infcall.c (get_call_return_value): Use inferior_thread.
3841 (run_inferior_call): Work with thread pointers instead of ptid_t.
3842 (call_function_by_hand_dummy): Work with thread pointers instead
3843 of ptid_t. Use thread_info_ref.
3844 * infcmd.c (proceed_thread_callback): Access thread's state
3845 directly.
3846 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
3847 access thread's state directly.
3848 (continue_command): Use inferior_thread.
3849 (info_program_command): Use find_thread_ptid and access thread
3850 state directly.
3851 (proceed_after_attach_callback): Use thread state directly.
3852 (notice_new_inferior): Take a thread_info pointer instead of a
3853 ptid_t. All callers adjusted.
3854 (exit_inferior): Take an inferior pointer instead of a pid. All
3855 callers adjusted.
3856 (exit_inferior_silent): New.
3857 (detach_inferior): Delete.
3858 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
3859 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
3860 (detach_inferior_command, kill_inferior_command): Use
3861 find_inferior_id instead of valid_gdb_inferior_id and
3862 gdb_inferior_id_to_pid.
3863 (inferior_command): Use inferior and thread pointers.
3864 * inferior.h (struct thread_info): Forward declare.
3865 (notice_new_inferior): Take a thread_info pointer instead of a
3866 ptid_t. All callers adjusted.
3867 (detach_inferior): Delete declaration.
3868 (exit_inferior, exit_inferior_silent): Take an inferior pointer
3869 instead of a pid. All callers adjusted.
3870 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
3871 (valid_gdb_inferior_id): Delete.
3872 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
3873 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
3874 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
3875 ...
3876 <inf>: ... this new field.
3877 <step_ptid>: Delete, replaced by ...
3878 <step_thread>: ... this new field.
3879 (get_displaced_stepping_state): Take an inferior pointer instead
3880 of a pid. All callers adjusted.
3881 (displaced_step_in_progress_any_inferior): Adjust.
3882 (displaced_step_in_progress_thread): Take a thread pointer instead
3883 of a ptid_t. All callers adjusted.
3884 (displaced_step_in_progress, add_displaced_stepping_state): Take
3885 an inferior pointer instead of a pid. All callers adjusted.
3886 (get_displaced_step_closure_by_addr): Adjust.
3887 (remove_displaced_stepping_state): Take an inferior pointer
3888 instead of a pid. All callers adjusted.
3889 (displaced_step_prepare_throw, displaced_step_prepare)
3890 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
3891 All callers adjusted.
3892 (start_step_over): Adjust.
3893 (infrun_thread_ptid_changed): Remove bit updating ptids in the
3894 displaced step queue.
3895 (do_target_resume): Adjust.
3896 (fetch_inferior_event): Use inferior_thread.
3897 (context_switch, get_inferior_stop_soon): Take an
3898 execution_control_state pointer instead of a ptid_t. All callers
3899 adjusted.
3900 (switch_to_thread_cleanup): Delete.
3901 (stop_all_threads): Use scoped_restore_current_thread.
3902 * inline-frame.c: Include "gdbthread.h".
3903 (inline_state) <inline_state>: Take a thread pointer instead of a
3904 ptid_t. All callers adjusted.
3905 <ptid>: Delete, replaced by ...
3906 <thread>: ... this new field.
3907 (find_inline_frame_state): Take a thread pointer instead of a
3908 ptid_t. All callers adjusted.
3909 (skip_inline_frames, step_into_inline_frame)
3910 (inline_skipped_frames, inline_skipped_symbol): Take a thread
3911 pointer instead of a ptid_t. All callers adjusted.
3912 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
3913 (inline_skipped_frames, inline_skipped_symbol): Likewise.
3914 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
3915 pointers directly.
3916 * linux-nat.c (get_detach_signal): Likewise.
3917 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
3918 (thread_db_notice_clone): Adjust.
3919 (thread_db_find_new_threads_silently)
3920 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
3921 a thread pointer instead of a ptid_t. All callers adjusted.
3922 * mi/mi-cmd-var.c: Include "inferior.h".
3923 (mi_cmd_var_update_iter): Update to use thread pointers.
3924 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
3925 inferior directly.
3926 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
3927 out to ...
3928 (mi_output_running): ... this new function.
3929 (mi_on_resume_1): Adjust to use it.
3930 (mi_user_selected_context_changed): Adjust to use inferior_thread.
3931 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
3932 directly.
3933 (interrupt_thread_callback): : Adjust to use thread and inferior
3934 pointers.
3935 * proc-service.c: Include "gdbthread.h".
3936 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
3937 * progspace-and-thread.c: Include "inferior.h".
3938 * progspace.c: Include "inferior.h".
3939 * python/py-exitedevent.c (create_exited_event_object): Adjust to
3940 hold a reference to an inferior_object.
3941 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
3942 inferior_thread.
3943 * python/py-inferior.c (struct inferior_object): Give the type a
3944 tag name instead of a typedef.
3945 (python_on_normal_stop): No need to check if the current thread is
3946 listed.
3947 (inferior_to_inferior_object): Change return type to
3948 inferior_object. All callers adjusted.
3949 (find_thread_object): Delete, bits factored out to ...
3950 (thread_to_thread_object): ... this new function.
3951 * python/py-infthread.c (create_thread_object): Use
3952 inferior_to_inferior_object.
3953 (thpy_is_stopped): Use thread pointer directly.
3954 (gdbpy_selected_thread): Use inferior_thread.
3955 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
3956 field, replaced with ...
3957 <thread>: ... this new field. All users adjusted.
3958 (btpy_insn_or_gap_new): Drop const.
3959 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
3960 callers adjusted.
3961 * python/py-record.c: Include "gdbthread.h".
3962 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3963 a ptid_t. All callers adjusted.
3964 (gdbpy_current_recording): Use inferior_thread.
3965 * python/py-record.h (recpy_record_object) <ptid>: Delete
3966 field, replaced with ...
3967 <thread>: ... this new field. All users adjusted.
3968 (recpy_element_object) <ptid>: Delete
3969 field, replaced with ...
3970 <thread>: ... this new field. All users adjusted.
3971 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
3972 a ptid_t. All callers adjusted.
3973 * python/py-threadevent.c: Include "gdbthread.h".
3974 (get_event_thread): Use thread_to_thread_object.
3975 * python/python-internal.h (struct inferior_object): Forward
3976 declare.
3977 (find_thread_object, find_inferior_object): Delete declarations.
3978 (thread_to_thread_object, inferior_to_inferior_object): New
3979 declarations.
3980 * record-btrace.c: Include "inferior.h".
3981 (require_btrace_thread): Use inferior_thread.
3982 (record_btrace_frame_sniffer)
3983 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
3984 (get_thread_current_frame): Use scoped_restore_current_thread and
3985 switch_to_thread.
3986 (get_thread_current_frame): Use thread pointer directly.
3987 (record_btrace_replay_at_breakpoint): Use thread's inferior
3988 pointer directly.
3989 * record-full.c: Include "inferior.h".
3990 * regcache.c: Include "gdbthread.h".
3991 (get_thread_arch_regcache): Use the inferior's address space
3992 directly.
3993 (get_thread_regcache, registers_changed_thread): New.
3994 * regcache.h (get_thread_regcache(thread_info *thread)): New
3995 overload.
3996 (registers_changed_thread): New.
3997 (remote_target) <remote_detach_1>: Swap order of parameters.
3998 (remote_add_thread): <remote_add_thread>: Return the new thread.
3999 (get_remote_thread_info(ptid_t)): New overload.
4000 (remote_target::remote_notice_new_inferior): Use thread pointers
4001 directly.
4002 (remote_target::process_initial_stop_replies): Use
4003 thread_info::set_running.
4004 (remote_target::remote_detach_1, remote_target::detach)
4005 (extended_remote_target::detach): Adjust.
4006 * stack.c (frame_show_address): Use inferior_thread.
4007 * target-debug.h (target_debug_print_thread_info_pp): New.
4008 * target-delegates.c: Regenerate.
4009 * target.c (default_thread_address_space): Delete.
4010 (memory_xfer_partial_1): Use current_inferior.
4011 (target_detach): Use current_inferior.
4012 (target_thread_address_space): Delete.
4013 (generic_mourn_inferior): Use current_inferior.
4014 * target.h (struct target_ops) <thread_address_space>: Delete.
4015 (target_thread_address_space): Delete.
4016 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
4017 pointers directly.
4018 (delete_thread_1, delete_thread, delete_thread_silent): Take a
4019 thread pointer instead of a ptid_t. Adjust all callers.
4020 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
4021 (first_thread_of_process): Delete, replaced by ...
4022 (first_thread_of_inferior): ... this new function. All callers
4023 adjusted.
4024 (any_thread_of_process): Rename to ...
4025 (any_thread_of_inferior): ... this, and take an inferior pointer.
4026 (any_live_thread_of_process): Rename to ...
4027 (any_live_thread_of_inferior): ... this, and take an inferior
4028 pointer.
4029 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
4030 (value_in_thread_stack_temporaries)
4031 (get_last_thread_stack_temporary): Take a thread pointer instead
4032 of a ptid_t. Adjust all callers.
4033 (thread_info::set_running): New.
4034 (validate_registers_access): Use inferior_thread.
4035 (can_access_registers_ptid): Rename to ...
4036 (can_access_registers_thread): ... this, and take a thread
4037 pointer.
4038 (print_thread_info_1): Adjust to compare thread pointers instead
4039 of ptids.
4040 (switch_to_no_thread, switch_to_thread): Make extern.
4041 (scoped_restore_current_thread::~scoped_restore_current_thread):
4042 Use m_thread pointer directly.
4043 (scoped_restore_current_thread::scoped_restore_current_thread):
4044 Use inferior_thread.
4045 (thread_command): Use thread pointer directly.
4046 (thread_num_make_value_helper): Use inferior_thread.
4047 * top.c (execute_command): Use inferior_thread.
4048 * tui/tui-interp.c: Include "inferior.h".
4049 * varobj.c (varobj_create): Use inferior_thread.
4050 (value_of_root_1): Use find_thread_global_id instead of
4051 global_thread_id_to_ptid.
4052
4053 2018-06-21 Alan Hayward <alan.hayward@arm.com>
4054
4055 * regcache.c (readable_regcache::read_part): Avoid memcpy when
4056 possible.
4057 (regcache::write_part): Likewise.
4058 (readable_regcache::cooked_read_part): Update comment.
4059 (readable_regcache::cooked_write_part): Likewise.
4060 * regcache.h: (readable_regcache::read_part): Likewise.
4061 (regcache::write_part): Likewise.
4062
4063 2018-06-21 Richard Bunt <richard.bunt@arm.com>
4064 Dirk Schubert <dirk.schubert@arm.com>
4065
4066 * aarch64-linux-nat.c (post_attach): New.
4067 (aarch64_linux_nat_target::post_attach): Override post_attach to
4068 record the number of hardware debug registers.
4069
4070 2018-06-20 Tom Tromey <tom@tromey.com>
4071
4072 * python/py-param.c (add_setshow_generic): Make parameters const.
4073 (parmpy_init): Update.
4074
4075 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4076
4077 * regcache.h (regcache_cooked_read_ftype): Rename to...
4078 (register_read_ftype): ...this, change type to function_view.
4079 (class reg_buffer) <save>: Remove src parameter.
4080 (readonly_detached_regcache) <readonly_detached_regcache>: Make
4081 parameter non-const in first overload. Remove src parameter in
4082 second overload.
4083 * regcache.c (do_cooked_read): Remove.
4084 (readonly_detached_regcache::readonly_detached_regcache): Make
4085 parameter non-const, adjust call to other constructor.
4086 (reg_buffer::save): Remove src parameter.
4087 * frame.c (do_frame_register_read): Remove.
4088 (frame_save_as_regcache): Use lambda function.
4089 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
4090 parameter to ppu2spu_data *.
4091 (ppu2spu_sniffer): Use lambda function.
4092
4093 2018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
4094
4095 * record-full.c (record_full_target::insert_breakpoint): Remove
4096 "struct" keyword, add const.
4097
4098 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
4099
4100 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
4101 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
4102 * configure.ac: Remove AC_PREREQ, add missing quoting.
4103 * gnulib/configure.ac: Modernize usage of
4104 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
4105 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
4106 (AUTOMAKE_VERSION): Bump to 1.15.1.
4107 * configure: Re-generate.
4108 * config.in: Re-generate.
4109 * aclocal.m4: Re-generate.
4110 * gnulib/aclocal.m4: Re-generate.
4111 * gnulib/config.in: Re-generate.
4112 * gnulib/configure: Re-generate.
4113 * gnulib/import/Makefile.in: Re-generate.
4114
4115 2018-06-19 Pedro Alves <palves@redhat.com>
4116
4117 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
4118 (lookup_minimal_symbol_by_pc_section): ... here with
4119 gdb_assert_not_reached added.
4120
4121 2018-06-19 Pedro Alves <palves@redhat.com>
4122
4123 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
4124 parameter with a block parameter. Compare location's block symbol
4125 with the frame's block instead of addresses.
4126 (skip_inline_frames): Pass the current block instead of the
4127 frame's address. Break out as soon as we determine the frame
4128 should not be skipped.
4129
4130 2018-06-18 Tom Tromey <tom@tromey.com>
4131
4132 * solib-aix.c (solib_aix_get_section_offsets): Return
4133 unique_xmalloc_ptr.
4134 (solib_aix_solib_create_inferior_hook): Update.
4135
4136 2018-06-18 Tom Tromey <tom@tromey.com>
4137
4138 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
4139
4140 2018-06-18 Tom Tromey <tom@tromey.com>
4141
4142 * solib-frv.c (frv_relocate_main_executable): Use
4143 unique_xmalloc_ptr.
4144 * solib-dsbt.c (dsbt_relocate_main_executable): Use
4145 unique_xmalloc_ptr.
4146
4147 2018-06-18 Tom Tromey <tom@tromey.com>
4148
4149 * objfiles.h (inhibit_section_map_updates): Update.
4150 (resume_section_map_updates, resume_section_map_updates_cleanup):
4151 Remove.
4152 * solib-svr4.c (svr4_handle_solib_event): Update.
4153 * objfiles.c (inhibit_section_map_updates): Return
4154 scoped_restore_tmpl<int>.
4155 (resume_section_map_updates, resume_section_map_updates_cleanup):
4156 Remove.
4157
4158 2018-06-18 Tom Tromey <tom@tromey.com>
4159
4160 * valprint.h (read_string): Update.
4161 * valprint.c (read_string): Change type of "buffer".
4162 (val_print_string): Update.
4163 * python/py-value.c (valpy_string): Update.
4164 * language.h (struct language_defn) <la_get_string>: Change
4165 type of "buffer".
4166 (default_get_string, c_get_string): Update.
4167 * language.c (default_get_string): Change type of "buffer".
4168 * guile/scm-value.c (gdbscm_value_to_string): Update.
4169 * c-lang.c (c_get_string): Change type of "buffer".
4170
4171 2018-06-18 Tom Tromey <tom@tromey.com>
4172
4173 * ser-mingw.c (struct pipe_state_destroyer): New.
4174 (pipe_state_up): New typedef.
4175 (cleanup_pipe_state): Remove.
4176 (pipe_windows_open): Use pipe_state_up. Don't release argv.
4177
4178 2018-06-18 Tom Tromey <tom@tromey.com>
4179
4180 * rust-lang.h (rust_yyerror): Don't declare.
4181 * rust-lang.c (rust_language_defn): Update.
4182 * rust-exp.y (yyerror): Now static.
4183 * parse.c (parse_exp_in_context_1): Update.
4184 * p-lang.h (p_yyerror): Don't declare.
4185 * p-lang.c (p_language_defn): Update.
4186 * p-exp.y (yyerror): Now static.
4187 * opencl-lang.c (opencl_language_defn): Update.
4188 * objc-lang.c (objc_language_defn): Update.
4189 * m2-lang.h (m2_yyerror): Don't declare.
4190 * m2-lang.c (m2_language_defn): Update.
4191 * m2-exp.y (yyerror): Now static.
4192 * language.h (struct language_defn) <la_error>: Remove.
4193 * language.c (unk_lang_error): Remove.
4194 (unknown_language_defn, auto_language_defn): Remove.
4195 * go-lang.h (go_yyerror): Don't declare.
4196 * go-lang.c (go_language_defn): Update.
4197 * go-exp.y (yyerror): Now static.
4198 * f-lang.h (f_yyerror): Don't declare.
4199 * f-lang.c (f_language_defn): Update.
4200 * f-exp.y (yyerror): Now static.
4201 * d-lang.h (d_yyerror): Don't declare.
4202 * d-lang.c (d_language_defn): Update.
4203 * d-exp.y (yyerror): Now static.
4204 * c-lang.h (c_yyerror): Don't declare.
4205 * c-lang.c (c_language_defn, cplus_language_defn)
4206 (asm_language_defn, minimal_language_defn): Update.
4207 * c-exp.y (yyerror): Now static.
4208 * ada-lang.h (ada_yyerror): Don't declare.
4209 * ada-lang.c (ada_language_defn): Update.
4210 * ada-exp.y (yyerror): Now static.
4211
4212 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4213
4214 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
4215 (store_sveregs_to_thread): Likewise.
4216 (aarch64_linux_fetch_inferior_registers): Check for SVE.
4217 (aarch64_linux_store_inferior_registers): Likewise.
4218 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
4219 function.
4220 (aarch64_sve_regs_copy_to_regcache): Likewise.
4221 (aarch64_sve_regs_copy_from_regcache): Likewise.
4222 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
4223 declaration.
4224 (aarch64_sve_regs_copy_to_regcache): Likewise.
4225 (aarch64_sve_regs_copy_from_regcache): Likewise.
4226 (sve_context): Structure from Linux headers.
4227 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
4228 (SVE_SIG_ZREG_SIZE): Likewise.
4229 (SVE_SIG_PREG_SIZE): Likewise.
4230 (SVE_SIG_FFR_SIZE): Likewise.
4231 (SVE_SIG_REGS_OFFSET): Likewise.
4232 (SVE_SIG_ZREGS_OFFSET): Likewise.
4233 (SVE_SIG_ZREG_OFFSET): Likewise.
4234 (SVE_SIG_ZREGS_SIZE): Likewise.
4235 (SVE_SIG_PREGS_OFFSET): Likewise.
4236 (SVE_SIG_PREG_OFFSET): Likewise.
4237 (SVE_SIG_PREGS_SIZE): Likewise.
4238 (SVE_SIG_FFR_OFFSET): Likewise.
4239 (SVE_SIG_REGS_SIZE): Likewise.
4240 (SVE_SIG_CONTEXT_SIZE): Likewise.
4241 (SVE_PT_REGS_MASK): Likewise.
4242 (SVE_PT_REGS_FPSIMD): Likewise.
4243 (SVE_PT_REGS_SVE): Likewise.
4244 (SVE_PT_VL_INHERIT): Likewise.
4245 (SVE_PT_VL_ONEXEC): Likewise.
4246 (SVE_PT_REGS_OFFSET): Likewise.
4247 (SVE_PT_FPSIMD_OFFSET): Likewise.
4248 (SVE_PT_FPSIMD_SIZE): Likewise.
4249 (SVE_PT_SVE_ZREG_SIZE): Likewise.
4250 (SVE_PT_SVE_PREG_SIZE): Likewise.
4251 (SVE_PT_SVE_FFR_SIZE): Likewise.
4252 (SVE_PT_SVE_FPSR_SIZE): Likewise.
4253 (SVE_PT_SVE_FPCR_SIZE): Likewise.
4254 (__SVE_SIG_TO_PT): Likewise.
4255 (SVE_PT_SVE_OFFSET): Likewise.
4256 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
4257 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
4258 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
4259 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
4260 (SVE_PT_SVE_PREG_OFFSET): Likewise.
4261 (SVE_PT_SVE_PREGS_SIZE): Likewise.
4262 (SVE_PT_SVE_FFR_OFFSET): Likewise.
4263 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
4264 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
4265 (SVE_PT_SVE_SIZE): Likewise.
4266 (SVE_PT_SIZE): Likewise.
4267 (HAS_SVE_STATE): New define.
4268
4269 2018-06-18 Alan Hayward <alan.hayward@arm.com>
4270
4271 * nat/aarch64-sve-linux-sigcontext.h: New file.
4272 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
4273 new files.
4274 (SVE_VQ_MIN): Likewise.
4275 (SVE_VQ_MAX): Likewise.
4276 (SVE_VL_MIN): Likewise.
4277 (SVE_VL_MAX): Likewise.
4278 (SVE_NUM_ZREGS): Likewise.
4279 (SVE_NUM_PREGS): Likewise.
4280 (sve_vl_valid): Likewise.
4281 (struct user_sve_header): Likewise.
4282
4283 2018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
4284 Richard Bunt <Richard.Bunt@arm.com>
4285
4286 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
4287 was requested by GDB.
4288
4289 2018-06-15 Tom de Vries <tdevries@suse.de>
4290
4291 * MAINTAINERS (Write After Approval): Add Tom de Vries.
4292
4293 2018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
4294
4295 * gnulib/update-gnulib.sh: Print expected versions of
4296 autoconf/aclocal.
4297
4298 2018-06-14 Simon Marchi <simon.marchi@ericsson.com>
4299
4300 * arch-utils.c (default_type_align): Use type_length_units.
4301 * gdbtypes.c (type_align): Use type_length_units.
4302
4303 2018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4304
4305 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
4306 of 'define' command.
4307
4308 2018-06-14 Tom de Vries <tdevries@suse.de>
4309
4310 PR cli/22573
4311 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
4312 get_no_prettyformat_print_options.
4313
4314 2018-06-13 Simon Marchi <simon.marchi@ericsson.com>
4315
4316 * sparc-nat.h: Include target.h.
4317 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
4318 <fetch_registers>: Remove this argument in function call.
4319 <store_registers>: Remove this argument in function call, remove
4320 extra semicolon.
4321 <low_forget_process>: Call sparc64_forget_process instead of
4322 sparc_forget_process.
4323
4324 2018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4325
4326 * procfs.c (_initialize_procfs): Use add_inf_child_target.
4327 (procfs_target::make_corefile_notes): Adjust to new
4328 target_read_alloc return type.
4329
4330 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4331 Stephen Roberts <stephen.roberts@arm.com>
4332
4333 PR gdb/22882
4334 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
4335 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
4336 Move should_notify_stop local into more inner scope.
4337
4338 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4339 Stephen Roberts <stephen.roberts@arm.com>
4340
4341 PR gdb/22882
4342 * infrun.c (resume_1): Add call to mark_async_event_handler.
4343
4344 2018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
4345
4346 * infrun.c (do_target_wait): Change old version of $pc printed.
4347
4348 2018-06-11 Simon Marchi <simon.marchi@ericsson.com>
4349
4350 * dwarf2read.c (read_index_from_section): Rename to...
4351 (read_gdb_index_from_section): ... this, update all callers.
4352 (dwarf2_read_index): Rename to...
4353 (dwarf2_read_gdb_index): ... this, update all callers.
4354
4355 2018-06-11 John David Anglin <danglin@gcc.gnu.org>
4356
4357 * gdb/hppa-linux-nat.c
4358 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
4359 hppa_linux_nat_target::fetch_registers.
4360
4361 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4362
4363 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
4364 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
4365 (AARCH64_DWARF_SVE_FFR): Likewise.
4366 (AARCH64_DWARF_SVE_P0): Likewise.
4367 (AARCH64_DWARF_SVE_Z0): Likewise.
4368
4369 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4370
4371 * common/common-regcache.h (raw_compare): New function.
4372 * regcache.c (regcache::raw_compare): Likewise.
4373 * regcache.h (regcache::raw_compare): New declaration.
4374
4375 2018-06-11 Alan Hayward <alan.hayward@arm.com>
4376
4377 * common/common-regcache.h (reg_buffer_common): New structure.
4378 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
4379 (reg_buffer::raw_supply): Likewise.
4380 (reg_buffer::raw_supply_integer): Likewise.
4381 (reg_buffer::raw_supply_zeroed): Likewise.
4382 (reg_buffer::raw_collect): Likewise.
4383 (reg_buffer::raw_collect_integer): Likewise.
4384 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
4385 (reg_buffer::raw_supply): Likewise.
4386 (reg_buffer::raw_supply_integer): Likewise.
4387 (reg_buffer::raw_supply_zeroed): Likewise.
4388 (reg_buffer::raw_collect): Likewise.
4389 (reg_buffer::raw_collect_integer): Likewise.
4390
4391 2018-06-10 Tom Tromey <tom@tromey.com>
4392
4393 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
4394 (class remote_state) <stop_reply_queue>: Now std::vector.
4395 (remote_state::~remote_state)
4396 (remote_target::stop_reply_queue_length): Update.
4397 (struct queue_iter_param, remove_child_of_pending_fork)
4398 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
4399 (check_pending_event_prevents_wildcard_vcont_callback)
4400 (remove_stop_reply_for_inferior)
4401 (remove_stop_reply_of_remote_state)
4402 (remote_notif_remove_once_on_match)
4403 (stop_reply_match_ptid_and_ws)
4404 (remote_kill_child_of_pending_fork): Remove.
4405 (remote_target::remove_new_fork_children)
4406 (remote_target::check_pending_events_prevent_wildcard_vcont)
4407 (remote_target::discard_pending_stop_replies)
4408 (remote_target::discard_pending_stop_replies_in_queue)
4409 (remote_target::remote_notif_remove_queued_reply)
4410 (remote_target::queued_stop_reply)
4411 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
4412 (remote_target::wait, remote_target::kill_new_fork_children)
4413 (remote_target::async): Update.
4414
4415 2018-06-10 Tom Tromey <tom@tromey.com>
4416
4417 * record-full.c (record_full_arch_list_cleanups): Remove.
4418 (record_full_message): Use try/catch.
4419 (record_full_wait_cleanups): Remove.
4420 (record_full_wait_1): Use try/catch.
4421 (record_full_restore): Likewise.
4422
4423 2018-06-10 Tom Tromey <tom@tromey.com>
4424
4425 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
4426 declare VEC. Add constructor.
4427 <in_target_beneath>: Now bool.
4428 (record_full_breakpoints): Now a std::vector, static.
4429 (record_full_sync_record_breakpoints)
4430 (record_full_init_record_breakpoints)
4431 (record_full_target::insert_breakpoint)
4432 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
4433
4434 2018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
4435
4436 * dwarf2read.c (process_cu_includes): Remove struct keyword.
4437 * serial.c (serial_interface_lookup): Remove struct keyword.
4438
4439 2018-06-10 Tom Tromey <tom@tromey.com>
4440
4441 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
4442 method.
4443 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
4444 a method.
4445 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
4446 method.
4447 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
4448 "beneath" as a method.
4449 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
4450 Use "beneath" as a method.
4451
4452 2018-06-10 Tom Tromey <tom@tromey.com>
4453
4454 * tracefile.c (struct trace_file_writer_deleter): New.
4455 <operator()>: Rename from trace_file_writer_xfree.
4456 (trace_file_writer_up): New typedef.
4457 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
4458
4459 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4460
4461 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
4462 <m_registers, m_register_status>: Change type to
4463 std::unique_ptr.
4464 * regcache.c (reg_buffer::reg_buffer): Use new instead of
4465 XCNEWVEC.
4466
4467 2018-06-09 Simon Marchi <simon.marchi@ericsson.com>
4468
4469 * common/common-regcache.h (enum register_status): Add
4470 underlying type "signed char".
4471 * regcache.h (reg_buffer) <m_register_status>: Change type to
4472 register_status *.
4473 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
4474 register_status instead of signed char.
4475 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
4476 (reg_buffer::get_register_status): Remove cast.
4477 (readable_regcache::raw_read): Remove cast.
4478 (readable_regcache::cooked_read): Remove cast.
4479
4480 2018-06-09 Tom Tromey <tom@tromey.com>
4481
4482 * source.c (reverse_search_command, forward_search_command): Use
4483 scoped_fd.
4484
4485 2018-06-09 Tom Tromey <tom@tromey.com>
4486
4487 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
4488 (serial_ops_list): Now static, std::vector.
4489 (serial_interface_lookup, serial_add_interface): Update.
4490
4491 2018-06-09 Tom Tromey <tom@tromey.com>
4492
4493 * dwarf2read.c (process_cu_includes): Update.
4494 (process_full_comp_unit): Update.
4495 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
4496 std::vector.
4497
4498 2018-06-08 Paul Koning <paul_koning@dell.com>
4499
4500 PR gdb/23252
4501
4502 * python/python.c (do_start_initialization):
4503 Avoid call to internal Python API.
4504 (init__gdb_module): New function.
4505
4506 2018-06-08 Gary Benson <gbenson@redhat.com>
4507
4508 * linux-thread-db.c (valprint.h): New include.
4509 (struct check_thread_db_info): New structure.
4510 (check_thread_db_on_load, tdb_testinfo): New static globals.
4511 (check_thread_db, check_thread_db_callback): New functions.
4512 (try_thread_db_load_1): Run integrity checks if requested.
4513 (maintenance_check_libthread_db): New function.
4514 (_initialize_thread_db): Register "maint check libthread-db"
4515 and "maint set/show check-libthread-db".
4516 * NEWS: Mention the above new commands.
4517
4518 2018-06-08 Tom Tromey <tom@tromey.com>
4519
4520 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
4521 now a method.
4522
4523 2018-06-08 Tom Tromey <tom@tromey.com>
4524
4525 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
4526
4527 2018-06-08 Tom Tromey <tom@tromey.com>
4528
4529 * common/btrace-common.h (struct btrace_data): Add constructor,
4530 destructor, move assignment operator.
4531 <empty, clear, fini>: New methods.
4532 <format>: Initialize.
4533 (btrace_data_init, btrace_data_fini, btrace_data_clear)
4534 (btrace_data_empty): Don't declare.
4535 * common/btrace-common.c (btrace_data_init): Remove.
4536 (btrace_data::fini): Rename from btrace_data_fini.
4537 (btrace_data::empty): Rename from btrace_data_empty.
4538 (btrace_data::clear): Rename from btrace_data_clear. Return
4539 bool.
4540 * btrace.h (make_cleanup_btrace_data): Don't declare.
4541 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
4542 (parse_xml_btrace): Update.
4543 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
4544 (maint_btrace_clear_packet_history_cmd): Update.
4545
4546 2018-06-07 Pedro Alves <palves@redhat.com>
4547
4548 * target.h (target_ops) <beneath>: Now a method. All references
4549 updated.
4550 (class target_stack): New.
4551 * target.c (g_target_stack): New.
4552 (g_current_top_target): Delete.
4553 (current_top_target): Get the top target out of g_target_stack.
4554 (target_stack::push, target_stack::unpush): New.
4555 (push_target, unpush_target): Reimplement.
4556 (target_is_pushed): Reimplement in terms of g_target_stack.
4557 (target_ops::beneath, target_stack::find_beneath): New.
4558
4559 2018-06-07 Pedro Alves <palves@redhat.com>
4560
4561 * target.h (find_target_beneath): Delete declaration.
4562 * target.c (find_target_beneath): Delete definition.
4563 * aix-thread.c: All callers of find_target_beneath adjusted to
4564 call target_ops::beneath instead.
4565 * bsd-uthread.c: Likewise.
4566 * linux-thread-db.c: Likewise.
4567 * ravenscar-thread.c: Likewise.
4568 * sol-thread.c: Likewise.
4569 * spu-multiarch.c: Likewise.
4570
4571 2018-06-07 Pedro Alves <palves@redhat.com>
4572
4573 * target.h (target_ops) <beneath>: Now a method. All references
4574 updated.
4575 (target_ops) <m_beneath>: New.
4576 * target.c (target_ops::beneath): New.
4577 * corelow.c: Adjust all references to target_ops::beneath.
4578 * linux-thread-db.c: Likewise.
4579 * make-target-delegates: Likewise.
4580 * record-btrace.c: Likewise.
4581 * record-full.c: Likewise.
4582 * remote.c: Likewise.
4583 * target.c: Likewise.
4584 * target-delegates.c: Regenerate.
4585
4586 2018-06-07 Pedro Alves <palves@redhat.com>
4587
4588 * target.h (target_stack): Delete.
4589 (current_top_target): Declare function.
4590 * target.c (target_stack): Delete.
4591 (g_current_top_target): New.
4592 (current_top_target): New function.
4593 * auxv.c: Use current_top_target instead of target_stack
4594 throughout.
4595 * avr-tdep.c: Likewise.
4596 * breakpoint.c: Likewise.
4597 * corefile.c: Likewise.
4598 * elfread.c: Likewise.
4599 * eval.c: Likewise.
4600 * exceptions.c: Likewise.
4601 * frame.c: Likewise.
4602 * gdbarch-selftests.c: Likewise.
4603 * gnu-v3-abi.c: Likewise.
4604 * ia64-tdep.c: Likewise.
4605 * ia64-vms-tdep.c: Likewise.
4606 * infcall.c: Likewise.
4607 * infcmd.c: Likewise.
4608 * infrun.c: Likewise.
4609 * linespec.c: Likewise.
4610 * linux-tdep.c: Likewise.
4611 * minsyms.c: Likewise.
4612 * ppc-linux-nat.c: Likewise.
4613 * ppc-linux-tdep.c: Likewise.
4614 * procfs.c: Likewise.
4615 * regcache.c: Likewise.
4616 * remote.c: Likewise.
4617 * rs6000-tdep.c: Likewise.
4618 * s390-linux-nat.c: Likewise.
4619 * s390-tdep.c: Likewise.
4620 * solib-aix.c: Likewise.
4621 * solib-darwin.c: Likewise.
4622 * solib-dsbt.c: Likewise.
4623 * solib-spu.c: Likewise.
4624 * solib-svr4.c: Likewise.
4625 * solib-target.c: Likewise.
4626 * sparc-tdep.c: Likewise.
4627 * sparc64-tdep.c: Likewise.
4628 * spu-tdep.c: Likewise.
4629 * symfile.c: Likewise.
4630 * symtab.c: Likewise.
4631 * target-descriptions.c: Likewise.
4632 * target-memory.c: Likewise.
4633 * target.c: Likewise.
4634 * target.h: Likewise.
4635 * tracefile-tfile.c: Likewise.
4636 * tracepoint.c: Likewise.
4637 * valops.c: Likewise.
4638 * valprint.c: Likewise.
4639 * value.c: Likewise.
4640 * windows-tdep.c: Likewise.
4641 * mi/mi-main.c: Likewise.
4642
4643 2018-06-07 Tom Tromey <tom@tromey.com>
4644
4645 * valprint.h (build_address_symbolic): Declare.
4646 * printcmd.c (print_address_symbolic): Update.
4647 (build_address_symbolic): Change "name" and "filename" to
4648 std::string.
4649 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
4650 Update.
4651 * defs.h (build_address_symbolic): Remove declaration.
4652
4653 2018-06-07 Alan Hayward <alan.hayward@arm.com>
4654
4655 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
4656 (aarch64_vnv_type): Add function.
4657 (aarch64_pseudo_register_name): Add V regs for SVE.
4658 (aarch64_pseudo_register_type): Likewise.
4659 (aarch64_pseudo_register_reggroup_p): Likewise.
4660 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
4661 (aarch64_pseudo_read_value): Add V regs for SVE.
4662 (aarch64_pseudo_write_2): Use V0 offset for SVE
4663 (aarch64_pseudo_write): Add V regs for SVE.
4664 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
4665
4666 2018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
4667
4668 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
4669 (sve_vl_from_vq): Likewise.
4670
4671 2018-06-05 Tom Tromey <tom@tromey.com>
4672
4673 * cli/cli-cmds.c (show_version): Update.
4674 * top.c (print_gdb_version): Add "interactive" parameter.
4675 Update.
4676 * main.c (captured_main_1): Update.
4677 * top.h (print_gdb_version): Add "interactive" parameter and a
4678 comment.
4679
4680 2018-06-05 David Malcolm <dmalcolm@redhat.com>
4681
4682 * common/enum-flags.h: Add trailing semicolon to example in
4683 comment.
4684
4685 2018-06-05 Tom Tromey <tom@tromey.com>
4686
4687 PR cli/12326:
4688 * NEWS: Add entry about pager.
4689 * utils.c (pagination_disabled_for_command): New global.
4690 (prompt_for_continue): Allow "c" response to prompt.
4691 (reinitialize_more_filter): Clear
4692 pagination_disabled_for_command.
4693 (fputs_maybe_filtered): Check pagination_disabled_for_command.
4694
4695 2018-06-04 Tom Tromey <tom@tromey.com>
4696
4697 * ada-lang.h (ada_lookup_symbol_list): Update.
4698 * ada-lang.c (resolve_subexp): Update.
4699 (symbols_are_identical_enums): Change type of syms. Remove nsyms
4700 parameter.
4701 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
4702 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
4703 results parameter to std::vector.
4704 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
4705 Update.
4706 * ada-exp.y (block_lookup): Update.
4707 (select_possible_type_sym): Change type of syms. Remove nsyms
4708 parameter.
4709 (write_var_or_type, write_name_assoc): Update.
4710
4711 2018-06-04 Joel Brobecker <brobecker@adacore.com>
4712
4713 * windows-nat.c (windows_nat_target::xfer_partial): Return
4714 TARGET_XFER_E_IO if we need to delegate to the target beneath
4715 but BENEATH is NULL.
4716
4717 2018-06-04 Simon Marchi <simon.marchi@ericsson.com>
4718
4719 * Makefile.in (config.status): Add configure.nat as a
4720 dependency.
4721
4722 2018-06-04 Tom Tromey <tom@tromey.com>
4723
4724 * cp-name-parser.y (cpname_state): Add method declarations.
4725 (HANDLE_QUAL): Update.
4726 (cpname_state::d_grab, cpname_state::fill_comp)
4727 (cpname_state::make_operator, cpname_state::make_dtor)
4728 (cpname_state::make_builtin_type, cpname_state::make_name)
4729 (cpname_state::d_qualify, cpname_state::d_int_type)
4730 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
4731 (%union): Move earlier.
4732
4733 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4734
4735 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
4736
4737 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4738
4739 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
4740 (aarch64_pseudo_write_1): Likewise.
4741 (aarch64_pseudo_read_value): Use helper.
4742 (aarch64_pseudo_write): Likewise.
4743
4744 2018-06-04 Pedro Alves <palves@redhat.com>
4745
4746 * darwin-nat.c (darwin_ops): Delete.
4747 (darwin_attach_pid): Use get_native_target.
4748
4749 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4750
4751 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
4752 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
4753
4754 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4755
4756 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
4757 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
4758 (aarch64_gdbarch_init): Check for SVE.
4759 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
4760
4761 2018-06-04 Alan Hayward <alan.hayward@arm.com>
4762
4763 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
4764 * aarch64-tdep.h (aarch64_read_description): Likewise.
4765 * arch/aarch64.c (aarch64_create_target_description): Likewise.
4766 * arch/aarch64.h (aarch64_create_target_description): Likewise.
4767 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
4768 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
4769 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
4770
4771 2018-06-02 Simon Marchi <simon.marchi@ericsson.com>
4772
4773 * value.c (value_fetch_lazy_bitfield): New.
4774 (value_fetch_lazy_memory): New.
4775 (value_fetch_lazy_register): New.
4776 (value_fetch_lazy): Factor out to smaller functions.
4777
4778 2018-06-01 Tom Tromey <tom@tromey.com>
4779
4780 * cp-name-parser.y (backslashable, represented): Now const.
4781
4782 2018-06-01 Tom Tromey <tom@tromey.com>
4783
4784 * cp-name-parser.y: Include parser-defs.h.
4785 (parser_fprintf): Remove declaration.
4786
4787 2018-06-01 Tom Tromey <tom@tromey.com>
4788
4789 * cp-name-parser.y: Use %pure-parser, %lex-param, and
4790 %parse-param.
4791 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
4792 (global_result): Remove globals.
4793 (struct cpname_state): New.
4794 (yyparse): Don't declare.
4795 (yylex, yyerror): Move declarations after %union.
4796 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
4797 (make_name): Add state parameter.
4798 Update all callers.
4799 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
4800 parameter.
4801 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
4802 Update.
4803 (yylex): Add lvalp, state parameters.
4804 (yyerror): Add state parameter.
4805 (cp_demangled_name_to_comp): Update.
4806
4807 2018-06-01 Tom Tromey <tom@tromey.com>
4808
4809 * cp-name-parser.y (parser_fprintf): Declare.
4810 (GDB_YY_REMAP_PREFIX): Define.
4811 Include yy-remap.h. Don't redefine yy* identifiers.
4812
4813 2018-06-01 Tom Tromey <tom@tromey.com>
4814
4815 * python/py-type.c (typy_legacy_template_argument): Update.
4816 * cp-support.h (cp_demangled_name_to_comp): Update.
4817 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
4818 parameter to be a "std::string *".
4819 (main): Update.
4820
4821 2018-06-01 H.J. Lu <hongjiu.lu@intel.com>
4822
4823 * ada-lex.l: Include "diagnostics.h" instead of
4824 "common/diagnostics.h".
4825 * unittests/environ-selftests.c: Likewise.
4826 * common/diagnostics.h: Moved to ../include.
4827
4828 2018-06-01 Joel Brobecker <brobecker@adacore.com>
4829
4830 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
4831 to language_mode_manual while calling breakpoint_re_set_one.
4832
4833 2018-06-01 Tom Tromey <tom@tromey.com>
4834
4835 * valops.c (value_cast_structs, destructor_name_p): Update.
4836 * symtab.c (gdb_mangle_name): Update.
4837 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
4838 Update.
4839 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
4840 (pascal_object_print_value_fields, pascal_object_print_value):
4841 Update.
4842 * p-typeprint.c (pascal_type_print_derivation_info): Update.
4843 * linespec.c (find_methods): Update.
4844 * gdbtypes.h (type_name_no_tag): Remove.
4845 (type_name_or_error): Rename from type_name_no_tag_or_error.
4846 * gdbtypes.c (type_name_no_tag): Remove.
4847 (type_name_or_error): Rename from type_name_no_tag_or_error.
4848 (lookup_struct_elt_type, check_typedef): Update.
4849 * expprint.c (print_subexp_standard): Update.
4850 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
4851 * d-namespace.c (d_lookup_nested_symbol): Update.
4852 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
4853 (cp_print_class_member): Update.
4854 * cp-namespace.c (cp_lookup_nested_symbol): Update.
4855 * completer.c (add_struct_fields): Update.
4856 * c-typeprint.c (cp_type_print_derivation_info)
4857 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
4858 Update.
4859 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
4860 (ada_prefer_type, ada_is_exception_sym): Update.
4861
4862 2018-06-01 Tom Tromey <tom@tromey.com>
4863
4864 * valops.c (enum_constant_from_type, value_namespace_elt)
4865 (value_maybe_namespace_elt): Update.
4866 * valarith.c (find_size_for_pointer_math): Update.
4867 * target-descriptions.c (make_gdb_type): Update.
4868 * symmisc.c (print_symbol): Update.
4869 * stabsread.c (define_symbol, read_type)
4870 (complain_about_struct_wipeout, add_undefined_type)
4871 (cleanup_undefined_types_1): Update.
4872 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
4873 (rust_range_type_p, val_print_struct, rust_print_struct_def)
4874 (rust_internal_print_type, rust_composite_type)
4875 (rust_evaluate_funcall, rust_evaluate_subexp)
4876 (rust_inclusive_range_type_p): Update.
4877 * python/py-type.c (typy_get_tag): Update.
4878 * p-typeprint.c (pascal_type_print_base): Update.
4879 * mdebugread.c (parse_symbol, parse_type): Update.
4880 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
4881 Update.
4882 * guile/scm-type.c (gdbscm_type_tag): Update.
4883 * go-lang.c (sixg_string_p): Update.
4884 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
4885 Update.
4886 * gdbtypes.h (struct main_type) <tag_name>: Remove.
4887 (TYPE_TAG_NAME): Remove.
4888 * gdbtypes.c (type_name_no_tag): Simplify.
4889 (check_typedef, check_types_equal, recursive_dump_type)
4890 (copy_type_recursive, arch_composite_type): Update.
4891 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
4892 in summary mode when needed.
4893 * eval.c (evaluate_funcall): Update.
4894 * dwarf2read.c (fixup_go_packaging, read_structure_type)
4895 (process_structure_scope, read_enumeration_type)
4896 (read_namespace_type, read_module_type, determine_prefix): Update.
4897 * cp-support.c (inspect_type): Update.
4898 * coffread.c (process_coff_symbol, decode_base_type): Update.
4899 * c-varobj.c (c_is_path_expr_parent): Update.
4900 * c-typeprint.c (c_type_print_base_struct_union): Update.
4901 (c_type_print_base_1): Update. Print struct/class/union/enum in
4902 summary when using C language.
4903 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
4904 (gen_maybe_namespace_elt): Update.
4905 * ada-lang.c (ada_type_name): Simplify.
4906 (empty_record, ada_template_to_fixed_record_type_1)
4907 (template_to_static_fixed_type)
4908 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
4909
4910 2018-06-01 Tom Tromey <tom@tromey.com>
4911
4912 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
4913 c_print_type.
4914 * c-typeprint.c (c_print_type_1): Add "language" parameter.
4915 (c_print_type): Update.
4916 (c_print_type): New overload.
4917 (c_type_print_varspec_prefix, c_type_print_args)
4918 (c_type_print_varspec_suffix, c_print_type_no_offsets)
4919 (c_type_print_base_struct_union, c_type_print_base_1)
4920 (cp_type_print_method_args): Add "language" parameter.
4921 (c_type_print_base): Update.
4922 * c-lang.h (c_print_type): Add new overload.
4923
4924 2018-06-01 Tom Tromey <tom@tromey.com>
4925
4926 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
4927 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
4928
4929 2018-06-01 Alan Hayward <alan.hayward@arm.com>
4930
4931 * aarch64-tdep.c (aarch64_sve_register_names): New const
4932 var.
4933 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
4934 (AARCH64_SVE_Z_REGS_NUM): New define.
4935 (AARCH64_SVE_P_REGS_NUM): Likewise.
4936 (AARCH64_SVE_NUM_REGS): Likewise.
4937
4938 2018-05-31 Uros Bizjak <ubizjak@gmail.com>
4939
4940 * nat/linux-ptrace.h [__alpha__]
4941 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
4942 definitions.
4943
4944 2018-05-31 Maciej W. Rozycki <macro@mips.com>
4945
4946 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
4947 the endianness selected.
4948 * NEWS: Document `set endian auto' mode operation update.
4949
4950 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4951
4952 * Makefile.in: Add new header.
4953 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
4954 (sve_vl_from_vg): Likewise.
4955 (sve_vq_from_vl): Likewise.
4956 (sve_vl_from_vq): Likewise.
4957 (sve_vq_from_vg): Likewise.
4958 (sve_vg_from_vq): Likewise.
4959 * configure.nat: Add new c file.
4960 * nat/aarch64-sve-linux-ptrace.c: New file.
4961 * nat/aarch64-sve-linux-ptrace.h: New file.
4962
4963 2018-05-31 Alan Hayward <alan.hayward@arm.com>
4964
4965 * aarch64-linux-nat.c (aarch64_linux_read_description):
4966 Add parmeter zero.
4967 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
4968 Likewise.
4969 * aarch64-tdep.c (tdesc_aarch64_list): Add.
4970 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
4971 (aarch64_gdbarch_init): Add parmeter zero.
4972 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
4973 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
4974 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
4975 parmeter.
4976 * doc/gdb.texinfo: Describe SVE feature
4977 * features/aarch64-sve.c: New file.
4978
4979 2018-05-31 Omair Javaid <omair.javaid@linaro.org>
4980
4981 PR gdb/23210
4982 * gdbarch.sh (significant_addr_bit): Default to zero when
4983 not set by target architecture.
4984 * gdbarch.c: Re-generated.
4985 * utils.c (address_significant): Update.
4986
4987 2018-05-30 Joel Brobecker <brobecker@adacore.com>
4988
4989 * stack.c (func_command): Remove trailing newline in call to error.
4990
4991 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4992
4993 * regcache.h (regcache_raw_collect): Remove, update callers to
4994 use regcache::raw_collect.
4995 * regcache.c (regcache_raw_collect): Remove.
4996
4997 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
4998
4999 * regcache.h (regcache_raw_supply): Remove, update callers to
5000 use detached_regcache::raw_supply.
5001 * regcache.c (regcache_raw_supply): Remove.
5002
5003 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5004
5005 * regcache.h (regcache_cooked_write_part): Remove, update
5006 callers to use regcache::cooked_write_part.
5007 * regcache.c (regcache_cooked_write_part): Remove.
5008
5009 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5010
5011 * regcache.h (regcache_cooked_read_part): Remove, update callers
5012 to use readable_regcache::cooked_read_part.
5013 * regcache.c (regcache_cooked_read_part): Remove.
5014
5015 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5016
5017 * regcache.h (regcache_cooked_read_value): Remove, update
5018 callers to use readable_regcache::cooked_read_value.
5019 * regcache.c (regcache_cooked_read_value): Remove.
5020
5021 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5022
5023 * regcache.h (regcache_cooked_write): Remove, update callers to
5024 use regcache::cooked_write.
5025 * regcache.c (regcache_cooked_write): Remove.
5026
5027 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5028
5029 * regcache.h (regcache_invalidate): Remove, update callers to
5030 use detached_regcache::invalidate instead.
5031 * regcache.c (regcache_invalidate): Remove.
5032
5033 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5034
5035 * regcache.h (regcache_raw_write_part): Remove, update callers
5036 to use regcache::raw_write_part instead.
5037 * regcache.c (regcache_raw_write_part): Remove.
5038
5039 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5040
5041 * regcache.h (regcache_raw_read_part): Remove, update callers to
5042 use readable_regcache::raw_read_part instead.
5043 * regcache.c (regcache_raw_read_part): Remove.
5044
5045 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5046
5047 * regcache.h (regcache_cooked_read): Remove, update callers to
5048 use readable_regcache::cooked_read instead.
5049 * regcache.c (regcache_cooked_read): Remove.
5050
5051 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5052
5053 * regcache.h (regcache_raw_write): Remove, update callers to use
5054 regcache::raw_write instead.
5055 * regcache.c (regcache_raw_write): Remove.
5056
5057 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5058
5059 * regcache.h (regcache_raw_read): Remove, update callers to use
5060 readable_regcache::raw_read instead.
5061 * regcache.c (regcache_raw_read): Remove.
5062
5063 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5064
5065 * regcache.h (regcache_raw_update): Remove, update callers to
5066 use readable_regcache::raw_update instead.
5067 * regcache.c (regcache_raw_update): Remove.
5068
5069 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5070
5071 * regcache.h (regcache_register_status): Remove, update callers
5072 to use reg_buffer::get_register_status directly instead.
5073 * regcache.c (regcache_register_status): Remove.
5074
5075 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5076
5077 * regcache.h (regcache_get_ptid): Remove, update all callers to
5078 call regcache::ptid instead.
5079 * regcache.c (regcache_get_ptid): Remove.
5080
5081 2018-05-30 Simon Marchi <simon.marchi@ericsson.com>
5082
5083 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
5084
5085 2018-05-30 Pedro Alves <palves@redhat.com>
5086
5087 * common/common-exceptions.h (exception_rethrow): Use
5088 ATTRIBUTE_NORETURN.
5089
5090 2018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
5091
5092 * breakpoint.c (print_solib_event, check_status_catch_solib):
5093 Remove struct keyword in range-based for loops.
5094 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
5095 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
5096 Likewise.
5097 * linespec.c (find_superclass_methods, search_minsyms_for_name):
5098 Likewise.
5099 * symfile.c (addr_info_make_relative): Likewise.
5100 * thread.c (value_in_thread_stack_temporaries): Likewise.
5101
5102 2018-06-12 Weimin Pan <weimin.pan@oracle.com>
5103
5104 PR gdb/16841
5105 * valops.c (value_struct_elt_for_reference): Call check_typedef on
5106 aggregate type to get its real type before accessing it.
5107
5108 2018-05-29 Weimin Pan <weimin.pan@oracle.com>
5109
5110 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
5111 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
5112 * coff-pe-read.c (add_pe_forwarded_sym): Replace
5113 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
5114 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
5115 * jit.c (jit_breakpoint_re_set_internal): Likewise.
5116 * printcmd.c (info_address_command): Likewise.
5117
5118 2018-05-29 Tom Tromey <tom@tromey.com>
5119
5120 * windows-nat.c (handle_exception): Update fall-through comment.
5121
5122 2018-05-29 Tom Tromey <tom@tromey.com>
5123
5124 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
5125 (struct program_space) <added_solibs>: Now a std::vector.
5126 * breakpoint.c (print_solib_event): Update.
5127 (check_status_catch_solib): Update.
5128 * progspace.c (clear_program_space_solib_cache): Update.
5129 * solib.c (update_solib_list): Update.
5130
5131 2018-05-29 Tom Tromey <tom@tromey.com>
5132
5133 * python/py-type.c (typy_richcompare): Update.
5134 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
5135 * gdbtypes.h (types_deeply_equal): Return bool.
5136 (types_equal): Likewise.
5137 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
5138 declare VEC.
5139 (check_types_equal): Change worklist to std::vector. Return
5140 bool.
5141 (struct type_equality_entry): Add constructor.
5142 (compare_maybe_null_strings): Return bool.
5143 (check_types_worklist): Return bool. Change worklist to
5144 std::vector.
5145 (types_deeply_equal): Use std::vector.
5146 (types_equal): Return bool.
5147 (compare_maybe_null_strings): Simplify.
5148
5149 2018-05-29 Tom Tromey <tom@tromey.com>
5150
5151 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
5152
5153 2018-05-29 Tom Tromey <tom@tromey.com>
5154
5155 * objc-lang.h: Don't include cp-support.h.
5156 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
5157 declare VEC.
5158
5159 2018-05-27 Tom Tromey <tom@tromey.com>
5160
5161 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
5162
5163 2018-05-25 Tom Tromey <tom@tromey.com>
5164
5165 * value.c (value::location): Initialize.
5166
5167 2018-05-25 Tom Tromey <tom@tromey.com>
5168
5169 * dbxread.c (init_bincl_list): Remove.
5170 (bincl_list): Now a std::vector.
5171 (bincls_allocated, next_bincl): Remove.
5172 (free_bincl_list, do_free_bincl_list_cleanup)
5173 (make_cleanup_free_bincl_list): Remove.
5174 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
5175 unique_xmalloc_ptr.
5176 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
5177 (struct header_file_location): Add constructor.
5178 (add_bincl_to_list): Remove.
5179
5180 2018-05-25 Tom Tromey <tom@tromey.com>
5181
5182 * tui/tui.c (tui_enable): Update.
5183 * mi/mi-interp.c (mi_interp::init): Update.
5184 * interps.h (class interp) <name>: New method.
5185 <m_name>: Rename from name.
5186 (~scoped_restore_interp): Update.
5187 * interps.c (interp::interp): Update.
5188 (interp_add, interp_set, interp_lookup_existing)
5189 (current_interp_named_p): Update.
5190
5191 2018-05-25 Tom Tromey <tom@tromey.com>
5192
5193 * interps.c (interp_name): Remove.
5194 * mi/mi-interp.c (mi_interp::init): Update.
5195 * interps.h (interp_name): Remove.
5196 (~scoped_restore_interp): Update.
5197 * tui/tui.c (tui_enable): Update.
5198
5199 2018-05-25 Tom Tromey <tom@tromey.com>
5200
5201 * utils.c (fputs_maybe_filtered): Update.
5202 * linespec.c (decode_line_full): Update.
5203 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
5204 (mi_print_breakpoint_for_event, mi_solib_loaded)
5205 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
5206 (mi_user_selected_context_changed): Update.
5207 * mi/mi-main.c (mi_execute_command): Update.
5208 * cli/cli-script.c (execute_control_command): Update.
5209 * python/python.c (execute_gdb_command): Update.
5210 * solib.c (info_sharedlibrary_command): Update.
5211 * interps.c (interp_ui_out): Remove.
5212 * interps.h (interp_ui_out): Remove.
5213
5214 2018-05-25 Tom Tromey <tom@tromey.com>
5215
5216 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
5217 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
5218 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
5219
5220 2018-05-25 Tom Tromey <tom@tromey.com>
5221
5222 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
5223 * interps.c (interp_exec): Use scoped_restore.
5224
5225 2018-05-25 Tom Tromey <tom@tromey.com>
5226
5227 * remote.c (remote_target::remote_file_get): Use
5228 gdb::byte_vector.
5229 (remote_target::remote_file_put): Likewise.
5230
5231 2018-05-25 Tom Tromey <tom@tromey.com>
5232
5233 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
5234 a std::string.
5235 (get_pe_section_index, add_pe_exported_sym): Update.
5236 (read_pe_exported_syms): Use gdb::def_vector.
5237
5238 2018-05-25 Tom Tromey <tom@tromey.com>
5239
5240 * frame.c (remove_prev_frame): Remove.
5241 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
5242
5243 2018-05-25 Maciej W. Rozycki <macro@mips.com>
5244
5245 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
5246 Remove prototypes.
5247 * mips-linux-nat.c (supply_fpregset): Always call
5248 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
5249 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
5250 `mips_fill_fpregset'.
5251 * mips-linux-tdep.c (mips_supply_fpregset)
5252 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
5253 (mips_fill_fpregset_wrapper): Remove functions.
5254 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
5255 (mips_linux_fpregset): Remove variable.
5256 (mips_linux_iterate_over_regset_sections): Use
5257 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
5258 (mips_linux_o32_sigframe_init): Remove comment.
5259
5260 2018-05-25 Pedro Alves <palves@redhat.com>
5261
5262 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
5263 (struct readahead_cache, struct packet_reg, struct
5264 remote_arch_state, class remote_state): Move higher up in the
5265 file.
5266 (remote_target::m_remote_state): Now an object instead of a pointer.
5267 (remote_target::get_remote_state): Adjust.
5268
5269 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5270
5271 * stack.c (select_and_print_frame): Delete.
5272 (struct function_bounds): Move struct within function.
5273 (func_command): Most content moved into new function
5274 find_frame_for_function, use new function, print result, add
5275 function comment.
5276 (find_frame_for_function): New function, now returns a result.
5277
5278 2018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5279
5280 * stack.c (iterate_over_block_arg_vars): Fix comment.
5281 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
5282
5283 2018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
5284
5285 PR gdb/23203
5286 * frame.c
5287 (scoped_restore_selected_frame::scoped_restore_selected_frame):
5288 Define.
5289 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
5290 Define.
5291 * frame.h (class scoped_restore_selected_frame): New class.
5292 * stack.c (print_frame_local_vars): Remove catching and rethrowing
5293 of any exception, use scoped_restore_selected_frame to restore the
5294 frame instead.
5295
5296 2018-05-24 Pedro Alves <palves@redhat.com>
5297
5298 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
5299 override.
5300
5301 2018-05-23 Tom Tromey <tom@tromey.com>
5302
5303 * complaints.c (struct complaints): Remove.
5304 (symfile_complaint_book): Remove.
5305 (series): New global.
5306 (complaint_internal): Update.
5307 (clear_complaints): Update.
5308
5309 2018-05-23 Tom Tromey <tom@tromey.com>
5310
5311 * complaints.c (counters): New global.
5312 (struct complain): Remove.
5313 (struct complaints) <root>: Remove.
5314 (complaint_sentinel): Remove.
5315 (symfile_complaint_book): Update.
5316 (find_complaint) Remove.
5317 (complaint_internal, clear_complaints): Update.
5318
5319 2018-05-23 Tom Tromey <tom@tromey.com>
5320
5321 * complaints.c (struct complain) <file, line>: Remove.
5322 (find_complaint): Remove file, line parameters.
5323 (complaint_internal): Update.
5324
5325 2018-05-23 Tom Tromey <tom@tromey.com>
5326
5327 * complaints.c (vcomplaint): Remove.
5328 (complaint_internal) Merge in contents of vcomplaint.
5329
5330 2018-05-23 Tom Tromey <tom@tromey.com>
5331
5332 * complaints.c (struct complaints) <explanation>: Remove.
5333 (symfile_explanations): Remove.
5334 (symfile_complaint_book): Update.
5335 (vcomplaint): Update.
5336 (struct explanation): Remove.
5337
5338 2018-05-23 Tom Tromey <tom@tromey.com>
5339
5340 * complaints.c (symfile_complaints): Remove.
5341 (complaint_internal): Remove "complaints" parameter.
5342 (clear_complaints, vcomplaint): Remove "c" parameter.
5343 (get_complaints): Remove.
5344 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
5345 (dwarf2_debug_line_missing_file_complaint)
5346 (dwarf2_debug_line_missing_end_sequence_complaint)
5347 (dwarf2_complex_location_expr_complaint)
5348 (dwarf2_const_value_length_mismatch_complaint)
5349 (dwarf2_section_buffer_overflow_complaint)
5350 (dwarf2_macro_malformed_definition_complaint)
5351 (dwarf2_invalid_attrib_class_complaint)
5352 (create_addrmap_from_index, dw2_symtab_iter_next)
5353 (dw2_expand_marked_cus)
5354 (dw2_debug_names_iterator::find_vec_in_debug_names)
5355 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
5356 (create_debug_type_hash_table, init_cutu_and_read_dies)
5357 (partial_die_parent_scope, add_partial_enumeration)
5358 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
5359 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
5360 (read_import_statement, read_file_scope, create_dwo_cu_reader)
5361 (create_cus_hash_table, create_dwp_hash_table)
5362 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
5363 (dwarf2_rnglists_process, dwarf2_ranges_process)
5364 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
5365 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
5366 (handle_struct_member_die, process_structure_scope)
5367 (read_array_type, read_common_block, read_module_type)
5368 (read_tag_pointer_type, read_typedef, read_base_type)
5369 (read_subrange_type, load_partial_dies, partial_die_info::read)
5370 (partial_die_info::read, partial_die_info::read)
5371 (partial_die_info::read, read_checked_initial_length_and_offset)
5372 (dwarf2_string_attr, read_formatted_entries)
5373 (dwarf_decode_line_header)
5374 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
5375 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
5376 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
5377 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
5378 (get_signatured_type, get_DW_AT_signature_type)
5379 (decode_locdesc, file_file_name, consume_improper_spaces)
5380 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
5381 (dwarf_decode_macro_bytes, dwarf_decode_macros)
5382 (dwarf2_symbol_mark_computed, set_die_type)
5383 (read_attribute_value): Update.
5384 * stap-probe.c (handle_stap_probe, get_stap_base_address):
5385 Update.
5386 * dbxread.c (unknown_symtype_complaint)
5387 (lbrac_mismatch_complaint, repeated_header_complaint)
5388 (set_namestring, function_outside_compilation_unit_complaint)
5389 (read_dbx_symtab, process_one_symbol): Update.
5390 * gdbtypes.c (stub_noname_complaint): Update.
5391 * windows-nat.c (handle_unload_dll): Update.
5392 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
5393 (decode_base_type): Update.
5394 * xcoffread.c (bf_notfound_complaint, ef_complaint)
5395 (eb_complaint, record_include_begin, record_include_end)
5396 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
5397 (process_xcoff_symbol, read_symbol)
5398 (function_outside_compilation_unit_complaint)
5399 (scan_xcoff_symtab): Update.
5400 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
5401 * buildsym.c (finish_block_internal, make_blockvector)
5402 (end_symtab_get_static_block, augment_type_symtab): Update.
5403 * dtrace-probe.c (dtrace_process_dof)
5404 (dtrace_static_probe_ops::get_probes): Update.
5405 * complaints.h (struct complaint): Don't declare.
5406 (symfile_complaints): Remove.
5407 (complaint_internal): Remove "complaints" parameter.
5408 (complaint): Likewise.
5409 (clear_complaints): Likewise.
5410 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5411 (reread_symbols): Update.
5412 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
5413 (dwarf2_frame_cache, decode_frame_entry): Update.
5414 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
5415 * objc-lang.c (lookup_objc_class, lookup_child_selector)
5416 (info_selectors_command): Update.
5417 * macrotab.c (macro_include, check_for_redefinition)
5418 (macro_undef): Update.
5419 * objfiles.c (filter_overlapping_sections): Update.
5420 * stabsread.c (invalid_cpp_abbrev_complaint)
5421 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
5422 (define_symbol, error_type, read_type, rs6000_builtin_type)
5423 (stabs_method_name_from_physname, read_member_functions)
5424 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
5425 (attach_fields_to_type, complain_about_struct_wipeout)
5426 (read_range_type, read_args, common_block_start)
5427 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
5428 Update.
5429 * mdebugread.c (index_complaint, unknown_ext_complaint)
5430 (basic_type_complaint, bad_tag_guess_complaint)
5431 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
5432 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
5433 (parse_procedure, parse_lines)
5434 (function_outside_compilation_unit_complaint)
5435 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
5436 (bad_tag_guess_complaint, reg_value_complaint): Update.
5437 * cp-support.c (demangled_name_complaint): Update.
5438 * macroscope.c (sal_macro_scope): Update.
5439 * dwarf-index-write.c (class debug_names): Update.
5440
5441 2018-05-23 Tom Tromey <tom@tromey.com>
5442
5443 * complaints.c (clear_complaints): Remove "noisy" parameter.
5444 * complaints.h (clear_complaints): Update.
5445 * symfile.c (syms_from_objfile_1, finish_new_objfile)
5446 (reread_symbols): Update.
5447
5448 2018-05-23 Tom Tromey <tom@tromey.com>
5449
5450 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
5451 SUBSEQUENT_MESSAGE.
5452 (vcomplaint, clear_complaints): Update.
5453 (symfile_explanations): Remove some messages.
5454
5455 2018-05-23 Tom Tromey <tom@tromey.com>
5456
5457 * complaints.c (internal_complaint): Remove.
5458 * complaints.h (internal_complaint): Remove.
5459
5460 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5461
5462 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
5463
5464 2018-05-22 Pedro Alves <palves@redhat.com>
5465
5466 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
5467 (remote_fileio_badfd, remote_fileio_return_errno)
5468 (remote_fileio_return_success, remote_fileio_func_open)
5469 (remote_fileio_func_open, remote_fileio_func_close)
5470 (remote_fileio_func_read, remote_fileio_func_write)
5471 (remote_fileio_func_lseek, remote_fileio_func_rename)
5472 (remote_fileio_func_unlink, remote_fileio_func_stat)
5473 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
5474 (remote_fileio_func_isatty, remote_fileio_func_system): Add
5475 remote_target parameter.
5476 (remote_fio_func_map) <func>: Add remote_target parameter.
5477 (do_remote_fileio_request, remote_fileio_request):
5478 * remote-fileio.h (remote_fileio_request):
5479 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
5480 remote_target parameter.
5481 (remote_notif_process, handle_notification): Adjust to pass down
5482 the remote.
5483 (remote_notif_state_allocate): Add remote_target parameter. Save
5484 it.
5485 * remote-notif.h (struct remote_target): Forward declare.
5486 (struct notif_client) <parse, ack, can_get_pending_events>: Add
5487 remote_target parameter.
5488 (struct remote_notif_state) <remote>: New field.
5489 (remote_notif_ack, remote_notif_parse): Add remote_target
5490 parameter.
5491 (remote_notif_state_allocate, remote_notif_state_allocate): Add
5492 remote_target parameter.
5493 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
5494 (threads_listing_context, rmt_thread_action, protocol_feature)
5495 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
5496 (packet_result, struct threads_listing_context, remote_state):
5497 Move definitions and declarations higher up.
5498 (remote_target) <~remote_target>: Declare.
5499 (remote_download_command_source, remote_file_put, remote_file_get)
5500 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
5501 (remote_hostio_pread_vFile, remote_hostio_send_command)
5502 (remote_hostio_set_filesystem, remote_hostio_open)
5503 (remote_hostio_close, remote_hostio_unlink, remote_state)
5504 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
5505 (get_memory_write_packet_size, get_memory_read_packet_size)
5506 (append_pending_thread_resumptions, remote_detach_1)
5507 (append_resumption, remote_resume_with_vcont)
5508 (add_current_inferior_and_thread, wait_ns, wait_as)
5509 (process_stop_reply, remote_notice_new_inferior)
5510 (process_initial_stop_replies, remote_add_thread)
5511 (btrace_sync_conf, remote_btrace_maybe_reopen)
5512 (remove_new_fork_children, kill_new_fork_children)
5513 (discard_pending_stop_replies, stop_reply_queue_length)
5514 (check_pending_events_prevent_wildcard_vcont)
5515 (discard_pending_stop_replies_in_queue, stop_reply)
5516 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
5517 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
5518 (remote_interrupt_as, remote_interrupt_ns)
5519 (remote_get_noisy_reply, remote_query_attached)
5520 (remote_add_inferior, remote_current_thread, get_current_thread)
5521 (set_thread, set_general_thread, set_continue_thread)
5522 (set_general_process, write_ptid)
5523 (remote_unpack_thread_info_response, remote_get_threadinfo)
5524 (parse_threadlist_response, remote_get_threadlist)
5525 (remote_threadlist_iterator, remote_get_threads_with_ql)
5526 (remote_get_threads_with_qxfer)
5527 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
5528 (get_offsets, remote_check_symbols, remote_supported_packet)
5529 (remote_query_supported, remote_packet_size)
5530 (remote_serial_quit_handler, remote_detach_pid)
5531 (remote_vcont_probe, remote_resume_with_hc)
5532 (send_interrupt_sequence, interrupt_query)
5533 (remote_notif_get_pending_events, fetch_register_using_p)
5534 (send_g_packet, process_g_packet, fetch_registers_using_g)
5535 (store_register_using_P, store_registers_using_G)
5536 (set_remote_traceframe, check_binary_download)
5537 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
5538 (remote_xfer_live_readonly_partial, remote_read_bytes)
5539 (remote_send_printf, remote_flash_write, readchar)
5540 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
5541 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
5542 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
5543 (extended_remote_disable_randomization, extended_remote_run)
5544 (send_environment_packet, extended_remote_environment_support)
5545 (extended_remote_set_inferior_cwd, remote_write_qxfer)
5546 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
5547 (packet_command): Now methods of ...
5548 (remote_target): ... this class.
5549 (m_remote_state) <remote_target>: New field.
5550 (struct remote_state) <stop_reply_queue,
5551 remote_async_inferior_event_token, wait_forever_enabled_p>: New
5552 fields.
5553 (remote_state::remote_state): Allocate stop_reply_queue.
5554 (remote_state): Delete global.
5555 (get_remote_state_raw): Delete.
5556 (remote_target::get_remote_state): Allocate m_remote_state on
5557 demand.
5558 (get_current_remote_target): New.
5559 (remote_ops, extended_remote_ops): Delete.
5560 (wait_forever_enabled_p, remote_async_inferior_event_token):
5561 Delete, moved to struct remote_state.
5562 (remote_target::close): Delete self. Destruction bits split to
5563 ...
5564 (remote_target::~remote_target): ... this.
5565 (show_memory_packet_size): Adjust to use
5566 get_current_remote_target.
5567 (struct protocol_feature) <func>: Add remote_target parameter.
5568 All callers adjusted.
5569 (curr_quit_handler_target): New.
5570 (remote_serial_quit_handler): Reimplement.
5571 (remote_target::open_1): Adjust to use get_current_remote_target.
5572 Heap-allocate remote_target/extended_remote_target instances.
5573 (vcont_builder::vcont_builder): Add remote_target parameter, and
5574 save it in m_remote. All callers adjusted.
5575 (vcont_builder::m_remote): New field.
5576 (vcont_builder::restart, vcont_builder::flush)
5577 (vcont_builder::push_action): Use it.
5578 (remote_target::commit_resume): Use it.
5579 (struct queue_iter_param) <remote>: New field.
5580 (remote_target::remove_new_fork_children): Fill in 'remote' field.
5581 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
5582 (check_pending_event_prevents_wildcard_vcont_callback)
5583 (remote_target::check_pending_events_prevent_wildcard_vcont)
5584 (remote_target::discard_pending_stop_replies)
5585 (remote_target::discard_pending_stop_replies_in_queue)
5586 (remote_target::remote_notif_remove_queued_reply): Fill in
5587 'remote' field.
5588 (remote_notif_get_pending_events): New.
5589 (remote_target::readchar, remote_target::remote_serial_write):
5590 Save/restore curr_quit_handler_target.
5591 (putpkt): New.
5592 (kill_new_fork_children): Fill in 'remote' field.
5593 (packet_command): Use get_current_remote_target, defer to
5594 remote_target method of same name.
5595 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
5596 parameter, and save it in m_remote. All callers adjusted.
5597 (scoped_remote_fd::release): Use m_remote.
5598 (scoped_remote_fd::m_remote): New field.
5599 (remote_file_put, remote_file_get, remote_file_delete): Use
5600 get_current_remote_target, defer to remote_target method of same
5601 name.
5602 (remote_btrace_reset): Add remote_state paremeter. Update all
5603 callers.
5604 (remote_async_inferior_event_handler). Pass down 'data'.
5605 (remote_new_objfile): Use get_current_remote_target.
5606 (remote_target::vcont_r_supported): New.
5607 (set_range_stepping): Use get_current_remote_target and
5608 remote_target::vcont_r_supported.
5609 (_initialize_remote): Don't allocate 'remote_state' and
5610 'stop_reply_queue' globals.
5611 * remote.h (struct remote_target): Forward declare.
5612 (getpkt, putpkt, remote_notif_get_pending_events): Add
5613 'remote_target' parameter.
5614
5615 2018-05-22 Pedro Alves <palves@redhat.com>
5616
5617 * remote.c (vcont_builder): Now a class. Make all data members
5618 private.
5619 (vcont_builder) <vcont_builder, restart, flush, push_action>:
5620 Declare methods.
5621 (vcont_builder_restart): Rename to ...
5622 (vcont_builder::restart): ... this.
5623 (vcont_builder_flush): Rename to ...
5624 (vcont_builder::flush): ... this.
5625 (vcont_builder_push_action): Rename to ...
5626 (vcont_builder::push_action): ... this.
5627 (remote_target::commit_resume): Adjust.
5628
5629 2018-05-22 Pedro Alves <palves@redhat.com>
5630
5631 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
5632 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
5633 (get_fixed_memory_packet_size): New.
5634 (get_memory_packet_size): Use it.
5635 (set_memory_packet_size): Don't override the config size with
5636 DEFAULT_MAX_MEMORY_PACKET_SIZE.
5637 (show_memory_packet_size): Use get_fixed_memory_packet_size.
5638 Don't refer to get_memory_packet_size if not connected to a remote
5639 target. Show "(default)" if configured size is 0.
5640
5641 2018-05-22 Pedro Alves <palves@redhat.com>
5642
5643 * remote.c (remote_target::mourn_inferior): Move
5644 discard_pending_stop_replies call here from ...
5645 (_initialize_remote): ... here.
5646
5647 2018-05-22 Pedro Alves <palves@redhat.com>
5648
5649 * remote.c (compare_section_command): Remove set_general_process
5650 call.
5651
5652 2018-05-22 Pedro Alves <palves@redhat.com>
5653
5654 * remote.c (struct packet_reg, struct remote_arch_state):
5655 Move higher up in the file.
5656 (remote_state) <m_arch_states>: Store remote_arch_state values
5657 instead of remote_arch_state pointers.
5658 (remote_state::get_remote_arch_state): Adjust.
5659
5660 2018-05-22 Pedro Alves <palves@redhat.com>
5661
5662 * remote.c: Include <unordered_map>.
5663 (remote_state): Now a class.
5664 (remote_state) <get_remote_arch_state>: Declare method.
5665 <get_remote_arch_state>: New field.
5666 (remote_arch_state) <remote_arch_state>: Declare ctor.
5667 <regs>: Now a unique_ptr.
5668 (remote_gdbarch_data_handle): Delete.
5669 (get_remote_arch_state): Delete.
5670 (remote_state::get_remote_arch_state): New.
5671 (get_remote_state): Adjust to call remote_state's
5672 get_remote_arch_state method.
5673 (init_remote_state): Delete, bits factored out to ...
5674 (remote_arch_state::remote_arch_state): ... this new method.
5675 (get_remote_packet_size, get_memory_packet_size)
5676 (process_g_packet, remote_target::fetch_registers)
5677 (remote_target::prepare_to_store, store_registers_using_G)
5678 (remote_target::store_registers, remote_target::get_trace_status):
5679 Adjust to call remote_state's method.
5680 (_initialize_remote): Remove reference to
5681 remote_gdbarch_data_handle.
5682
5683 2018-05-22 Pedro Alves <palves@redhat.com>
5684
5685 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
5686 pread>: New method declarations.
5687 (remote_target::open_1): Adjust.
5688 (readahead_cache_invalidate): Rename to ...
5689 (readahead_cache::invalidate): ... this, and adjust to be a class
5690 method.
5691 (readahead_cache_invalidate_fd): Rename to ...
5692 (readahead_cache::invalidate_fd): ... this, and adjust to be a
5693 class method.
5694 (remote_hostio_pwrite): Adjust.
5695 (remote_hostio_pread_from_cache): Rename to ...
5696 (readahead_cache::pread): ... this, and adjust to be a class
5697 method.
5698 (remote_hostio_close): Adjust.
5699
5700 2018-05-22 Pedro Alves <palves@redhat.com>
5701
5702 * remote.c (remote_hostio_close_cleanup): Delete.
5703 (class scoped_remote_fd): New.
5704 (remote_file_put, remote_file_get): Use it.
5705
5706 2018-05-22 Pedro Alves <palves@redhat.com>
5707
5708 (struct vCont_action_support): Use bool and initialize all fields.
5709 (struct readahead_cache): Initialize all fields.
5710 (remote_state): Use bool and initialize all fields.
5711 (remote_state::remote_state, remote_state::~remote_state): New.
5712 (new_remote_state): Delete.
5713 (_initialize_remote): Use new to allocate remote_state.
5714
5715 2018-05-22 Pedro Alves <palves@redhat.com>
5716 張俊芝 <zjz@zjz.name>
5717
5718 PR gdb/22973
5719 * c-exp.y: Include "c-support.h".
5720 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
5721 of tolower. Use c_ident_is_alpha to scan names.
5722 * c-lang.c: Include "c-support.h".
5723 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
5724 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
5725 * c-support.h: New file, with bits factored out from ...
5726 * cp-name-parser.y: ... this file.
5727 Include "c-support.h".
5728 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
5729 c-support.h and renamed.
5730 (symbol_end, yylex): Adjust.
5731
5732 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5733
5734 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
5735 parameter type to CORE_ADDR.
5736 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
5737 parameter type in declaration to CORE_ADDR.
5738 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
5739 target_auxv_search to get AT_HWCAP and use the result to get the
5740 target description.
5741 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
5742 to CORE_ADDR. Remove the cast of the return value to unsigned
5743 long. Fix error predicate of target_auxv_search.
5744 (ppc_linux_nat_target::read_description): Change the type of the
5745 hwcap variable to CORE_ADDR.
5746
5747 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5748
5749 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
5750 if the size of fpscr is larger than 32 bits.
5751
5752 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5753
5754 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
5755 (ppc32_linux_vsxregmap): New global.
5756 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
5757 regcache_supply_regset, and regcache_collect_regset.
5758 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
5759 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
5760 (fetch_vsx_register, store_vsx_register): Remove.
5761 (fetch_vsx_registers): Add regno parameter. Get regset using
5762 ppc_linux_vsxregset. Use regset to supply registers.
5763 (store_vsx_registers): Add regno parameter. Get regset using
5764 ppc_linux_vsxregset. Use regset to collect registers.
5765 (fetch_register): Call fetch_vsx_registers instead of
5766 fetch_vsx_register.
5767 (store_register): Call store_vsx_registers instead of
5768 store_vsx_register.
5769 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
5770 new regno parameter.
5771 (store_ppc_registers): Call store_vsx_registers with -1 for the
5772 new regno parameter.
5773 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
5774 (ppc_collect_vsxregset): Remove.
5775
5776 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5777
5778 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
5779 offset fields.
5780 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
5781 for vector register offset fields.
5782 (ppc64_fbsd_reg_offsets): Likewise.
5783 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5784 to vector register offset fields.
5785 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
5786 to vector register offset fields.
5787 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
5788 vector register offset fields.
5789 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
5790 initializers for vector register offset fields.
5791 (rs6000_aix64_reg_offsets): Likewise.
5792 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
5793 (ppc_supply_vrregset): Remove.
5794 (ppc_collect_vrregset): Remove.
5795 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
5796 (ppc_linux_vrregset) : New function.
5797 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
5798 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
5799 (ppc32_linux_vrregset): Remove.
5800 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
5801 and use result instead of ppc32_linux_vrregset.
5802 (ppc32_linux_reg_offsets): Remove initializers for vector register
5803 offset fields.
5804 (ppc64_linux_reg_offsets): Likewise.
5805 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
5806 * ppc-linux-nat.c: Include regset.h.
5807 (gdb_vrregset_t): Adjust comment to account for little-endian
5808 mode.
5809 (supply_vrregset, fill_vrregset): Remove.
5810 (fetch_altivec_register, store_altivec_register): Remove.
5811 (fetch_altivec_registers): Add regno parameter. Get regset using
5812 ppc_linux_vrregset. Use regset to supply registers.
5813 (store_altivec_registers): Add regno parameter. Get regset using
5814 ppc_linux_vrregset. Use regset to collect registers.
5815 (fetch_register): Call fetch_altivec_registers instead of
5816 fetch_altivec_register.
5817 (store_register): Call store_altivec_registers instead of
5818 store_altivec_register.
5819 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
5820 the new regno parameter.
5821 (store_ppc_registers): Call store_altivec_registers with -1 for
5822 the new regno parameter.
5823
5824 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5825
5826 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
5827 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
5828 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
5829 (gdb_vrregset_t): Change array type size to
5830 PPC_LINUX_SIZEOF_VRREGSET.
5831 (gdb_vsxregset_t): Change array type size to
5832 PPC_LINUX_SIZEOF_VSXREGSET.
5833 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
5834 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
5835 PPC_LINUX_SIZEOF_VSXREGSET.
5836
5837 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5838
5839 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
5840 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
5841 nat/ppc-linux.c.
5842 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
5843 ppc_linux_target_wordsize with tid.
5844 (ppc_linux_nat_target::read_description): Call ppc_linux_target
5845 wordsize with tid.
5846 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
5847 (ppc64_64bit_inferior_p): Add static and inline specifiers.
5848 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
5849 tid parameter. Remove static specifier.
5850 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
5851 (ppc_linux_target_wordsize): New declaration.
5852
5853 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
5854
5855 * arch/ppc-linux-common.c: New file.
5856 * arch/ppc-linux-common.h: New file.
5857 * arch/ppc-linux-tdesc.h: New file.
5858 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
5859 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
5860 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
5861 arch/ppc-linux-tdesc.h.
5862 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
5863 arch/ppc-linux-tdesc.h.
5864 (ppc_linux_nat_target::read_description): Remove target
5865 description matching code. Fill a ppc_linux_features struct and
5866 call ppc_linux_match_description with it. Move comment about ISA
5867 2.05 to ppc-linux-common.c.
5868 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
5869 arch/ppc-linux-tdesc.h.
5870 (ppc_linux_core_read_description): Remove target description
5871 matching code. Fill a ppc_linux_features struct and call
5872 ppc_linux_match_description with it.
5873 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
5874 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
5875 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
5876 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
5877 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
5878 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
5879 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
5880 (tdesc_powerpc_e500l): Remove.
5881
5882 2018-05-22 Joel Brobecker <brobecker@adacore.com>
5883
5884 * ada-lang.c (catch_assert_command): Pass empty string instead
5885 of NULL for excep_string argument.
5886
5887 2018-05-22 Maciej W. Rozycki <macro@mips.com>
5888
5889 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
5890 the width of the requested register exceeds the width of the
5891 `ptrace' data type.
5892
5893 2018-05-21 Tom Tromey <tom@tromey.com>
5894
5895 * printcmd.c (output_command): Remove.
5896 (output_command_const): Rename to output_command.
5897 * valprint.h (output_command): Rename from output_command_const.
5898 * tracepoint.c (trace_dump_actions): Call output_command.
5899
5900 2018-05-21 Tom Tromey <tom@tromey.com>
5901
5902 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5903 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
5904 * ada-lang.h (create_ada_exception_catchpoint): Update.
5905 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
5906 std::string.
5907 (create_excep_cond_exprs, ~ada_catchpoint)
5908 (should_stop_exception, print_one_exception)
5909 (print_mention_exception, print_recreate_exception): Update.
5910 (ada_get_next_arg): Remove.
5911 (catch_ada_exception_command_split): Use std::string. Change type
5912 of "excep_string", "cond_string".
5913 (catch_ada_exception_command): Update.
5914 (create_ada_exception_catchpoint): Change type of excep_string.
5915 (ada_exception_sal): Remove excep_string parameter.
5916 (~ada_catchpoint): Remove.
5917
5918 2018-05-21 Tom Tromey <tom@tromey.com>
5919
5920 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
5921 cleanup.
5922
5923 2018-05-21 Tom Tromey <tom@tromey.com>
5924
5925 * ada-lang.c (ada_exception_message_1, ada_exception_message):
5926 Return unique_xmalloc_ptr.
5927 (print_it_exception): Update.
5928
5929 2018-05-21 Tom Tromey <tom@tromey.com>
5930
5931 * tracepoint.c (trace_dump_actions): Use std::string.
5932
5933 2018-05-21 Tom Tromey <tom@tromey.com>
5934
5935 * symfile.c (reread_symbols): Use std::string for original_name.
5936
5937 2018-05-21 Tom Tromey <tom@tromey.com>
5938
5939 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
5940 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
5941 constructor.
5942
5943 2018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
5944
5945 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
5946 instance to...
5947 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
5948 * objfiles.c (get_objfile_bfd_data): Allocate
5949 objfile_per_bfd_storage with obstack_new when allocating on
5950 obstack.
5951
5952 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5953
5954 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
5955 OBSTACK_ZALLOC.
5956 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
5957 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
5958 * mdebugread.c (mdebug_build_psymtabs): Likewise.
5959 (add_pending): Likewise.
5960 (parse_symbol): Likewise.
5961 (parse_partial_symbols): Likewise.
5962 (psymtab_to_symtab_1): Likewise.
5963 (new_psymtab): Likewise.
5964 (elfmdebug_build_psymtabs): Likewise.
5965 * minsyms.c (terminate_minimal_symbol_table): Likewise.
5966 * objfiles.c (get_objfile_bfd_data): Likewise.
5967 (objfile_register_static_link): Likewise.
5968 * psymtab.c (allocate_psymtab): Likewise.
5969 * stabsread.c (read_member_functions): Likewise.
5970 * xcoffread.c (xcoff_end_psymtab): Likewise.
5971
5972 2018-05-20 Simon Marchi <simon.marchi@ericsson.com>
5973
5974 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
5975 compiler supports std::is_trivially_constructible.
5976 * common/poison.h: Include obstack.h.
5977 (IsMallocable): Define to is_trivially_constructible if the
5978 compiler supports it, define to true_type otherwise.
5979 (xobnew): New.
5980 (XOBNEW): Redefine.
5981 (xobnewvec): New.
5982 (XOBNEWVEC): Redefine.
5983 * gdb_obstack.h (obstack_zalloc): New.
5984 (OBSTACK_ZALLOC): Redefine.
5985 (obstack_calloc): New.
5986 (OBSTACK_CALLOC): Redefine.
5987 (obstack_new): New.
5988 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
5989 (gdbarch_obstack): New declaration in gdbarch.h, definition in
5990 gdbarch.c.
5991 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
5992 obstack_calloc/obstack_zalloc.
5993 (gdbarch_obstack_zalloc): Remove.
5994 * target-descriptions.c (tdesc_data_init): Use obstack_new.
5995
5996 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
5997
5998 * stack.c (backtrace_command_1): Remove useless variable int i.
5999
6000 2018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
6001
6002 * stack.c (print_frame_info): Fix comment.
6003
6004 2018-05-18 Tom Tromey <tom@tromey.com>
6005
6006 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
6007 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
6008 (~dwarf2_per_objfile): Update
6009 (dwarf2_get_dwz_file): Use new.
6010 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
6011 unique_ptr.
6012
6013 2018-05-18 Tom Tromey <tom@tromey.com>
6014
6015 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
6016 unique_ptr.
6017 * dwarf2read.c (struct dwp_file): Add constructor and
6018 initializers.
6019 (open_and_init_dwp_file): Return a unique_ptr.
6020 (dwarf2_per_objfile, create_dwp_hash_table)
6021 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
6022 (lookup_dwo_unit_in_dwp): Update.
6023 (open_and_init_dwp_file, get_dwp_file): Update.
6024
6025 2018-05-18 Tom Tromey <tom@tromey.com>
6026
6027 * dwarf2read.c (dwarf2_per_objfile): Update.
6028 (struct mapped_index): Add initializers.
6029 (dwarf2_read_index): Use new.
6030 (dw2_symtab_iter_init): Update.
6031 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
6032 unique_ptr.
6033
6034 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6035
6036 * dwarf2read.c (mapped_index) <total_size>: Remove.
6037
6038 2018-05-18 Simon Marchi <simon.marchi@ericsson.com>
6039
6040 * unittests/format_pieces-selftests.c (test_format_specifier):
6041 Add ARI comments.
6042
6043 2018-05-18 Tom Tromey <tom@tromey.com>
6044
6045 * c-typeprint.c (maybe_print_hole): New function.
6046 (c_print_type_struct_field_offset): Update.
6047 (c_type_print_base_struct_union): Call maybe_print_hole.
6048
6049 2018-05-17 Keith Seitz <keiths@redhat.com>
6050
6051 * breakpoint.c (build_bpstat_chain): New function, moved from
6052 bpstat_stop_status.
6053 (bpstat_stop_status): Add optional parameter, `stop_chain'.
6054 If no stop chain is passed, call build_bpstat_chain to build it.
6055 * breakpoint.h (build_bpstat_chain): Declare.
6056 (bpstat_stop_status): Move documentation here from breakpoint.c.
6057 * infrun.c (handle_signal_stop): Before eliding inlined frames,
6058 build the stop chain and pass it to skip_inline_frames.
6059 Pass this stop chain to bpstat_stop_status.
6060 * inline-frame.c: Include breakpoint.h.
6061 (stopped_by_user_bp_inline_frame): New function.
6062 (skip_inline_frames): Add parameter `stop_chain'.
6063 Move documention to inline-frame.h.
6064 If non-NULL, use stopped_by_user_bp_inline_frame to determine
6065 whether the frame should be elided.
6066 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
6067 Add moved documentation and update for new parameter.
6068
6069 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6070
6071 PR cli/14975
6072 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6073 unittests/format_pieces-selftests.c.
6074 * common/format.h (format_piece) <operator==>: New.
6075 (format_pieces) <operator[]>: Remove.
6076 * common/format.c (format_pieces::format_pieces): Handle \e.
6077 * unittests/format_pieces-selftests.c: New.
6078
6079 2018-05-17 Tom Tromey <tom@tromey.com>
6080
6081 PR symtab/23010:
6082 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
6083 (dw2_instantiate_symtab): Add skip_partial parameter.
6084 (dw2_find_last_source_symtab, dw2_map_expand_apply)
6085 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
6086 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
6087 (dw2_expand_symtabs_matching_one)
6088 (dw2_find_pc_sect_compunit_symtab)
6089 (dw2_debug_names_lookup_symbol)
6090 (dw2_debug_names_expand_symtabs_for_function): Update.
6091 (init_cutu_and_read_dies): Add skip_partial parameter.
6092 (process_psymtab_comp_unit, build_type_psymtabs_1)
6093 (process_skeletonless_type_unit, load_partial_comp_unit)
6094 (psymtab_to_symtab_1): Update.
6095 (load_full_comp_unit): Add skip_partial parameter.
6096 (process_imported_unit_die, dwarf2_read_addr_index)
6097 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
6098 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
6099 (read_signatured_type): Update.
6100
6101 2018-05-17 Simon Marchi <simon.marchi@ericsson.com>
6102
6103 * value.c (release_value): Remove unused variable.
6104 (record_latest_value): Likewise.
6105 (access_value_history): Likewise.
6106 (preserve_values): Likewise.
6107
6108 2018-05-17 Tom Tromey <tom@tromey.com>
6109
6110 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
6111 Initialize.
6112
6113 2018-05-16 Maciej W. Rozycki <macro@mips.com>
6114
6115 PR gdb/22286
6116 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
6117 Also handle registers whose width is not a multiple of
6118 PTRACE_TYPE_RET.
6119 (linux_nat_trad_target::store_register): Likewise.
6120
6121 2018-05-16 Tom Tromey <tom@tromey.com>
6122
6123 * gdbcore.h (core_bfd): Redefine.
6124 * corelow.c (core_target::close): Update.
6125 (core_target_open): Update.
6126 * progspace.h (struct program_space) <cbfd>: Now a
6127 gdb_bfd_ref_ptr.
6128
6129 2018-05-16 Tom Tromey <tom@tromey.com>
6130
6131 PR cli/19551:
6132 * symfile-add-flags.h (enum symfile_add_flags)
6133 <SYMFILE_NOT_FILENAME>: New constant.
6134 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
6135 objfile name from BFD.
6136 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
6137 * minidebug.c (find_separate_debug_file_in_section): Put
6138 ".gnu_debugdata" into BFD's file name.
6139
6140 2018-05-16 Simon Marchi <simon.marchi@ericsson.com>
6141
6142 * regcache.c (regcache_read_ftype, regcache_write_ftype):
6143 Remove.
6144
6145 2018-05-15 Tamar Christina <tamar.christina@arm.com>
6146
6147 PR binutils/21446
6148 * aarch64-tdep.c (aarch64_analyze_prologue,
6149 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
6150 Indicate not interested in errors.
6151
6152 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6153
6154 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
6155 Supply the MIPS_ZERO_REGNUM register.
6156
6157 2018-05-15 Maciej W. Rozycki <macro@mips.com>
6158
6159 * mips-tdep.c (mask_address_var): Make variable static.
6160
6161 2018-05-14 Tom Tromey <tom@tromey.com>
6162
6163 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
6164
6165 2018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
6166
6167 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
6168 FXSAVE_ADDR for the mxcsr register.
6169
6170 2018-05-11 Max Filippov <jcmvbkbc@gmail.com>
6171
6172 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
6173
6174 2018-05-11 Pedro Alves <palves@redhat.com>
6175
6176 * corelow.c (core_target) <core_target>: No longer inline.
6177 Initialize m_core_gdbarch, m_core_vec and build the section table
6178 here.
6179 <~core_target>: New.
6180 <core_gdbarch, get_core_register_section>: New methods.
6181 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
6182 factored out from ...
6183 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
6184 (core_ops): Delete.
6185 (sniff_core_bfd): Add gdbarch parameter.
6186 (core_close): Delete, merged into ...
6187 (core_target::close): ... here. Delete self.
6188 (core_close_cleanup): Delete.
6189 (core_target_open): Allocate a core_target on the heap. Use a
6190 unique_ptr instead of a cleanup. Bits moved into the core_target
6191 ctor. Adjust to use core_target methods instead of globals.
6192 (get_core_register_section): Rename to ...
6193 (core_target::get_core_register_section): ... this and adjust.
6194 (struct get_core_registers_cb_data): New.
6195 (get_core_registers_cb): Use it. Use bool.
6196 (core_target::fetch_registers, core_target::files_info)
6197 (core_target::xfer_partial, core_target::read_description)
6198 (core_target::pid_to, core_target::thread_name): Adjust to
6199 reference class fields instead of globals.
6200 * target.h (struct target_ops_deleter, target_ops_up): New.
6201
6202 2018-05-11 Pedro Alves <palves@redhat.com>
6203
6204 * corefile.c (core_file_command): Move to corelow.c.
6205 * corelow.c (the_core_target): Delete.
6206 (core_file_command): Moved from corefile.c. Check exec_bfd
6207 instead of the_core_target. Use target_detach instead of calling
6208 into the_core_target directly.
6209 (maybe_say_no_core_file_now): New.
6210 (core_target::detach): Use it.
6211 (_initialize_corelow): Remove references to the_core_target.
6212 * gdbcore.h (the_core_target): Delete.
6213
6214 2018-05-11 Tom Tromey <tromey@redhat.com>
6215 Pedro Alves <palves@redhat.com>
6216
6217 * corefile.c (core_bfd): Remove.
6218 * gdbcore.h (core_bfd): Now a macro.
6219 * progspace.h (struct program_space) <cbfd>: New field.
6220
6221 2018-05-11 Tom Tromey <tom@tromey.com>
6222
6223 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
6224 gdb::def_vector.
6225
6226 2018-05-10 Tom Tromey <tom@tromey.com>
6227
6228 * configure: Rebuild.
6229 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
6230
6231 2018-05-10 Joel Brobecker <brobecker@adacore.com>
6232
6233 PR server/23158:
6234 * regformats/regdat.sh: Adjust script, following the addition
6235 of the new expedite_regs parameter to init_target_desc.
6236
6237 2018-05-10 Omair Javaid <omair.javaid@linaro.org>
6238
6239 PR gdb/23127
6240 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
6241 set_gdbarch_significant_addr_bit.
6242 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
6243 set_gdbarch_significant_addr_bit.
6244 * utils.c (address_significant): Update to sign extend addr.
6245
6246 2018-05-09 Max Filippov <jcmvbkbc@gmail.com>
6247
6248 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
6249 (xtensa_linux_init_abi): Limit tdep->num_regs by
6250 tdep->num_nopriv_regs.
6251 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
6252 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
6253 not initialized.
6254
6255 2018-05-08 Simon Marchi <simon.marchi@ericsson.com>
6256
6257 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
6258
6259 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
6260
6261 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
6262 (I387_MXCSR_INIT_VAL): New constant.
6263 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
6264 buffer if it was supplied by the inferior.
6265 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
6266 (i387_xsave_get_clear_bv): New function.
6267 (i387_supply_xsave): Only read x87 control registers from the
6268 xsave buffer if the feature is enabled, and the state will have
6269 been written, otherwise, provide a suitable default.
6270 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
6271 including x87 control registers. Update control registers if they
6272 have changed from the default value, and mark features as enabled
6273 as required.
6274 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
6275
6276 2018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
6277
6278 * spu-tdep.c (info_spu_event_command): Fix output formatting.
6279
6280 2018-05-07 Tom Tromey <tom@tromey.com>
6281
6282 * configure: Rebuild.
6283 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
6284
6285 2018-05-07 Tom Tromey <tom@tromey.com>
6286
6287 PR tdep/20362:
6288 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
6289 bit. Use correct value for VDIV.
6290
6291 2018-05-04 Tom Tromey <tom@tromey.com>
6292
6293 * configure: Rebuild.
6294 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
6295
6296 2018-05-04 Tom Tromey <tom@tromey.com>
6297
6298 * linux-record.c (record_linux_system_call) <case
6299 RECORD_SYS_RECVFROM>: Add "break".
6300
6301 2018-05-04 Tom Tromey <tom@tromey.com>
6302
6303 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
6304 Add missing "break".
6305 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
6306 Add missing "break".
6307
6308 2018-05-04 Tom Tromey <tom@tromey.com>
6309
6310 * rs6000-tdep.c (ppc_process_record_op4)
6311 (ppc_process_record_op63): Add fall-through comment.
6312
6313 2018-05-04 Tom Tromey <tom@tromey.com>
6314
6315 * i386-tdep.c (i386_process_record): Add fall-through comment.
6316
6317 2018-05-04 Tom Tromey <tom@tromey.com>
6318
6319 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
6320 comment.
6321
6322 2018-05-04 Tom Tromey <tom@tromey.com>
6323
6324 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
6325 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
6326 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
6327 comment.
6328 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
6329 comment.
6330 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
6331 comment.
6332
6333 2018-05-04 Tom Tromey <tom@tromey.com>
6334
6335 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
6336
6337 2018-05-04 Tom Tromey <tom@tromey.com>
6338
6339 * s390-tdep.c (s390_process_record): Fix fall-through comments.
6340 * xcoffread.c (scan_xcoff_symtab): Move comment later.
6341 * symfile.c (section_is_mapped): Fix fall-through comment.
6342 * stabsread.c (define_symbol, read_member_functions): Fix
6343 fall-through comment.
6344 * s390-linux-tdep.c (s390_process_record): Fix fall-through
6345 comment.
6346 * remote.c (remote_wait_as): Fix fall-through comment.
6347 * p-exp.y (yylex): Fix fall-through comment.
6348 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
6349 comment.
6350 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
6351 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
6352 * jv-exp.y (yylex): Fix fall-through comment.
6353 * go-exp.y (lex_one_token): Fix fall-through comment.
6354 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
6355 fall-through comment.
6356 * f-exp.y (yylex): Fix fall-through comment.
6357 * dwarf2read.c (process_die): Fix fall-through comments.
6358 * dbxread.c (process_one_symbol): Fix fall-through comment.
6359 * d-exp.y (lex_one_token): Fix fall-through comment.
6360 * cp-name-parser.y (yylex): Fix fall-through comment.
6361 * coffread.c (coff_symtab_read): Fix fall-through comment.
6362 * c-exp.y (lex_one_token): Fix fall-through comment.
6363 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
6364 comment.
6365 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
6366 comment.
6367
6368 2018-05-04 Tom Tromey <tom@tromey.com>
6369
6370 PR python/22730:
6371 * NEWS: Mention gdb.execute change.
6372 * gdbcmd.h (execute_control_command): Don't declare.
6373 * python/python.c (execute_gdb_command): Use read_command_lines_1,
6374 execute_control_commands, execute_control_commands_to_string.
6375 * cli/cli-script.h (execute_control_commands)
6376 (execute_control_commands_to_string): Declare.
6377 (execute_control_command): Add from_tty parameter.
6378 * cli/cli-script.c (execute_control_commands)
6379 (execute_control_commands_to_string): New functions.
6380 (execute_user_command): Use execute_control_commands.
6381 (execute_control_command_1): Add "from_tty" parameter. Update.
6382 (execute_control_command): Likewise.
6383
6384 2018-05-04 Tom Tromey <tom@tromey.com>
6385
6386 PR python/22731:
6387 * NEWS: Mention that breakpoint commands are writable.
6388 * python/py-breakpoint.c (bppy_set_commands): New function.
6389 (breakpoint_object_getset) <"commands">: Use it.
6390
6391 2018-05-04 Tom Tromey <tom@tromey.com>
6392
6393 * tracepoint.c (actions_command): Update.
6394 * mi/mi-cmd-break.c (mi_command_line_array)
6395 (mi_command_line_array_cnt, mi_command_line_array_ptr)
6396 (mi_read_next_line): Remove.
6397 (mi_cmd_break_commands): Update.
6398 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
6399 function_view.
6400 * cli/cli-script.c (get_command_line): Update.
6401 (process_next_line): Use function_view. Constify.
6402 (recurse_read_control_structure, read_command_lines)
6403 (read_command_lines_1): Change argument types to function_view.
6404 (do_define_command, document_command): Update.
6405 * breakpoint.h (check_tracepoint_command): Don't declare.
6406 * breakpoint.c (check_tracepoint_command): Remove.
6407 (commands_command_1, create_tracepoint_from_upload): Update.
6408
6409 2018-05-04 Tom Tromey <tom@tromey.com>
6410
6411 PR gdb/11750:
6412 * cli/cli-script.h (enum command_control_type) <define_control>:
6413 New constant.
6414 * cli/cli-script.c (multi_line_command_p): Handle define_control.
6415 (build_command_line, execute_control_command_1)
6416 (process_next_line): Likewise.
6417 (do_define_command): New function, extracted from define_command.
6418 (define_command): Use it.
6419
6420 2018-05-04 Tom Tromey <tom@tromey.com>
6421
6422 * tracepoint.c (actions_command): Update.
6423 * cli/cli-script.h (read_command_lines): Update.
6424 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
6425 (MAX_TMPBUF): Remove define.
6426 (define_command): Use string_printf.
6427 (document_command): Likewise.
6428 * breakpoint.c (commands_command_1): Update.
6429
6430 2018-05-04 Tom Tromey <tom@tromey.com>
6431
6432 * top.c (execute_command): Update.
6433 * cli/cli-script.h (print_command_lines): Now varargs.
6434 * cli/cli-script.c (print_command_lines): Now varargs.
6435 (execute_control_command_1) <case while_control, case if_control>:
6436 Update.
6437
6438 2018-05-04 Tom Tromey <tom@tromey.com>
6439
6440 * tracepoint.c (all_tracepoint_actions): Rename from
6441 all_tracepoint_actions_and_cleanup. Change return type.
6442 (actions_command, encode_actions_1, encode_actions)
6443 (trace_dump_actions, tdump_command): Update.
6444 * remote.c (remote_download_command_source): Update.
6445 * python/python.c (gdbpy_eval_from_control_command)
6446 (python_command, python_interactive_command): Update.
6447 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
6448 * guile/guile.c (guile_command)
6449 (gdbscm_eval_from_control_command, guile_command): Update.
6450 * compile/compile.c (compile_code_command)
6451 (compile_print_command, compile_to_object): Update.
6452 * cli/cli-script.h (struct command_lines_deleter): New.
6453 (counted_command_line): New typedef.
6454 (struct command_line): Add constructor, destructor.
6455 <body_list>: Remove.
6456 <body_list_0, body_list_1>: New members.
6457 (command_line_up): Remove typedef.
6458 (read_command_lines, read_command_lines_1, get_command_line):
6459 Update.
6460 (copy_command_lines): Don't declare.
6461 * cli/cli-script.c (build_command_line): Use "new".
6462 (get_command_line): Return counted_command_line.
6463 (print_command_lines, execute_user_command)
6464 (execute_control_command_1, while_command, if_command): Update.
6465 (realloc_body_list): Remove.
6466 (process_next_line, recurse_read_control_structure): Update.
6467 (read_command_lines, read_command_lines_1): Return counted_command_line.
6468 (free_command_lines): Use "delete".
6469 (copy_command_lines): Remove.
6470 (define_command, document_command, show_user_1): Update.
6471 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
6472 a counted_command_line.
6473 * breakpoint.h (counted_command_line): Remove typedef.
6474 (breakpoint_set_commands): Update.
6475 * breakpoint.c (check_no_tracepoint_commands)
6476 (validate_commands_for_breakpoint): Update.
6477 (breakpoint_set_commands): Change commands to be a
6478 counted_command_line.
6479 (commands_command_1, update_dprintf_command_list)
6480 (create_tracepoint_from_upload): Update.
6481
6482 2018-05-04 Tom Tromey <tom@tromey.com>
6483
6484 * cli/cli-decode.h (cmd_list_element): New constructor.
6485 (~cmd_list_element): New destructor.
6486 (struct cmd_list_element): Add initializers.
6487 * cli/cli-decode.c (do_add_cmd): Use "new".
6488 (delete_cmd): Use "delete".
6489
6490 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
6491 Pedro Alves <palves@redhat.com>
6492
6493 PR breakpoints/19806 and support for PR external/20207.
6494 * NEWS: Mention Aarch64 watchpoint improvements.
6495 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
6496 watchpoints and PR external/20207 watchpoints.
6497 * nat/aarch64-linux-hw-point.c
6498 (kernel_supports_any_contiguous_range): New.
6499 (aarch64_watchpoint_offset): New.
6500 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
6501 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
6502 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
6503 (aarch64_align_watchpoint): New parameters aligned_offset_p and
6504 next_addr_orig_p. Support PR external/20207 watchpoints.
6505 (aarch64_downgrade_regs): New.
6506 (aarch64_dr_state_insert_one_point): New parameters offset and
6507 addr_orig.
6508 (aarch64_dr_state_remove_one_point): Likewise.
6509 (aarch64_handle_breakpoint): Update caller.
6510 (aarch64_handle_aligned_watchpoint): Likewise.
6511 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
6512 aligned_offset.
6513 (aarch64_linux_set_debug_regs): Remove const from state. Call
6514 aarch64_downgrade_regs.
6515 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
6516 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
6517 (DR_CONTROL_MASK): ... this.
6518 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
6519 (unsigned int aarch64_watchpoint_offset): New prototype.
6520 (aarch64_linux_set_debug_regs): Remove const from state.
6521 * utils.c (align_up, align_down): Move to ...
6522 * common/common-utils.c (align_up, align_down): ... here.
6523 * utils.h (align_up, align_down): Move to ...
6524 * common/common-utils.h (align_up, align_down): ... here.
6525
6526 2018-05-04 Joel Brobecker <brobecker@adacore.com>
6527
6528 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
6529 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
6530 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
6531 Re-implement to match the ABI as summarized in GCC's
6532 gcc/config/sparc/sparc.c. All callers updated.
6533 (sparc32_store_arguments): Remove assertion.
6534
6535 2018-05-04 Tom Tromey <tom@tromey.com>
6536
6537 * printcmd.c: Don't include tui.h.
6538 (decode_format): Use skip_spaces.
6539
6540 2018-05-04 Tom Tromey <tom@tromey.com>
6541
6542 PR gdb/22619:
6543 * printcmd.c (last_count): New global.
6544 (x_command): Use saved count when repeating.
6545
6546 2018-05-04 Tom Tromey <tom@tromey.com>
6547
6548 * nto-procfs.c (do_closedir_cleanup): Remove.
6549 (procfs_pidlist): Use gdb_dir_up.
6550 * procfs.c (do_closedir_cleanup): Remove.
6551 (proc_update_threads): Use gdb_dir_up.
6552 * common/filestuff.h (struct gdb_dir_deleter): New.
6553 (gdb_dir_up): New typedef.
6554
6555 2018-05-04 Tom Tromey <tom@tromey.com>
6556
6557 * ada-lang.c (print_mention_exception): Use std::string.
6558
6559 2018-05-04 Tom Tromey <tom@tromey.com>
6560
6561 * ada-lang.c (create_excep_cond_exprs): Update.
6562 (ada_exception_catchpoint_cond_string): Use std::string.
6563
6564 2018-05-04 Tom Tromey <tom@tromey.com>
6565
6566 * ada-lang.c (xget_renaming_scope): Return std::string.
6567 (old_renaming_is_invisible): Update.
6568
6569 2018-05-04 Tom Tromey <tom@tromey.com>
6570
6571 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
6572 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
6573
6574 2018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
6575
6576 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
6577
6578 2018-05-04 Tom Tromey <tom@tromey.com>
6579
6580 * remote.c (remote_query_supported_append): Change type.
6581 (remote_check_symbols): Update.
6582
6583 2018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
6584
6585 PR gdb/11420
6586 * configure.ac: Prepend libpython.
6587 * python/python-config.py: Likewise.
6588 * configure: Regenerate.
6589
6590 2018-05-03 Simon Marchi <simon.marchi@ericsson.com>
6591
6592 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
6593
6594 2018-05-03 Pedro Alves <palves@redhat.com>
6595
6596 * s390-linux-nat.c
6597 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
6598 override. Write 'true' instead of '1'.
6599 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
6600 declaration.
6601
6602 2018-05-02 Pedro Alves <palves@redhat.com>
6603
6604 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
6605 add_inf_child_target.
6606 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
6607 add_inf_child_target.
6608 * aix-thread.c (aix_thread_target_info): New.
6609 (aix_thread_target) <shortname, longname, doc>: Delete.
6610 <info>: New.
6611 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
6612 add_inf_child_target.
6613 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
6614 add_inf_child_target.
6615 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
6616 add_inf_child_target.
6617 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
6618 add_inf_child_target.
6619 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
6620 add_inf_child_target.
6621 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
6622 add_inf_child_target.
6623 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
6624 add_inf_child_target.
6625 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
6626 add_inf_child_target.
6627 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
6628 add_inf_child_target.
6629 * bfd-target.c (target_bfd_target_info): New.
6630 (target_bfd) <shortname, longname, doc>: Delete.
6631 <info>: New.
6632 * bsd-kvm.c (bsd_kvm_target_info): New.
6633 (bsd_kvm_target) <shortname, longname, doc>: Delete.
6634 <info>: New.
6635 (bsd_kvm_target::open): Rename to ...
6636 (bsd_kvm_target_open): ... this. Adjust.
6637 * bsd-uthread.c (bsd_uthread_target_info): New.
6638 (bsd_uthread_target) <shortname, longname, doc>: Delete.
6639 <info>: New.
6640 * corefile.c (core_file_command): Adjust.
6641 * corelow.c (core_target_info): New.
6642 (core_target) <shortname, longname, doc>: Delete.
6643 <info>: New.
6644 (core_target::open): Rename to ...
6645 (core_target_open): ... this. Adjust.
6646 * ctf.c (ctf_target_info): New.
6647 (ctf_target) <shortname, longname, doc>: Delete.
6648 <info>: New.
6649 (ctf_target::open): Rename to ...
6650 (ctf_target_open): ... this.
6651 (_initialize_ctf): Adjust.
6652 * exec.c (exec_target_info): New.
6653 (exec_target) <shortname, longname, doc>: Delete.
6654 <info>: New.
6655 (exec_target::open): Rename to ...
6656 (exec_target_open): ... this.
6657 * gdbcore.h (core_target_open): Declare.
6658 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
6659 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
6660 add_inf_child_target.
6661 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
6662 add_inf_child_target.
6663 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
6664 add_inf_child_target.
6665 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
6666 add_inf_child_target.
6667 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
6668 add_inf_child_target.
6669 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
6670 add_inf_child_target.
6671 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
6672 add_inf_child_target.
6673 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
6674 add_inf_child_target.
6675 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
6676 add_inf_child_target.
6677 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
6678 add_inf_child_target.
6679 * inf-child.c (inf_child_target_info): New.
6680 (inf_child_target::info): New.
6681 (inf_child_open_target): Remove 'target' parameter. Use
6682 get_native_target instead.
6683 (inf_child_target::open): Delete.
6684 (add_inf_child_target): New.
6685 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
6686 Delete.
6687 <info>: New.
6688 (add_inf_child_target): Declare.
6689 (inf_child_open_target): Declare.
6690 * linux-thread-db.c (thread_db_target_info): New.
6691 (thread_db_target) <shortname, longname, doc>: Delete.
6692 <info>: New.
6693 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
6694 add_inf_child_target.
6695 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
6696 add_inf_child_target.
6697 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
6698 add_inf_child_target.
6699 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
6700 add_inf_child_target.
6701 * make-target-delegates (print_class): Adjust.
6702 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
6703 add_inf_child_target.
6704 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
6705 add_inf_child_target.
6706 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
6707 add_inf_child_target.
6708 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
6709 add_inf_child_target.
6710 * nto-procfs.c (nto_native_target_info): New.
6711 (nto_procfs_target_native) <shortname, longname, doc>:
6712 Delete.
6713 <info>: New.
6714 (nto_procfs_target_info): New.
6715 (nto_procfs_target_procfs) <shortname, longname, doc>:
6716 Delete.
6717 <info>: New.
6718 (init_procfs_targets): Adjust.
6719 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
6720 add_inf_child_target.
6721 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
6722 add_inf_child_target.
6723 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
6724 add_inf_child_target.
6725 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
6726 add_inf_child_target.
6727 * ravenscar-thread.c (ravenscar_target_info): New.
6728 (ravenscar_thread_target) <shortname, longname, doc>:
6729 Delete.
6730 <info>: New.
6731 * record-btrace.c (record_btrace_target_info):
6732 (record_btrace_target) <shortname, longname, doc>: Delete.
6733 <info>: New.
6734 (record_btrace_target::open): Rename to ...
6735 (record_btrace_target_open): ... this. Adjust.
6736 * record-full.c (record_longname, record_doc): New.
6737 (record_full_base_target) <shortname, longname, doc>: Delete.
6738 <info>: New.
6739 (record_full_target_info): New.
6740 (record_full_target): <shortname>: Delete.
6741 <info>: New.
6742 (record_full_core_open_1, record_full_open_1): Update comments.
6743 (record_full_base_target::open): Rename to ...
6744 (record_full_open): ... this.
6745 (cmd_record_full_restore): Update.
6746 (_initialize_record_full): Update.
6747 * remote-sim.c (remote_sim_target_info): New.
6748 (gdbsim_target) <shortname, longname, doc>: Delete.
6749 <info>: New.
6750 (gdbsim_target::open): Rename to ...
6751 (gdbsim_target_open): ... this.
6752 (_initialize_remote_sim): Adjust.
6753 * remote.c (remote_doc): New.
6754 (remote_target_info): New.
6755 (remote_target) <shortname, longname, doc>: Delete.
6756 <info>: New.
6757 (extended_remote_target_info): New.
6758 (extended_remote_target) <shortname, longname, doc>: Delete.
6759 <info>: New.
6760 (remote_target::open_1): Make static. Adjust.
6761 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
6762 * s390-linux-nat.c (_initialize_s390_nat): Use
6763 add_inf_child_target.
6764 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
6765 add_inf_child_target.
6766 * sol-thread.c (thread_db_target_info): New.
6767 (sol_thread_target) <shortname, longname, doc>: Delete.
6768 <info>: New.
6769 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
6770 add_inf_child_target.
6771 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
6772 add_inf_child_target.
6773 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
6774 add_inf_child_target.
6775 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
6776 add_inf_child_target.
6777 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
6778 add_inf_child_target.
6779 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
6780 add_inf_child_target.
6781 * spu-linux-nat.c (_initialize_spu_nat): Use
6782 add_inf_child_target.
6783 * spu-multiarch.c (spu_multiarch_target_info): New.
6784 (spu_multiarch_target) <shortname, longname, doc>: Delete.
6785 <info>: New.
6786 * target-delegates.c: Regenerate.
6787 * target.c: Include <unordered_map>.
6788 (target_ops_p): Delete.
6789 (DEF_VEC_P(target_ops_p)): Delete.
6790 (target_factories): New.
6791 (test_target_info): New.
6792 (test_target_ops::info): New.
6793 (open_target): Adjust to use target_factories.
6794 (add_target_with_completer): Rename to ...
6795 (add_target): ... this. Change prototype. Register target_info
6796 and open callback in target_factories. Register target_info in
6797 command context instead of target_ops.
6798 (add_target): Delete old implementation.
6799 (add_deprecated_target_alias): Change prototype. Adjust.
6800 (the_native_target): New.
6801 (set_native_target, get_native_target): New.
6802 (find_default_run_target): Use the_native_target.
6803 (find_attach_target, find_run_target): Simplify.
6804 (target_ops::open): Delete.
6805 (dummy_target_info): New.
6806 (dummy_target::shortname, dummy_target::longname)
6807 (dummy_target::doc): Delete.
6808 (dummy_target::info): New.
6809 (debug_target::shortname, debug_target::longname)
6810 (debug_target::doc): Delete.
6811 (debug_target::info): New.
6812 * target.h (struct target_info): New.
6813 (target_ops::~target_ops): Add comment.
6814 (target_ops::info): New.
6815 (target_ops::shortname, target_ops::longname, target_ops::doc): No
6816 longer virtual. Implement in terms of target_info.
6817 (set_native_target, get_native_target): Declare.
6818 (target_open_ftype): New.
6819 (add_target, add_target_with_completer)
6820 (add_deprecated_target_alias): Change prototype.
6821 (test_target) <shortname, longname, doc>: Delete.
6822 <info>: New.
6823 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
6824 add_inf_child_target.
6825 * tracefile-tfile.c (tfile_target_info): New.
6826 (tfile_target) <shortname, longname, doc>: Delete.
6827 <info>: New.
6828 (tfile_target::open): Rename to ...
6829 (tfile_target_open): ... this.
6830 (_initialize_tracefile_tfile): Adjust.
6831 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
6832 add_inf_child_target.
6833 * windows-nat.c (_initialize_windows_nat): Use
6834 add_inf_child_target.
6835 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
6836 add_inf_child_target.
6837
6838 2018-05-02 Pedro Alves <palves@redhat.com>
6839
6840 * linux-nat.h (linux_nat_target) <low_new_thread,
6841 low_delete_thread, low_new_fork, low_forget_process,
6842 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
6843 New virtual methods.
6844 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6845 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
6846 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
6847 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6848 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
6849 Delete.
6850 * linux-fork.c (delete_fork): Adjust to call low method.
6851 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
6852 (linux_nat_new_fork, linux_nat_forget_process_hook)
6853 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
6854 (linux_nat_status_is_event):
6855 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
6856 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
6857 to call low method.
6858 (sigtrap_is_event): Rename to ...
6859 (linux_nat_target::low_status_is_event): ... this.
6860 (linux_nat_set_status_is_event): Delete.
6861 (save_stop_reason, linux_nat_wait_1)
6862 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
6863 low methods.
6864 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
6865 (linux_nat_set_new_fork, linux_nat_set_forget_process)
6866 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
6867 (linux_nat_set_prepare_to_resume): Delete.
6868 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
6869 low virtual methods.
6870 * amd64-linux-nat.c: Likewise.
6871 * arm-linux-nat.c: Likewise.
6872 * i386-linux-nat.c: Likewise.
6873 * ia64-linux-nat.c: Likewise.
6874 * mips-linux-nat.c: Likewise.
6875 * ppc-linux-nat.c: Likewise.
6876 * s390-linux-nat.c: Likewise.
6877 * sparc64-linux-nat.c: Likewise.
6878 * x86-linux-nat.c: Likewise.
6879 * x86-linux-nat.h: Include "nat/x86-linux.h".
6880 (x86_linux_nat_target) <low_new_fork, low_forget_process,
6881 low_prepare_to_resume, low_new_thread, low_delete_thread>:
6882 Override methods.
6883
6884 2018-05-02 Pedro Alves <palves@redhat.com>
6885
6886 * target.h (target_ops)
6887 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6888 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
6889 stopped_by_watchpoint, have_continuable_watchpoint,
6890 stopped_data_address, watchpoint_addr_within_range,
6891 can_accel_watchpoint_condition, can_run, thread_alive,
6892 has_all_memory, has_memory, has_stack, has_registers,
6893 has_execution, can_async_p, is_async_p, supports_non_stop,
6894 always_non_stop_p, can_execute_reverse, supports_multi_process,
6895 supports_enable_disable_tracepoint,
6896 supports_disable_randomization, supports_string_tracing,
6897 supports_evaluation_of_breakpoint_conditions,
6898 can_run_breakpoint_commands, filesystem_is_local,
6899 can_download_tracepoint, get_trace_state_variable_value,
6900 set_trace_notes, get_tib_address, use_agent, can_use_agent,
6901 record_is_replaying, record_will_replay,
6902 augmented_libraries_svr4_read>: Adjust to return bool.
6903 * aarch64-linux-nat.c: All implementations adjusted.
6904 * aix-thread.c: All implementations adjusted.
6905 * arm-linux-nat.c: All implementations adjusted.
6906 * breakpoint.c: All implementations adjusted.
6907 * bsd-kvm.c: All implementations adjusted.
6908 * bsd-uthread.c: All implementations adjusted.
6909 * corelow.c: All implementations adjusted.
6910 * ctf.c: All implementations adjusted.
6911 * darwin-nat.c: All implementations adjusted.
6912 * darwin-nat.h: All implementations adjusted.
6913 * exec.c: All implementations adjusted.
6914 * fbsd-nat.c: All implementations adjusted.
6915 * fbsd-nat.h: All implementations adjusted.
6916 * gnu-nat.c: All implementations adjusted.
6917 * gnu-nat.h: All implementations adjusted.
6918 * go32-nat.c: All implementations adjusted.
6919 * ia64-linux-nat.c: All implementations adjusted.
6920 * inf-child.c: All implementations adjusted.
6921 * inf-child.h: All implementations adjusted.
6922 * inf-ptrace.c: All implementations adjusted.
6923 * inf-ptrace.h: All implementations adjusted.
6924 * linux-nat.c: All implementations adjusted.
6925 * linux-nat.h: All implementations adjusted.
6926 * mips-linux-nat.c: All implementations adjusted.
6927 * nto-procfs.c: All implementations adjusted.
6928 * ppc-linux-nat.c: All implementations adjusted.
6929 * procfs.c: All implementations adjusted.
6930 * ravenscar-thread.c: All implementations adjusted.
6931 * record-btrace.c: All implementations adjusted.
6932 * record-full.c: All implementations adjusted.
6933 * remote-sim.c: All implementations adjusted.
6934 * remote.c: All implementations adjusted.
6935 * s390-linux-nat.c: All implementations adjusted.
6936 * sol-thread.c: All implementations adjusted.
6937 * spu-multiarch.c: All implementations adjusted.
6938 * target-delegates.c: All implementations adjusted.
6939 * target.c: All implementations adjusted.
6940 * target.h: All implementations adjusted.
6941 * tracefile-tfile.c: All implementations adjusted.
6942 * tracefile.c: All implementations adjusted.
6943 * tracefile.h: All implementations adjusted.
6944 * windows-nat.c: All implementations adjusted.
6945 * x86-linux-nat.h: All implementations adjusted.
6946 * x86-nat.h: All implementations adjusted.
6947
6948 2018-05-02 Pedro Alves <palves@redhat.com>
6949
6950 * make-target-delegates (scan_target_h): Don't trim lines here.
6951 Replace sequences of tabs and/or whitespace with a single
6952 whitespace.
6953 (top level, parsing methods): Trim each line before processing it
6954 here.
6955
6956 2018-05-02 Pedro Alves <palves@redhat.com>
6957 John Baldwin <jhb@freebsd.org>
6958
6959 * target.h (enum strata) <debug_stratum>: New.
6960 (struct target_ops) <all delegation methods>: Replace by C++
6961 virtual methods, and drop "to_" prefix. All references updated
6962 throughout.
6963 <to_shortname, to_longname, to_doc, to_data,
6964 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
6965 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
6966 virtual methods. All references updated throughout.
6967 <can_attach, supports_terminal_ours, can_create_inferior,
6968 get_thread_control_capabilities, attach_no_wait>: New
6969 virtual methods.
6970 <insert_breakpoint, remove_breakpoint>: Now
6971 TARGET_DEFAULT_NORETURN methods.
6972 <info_proc>: Now returns bool.
6973 <to_magic>: Delete.
6974 (OPS_MAGIC): Delete.
6975 (current_target): Delete. All references replaced by references
6976 to ...
6977 (target_stack): ... this. New.
6978 (target_shortname, target_longname): Adjust.
6979 (target_can_run): Now a function declaration.
6980 (default_child_has_all_memory, default_child_has_memory)
6981 (default_child_has_stack, default_child_has_registers)
6982 (default_child_has_execution): Remove target_ops parameter.
6983 (complete_target_initialization): Delete.
6984 (memory_breakpoint_target): New template class.
6985 (test_target_ops): Refactor as a C++ class with virtual methods.
6986 * make-target-delegates (NAME_PART): Tighten.
6987 (POINTER_PART, CP_SYMBOL): New.
6988 (SIMPLE_RETURN_PART): Reimplement.
6989 (VEC_RETURN_PART): Expect less.
6990 (RETURN_PART, VIRTUAL_PART): New.
6991 (METHOD): Adjust to C++ virtual methods.
6992 (scan_target_h): Remove reference to C99.
6993 (dname): Output "target_ops::" prefix.
6994 (write_function_header): Adjust to output a C++ class method.
6995 (write_declaration): New.
6996 (write_delegator): Adjust to output a C++ class method.
6997 (tdname): Output "dummy_target::" prefix.
6998 (write_tdefault, write_debugmethod): Adjust to output a C++ class
6999 method.
7000 (tdefault_names, debug_names): Delete.
7001 (return_types, tdefaults, styles, argtypes_array): New.
7002 (top level): All methods are delegators.
7003 (print_class): New.
7004 (top level): Print dummy_target and debug_target classes.
7005 * target-delegates.c: Regenerate.
7006 * target-debug.h (target_debug_print_enum_info_proc_what)
7007 (target_debug_print_thread_control_capabilities)
7008 (target_debug_print_thread_info_p): New.
7009 * target.c (dummy_target): Delete.
7010 (the_dummy_target, the_debug_target): New.
7011 (target_stack): Now extern.
7012 (set_targetdebug): Push/unpush debug target.
7013 (default_child_has_all_memory, default_child_has_memory)
7014 (default_child_has_stack, default_child_has_registers)
7015 (default_child_has_execution): Remove target_ops parameter.
7016 (complete_target_initialization): Delete.
7017 (add_target_with_completer): No longer call
7018 complete_target_initialization.
7019 (target_supports_terminal_ours): Use regular delegation.
7020 (update_current_target): Delete.
7021 (push_target): No longer check magic number. Don't call
7022 update_current_target.
7023 (unpush_target): Don't call update_current_target.
7024 (target_is_pushed): No longer check magic number.
7025 (target_require_runnable): Skip for all stratums over
7026 process_stratum.
7027 (target_ops::info_proc): New.
7028 (target_info_proc): Use find_target_at and
7029 find_default_run_target.
7030 (target_supports_disable_randomization): Use regular delegation.
7031 (target_get_osdata): Use find_target_at.
7032 (target_ops::open, target_ops::close, target_ops::can_attach)
7033 (target_ops::attach, target_ops::can_create_inferior)
7034 (target_ops::create_inferior, target_ops::can_run)
7035 (target_can_run): New.
7036 (default_fileio_target): Use regular delegation.
7037 (target_ops::fileio_open, target_ops::fileio_pwrite)
7038 (target_ops::fileio_pread, target_ops::fileio_fstat)
7039 (target_ops::fileio_close, target_ops::fileio_unlink)
7040 (target_ops::fileio_readlink): New.
7041 (target_fileio_open_1, target_fileio_unlink)
7042 (target_fileio_readlink): Always call the target method. Handle
7043 FILEIO_ENOSYS.
7044 (return_zero, return_zero_has_execution): Delete.
7045 (init_dummy_target): Delete.
7046 (dummy_target::dummy_target, dummy_target::shortname)
7047 (dummy_target::longname, dummy_target::doc)
7048 (debug_target::debug_target, debug_target::shortname)
7049 (debug_target::longname, debug_target::doc): New.
7050 (target_supports_delete_record): Use regular delegation.
7051 (setup_target_debug): Delete.
7052 (maintenance_print_target_stack): Skip debug_stratum.
7053 (initialize_targets): Instantiate the_dummy_target and
7054 the_debug_target.
7055 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
7056 use target_stack.
7057 (target_auxv_search, fprint_target_auxv): Adjust.
7058 (info_auxv_command): Adjust to use target_stack.
7059 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
7060 * exceptions.c (print_flush): Handle a NULL target_stack.
7061 * regcache.c (target_ops_no_register): Refactor as class with
7062 virtual methods.
7063
7064 * exec.c (exec_target): New class.
7065 (exec_ops): Now an exec_target.
7066 (exec_open, exec_close_1, exec_get_section_table)
7067 (exec_xfer_partial, exec_files_info, exec_has_memory)
7068 (exec_make_note_section): Refactor as exec_target methods.
7069 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
7070 Delete.
7071 (exec_target::find_memory_regions): New.
7072 (_initialize_exec): Don't call init_exec_ops.
7073 * gdbcore.h (exec_file_clear): Delete.
7074
7075 * corefile.c (core_target): Delete.
7076 (core_file_command): Adjust.
7077 * corelow.c (core_target): New class.
7078 (the_core_target): New.
7079 (core_close): Remove target_ops parameter.
7080 (core_close_cleanup): Adjust.
7081 (core_target::close): New.
7082 (core_open, core_detach, get_core_registers, core_files_info)
7083 (core_xfer_partial, core_thread_alive, core_read_description)
7084 (core_pid_to_str, core_thread_name, core_has_memory)
7085 (core_has_stack, core_has_registers, core_info_proc): Rework as
7086 core_target methods.
7087 (ignore, core_remove_breakpoint, init_core_ops): Delete.
7088 (_initialize_corelow): Initialize the_core_target.
7089 * gdbcore.h (core_target): Delete.
7090 (the_core_target): New.
7091
7092 * ctf.c: (ctf_target): New class.
7093 (ctf_ops): Now a ctf_target.
7094 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
7095 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
7096 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
7097 methods.
7098 (init_ctf_ops): Delete.
7099 (_initialize_ctf): Don't call it.
7100 * tracefile-tfile.c (tfile_target): New class.
7101 (tfile_ops): Now a tfile_target.
7102 (tfile_open, tfile_close, tfile_files_info)
7103 (tfile_get_tracepoint_status, tfile_trace_find)
7104 (tfile_fetch_registers, tfile_xfer_partial)
7105 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
7106 Refactor as tfile_target methods.
7107 (tfile_xfer_partial_features): Remove target_ops parameter.
7108 (init_tfile_ops): Delete.
7109 (_initialize_tracefile_tfile): Don't call it.
7110 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
7111 (tracefile_has_stack, tracefile_has_registers)
7112 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
7113 tracefile_target methods.
7114 (init_tracefile_ops): Delete.
7115 (tracefile_target::tracefile_target): New.
7116 * tracefile.h: Include "target.h".
7117 (tracefile_target): New class.
7118 (init_tracefile_ops): Delete.
7119
7120 * spu-multiarch.c (spu_multiarch_target): New class.
7121 (spu_ops): Now a spu_multiarch_target.
7122 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
7123 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
7124 (spu_search_memory, spu_mourn_inferior): Refactor as
7125 spu_multiarch_target methods.
7126 (init_spu_ops): Delete.
7127 (_initialize_spu_multiarch): Remove references to init_spu_ops,
7128 complete_target_initialization.
7129
7130 * ravenscar-thread.c (ravenscar_thread_target): New class.
7131 (ravenscar_ops): Now a ravenscar_thread_target.
7132 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
7133 (ravenscar_thread_alive, ravenscar_pid_to_str)
7134 (ravenscar_fetch_registers, ravenscar_store_registers)
7135 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
7136 (ravenscar_stopped_by_hw_breakpoint)
7137 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
7138 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
7139 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
7140 methods.
7141 (init_ravenscar_thread_ops): Delete.
7142 (_initialize_ravenscar): Remove references to
7143 init_ravenscar_thread_ops and complete_target_initialization.
7144
7145 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
7146 (bsd_uthread_target): New class.
7147 (bsd_uthread_ops): Now a bsd_uthread_target.
7148 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
7149 (bsd_uthread_close, bsd_uthread_mourn_inferior)
7150 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
7151 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
7152 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
7153 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
7154 (bsd_uthread_target): Delete function.
7155 (_initialize_bsd_uthread): Remove reference to
7156 complete_target_initialization.
7157
7158 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
7159 (target_bfd): ... this new class.
7160 (target_bfd_xfer_partial, target_bfd_get_section_table)
7161 (target_bfd_close): Refactor as target_bfd methods.
7162 (target_bfd::~target_bfd): New.
7163 (target_bfd_reopen): Adjust.
7164 (target_bfd::close): New.
7165
7166 * record-btrace.c (record_btrace_target): New class.
7167 (record_btrace_ops): Now a record_btrace_target.
7168 (record_btrace_open, record_btrace_stop_recording)
7169 (record_btrace_disconnect, record_btrace_close)
7170 (record_btrace_async, record_btrace_info)
7171 (record_btrace_insn_history, record_btrace_insn_history_range)
7172 (record_btrace_insn_history_from, record_btrace_call_history)
7173 (record_btrace_call_history_range)
7174 (record_btrace_call_history_from, record_btrace_record_method)
7175 (record_btrace_is_replaying, record_btrace_will_replay)
7176 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
7177 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
7178 (record_btrace_store_registers, record_btrace_prepare_to_store)
7179 (record_btrace_to_get_unwinder)
7180 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
7181 (record_btrace_commit_resume, record_btrace_wait)
7182 (record_btrace_stop, record_btrace_can_execute_reverse)
7183 (record_btrace_stopped_by_sw_breakpoint)
7184 (record_btrace_supports_stopped_by_sw_breakpoint)
7185 (record_btrace_stopped_by_hw_breakpoint)
7186 (record_btrace_supports_stopped_by_hw_breakpoint)
7187 (record_btrace_update_thread_list, record_btrace_thread_alive)
7188 (record_btrace_goto_begin, record_btrace_goto_end)
7189 (record_btrace_goto, record_btrace_stop_replaying_all)
7190 (record_btrace_execution_direction)
7191 (record_btrace_prepare_to_generate_core)
7192 (record_btrace_done_generating_core): Refactor as
7193 record_btrace_target methods.
7194 (init_record_btrace_ops): Delete.
7195 (_initialize_record_btrace): Remove reference to
7196 init_record_btrace_ops.
7197 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
7198 the execution_direction global.
7199 (record_full_base_target, record_full_target)
7200 (record_full_core_target): New classes.
7201 (record_full_ops): Now a record_full_target.
7202 (record_full_core_ops): Now a record_full_core_target.
7203 (record_full_target::detach, record_full_target::disconnect)
7204 (record_full_core_target::disconnect)
7205 (record_full_target::mourn_inferior, record_full_target::kill):
7206 New.
7207 (record_full_open, record_full_close, record_full_async): Refactor
7208 as methods of the record_full_base_target class.
7209 (record_full_resume, record_full_commit_resume): Refactor
7210 as methods of the record_full_target class.
7211 (record_full_wait, record_full_stopped_by_watchpoint)
7212 (record_full_stopped_data_address)
7213 (record_full_stopped_by_sw_breakpoint)
7214 (record_full_supports_stopped_by_sw_breakpoint)
7215 (record_full_stopped_by_hw_breakpoint)
7216 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
7217 methods of the record_full_base_target class.
7218 (record_full_store_registers, record_full_xfer_partial)
7219 (record_full_insert_breakpoint, record_full_remove_breakpoint):
7220 Refactor as methods of the record_full_target class.
7221 (record_full_can_execute_reverse, record_full_get_bookmark)
7222 (record_full_goto_bookmark, record_full_execution_direction)
7223 (record_full_record_method, record_full_info, record_full_delete)
7224 (record_full_is_replaying, record_full_will_replay)
7225 (record_full_goto_begin, record_full_goto_end, record_full_goto)
7226 (record_full_stop_replaying): Refactor as methods of the
7227 record_full_base_target class.
7228 (record_full_core_resume, record_full_core_kill)
7229 (record_full_core_fetch_registers)
7230 (record_full_core_prepare_to_store)
7231 (record_full_core_store_registers, record_full_core_xfer_partial)
7232 (record_full_core_insert_breakpoint)
7233 (record_full_core_remove_breakpoint)
7234 (record_full_core_has_execution): Refactor
7235 as methods of the record_full_core_target class.
7236 (record_full_base_target::supports_delete_record): New.
7237 (init_record_full_ops): Delete.
7238 (init_record_full_core_ops): Delete.
7239 (record_full_save): Refactor as method of the
7240 record_full_base_target class.
7241 (_initialize_record_full): Remove references to
7242 init_record_full_ops and init_record_full_core_ops.
7243
7244 * remote.c (remote_target, extended_remote_target): New classes.
7245 (remote_ops): Now a remote_target.
7246 (extended_remote_ops): Now an extended_remote_target.
7247 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
7248 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
7249 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
7250 (remote_pass_signals, remote_set_syscall_catchpoint)
7251 (remote_program_signals, )
7252 (remote_thread_always_alive): Remove target_ops parameter.
7253 (remote_thread_alive, remote_thread_name)
7254 (remote_update_thread_list, remote_threads_extra_info)
7255 (remote_static_tracepoint_marker_at)
7256 (remote_static_tracepoint_markers_by_strid)
7257 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
7258 (remote_open): Refactor as methods of remote_target.
7259 (extended_remote_open, extended_remote_detach)
7260 (extended_remote_attach, extended_remote_post_attach):
7261 (extended_remote_supports_disable_randomization)
7262 (extended_remote_create_inferior): : Refactor as method of
7263 extended_remote_target.
7264 (remote_set_permissions, remote_open_1, remote_detach)
7265 (remote_follow_fork, remote_follow_exec, remote_disconnect)
7266 (remote_resume, remote_commit_resume, remote_stop)
7267 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
7268 (remote_terminal_ours, remote_wait, remote_fetch_registers)
7269 (remote_prepare_to_store, remote_store_registers)
7270 (remote_flash_erase, remote_flash_done, remote_files_info)
7271 (remote_kill, remote_mourn, remote_insert_breakpoint)
7272 (remote_remove_breakpoint, remote_insert_watchpoint)
7273 (remote_watchpoint_addr_within_range)
7274 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
7275 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
7276 (remote_supports_stopped_by_sw_breakpoint)
7277 (remote_stopped_by_hw_breakpoint)
7278 (remote_supports_stopped_by_hw_breakpoint)
7279 (remote_stopped_by_watchpoint, remote_stopped_data_address)
7280 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
7281 (remote_verify_memory): Refactor as methods of remote_target.
7282 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
7283 parameter.
7284 (remote_xfer_partial, remote_get_memory_xfer_limit)
7285 (remote_search_memory, remote_rcmd, remote_memory_map)
7286 (remote_pid_to_str, remote_get_thread_local_address)
7287 (remote_get_tib_address, remote_read_description): Refactor as
7288 methods of remote_target.
7289 (remote_target::fileio_open, remote_target::fileio_pwrite)
7290 (remote_target::fileio_pread, remote_target::fileio_close): New.
7291 (remote_hostio_readlink, remote_hostio_fstat)
7292 (remote_filesystem_is_local, remote_can_execute_reverse)
7293 (remote_supports_non_stop, remote_supports_disable_randomization)
7294 (remote_supports_multi_process, remote_supports_cond_breakpoints)
7295 (remote_supports_enable_disable_tracepoint)
7296 (remote_supports_string_tracing)
7297 (remote_can_run_breakpoint_commands, remote_trace_init)
7298 (remote_download_tracepoint, remote_can_download_tracepoint)
7299 (remote_download_trace_state_variable, remote_enable_tracepoint)
7300 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
7301 (remote_trace_start, remote_get_trace_status)
7302 (remote_get_tracepoint_status, remote_trace_stop)
7303 (remote_trace_find, remote_get_trace_state_variable_value)
7304 (remote_save_trace_data, remote_get_raw_trace_data)
7305 (remote_set_disconnected_tracing, remote_core_of_thread)
7306 (remote_set_circular_trace_buffer, remote_traceframe_info)
7307 (remote_get_min_fast_tracepoint_insn_len)
7308 (remote_set_trace_buffer_size, remote_set_trace_notes)
7309 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
7310 (remote_disable_btrace, remote_teardown_btrace)
7311 (remote_read_btrace, remote_btrace_conf)
7312 (remote_augmented_libraries_svr4_read, remote_load)
7313 (remote_pid_to_exec_file, remote_can_do_single_step)
7314 (remote_execution_direction, remote_thread_handle_to_thread_info):
7315 Refactor as methods of remote_target.
7316 (init_remote_ops, init_extended_remote_ops): Delete.
7317 (remote_can_async_p, remote_is_async_p, remote_async)
7318 (remote_thread_events, remote_upload_tracepoints)
7319 (remote_upload_trace_state_variables): Refactor as methods of
7320 remote_target.
7321 (_initialize_remote): Remove references to init_remote_ops and
7322 init_extended_remote_ops.
7323
7324 * remote-sim.c (gdbsim_target): New class.
7325 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
7326 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
7327 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
7328 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
7329 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
7330 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
7331 Refactor as methods of gdbsim_target.
7332 (gdbsim_ops): Now a gdbsim_target.
7333 (init_gdbsim_ops): Delete.
7334 (gdbsim_cntrl_c): Adjust.
7335 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
7336
7337 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
7338 (the_amd64_linux_nat_target): New.
7339 (amd64_linux_fetch_inferior_registers)
7340 (amd64_linux_store_inferior_registers): Refactor as methods of
7341 amd64_linux_nat_target.
7342 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
7343 * i386-linux-nat.c: Don't include "linux-nat.h".
7344 (i386_linux_nat_target): New class.
7345 (the_i386_linux_nat_target): New.
7346 (i386_linux_fetch_inferior_registers)
7347 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
7348 as methods of i386_linux_nat_target.
7349 (_initialize_i386_linux_nat): Adjust. Set linux_target.
7350 * inf-child.c (inf_child_ops): Delete.
7351 (inf_child_fetch_inferior_registers)
7352 (inf_child_store_inferior_registers): Delete.
7353 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
7354 methods of inf_child_target.
7355 (inf_child_target::supports_terminal_ours)
7356 (inf_child_target::terminal_init)
7357 (inf_child_target::terminal_inferior)
7358 (inf_child_target::terminal_ours_for_output)
7359 (inf_child_target::terminal_ours, inf_child_target::interrupt)
7360 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
7361 New.
7362 (inf_child_open, inf_child_disconnect, inf_child_close)
7363 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
7364 (inf_child_post_startup_inferior, inf_child_can_run)
7365 (inf_child_pid_to_exec_file): Refactor as methods of
7366 inf_child_target.
7367 (inf_child_follow_fork): Delete.
7368 (inf_child_target::can_create_inferior)
7369 (inf_child_target::can_attach): New.
7370 (inf_child_target::has_all_memory, inf_child_target::has_memory)
7371 (inf_child_target::has_stack, inf_child_target::has_registers)
7372 (inf_child_target::has_execution): New.
7373 (inf_child_fileio_open, inf_child_fileio_pwrite)
7374 (inf_child_fileio_pread, inf_child_fileio_fstat)
7375 (inf_child_fileio_close, inf_child_fileio_unlink)
7376 (inf_child_fileio_readlink, inf_child_use_agent)
7377 (inf_child_can_use_agent): Refactor as methods of
7378 inf_child_target.
7379 (return_zero, inf_child_target): Delete.
7380 (inf_child_target::inf_child_target): New.
7381 * inf-child.h: Include "target.h".
7382 (inf_child_target): Delete function prototype.
7383 (inf_child_target): New class.
7384 (inf_child_open_target, inf_child_mourn_inferior)
7385 (inf_child_maybe_unpush_target): Delete.
7386 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
7387 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
7388 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
7389 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
7390 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
7391 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
7392 (inf_ptrace_wait, inf_ptrace_xfer_partial)
7393 (inf_ptrace_thread_alive, inf_ptrace_files_info)
7394 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
7395 methods of inf_ptrace_target.
7396 (inf_ptrace_target): Delete function.
7397 * inf-ptrace.h: Include "inf-child.h".
7398 (inf_ptrace_target): Delete function declaration.
7399 (inf_ptrace_target): New class.
7400 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
7401 * linux-nat.c (linux_target): New.
7402 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
7403 (linux_nat_target::~linux_nat_target): New.
7404 (linux_child_post_attach, linux_child_post_startup_inferior)
7405 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
7406 (linux_child_remove_fork_catchpoint)
7407 (linux_child_insert_vfork_catchpoint)
7408 (linux_child_remove_vfork_catchpoint)
7409 (linux_child_insert_exec_catchpoint)
7410 (linux_child_remove_exec_catchpoint)
7411 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
7412 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
7413 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
7414 (linux_nat_stopped_data_address)
7415 (linux_nat_stopped_by_sw_breakpoint)
7416 (linux_nat_supports_stopped_by_sw_breakpoint)
7417 (linux_nat_stopped_by_hw_breakpoint)
7418 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
7419 (linux_nat_kill, linux_nat_mourn_inferior)
7420 (linux_nat_xfer_partial, linux_nat_thread_alive)
7421 (linux_nat_update_thread_list, linux_nat_pid_to_str)
7422 (linux_nat_thread_name, linux_child_pid_to_exec_file)
7423 (linux_child_static_tracepoint_markers_by_strid)
7424 (linux_nat_is_async_p, linux_nat_can_async_p)
7425 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
7426 (linux_nat_supports_multi_process)
7427 (linux_nat_supports_disable_randomization, linux_nat_async)
7428 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
7429 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
7430 (linux_nat_fileio_open, linux_nat_fileio_readlink)
7431 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
7432 methods of linux_nat_target.
7433 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
7434 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
7435 parameter.
7436 (check_stopped_by_watchpoint): Adjust.
7437 (linux_xfer_partial): Delete.
7438 (linux_target_install_ops, linux_target, linux_nat_add_target):
7439 Delete.
7440 (linux_nat_target::linux_nat_target): New.
7441 * linux-nat.h: Include "inf-ptrace.h".
7442 (linux_nat_target): New.
7443 (linux_target, linux_target_install_ops, linux_nat_add_target):
7444 Delete function declarations.
7445 (linux_target): Declare global.
7446 * linux-thread-db.c (thread_db_target): New.
7447 (thread_db_target::thread_db_target): New.
7448 (thread_db_ops): Delete.
7449 (the_thread_db_target): New.
7450 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
7451 (thread_db_update_thread_list, thread_db_pid_to_str)
7452 (thread_db_extra_thread_info)
7453 (thread_db_thread_handle_to_thread_info)
7454 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
7455 (thread_db_resume): Refactor as methods of thread_db_target.
7456 (init_thread_db_ops): Delete.
7457 (_initialize_thread_db): Remove reference to init_thread_db_ops.
7458 * x86-linux-nat.c: Don't include "linux-nat.h".
7459 (super_post_startup_inferior): Delete.
7460 (x86_linux_nat_target::~x86_linux_nat_target): New.
7461 (x86_linux_child_post_startup_inferior)
7462 (x86_linux_read_description, x86_linux_enable_btrace)
7463 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
7464 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
7465 methods of x86_linux_nat_target.
7466 (x86_linux_create_target): Delete. Bits folded ...
7467 (x86_linux_add_target): ... here. Now takes a linux_nat_target
7468 pointer.
7469 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
7470 (x86_linux_nat_target): New class.
7471 (x86_linux_create_target): Delete.
7472 (x86_linux_add_target): Now takes a linux_nat_target pointer.
7473 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
7474 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
7475 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
7476 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
7477 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
7478 make extern.
7479 (x86_use_watchpoints): Delete.
7480 * x86-nat.h: Include "breakpoint.h" and "target.h".
7481 (x86_use_watchpoints): Delete.
7482 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
7483 (x86_stopped_by_watchpoint, x86_stopped_data_address)
7484 (x86_insert_watchpoint, x86_remove_watchpoint)
7485 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
7486 (x86_stopped_by_hw_breakpoint): New declarations.
7487 (x86_nat_target): New template class.
7488
7489 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
7490 (the_ppc_linux_nat_target): New.
7491 (ppc_linux_fetch_inferior_registers)
7492 (ppc_linux_can_use_hw_breakpoint)
7493 (ppc_linux_region_ok_for_hw_watchpoint)
7494 (ppc_linux_ranged_break_num_registers)
7495 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
7496 (ppc_linux_insert_mask_watchpoint)
7497 (ppc_linux_remove_mask_watchpoint)
7498 (ppc_linux_can_accel_watchpoint_condition)
7499 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
7500 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
7501 (ppc_linux_watchpoint_addr_within_range)
7502 (ppc_linux_masked_watch_num_registers)
7503 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
7504 (ppc_linux_read_description): Refactor as methods of
7505 ppc_linux_nat_target.
7506 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
7507
7508 * procfs.c (procfs_xfer_partial): Delete forward declaration.
7509 (procfs_target): New class.
7510 (the_procfs_target): New.
7511 (procfs_target): Delete function.
7512 (procfs_auxv_parse, procfs_attach, procfs_detach)
7513 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
7514 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
7515 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
7516 (procfs_create_inferior, procfs_update_thread_list)
7517 (procfs_thread_alive, procfs_pid_to_str)
7518 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
7519 (procfs_stopped_data_address, procfs_insert_watchpoint)
7520 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
7521 (proc_find_memory_regions, procfs_info_proc)
7522 (procfs_make_note_section): Refactor as methods of procfs_target.
7523 (_initialize_procfs): Adjust.
7524 * sol-thread.c (sol_thread_target): New class.
7525 (sol_thread_ops): Now a sol_thread_target.
7526 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
7527 (sol_thread_fetch_registers, sol_thread_store_registers)
7528 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
7529 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
7530 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
7531 (init_sol_thread_ops): Delete.
7532 (_initialize_sol_thread): Adjust. Remove references to
7533 init_sol_thread_ops and complete_target_initialization.
7534
7535 * windows-nat.c (windows_nat_target): New class.
7536 (windows_fetch_inferior_registers)
7537 (windows_store_inferior_registers, windows_resume, windows_wait)
7538 (windows_attach, windows_detach, windows_pid_to_exec_file)
7539 (windows_files_info, windows_create_inferior)
7540 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
7541 (windows_close, windows_pid_to_str, windows_xfer_partial)
7542 (windows_get_tib_address, windows_get_ada_task_ptid)
7543 (windows_thread_name, windows_thread_alive): Refactor as
7544 windows_nat_target methods.
7545 (do_initial_windows_stuff): Adjust.
7546 (windows_target): Delete function.
7547 (_initialize_windows_nat): Adjust.
7548
7549 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
7550 (darwin_mourn_inferior, darwin_kill_inferior)
7551 (darwin_create_inferior, darwin_attach, darwin_detach)
7552 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
7553 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
7554 (darwin_supports_multi_process): Refactor as darwin_nat_target
7555 methods.
7556 (darwin_resume_to, darwin_files_info): Delete.
7557 (_initialize_darwin_inferior): Rename to ...
7558 (_initialize_darwin_nat): ... this. Adjust to C++ification.
7559 * darwin-nat.h: Include "inf-child.h".
7560 (darwin_nat_target): New class.
7561 (darwin_complete_target): Delete.
7562 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
7563 (darwin_target): New.
7564 (i386_darwin_fetch_inferior_registers)
7565 (i386_darwin_store_inferior_registers): Refactor as methods of
7566 darwin_nat_target.
7567 (darwin_complete_target): Delete, with ...
7568 (_initialize_i386_darwin_nat): ... bits factored out here.
7569
7570 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
7571 (the_alpha_linux_nat_target): New.
7572 (alpha_linux_register_u_offset): Refactor as
7573 alpha_linux_nat_target method.
7574 (_initialize_alpha_linux_nat): Adjust.
7575 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
7576 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7577 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
7578 methods of linux_nat_trad_target.
7579 (linux_trad_target): Delete.
7580 * linux-nat-trad.h (linux_trad_target): Delete function.
7581 (linux_nat_trad_target): New class.
7582 * mips-linux-nat.c (mips_linux_nat_target): New class.
7583 (super_fetch_registers, super_store_registers, super_close):
7584 Delete.
7585 (the_mips_linux_nat_target): New.
7586 (mips64_linux_regsets_fetch_registers)
7587 (mips64_linux_regsets_store_registers)
7588 (mips64_linux_fetch_registers, mips64_linux_store_registers)
7589 (mips_linux_register_u_offset, mips_linux_read_description)
7590 (mips_linux_can_use_hw_breakpoint)
7591 (mips_linux_stopped_by_watchpoint)
7592 (mips_linux_stopped_data_address)
7593 (mips_linux_region_ok_for_hw_watchpoint)
7594 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
7595 (mips_linux_close): Refactor as methods of mips_linux_nat.
7596 (_initialize_mips_linux_nat): Adjust to C++ification.
7597
7598 * aix-thread.c (aix_thread_target): New class.
7599 (aix_thread_ops): Now an aix_thread_target.
7600 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
7601 (aix_thread_fetch_registers, aix_thread_store_registers)
7602 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
7603 (aix_thread_thread_alive, aix_thread_pid_to_str)
7604 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
7605 Refactor as methods of aix_thread_target.
7606 (init_aix_thread_ops): Delete.
7607 (_initialize_aix_thread): Remove references to init_aix_thread_ops
7608 and complete_target_initialization.
7609 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
7610 (rs6000_nat_target): New class.
7611 (the_rs6000_nat_target): New.
7612 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
7613 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
7614 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
7615 (super_create_inferior): Delete.
7616 (_initialize_rs6000_nat): Adjust to C++ification.
7617
7618 * arm-linux-nat.c (arm_linux_nat_target): New class.
7619 (the_arm_linux_nat_target): New.
7620 (arm_linux_fetch_inferior_registers)
7621 (arm_linux_store_inferior_registers, arm_linux_read_description)
7622 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
7623 (arm_linux_remove_hw_breakpoint)
7624 (arm_linux_region_ok_for_hw_watchpoint)
7625 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
7626 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
7627 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
7628 arm_linux_nat_target.
7629 (_initialize_arm_linux_nat): Adjust to C++ification.
7630
7631 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
7632 (the_aarch64_linux_nat_target): New.
7633 (aarch64_linux_fetch_inferior_registers)
7634 (aarch64_linux_store_inferior_registers)
7635 (aarch64_linux_child_post_startup_inferior)
7636 (aarch64_linux_read_description)
7637 (aarch64_linux_can_use_hw_breakpoint)
7638 (aarch64_linux_insert_hw_breakpoint)
7639 (aarch64_linux_remove_hw_breakpoint)
7640 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
7641 (aarch64_linux_region_ok_for_hw_watchpoint)
7642 (aarch64_linux_stopped_data_address)
7643 (aarch64_linux_stopped_by_watchpoint)
7644 (aarch64_linux_watchpoint_addr_within_range)
7645 (aarch64_linux_can_do_single_step): Refactor as methods of
7646 aarch64_linux_nat_target.
7647 (super_post_startup_inferior): Delete.
7648 (_initialize_aarch64_linux_nat): Adjust to C++ification.
7649
7650 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
7651 (the_hppa_linux_nat_target): New.
7652 (hppa_linux_fetch_inferior_registers)
7653 (hppa_linux_store_inferior_registers): Refactor as methods of
7654 hppa_linux_nat_target.
7655 (_initialize_hppa_linux_nat): Adjust to C++ification.
7656
7657 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
7658 (the_ia64_linux_nat_target): New.
7659 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
7660 (ia64_linux_stopped_data_address)
7661 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
7662 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
7663 ia64_linux_nat_target methods.
7664 (super_xfer_partial): Delete.
7665 (_initialize_ia64_linux_nat): Adjust to C++ification.
7666
7667 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
7668 (the_m32r_linux_nat_target): New.
7669 (m32r_linux_fetch_inferior_registers)
7670 (m32r_linux_store_inferior_registers): Refactor as
7671 m32r_linux_nat_target methods.
7672 (_initialize_m32r_linux_nat): Adjust to C++ification.
7673
7674 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
7675 (the_m68k_linux_nat_target): New.
7676 (m68k_linux_fetch_inferior_registers)
7677 (m68k_linux_store_inferior_registers): Refactor as
7678 m68k_linux_nat_target methods.
7679 (_initialize_m68k_linux_nat): Adjust to C++ification.
7680
7681 * s390-linux-nat.c (s390_linux_nat_target): New class.
7682 (the_s390_linux_nat_target): New.
7683 (s390_linux_fetch_inferior_registers)
7684 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
7685 (s390_insert_watchpoint, s390_remove_watchpoint)
7686 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
7687 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
7688 (s390_auxv_parse, s390_read_description): Refactor as methods of
7689 s390_linux_nat_target.
7690 (_initialize_s390_nat): Adjust to C++ification.
7691
7692 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
7693 (the_sparc_linux_nat_target): New.
7694 (_initialize_sparc_linux_nat): Adjust to C++ification.
7695 * sparc-nat.c (sparc_fetch_inferior_registers)
7696 (sparc_store_inferior_registers): Remove target_ops parameter.
7697 * sparc-nat.h (sparc_fetch_inferior_registers)
7698 (sparc_store_inferior_registers): Remove target_ops parameter.
7699 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
7700 (the_sparc64_linux_nat_target): New.
7701 (_initialize_sparc64_linux_nat): Adjust to C++ification.
7702
7703 * spu-linux-nat.c (spu_linux_nat_target): New class.
7704 (the_spu_linux_nat_target): New.
7705 (spu_child_post_startup_inferior, spu_child_post_attach)
7706 (spu_child_wait, spu_fetch_inferior_registers)
7707 (spu_store_inferior_registers, spu_xfer_partial)
7708 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
7709 methods.
7710 (_initialize_spu_nat): Adjust to C++ification.
7711
7712 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
7713 (the_tilegx_linux_nat_target): New.
7714 (fetch_inferior_registers, store_inferior_registers):
7715 Refactor as methods.
7716 (_initialize_tile_linux_nat): Adjust to C++ification.
7717
7718 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
7719 (the_xtensa_linux_nat_target): New.
7720 (xtensa_linux_fetch_inferior_registers)
7721 (xtensa_linux_store_inferior_registers): Refactor as
7722 xtensa_linux_nat_target methods.
7723 (_initialize_xtensa_linux_nat): Adjust to C++ification.
7724
7725 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
7726 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
7727 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
7728 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
7729 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
7730 (fbsd_stopped_by_sw_breakpoint)
7731 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
7732 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
7733 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
7734 (fbsd_post_startup_inferior, fbsd_post_attach)
7735 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
7736 (fbsd_set_syscall_catchpoint)
7737 (super_xfer_partial, super_resume, super_wait)
7738 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
7739 (fbsd_handle_debug_trap): Remove target_ops parameter.
7740 (fbsd_nat_add_target): Delete.
7741 * fbsd-nat.h: Include "inf-ptrace.h".
7742 (fbsd_nat_add_target): Delete.
7743 (USE_SIGTRAP_SIGINFO): Define.
7744 (fbsd_nat_target): New class.
7745
7746 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
7747 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
7748 (amd64bsd_target): Delete.
7749 * amd64-bsd-nat.h: New file.
7750 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
7751 "x86-bsd-nat.h".
7752 (amd64_fbsd_nat_target): New class.
7753 (the_amd64_fbsd_nat_target): New.
7754 (amd64fbsd_read_description): Refactor as method of
7755 amd64_fbsd_nat_target.
7756 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7757 (_initialize_amd64fbsd_nat): Adjust to C++ification.
7758 * amd64-nat.h (amd64bsd_target): Delete function declaration.
7759 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
7760 (i386bsd_store_inferior_registers): Remove target_ops parameter.
7761 (i386bsd_target): Delete.
7762 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
7763 (i386bsd_fetch_inferior_registers)
7764 (i386bsd_store_inferior_registers): Declare.
7765 (i386_bsd_nat_target): New class.
7766 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
7767 (the_i386_fbsd_nat_target): New.
7768 (i386fbsd_resume, i386fbsd_read_description): Refactor as
7769 i386_fbsd_nat_target methods.
7770 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
7771 (_initialize_i386fbsd_nat): Adjust to C++ification.
7772 * x86-bsd-nat.c (super_mourn_inferior): Delete.
7773 (x86bsd_mourn_inferior, x86bsd_target): Delete.
7774 (_initialize_x86_bsd_nat): Adjust to C++ification.
7775 * x86-bsd-nat.h: Include "x86-nat.h".
7776 (x86bsd_target): Delete declaration.
7777 (x86bsd_nat_target): New class.
7778
7779 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
7780 (the_aarch64_fbsd_nat_target): New.
7781 (aarch64_fbsd_fetch_inferior_registers)
7782 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
7783 aarch64_fbsd_nat_target.
7784 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
7785 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
7786 (the_alpha_bsd_nat_target): New.
7787 (alphabsd_fetch_inferior_registers)
7788 (alphabsd_store_inferior_registers): Refactor as
7789 alpha_bsd_nat_target methods.
7790 (_initialize_alphabsd_nat): Refactor as methods of
7791 alpha_bsd_nat_target.
7792 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
7793 (the_amd64_nbsd_nat_target): New.
7794 (_initialize_amd64nbsd_nat): Adjust to C++ification.
7795 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
7796 (the_amd64_obsd_nat_target): New.
7797 (_initialize_amd64obsd_nat): Adjust to C++ification.
7798 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
7799 (the_arm_fbsd_nat_target): New.
7800 (arm_fbsd_fetch_inferior_registers)
7801 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
7802 (_initialize_arm_fbsd_nat): Refactor as methods of
7803 arm_fbsd_nat_target.
7804 (_initialize_arm_fbsd_nat): Adjust to C++ification.
7805 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
7806 (the_arm_netbsd_nat_target): New.
7807 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
7808 arm_netbsd_nat_target.
7809 (_initialize_arm_netbsd_nat): Adjust to C++ification.
7810 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
7811 (the_hppa_nbsd_nat_target): New.
7812 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
7813 hppa_nbsd_nat_target methods.
7814 (_initialize_hppanbsd_nat): Adjust to C++ification.
7815 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
7816 (the_hppa_obsd_nat_target): New.
7817 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
7818 methods of hppa_obsd_nat_target.
7819 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
7820 add_target.
7821 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
7822 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
7823 add_target.
7824 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
7825 (_initialize_i386obsd_nat): Use add_target.
7826 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
7827 (the_m68k_bsd_nat_target): New.
7828 (m68kbsd_fetch_inferior_registers)
7829 (m68kbsd_store_inferior_registers): Refactor as methods of
7830 m68k_bsd_nat_target.
7831 (_initialize_m68kbsd_nat): Adjust to C++ification.
7832 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
7833 (the_mips_fbsd_nat_target): New.
7834 (mips_fbsd_fetch_inferior_registers)
7835 (mips_fbsd_store_inferior_registers): Refactor as methods of
7836 mips_fbsd_nat_target.
7837 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
7838 add_target.
7839 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
7840 (the_mips_nbsd_nat_target): New.
7841 (mipsnbsd_fetch_inferior_registers)
7842 (mipsnbsd_store_inferior_registers): Refactor as methods of
7843 mips_nbsd_nat_target.
7844 (_initialize_mipsnbsd_nat): Adjust to C++ification.
7845 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
7846 (the_mips64_obsd_nat_target): New.
7847 (mips64obsd_fetch_inferior_registers)
7848 (mips64obsd_store_inferior_registers): Refactor as methods of
7849 mips64_obsd_nat_target.
7850 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
7851 add_target.
7852 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
7853 nbsd_nat_target.
7854 * nbsd-nat.h: Include "inf-ptrace.h".
7855 (nbsd_nat_target): New class.
7856 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
7857 (obsd_wait): Refactor as methods of obsd_nat_target.
7858 (obsd_add_target): Delete.
7859 * obsd-nat.h: Include "inf-ptrace.h".
7860 (obsd_nat_target): New class.
7861 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
7862 (the_ppc_fbsd_nat_target): New.
7863 (ppcfbsd_fetch_inferior_registers)
7864 (ppcfbsd_store_inferior_registers): Refactor as methods of
7865 ppc_fbsd_nat_target.
7866 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
7867 add_target.
7868 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
7869 (the_ppc_nbsd_nat_target): New.
7870 (ppcnbsd_fetch_inferior_registers)
7871 (ppcnbsd_store_inferior_registers): Refactor as methods of
7872 ppc_nbsd_nat_target.
7873 (_initialize_ppcnbsd_nat): Adjust to C++ification.
7874 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
7875 (the_ppc_obsd_nat_target): New.
7876 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
7877 methods of ppc_obsd_nat_target.
7878 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
7879 add_target.
7880 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
7881 (the_sh_nbsd_nat_target): New.
7882 (shnbsd_fetch_inferior_registers)
7883 (shnbsd_store_inferior_registers): Refactor as methods of
7884 sh_nbsd_nat_target.
7885 (_initialize_shnbsd_nat): Adjust to C++ification.
7886 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
7887 (inf_ptrace_xfer_partial): Delete.
7888 (sparc_xfer_partial, sparc_target): Delete.
7889 * sparc-nat.h (sparc_fetch_inferior_registers)
7890 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
7891 (sparc_target): Delete function declaration.
7892 (sparc_target): New template class.
7893 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
7894 (_initialize_sparcnbsd_nat): Adjust to C++ification.
7895 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
7896 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
7897 add_target.
7898 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
7899 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
7900 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
7901 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
7902 add_target.
7903 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
7904 (the_vax_bsd_nat_target): New.
7905 (vaxbsd_fetch_inferior_registers)
7906 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
7907 methods.
7908 (_initialize_vaxbsd_nat): Adjust to C++ification.
7909
7910 * bsd-kvm.c (bsd_kvm_target): New class.
7911 (bsd_kvm_ops): Now a bsd_kvm_target.
7912 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
7913 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
7914 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
7915 bsd_kvm_target.
7916 (bsd_kvm_return_one): Delete.
7917 (bsd_kvm_add_target): Adjust to C++ification.
7918
7919 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
7920 (nto_procfs_target_procfs): New classes.
7921 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
7922 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
7923 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
7924 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
7925 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
7926 (procfs_remove_hw_breakpoint, procfs_resume)
7927 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
7928 (procfs_kill_inferior, procfs_store_registers)
7929 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
7930 as methods of nto_procfs_target.
7931 (nto_procfs_ops): Now an nto_procfs_target_procfs.
7932 (nto_native_ops): Delete.
7933 (procfs_open, procfs_native_open): Delete.
7934 (nto_native_ops): Now an nto_procfs_target_native.
7935 (init_procfs_targets): Adjust to C++ification.
7936 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
7937 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
7938 Refactor as methods of nto_procfs_target.
7939
7940 * go32-nat.c (go32_nat_target): New class.
7941 (the_go32_nat_target): New.
7942 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
7943 (go32_store_registers, go32_xfer_partial, go32_files_info)
7944 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
7945 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
7946 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
7947 (go32_pid_to_str): Refactor as methods of go32_nat_target.
7948 (go32_target): Delete.
7949 (_initialize_go32_nat): Adjust to C++ification.
7950
7951 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
7952 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
7953 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
7954 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
7955 gnu_nat_target.
7956 (gnu_target): Delete.
7957 * gnu-nat.h (gnu_target): Delete.
7958 (gnu_nat_target): New class.
7959 * i386-gnu-nat.c (gnu_base_target): New.
7960 (i386_gnu_nat_target): New class.
7961 (the_i386_gnu_nat_target): New.
7962 (_initialize_i386gnu_nat): Adjust to C++ification.
7963
7964 2018-05-02 Pedro Alves <palves@redhat.com>
7965
7966 * bfd-target.c (target_bfd_xclose): Rename to ...
7967 (target_bfd_close): ... this.
7968 (target_bfd_reopen): Adjust.
7969 * target.c (target_close): Remove references to to_xclose.
7970 * target.h (target_ops::to_xclose): Delete.
7971 (target_ops::to_close): Update comments.
7972
7973 2018-05-02 Pedro Alves <palves@redhat.com>
7974
7975 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
7976 "linux-nat.h".
7977 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
7978 * inf-ptrace.c (inf_ptrace_register_u_offset)
7979 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
7980 (inf_ptrace_store_register, inf_ptrace_store_registers)
7981 (inf_ptrace_trad_target): Move to ...
7982 * linux-nat-trad.c: ... this new file.
7983 * linux-nat-trad.h: New file.
7984 * linux-nat.c (linux_target_install_ops): Make extern.
7985 (linux_trad_target): Delete.
7986 * linux-nat.h (linux_trad_target): Delete declaration.
7987 (linux_target_install_ops): Declare.
7988 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
7989 "linux-nat.h".
7990
7991 2018-05-02 Pedro Alves <palves@redhat.com>
7992
7993 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
7994 procfs_target/add_target here.
7995 * procfs.c (procfs_target): Make static.
7996 (_initialize_procfs): Call add_target here.
7997 * procfs.h (struct target_ops): Remove forward declaration.
7998 (procfs_target): Remove declaration.
7999 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
8000
8001 2018-05-02 Pedro Alves <palves@redhat.com>
8002
8003 * procfs.c (procfs_stopped_by_watchpoint)
8004 (procfs_insert_watchpoint, procfs_remove_watchpoint)
8005 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
8006 Forward declare.
8007 (procfs_use_watchpoints): Delete, move contents...
8008 (procfs_target): ... here.
8009 * procfs.h (procfs_use_watchpoints): Delete declaration.
8010 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
8011 procfs_use_watchpoints.
8012 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
8013 procfs_use_watchpoints.
8014
8015 2018-05-02 Tom Tromey <tom@tromey.com>
8016
8017 PR python/20084:
8018 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
8019 and var_zuinteger_unlimited.
8020 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
8021 and PARAM_ZUINTEGER_UNLIMITED.
8022 (set_parameter_value): Handle var_zuinteger and
8023 var_zuinteger_unlimited.
8024 (add_setshow_generic): Likewise.
8025 (parmpy_init): Likewise.
8026
8027 2018-04-28 Dan Robertson <danlrobertson89@gmail.com>
8028
8029 PR rust/23124
8030 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
8031 pointer is not null before dereferencing it.
8032
8033 2018-04-30 Tom Tromey <tom@tromey.com>
8034
8035 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
8036 is_mi_like_p.
8037
8038 2018-04-30 Tom Tromey <tom@tromey.com>
8039
8040 * breakpoint.c (mention): Remove use of is_mi_like_p.
8041 (print_mention_ranged_breakpoint): Likewise.
8042 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
8043 of is_mi_like_p.
8044
8045 2018-04-30 Tom Tromey <tom@tromey.com>
8046
8047 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
8048
8049 2018-04-30 Tom Tromey <tom@tromey.com>
8050
8051 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
8052 (info_spu_event_command): Remove some uses of is_mi_like_p.
8053
8054 2018-04-30 Tom Tromey <tom@tromey.com>
8055
8056 * python/py-framefilter.c (py_print_single_arg)
8057 (enumerate_locals, py_print_args, py_print_frame): Remove some
8058 uses of is_mi_like_p.
8059
8060 2018-04-30 Tom Tromey <tom@tromey.com>
8061
8062 * ui-out.c: Update.
8063 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
8064 * ui-out.h (ui_out::is_mi_like_p): Now const.
8065 (ui_out::do_is_mi_like_p): Now const.
8066 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
8067
8068 2018-04-30 Tom Tromey <tom@tromey.com>
8069
8070 * varobj.c (varobj_set_visualizer): Use new_reference.
8071 * python/python.c (gdbpy_decode_line): Use new_reference.
8072 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
8073 new_reference.
8074
8075 2018-04-30 Tom Tromey <tom@tromey.com>
8076
8077 * varobj.c (install_new_value): Use new_reference.
8078 * value.h (value_incref): Return void. Swap intro comment with
8079 value_decref.
8080 * value.c (set_value_parent): Use new_reference.
8081 (value_incref): Return void. Update intro comment.
8082 (release_value): Use new_reference.
8083 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
8084
8085 2018-04-30 Tom Tromey <tom@tromey.com>
8086
8087 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
8088 * gdb_bfd.h (new_bfd_ref): Remove.
8089 (gdb_bfd_open): Update comment.
8090 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
8091 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
8092 (gdb_bfd_fdopenr): Use new_reference.
8093 * exec.c (exec_file_attach): Use new_reference.
8094
8095 2018-04-30 Tom Tromey <tom@tromey.com>
8096
8097 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
8098 method.
8099
8100 2018-04-30 Tom Tromey <tom@tromey.com>
8101
8102 * jit.c (jit_read_code_entry): Use type_align.
8103 * i386-tdep.c (i386_gdbarch_init): Don't call
8104 set_gdbarch_long_long_align_bit.
8105 * gdbarch.sh: Remove long_long_align_bit.
8106 * gdbarch.c, gdbarch.h: Rebuild.
8107 * arc-tdep.c (arc_type_align): New function.
8108 (arc_gdbarch_init): Use arc_type_align. Don't call
8109 set_gdbarch_long_long_align_bit.
8110
8111 2018-04-30 Tom Tromey <tom@tromey.com>
8112
8113 * rust-lang.c (rust_type_alignment): Remove.
8114 (rust_composite_type): Use type_align.
8115
8116 2018-04-30 Tom Tromey <tom@tromey.com>
8117
8118 * NEWS: Mention Type.align.
8119 * python/py-type.c (typy_get_alignof): New function.
8120 (type_object_getset): Add "alignof".
8121
8122 2018-04-30 Tom Tromey <tom@tromey.com>
8123
8124 PR exp/17095:
8125 * NEWS: Update.
8126 * std-operator.def (UNOP_ALIGNOF): New operator.
8127 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
8128 New.
8129 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
8130 * c-lang.c (c_op_print_tab): Add alignof.
8131 * c-exp.y (ALIGNOF): New token.
8132 (exp): Add "ALIGNOF" production.
8133 (ident_tokens): Add _Alignof and alignof.
8134
8135 2018-04-30 Tom Tromey <tom@tromey.com>
8136
8137 * i386-tdep.c (i386_type_align): New function.
8138 (i386_gdbarch_init): Update.
8139 * gdbarch.sh (type_align): New method.
8140 * gdbarch.c, gdbarch.h: Rebuild.
8141 * arch-utils.h (default_type_align): Declare.
8142 * arch-utils.c (default_type_align): New function.
8143 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
8144 (struct type) <align_log2>: New field.
8145 <instance_flags>: Now a bitfield.
8146 (TYPE_RAW_ALIGN): New macro.
8147 (type_align, type_raw_align, set_type_align): Declare.
8148 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
8149 functions.
8150 * dwarf2read.c (quirk_rust_enum): Set type alignment.
8151 (get_alignment, maybe_set_alignment): New functions.
8152 (read_structure_type, read_enumeration_type, read_array_type)
8153 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
8154 (read_subrange_type, read_base_type): Set type alignment.
8155
8156 2018-04-30 Simon Marchi <simon.marchi@ericsson.com>
8157
8158 * dwarf2read.c (read_index_from_section): Use bool.
8159
8160 2018-04-29 Fabian Groffen <grobian@gentoo.org>
8161
8162 PR gdb/22950
8163 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
8164 with #ifdef.
8165
8166 2018-04-29 John Reiser <jreiser@BitWagon.com>
8167
8168 PR build/22873
8169 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
8170 last step, and do it atomically.
8171
8172 2018-04-27 Alexandre Oliva <aoliva@redhat.com>
8173
8174 * compile/compile-c-types.c (convert_int, convert_float):
8175 Update for C FE v1.
8176
8177 2018-04-27 Tom Tromey <tom@tromey.com>
8178
8179 PR rust/22545:
8180 * rust-lang.c (rust_inclusive_range_type_p): New function.
8181 (rust_range): Handle inclusive ranges.
8182 (rust_compute_range): Likewise.
8183 * rust-exp.y (struct rust_op) <inclusive>: New field.
8184 (DOTDOTEQ): New constant.
8185 (range_expr): Add "..=" productions.
8186 (operator_tokens): Add "..=" token.
8187 (ast_range): Add "inclusive" parameter.
8188 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
8189 ranges.
8190 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
8191 bounds values.
8192 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
8193 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
8194 Update comments.
8195 * expprint.c (print_subexp_standard): Handle new bounds values.
8196 (dump_subexp_body_standard): Likewise.
8197
8198 2018-04-27 Tom Tromey <tom@tromey.com>
8199
8200 * configure: Rebuild.
8201 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
8202 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
8203 "OVERRIDE".
8204 (class symbol_needs_eval_context): Likewise.
8205 * dwarf2read.c (mock_mapped_index::symbol_name_count)
8206 (mock_mapped_index::symbol_name_at): Use "override". Remove
8207 "virtual".
8208 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
8209 "override".
8210 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
8211 * aarch64-tdep.c (instruction_reader::read): Use "override".
8212 (instruction_reader_test::read): Likewise.
8213 * arm-tdep.c (instruction_reader::read): Use "override".
8214 (instruction_reader_thumb::read): Likewise.
8215
8216 2018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
8217
8218 PR remote/9665
8219 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
8220 instead of remote_send.
8221 (remote_send): Remove.
8222
8223 2018-04-26 Pedro Alves <palves@redhat.com>
8224
8225 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
8226 find_function_start_sal instead of find_pc_line.
8227
8228 2018-04-26 Pedro Alves <palves@redhat.com>
8229
8230 * breakpoint.c (set_breakpoint_location_function): Handle
8231 mst_data_gnu_ifunc.
8232 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
8233 * elfread.c (elf_symtab_read): Give data symbols with
8234 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
8235 (elf_rel_plt_read): Update comment.
8236 * linespec.c (convert_linespec_to_sals): Handle
8237 mst_data_gnu_ifunc.
8238 (minsym_found): Handle mst_data_gnu_ifunc.
8239 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
8240 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
8241 * parse.c (find_minsym_type_and_address): Handle
8242 mst_data_gnu_ifunc.
8243 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
8244 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
8245 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
8246 comment.
8247 <mst_data_gnu_ifunc>: New enumerator.
8248
8249 2018-04-26 Pedro Alves <palves@redhat.com>
8250
8251 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
8252 (lookup_minimal_symbol_by_pc_section): ... this. Replace
8253 'want_trampoline' parameter by a lookup_msym_prefer parameter.
8254 Handle it.
8255 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
8256 (lookup_minimal_symbol_by_pc): Adjust.
8257 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
8258 (lookup_solib_trampoline_symbol_by_pc): Adjust.
8259 * minsyms.h (lookup_msym_prefer): New enum.
8260 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8261 parameter by a lookup_msym_prefer parameter.
8262
8263 2018-04-26 Pedro Alves <palves@redhat.com>
8264
8265 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
8266 ends in "@plt" instead of looking at the symbol's section.
8267
8268 2018-04-26 Pedro Alves <palves@redhat.com>
8269
8270 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
8271 all references.
8272 (find_pc_partial_function_gnu_ifunc): Rename to ...
8273 (find_pc_partial_function): ... this, and remove references to
8274 'is_gnu_ifunc_p'.
8275 (find_pc_partial_function): Delete old implementation.
8276 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
8277
8278 2018-04-26 Pedro Alves <palves@redhat.com>
8279
8280 * linespec.c (struct bound_minimal_symbol_search_key): New.
8281 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
8282 skip first line if we found a GNU ifunc minimal symbol by name.
8283 (compare_msymbols): Change parameters to work with a destructured
8284 lhs minsym.
8285 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
8286 functions.
8287
8288 2018-04-26 Pedro Alves <palves@redhat.com>
8289
8290 * breakpoint.c (set_breakpoint_location_function): Don't resolve
8291 ifunc targets here. Instead, if we have an ifunc minsym, use its
8292 address/name.
8293 (add_location_to_breakpoint): Store the minsym and the objfile in
8294 the breakpoint location.
8295 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
8296 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
8297 Record the minsym in the sal.
8298 * symtab.h (symtab_and_line) <msymbol>: New field.
8299
8300 2018-04-26 Pedro Alves <palves@redhat.com>
8301
8302 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
8303 unless we actually resolved the ifunc.
8304
8305 2018-04-26 Pedro Alves <palves@redhat.com>
8306
8307 * c-exp.y (variable production): Prefer ifunc minsyms over
8308 regular function symbols.
8309 * symtab.c (find_gnu_ifunc): New function.
8310 * minsyms.h (lookup_msym_prefer): New enum.
8311 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
8312 parameter by a lookup_msym_prefer parameter.
8313 * symtab.h (find_gnu_ifunc): New declaration.
8314
8315 2018-04-26 Pedro Alves <palves@redhat.com>
8316
8317 * blockframe.c (find_gnu_ifunc_target_type): New function.
8318 (find_function_type): New.
8319 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
8320 return a value with a memory address.
8321 (eval_call): For calls to GNU ifunc functions, try to find the
8322 type of the target function from the type that the resolver
8323 returns.
8324 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
8325 symbols.
8326 * infcall.c (find_function_return_type): Delete.
8327 (find_function_addr): Add 'function_type' parameter. For calls to
8328 GNU ifunc functions, try to find the type of the target function
8329 from the type that the resolver returns, and return it via
8330 FUNCTION_TYPE.
8331 (call_function_by_hand_dummy): Adjust to use the function type
8332 returned by find_function_addr.
8333 (find_function_addr): Add 'function_type' parameter and move
8334 description here.
8335 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
8336 declarations.
8337
8338 2018-04-26 Pedro Alves <palves@redhat.com>
8339
8340 * c-exp.y (variable production): Skip finding an alias for ifunc
8341 symbols.
8342
8343 2018-04-26 Pedro Alves <palves@redhat.com>
8344
8345 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
8346
8347 2018-04-25 Pedro Alves <palves@redhat.com>
8348
8349 * infcmd.c (kill_command): Print the pid as string, not the whole
8350 thread's ptid. Add comment. s/has been killed/killed/ in output
8351 message.
8352 * remote.c (remote_detach_1): Print the pid as string, not the
8353 whole thread's ptid.
8354
8355 2018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8356 Sergio Durigan Junior <sergiodj@redhat.com>
8357 Pedro Alves <palves@redhat.com>
8358
8359 * infcmd.c (kill_command): Print message when inferior has
8360 been killed.
8361 * inferior.c (print_inferior_events): Remove 'static'. Set as
8362 '1'.
8363 (add_inferior): Improve message printed when
8364 'print_inferior_events' is on.
8365 (exit_inferior): Remove message printed when
8366 'print_inferior_events' is on.
8367 (detach_inferior): Improve message printed when
8368 'print_inferior_events' is on.
8369 (initialize_inferiors): Use 'add_inferior_silent' to set
8370 'current_inferior_'.
8371 * inferior.h (print_inferior_events): Declare here as
8372 'extern'.
8373 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
8374 '[Detaching...]' messages when 'print_inferior_events' is on.
8375 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
8376 as prefix/suffix for messages. Remove periods. Fix erroneous
8377 'Detaching after fork from child...', replace it by '... from
8378 parent...'.
8379 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
8380 prefix/suffix when printing 'Detaching...' messages. Print
8381 them when 'print_inferior_events' is on.
8382 * remote.c (remote_detach_1): Print message when detaching
8383 from inferior and '!is_fork_parent'.
8384
8385 2018-04-24 Tom Tromey <tom@tromey.com>
8386
8387 * cli-out.h: Reindent.
8388
8389 2018-04-24 Tom Tromey <tom@tromey.com>
8390
8391 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
8392 (cli_ui_out::do_field_string): Use fputs_filtered.
8393 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
8394
8395 2018-04-23 Tom Tromey <tom@tromey.com>
8396
8397 * guile/scm-frame.c (gdbscm_frame_read_var): Use
8398 gdb::unique_xmalloc_ptr.
8399
8400 2018-04-23 Tom Tromey <tom@tromey.com>
8401
8402 * configure: Rebuild.
8403
8404 2018-04-22 Rajendra SY <rajendra.sy@gmail.com>
8405
8406 PR gdb/23095
8407 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
8408 prepare_for_testing. Set normal_bp to r_debug_state if target
8409 is bsd.
8410
8411 2018-04-21 Pedro Alves <palves@redhat.com>
8412 Rajendra SY <rajendra.sy@gmail.com>
8413
8414 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
8415 * remote.c (extended_remote_attach): In all-stop mode, mark the
8416 thread as executing.
8417
8418 2018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8419
8420 * thread.c (thread_apply_all_command): Fix comment.
8421 (thread_command): Fix comment.
8422
8423 2018-04-10 Alan Hayward <alan.hayward@arm.com>
8424
8425 * common/tdesc.h (tdesc_create_feature): Remove xml filename
8426 parameter.
8427 * features/aarch64-core.c (create_feature_aarch64_core):
8428 Regenerate.
8429 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
8430 Likewise.
8431 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
8432 Likewise.
8433 * features/i386/32bit-avx512.c
8434 (create_feature_i386_32bit_avx512): Likewise.
8435 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
8436 Likewise.
8437 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
8438 Likewise.
8439 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
8440 Likewise.
8441 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
8442 Likewise.
8443 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
8444 Likewise.
8445 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
8446 Likewise.
8447 * features/i386/64bit-avx512.c
8448 (create_feature_i386_64bit_avx512): Likewise.
8449 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
8450 Likewise.
8451 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
8452 Likewise.
8453 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
8454 Likewise.
8455 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
8456 Likewise.
8457 * features/i386/64bit-segments.c
8458 (create_feature_i386_64bit_segments): Likewise.
8459 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
8460 Likewise.
8461 * features/i386/x32-core.c
8462 (create_feature_i386_x32_core): Likewise.
8463 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
8464 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
8465 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
8466 * target-descriptions.c: In generated code, don't pass xml
8467 filename.
8468
8469 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8470
8471 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
8472 (print_xml_feature::visit_post): Likewise.
8473 (print_xml_feature::visit): Likewise.
8474 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
8475 (print_xml_feature): Add new class.
8476 * regformats/regdat.sh: Null xmltarget on feature targets.
8477 * target-descriptions.c (struct target_desc): Add xmltarget.
8478 (maintenance_check_tdesc_xml_convert): Add unittest function.
8479 (tdesc_get_features_xml): Add function to get xml.
8480 (maintenance_check_xml_descriptions): Test xml generation.
8481 * xml-tdesc.c (string_read_description_xml): Add function.
8482 * xml-tdesc.h (string_read_description_xml): Add declaration.
8483
8484 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8485
8486 * features/Makefile: Add feature marker to targets with new style
8487 target descriptions.
8488 * regformats/aarch64.dat: Regenerate.
8489 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
8490 * regformats/i386/amd64-avx-linux.dat: Likewise.
8491 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
8492 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
8493 * regformats/i386/amd64-linux.dat: Likewise.
8494 * regformats/i386/amd64-mpx-linux.dat: Likewise.
8495 * regformats/i386/amd64.dat: Likewise.
8496 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
8497 * regformats/i386/i386-avx-linux.dat: Likewise.
8498 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
8499 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
8500 * regformats/i386/i386-linux.dat: Likewise.
8501 * regformats/i386/i386-mmx-linux.dat: Likewise.
8502 * regformats/i386/i386-mpx-linux.dat: Likewise.
8503 * regformats/i386/i386.dat: Likewise.
8504 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
8505 * regformats/i386/x32-avx-linux.dat: Likewise.
8506 * regformats/i386/x32-linux.dat: Likewise.
8507 * regformats/tic6x-c62x-linux.dat: Likewise.
8508 * regformats/tic6x-c64x-linux.dat: Likewise.
8509 * regformats/tic6x-c64xp-linux.dat: Likewise.
8510 * regformats/regdat.sh: Parse feature marker.
8511
8512 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8513
8514 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
8515 (tdesc_osabi_name): Likewise.
8516 * target-descriptions.c (tdesc_architecture_name): Add new
8517 function.
8518 (tdesc_osabi_name): Likewise.
8519
8520 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8521
8522 * common/tdesc.c (tdesc_predefined_type): Move to here.
8523 (tdesc_named_type): Likewise.
8524 (tdesc_create_vector): Likewise.
8525 (tdesc_create_struct): Likewise.
8526 (tdesc_set_struct_size): Likewise.
8527 (tdesc_create_union): Likewise.
8528 (tdesc_create_flags): Likewise.
8529 (tdesc_create_enum): Likewise.
8530 (tdesc_add_field): Likewise.
8531 (tdesc_add_typed_bitfield): Likewise.
8532 (tdesc_add_bitfield): Likewise.
8533 (tdesc_add_flag): Likewise.
8534 (tdesc_add_enum_value): Likewise.
8535 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
8536 (struct tdesc_type_vector): Likewise.
8537 (struct tdesc_type_field): Likewise.
8538 (struct tdesc_type_with_fields): Likewise.
8539 (tdesc_create_enum): Add declaration.
8540 (tdesc_add_typed_bitfield): Likewise.
8541 (tdesc_add_enum_value): Likewise.
8542 * target-descriptions.c (tdesc_type_field): Move from here.
8543 (tdesc_type_builtin): Likewise.
8544 (tdesc_type_vector): Likewise.
8545 (tdesc_type_with_fields): Likewise.
8546 (tdesc_predefined_types): Likewise.
8547 (tdesc_named_type): Likewise.
8548 (tdesc_create_vector): Likewise.
8549 (tdesc_create_struct): Likewise.
8550 (tdesc_set_struct_size): Likewise.
8551 (tdesc_create_union): Likewise.
8552 (tdesc_create_flags): Likewise.
8553 (tdesc_create_enum): Likewise.
8554 (tdesc_add_field): Likewise.
8555 (tdesc_add_typed_bitfield): Likewise.
8556 (tdesc_add_bitfield): Likewise.
8557 (tdesc_add_flag): Likewise.
8558 (tdesc_add_enum_value): Likewise.
8559 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
8560 (tdesc_add_typed_bitfield): Likewise.
8561 (tdesc_add_enum_value): Likewise.
8562
8563 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8564
8565 * common/tdesc.c (tdesc_feature::accept): Move to here.
8566 (tdesc_feature::operator==): Likewise.
8567 (tdesc_create_reg): Likewise.
8568 * common/tdesc.h (tdesc_type_kind): Likewise.
8569 (struct tdesc_type): Likewise.
8570 (struct tdesc_feature): Likewise.
8571 * regformats/regdat.sh: Create a feature.
8572 * target-descriptions.c (tdesc_type_kind): Move from here.
8573 (tdesc_type): Likewise.
8574 (tdesc_type_up): Likewise.
8575 (tdesc_feature): Likewise.
8576 (tdesc_create_reg): Likewise.
8577
8578 2018-04-18 Alan Hayward <alan.hayward@arm.com>
8579
8580 * Makefile.in: Add arch/tdesc.c
8581 * common/tdesc.c: New file.
8582 * common/tdesc.h (tdesc_element_visitor): Move to here.
8583 (tdesc_element): Likewise.
8584 (tdesc_reg): Likewise.
8585 (tdesc_reg_up): Likewise.
8586 * regformats/regdef.h (reg): Add offset to constructors.
8587 * target-descriptions.c (tdesc_element_visitor): Move from here.
8588 (tdesc_element): Likewise.
8589 (tdesc_reg): Likewise.
8590 (tdesc_reg_up): Likewise.
8591
8592 2018-04-17 Tom Tromey <tom@tromey.com>
8593
8594 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
8595 discriminant field.
8596
8597 2018-04-17 Tom Tromey <tom@tromey.com>
8598
8599 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
8600
8601 2018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
8602
8603 * symtab.c (print_symbol_info): Skip printing filename and line
8604 number when `last' is NULL.
8605 (symtab_symbol_info): Use empty string instead of NULL for first
8606 invocation of print_symbol_info.
8607 (rbreak_command): Pass NULL to `last' parameter of
8608 print_symbol_info.
8609
8610 2018-04-16 Simon Marchi <simon.marchi@ericsson.com>
8611
8612 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
8613 instead of nullptr.
8614
8615 2018-04-16 Pedro Alves <palves@redhat.com>
8616
8617 * MAINTAINERS (sh): Remove.
8618 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
8619 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
8620 (ALLDEPFILES): Remove sh64-tdep.c.
8621 * NEWS: Mentions that support for SH-5/SH64 is removed.
8622 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
8623 (sh*-*-openbsd*): Ditto.
8624 (sh64-*-elf*): Remove.
8625 (sh*): Remove.
8626 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
8627 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
8628 * sh-tdep.c: No longer include "sh64-tdep.h".
8629 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
8630 * sh64-tdep.c, sh64-tdep.h: Remove files.
8631
8632 2018-04-16 Pedro Alves <palves@redhat.com>
8633
8634 * MAINTAINERS: Remove m88k.
8635 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
8636 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
8637 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
8638 * NEWS: Mention that support for m88k was removed.
8639 * configure.host (m88*-*-*): Remove support.
8640 * configure.nat (m88k-*-*): Remove support.
8641 * configure.tgt (m88*-*-openbsd*): Remove.
8642 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
8643
8644 2018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
8645
8646 * configure.tgt (x86_tobjs): New variable.
8647 (amd64_tobjs, i386_tobjs): Use it.
8648
8649 2018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
8650
8651 * symtab.c (print_symbol_info): Precede the symbol definition by
8652 the line number when available.
8653 * NEWS: Advertise this enhancement.
8654
8655 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8656
8657 * NEWS (New options): announce set/show record btrace cpu.
8658 * btrace.c: Include record-btrace.h.
8659 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
8660 the vendor is unknown.
8661 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
8662 Maybe overwrite the btrace configuration's cpu.
8663 (btrace_compute_ftrace): Add cpu parameter. Update callers.
8664 (btrace_fetch): Add cpu parameter. Update callers.
8665 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
8666 Maybe overwrite the btrace configuration's cpu. Skip enabling
8667 errata workarounds if the vendor is unknown.
8668 * python/py-record-btrace.c: Include record-btrace.h.
8669 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
8670 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
8671 * record-btrace.c (record_btrace_cpu_state_kind): New.
8672 (record_btrace_cpu): New.
8673 (set_record_btrace_cpu_cmdlist): New.
8674 (record_btrace_get_cpu): New.
8675 (require_btrace_thread, record_btrace_info)
8676 (record_btrace_resume_thread): Call record_btrace_get_cpu.
8677 (cmd_set_record_btrace_cpu_none): New.
8678 (cmd_set_record_btrace_cpu_auto): New.
8679 (cmd_set_record_btrace_cpu): New.
8680 (cmd_show_record_btrace_cpu): New.
8681 (_initialize_record_btrace): Initialize set/show record btrace cpu
8682 commands.
8683 * record-btrace.h (record_btrace_get_cpu): New.
8684
8685 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8686
8687 * record.c (set_record_command): Fix typo in message.
8688
8689 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8690
8691 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
8692
8693 2018-04-13 Markus Metzger <markus.t.metzger@intel.com>
8694
8695 * infrun.c (process_event_stop_test): Call
8696 gdbarch_in_indirect_branch_thunk.
8697 * gdbarch.sh (in_indirect_branch_thunk): New.
8698 * gdbarch.c: Regenerated.
8699 * gdbarch.h: Regenerated.
8700 * x86-tdep.h: New.
8701 * x86-tdep.c: New.
8702 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
8703 (HFILES_NO_SRCDIR): Add x86-tdep.h.
8704 (ALLDEPFILES): Add x86-tdep.c.
8705 * arch-utils.h (default_in_indirect_branch_thunk): New.
8706 * arch-utils.c (default_in_indirect_branch_thunk): New.
8707 * i386-tdep: Include x86-tdep.h.
8708 (i386_in_indirect_branch_thunk): New.
8709 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
8710 function.
8711 * amd64-tdep: Include x86-tdep.h.
8712 (amd64_in_indirect_branch_thunk): New.
8713 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
8714
8715 2018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
8716
8717 PR gdb/23053
8718 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
8719 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
8720 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
8721 regression.
8722
8723 2018-04-12 Tom Tromey <tom@tromey.com>
8724
8725 * rust-lang.c (rust_print_struct_def): Remove univariant code.
8726 (rust_evaluate_subexp): Likewise.
8727
8728 2018-04-12 Pedro Alves <palves@redhat.com>
8729
8730 * procfs.c (procfs_detach): Make forward declaration's prototype
8731 match definition's protototype.
8732 (proc_get_LDT_entry): Remove stale do_cleanups call.
8733
8734 2018-04-12 Pedro Alves <palves@redhat.com>
8735
8736 * target.h (target_ops::to_has_exited): Delete.
8737 (target_has_exited): Delete.
8738 * target-delegates.c: Regenerate.
8739
8740 2018-04-11 Pedro Alves <palves@redhat.com>
8741
8742 * target.c (fileio_fh_t::t): Add comment.
8743 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8744 (target_fileio_close): Handle a NULL target.
8745 (invalidate_fileio_fh): New.
8746 (target_close): Call it.
8747 * remote.c (remote_hostio_send_command): No longer check whether
8748 remote_desc is open.
8749
8750 2018-04-11 Pedro Alves <palves@redhat.com>
8751
8752 * target.c (fileio_fh_t): Make it a named struct instead of a
8753 typedef.
8754 (fileio_fh_t::is_closed): New method.
8755 (DEF_VEC_O (fileio_fh_t)): Remove.
8756 (fileio_fhandles): Now a std::vector.
8757 (is_closed_fileio_fh): Delete.
8758 (acquire_fileio_fd): Adjust. Rename parameters.
8759 (release_fileio_fd): Adjust.
8760 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
8761 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
8762 (target_fileio_close): Adjust.
8763
8764 2018-04-10 Simon Marchi <simon.marchi@ericsson.com>
8765
8766 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
8767 index.
8768
8769 2018-04-10 Pedro Alves <palves@redhat.com>
8770
8771 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
8772 (scoped_finish_thread_state): New class.
8773 * infcmd.c (run_command_1): Use it instead of finish_thread_state
8774 cleanup.
8775 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
8776 (fetch_inferior_event, normal_stop): Likewise.
8777 * thread.c (finish_thread_state_cleanup): Delete.
8778
8779 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8780 Pedro Alves <palves@redhat.com>
8781
8782 * value.c: Include "selftest.h" and "common/array-view.h".
8783 (struct range) <operator ==>: New.
8784 (test_ranges_contain): New.
8785 (check_ranges_vector): New.
8786 (test_insert_into_bit_range_vector): New.
8787 (_initialize_values): Register selftests.
8788 * common/array-view.h (operator==, operator!=): New.
8789
8790 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8791
8792 * common/gdb_vecs.h (unordered_remove): Add overload that takes
8793 an iterator.
8794 * inline-frame.c: Include <algorithm>.
8795 (struct inline_state): Add constructor.
8796 (inline_state_s): Remove.
8797 (DEF_VEC_O(inline_state_s)): Remove.
8798 (inline_states): Change type to std::vector.
8799 (find_inline_frame_state): Adjust to std::vector.
8800 (allocate_inline_frame_state): Remove.
8801 (clear_inline_frame_state): Adjust to std::vector.
8802 (skip_inline_frames): Adjust to std::vector.
8803
8804 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8805
8806 * tracepoint.h (struct trace_state_variable): Add constructor.
8807 <name>: Change type to std::string.
8808 * tracepoint.c (tsv_s): Remove.
8809 (DEF_VEC_O(tsv_s)): Remove.
8810 (tvariables): Change to std::vector.
8811 (create_trace_state_variable): Adjust to std::vector.
8812 (find_trace_state_variable): Likewise.
8813 (find_trace_state_variable_by_number): Likewise.
8814 (delete_trace_state_variable): Likewise.
8815 (trace_variable_command): Adjust to std::string.
8816 (delete_trace_variable_command): Likewise.
8817 (tvariables_info_1): Adjust to std::vector.
8818 (save_trace_state_variables): Likewise.
8819 (start_tracing): Likewise.
8820 (merge_uploaded_trace_state_variables): Adjust to std::vector
8821 and std::string.
8822 * target.h (struct target_ops)
8823 <to_download_trace_state_variable>: Pass reference to
8824 trace_state_variable.
8825 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
8826 * target-delegates.c: Re-generate.
8827 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
8828 (mi_tsv_deleted): Likewise.
8829 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
8830 * remote.c (remote_download_trace_state_variable): Change
8831 pointer to reference and adjust.
8832 * make-target-delegates (parse_argtypes): Handle references.
8833 (write_function_header): Likewise.
8834 (munge_type): Likewise.
8835
8836 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8837
8838 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8839 string_view-selftests.c.
8840 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
8841 testsuite.
8842 * unittests/basic_string_view/cons/char/1.cc: Likewise.
8843 * unittests/basic_string_view/cons/char/2.cc: Likewise.
8844 * unittests/basic_string_view/cons/char/3.cc: Likewise.
8845 * unittests/basic_string_view/element_access/char/1.cc:
8846 Likewise.
8847 * unittests/basic_string_view/element_access/char/empty.cc:
8848 Likewise.
8849 * unittests/basic_string_view/element_access/char/front_back.cc:
8850 Likewise.
8851 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
8852 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
8853 Likewise.
8854 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
8855 Likewise.
8856 * unittests/basic_string_view/modifiers/swap/char/1.cc:
8857 Likewise.
8858 * unittests/basic_string_view/operations/compare/char/1.cc:
8859 Likewise.
8860 * unittests/basic_string_view/operations/compare/char/13650.cc:
8861 Likewise.
8862 * unittests/basic_string_view/operations/copy/char/1.cc:
8863 Likewise.
8864 * unittests/basic_string_view/operations/data/char/1.cc:
8865 Likewise.
8866 * unittests/basic_string_view/operations/find/char/1.cc:
8867 Likewise.
8868 * unittests/basic_string_view/operations/find/char/2.cc:
8869 Likewise.
8870 * unittests/basic_string_view/operations/find/char/3.cc:
8871 Likewise.
8872 * unittests/basic_string_view/operations/find/char/4.cc:
8873 Likewise.
8874 * unittests/basic_string_view/operations/rfind/char/1.cc:
8875 Likewise.
8876 * unittests/basic_string_view/operations/rfind/char/2.cc:
8877 Likewise.
8878 * unittests/basic_string_view/operations/rfind/char/3.cc:
8879 Likewise.
8880 * unittests/basic_string_view/operations/substr/char/1.cc:
8881 Likewise.
8882 * unittests/basic_string_view/operators/char/2.cc: Likewise.
8883 * unittests/string_view-selftests.c: New file.
8884
8885 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8886
8887 * unittests/basic_string_view/capacity/1.cc: New file.
8888 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
8889 * unittests/basic_string_view/cons/char/1.cc: New file.
8890 * unittests/basic_string_view/cons/char/2.cc: New file.
8891 * unittests/basic_string_view/cons/char/3.cc: New file.
8892 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
8893 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
8894 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
8895 * unittests/basic_string_view/element_access/char/1.cc: New file.
8896 * unittests/basic_string_view/element_access/char/2.cc: New file.
8897 * unittests/basic_string_view/element_access/char/empty.cc: New file.
8898 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
8899 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
8900 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
8901 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
8902 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
8903 * unittests/basic_string_view/include.cc: New file.
8904 * unittests/basic_string_view/inserters/char/1.cc: New file.
8905 * unittests/basic_string_view/inserters/char/2.cc: New file.
8906 * unittests/basic_string_view/inserters/char/3.cc: New file.
8907 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
8908 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
8909 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
8910 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
8911 * unittests/basic_string_view/literals/types.cc: New file.
8912 * unittests/basic_string_view/literals/values.cc: New file.
8913 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
8914 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
8915 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
8916 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
8917 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
8918 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
8919 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
8920 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
8921 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
8922 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
8923 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
8924 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
8925 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
8926 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
8927 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
8928 * unittests/basic_string_view/operations/data/char/1.cc: New file.
8929 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
8930 * unittests/basic_string_view/operations/find/char/1.cc: New file.
8931 * unittests/basic_string_view/operations/find/char/2.cc: New file.
8932 * unittests/basic_string_view/operations/find/char/3.cc: New file.
8933 * unittests/basic_string_view/operations/find/char/4.cc: New file.
8934 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
8935 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
8936 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
8937 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
8938 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
8939 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
8940 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
8941 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
8942 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
8943 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
8944 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
8945 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
8946 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
8947 * unittests/basic_string_view/operators/char/2.cc: New file.
8948 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
8949 * unittests/basic_string_view/range_access/char/1.cc: New file.
8950 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
8951 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
8952 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
8953 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
8954 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
8955 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
8956 * unittests/basic_string_view/requirements/typedefs.cc: New file.
8957 * unittests/basic_string_view/typedefs.cc: New file.
8958 * unittests/basic_string_view/types/1.cc: New file.
8959
8960 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8961
8962 * common/gdb_string_view.h: Remove libstdc++ implementation
8963 details, adjust to gdb reality.
8964 * common/gdb_string_view.tcc: Likewise.
8965 * cli/cli-script.c (struct string_view): Remove.
8966 (user_args) <m_args>: Change element type to gdb::string_view.
8967 (user_args::insert_args): Adjust.
8968
8969 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8970
8971 * common/gdb_string_view.h: New file.
8972 * common/gdb_string_view.tcc: New file.
8973
8974 2018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
8975
8976 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
8977 * configure: Re-generate.
8978
8979 2018-04-09 Pedro Alves <palves@redhat.com>
8980
8981 * gdbarch.sh: Include "observable.h" instead of "observer.h".
8982 (set_target_gdbarch): Call
8983 gdb::observers::architecture_changed.notify instead of
8984 observer_notify_architecture_changed.
8985
8986 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8987
8988 * tracepoint.c (struct current_traceframe_cleanup): Remove.
8989 (do_restore_current_traceframe_cleanup): Remove.
8990 (restore_current_traceframe_cleanup_dtor): Remove.
8991 (make_cleanup_restore_current_traceframe): Remove.
8992 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
8993 New.
8994 * tracepoint.h (struct scoped_restore_current_traceframe): New.
8995 * infrun.c (fetch_inferior_event): Use
8996 scoped_restore_current_traceframe.
8997
8998 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8999
9000 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
9001 Remove.
9002 <n_allocated_type_units>: Remove.
9003 <all_type_units>: Change to std::vector.
9004 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9005 to std::vector change.
9006 (dwarf2_per_objfile::get_cutu): Likewise.
9007 (dwarf2_per_objfile::get_tu): Likewise.
9008 (create_signatured_type_table_from_index): Likewise.
9009 (create_signatured_type_table_from_debug_names): Likewise.
9010 (dw2_symtab_iter_next): Likewise.
9011 (dw2_print_stats): Likewise.
9012 (dw2_expand_all_symtabs): Likewise.
9013 (dw2_expand_marked_cus): Likewise.
9014 (dw2_debug_names_iterator::next): Likewise.
9015 (dwarf2_initialize_objfile): Likewise.
9016 (add_signatured_type_cu_to_table): Likewise.
9017 (create_all_type_units): Likewise.
9018 (add_type_unit): Likewise.
9019 (struct tu_abbrev_offset): Add constructor.
9020 (build_type_psymtabs_1): Adjust to std::vector change.
9021 (print_tu_stats): Likewise.
9022 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9023 (write_debug_names): Likewise.
9024
9025 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9026
9027 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
9028 Make an std::vector.
9029 <n_comp_units>: Remove.
9030 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
9031 to std::vector change.
9032 (dwarf2_per_objfile::get_cutu): Likewise.
9033 (dwarf2_per_objfile::get_cu): Likewise.
9034 (create_cus_from_index): Likewise.
9035 (create_addrmap_from_index): Likewise.
9036 (create_addrmap_from_aranges): Likewise.
9037 (dwarf2_read_index): Likewise.
9038 (dw2_find_last_source_symtab): Likewise.
9039 (dw2_map_symtabs_matching_filename): Likewise.
9040 (dw2_symtab_iter_next): Likewise.
9041 (dw2_print_stats): Likewise.
9042 (dw2_expand_all_symtabs): Likewise.
9043 (dw2_expand_symtabs_with_fullname): Likewise.
9044 (dw2_expand_marked_cus): Likewise.
9045 (dw2_map_symbol_filenames): Likewise.
9046 (create_cus_from_debug_names): Likewise.
9047 (dwarf2_read_debug_names): Likewise.
9048 (dw2_debug_names_iterator::next): Likewise.
9049 (dwarf2_initialize_objfile): Likewise.
9050 (set_partial_user): Likewise.
9051 (dwarf2_build_psymtabs_hard): Likewise.
9052 (read_comp_units_from_section): Remove arguments, adjust to
9053 std::vector change.
9054 (create_all_comp_units): Adjust to std::vector and
9055 read_comp_units_from_section changes.
9056 (dwarf2_find_containing_comp_unit): Adjust to std::vector
9057 change.
9058 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
9059 (psyms_seen_size): Likewise.
9060 (write_gdbindex): Likewise.
9061 (write_debug_names): Likewise.
9062
9063 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9064
9065 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
9066 with dwarf2_per_objfile.
9067 (create_cus_from_index): Likewise.
9068 (create_signatured_type_table_from_index): Likewise.
9069 (dwarf2_read_index): Likewise.
9070 (dwarf2_initialize_objfile): Likewise.
9071 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
9072 per_cu rather than get_dwarf2_per_objfile.
9073
9074 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9075
9076 * dwarf2read.h (struct signatured_type): Forward declare.
9077 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
9078 New methods.
9079 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
9080 (dw2_get_cutu): ...this.
9081 (dwarf2_per_objfile::get_cu): Rename from...
9082 (dw2_get_cu): ...this.
9083 (dwarf2_per_objfile::get_tu): New.
9084 (create_addrmap_from_index): Adjust.
9085 (create_addrmap_from_aranges): Adjust.
9086 (dw2_find_last_source_symtab): Adjust.
9087 (dw2_map_symtabs_matching_filename): Adjust.
9088 (dw2_symtab_iter_next): Adjust.
9089 (dw2_print_stats): Adjust.
9090 (dw2_expand_all_symtabs): Adjust.
9091 (dw2_expand_symtabs_with_fullname): Adjust.
9092 (dw2_expand_marked_cus): Adjust.
9093 (dw_expand_symtabs_matching_file_matcher): Adjust.
9094 (dw2_map_symbol_filenames): Adjust.
9095 (dw2_debug_names_iterator::next): Adjust.
9096 (dwarf2_initialize_objfile): Adjust.
9097 (set_partial_user): Adjust.
9098 (dwarf2_build_psymtabs_hard): Adjust.
9099
9100 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9101
9102 * dwarf2read.c (create_signatured_type_table_from_debug_names):
9103 Remove unused variables.
9104 (dw2_map_symtabs_matching_filename): Likewise.
9105 (dwarf2_record_block_ranges): Likewise.
9106 (dwarf2_read_addr_index): Likewise.
9107 (follow_die_offset): Likewise.
9108
9109 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9110
9111 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
9112 to symbol_file_add_main.
9113
9114 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9115
9116 PR mi/22299
9117 * mi/mi-console.c (do_fputc_async_safe): New.
9118 (mi_console_file::write_async_safe): New.
9119 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
9120 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
9121 New.
9122 * ui-file.c (ui_file::putstrn): Adjust call to
9123 fputstrn_unfiltered.
9124 * utils.c (printchar): Replace do_fputs and do_fprintf
9125 parameters by do_fputc.
9126 (fputstr_filtered): Adjust call to printchar.
9127 (fputstr_unfiltered): Likewise.
9128 (fputstrn_filtered): Likewise.
9129 (fputstrn_unfiltered): Add do_fputc parameter, pass to
9130 printchar.
9131 * utils.h (do_fputc_ftype): New typedef.
9132 (fputstrn_unfiltered): Add do_fputc parameter.
9133
9134 2018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
9135
9136 * regformats/i386/i386-avx.dat: Remove.
9137
9138 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9139
9140 PR gdb/22979
9141 * amd64-tdep.c (amd64_none_init_abi): New function.
9142 (amd64_x32_none_init_abi): New function.
9143 (_initialize_amd64_tdep): Register handlers for x86-64 and
9144 x64_32 with GDB_OSABI_NONE.
9145 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
9146 GDB_OSABI_NONE osabi.
9147
9148 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9149
9150 PR gdb/22980
9151 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
9152 GDB_OSABI_NONE.
9153 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
9154 * osabi.c (gdb_osabi_names): Add "unknown" entry.
9155
9156 2018-04-07 Simon Marchi <simon.marchi@ericsson.com>
9157
9158 * common/byte-vector.h (char_vector): New type.
9159 * target.h (target_read_alloc): Return
9160 gdb::optional<byte_vector>.
9161 (target_read_stralloc): Return gdb::optional<char_vector>.
9162 (target_get_osdata): Return gdb::optional<char_vector>.
9163 * target.c (target_read_alloc_1): Templatize. Replacement
9164 manual memory management with vector.
9165 (target_read_alloc): Change return type, adjust.
9166 (target_read_stralloc): Change return type, adjust.
9167 (target_get_osdata): Change return type, adjust.
9168 * auxv.c (struct auxv_info) <length>: Remove.
9169 <data>: Change type to gdb::optional<byte_vector>.
9170 (auxv_inferior_data_cleanup): Free auxv_info with delete.
9171 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
9172 (target_auxv_search): Adjust.
9173 (fprint_target_auxv): Adjust.
9174 * avr-tdep.c (avr_io_reg_read_command): Adjust.
9175 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
9176 (linux_make_corefile_notes): Adjust.
9177 * osdata.c (get_osdata): Adjust.
9178 * remote.c (remote_get_threads_with_qxfer): Adjust.
9179 (remote_memory_map): Adjust.
9180 (remote_traceframe_info): Adjust.
9181 (btrace_read_config): Adjust.
9182 (remote_read_btrace): Adjust.
9183 (remote_pid_to_exec_file): Adjust.
9184 * solib-aix.c (solib_aix_get_library_list): Adjust.
9185 * solib-dsbt.c (decode_loadmap): Don't free buf.
9186 (dsbt_get_initial_loadmaps): Adjust.
9187 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
9188 * solib-target.c (solib_target_current_sos): Adjust.
9189 * tracepoint.c (sdata_make_value): Adjust.
9190 * xml-support.c (xinclude_start_include): Adjust.
9191 (xml_fetch_content_from_file): Adjust.
9192 * xml-support.h (xml_fetch_another): Change return type.
9193 (xml_fetch_content_from_file): Change return type.
9194 * xml-syscall.c (xml_init_syscalls_info): Adjust.
9195 * xml-tdesc.c (file_read_description_xml): Adjust.
9196 (fetch_available_features_from_target): Change return type.
9197 (target_fetch_description_xml): Adjust.
9198 (target_read_description_xml): Adjust.
9199
9200 2018-04-06 Tom Tromey <tom@tromey.com>
9201
9202 * value.c (~value): Update.
9203 (struct value) <contents>: Now unique_xmalloc_ptr.
9204 (value_contents_bits_eq, allocate_value_contents)
9205 (value_contents_raw, value_contents_all_raw)
9206 (value_contents_for_printing, value_contents_for_printing_const)
9207 (set_value_enclosing_type): Update.
9208
9209 2018-04-06 Tom Tromey <tom@tromey.com>
9210
9211 * value.c (range_s): Remove typedef, VEC.
9212 (struct range): Add operator<.
9213 (range_lessthan): Remove.
9214 (ranges_contain): Change type.
9215 (~value): Update.
9216 (struct value) <unavailable, optimized_out>: Now std::vector.
9217 (value_entirely_available)
9218 (value_entirely_covered_by_range_vector)
9219 (value_entirely_unavailable, value_entirely_optimized_out):
9220 Update.
9221 (insert_into_bit_range_vector): Change argument type.
9222 (find_first_range_overlap): Likewise.
9223 (struct ranges_and_idx, value_contents_bits_eq)
9224 (require_not_optimized_out, require_available): Update.
9225 (ranges_copy_adjusted): Change argument types.
9226 (value_optimized_out, value_copy, value_fetch_lazy): Update.
9227
9228 2018-04-06 Tom Tromey <tom@tromey.com>
9229
9230 * value.c (~value): Update.
9231 (struct value) <parent>: Now a value_ref_ptr.
9232 (value_parent, set_value_parent, value_address, value_copy):
9233 Update.
9234
9235 2018-04-06 Tom Tromey <tom@tromey.com>
9236
9237 * value.c (struct value): Add constructor, destructor, and member
9238 initializers.
9239 (allocate_value_lazy, value_decref): Update.
9240
9241 2018-04-06 Tom Tromey <tom@tromey.com>
9242
9243 * value.c (struct value) <released, next>: Remove.
9244 (all_values): Now a std::vector.
9245 (allocate_value_lazy): Update.
9246 (value_next): Remove.
9247 (value_mark, value_free_to_mark, release_value)
9248 (value_release_to_mark): Update.
9249
9250 2018-04-06 Tom Tromey <tom@tromey.com>
9251
9252 * value.h (fetch_subexp_value, value_release_to_mark): Update.
9253 (free_value_chain): Remove.
9254 * value.c (free_value_chain): Remove.
9255 (value_release_to_mark): Return a std::vector.
9256 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
9257 std::vector.
9258 (check_condition): Update.
9259 * eval.c (fetch_subexp_value): Change "val_chain" to a
9260 std::vector.
9261 * breakpoint.c (update_watchpoint): Update.
9262 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
9263
9264 2018-04-06 Tom Tromey <tom@tromey.com>
9265
9266 * value.h (free_all_values): Remove.
9267 * value.c (free_all_values): Remove.
9268
9269 2018-04-06 Tom Tromey <tom@tromey.com>
9270
9271 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
9272 (value_history_chain, value_history_count): Remove.
9273 (value_history): New global.
9274 (record_latest_value, access_value_history, show_values)
9275 (preserve_values): Update.
9276
9277 2018-04-06 Tom Tromey <tom@tromey.com>
9278
9279 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
9280 * varobj.c (varobj_set_display_format, varobj_set_value)
9281 (install_default_visualizer, construct_visualizer)
9282 (install_new_value, ~varobj, varobj_get_value_type)
9283 (my_value_of_variable, varobj_editable_p): Update.
9284 * c-varobj.c (c_describe_child, c_value_of_variable)
9285 (cplus_number_of_children, cplus_describe_child): Update.
9286 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
9287 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
9288 (ada_value_of_variable, ada_value_is_changeable_p): Update.
9289
9290 2018-04-06 Tom Tromey <tom@tromey.com>
9291
9292 * printcmd.c (last_examine_address): Change type to
9293 value_ref_ptr.
9294 (do_examine, x_command): Update.
9295
9296 2018-04-06 Tom Tromey <tom@tromey.com>
9297
9298 * value.c (release_value): Update.
9299 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
9300 (struct bpstats) <val>: Now a value_ref_ptr.
9301 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9302 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9303 (~watchpoint, print_it_watchpoint, watch_command_1)
9304 (invalidate_bp_value_on_memory_change): Update.
9305
9306 2018-04-06 Tom Tromey <tom@tromey.com>
9307
9308 * varobj.c (varobj_clear_saved_item)
9309 (update_dynamic_varobj_children, install_new_value, ~varobj):
9310 Update.
9311 * value.h (value_incref): Move declaration earlier.
9312 (value_decref): Rename from value_free.
9313 (struct value_ref_policy): New.
9314 (value_ref_ptr): New typedef.
9315 (struct value_deleter): Remove.
9316 (gdb_value_up): Remove typedef.
9317 (release_value): Change return type.
9318 (release_value_or_incref): Remove.
9319 * value.c (set_value_parent): Update.
9320 (value_incref): Change return type.
9321 (value_decref): Rename from value_free.
9322 (value_free_to_mark, free_all_values, free_value_chain): Update.
9323 (release_value): Return value_ref_ptr.
9324 (release_value_or_incref): Remove.
9325 (record_latest_value, set_internalvar, clear_internalvar):
9326 Update.
9327 * stack.c (info_frame_command): Don't call value_free.
9328 * python/py-value.c (valpy_dealloc, valpy_new)
9329 (value_to_value_object): Update.
9330 * printcmd.c (do_examine): Update.
9331 * opencl-lang.c (lval_func_free_closure): Update.
9332 * mi/mi-main.c (register_changed_p): Don't call value_free.
9333 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
9334 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
9335 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
9336 value_free.
9337 * guile/scm-value.c (vlscm_free_value_smob)
9338 (vlscm_scm_from_value): Update.
9339 * frame.c (frame_register_unwind, frame_unwind_register_signed)
9340 (frame_unwind_register_unsigned, get_frame_register_bytes)
9341 (put_frame_register_bytes): Don't call value_free.
9342 * findvar.c (address_from_register): Don't call value_free.
9343 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
9344 * dwarf2loc.c (entry_data_value_free_closure)
9345 (value_of_dwarf_reg_entry, free_pieced_value_closure)
9346 (dwarf2_evaluate_loc_desc_full): Update.
9347 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
9348 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
9349 (~watchpoint, watch_command_1)
9350 (invalidate_bp_value_on_memory_change): Update.
9351 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
9352
9353 2018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
9354
9355 PR gdb/23022
9356 * warning.m4: Add -Wno-error=deprecated-register.
9357 * configure: Re-generate.
9358
9359 2018-04-05 Tom Tromey <tom@tromey.com>
9360
9361 * linespec.h: Remove include of "vec.h".
9362
9363 2018-04-05 Tom Tromey <tom@tromey.com>
9364
9365 * linespec.c (typep): Remove typedef.
9366 (find_methods, find_superclass_methods): Take a std::vector.
9367 (find_method): Use std::vector.
9368
9369 2018-04-05 Tom Tromey <tom@tromey.com>
9370
9371 * utils.c (compare_strings): Remove.
9372 * utils.h (compare_strings): Remove.
9373 * objc-lang.h (find_imps): Update.
9374 * objc-lang.c (find_methods): Take a std::vector.
9375 (uniquify_strings, find_imps): Likewise.
9376 * linespec.c (find_methods): Take a std::vector.
9377 (decode_objc): Use std::vector.
9378 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
9379 a std::vector.
9380 (find_method, find_function_symbols): Use std::vector.
9381
9382 2018-04-05 Tom Tromey <tom@tromey.com>
9383
9384 * completer.c (completion_tracker::completion_tracker): Remove
9385 cast.
9386 (completion_tracker::discard_completions): Likewise.
9387 * breakpoint.c (ambiguous_names_p): Remove cast.
9388 * ada-lang.c (_initialize_ada_language): Remove cast.
9389 * utils.h (streq): Update.
9390 (streq_hash): Add new declaration.
9391 * utils.c (streq): Return bool.
9392 (streq_hash): New function.
9393
9394 2018-04-05 Tom Tromey <tom@tromey.com>
9395
9396 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
9397 Remove a string copy.
9398
9399 2018-04-05 Tom Tromey <tom@tromey.com>
9400
9401 * linespec.c (filter_results): Use std::vector.
9402 (decode_line_2, decode_line_full): Update.
9403
9404 2018-04-05 Tom Tromey <tom@tromey.com>
9405
9406 * linespec.c (canonical_to_fullform): Return std::string.
9407 (filter_results): Update.
9408 (struct decode_line_2_item): Add constructor.
9409 <fullform, displayform>: Now std::string.
9410 (decode_line_2_compare_items): Now a std::sort comparator.
9411 (decode_line_2): Update.
9412
9413 2018-04-05 Tom Tromey <tom@tromey.com>
9414
9415 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
9416 (unexpected_linespec_error): Update.
9417 (linespec_parse_basic, parse_linespec): Update.
9418
9419 2018-04-05 Tom Tromey <tom@tromey.com>
9420
9421 * linespec.c (linespec_parse_basic): Reindent.
9422
9423 2018-04-05 Tom Tromey <tom@tromey.com>
9424
9425 * minsyms.h (iterate_over_minimal_symbols): Update.
9426 * minsyms.c (iterate_over_minimal_symbols): Take a
9427 gdb::function_view.
9428 * linespec.c (struct collect_minsyms): Remove.
9429 (compare_msyms): Now a std::sort comparator.
9430 (add_minsym): Add parameters.
9431 (search_minsyms_for_name): Update. Use std::vector.
9432
9433 2018-04-03 Tom Tromey <tom@tromey.com>
9434
9435 * mipsread.c (read_alphacoff_dynamic_symtab): Use
9436 gdb::byte_vector.
9437
9438 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9439
9440 * MAINTAINERS (Write After Approval): Add Weimin Pan.
9441
9442 2018-04-02 Weimin Pan <weimin.pan@oracle.com>
9443
9444 PR gdb/16959
9445 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
9446 printing static type.
9447
9448 2018-04-01 Tom Tromey <tom@tromey.com>
9449
9450 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
9451 (rs6000_xfer_shared_libraries): Update.
9452
9453 2018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
9454
9455 * common/gdb_vecs.h (char_ptr): Remove.
9456 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
9457
9458 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9459
9460 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
9461 with std::vector.
9462 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
9463
9464 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
9465
9466 * tracepoint.h (struct uploaded_tp): Initialize fields.
9467 <actions, step_actions, cmd_strings>: Change type to
9468 std::vector<char *>.
9469 * tracepoint.c (get_uploaded_tp): Allocate with new.
9470 (free_uploaded_tps): Free with delete.
9471 (parse_tracepoint_definition): Adjust to std::vector change.
9472 * breakpoint.c (read_uploaded_action): Likewise.
9473 (create_tracepoint_from_upload): Likewise.
9474 * ctf.c (ctf_write_uploaded_tp): Likewise.
9475 (SET_ARRAY_FIELD): Likewise.
9476 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
9477
9478 2018-03-30 Tom Tromey <tom@tromey.com>
9479
9480 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
9481 std::unique_ptr.
9482 (svr4_keep_data_in_core): Update.
9483 (svr4_read_so_list): Update.
9484
9485 2018-03-30 Tom Tromey <tom@tromey.com>
9486
9487 * windows-nat.c (handle_output_debug_string, handle_exception):
9488 Update.
9489 * target.h (target_read_string): Update.
9490 * target.c (target_read_string): Change "string" to
9491 unique_xmalloc_ptr.
9492 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
9493 Update.
9494 * solib-frv.c (frv_current_sos): Update.
9495 * solib-dsbt.c (dsbt_current_sos): Update.
9496 * solib-darwin.c (darwin_current_sos): Update.
9497 * linux-thread-db.c (inferior_has_bug): Update.
9498 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
9499 Update. Remove alloca.
9500 * ada-lang.c (ada_main_name): Update.
9501
9502 2018-03-30 Tom Tromey <tom@tromey.com>
9503
9504 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
9505 (struct dwo_file_deleter): New.
9506 (dwo_file_up): New typedef.
9507 (open_and_init_dwo_file): Use dwo_file_up.
9508 (free_dwo_file_cleanup): Remove.
9509
9510 2018-03-30 Tom Tromey <tom@tromey.com>
9511
9512 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
9513 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
9514
9515 2018-03-30 Tom Tromey <tom@tromey.com>
9516
9517 * dwarf2read.c (class free_cached_comp_units): New class.
9518 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
9519 (free_cached_comp_units): Remove function.
9520
9521 2018-03-30 Tom Tromey <tom@tromey.com>
9522
9523 * utils.h (make_cleanup_unpush_target): Remove.
9524 * inf-ptrace.c (struct target_unpusher): New.
9525 (target_unpush_up) New typedef.
9526 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
9527 target_unpush_up.
9528 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
9529
9530 2018-03-27 Tom Tromey <tom@tromey.com>
9531
9532 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
9533
9534 2018-03-27 Pedro Alves <palves@redhat.com>
9535 Tom Tromey <tom@tromey.com>
9536
9537 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
9538 destructor. Now a class.
9539 (gdb_readline_wrapper_cleanup): Remove function.
9540 (gdb_readline_wrapper): Remove cleanups.
9541
9542 2018-03-27 Tom Tromey <tom@tromey.com>
9543
9544 * typeprint.h (struct type_print_options) <local_typedefs,
9545 global_typedefs>: Remove "struct" keyword.
9546 (class typedef_hash_table): New class.
9547 (recursively_update_typedef_hash, add_template_parameters)
9548 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
9549 (find_typedef_in_hash): Don't declare.
9550 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
9551 (typedef_hash_table::recursively_update): Rename from
9552 recursively_update_typedef_hash. Now a member.
9553 (typedef_hash_table::add_template_parameters): Rename from
9554 add_template_parameters. Now a member.
9555 (typedef_hash_table::typedef_hash_table): Now a constructor;
9556 rename from create_typedef_hash.
9557 (typedef_hash_table::~typedef_hash_table): Now a destructor;
9558 rename from free_typedef_hash.
9559 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
9560 (do_free_global_table): Remove.
9561 (typedef_hash_table::typedef_hash_table): New constructor; renamed
9562 from copy_type_recursive.
9563 (create_global_typedef_table): Remove.
9564 (typedef_hash_table::find_global_typedef): Now a member of
9565 typedef_hash_table.
9566 (typedef_hash_table::find_typedef): Rename from
9567 find_typedef_in_hash; now a member.
9568 (whatis_exp): Update.
9569 * extension.h (struct ext_lang_type_printers): Add constructor and
9570 destructor.
9571 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
9572 declare.
9573 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
9574 Now a constructor; rename from start_ext_lang_type_printers.
9575 (ext_lang_type_printers): Now a destructor; rename from
9576 free_ext_lang_type_printers.
9577 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
9578 Update.
9579 (c_type_print_base_struct_union): Update. Remove cleanups.
9580
9581 2018-03-27 Tom Tromey <tom@tromey.com>
9582
9583 * dwarf-index-write.c: Include <cmath>.
9584
9585 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9586
9587 * NEWS: Add entry describing new "set|show varsize-limit" command.
9588 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
9589 command.
9590 * printcmd.c (_initialize_printcmd): Add "set var" alias of
9591 "set variable".
9592
9593 2018-03-27 Simon Marchi <simon.marchi@ericsson.com>
9594
9595 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
9596 dwarf-index-write.c
9597 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
9598 * dwarf-index-common.c: New file.
9599 * dwarf-index-common.h: New file.
9600 * dwarf-index-write.c: New file.
9601 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
9602 (struct dwarf2_section_info): Move from here.
9603 (dwarf2_section_info_def): Likewise.
9604 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
9605 (offset_type): Likewise.
9606 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
9607 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
9608 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
9609 (byte_swap): Likewise.
9610 (MAYBE_SWAP): Likewise.
9611 (dwarf2_per_cu_ptr): Likewise.
9612 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
9613 (struct tu_stats): Likewise.
9614 (struct dwarf2_per_objfile): Likewise.
9615 (struct dwarf2_per_cu_data): Likewise.
9616 (struct signatured_type): Likewise.
9617 (sig_type_ptr): Likewise.
9618 (DEF_VEC_P (sig_type_ptr)): Likewise.
9619 (INDEX4_SUFFIX): Likewise.
9620 (INDEX5_SUFFIX): Likewise.
9621 (DEBUG_STR_SUFFIX): Likewise.
9622 (dwarf2_read_section): Make non-static.
9623 (mapped_index_string_hash): Move from here.
9624 (dwarf5_djb_hash): Likewise.
9625 (file_write): Likewise.
9626 (class data_buf): Likewise.
9627 (struct symtab_index_entry): Likewise.
9628 (struct mapped_symtab): Likewise.
9629 (find_slot): Likewise.
9630 (hash_expand): Likewise.
9631 (add_index_entry): Likewise.
9632 (uniquify_cu_indices): Likewise.
9633 (class c_str_view): Likewise.
9634 (class c_str_view_hasher): Likewise.
9635 (class vector_hasher): Likewise.
9636 (write_hash_table): Likewise.
9637 (psym_index_map): Likewise.
9638 (struct addrmap_index_data): Likewise.
9639 (add_address_entry): Likewise.
9640 (add_address_entry_worker): Likewise.
9641 (write_address_map): Likewise.
9642 (symbol_kind): Likewise.
9643 (write_psymbols): Likewise.
9644 (struct signatured_type_index_data): Likewise.
9645 (write_one_signatured_type): Likewise.
9646 (recursively_count_psymbols): Likewise.
9647 (recursively_write_psymbols): Likewise.
9648 (class debug_names): Likewise.
9649 (check_dwarf64_offsets): Likewise.
9650 (psyms_seen_size): Likewise.
9651 (write_gdbindex): Likewise.
9652 (write_debug_names): Likewise.
9653 (assert_file_size): Likewise.
9654 (write_psymtabs_to_index): Likewise.
9655 (save_gdb_index_command): Likewise.
9656 (_initialize_dwarf2_read): Don't register the "save gdb-index"
9657 command.
9658 * dwarf2read.h: New file.
9659
9660 2018-03-27 Joel Brobecker <brobecker@adacore.com>
9661
9662 PR gdb/22670
9663 * dwarf2read.c (dwarf2_physname): Do not return the demangled
9664 symbol name if the CU's language stores symbol names in linkage
9665 format.
9666 * language.h (struct language_defn)
9667 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
9668 all instances of this struct.
9669
9670 2018-03-26 Tom Tromey <tom@tromey.com>
9671
9672 * stack.c (backtrace_command_1): Remove verbose code.
9673
9674 2018-03-26 Tom Tromey <tom@tromey.com>
9675
9676 * python/py-framefilter.c (py_print_type): Don't catch
9677 exceptions. Return void.
9678 (py_print_value): Likewise.
9679 (py_print_single_arg): Likewise.
9680 (enumerate_args): Don't catch exceptions.
9681 (py_print_args): Likewise.
9682 (py_print_frame): Likewise.
9683 (gdbpy_apply_frame_filter): Catch exceptions here.
9684
9685 2018-03-26 Tom Tromey <tom@tromey.com>
9686
9687 * stack.c (_initialize_stack): Remove trailing newlines from help
9688 text. Add "Usage" line to "backtrace" help.
9689
9690 2018-03-26 Tom Tromey <tom@tromey.com>
9691
9692 PR python/16486:
9693 * python/py-framefilter.c (py_print_args): Call wrap_hint.
9694
9695 2018-03-26 Tom Tromey <tom@tromey.com>
9696
9697 * python/py-framefilter.c (py_print_single_arg): Return
9698 EXT_LANG_BT_ERROR from catch.
9699
9700 2018-03-26 Tom Tromey <tom@tromey.com>
9701
9702 PR backtrace/15584:
9703 * stack.c (backtrace_command_1): Move some code into no-filters
9704 "if".
9705
9706 2018-03-26 Tom Tromey <tom@tromey.com>
9707
9708 * python/py-framefilter.c (throw_quit_or_print_exception): New
9709 function.
9710 (gdbpy_apply_frame_filter): Use it.
9711
9712 2018-03-26 Tom Tromey <tom@tromey.com>
9713
9714 PR cli/17716:
9715 * python/py-framefilter.c (py_print_type, py_print_value)
9716 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
9717 RETURN_MASK_ERROR.
9718
9719 2018-03-26 Tom Tromey <tom@tromey.com>
9720
9721 * python/py-framefilter.c (enumerate_args): Use
9722 gdb::unique_xmalloc_ptr.
9723
9724 2018-03-26 Tom Tromey <tom@tromey.com>
9725
9726 * python/py-framefilter.c (py_print_frame): Return
9727 EXT_LANG_BT_OK.
9728 (gdbpy_apply_frame_filter): Update comment.
9729 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
9730 Remove.
9731 <EXT_LANG_BT_NO_FILTERS>: Change value.
9732
9733 2018-03-26 Tom Tromey <tom@tromey.com>
9734
9735 PR backtrace/15582:
9736 * stack.c (backtrace_command): Parse "hide" argument.
9737 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
9738 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
9739 constant.
9740
9741 2018-03-26 Tom Tromey <tom@tromey.com>
9742
9743 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
9744 add "flags".
9745 (backtrace_command): Remove "fulltrace", add "flags".
9746
9747 2018-03-26 Tom Tromey <tom@tromey.com>
9748
9749 * stack.c (backtrace_command): Rewrite command line parsing.
9750
9751 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9752
9753 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
9754
9755 2018-03-26 Simon Marchi <simon.marchi@ericsson.com>
9756
9757 * filename-seen-cache.h: Add include guard.
9758
9759 2018-03-26 Keith Seitz <keiths@redhat.com>
9760
9761 * symfile.c (place_section): Remove "struct" from section_addr_info
9762 in comment.
9763 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
9764 "struct" keyword from section_addr_info.
9765
9766 2018-03-26 Alan Hayward <alan.hayward@arm.com>
9767
9768 * regformats/regdef.h (reg): Add constructors.
9769
9770 2018-03-25 Pedro Alves <palves@redhat.com>
9771
9772 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
9773 if then/else bodies in var_func_name extraction.
9774
9775 2018-03-23 Weimin Pan <weimin.pan@oracle.com>
9776
9777 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
9778 lookup_minimal_symbol() to find symbol entry.
9779 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
9780
9781 2018-03-23 Keith Seitz <keiths@redhat.com>
9782
9783 PR c++/22968
9784 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
9785 nested type definitions for C++, too.
9786
9787 2018-03-23 Tom Tromey <tom@tromey.com>
9788
9789 * machoread.c (struct oso_el): Add a constructor. Don't define as
9790 a typedef.
9791 (macho_register_oso): Remove.
9792 (macho_symtab_read): Take a std::vector.
9793 (oso_el_compare_name): Now a std::sort comparator.
9794 (macho_symfile_read_all_oso): Take a std::vector.
9795 (macho_symfile_read): Use std::vector. Remove cleanups.
9796
9797 2018-03-22 Tom Tromey <tom@tromey.com>
9798
9799 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
9800 (record_full_goto_bookmark): Use std::string.
9801
9802 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9803
9804 PR tdep/18295
9805 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
9806 a single mask.
9807
9808 2018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9809
9810 * rs6000-tdep.c (store_insn_p): New function.
9811 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
9812 and cr_reg to their unshifted values. Use store_insn_p to
9813 match LR saves using either R1 or fdata->alloca_reg. Use
9814 store_insn_p to match CR saves. Set alloca_reg_offset
9815 when alloca_reg and framep are set. Remove lr_reg shift
9816 when assigning to fdata->lr_register.
9817
9818 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
9819
9820 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
9821 command line args instead of emitting a warning.
9822
9823 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9824
9825 * tracepoint.h (struct static_tracepoint_marker): Initialize
9826 fields, define default constructor, move constructor and move
9827 assignment, disable the rest.
9828 <str_id, extra>: Make std::string.
9829 (release_static_tracepoint_marker): Remove.
9830 (free_current_marker): Remove.
9831 * tracepoint.c (free_current_marker): Remove.
9832 (parse_static_tracepoint_marker_definition): Adjust to
9833 std::string, use new hex2str overload.
9834 (release_static_tracepoint_marker): Remove.
9835 (print_one_static_tracepoint_marker): Get marker by reference
9836 and adjust to std::string.
9837 (info_static_tracepoint_markers_command): Adjust to std::vector
9838 changes
9839 * target.h (static_tracepoint_marker_p): Remove typedef.
9840 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
9841 (struct target_ops) <to_static_tracepoint_marker_at>: Return
9842 bool.
9843 <to_static_tracepoint_markers_by_strid>: Return std::vector.
9844 * target-debug.h
9845 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
9846 (target_debug_print_std_vector_static_tracepoint_marker): New.
9847 (target_debug_print_struct_static_tracepoint_marker_p): Rename
9848 to...
9849 (target_debug_print_static_tracepoint_marker_p): ... this.
9850 * target-delegates.c: Re-generate.
9851 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
9852 Make std::string.
9853 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
9854 (decode_static_tracepoint_spec): Adjust to std::vector.
9855 (tracepoint_print_one_detail): Adjust to std::string.
9856 (strace_marker_decode_location): Adjust to std::string.
9857 (update_static_tracepoint): Adjust to std::string, remove call
9858 to release_static_tracepoint_marker.
9859 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
9860 Adjust to std::vector.
9861 * remote.c (remote_static_tracepoint_marker_at): Return bool.
9862 (remote_static_tracepoint_markers_by_strid): Adjust to
9863 std::vector.
9864 * common/rsp-low.h (hex2str): New overload with explicit count
9865 of bytes.
9866 * common/rsp-low.c (hex2str): New overload with explicit count
9867 of bytes.
9868 * unittests/rsp-low-selftests.c (test_hex2str): New function.
9869 (_initialize_rsp_low_selftests): Add test_hex2str test.
9870 * unittests/tracepoint-selftests.c
9871 (test_parse_static_tracepoint_marker_definition): Adjust to
9872 std::string.
9873
9874 2018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
9875
9876 * tracepoint.c (parse_static_tracepoint_marker_definition):
9877 Consider case where the definition is followed by more
9878 definitions.
9879 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9880 tracepoint-selftests.c.
9881 * unittests/tracepoint-selftests.c: New.
9882
9883 2018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
9884
9885 * MAINTAINERS (Write After Approval): Add Pedro Franco de
9886 Carvalho.
9887
9888 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9889
9890 * symtab.c (find_pc_sect_line): fixed indentation.
9891
9892 2018-03-20 Stephen Roberts <stephen.roberts@arm.com>
9893
9894 * symtab.c (find_pc_sect_line): now uses binary search.
9895
9896 2018-03-19 Tom Tromey <tom@tromey.com>
9897
9898 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
9899 "IDENT" production.
9900
9901 2018-03-19 Pedro Alves <palves@redhat.com>
9902 Tom Tromey <tom@tromey.com>
9903
9904 * unittests/observable-selftests.c: New file.
9905 * common/observable.h: New file.
9906 * observable.h: New file.
9907 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
9908 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
9909 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
9910 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
9911 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
9912 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
9913 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
9914 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
9915 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
9916 python/py-breakpoint.c, python/py-finishbreakpoint.c,
9917 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
9918 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
9919 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
9920 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
9921 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
9922 tui/tui-interp.c, valops.c: Update all users.
9923 * tui/tui-hooks.c (tui_bp_created_observer)
9924 (tui_bp_deleted_observer, tui_bp_modified_observer)
9925 (tui_inferior_exit_observer, tui_before_prompt_observer)
9926 (tui_normal_stop_observer, tui_register_changed_observer):
9927 Remove.
9928 (tui_observers_token): New global.
9929 (attach_or_detach, tui_attach_detach_observers): New functions.
9930 (tui_install_hooks, tui_remove_hooks): Use
9931 tui_attach_detach_observers.
9932 * record-btrace.c (record_btrace_thread_observer): Remove.
9933 (record_btrace_thread_observer_token): New global.
9934 * observer.sh: Remove.
9935 * observer.c: Rename to observable.c.
9936 * observable.c (namespace gdb_observers): Define new objects.
9937 (observer_debug): Move into gdb_observers namespace.
9938 (struct observer, struct observer_list, xalloc_observer_list_node)
9939 (xfree_observer_list_node, generic_observer_attach)
9940 (generic_observer_detach, generic_observer_notify): Remove.
9941 (_initialize_observer): Update.
9942 Don't include observer.inc.
9943 * Makefile.in (generated_files): Remove observer.h, observer.inc.
9944 (clean mostlyclean): Likewise.
9945 (observer.h, observer.inc): Remove targets.
9946 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
9947 (COMMON_SFILES): Use observable.c, not observer.c.
9948 * .gitignore: Remove observer.h.
9949
9950 2018-03-18 Tom Tromey <tom@tromey.com>
9951
9952 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
9953 gdb::def_vector.
9954 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
9955
9956 2018-03-17 Tom Tromey <tom@tromey.com>
9957
9958 * auto-load.c (auto_load_objfile_script_1): Use std::string.
9959
9960 2018-03-17 Tom Tromey <tom@tromey.com>
9961
9962 * target.c (class scoped_target_fd): New.
9963 (target_fileio_close_cleanup): Remove.
9964 (target_fileio_read_alloc_1): Use scoped_target_fd.
9965
9966 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
9967
9968 * silent-rules.mk: New.
9969 * Makefile.in: Include silent-rules.mk
9970 (srcdir, VPATH, top_srcdir): Move up.
9971 (COMPILE): Add ECHO_CXX.
9972 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
9973 (init.c): Add ECHO_INIT_C.
9974 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
9975 (version.c): Add ECHO_GEN.
9976 (printcmd.o): Add ECHO_CXX.
9977 (target-float.o): Add ECHO_CXX.
9978 (ada-exp.o): Add ECHO_CXX.
9979 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
9980 (insight$(EXEEXT)): Add ECHO_CXXLD.
9981 * gnulib/configure.ac: Add AM_SILENT_RULES.
9982 * gnulib/aclocal.m4: Re-generate.
9983 * gnulib/configure: Re-generate.
9984 * gnulib/import/Makefile.in: Re-generate.
9985
9986 2018-03-16 Tom Tromey <tom@tromey.com>
9987
9988 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
9989 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
9990 * utils.c (do_free_section_addr_info)
9991 (make_cleanup_free_section_addr_info): Remove.
9992 * symfile.h (struct other_sections): Add constructor.
9993 (struct section_addr_info): Remove.
9994 (section_addr_info): New typedef.
9995 (struct sym_fns) <sym_offsets>: Change type of parameter.
9996 (build_section_addr_info_from_objfile)
9997 (relative_addr_info_to_section_offsets, addr_info_make_relative)
9998 (default_symfile_offsets, symbol_file_add)
9999 (symbol_file_add_from_bfd)
10000 (build_section_addr_info_from_section_table): Update.
10001 (alloc_section_addr_info, free_section_addr_info): Don't declare.
10002 * symfile.c (alloc_section_addr_info): Remove.
10003 (build_section_addr_info_from_section_table): Change return type.
10004 Update.
10005 (build_section_addr_info_from_bfd)
10006 (build_section_addr_info_from_objfile): Likewise.
10007 (free_section_addr_info): Remove.
10008 (relative_addr_info_to_section_offsets): Change type of "addrs".
10009 (addrs_section_compar): Now a std::sort comparator.
10010 (addrs_section_sort): Change return type.
10011 (addr_info_make_relative): Change type of "addrs". Update.
10012 (default_symfile_offsets, syms_from_objfile_1)
10013 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
10014 (symbol_file_add_separate): Update.
10015 (symbol_file_add): Change type of "addrs". Update.
10016 (add_symbol_file_command): Update. Remove cleanups.
10017 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
10018 cleanups.
10019 * symfile-debug.c (debug_sym_offsets): Change type of "info".
10020 * solib.c (solib_read_symbols): Update.
10021 * objfiles.c (objfile_relocate): Update. Remove cleanups.
10022 * machoread.c (macho_symfile_offsets): Update.
10023 * jit.c (jit_bfd_try_read_symtab): Update.
10024
10025 2018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
10026
10027 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10028 unittests/utils-selftests.c.
10029 * unittests/utils-selftests.c: New file.
10030
10031 2018-03-14 Tom Tromey <tom@tromey.com>
10032
10033 PR cli/14977:
10034 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
10035 for NULL.
10036
10037 2018-03-14 Tom Tromey <tom@tromey.com>
10038
10039 PR cli/19918:
10040 * printcmd.c (printf_pointer): Allow "-" in format.
10041
10042 2018-03-14 Tom Tromey <tom@tromey.com>
10043
10044 * printcmd.c (_initialize_printcmd): Add usage to printf.
10045
10046 2018-03-14 Yao Qi <qiyao@sourceware.org>
10047
10048 * MAINTAINERS: Update my email address.
10049
10050 2018-03-13 Tom Tromey <tom@tromey.com>
10051
10052 * machoread.c (macho_check_dsym): Change filenamep to a
10053 std::string*.
10054 (macho_symfile_read): Update.
10055 * symfile.c (load_command): Use std::string.
10056
10057 2018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
10058
10059 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
10060 to error message string.
10061 (riscv_register_name): Use xsnprintf instead of sprintf.
10062 (riscv_insn::fetch_instruction): Use gdb_assert instead of
10063 internal_error.
10064 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
10065 error.
10066 (riscv_push_dummy_call): Likewise.
10067
10068 2018-03-12 Tom Tromey <tom@tromey.com>
10069
10070 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
10071 Use gdb::byte_vector.
10072 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
10073
10074 2018-03-12 Yao Qi <yao.qi@linaro.org>
10075
10076 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
10077 parameter type to readable_regcache.
10078 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
10079 the declaration.
10080
10081 2018-03-11 Tom Tromey <tom@tromey.com>
10082
10083 * dwarf2read.c (struct nextfield): Add initializers.
10084 (struct nextfnfield): Remove.
10085 (struct fnfieldlist): Add initializers. Remove "length" and
10086 "head", use std::vector.
10087 (struct decl_field_list): Remove.
10088 (struct field_info): Add initializers.
10089 <fields, baseclasses>: Now std::vector.
10090 <nbaseclasses, nfnfields, typedef_field_list_count,
10091 nested_types_list_count>: Remove.
10092 (dwarf2_add_field, dwarf2_add_type_defn)
10093 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
10094 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
10095 (process_structure_scope): Update.
10096
10097 2018-03-11 Tom Tromey <tom@tromey.com>
10098
10099 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
10100 for use by std::sort.
10101 (build_type_psymtabs_1): Use std::vector.
10102
10103 2018-03-09 Eli Zaretskii <eliz@gnu.org>
10104
10105 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
10106 and LIBMPFR in the printed configuration.
10107
10108 2018-03-08 Tom Tromey <tom@tromey.com>
10109
10110 * source.c (get_filename_and_charpos): Use scoped_fd.
10111 * nto-procfs.c (procfs_open_1): Use scoped_fd.
10112 (procfs_pidlist): Likewise.
10113 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
10114 (iterate_over_mappings): Likewise.
10115
10116 2018-03-08 Tom Tromey <tom@tromey.com>
10117
10118 * infcall.c (struct call_return_meta_info)
10119 <stack_temporaries_enabled>: Remove.
10120 (get_call_return_value, call_function_by_hand_dummy): Update.
10121 * thread.c (disable_thread_stack_temporaries): Remove.
10122 (enable_thread_stack_temporaries): Remove.
10123 (thread_stack_temporaries_enabled_p): Return bool.
10124 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
10125 (get_last_thread_stack_temporary): Update.
10126 * eval.c (evaluate_subexp): Update.
10127 * gdbthread.h (class enable_thread_stack_temporaries): Now a
10128 class, not a function.
10129 (value_ptr, value_vec): Remove typedefs.
10130 (class thread_info) <stack_temporaries_enabled>: Now bool.
10131 <stack_temporaries>: Now a std::vector.
10132 (thread_stack_temporaries_enabled_p)
10133 (value_in_thread_stack_temporaries): Return bool.
10134
10135 2018-03-08 Simon Marchi <simon.marchi@ericsson.com>
10136
10137 * remote.c (putpkt_binary): Fix omitted bytes reporting.
10138 (getpkt_or_notif_sane_1): Likewise.
10139
10140 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10141
10142 * build-id.c (build_id_to_debug_bfd): Use std::string.
10143
10144 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10145
10146 * build-id.c (find_separate_debug_file_by_buildid): Return
10147 std::string.
10148 * build-id.h (find_separate_debug_file_by_buildid): Return
10149 std::string.
10150 * coffread.c (coff_symfile_read): Adjust to std::string.
10151 * elfread.c (elf_symfile_read): Adjust to std::string.
10152 * symfile.c (separate_debug_file_exists): Change parameter to
10153 std::string.
10154 (find_separate_debug_file): Return std::string.
10155 (find_separate_debug_file_by_debuglink): Return std::string.
10156 * symfile.h (find_separate_debug_file_by_debuglink): Return
10157 std::string.
10158
10159 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
10160
10161 * common/xml-utils.c (xml_escape_text): Move code to...
10162 (xml_escape_text_append): ... this new function.
10163 * common/xml-utils.h (xml_escape_text_append): New declaration.
10164 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
10165 New function.
10166 (_initialize_xml_utils): register test_xml_escape_text_append as
10167 a selftest.
10168
10169 2018-03-07 Alan Hayward <alan.hayward@arm.com>
10170
10171 * defs.h: Remove MAX_REGISTER_SIZE.
10172 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
10173 asserts.
10174 * python/py-unwind.c (pyuw_sniffer): Likewise.
10175
10176 2018-03-07 Tom Tromey <tom@tromey.com>
10177
10178 * linux-tdep.c (linux_info_proc): Update.
10179 * target.h (struct target_ops) <to_fileio_readlink>: Return
10180 optional<string>.
10181 (target_fileio_readlink): Return optional<string>.
10182 * remote.c (remote_hostio_readlink): Return optional<string>.
10183 * inf-child.c (inf_child_fileio_readlink): Return
10184 optional<string>.
10185 * target.c (target_fileio_readlink): Return optional<string>.
10186
10187 2018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
10188
10189 * regcache.c (cooked_read_test): Add riscv to the list of
10190 architectures that have a save_reggroup.
10191
10192 2018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
10193
10194 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
10195 value is not a dynamic class object.
10196
10197 2018-03-06 Tom Tromey <tom@tromey.com>
10198
10199 * rust-exp.y: Formatting fixes.
10200
10201 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10202
10203 * riscv-tdep.c (riscv_register_name): Remove target description
10204 support.
10205 (riscv_gdbarch_init): Remove target description check.
10206
10207 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10208
10209 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
10210 comment.
10211 * riscv-tdep.h: Likewise.
10212
10213 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10214
10215 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
10216 (riscv_pseudo_register_write): Delete.
10217 (riscv_gdbarch_init): Remove all use of pseudo registers.
10218
10219 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10220
10221 * record-btrace.c (btrace_print_lines): Replace cleanup
10222 parameter with RAII equivalents.
10223 (btrace_insn_history): Replace cleanup with RAII equivalents.
10224 * ui-out.h (make_cleanup_ui_out_list_begin_end,
10225 make_cleanup_ui_out_tuple_begin_end): Remove.
10226 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
10227 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
10228 make_cleanup_ui_out_list_begin_end): Remove.
10229
10230 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10231
10232 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
10233 parameter types to std::vector. Use bool.
10234 (record_btrace_wait): Replace VEC(tp_t) with
10235 std::vector<thread_info *>.
10236 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
10237
10238 2018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
10239
10240 * record-btrace.c (record_btrace_disable_callback): Remove.
10241 (struct scoped_btrace_disable): New.
10242 (record_btrace_open): Use scoped_btrace_disable.
10243
10244 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10245
10246 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
10247 reading values from registers.
10248
10249 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10250
10251 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
10252 where appropriate.
10253
10254 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10255
10256 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
10257 change parameter type. Use GDB's print functions, and use
10258 core_addr_to_string where appropriate.
10259 (riscv_push_dummy_call): Use core_addr_to_string where
10260 appropriate, update call to riscv_print_arg_location, and reindent
10261 a few lines.
10262 (riscv_return_value): Update call to riscv_print_arg_location.
10263
10264 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10265 Tim Newsome <tim@sifive.com>
10266 Albert Ou <a0u@eecs.berkeley.edu>
10267 Darius Rad <darius@bluespec.com>
10268
10269 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
10270 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
10271 (ALLDEPFILES): Add riscv-tdep.c
10272 * configure.tgt: Add riscv support.
10273 * riscv-tdep.c: New file.
10274 * riscv-tdep.h: New file.
10275 * NEWS: Mention new target.
10276 * MAINTAINERS: Add entry for riscv.
10277
10278 2018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
10279
10280 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
10281 fields within aggregates.
10282
10283 2018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
10284
10285 * record-btrace.c (btrace_print_lines): Change type of flags to
10286 gdb_disassembly_flags.
10287
10288 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10289
10290 * fbsd-nat.c: Include "inf-ptrace.h".
10291 (USE_SIGTRAP_SIGINFO): Conditionally define.
10292 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
10293 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
10294 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
10295 function.
10296 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
10297 Likewise.
10298 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
10299 Likewise.
10300 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
10301 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
10302 "supports_stopped_by_hw_breakpoint" target methods.
10303
10304 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10305
10306 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
10307 * fbsd-nat.c (debug_fbsd_nat): New variable.
10308 (show_fbsd_nat_debug): New function.
10309 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
10310 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
10311
10312 2018-03-04 John Baldwin <jhb@FreeBSD.org>
10313
10314 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
10315 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
10316 prototype.
10317 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
10318 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
10319 method.
10320
10321 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10322
10323 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
10324 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
10325
10326 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10327
10328 * charset.c (struct charset_vector): New.
10329 (charsets): Change type to charset_vector.
10330 (find_charset_names): Adjust.
10331 (add_one): Adjust.
10332 (_initialize_charset): Adjust.
10333
10334 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10335
10336 * progspace.h (struct program_space) <deleted_solibs>: Change
10337 type to std::vector<std::string>.
10338 * progspace.c (clear_program_space_solib_cache): Adjust.
10339 * breakpoint.c (print_solib_event): Adjust.
10340 (check_status_catch_solib): Adjust.
10341 * solib.c (update_solib_list): Adjust.
10342 * ui-out.h (class ui_out) <field_string>: New overload.
10343 * ui-out.c (ui_out::field_string): New overload.
10344
10345 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10346
10347 * progspace.h (struct program_space): Add constructor and
10348 destructor, initialize fields.
10349 (add_program_space): Remove.
10350 * progspace.c (add_program_space): Rename to...
10351 (program_space::program_space): ... this.
10352 (release_program_space): Rename to...
10353 (program_space::~program_space): ... this.
10354 (delete_program_space): Use delete to delete program_space.
10355 (initialize_progspace): Use new to allocate program_space.
10356 * inferior.c (add_inferior_with_spaces): Likewise.
10357 (clone_inferior_command): Likewise.
10358 * infrun.c (follow_fork_inferior): Likewise.
10359 (handle_vfork_child_exec_or_exit): Likewise.
10360
10361 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
10362
10363 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
10364 (delim_string_to_char_ptr_vec): Return std::vector of
10365 gdb::unique_xmalloc_ptr.
10366 (dirnames_to_char_ptr_vec_append): Take std::vector of
10367 gdb::unique_xmalloc_ptr.
10368 (dirnames_to_char_ptr_vec): Return std::vector of
10369 gdb::unique_xmalloc_ptr.
10370 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
10371 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
10372 (delim_string_to_char_ptr_vec): Return an std::vector of
10373 gdb::unique_xmalloc_ptr, adjust the code.
10374 (dirnames_to_char_ptr_vec_append): Take an std::vector of
10375 gdb::unique_xmalloc_ptr, adjust the code.
10376 (dirnames_to_char_ptr_vec): Return an std::vector of
10377 gdb::unique_xmalloc_ptr, adjust the code.
10378 * auto-load.c (auto_load_safe_path_vec): Change type to
10379 std::vector of gdb::unique_xmalloc_ptr.
10380 (auto_load_expand_dir_vars): Return an std::vector of
10381 gdb::unique_xmalloc_ptr, adjust the code.
10382 (auto_load_safe_path_vec_update): Adjust.
10383 (filename_is_in_auto_load_safe_path_vec): Adjust.
10384 (auto_load_objfile_script_1): Adjust.
10385 * build-id.c (build_id_to_debug_bfd): Adjust.
10386 * linux-thread-db.c (thread_db_load_search): Adjust.
10387 * source.c (add_path): Adjust.
10388 (openp): Adjust.
10389 * symfile.c (find_separate_debug_file): Adjust.
10390 * utils.c (do_free_char_ptr_vec): Remove.
10391 (make_cleanup_free_char_ptr_vec): Remove.
10392
10393 2018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
10394
10395 PR gdb/22907
10396 * common/pathstuff.c: Conditionally include "<windows.h>".
10397
10398 2018-03-01 Georg Sauthoff <mail@georg.so>
10399
10400 PR gdb/22888
10401 * gcore.in: Quote variables and switch interpreter to bash.
10402
10403 2018-03-01 Tom Tromey <tom@tromey.com>
10404
10405 * dwarf2read.c (alloc_discriminant_info): Fix default_index
10406 assertion. Add assertion for discriminant_index.
10407 (quirk_rust_enum): Use correct base type name in univariant case.
10408
10409 2018-03-01 Simon Marchi <simon.marchi@ericsson.com>
10410
10411 * record.c (get_call_history_modifiers): Return a
10412 record_print_flags.
10413 (cmd_record_call_history): Adjust.
10414 * record-btrace.c (record_btrace_call_history): Adjust.
10415 (record_btrace_call_history_range): Adjust.
10416 (record_btrace_call_history_from): Adjust.
10417 * target-debug.h (target_debug_print_record_print_flags): New.
10418 * target-delegates.c: Re-generate.
10419 * target.c (target_call_history): Change flags type.
10420 (target_call_history_from): Likewise.
10421 (target_call_history_range): Likewise.
10422 * target.h (struct target_ops) <target_call_history>: Likewise.
10423 (target_call_history_from): Likewise.
10424 (target_call_history_range): Likewise.
10425
10426 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10427 Simon Marchi <simon.marchi@polymtl.ca>
10428
10429 * common/common-utils.c: Include "sys/stat.h".
10430 (is_regular_file): Move here from "source.c"; change return
10431 type to "bool".
10432 * common/common-utils.h (is_regular_file): New prototype.
10433 * common/pathstuff.c (contains_dir_separator): New function.
10434 * common/pathstuff.h (contains_dir_separator): New prototype.
10435 * source.c: Don't include "sys/stat.h".
10436 (is_regular_file): Move to "common/common-utils.c".
10437
10438 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
10439
10440 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
10441 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
10442 * auto-load.c: Include "common/pathstuff.h".
10443 * common/common-def.h (current_directory): Move here.
10444 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
10445 function.
10446 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
10447 prototype.
10448 * common/pathstuff.c: New file.
10449 * common/pathstuff.h: New file.
10450 * compile/compile.c: Include "common/pathstuff.h".
10451 * defs.h (current_directory): Move to "common/common-defs.h".
10452 * dwarf2read.c: Include "common/pathstuff.h".
10453 * exec.c: Likewise.
10454 * guile/scm-safe-call.c: Likewise.
10455 * linux-thread-db.c: Likewise.
10456 * main.c: Likewise.
10457 * nto-tdep.c: Likewise.
10458 * objfiles.c: Likewise.
10459 * source.c: Likewise.
10460 * symtab.c: Likewise.
10461 * utils.c: Include "common/pathstuff.h".
10462 (gdb_realpath): Move to "common/pathstuff.c".
10463 (gdb_realpath_keepfile): Likewise.
10464 (gdb_abspath): Likewise.
10465 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
10466 (gdb_realpath_keepfile): Likewise.
10467 (gdb_abspath): Likewise.
10468
10469 2018-02-28 John Baldwin <jhb@FreeBSD.org>
10470
10471 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
10472 wildcard process pid for super_resume for kernels with a
10473 specific bug.
10474
10475 2018-02-27 Phil Muldoon <pmuldoon@redhat.com>
10476
10477 * compile/compile.c (get_args): Add additional comments
10478 explaining function.
10479
10480 2018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
10481 Tom Tromey <tom@tromey.com>
10482
10483 * target.h (memory_write_request_s): Remove typedef. Don't define
10484 VEC.
10485 (target_write_memory_blocks): Change argument to std::vector.
10486 (struct memory_write_request): Add constructor.
10487 * target-memory.c (compare_block_starting_address): Return bool.
10488 Change argument types.
10489 (claim_memory): Change arguments to use std::vector.
10490 (split_regular_and_flash_blocks, blocks_to_erase)
10491 (compute_garbled_blocks): Likewise.
10492 (cleanup_request_data, cleanup_write_requests_vector): Remove.
10493 (target_write_memory_blocks): Change argument to std::vector.
10494 * symfile.c (struct load_section_data): Add constructor and
10495 destructor. Use std::vector for "requests".
10496 (struct load_progress_data): Add initializers.
10497 (load_section_callback): Update. Use "new".
10498 (clear_memory_write_data): Remove.
10499 (generic_load): Update.
10500
10501 2018-02-27 Alan Hayward <alan.hayward@arm.com>
10502
10503 * arch/aarch64.h: Use common/tdesc.h.
10504
10505 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10506
10507 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
10508 architecture with a 64-bit ABI.
10509
10510 2018-02-26 Maciej W. Rozycki <macro@mips.com>
10511
10512 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
10513 ahead of target description loading.
10514
10515 2018-02-26 Tom Tromey <tom@tromey.com>
10516
10517 * stack.c (backtrace_command_1): Update.
10518 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
10519 of "flags".
10520 * python/py-framefilter.c (py_print_frame)
10521 (gdbpy_apply_frame_filter): Change type of "flags".
10522 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
10523 of "flags".
10524 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
10525 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
10526 * extension.h (enum frame_filter_flag): Rename from
10527 frame_filter_flags.
10528 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
10529 (apply_ext_lang_frame_filter): Change type of "flags".
10530 * extension.c (apply_ext_lang_frame_filter): Change type of
10531 "flags".
10532 * extension-priv.h (struct extension_language_ops)
10533 <apply_frame_filter>: Change type of "flags".
10534
10535 2018-02-26 Tom Tromey <tom@tromey.com>
10536
10537 PR python/16497:
10538 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
10539 off-by-one in py_end computation.
10540 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
10541 PRINT_MORE_FRAMES.
10542 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
10543 constant.
10544
10545 2018-02-26 Tom Tromey <tom@tromey.com>
10546
10547 * dwarf2read.c (struct variant_field): New.
10548 (struct nextfield) <variant>: New field.
10549 (dwarf2_add_field): Handle DW_TAG_variant_part.
10550 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
10551 discriminated union.
10552 (read_structure_type): Handle DW_TAG_variant_part.
10553 (handle_struct_member_die): New function, extracted from
10554 process_structure_scope. Handle DW_TAG_variant.
10555 (process_structure_scope): Handle discriminated unions. Call
10556 handle_struct_member_die.
10557
10558 2018-02-26 Tom Tromey <tom@tromey.com>
10559
10560 * rust-lang.h (rust_last_path_segment): Declare.
10561 * rust-lang.c (rust_last_path_segment): Now public. Change
10562 contract.
10563 (struct disr_info): Remove.
10564 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
10565 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
10566 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
10567 (rust_enum_p, rust_enum_variant): New function.
10568 (rust_underscore_fields): Remove "offset" parameter.
10569 (rust_print_enum): New function.
10570 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
10571 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
10572 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
10573 enums.
10574 (rust_internal_print_type): New function, from rust_print_type.
10575 Remove enum code.
10576 (rust_print_type): Call rust_internal_print_type.
10577 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
10578 Update enum handling.
10579 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
10580 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
10581 (rust_union_quirks): New functions.
10582 (process_full_comp_unit, process_full_type_unit): Call
10583 rust_union_quirks.
10584 (process_structure_scope): Update rust_unions if necessary.
10585
10586 2018-02-26 Tom Tromey <tom@tromey.com>
10587
10588 * value.h (value_union_variant): Declare.
10589 * valops.c (value_union_variant): New function.
10590 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
10591 (struct discriminant_info): New.
10592 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
10593 enumerator.
10594 (struct main_type) <flag_discriminated_union>: New field.
10595
10596 2018-02-26 Tom Tromey <tom@tromey.com>
10597
10598 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10599 unittests/unpack-selftests.c.
10600 * unittests/unpack-selftests.c: New file.
10601 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
10602
10603 2018-02-26 Yao Qi <yao.qi@linaro.org>
10604
10605 * dwarf2read.c (struct partial_die_info) <read>: New method.
10606 (read_partial_die): Remove the declaration.
10607 (load_partial_dies): Update.
10608 (partial_die_info::partial_die_info):
10609 (read_partial_die): Change it to partial_die_info::read.
10610
10611 2018-02-26 Yao Qi <yao.qi@linaro.org>
10612
10613 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
10614 (fixup_partial_die): Remove declaration.
10615 (scan_partial_symbols): Update.
10616 (partial_die_parent_scope): Likewise.
10617 (partial_die_full_name): Likewise.
10618 (fixup_partial_die): Change it to partial_die_info::fixup.
10619
10620 2018-02-26 Yao Qi <yao.qi@linaro.org>
10621
10622 * dwarf2read.c (read_partial_die): Update the declaration.
10623 (load_partial_dies): Caller update.
10624 (read_partial_die): Remove one argument abbrev_len.
10625
10626 2018-02-26 Yao Qi <yao.qi@linaro.org>
10627
10628 * dwarf2read.c (struct partial_die_info): Add ctor, delete
10629 assignment operator.
10630 (load_partial_dies): Use ctor and copy ctor.
10631 (read_partial_die): Update.
10632 (dwarf2_cu::find_partial_die): Use ctor.
10633
10634 2018-02-26 Yao Qi <yao.qi@linaro.org>
10635
10636 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
10637 (find_partial_die_in_comp_unit): Change it to
10638 dwarf2_cu::find_partial_die.
10639 (find_partial_die): Update.
10640
10641 2018-02-26 Yao Qi <yao.qi@linaro.org>
10642
10643 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
10644 is NULL.
10645
10646 2018-02-26 Yao Qi <yao.qi@linaro.org>
10647
10648 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
10649
10650 2018-02-26 Alan Hayward <alan.hayward@arm.com>
10651
10652 * arch/amd64.h: Use common/tdesc.h.
10653 * arch/i386.c: Likewise.
10654 * arch/i386.h: Likewise.
10655 * arch/tic6x.c: Likewise.
10656 * arch/tdesc.h: Move file from here...
10657 * common/tdesc.h: ...to here.
10658 * features/aarch64-core.c: Regenerate.
10659 * features/aarch64-fpu.c: Regenerate.
10660 * features/i386/32bit-avx.c: Regenerate.
10661 * features/i386/32bit-avx512.c: Regenerate.
10662 * features/i386/32bit-core.c: Regenerate.
10663 * features/i386/32bit-linux.c: Regenerate.
10664 * features/i386/32bit-mpx.c: Regenerate.
10665 * features/i386/32bit-pkeys.c: Regenerate.
10666 * features/i386/32bit-sse.c: Regenerate.
10667 * features/i386/64bit-avx.c: Regenerate.
10668 * features/i386/64bit-avx512.c: Regenerate.
10669 * features/i386/64bit-core.c: Regenerate.
10670 * features/i386/64bit-linux.c: Regenerate.
10671 * features/i386/64bit-mpx.c: Regenerate.
10672 * features/i386/64bit-pkeys.c: Regenerate.
10673 * features/i386/64bit-segments.c: Regenerate.
10674 * features/i386/64bit-sse.c: Regenerate.
10675 * features/i386/x32-core.c: Regenerate.
10676 * features/tic6x-c6xp.c: Regenerate.
10677 * features/tic6x-core.c: Regenerate.
10678 * features/tic6x-gp.c: Regenerate.
10679 * target-descriptions.c: Use common/tdesc.h.
10680 * target-descriptions.h: Likewise.
10681
10682 2018-02-24 Tom Tromey <tom@tromey.com>
10683
10684 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
10685 (try_thread_db_load_from_dir, thread_db_load_search): Use
10686 std::string.
10687 (info_auto_load_libthread_db_compare): Return bool. Change
10688 argument types.
10689 (info_auto_load_libthread_db): Use std::vector, std::string.
10690 Remove cleanups.
10691
10692 2018-02-24 Tom Tromey <tom@tromey.com>
10693
10694 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
10695 std::string.
10696 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
10697 std::string*.
10698 * gdbarch.c: Rebuild.
10699 * gdbarch.h: Rebuild.
10700 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
10701 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
10702 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
10703 std::string*.
10704
10705 2018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
10706
10707 * gdbtypes.h (sect_offset): Change type to uint64_t.
10708 (sect_offset_str): New function.
10709 * dwarf2read.c (create_addrmap_from_aranges): Use
10710 sect_offset_str.
10711 (error_check_comp_unit_head): Likewise.
10712 (create_debug_type_hash_table): Likewise.
10713 (read_cutu_die_from_dwo): Likewise.
10714 (init_cutu_and_read_dies): Likewise.
10715 (init_cutu_and_read_dies_no_follow): Likewise.
10716 (process_psymtab_comp_unit_reader): Likewise.
10717 (partial_die_parent_scope): Likewise.
10718 (peek_die_abbrev): Likewise.
10719 (process_queue): Likewise.
10720 (dwarf2_physname): Likewise.
10721 (read_namespace_alias): Likewise.
10722 (read_import_statement): Likewise.
10723 (create_dwo_cu_reader): Likewise.
10724 (create_cus_hash_table): Likewise.
10725 (lookup_dwo_cutu): Likewise.
10726 (inherit_abstract_dies): Likewise.
10727 (read_func_scope): Likewise.
10728 (read_call_site_scope): Likewise.
10729 (dwarf2_add_member_fn): Likewise.
10730 (read_common_block): Likewise.
10731 (read_module_type): Likewise.
10732 (read_typedef): Likewise.
10733 (read_subrange_type): Likewise.
10734 (load_partial_dies): Likewise.
10735 (read_partial_die): Likewise.
10736 (find_partial_die): Likewise.
10737 (read_str_index): Likewise.
10738 (dwarf2_string_attr): Likewise.
10739 (build_error_marker_type): Likewise.
10740 (lookup_die_type): Likewise.
10741 (dump_die_shallow): Likewise.
10742 (follow_die_ref): Likewise.
10743 (dwarf2_fetch_die_loc_sect_off): Likewise.
10744 (dwarf2_fetch_constant_bytes): Likewise.
10745 (follow_die_sig): Likewise.
10746 (get_signatured_type): Likewise.
10747 (get_DW_AT_signature_type): Likewise.
10748 (dwarf2_find_containing_comp_unit): Likewise.
10749 (set_die_type): Likewise.
10750
10751 2018-02-21 John Baldwin <jhb@FreeBSD.org>
10752
10753 * arch/aarch64.c: Include "common-defs.h".
10754 * arch/amd64.c: Likewise.
10755 * arch/i386.c: Likewise.
10756
10757 2018-02-21 Tom Tromey <tom@tromey.com>
10758
10759 * value.h: (extract_field_op): Update.
10760 * eval.c (extract_field_op): Return a const char *.
10761 * expression.h (parse_expression_for_completion): Update.
10762 * completer.c (complete_expression): Update.
10763 (add_struct_fields): Make fieldname const.
10764 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
10765 (mark_completion_tag, parse_exp_in_context_1): Update.
10766 (parse_expression_for_completion): Change "name" to
10767 unique_xmalloc_ptr*.
10768
10769 2018-02-21 Tom Tromey <tom@tromey.com>
10770
10771 * infcall.c (call_function_by_hand_dummy): Use std::vector.
10772
10773 2018-02-21 Yao Qi <yao.qi@linaro.org>
10774
10775 * avr-tdep.c (avr_read_pc): Change parameter type to
10776 readable_regcache.
10777 * gdbarch.sh (read_pc): Likewise.
10778 * gdbarch.c: Re-generated.
10779 * gdbarch.h: Re-generated.
10780 * hppa-tdep.c (hppa_read_pc): Change parameter type to
10781 readable_regcache.
10782 * ia64-tdep.c (ia64_read_pc): Likewise.
10783 * mips-tdep.c (mips_read_pc): Likewise.
10784 * spu-tdep.c (spu_read_pc): Likewise.
10785
10786 2018-02-21 Yao Qi <yao.qi@linaro.org>
10787
10788 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
10789 * regcache-dump.c: New file.
10790 * regcache.c: Move register_dump to regcache-dump.c.
10791 (maintenance_print_registers): Likewise.
10792 (maintenance_print_raw_registers): Likewise.
10793 (maintenance_print_cooked_registers): Likewise.
10794 (maintenance_print_register_groups): Likewise.
10795 (maintenance_print_remote_registers): Likewise.
10796 (_initialize_regcache): Likewise.
10797 * regcache.h (register_dump): Moved from regcache.c.
10798
10799 2018-02-21 Yao Qi <yao.qi@linaro.org>
10800
10801 * regcache.c (regcache::regcache): Update.
10802 (regcache::invalidate): Move it to detached_regcache::invalidate.
10803 (get_thread_arch_aspace_regcache): Update.
10804 (regcache::raw_update): Update.
10805 (regcache::cooked_read): Remove some code.
10806 (regcache::cooked_read_value): Likewise.
10807 (regcache::raw_write): Remove assert on m_readonly_p.
10808 (regcache::raw_supply_integer): Move it to
10809 detached_regcache::raw_supply_integer.
10810 (regcache::raw_supply_zeroed): Likewise.
10811 * regcache.h (detached_regcache) <raw_supply_integer>: New
10812 declaration.
10813 <raw_supply_zeroed, invalidate>: Likewise.
10814 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
10815 <invalidate>: Likewise.
10816 <m_readonly_p>: Removed.
10817
10818 2018-02-21 Yao Qi <yao.qi@linaro.org>
10819
10820 * infcmd.c (get_return_value): Let stop_regs point to
10821 get_current_regcache.
10822 * regcache.c (regcache::regcache): Remove.
10823 (register_dump_reg_buffer): New class.
10824 (regcache_print): Adjust.
10825 * regcache.h (regcache): Remove constructors.
10826
10827 2018-02-21 Yao Qi <yao.qi@linaro.org>
10828
10829 * regcache.c (class register_dump): New class.
10830 (register_dump_regcache, register_dump_none): New class.
10831 (register_dump_remote, register_dump_groups): New class.
10832 (regcache_print): Update.
10833 * regcache.h (regcache_dump_what): Move it to regcache.c.
10834 (regcache) <dump>: Remove.
10835
10836 2018-02-21 Yao Qi <yao.qi@linaro.org>
10837
10838 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
10839 reg_buffer_rw *.
10840 (jit_unwind_reg_set_impl): Call raw_supply.
10841 (jit_frame_sniffer): Use reg_buffer_rw.
10842 * record-full.c (record_full_core_regbuf): Change its type.
10843 (record_full_core_open_1): Use reg_buffer_rw.
10844 (record_full_close): Likewise.
10845 (record_full_core_fetch_registers): Use regcache->raw_supply.
10846 (record_full_core_store_registers): Likewise.
10847 * regcache.c (regcache::get_register_status): Move it to
10848 reg_buffer.
10849 (regcache_raw_set_cached_value): Remove.
10850 (regcache::raw_set_cached_value): Remove.
10851 (regcache::raw_write): Call raw_supply.
10852 (regcache::raw_supply): Move it to reg_buffer_rw.
10853 * regcache.h (regcache_raw_set_cached_value): Remove.
10854 (reg_buffer_rw): New class.
10855
10856 2018-02-21 Yao Qi <yao.qi@linaro.org>
10857
10858 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
10859 readonly_detached_regcache.
10860 (dummy_frame_prev_register): Use regcache->cooked_read.
10861 * frame.c (frame_save_as_regcache): Change return type.
10862 (frame_pop): Update.
10863 * frame.h (frame_save_as_regcache): Update declaration.
10864 * inferior.h (get_infcall_suspend_state_regcache): Update
10865 declaration.
10866 * infrun.c (infcall_suspend_state) <registers>: use
10867 readonly_detached_regcache.
10868 (save_infcall_suspend_state): Don't use regcache_dup.
10869 (get_infcall_suspend_state_regcache): Change return type.
10870 * linux-fork.c (struct fork_info) <savedregs>: Change to
10871 readonly_detached_regcache.
10872 <pc>: New field.
10873 (fork_save_infrun_state): Don't use regcache_dup.
10874 (info_checkpoints_command): Adjust.
10875 * mi/mi-main.c (register_changed_p): Update declaration.
10876 (mi_cmd_data_list_changed_registers): Use
10877 readonly_detached_regcache.
10878 (register_changed_p): Change parameter type to
10879 readonly_detached_regcache.
10880 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
10881 readonly_detached_regcache.
10882 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
10883 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
10884 New.
10885 (regcache::save): Move it to reg_buffer.
10886 (regcache::restore): Change parameter type.
10887 (regcache_dup): Remove.
10888 * regcache.h (reg_buffer) <save>: New method.
10889 (readonly_detached_regcache): New class.
10890 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
10891 readonly_detached_regcache.
10892 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
10893
10894 2018-02-21 Yao Qi <yao.qi@linaro.org>
10895
10896 * frame.c (frame_save_as_regcache): Use regcache method save.
10897 (frame_pop): Use regcache method restore.
10898 * infrun.c (restore_infcall_suspend_state): Likewise.
10899 * linux-fork.c (fork_load_infrun_state): Likewise.
10900 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
10901 save.
10902 * regcache.c (regcache_save): Remove.
10903 (regcache::restore): More asserts.
10904 (regcache_cpy): Remove.
10905 * regcache.h (regcache_save): Remove the declaration.
10906 (regcache::restore): Move from private to public.
10907 Remove the friend declaration of regcache_cpy.
10908 (regcache_cpy): Remove declaration.
10909
10910 2018-02-21 Yao Qi <yao.qi@linaro.org>
10911
10912 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
10913 parameter type to 'readable_regcache *'.
10914 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10915 * arm-tdep.c (arm_neon_quad_read): Likewise.
10916 (arm_pseudo_read): Likewise.
10917 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10918 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10919 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10920 * gdbarch.c: Re-generated.
10921 * gdbarch.h: Re-generated.
10922 * gdbarch.sh (pseudo_register_read): Change parameter type to
10923 'readable_regcache *'.
10924 (pseudo_register_read_value): Likewise.
10925 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
10926 (h8300_pseudo_register_read): Likewise.
10927 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
10928 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10929 (i386_pseudo_register_read_into_value): Likewise.
10930 (i386_pseudo_register_read_value): Likewise.
10931 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
10932 declaration.
10933 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
10934 * m32c-tdep.c (m32c_raw_read): Likewise.
10935 (m32c_read_flg): Likewise.
10936 (m32c_banked_register): Likewise.
10937 (m32c_banked_read): Likewise.
10938 (m32c_sb_read): Likewise.
10939 (m32c_part_read): Likewise.
10940 (m32c_cat_read): Likewise.
10941 (m32c_r3r2r1r0_read): Likewise.
10942 (m32c_pseudo_register_read): Likewise.
10943 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10944 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10945 (mep_pseudo_cr64_read): Likewise.
10946 (mep_pseudo_register_read): Likewise.
10947 * mips-tdep.c (mips_pseudo_register_read): Likewise.
10948 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10949 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10950 * regcache.c (regcache::raw_read): Move it to readable_regcache.
10951 (regcache::cooked_read): Likewise.
10952 (regcache::cooked_read_value): Likewise.
10953 (regcache_cooked_read_signed):
10954 (regcache::cooked_read): Likewise.
10955 * regcache.h (readable_regcache): New class.
10956 (regcache): Inherit readable_regcache. Move some methods to
10957 readable_regcache.
10958 * rl78-tdep.c (rl78_pseudo_register_read): Change
10959 parameter type to 'readable_regcache *'.
10960 * rs6000-tdep.c (do_regcache_raw_read): Remove.
10961 (e500_pseudo_register_read): Change parameter type to
10962 'readable_regcache *'.
10963 (dfp_pseudo_register_read): Likewise.
10964 (vsx_pseudo_register_read): Likewise.
10965 (efpr_pseudo_register_read): Likewise.
10966 * s390-tdep.c (s390_pseudo_register_read): Likewise.
10967 * sh-tdep.c (sh_pseudo_register_read): Likewise.
10968 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
10969 (sh64_pseudo_register_read): Likewise.
10970 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10971 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10972 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10973 (spu_pseudo_register_read): Likewise.
10974 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10975 (xtensa_pseudo_register_read): Likewise.
10976
10977 2018-02-21 Yao Qi <yao.qi@linaro.org>
10978
10979 * regcache.c (regcache::regcache): Call reg_buffer ctor.
10980 (regcache::arch): Move it to reg_buffer::arch.
10981 (regcache::register_buffer): Likewise.
10982 (regcache::assert_regnum): Likewise.
10983 (regcache::num_raw_registers): Likewise.
10984 * regcache.h (reg_buffer): New class.
10985 (regcache): Inherit reg_buffer.
10986
10987 2018-02-20 Simon Marchi <simon.marchi@ericsson.com>
10988
10989 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
10990 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
10991
10992 2018-02-20 Markus Metzger <markus.t.metzger@intel.com>
10993
10994 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
10995
10996 2018-02-19 Alan Hayward <alan.hayward@arm.com>
10997
10998 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
10999 (SFILES): Remove common/*.c files.
11000 (COMMON_OBS): Remove some *.o files built from common/*.c files.
11001 * common/common.host: Add common reference.
11002 * configure.ac: Likewise.
11003 * configure: Regenerate.
11004
11005 2018-02-16 Yao Qi <yao.qi@linaro.org>
11006
11007 * block.c (block_namespace_info): Inherit allocate_on_obstack.
11008 (block_initialize_namespace): Use new.
11009 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
11010 (dwarf2_free_objfile): Use delete.
11011 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
11012 (copy_type_recursive): Use new.
11013 * gdb_obstack.h (allocate_on_obstack): New.
11014
11015 2018-02-15 Yao Qi <yao.qi@linaro.org>
11016
11017 PR gdb/22849
11018 * inferior.c (exit_inferior_1): Reset inf->control.
11019
11020 2018-02-15 Joel Brobecker <brobecker@adacore.com>
11021
11022 * ada-lang.c (ada_to_fixed_value_create): Delete advance
11023 declaration.
11024
11025 2018-02-14 Pedro Alves <palves@redhat.com>
11026
11027 * frame-unwind.c (frame_unwind_try_unwinder): Always call
11028 frame_cleanup_after_sniffer on exception.
11029
11030 2018-02-14 Tom Tromey <tom@tromey.com>
11031
11032 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
11033 const.
11034 (solib_bfd_open): Make pathname const.
11035 * solib.c (solib_bfd_open): Make pathname const.
11036 * solib-spu.c (spu_bfd_fopen): Make name const.
11037 (spu_bfd_open): Make pathname const.
11038 * solib-darwin.c (darwin_bfd_open): Make pathname const.
11039 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
11040
11041 2018-02-14 Tom Tromey <tom@tromey.com>
11042
11043 * symfile.c (symfile_bfd_open): Update.
11044 * source.h (openp, source_full_path_of, find_and_open_source):
11045 Change argument type to unique_xmalloc_ptr.
11046 * source.c (openp): Take a unique_xmalloc_ptr.
11047 (source_full_path_of, find_and_open_source): Likewise.
11048 (open_source_file, symtab_to_fullname): Update.
11049 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
11050 unique_xmalloc_ptr.
11051 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
11052 (exec_file_find): Update.
11053 * psymtab.c (psymtab_to_fullname): Update.
11054 * nto-tdep.h (nto_find_and_open_solib): Update.
11055 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
11056 unique_xmalloc_ptr.
11057 * exec.c (exec_file_attach): Update.
11058 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
11059 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
11060
11061 2018-02-14 Tom Tromey <tom@tromey.com>
11062
11063 * solib.c: Include source.h.
11064 * nto-tdep.c: Include source.h.
11065 * mi/mi-cmd-env.c: Include source.h.
11066 * infcmd.c: Include source.h.
11067 * exec.c: Include source.h.
11068 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
11069 (add_path, directory_switch, source_path, init_source_path): Move
11070 declarations...
11071 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
11072 (add_path, directory_switch, source_path, init_source_path):
11073 ...here.
11074
11075 2018-02-14 Tom Tromey <tom@tromey.com>
11076
11077 * solist.h (exec_file_find, solib_find): Return
11078 unique_xmalloc_ptr.
11079 (solib_bfd_fopen): Take a const char *.
11080 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
11081 (exec_file_find, solib_find): Likewise.
11082 (solib_bfd_fopen): Do not take ownership of "pathname".
11083 (solib_bfd_open): Use unique_xmalloc_ptr.
11084 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
11085 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
11086 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
11087 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
11088
11089 2018-02-14 Joel Brobecker <brobecker@adacore.com>
11090
11091 * ada-lang.c (name_match_type_from_name): Remove reference to
11092 ada_name_for_lookup in function's documentation.
11093 * ada-lang.h (ada_name_for_lookup): Delete declaration.
11094
11095 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11096
11097 * defs.h (enum openp_flags): New enum.
11098 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
11099 Move to enum openp_flags.
11100 (openp_flags): New enum flags.
11101 (openp): Change parameter type to openp_flags.
11102 * source.c (openp): Change parameter type to openp_flags.
11103 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
11104 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
11105
11106 2018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
11107
11108 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
11109 per-command.
11110
11111 2018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
11112
11113 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
11114 into...
11115 (class dwarf2_queue_guard): ...the destructor of this new class.
11116 (dw2_do_instantiate_symtab): Create instance of the new class
11117 dwarf2_queue_guard, remove cleanup.
11118
11119 2018-02-09 Tom Tromey <tom@tromey.com>
11120
11121 * source.c (find_source_lines): Don't reference past the end of
11122 the vector.
11123
11124 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11125
11126 * remote.c (remote_btrace_maybe_reopen): Change error message.
11127 * btrace.c (btrace_enable): Likewise.
11128 (parse_xml_btrace): Likewise.
11129 (parse_xml_btrace_conf): Likewise.
11130
11131 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11132
11133 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
11134 (linux_enable_pt, linux_enable_bts): Call
11135 diagnose_perf_event_open_fail.
11136
11137 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11138
11139 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
11140 Remove parameter and change return type. Update callers. Move it.
11141 (linux_enable_bts, linux_enable_pt): Improve error message.
11142 (linux_enable_pt): Remove zero buffer size check.
11143 (linux_enable_btrace): Improve error messages. Remove NULL return
11144 check.
11145
11146 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11147
11148 * btrace.c (btrace_enable): Remove target_supports_btrace call.
11149 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
11150 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
11151 (linux_supports_pt, linux_supports_btrace): Remove.
11152 (linux_enable_bts): Call cpu_supports_bts.
11153 * nat/linux-btrace.h (linux_supports_btrace): Remove.
11154 * remote.c (remote_supports_btrace): Remove.
11155 (init_remote_ops): Remove remote_supports_btrace.
11156 * target-delegates.c: Regenerated.
11157 * target.c (target_supports_btrace): Remove.
11158 * target.h (target_ops) <to_supports_btrace>: Remove
11159 (target_supports_btrace): Remove.
11160 * x86-linux-nat.c (x86_linux_create_target): Remove
11161 linux_supports_btrace.
11162
11163 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11164
11165 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
11166 btrace failed.
11167 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
11168 exception and use message in own exception.
11169
11170 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11171
11172 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
11173 (perf_event_pt_event_type): Use gdb_file_up.
11174 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
11175 scoped_fd, and scoped_mmap.
11176
11177 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11178
11179 * common/scoped_mmap.h: New.
11180 * unittests/scoped_mmap-selftest.c: New.
11181 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11182 unittests/scoped_mmap-selftest.c.
11183
11184 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
11185
11186 * common/scoped_fd.h: New.
11187 * unittests/scoped_fd-selftest.c: New.
11188 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11189 unittests/scoped_fd-selftest.c.
11190
11191 2018-02-09 Tom Tromey <tom@tromey.com>
11192
11193 * auto-load.c (auto_load_section_scripts): Use
11194 gdb::unique_xmalloc_ptr.
11195
11196 2018-02-09 Tom Tromey <tom@tromey.com>
11197
11198 * auto-load.c (execute_script_contents): Use std::string.
11199
11200 2018-02-09 Joel Brobecker <brobecker@adacore.com>
11201
11202 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
11203 Python function, rather than a new command.
11204
11205 2018-02-08 Tom Tromey <tom@tromey.com>
11206
11207 * solib.c (solib_find_1): Use std::string.
11208 (solib_bfd_fopen): Use unique_xmalloc_ptr.
11209
11210 2018-02-08 Tom Tromey <tom@tromey.com>
11211
11212 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
11213
11214 2018-02-08 Tom Tromey <tom@tromey.com>
11215
11216 * source.c (find_source_lines): Use gdb::def_vector.
11217
11218 2018-02-08 Tom Tromey <tom@tromey.com>
11219
11220 * macrocmd.c (struct temporary_macro_definition): New.
11221 (macro_define_command): Use temporary_macro_definition. Remove
11222 cleanups.
11223 (free_macro_definition_ptr): Remove.
11224
11225 2018-02-08 Tom Tromey <tom@tromey.com>
11226
11227 * macroexp.c (maybe_expand): Use std::string.
11228
11229 2018-02-08 Tom Tromey <tom@tromey.com>
11230
11231 * macroexp.c (struct macro_buffer): Add initializers for some
11232 members.
11233 (init_buffer, init_shared_buffer, free_buffer)
11234 (free_buffer_return_text): Remove.
11235 (macro_buffer): New constructors.
11236 (~macro_buffer): New destructor.
11237 (macro_buffer::set_shared): New method.
11238 (macro_buffer::resize_buffer, macro_buffer::appendc)
11239 (macro_buffer::appendmem): Now methods, not free functions.
11240 (set_token, append_tokens_without_splicing, stringify)
11241 (macro_stringify): Update.
11242 (gather_arguments): Change return type. Remove argc_p argument,
11243 add args_ptr argument. Use std::vector.
11244 (substitute_args): Remove argc argument. Accept std::vector.
11245 (expand): Update. Use std::vector.
11246 (scan, macro_expand, macro_expand_next): Update.
11247
11248 2018-02-08 Tom Tromey <tom@tromey.com>
11249
11250 * symtab.c (default_collect_symbol_completion_matches_break_on):
11251 Use unique_xmalloc_ptr.
11252 * macroscope.h: (sal_macro_scope, user_macro_scope)
11253 (default_macro_scope): Return unique_xmalloc_ptr.
11254 * macroscope.c (sal_macro_scope, user_macro_scope)
11255 (default_macro_scope): Return unique_xmalloc_ptr.
11256 * macroexp.h (macro_expand, macro_expand_once): Return
11257 unique_xmalloc_ptr.
11258 * macroexp.c (macro_expand, macro_expand_once): Return
11259 unique_xmalloc_ptr.
11260 * macrocmd.c (macro_expand_command, macro_expand_once_command)
11261 (info_macro_command, info_macros_command): Use
11262 unique_xmalloc_ptr.
11263 * compile/compile-c-support.c (write_macro_definitions): Use
11264 unique_xmalloc_ptr.
11265 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
11266
11267 2018-02-07 Simon Marchi <simon.marchi@ericsson.com>
11268
11269 * value.c (value_static_field): Assign field type instead of
11270 containing type when returning an optimized out value.
11271
11272 2018-02-06 Yao Qi <yao.qi@linaro.org>
11273
11274 * ft32-tdep.c (ft32_read_pc): Remove.
11275 (ft32_write_pc): Remove.
11276 (ft32_gdbarch_init): Update.
11277 * m32r-tdep.c (m32r_read_pc): Remove.
11278 (m32r_gdbarch_init): Update.
11279 * mep-tdep.c (mep_read_pc): Remove.
11280 (mep_gdbarch_init): Update.
11281 * microblaze-tdep.c (microblaze_write_pc): Remove.
11282 (microblaze_gdbarch_init): Update.
11283 * mn10300-tdep.c (mn10300_read_pc): Remove.
11284 (mn10300_write_pc): Remove.
11285 (mn10300_gdbarch_init): Update.
11286 * moxie-tdep.c (moxie_read_pc): Remove.
11287 (moxie_write_pc): Remove.
11288 (moxie_gdbarch_init): Update.
11289
11290 2018-02-06 Yao Qi <yao.qi@linaro.org>
11291
11292 * expprint.c (print_subexp_standard): Handle
11293 OP_F77_UNDETERMINED_ARGLIST.
11294 (dump_subexp_body_standard): Likewise.
11295
11296 2018-02-05 Alan Hayward <alan.hayward@arm.com>
11297
11298 * target-descriptions.c (tdesc_element_visitor) Add empty
11299 implementations.
11300 (tdesc_type): Move make_gdb_type from here.
11301 (tdesc_type_builtin): Likewise.
11302 (tdesc_type_vector): Likewise.
11303 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
11304 (make_gdb_type_struct): Move from tdesc_type_with_fields.
11305 (make_gdb_type_union): Likewise.
11306 (make_gdb_type_flags): Likewise.
11307 (make_gdb_type_enum): Likewise.
11308 (make_gdb_type): New function.
11309 (tdesc_register_type): Use static make_gdb_type.
11310
11311 2018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
11312
11313 * infcmd.c (default_print_one_register_info): Align natural-format
11314 column values consistently one under another.
11315 (pad_to_column): New function.
11316
11317 2018-02-05 Joel Brobecker <brobecker@adacore.com>
11318
11319 * dwarf2read.c (dwarf2_physname): Move commment.
11320
11321 2018-02-01 Leszek Swirski <leszeks@google.com>
11322
11323 * varobj.c (varobj_formatted_print_options): Allow recursive
11324 pretty printing if pretty printing is enabled.
11325
11326 2018-02-01 Leszek Swirski <leszeks@google.com>
11327
11328 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
11329 names after a structop as a filename.
11330
11331 2018-02-01 Yao Qi <yao.qi@linaro.org>
11332
11333 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
11334 (arm_record_coproc_data_proc): Likewise.
11335
11336 2018-02-01 Yao Qi <yao.qi@linaro.org>
11337
11338 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
11339
11340 2018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
11341
11342 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
11343 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
11344
11345 2018-01-31 Pedro Alves <palves@redhat.com>
11346
11347 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
11348 * inflow.c (child_terminal_save_inferior): Wrap reference to
11349 tcgetpgrp in HAVE_TERMIOS_H.
11350 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
11351 _WIN32.
11352 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
11353 always iterate over all inferiors.
11354 (gdbsim_cntrl_c): Adjust.
11355 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
11356
11357 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11358
11359 * gdbtypes.c (lookup_array_range_type): Make sure the array's
11360 index type is objfile-owned if the element type is as well.
11361
11362 2018-01-31 Joel Brobecker <brobecker@adacore.com>
11363
11364 GDB 8.1 released.
11365
11366 2018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
11367
11368 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
11369 "features/s390x-linux64.c".
11370 (_initialize_s390_linux_tdep): Remove initialization of tdescs
11371 s390_linux32 and s390x_linux64.
11372 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
11373 default tdesc.
11374 * s390-tdep.c: Include "features/s390-linux32.c" and
11375 "features/s390x-linux64.c".
11376 (s390_tdesc_valid): Add check for tdesc_has_registers.
11377 (s390_gdbarch_init): Make sure there is always a valid tdesc.
11378 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
11379 tdesc_s390x_linux64.
11380 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
11381 tdesc_s390x_linux64 to...
11382 * s390-tdep.h: ...here.
11383
11384 2018-01-30 Pedro Alves <palves@redhat.com>
11385
11386 PR gdb/13211
11387 * config.in, configure: Regenerate.
11388 * configure.ac: Check for getpgid.
11389 * go32-nat.c (go32_pass_ctrlc): New.
11390 (go32_target): Install it.
11391 * inf-child.c (inf_child_target): Install
11392 child_terminal_save_inferior, child_pass_ctrlc and
11393 child_interrupt.
11394 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
11395 (inf_ptrace_target): No longer install it.
11396 * infcmd.c (interrupt_target_1): Adjust.
11397 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
11398 (child_interrupt): Declare.
11399 (inferior::terminal_state): New.
11400 * inflow.c (struct terminal_info): Update comments.
11401 (inferior_process_group): Delete.
11402 (terminal_is_ours): Delete.
11403 (gdb_tty_state): New.
11404 (child_terminal_init): Adjust.
11405 (is_gdb_terminal, sharing_input_terminal_1)
11406 (sharing_input_terminal): New functions.
11407 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
11408 Set the process's actual process group in the foreground if
11409 possible. Handle is_ours_for_output/is_ours distinction. Don't
11410 mark terminal as the inferior's if not sharing GDB's terminal.
11411 Don't check attach_flag.
11412 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
11413 pass down a target_terminal_state.
11414 (child_terminal_save_inferior): New, factored out from ...
11415 (child_terminal_ours_1): ... this. Handle
11416 target_terminal_state::is_ours_for_output.
11417 (child_interrupt, child_pass_ctrlc): New.
11418 (inflow_inferior_exit): Clear the inferior's terminal_state.
11419 (copy_terminal_info): Copy the inferior's terminal state.
11420 (_initialize_inflow): Remove reference to terminal_is_ours.
11421 * inflow.h (inferior_process_group): Delete.
11422 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
11423 * procfs.c (procfs_target): Don't install procfs_interrupt.
11424 (procfs_interrupt): Delete.
11425 * remote.c (remote_serial_quit_handler): Adjust.
11426 (remote_interrupt): Remove ptid parameter. Adjust.
11427 * target-delegates.c: Regenerate.
11428 * target.c: Include "terminal.h".
11429 (target_terminal::terminal_state): Rename to ...
11430 (target_terminal::m_terminal_state): ... this.
11431 (target_terminal::init): Adjust.
11432 (target_terminal::inferior): Adjust to per-inferior
11433 terminal_state.
11434 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
11435 (target_terminal::ours, target_terminal::ours_for_output): Use
11436 target_terminal_is_ours_kind.
11437 (target_interrupt): Remove ptid parameter. Adjust.
11438 (default_target_pass_ctrlc): Adjust.
11439 * target.h (target_ops::to_terminal_save_inferior): New field.
11440 (target_ops::to_interrupt): Remove ptid_t parameter.
11441 (target_interrupt): Remove ptid_t parameter. Update comment.
11442 (target_pass_ctrlc): Update comment.
11443 * target/target.h (target_terminal_state): New scoped enum,
11444 factored out of ...
11445 (target_terminal::terminal_state): ... here.
11446 (target_terminal::inferior): Update comments.
11447 (target_terminal::restore_inferior): New.
11448 (target_terminal::is_inferior, target_terminal::is_ours)
11449 (target_terminal::is_ours_for_output): Adjust.
11450 (target_terminal::scoped_restore_terminal_state): Adjust to
11451 rename, and call restore_inferior() instead of inferior().
11452 (target_terminal::scoped_restore_terminal_state::m_state): Change
11453 type.
11454 (target_terminal::terminal_state): Rename to ...
11455 (target_terminal::m_terminal_state): ... this and change type.
11456
11457 2018-01-30 Pedro Alves <palves@redhat.com>
11458
11459 * linux-nat.c (wait_for_signal): New function.
11460 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
11461 directly.
11462 (async_terminal_is_ours)
11463 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
11464 (linux_nat_add_target): Don't override
11465 to_terminal_inferior/to_terminal_ours.
11466
11467 2018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
11468
11469 * remote.c (remote_follow_fork): Don't call "detach_inferior".
11470
11471 2018-01-28 Simon Marchi <simon.marchi@ericsson.com>
11472
11473 * dwarf2read.c (free_dwo_files): Add forward-declaration.
11474 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
11475 dwarf2_per_objfile_free here.
11476 (dwarf2_per_objfile_free): Remove.
11477 (_initialize_dwarf2_read): Don't register
11478 dwarf2_per_objfile_free as a registry cleanup.
11479
11480 2018-01-27 Eli Zaretskii <eliz@gnu.org>
11481
11482 Avoid compilation errors in MinGW native builds
11483
11484 The error is triggered by including python-internal.h, and the
11485 error message is:
11486
11487 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
11488 from build-gnulib/import/math.h:27,
11489 from d:/usr/Python26/include/pyport.h:235,
11490 from d:/usr/Python26/include/Python.h:58,
11491 from python/python-internal.h:94,
11492 from python/py-arch.c:24:
11493 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
11494 using ::hypot;
11495 ^~~~~
11496
11497 This happens because Python headers define 'hypot' to expand t
11498 '_hypot' in the Windows builds.
11499 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
11500 'hypoth'. This avoids a compilation error.
11501
11502 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11503
11504 * MAINTAINERS (Write After Approval): Fix ordering.
11505
11506 2018-01-26 Alan Hayward <alan.hayward@arm.com>
11507
11508 * MAINTAINERS (Write After Approval): Add Alan Hayward.
11509
11510 2018-01-26 Alan Modra <amodra@gmail.com>
11511
11512 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
11513 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
11514 Remove nop. Make const. Comment.
11515 (powerpc32_plt_stub_so_2): New.
11516 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
11517 Correct count. Update uses.
11518 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
11519 Move common code reading PLT entry word. Correct
11520 powerpc32_plt_stub PLT address calculation.
11521 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
11522 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
11523 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
11524 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
11525 (ppc64_standard_linkage8): Likewise.
11526 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
11527 Correct insns description.
11528 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
11529
11530 2018-01-24 Pedro Alves <palves@redhat.com>
11531
11532 GCC PR libstdc++/83906
11533 * gdbtypes.c (operator==(const dynamic_prop &,
11534 const dynamic_prop &)): New.
11535 (operator==(const range_bounds &, const range_bounds &)): New.
11536 (check_types_equal): Use them instead of memcmp.
11537 * gdbtypes.h (operator==(const dynamic_prop &,
11538 const dynamic_prop &)): Declare.
11539 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
11540 (operator==(const range_bounds &, const range_bounds &)): Declare.
11541 (operator!=(const range_bounds &, const range_bounds &)): Declare.
11542
11543 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11544
11545 * s390-linux-tdep.c (s390_record_address_mask)
11546 (s390_record_calc_disp_common, s390_record_calc_disp)
11547 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11548 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11549 (s390_process_record): Move to s390-tdep.c.
11550 (s390_linux_init_abi_any): Adjust.
11551 * s390-tdep.c (s390_record_address_mask)
11552 (s390_record_calc_disp_common, s390_record_calc_disp)
11553 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
11554 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
11555 (s390_process_record): Moved from s390-linux-tdep.c
11556 (s390_gdbarch_init): Adjust.
11557
11558 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11559
11560 * s390-linux-nat.c (s390-tdep.h): New include.
11561 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
11562 (HFILES_NO_SRCDIR): Add s390-tdep.h.
11563 (ALLDEPFILES): Add s390-tdep.c.
11564 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
11565 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
11566 * s390-tdep.h: ...this. New file.
11567 * s390-linux-tdep.c (s390-tdep.h): New include.
11568 (_initialize_s390_tdep): Rename to...
11569 (_initialize_s390_linux_tdep): ...this and adjust.
11570 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
11571 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
11572 s390-tdep.h.
11573 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
11574 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
11575 (s390_is_partial_instruction, s390_software_single_step)
11576 (is_non_branch_ril, s390_displaced_step_copy_insn)
11577 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
11578 (s390_prologue_data, s390_addr, s390_store, s390_load)
11579 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
11580 (s390_register_call_saved, s390_guess_tracepoint_registers)
11581 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
11582 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
11583 (s390_pseudo_register_name, s390_pseudo_register_type)
11584 (s390_pseudo_register_read, s390_pseudo_register_write)
11585 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
11586 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
11587 (s390_addr_bits_remove, s390_address_class_type_flags)
11588 (s390_address_class_type_flags_to_name)
11589 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
11590 (s390_function_arg_float, s390_function_arg_vector)
11591 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
11592 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
11593 (s390_frame_align, s390_register_return_value, s390_return_value)
11594 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
11595 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
11596 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
11597 (s390_trad_frame_prev_register, s390_unwind_cache)
11598 (s390_prologue_frame_unwind_cache)
11599 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
11600 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
11601 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
11602 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
11603 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
11604 (s390_frame_base_address, s390_local_base_address)
11605 (s390_frame_base, s390_gcc_target_options)
11606 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
11607 (s390_validate_reg_range, s390_tdesc_valid)
11608 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
11609 * s390-tdep.c: ...this. New file.
11610
11611 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11612
11613 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
11614 (s390_process_record, s390_gdbarch_tdep_alloc)
11615 (s390_linux_init_abi_any): Use/set new hook.
11616
11617 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11618
11619 * s390-linux-tdep.c (osabi.h): New include.
11620 (s390_linux_init_abi_31, s390_linux_init_abi_64)
11621 (s390_linux_init_abi_any): New functions.
11622 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
11623
11624 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11625
11626 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
11627 tdesc_has_registers check
11628
11629 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11630
11631 * s390-linux-tdep.c (s390_tdesc_valid): New function.
11632 (s390_validate_reg_range): New macro.
11633 (s390_gdbarch_init): Adjust.
11634
11635 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11636
11637 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
11638 (s390_gdbarch_tdep_alloc): Adjust.
11639 (s390_gdbarch_init): Adjust.
11640
11641 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11642
11643 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
11644 <have_tdb>: Change type to bool.
11645 (s390_gdbarch_tdep_alloc): Adjust.
11646 (s390_gdbarch_init): Adjust.
11647
11648 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11649
11650 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
11651 (gdbarch_tdep) <have_upper, have_vx>: New fields.
11652 (s390_gdbarch_tdep_alloc): New function.
11653 (s390_gdbarch_init): Allocate tdep at start and use its fields
11654 instead of separate variables.
11655
11656 2018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
11657
11658 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
11659 when looking for cached gdbarch and add comment for remaining.
11660
11661 2018-01-22 Pedro Alves <palves@redhat.com>
11662 Sergio Durigan Junior <sergiodj@redhat.com>
11663
11664 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
11665 case.
11666
11667 2018-01-22 Maciej W. Rozycki <macro@mips.com>
11668
11669 * MAINTAINERS: Update my company e-mail address.
11670
11671 2018-01-22 Yao Qi <yao.qi@linaro.org>
11672
11673 * regcache.c (cooked_write_test): New function.
11674 (_initialize_regcache): Register the test.
11675
11676 2018-01-22 Yao Qi <yao.qi@linaro.org>
11677
11678 * ia64-tdep.c (ia64_pseudo_register_read): Call
11679 regcache->cooked_read instead of regcache_cooked_read_unsigned.
11680 * m32c-tdep.c (m32c_cat_read): Likewise.
11681 (m32c_r3r2r1r0_read): Likewise.
11682 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
11683 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
11684
11685 2018-01-22 Yao Qi <yao.qi@linaro.org>
11686
11687 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
11688 method raw_read instead of regcache_raw_read.
11689 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
11690 * arm-tdep.c (arm_neon_quad_read): Likewise.
11691 * avr-tdep.c (avr_pseudo_register_read): Likewise.
11692 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
11693 * frv-tdep.c (frv_pseudo_register_read): Likewise.
11694 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
11695 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
11696 (i386_pseudo_register_read_into_value): Likewise.
11697 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
11698 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
11699 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
11700 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
11701 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
11702 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
11703 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
11704 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
11705 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
11706
11707 2018-01-22 Yao Qi <yao.qi@linaro.org>
11708
11709 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
11710 * configure.tgt: Remove target mt.
11711 * mt-tdep.c: Remove.
11712 * regcache.c (cooked_read_test): Remove the check for mt.
11713
11714 2018-01-22 Yao Qi <yao.qi@linaro.org>
11715
11716 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
11717 instead of gdbarch_pseudo_register_read_value.
11718
11719 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11720
11721 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
11722 language is Ada.
11723
11724 2018-01-22 Joel Brobecker <brobecker@adacore.com>
11725
11726 * linespec.c (create_sals_line_offset): Remove code that preserved
11727 the symtab_and_line's line number.
11728
11729 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11730
11731 * varobj.c (varobj_create): Don't set valid_block when creating a
11732 floating varobj.
11733
11734 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11735
11736 * varobj.c (varobj_create): Remove out of date comment.
11737
11738 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11739
11740 PR mi/20395
11741 * ada-exp.y (write_var_from_sym): Pass extra parameter when
11742 updating innermost block.
11743 * parse.c (innermost_block_tracker::update): Take extra type
11744 parameter, and check types match before updating innermost block.
11745 (write_dollar_variable): Update innermost block for registers.
11746 * parser-defs.h (enum innermost_block_tracker_type): New enum.
11747 (innermost_block_tracker::innermost_block_tracker): Initialise
11748 m_types member.
11749 (innermost_block_tracker::reset): Take type parameter.
11750 (innermost_block_tracker::update): Take type parameter, and pass
11751 type through as needed.
11752 (innermost_block_tracker::m_types): New member.
11753 * varobj.c (varobj_create): Pass type when reseting innermost
11754 block.
11755
11756 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11757
11758 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
11759 * ada-lang.c (resolve_subexp): Likewise.
11760 * breakpoint.c (set_breakpoint_condition) Likewise.
11761 (watch_command_1) Likewise.
11762 * c-exp.y (variable): Likewise.
11763 * d-exp.y (PrimaryExpression): Likewise.
11764 * f-exp.y (variable): Likewise.
11765 * go-exp.y (variable): Likewise.
11766 * m2-exp.y (variable): Likewise.
11767 * objfiles.c (objfile::~objfile): Likewise.
11768 * p-exp.y (variable): Likewise.
11769 * parse.c (innermost_block): Change type.
11770 * parser-defs.h (class innermost_block_tracker): New.
11771 (innermost_block): Change to innermost_block_tracker.
11772 * printcmd.c (display_command): Switch to innermost_block API.
11773 (do_one_display): Likewise.
11774 * rust-exp.y (do_one_display): Likewise.
11775 * symfile.c (clear_symtab_users): Likewise.
11776 * varobj.c (varobj_create): Switch to innermost_block API, replace
11777 use of innermost_block with block stored on varobj object.
11778
11779 2018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
11780
11781 * expression.h (innermost_block): Remove declaration.
11782 * varobj.c: Add 'parser-defs.h' include.
11783
11784 2018-01-19 Tom Tromey <tom@tromey.com>
11785
11786 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
11787 symbols in the static and global blocks.
11788
11789 2018-01-19 James Clarke <jrtc27@jrtc27.com>
11790
11791 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
11792 gdb_ptrace.h, and move including gdb_wait.h ...
11793 * nat/linux-ptrace.h: ... to here.
11794
11795 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11796
11797 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
11798 inf_ptrace_detach_success.
11799 (inf_ptrace_detach_success): Add inferior parameter, use it
11800 instead of inferior_ptid, pass it to detach_inferior.
11801 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
11802 parameter.
11803 * inferior.c (detach_inferior): Add overload that takes an
11804 inferior object.
11805 * inferior.h (detach_inferior): Likewise.
11806 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
11807 use inferior_ptid, adjust call to inf_ptrace_detach_success.
11808 * linux-thread-db.c (thread_db_detach): Use inf parameter.
11809
11810 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11811
11812 * target.h (struct target_ops) <to_detach>: Add inferior
11813 parameter.
11814 (target_detach): Likewise.
11815 * target.c (dispose_inferior): Pass inferior down.
11816 (target_detach): Pass inferior down. Assert that it is equal to
11817 the current inferior.
11818 * aix-thread.c (aix_thread_detach): Pass inferior down.
11819 * corefile.c (core_file_command): Pass current_inferior() down.
11820 * corelow.c (core_detach): Add inferior parameter.
11821 * darwin-nat.c (darwin_detach): Likewise.
11822 * gnu-nat.c (gnu_detach): Likewise.
11823 * inf-ptrace.c (inf_ptrace_detach): Likewise.
11824 * infcmd.c (detach_command): Pass current_inferior() down to
11825 target_detach.
11826 * infrun.c (follow_fork_inferior): Pass parent_inf to
11827 target_detach.
11828 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
11829 target_detach.
11830 * linux-nat.c (linux_nat_detach): Add inferior parameter.
11831 * linux-thread-db.c (thread_db_detach): Likewise.
11832 * nto-procfs.c (procfs_detach): Likewise.
11833 * procfs.c (procfs_detach): Likewise.
11834 * record.c (record_detach): Likewise.
11835 * record.h (struct inferior): Forward-declare.
11836 (record_detach): Add inferior parameter.
11837 * remote-sim.c (gdbsim_detach): Likewise.
11838 * remote.c (remote_detach_1): Likewise.
11839 (remote_detach): Likewise.
11840 (extended_remote_detach): Likewise.
11841 * sol-thread.c (sol_thread_detach): Likewise.
11842 * target-debug.h (target_debug_print_inferior_p): New macro.
11843 * target-delegates.c: Re-generate.
11844 * top.c (kill_or_detach): Pass inferior down to target_detach.
11845 * windows-nat.c (windows_detach): Add inferior parameter.
11846
11847 2018-01-19 Simon Marchi <simon.marchi@ericsson.com>
11848
11849 * target.h (struct target_ops) <to_detach>: Remove args
11850 parameter.
11851 (target_detach): Likewise.
11852 * target.c (dispose_inferior): Adjust.
11853 (target_detach): Remove args parameter, adjust.
11854 * aix-thread.c (aix_thread_detach): Adjust.
11855 * corefile.c (core_file_command): Adjust.
11856 * corelow.c (core_detach): Adjust.
11857 * darwin-nat.c (darwin_detach): Adjust.
11858 * gnu-nat.c (gnu_detach): Adjust.
11859 * inf-ptrace.c (inf_ptrace_detach): Adjust.
11860 * infcmd.c (detach_command): Adjust
11861 * infrun.c (follow_fork_inferior): Adjust.
11862 (handle_vfork_child_exec_or_exit): Adjust.
11863 * linux-fork.c (linux_fork_detach): Remove args parameter.
11864 * linux-fork.h (linux_fork_detach): Likewise.
11865 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
11866 * linux-thread-db.c (thread_db_detach): Likewise.
11867 * nto-procfs.c (procfs_detach): Likewise.
11868 * procfs.c (procfs_detach): Likewise.
11869 (do_detach): Remove signo parameter.
11870 * record.c (record_detach): Remove args parameter.
11871 * record.h (record_detach): Likewise.
11872 * remote-sim.c (gdbsim_detach): Likewise.
11873 * remote.c (remote_detach_1): Likewise.
11874 (remote_detach): Likewise.
11875 (extended_remote_detach): Likewise.
11876 * sol-thread.c (sol_thread_detach): Likewise.
11877 * target-delegates.c: Re-generate.
11878 * top.c (struct qt_args) <args>: Remove field.
11879 (kill_or_detach): Don't pass args.
11880 (quit_force): Don't set args.
11881 * windows-nat.c (windows_detach): Remove args parameter.
11882
11883 2018-01-19 Yao Qi <yao.qi@linaro.org>
11884
11885 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
11886 (arm_linux_init_abi): Install it.
11887
11888 2018-01-19 Yao Qi <yao.qi@linaro.org>
11889
11890 * osabi.c (gdb_osabi_names): Extend the regexp for
11891 arm-linux-gnueabihf.
11892
11893 2018-01-18 Yao Qi <yao.qi@linaro.org>
11894
11895 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
11896 m_abbrevs.
11897 (abbrev_table::add_abbrev): Update.
11898 (abbrev_table::lookup_abbrev): Update.
11899
11900 2018-01-18 Yao Qi <yao.qi@linaro.org>
11901
11902 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
11903
11904 2018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
11905
11906 * compile/compile.c (compile_to_object): Convert "triplet_rx"
11907 to "std::string".
11908
11909 2018-01-17 Tom Tromey <tom@tromey.com>
11910
11911 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
11912
11913 2018-01-17 Tom Tromey <tom@tromey.com>
11914
11915 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
11916 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
11917 (create_array_type_with_stride): Update.
11918 * dwarf2read.c (set_die_type): Update.
11919
11920 2018-01-17 Tom Tromey <tom@tromey.com>
11921
11922 * dwarf2read.c (delayed_method_info): Remove typedef.
11923 (dwarf2_cu::method_info): Now a std::vector.
11924 (add_to_method_list): Update.
11925 (free_delayed_list): Remove.
11926 (compute_delayed_physnames): Update.
11927 (process_full_comp_unit, process_full_type_unit): Clear the method
11928 list. Remove cleanups.
11929 (psymtab_include_file_name): Add name_holder parameter. Use
11930 unique_xmalloc_ptr.
11931 (dwarf_decode_lines): Update.
11932
11933 2018-01-17 Tom Tromey <tom@tromey.com>
11934 Simon Marchi <simon.marchi@ericsson.com>
11935
11936 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
11937 (dwarf2_per_objfile::free_cached_comp_units)
11938 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11939 (init_cutu_and_read_dies_no_follow): Update.
11940 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
11941 (dwarf2_cu::~dwarf2_cu): New.
11942 (free_heap_comp_unit, free_stack_comp_unit): Remove.
11943 (age_cached_comp_units, free_one_cached_comp_unit): Update.
11944
11945 2018-01-17 Tom Tromey <tom@tromey.com>
11946 Simon Marchi <simon.marchi@ericsson.com>
11947
11948 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
11949 (struct die_reader_specs) <abbrev_table>: New member.
11950 (struct abbrev_table): Add constructor.
11951 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
11952 <abbrev_obstack>: Now an auto_obstack.
11953 (abbrev_table_up): New typedef.
11954 (init_cu_die_reader): Add abbrev_table parameter.
11955 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
11956 Add result_dwo_abbrev_table.
11957 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
11958 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
11959 Update.
11960 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
11961 parameter.
11962 (skip_children): Update.
11963 (abbrev_table::alloc_abbrev): Rename from
11964 abbrev_table_alloc_abbrev.
11965 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
11966 (abbrev_table::lookup_abbrev): Rename from
11967 abbrev_table_lookup_abbrev.
11968 (abbrev_table_read_table): Return abbrev_table_up.
11969 (abbrev_table_free, abbrev_table_free_cleanup)
11970 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
11971 (load_partial_dies): Update.
11972
11973 2018-01-17 Tom Tromey <tom@tromey.com>
11974
11975 * dwarf2read.c (dwarf2_compute_name): Update comment.
11976 (read_func_scope, read_variable): Update.
11977 (new_symbol): Remove.
11978 (new_symbol_full): Rename to new_symbol.
11979
11980 2018-01-17 Mike Gulick <mgulick@mathworks.com>
11981
11982 PR gdb/16577
11983 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
11984 a warning instead of throwing an error, set section size to 0 and return
11985 NULL.
11986 * gdb_bfd.h (gdb_bfd_map_section): Update description.
11987
11988 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11989
11990 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
11991 std::string.
11992 (linux_ptrace_attach_fail_reason_string): Likewise.
11993 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
11994 Likewise.
11995 (linux_ptrace_attach_fail_reason_string): Likewise.
11996 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
11997
11998 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
11999
12000 * linux-nat.c (linux_nat_attach): Remove xstrdup.
12001
12002 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
12003
12004 PR gdb/21559
12005 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
12006 checking for fs_base/gs_base fields in struct user_regs_struct.
12007 * configure: Regenerate.
12008
12009 2018-01-17 Yao Qi <yao.qi@linaro.org>
12010
12011 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
12012 function.
12013 (aarch64_linux_init_abi): Install it to gdbarch hook
12014 gcc_target_options.
12015
12016 2018-01-15 Pedro Alves <palves@redhat.com>
12017
12018 * common/signals-state-save-restore.c
12019 (save_original_signals_state): Fix typos.
12020
12021 2017-01-12 Tom Tromey <tom@tromey.com>
12022 Sergio Durigan Junior <sergiodj@redhat.com>
12023
12024 * Makefile.in (install-only): Install gdb-add-index.
12025
12026 2018-01-12 John Baldwin <jhb@FreeBSD.org>
12027
12028 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
12029
12030 2018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
12031
12032 * infrun.c (keep_going_pass_signal): Clear step-over info when
12033 insert_breakpoints fails.
12034
12035 2018-01-11 Pedro Alves <palves@redhat.com>
12036
12037 PR gdb/22583
12038 * infrun.c (resume): Rename to ...
12039 (resume_1): ... this.
12040 (resume): Reimplement as wrapper around resume_1.
12041
12042 2018-01-11 Pedro Alves <palves@redhat.com>
12043
12044 PR remote/22597
12045 * remote.c (remote_parse_stop_reply): Default to the last-set
12046 general thread instead of to 'magic_null_ptid'.
12047
12048 2018-01-10 Pedro Alves <palves@redhat.com>
12049
12050 * language.h (language_get_symbol_name_matcher): Rename ...
12051 (get_symbol_name_matcher): ... this.
12052 * language.c (language_get_symbol_name_matcher): Ditto.
12053 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
12054 callers adjusted.
12055
12056 2018-01-10 Pedro Alves <palves@redhat.com>
12057
12058 PR gdb/22670
12059 * dwarf2read.c
12060 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
12061 Adjust to use language_get_symbol_name_matcher instead of
12062 language_defn::la_get_symbol_name_matcher.
12063 * language.c (language_get_symbol_name_matcher): If in Ada mode
12064 and the lookup name is a verbatim match, return Ada's matcher.
12065 * language.h (language_get_symbol_name_matcher): Adjust comment.
12066 (ada_lookup_name_info::verbatim_p):: New method.
12067
12068 2018-01-10 Pedro Alves <palves@redhat.com>
12069
12070 PR gdb/22670
12071 * ada-lang.c (ada_collect_symbol_completion_matches): If the
12072 minsym's language is language_auto or language_cplus, pass down
12073 language_ada instead.
12074 * symtab.c (compare_symbol_name): Don't frob symbol language here.
12075
12076 2018-01-10 Pedro Alves <palves@redhat.com>
12077
12078 PR gdb/22670
12079 * minsyms.c (linkage_name_str): New function.
12080 (iterate_over_minimal_symbols): Use it.
12081
12082 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12083
12084 * NEWS: Document that 'info proc' now works on FreeBSD.
12085
12086 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12087
12088 * configure.ac: Check for kinfo_getfile in libutil.
12089 * configure: Regenerate.
12090 * config.in: Regenerate.
12091 * fbsd-nat.c: Include "fbsd-tdep.h".
12092 (fbsd_fetch_cmdline): New.
12093 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
12094 rather than calling error.
12095 (fbsd_info_proc): New.
12096 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
12097 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
12098 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
12099
12100 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12101
12102 * fbsd-nat.c (struct free_deleter): Remove.
12103 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
12104
12105 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12106
12107 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
12108 NULL for an empty pathname.
12109
12110 2018-01-09 John Baldwin <jhb@FreeBSD.org>
12111
12112 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
12113 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
12114 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
12115 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
12116 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
12117 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
12118 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
12119 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
12120 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
12121 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
12122 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
12123 (fbsd_core_fetch_timeval, fbsd_print_sigset)
12124 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
12125 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
12126 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
12127
12128 2018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
12129
12130 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
12131 (gnu_xfer_auxv): New function.
12132 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
12133 TARGET_OBJECT_AUXV.
12134
12135 2018-01-08 Yao Qi <yao.qi@linaro.org>
12136 Simon Marchi <simon.marchi@ericsson.com>
12137
12138 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
12139 common/selftest.c.
12140 (COMMON_OBS): Remove selftest.o.
12141 * configure.ac: Append selftest-arch.c and common/selftest.c to
12142 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
12143 * configure: Re-generated.
12144 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
12145 GDB_SELF_TEST.
12146 (maintenance_info_selftests): Likewise.
12147
12148 2018-01-08 Xavier Roirand <roirand@adacore.com>
12149
12150 * ada-valprint.c (val_print_packed_array_elements): Use
12151 proper number of elements when printing an array indexed
12152 by an enumeration type.
12153
12154 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12155
12156 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
12157 (dw2_get_file_names_reader): Adjust.
12158 (lookup_dwo_signatured_type): Adjust.
12159 (lookup_dwp_signatured_type): Adjust.
12160 (lookup_signatured_type): Adjust.
12161 (create_type_unit_group): Adjust.
12162 (get_type_unit_group): Adjust.
12163 (process_psymtab_comp_unit_reader): Adjust.
12164 (build_type_psymtabs_reader): Adjust.
12165 (scan_partial_symbols): Adjust.
12166 (add_partial_symbol): Adjust.
12167 (add_partial_subprogram): Adjust.
12168 (peek_die_abbrev): Adjust.
12169 (fixup_go_packaging): Adjust.
12170 (process_imported_unit_die): Adjust.
12171 (dwarf2_compute_name): Adjust.
12172 (dwarf2_physname): Adjust.
12173 (read_import_statement): Adjust.
12174 (handle_DW_AT_stmt_list): Adjust.
12175 (read_file_scope): Adjust.
12176 (read_func_scope): Adjust.
12177 (read_lexical_block_scope): Adjust.
12178 (read_call_site_scope): Adjust.
12179 (read_variable): Adjust.
12180 (dwarf2_rnglists_process): Adjust.
12181 (dwarf2_ranges_process): Adjust.
12182 (dwarf2_ranges_read): Adjust.
12183 (dwarf2_get_pc_bounds): Adjust.
12184 (dwarf2_record_block_ranges): Adjust.
12185 (dwarf2_add_field): Adjust.
12186 (dwarf2_add_member_fn): Adjust.
12187 (read_structure_type): Adjust.
12188 (process_structure_scope): Adjust.
12189 (read_enumeration_type): Adjust.
12190 (read_array_type): Adjust.
12191 (mark_common_block_symbol_computed): Adjust.
12192 (read_common_block): Adjust.
12193 (read_namespace_type): Adjust.
12194 (read_namespace): Adjust.
12195 (read_module_type): Adjust.
12196 (read_tag_pointer_type): Adjust.
12197 (read_tag_ptr_to_member_type): Adjust.
12198 (read_tag_string_type): Adjust.
12199 (read_subroutine_type): Adjust.
12200 (read_typedef): Adjust.
12201 (read_base_type): Adjust.
12202 (attr_to_dynamic_prop): Adjust.
12203 (read_subrange_type): Adjust.
12204 (read_unspecified_type): Adjust.
12205 (dwarf2_read_abbrevs): Adjust.
12206 (load_partial_dies): Adjust.
12207 (read_partial_die): Adjust.
12208 (find_partial_die): Adjust.
12209 (guess_partial_die_structure_name): Adjust.
12210 (fixup_partial_die): Adjust.
12211 (read_attribute_value): Adjust.
12212 (read_addr_index): Adjust.
12213 (read_addr_index_from_leb128): Adjust.
12214 (read_str_index): Adjust.
12215 (dwarf2_string_attr): Adjust.
12216 (get_debug_line_section): Adjust.
12217 (dwarf_decode_line_header): Adjust.
12218 (lnp_state_machine::check_line_address): Adjust.
12219 (dwarf_decode_lines_1): Adjust.
12220 (dwarf_decode_lines): Adjust.
12221 (dwarf2_start_symtab): Adjust.
12222 (var_decode_location): Adjust.
12223 (new_symbol_full): Adjust.
12224 (dwarf2_const_value_data): Adjust.
12225 (dwarf2_const_value_attr): Adjust.
12226 (dwarf2_const_value): Adjust.
12227 (die_type): Adjust.
12228 (die_containing_type): Adjust.
12229 (build_error_marker_type): Adjust.
12230 (lookup_die_type): Adjust.
12231 (guess_full_die_structure_name): Adjust.
12232 (anonymous_struct_prefix): Adjust.
12233 (determine_prefix): Adjust.
12234 (dwarf2_name): Adjust.
12235 (follow_die_ref_or_sig): Adjust.
12236 (follow_die_offset): Adjust.
12237 (follow_die_ref): Adjust.
12238 (follow_die_sig_1): Adjust.
12239 (follow_die_sig): Adjust.
12240 (get_signatured_type): Adjust.
12241 (get_DW_AT_signature_type): Adjust.
12242 (decode_locdesc): Adjust.
12243 (dwarf_decode_macros): Adjust.
12244 (cu_debug_loc_section): Adjust.
12245 (fill_in_loclist_baton): Adjust.
12246 (dwarf2_symbol_mark_computed): Adjust.
12247 (init_one_comp_unit): Don't assign
12248 dwarf2_cu::dwarf2_per_objfile.
12249 (set_die_type): Adjust.
12250
12251 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12252
12253 * dwarf2read.c (struct mapped_debug_names): Add constructor.
12254 <dwarf2_per_objfile>: New field.
12255 (dwarf2_per_objfile): Remove global.
12256 (get_dwarf2_per_objfile): New function.
12257 (set_dwarf2_per_objfile): New function.
12258 (dwarf2_build_psymtabs_hard): Change objfile parameter to
12259 dwarf2_per_objfile.
12260 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12261 (read_abbrev_offset): Likewise.
12262 (read_indirect_string): Likewise.
12263 (read_indirect_line_string): Likewise.
12264 (read_indirect_string_at_offset): Likewise.
12265 (read_indirect_string_from_dwz): Likewise.
12266 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12267 dwarf2_per_objfile.
12268 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12269 (create_all_comp_units): Change objfile parameter to
12270 dwarf2_per_objfile.
12271 (create_all_type_units): Likewise.
12272 (process_queue): Add dwarf2_per_objfile parameter.
12273 (read_and_check_comp_unit_head): Likewise.
12274 (lookup_dwo_unit_in_dwp): Likewise.
12275 (get_dwp_file): Likewise.
12276 (process_cu_includes): Likewise.
12277 (struct free_dwo_file_cleanup_data): New struct.
12278 (dwarf2_has_info): Use get_dwarf2_per_objfile and
12279 set_dwarf2_per_objfile.
12280 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
12281 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
12282 context, adjust calls.
12283 (dw2_instantiate_symtab): Likewise.
12284 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
12285 (dw2_get_cu): Likewise.
12286 (create_cu_from_index_list): Change objfile parameter to
12287 dwarf2_per_objfile.
12288 (create_cus_from_index_list): Get dwarf2_per_objfile from
12289 context, adjust calls.
12290 (create_cus_from_index): Likewise.
12291 (create_signatured_type_table_from_index): Change objfile
12292 parameter to dwarf2_per_objfile.
12293 (create_signatured_type_table_from_debug_names): Change objfile
12294 parameter to dwarf2_per_objfile.
12295 (create_addrmap_from_index): Likewise.
12296 (create_addrmap_from_aranges): Likewise.
12297 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
12298 (dw2_setup): Remove.
12299 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
12300 context.
12301 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
12302 get_dwarf2_per_objfile.
12303 (dw2_forget_cached_source_info): Likewise.
12304 (dw2_map_symtabs_matching_filename): Likewise.
12305 (struct dw2_symtab_iterator) <index>: Remove.
12306 <dwarf2_per_objfile>: New field.
12307 (dw2_symtab_iter_init): Replace index parameter with
12308 dwarf2_per_objfile.
12309 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
12310 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
12311 (dw2_print_stats): Likewise.
12312 (dw2_dump): Likewise.
12313 (dw2_expand_symtabs_for_function): Likewise.
12314 (dw2_expand_all_symtabs): Likewise.
12315 (dw2_expand_symtabs_with_fullname): Likewise.
12316 (dw2_expand_marked_cus): Replace index and objfile parameters
12317 with dwarf2_per_objfile.
12318 (dw_expand_symtabs_matching_file_matcher): Add
12319 dwarf2_per_objfile parameter and adjust calls.
12320 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
12321 adjust calls.
12322 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
12323 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
12324 adjust calls.
12325 (create_cus_from_debug_names_list): Replace objfile parameter
12326 with dwarf2_per_objfile and adjust calls.
12327 (create_cus_from_debug_names): Likewise.
12328 (dwarf2_read_debug_names): Likewise.
12329 (mapped_debug_names::namei_to_name): Adjust call.
12330 (dw2_debug_names_iterator::next): Likewise.
12331 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
12332 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
12333 (dw2_debug_names_dump): Likewise.
12334 (dw2_debug_names_expand_symtabs_for_function): Likewise.
12335 (dw2_debug_names_expand_symtabs_matching): Likewise.
12336 (dwarf2_initialize_objfile): Likewise.
12337 (dwarf2_build_psymtabs): Likewise.
12338 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
12339 this_cu.
12340 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
12341 (read_and_check_comp_unit_head): Likewise.
12342 (read_abbrev_offset): Likewise.
12343 (create_debug_type_hash_table): Likewise.
12344 (create_debug_types_hash_table): Likewise.
12345 (create_all_type_units): Replace objfile parameter with
12346 dwarf2_per_objfile.
12347 (add_type_unit): Add dwarf2_per_objfile parameter.
12348 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
12349 with dwarf2_per_objfile.
12350 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
12351 (lookup_dwp_signatured_type): Likewise.
12352 (lookup_signatured_type): Likewise.
12353 (read_cutu_die_from_dwo): Likewise.
12354 (init_tu_and_read_dwo_dies): Likewise.
12355 (init_cutu_and_read_dies): Likewise.
12356 (init_cutu_and_read_dies_no_follow): Likewise.
12357 (allocate_type_unit_groups_table): Add objfile parameter.
12358 (create_type_unit_group): Use dwarf2_per_objfile from cu.
12359 (get_type_unit_group): Likewise.
12360 (process_psymtab_comp_unit): Update call.
12361 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
12362 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
12363 (print_tu_stats): Likewise.
12364 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
12365 in void* parameter.
12366 (build_type_psymtabs): Change objfile parameter to
12367 dwarf2_per_objfile.
12368 (process_skeletonless_type_unit): Use dwarf2_per_objfile
12369 passed in void* parameter.
12370 (process_skeletonless_type_units): Change objfile parameter to
12371 dwarf2_per_objfile.
12372 (set_partial_user): Likewise.
12373 (dwarf2_build_psymtabs_hard): Likewise.
12374 (read_comp_units_from_section): Likewise.
12375 (create_all_comp_units): Likewise.
12376 (scan_partial_symbols): Update calls.
12377 (add_partial_symbol): Likewise.
12378 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
12379 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
12380 (process_queue): Add dwarf2_per_objfile parameter.
12381 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
12382 (compute_compunit_symtab_includes): Likewise.
12383 (process_cu_includes): Add dwarf2_per_objfile parameter.
12384 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
12385 (process_full_type_unit): Likewise.
12386 (process_imported_unit_die): Update call.
12387 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
12388 (read_file_scope): Likewise.
12389 (allocate_dwo_file_hash_table): Add objfile parameter.
12390 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
12391 (create_cus_hash_table): Likewise.
12392 (create_dwp_hash_table): Likewise.
12393 (create_dwo_unit_in_dwp_v1): Likewise.
12394 (create_dwp_v2_section): Likewise.
12395 (create_dwo_unit_in_dwp_v2): Likewise.
12396 (lookup_dwo_unit_in_dwp): Likewise.
12397 (try_open_dwop_file): Likewise.
12398 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
12399 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
12400 cleanup to include a reference to dwarf2_per_objfile.
12401 (open_dwp_file): Add dwarf2_per_objfile parameter.
12402 (open_and_init_dwp_file): Likewise.
12403 (get_dwp_file): Likewise.
12404 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
12405 (queue_and_load_all_dwo_tus): Update call.
12406 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
12407 data.
12408 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
12409 (dwarf2_ranges_process): Likewise.
12410 (dwarf2_get_pc_bounds): Likewise.
12411 (mark_common_block_symbol_computed): Likewise.
12412 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
12413 (dwarf2_read_abbrevs): Update call.
12414 (read_partial_die): Use dwarf2_per_objfile from cu.
12415 (find_partial_die): Likewise.
12416 (fixup_partial_die): Likewise.
12417 (read_attribute_value): Likewise.
12418 (read_indirect_string_at_offset_from): Add objfile parameter.
12419 (read_indirect_string_at_offset): Add dwarf2_per_objfile
12420 parameter.
12421 (read_indirect_string_from_dwz): Add objfile parameter.
12422 (read_indirect_string): Add objfile parameter.
12423 (read_addr_index_1): Add dwarf2_per_objfile parameter.
12424 (read_addr_index): Use dwarf2_per_objfile from cu.
12425 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
12426 call dw2_setup.
12427 (read_str_index): Use dwarf2_per_objfile from cu.
12428 (get_debug_line_section): Likewise.
12429 (read_formatted_entries): Add dwarf2_per_objfile parameter.
12430 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
12431 (new_symbol_full): Use dwarf2_per_objfile from cu.
12432 (build_error_marker_type): Likewise.
12433 (lookup_die_type): Likewise.
12434 (determine_prefix): Likewise.
12435 (follow_die_offset): Likewise.
12436 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
12437 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
12438 (dwarf2_fetch_die_type_sect_off): Likewise.
12439 (dwarf2_get_die_type): Likewise.
12440 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
12441 (get_signatured_type): Likewise.
12442 (get_DW_AT_signature_type): Likewise.
12443 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
12444 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
12445 (cu_debug_loc_section): Likewise.
12446 (fill_in_loclist_baton): Likewise.
12447 (dwarf2_symbol_mark_computed): Likewise.
12448 (dwarf2_find_containing_comp_unit): Change objfile parameter to
12449 dwarf2_per_objfile.
12450 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
12451 parameter.
12452 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
12453 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
12454 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
12455 (set_die_type): Use dwarf2_free_objfile from cu.
12456 (get_die_type_at_offset): Likewise.
12457 (dwarf2_per_objfile_free): Don't assign global variable.
12458 (debug_names) <constructor>: Add dwarf2_per_objfile
12459 parameter, update m_debugstrlookup construction.
12460 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
12461 parameter.
12462 <m_dwarf2_per_objfile>: New field.
12463 <lookup>: Use m_dwarf2_per_objfile.
12464 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
12465 (psyms_seen_size): Likewise.
12466 (write_gdbindex): Replace objfile parameter with
12467 dwarf2_per_objfile.
12468 (write_debug_names): Likewise.
12469 (write_psymtabs_to_index): Likewise.
12470 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
12471 calls.
12472
12473 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12474
12475 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
12476 <dwarf2_per_objfile>: New field.
12477 (struct dwarf2_per_cu_data) <objfile>: Remove.
12478 <dwarf2_per_objfile>: New field.
12479 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
12480 of objfile.
12481 (create_signatured_type_table_from_index): Likewise.
12482 (create_debug_type_hash_table): Likewise.
12483 (fill_in_sig_entry_from_dwo_entry): Likewise.
12484 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
12485 (create_type_unit_group): Assign dwarf2_per_objfile instead of
12486 objfile.
12487 (create_partial_symtab): Access objfile through
12488 dwarf2_per_objfile.
12489 (process_psymtab_comp_unit_reader): Likewise.
12490 (read_comp_units_from_section): Likewise.
12491 (scan_partial_symbols): Likewise.
12492 (add_partial_symbol): Likewise.
12493 (add_partial_subprogram): Likewise.
12494 (peek_die_abbrev): Likewise.
12495 (fixup_go_packaging): Likewise.
12496 (process_full_comp_unit): Likewise.
12497 (process_full_type_unit): Likewise.
12498 (process_imported_unit_die): Likewise.
12499 (dwarf2_compute_name): Likewise.
12500 (dwarf2_physname): Likewise.
12501 (read_import_statement): Likewise.
12502 (create_cus_hash_table): Assign dwarf2_physname instead of
12503 objfile.
12504 (read_func_scope): Access objfile through dwarf2_per_objfile.
12505 (read_lexical_block_scope): Likewise.
12506 (read_call_site_scope): Likewise.
12507 (read_variable): Likewise.
12508 (dwarf2_rnglists_process): Likewise.
12509 (dwarf2_ranges_process): Likewise.
12510 (dwarf2_ranges_read): Likewise.
12511 (dwarf2_record_block_ranges): Likewise.
12512 (dwarf2_add_field): Likewise.
12513 (dwarf2_add_member_fn): Likewise.
12514 (read_structure_type): Likewise.
12515 (process_structure_scope): Likewise.
12516 (read_enumeration_type): Likewise.
12517 (read_array_type): Likewise.
12518 (read_common_block): Likewise.
12519 (read_namespace_type): Likewise.
12520 (read_namespace): Likewise.
12521 (read_module_type): Likewise.
12522 (read_tag_pointer_type): Likewise.
12523 (read_tag_ptr_to_member_type): Likewise.
12524 (read_tag_string_type): Likewise.
12525 (read_subroutine_type): Likewise.
12526 (read_typedef): Likewise.
12527 (read_base_type): Likewise.
12528 (attr_to_dynamic_prop): Likewise.
12529 (read_subrange_type): Likewise.
12530 (read_unspecified_type): Likewise.
12531 (load_partial_dies): Likewise.
12532 (read_partial_die): Likewise.
12533 (find_partial_die): Likewise.
12534 (guess_partial_die_structure_name): Likewise.
12535 (fixup_partial_die): Likewise.
12536 (read_attribute_value): Likewise.
12537 (read_addr_index_from_leb128): Likewise.
12538 (dwarf2_read_addr_index): Likewise.
12539 (dwarf2_string_attr): Likewise.
12540 (lnp_state_machine::check_line_address): Likewise.
12541 (dwarf_decode_lines_1): Likewise.
12542 (dwarf_decode_lines): Likewise.
12543 (dwarf2_start_symtab): Likewise.
12544 (var_decode_location): Likewise.
12545 (new_symbol_full): Likewise.
12546 (dwarf2_const_value_data): Likewise.
12547 (dwarf2_const_value_attr): Likewise.
12548 (dwarf2_const_value): Likewise.
12549 (die_type): Likewise.
12550 (die_containing_type): Likewise.
12551 (lookup_die_type): Likewise.
12552 (guess_full_die_structure_name): Likewise.
12553 (anonymous_struct_prefix): Likewise.
12554 (dwarf2_name): Likewise.
12555 (follow_die_ref_or_sig): Likewise.
12556 (follow_die_offset): Likewise.
12557 (follow_die_ref): Likewise.
12558 (dwarf2_fetch_die_loc_sect_off): Likewise.
12559 (dwarf2_fetch_constant_bytes): Likewise.
12560 (dwarf2_fetch_die_type_sect_off): Likewise.
12561 (dwarf2_get_die_type): Likewise.
12562 (follow_die_sig): Likewise.
12563 (decode_locdesc): Likewise.
12564 (dwarf2_per_cu_objfile): Likewise.
12565 (dwarf2_per_cu_text_offset): Likewise.
12566 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
12567 objfile.
12568 (set_die_type): Access objfile through
12569 dwarf2_per_objfile.
12570
12571 2018-01-07 Simon Marchi <simon.marchi@ericsson.com>
12572
12573 * valprint.c (converted_character_d): Remove typedef.
12574 (DEF_VEC_O (converted_character_d)): Remove.
12575 (count_next_character): Use std::vector.
12576 (print_converted_chars_to_obstack): Likewise.
12577 (generic_printstr): Likewise.
12578
12579 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12580
12581 * xml-support.h (struct gdb_xml_value): Add constructor.
12582 <value>: Change type to unique_xmalloc_ptr.
12583 (gdb_xml_value_s): Remove typedef.
12584 (DEF_VEC_O (gdb_xml_value_s)): Remove.
12585 (gdb_xml_element_start_handler): Change parameter type to
12586 std::vector.
12587 (xml_find_attribute): Likewise.
12588 * xml-support.c (xml_find_attribute): Change parameter type to
12589 std::vector and adjust.
12590 (gdb_xml_values_cleanup): Remove.
12591 (gdb_xml_parser::start_element): Adjust to std::vector.
12592 (xinclude_start_include): Change paraeter type to std::vector
12593 and adjust.
12594 * btrace.c (check_xml_btrace_version): Likewise.
12595 (parse_xml_btrace_block): Likewise.
12596 (parse_xml_btrace_pt_config_cpu): Likewise.
12597 (parse_xml_btrace_pt): Likewise.
12598 (parse_xml_btrace_conf_bts): Likewise.
12599 (parse_xml_btrace_conf_pt): Likewise.
12600 * memory-map.c (memory_map_start_memory): Likewise.
12601 (memory_map_start_property): Likewise.
12602 * osdata.c (osdata_start_osdata): Likewise.
12603 (osdata_start_item): Likewise.
12604 (osdata_start_column): Likewise.
12605 * remote.c (start_thread): Likewise.
12606 * solib-aix.c (library_list_start_library): Likewise.
12607 (library_list_start_list): Likewise.
12608 * solib-svr4.c (library_list_start_library): Likewise.
12609 (svr4_library_list_start_list): Likewise.
12610 * solib-target.c (library_list_start_segment): Likewise.
12611 (library_list_start_section): Likewise.
12612 (library_list_start_library): Likewise.
12613 (library_list_start_list): Likewise.
12614 * tracepoint.c (traceframe_info_start_memory): Likewise.
12615 (traceframe_info_start_tvar): Likewise.
12616 * xml-syscall.c (syscall_start_syscall): Likewise.
12617 * xml-tdesc.c (tdesc_start_target): Likewise.
12618 (tdesc_start_feature): Likewise.
12619 (tdesc_start_reg): Likewise.
12620 (tdesc_start_union): Likewise.
12621 (tdesc_start_struct): Likewise.
12622 (tdesc_start_flags): Likewise.
12623 (tdesc_start_enum): Likewise.
12624 (tdesc_start_field): Likewise.
12625 (tdesc_start_enum_value): Likewise.
12626 (tdesc_start_vector): Likewise.
12627
12628 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12629
12630 * extension.h (struct xmethod_worker) <clone>: Remove.
12631 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
12632 Remove.
12633 (python_xmethod_worker::clone): Remove.
12634 * valops.c (find_overload_match): Use std::move instead of
12635 clone.
12636
12637 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
12638
12639 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
12640 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
12641 <free_xmethod_worker_data>: Remove.
12642 <get_matching_xmethod_workers>: Chance VEC to std::vector.
12643 <get_xmethod_arg_types>: Remove.
12644 <get_xmethod_result_type>: Remove.
12645 <invoke_xmethod>: Remove.
12646 * extension.c (new_xmethod_worker): Remove.
12647 (clone_xmethod_worker): Remove.
12648 (get_matching_xmethod_workers): Return void, pass std::vector by
12649 pointer.
12650 (get_xmethod_arg_types): Rename to...
12651 (xmethod_worker::get_arg_types): ... this, and adjust.
12652 (get_xmethod_result_type): Rename to...
12653 (xmethod_worker::get_result_type): ... this, and adjust.
12654 (invoke_xmethod): Remove.
12655 (free_xmethod_worker): Remove.
12656 (free_xmethod_worker_vec): Remove.
12657 * extension.h (enum ext_lang_rc): Move here from
12658 extension-priv.h.
12659 (struct xmethod_worker): Add constructor and destructor.
12660 <data>: Remove.
12661 <value>: Remove.
12662 <invoke, clone, do_get_result_type, do_get_arg_types>: New
12663 virtual pure methods.
12664 <get_arg_types, get_result_type>: New methods.
12665 (xmethod_worker_ptr): Remove typedef.
12666 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
12667 (xmethod_worker_vec): Remove typedef.
12668 (xmethod_worker_up): New typedef.
12669 (invoke_xmethod): Remove.
12670 (clone_xmethod_worker): Remove.
12671 (free_xmethod_worker): Remove.
12672 (free_xmethod_worker_vec): Remove.
12673 (get_xmethod_arg_types): Remove.
12674 (get_xmethod_result_type): Remove.
12675 * valops.c (find_method_list): Use std::vector, don't use
12676 intermediate vector.
12677 (value_find_oload_method_list): Use std::vector.
12678 (find_overload_match): Use std::vector.
12679 (find_oload_champ): Use std::vector.
12680 * value.c (value_free): Use operator delete.
12681 (value_of_xmethod): Rename to...
12682 (value_from_xmethod): ... this. Don't assign
12683 xmethod_worker::value, take rvalue-reference.
12684 (result_type_of_xmethod): Adjust.
12685 (call_xmethod): Adjust.
12686 * value.h: Include extension.h.
12687 (struct xmethod_worker): Don't forward-declare.
12688 (value_of_xmethod): Rename to...
12689 (value_from_xmethod): ... this, take rvalue-reference.
12690 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
12691 (struct python_xmethod_worker): ... this, add constructor and
12692 destructor.
12693 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
12694 (gdbpy_free_xmethod_worker_data): Rename to...
12695 (python_xmethod_worker::~python_xmethod_worker): ... this and
12696 adjust.
12697 (gdbpy_clone_xmethod_worker_data): Rename to...
12698 (python_xmethod_worker::clone): ... this and adjust.
12699 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
12700 temporary vector.
12701 (gdbpy_get_xmethod_arg_types): Rename to...
12702 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
12703 (gdbpy_get_xmethod_result_type): Rename to...
12704 (python_xmethod_worker::do_get_result_type): ... this and
12705 adjust.
12706 (gdbpy_invoke_xmethod): Rename to...
12707 (python_xmethod_worker::invoke): ... this and adjust.
12708 (new_python_xmethod_worker): Rename to...
12709 (python_xmethod_worker::python_xmethod_worker): ... this and
12710 adjust.
12711 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
12712 Remove.
12713 (gdbpy_free_xmethod_worker_data): Remove.
12714 (gdbpy_get_matching_xmethod_workers): Use std::vector.
12715 (gdbpy_get_xmethod_arg_types): Remove.
12716 (gdbpy_get_xmethod_result_type): Remove.
12717 (gdbpy_invoke_xmethod): Remove.
12718 * python/python.c (python_extension_ops): Remove obsolete
12719 callbacks.
12720
12721 2018-01-05 Pedro Alves <palves@redhat.com>
12722
12723 PR gdb/18653
12724 * common/signals-state-save-restore.c
12725 (save_original_signals_state): New parameter 'quiet'. Warn if we
12726 find a custom handler preinstalled, instead of internal erroring.
12727 But only warn if !quiet.
12728 * common/signals-state-save-restore.h
12729 (save_original_signals_state): New parameter 'quiet'.
12730 * main.c (captured_main_1): Move save_original_signals_state call
12731 after option handling, and pass QUIET.
12732
12733 2018-01-05 Pedro Alves <palves@redhat.com>
12734
12735 * spu-tdep.c (spu_catch_start): Pass
12736 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
12737
12738 2018-01-05 Pedro Alves <palves@redhat.com>
12739
12740 PR gdb/22670
12741 * ada-lang.c (literal_symbol_name_matcher): New function.
12742 (ada_get_symbol_name_matcher): Use it for
12743 symbol_name_match_type::SEARCH_NAME.
12744 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
12745 it down instead of assuming symbol_name_match_type::FULL.
12746 * block.h (block_lookup_symbol): New parameter 'match_type'.
12747 * c-valprint.c (print_unpacked_pointer): Use
12748 lookup_symbol_search_name instead of lookup_symbol.
12749 * compile/compile-object-load.c (get_out_value_type): Pass down
12750 symbol_name_match_type::SEARCH_NAME.
12751 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
12752 symbol_name_match_type::FULL.
12753 * cp-support.c (cp_get_symbol_name_matcher): Handle
12754 symbol_name_match_type::SEARCH_NAME.
12755 * infrun.c (insert_exception_resume_breakpoint): Use
12756 lookup_symbol_search_name.
12757 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
12758 * psymtab.c (maintenance_check_psymtabs): Use
12759 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
12760 * stack.c (print_frame_args): Use lookup_symbol_search_name and
12761 SYMBOL_SEARCH_NAME.
12762 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
12763 if symbol_name_match_type::SEARCH_NAME.
12764 (lookup_symbol_in_language): Pass down
12765 symbol_name_match_type::FULL.
12766 (lookup_symbol_search_name): New.
12767 (lookup_language_this): Pass down
12768 symbol_name_match_type::SEARCH_NAME.
12769 (lookup_symbol_aux, lookup_local_symbol): New parameter
12770 'match_type'. Pass it down.
12771 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
12772 (lookup_symbol_search_name): New declaration.
12773 (lookup_symbol_in_block): New 'match_type' parameter.
12774
12775 2018-01-05 Pedro Alves <palves@redhat.com>
12776
12777 PR gdb/22670
12778 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
12779 ada_lookup_symbol.
12780 (ada_lookup_symbol): Reimplement in terms of
12781 ada_lookup_symbol_list, bits factored out from
12782 ada_lookup_encoded_symbol.
12783
12784 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12785
12786 * ada-exp.y (write_object_renaming): When subscripting an array
12787 using a symbol as the index, pass the block in call to
12788 ada_lookup_encoded_symbol when looking that symbol up.
12789
12790 2018-01-05 Jerome Guitton <guitton@adacore.com>
12791
12792 * ada-lang.c (ada_array_length): Use ada_index_type instead of
12793 TYPE_INDEX_TYPE.
12794
12795 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12796
12797 * ada-lang.c (ada_to_fixed_value_create): Add handling of
12798 the case where VALUE_LVAL (val0) is not lval_memory.
12799
12800 2018-01-05 Xavier Roirand <roirand@adacore.com>
12801
12802 * ada-valprint.c (print_optional_low_bound): Handle
12803 character-indexed array printing like boolean-indexed array
12804 printing.
12805
12806 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12807
12808 * NEWS: Create a new section for the next release branch.
12809 Rename the section of the current branch, now that it has
12810 been cut.
12811
12812 2018-01-05 Joel Brobecker <brobecker@adacore.com>
12813
12814 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
12815 * version.in: Bump version to 8.1.50.DATE-git.
12816
12817 2018-01-03 Xavier Roirand <roirand@adacore.com>
12818
12819 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
12820 Add field.
12821 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
12822 Add field.
12823 (default_exception_support_info) <catch_handlers_sym>: Add field.
12824 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
12825 (ada_exception_name_addr_1): Add "catch handlers" handling.
12826 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
12827 Update all callers.
12828 (create_excep_cond_exprs) <ex>: Add parameter.
12829 (re_set_exception): Update create_excep_cond_exprs call.
12830 (print_it_exception, print_one_exception, print_mention_exception)
12831 (print_recreate_exception): Add "catch handler" handling.
12832 (allocate_location_catch_handlers, re_set_catch_handlers)
12833 (check_status_catch_handlers, print_it_catch_handlers)
12834 (print_one_catch_handlers, print_mention_catch_handlers)
12835 (print_recreate_catch_handlers): New function.
12836 (catch_handlers_breakpoint_ops): New variable.
12837 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
12838 Add parameter. Add "catch handler" handling.
12839 (ada_exception_sym_name, ada_exception_breakpoint_ops):
12840 Add "catch handler" handling.
12841 (ada_exception_catchpoint_cond_string): Add "catch handler"
12842 handling.
12843 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
12844 call.
12845 (catch_ada_handlers_command): New function.
12846 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
12847 operations structure.
12848 (_initialize_ada_language): Add "catch handlers" command entry.
12849 * NEWS: Document "catch handlers" feature.
12850
12851 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12852
12853 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
12854 account when creating the array type of the slice.
12855 (ada_value_slice): Likewise.
12856
12857 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12858
12859 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
12860 New enum value.
12861 (create_array_type_with_stride): Add byte_stride_prop parameter.
12862 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
12863 New parameter. Update all callers in this file.
12864 (array_type_has_dynamic_stride): New function.
12865 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
12866 of arrays with dynamic byte strides.
12867 * dwarf2read.c (read_array_type): Add support for dynamic
12868 DW_AT_byte_stride attributes.
12869
12870 2018-01-02 Joel Brobecker <brobecker@adacore.com>
12871
12872 * dwarf2read.c (read_unspecified_type): Treat
12873 DW_TAG_enumeration_type DIEs from Ada units as stubs.
12874
12875 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12876
12877 Update copyright year range in all GDB files.
12878
12879 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12880
12881 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
12882 and gdb/testsuite/gdb.base/step-line.c.
12883
12884 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12885
12886 * copyright.py (main): Dump the contents of
12887 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
12888 even if BY_HAND is empty.
12889
12890 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12891
12892 * top.c (print_gdb_version): Update Copyright year in version
12893 message.
12894
12895 2018-01-01 Joel Brobecker <brobecker@adacore.com>
12896
12897 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
12898
12899 For older changes see ChangeLog-2017.
12900 \f
12901 Local Variables:
12902 mode: change-log
12903 left-margin: 8
12904 fill-column: 74
12905 version-control: never
12906 coding: utf-8
12907 End:
This page took 0.3377 seconds and 4 git commands to generate.