Make read_program_headers_from_bfd return a gdb::byte_vector
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
d1012b8e
SM
12018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * solib-svr4.c (read_program_headers_from_bfd): Return
4 gdb::optional<gdb::byte_vector>.
5 (svr4_exec_displacement): Adjust.
6
17658d46
SM
72018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
8
9 * solib-svr4.c (read_program_header): Return
10 gdb::optional<gdb::byte_vector>, remove p_sect_size param.
11 (find_program_interpreter): Return
12 gdb::optional<gdb::byte_vector>.
13 (scan_dyntag_auxv): Adjust.
14 (enable_break): Adjust.
15 (svr4_exec_displacement): Adjust.
16
ae739fe7
SM
172018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
18
19 * inf-child.h (inf_child_target) <terminal_save_inferior>: New.
20 * inf-child.c (inf_child_target::terminal_save_inferior): New.
21
467dc1e2
SM
222018-08-22 Simon Marchi <simon.marchi@polymtl.ca>
23
24 * guile/scm-string.c (gdbscm_scm_from_printf): Use
25 string_vprintf.
26 * guile/scm-utils.c (gdbscm_printf): Likewise.
27 * serial.c (serial_printf): Likewise.
28 * xml-support.c (gdb_xml_parser::vdebug): Likewise.
29
6d52907e
JV
302018-08-22 Jan Vrany <jan.vrany@fit.cvut.cz>
31
32 * stack.c (print_frame): Print frame architecture when printing on
33 an MI output.
34 * NEWS: Mention new "arch" attribute in frame output.
35
9758a8f8
AH
362018-08-21 Alan Hayward <alan.hayward@arm.com>
37
38 * arch/aarch64.h (aarch64_regnum): Update comment.
39
1461bdac
AH
402018-08-21 Alan Hayward <alan.hayward@arm.com>
41
42 * NEWS: Add SVE to 8.2 section.
43
4895f384
PA
442018-08-21 Pedro Alves <palves@redhat.com>
45
46 * guile/scm-utils.c (gdbscm_parse_function_args_1): New, factored
47 out from gdbscm_parse_function_args.
48 (gdbscm_parse_function_args): Rework to use gdbscm_wrap and
49 gdbscm_parse_function_args_1.
50
a4497d2f
SM
512018-08-21 Simon Marchi <simon.marchi@ericsson.com>
52
53 PR gdb/17816
54 * m32c-tdep.c (m32c_decode_srcdest4): Remove unnecessary ternary
55 operator.
56
c44deb73
SM
572018-08-19 Simon Marchi <simon.marchi@polymtl.ca>
58
59 * solib-svr4.c (svr4_exec_displacement): Fix formatting.
60
be2d111a
MS
612018-08-19 Michael Spang <spang@google.com>
62
63 PR gdb/11786
64 * solib-svr4.c (svr4_exec_displacement): Ignore memsz fields
65 for PT_TLS segments.
66
a6b786da
KB
672018-08-18 Kevin Buettner <kevinb@redhat.com>
68
69 * dwarf2expr.h (struct dwarf_expr_context): Add virtual method
70 dwarf_variable_value.
71 * dwarf2-frame.c (class dwarf_expr_executor):
72 Add override for dwarf_variable_value.
73 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Likewise.
74 (class symbol_needs_eval_context): Likewise.
75 (indirect_synthetic_pointer): Add forward declaration.
76 (sect_variable_value): New function.
77 (dwarf2_compile_expr_to_ax): Add case for DW_OP_GNU_variable_value.
78 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Add case
79 for DW_OP_GNU_variable_value.
80
89fbedf3
TT
812018-08-16 Tom Tromey <tom@tromey.com>
82
83 * top.c (read_command_file): Update.
84 (command_line_input): Remove "repeat" argument.
85 * ada-lang.c (get_selections): Update.
86 * linespec.c (decode_line_2): Update.
87 * defs.h (command_line_input): Remove argument.
88 * cli/cli-script.c (read_next_line): Update.
89 * python/py-gdb-readline.c: Update.
90
12582533
TT
912018-08-17 Tom Tromey <tom@tromey.com>
92
93 * cli/cli-script.c (read_next_line): Pass 0 as repeat argument to
94 command_line_input.
95
49514353
TT
962018-08-15 Tom Tromey <tom@tromey.com>
97
98 * aarch64-linux-tdep.c (aarch64_linux_core_read_vq): Use pulongest.
99
26fb3983
JV
1002018-08-14 Jan Vrany <jan.vrany@fit.cvut.cz>
101
102 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Add -a option.
103 If used, use find_pc_partial_function to find address range
104 to disassemble.
105 * mi/mi-main.c (mi_cmd_list_features): Report
106 "data-disassemble-a-option" feature.
107 * NEWS: Mention new -data-disassemble option -a.
108
a97b53dd
TT
1092018-08-13 Tom Tromey <tom@tromey.com>
110
111 * common/common-defs.h (_FORTIFY_SOURCE): Define.
112
0c76e06d
AH
1132018-08-13 Alan Hayward <alan.hayward@arm.com>
114
115 * aarch64-linux-tdep.c (aarch64_linux_supply_sve_regset): New function.
116 (aarch64_linux_collect_sve_regset): Likewise.
117 (aarch64_linux_iterate_over_regset_sections): Check for SVE.
118 * regcache.h (regcache_map_entry_size): New function.
119
b7fd65b9
AH
1202018-08-13 Alan Hayward <alan.hayward@arm.com>
121
122 * aarch64-linux-tdep.c (SVE_HEADER_SIZE_LENGTH): Add define.
123 (SVE_HEADER_MAX_SIZE_LENGTH): Likewise.
124 (SVE_HEADER_VL_LENGTH): Likewise.
125 (SVE_HEADER_MAX_VL_LENGTH): Likewise.
126 (SVE_HEADER_FLAGS_LENGTH): Likewise.
127 (SVE_HEADER_RESERVED_LENGTH): Likewise.
128 (SVE_HEADER_SIZE_OFFSET): Likewise.
129 (SVE_HEADER_MAX_SIZE_OFFSET): Likewise.
130 (SVE_HEADER_VL_OFFSET): Likewise.
131 (SVE_HEADER_MAX_VL_OFFSET): Likewise.
132 (SVE_HEADER_FLAGS_OFFSET): Likewise.
133 (SVE_HEADER_RESERVED_OFFSET): Likewise.
134 (SVE_HEADER_SIZE): Likewise.
135 (aarch64_linux_core_read_vq): Add function.
136 (aarch64_linux_core_read_description): Check for SVE section.
137
a616bb94
AH
1382018-08-13 Alan Hayward <alan.hayward@arm.com>
139
140 * aarch64-fbsd-tdep.c
141 (aarch64_fbsd_iterate_over_regset_sections): Add supply_size and
142 collect_size.
143 * aarch64-linux-tdep.c
144 (aarch64_linux_iterate_over_regset_sections): Likewise.
145 * alpha-linux-tdep.c
146 (alpha_linux_iterate_over_regset_sections):
147 * alpha-nbsd-tdep.c
148 (alphanbsd_iterate_over_regset_sections): Likewise.
149 * amd64-fbsd-tdep.c
150 (amd64fbsd_iterate_over_regset_sections): Likewise.
151 * amd64-linux-tdep.c
152 (amd64_linux_iterate_over_regset_sections): Likewise.
153 * arm-bsd-tdep.c
154 (armbsd_iterate_over_regset_sections): Likewise.
155 * arm-fbsd-tdep.c
156 (arm_fbsd_iterate_over_regset_sections): Likewise.
157 * arm-linux-tdep.c
158 (arm_linux_iterate_over_regset_sections): Likewise.
159 * corelow.c (get_core_registers_cb): Likewise.
160 (core_target::fetch_registers): Likewise.
161 * fbsd-tdep.c (fbsd_collect_regset_section_cb): Likewise.
162 * frv-linux-tdep.c (frv_linux_iterate_over_regset_sections): Likewise.
163 * gdbarch.h (void): Regenerate.
164 * gdbarch.sh: Add supply_size and collect_size.
165 * hppa-linux-tdep.c (hppa_linux_iterate_over_regset_sections): Likewise.
166 * hppa-nbsd-tdep.c (hppanbsd_iterate_over_regset_sections): Likewise.
167 * hppa-obsd-tdep.c (hppaobsd_iterate_over_regset_sections): Likewise.
168 * i386-fbsd-tdep.c (i386fbsd_iterate_over_regset_sections): Likewise.
169 * i386-linux-tdep.c (i386_linux_iterate_over_regset_sections): Likewise.
170 * i386-tdep.c (i386_iterate_over_regset_sections): Likewise.
171 * ia64-linux-tdep.c (ia64_linux_iterate_over_regset_sections): Likewise.
172 * linux-tdep.c (linux_collect_regset_section_cb): Likewise.
173 * m32r-linux-tdep.c (m32r_linux_iterate_over_regset_sections): Likewise.
174 * m68k-bsd-tdep.c (m68kbsd_iterate_over_regset_sections): Likewise.
175 * m68k-linux-tdep.c (m68k_linux_iterate_over_regset_sections): Likewise.
176 * mips-fbsd-tdep.c (mips_fbsd_iterate_over_regset_sections): Likewise.
177 * mips-linux-tdep.c (mips_linux_iterate_over_regset_sections): Likewise.
178 * mips-nbsd-tdep.c (mipsnbsd_iterate_over_regset_sections): Likewise.
179 * mips64-obsd-tdep.c (mips64obsd_iterate_over_regset_sections): Likewise.
180 * mn10300-linux-tdep.c (am33_iterate_over_regset_sections): Likewise.
181 * nios2-linux-tdep.c (nios2_iterate_over_regset_sections): Likewise.
182 * ppc-fbsd-tdep.c (ppcfbsd_iterate_over_regset_sections): Likewise.
183 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections): Likewise.
184 * ppc-nbsd-tdep.c (ppcnbsd_iterate_over_regset_sections): Likewise.
185 * ppc-obsd-tdep.c (ppcobsd_iterate_over_regset_sections): Likewise.
186 * riscv-linux-tdep.c (riscv_linux_iterate_over_regset_sections): Likewise.
187 * rs6000-aix-tdep.c (rs6000_aix_iterate_over_regset_sections): Likewise.
188 * s390-linux-tdep.c (s390_iterate_over_regset_sections): Likewise.
189 * score-tdep.c (score7_linux_iterate_over_regset_sections): Likewise.
190 * sh-tdep.c (sh_iterate_over_regset_sections): Likewise.
191 * sparc-tdep.c (sparc_iterate_over_regset_sections): Likewise.
192 * tilegx-linux-tdep.c (tilegx_iterate_over_regset_sections): Likewise.
193 * vax-tdep.c (vax_iterate_over_regset_sections): Likewise.
194 * xtensa-tdep.c (xtensa_iterate_over_regset_sections): Likewise.
195
a9925d4f
SM
1962018-08-10 Simon Marchi <simon.marchi@ericsson.com>
197
198 * nat/linux-osdata.c (commandline_from_pid): Replace xstrprintf
199 with string_printf.
200
ad3a68e9
KS
2012018-08-10 Keith Seitz <keiths@redhat.com>
202
203 * compile/compile-c-support.c (add_code_header, add_code_footer):
204 Move into policy class.
205 (c_push_user_expression, pop_user_expression_nop)
206 (c_add_code_header, c_add_code_footer, c_add_input): New policy class.
207 (compile_program): New host class.
208 (c_compile_program): New typedef.
209 (c_compute_porgram): Use c_compile_program.
210
0cfbf430
KS
2112018-08-10 Keith Seitz <keiths@redhat.com>
212
213 * compile/compile-internal.h (compile_instance::~compile_instance):
214 Remove calls to htab_delete.
215 <m_type_map, m_symbol_err_map>: Switch type to htab_up.
216 * compile.c (compile_instance::compile_instance): Initialize
217 htab unique pointers.
218 (compile_instance::get_cached_type, compile_instance::insert_type)
219 (compile_instance::error_symbol_once): Update for unique_ptr.
220
946d3d10
KS
2212018-08-10 Keith Seitz <keiths@redhat.com>
222
223 * compile/compile-c-symbols.c (struct symbol_error)
224 (hash_symbol_error, eq_symbol_error, del_symbol_error)
225 (compile_instance::insert_symbol_error)
226 (compile_instance::error_symbol_once): Move to ...
227 * compile/compile.c: ... here.
228
9cdfd9a2
KS
2292018-08-10 Keith Seitz <keiths@redhat.com>
230
231 * compile/compile-c-support.c (c_get_compile_context): Use `new'
232 instead of `new_compile_instance'.
233 * compile/compile-c-symbols.c (compile_instance::insert_symbol_error):
234 Update description.
235 If the symbol error map is not initialized, create it.
236 (generate_c_for_for_one_symbol): Do not check/initialize
237 the symbol error map.
238 * compile/compile-c-types.c (compile_c_instance): Make a class.
239 Update all callers.
240 (compile_instance::compile_instance): Initialize the type cache.
241 (get_cached_type): New function.
242 (insert_type): Update description.
243 (compile_c_instance::m_default_cflags): Define.
244 (convert_type): Update description. Use get_cached_type.
245 (delete_instance): Moved to destructor.
246 (new_compile_instance): Moved to constructor.
247 * compile/compile-c.h (compile_c_instance): Make class inheriting
248 from compile_instance.
249 <base>: Remove field.
250 <type_map, symbol_err_map>: Move to base class.
251 <c_plugin>: Rename to `m_plugin' and remove pointer type.
252 * compile/compile-internal.h (compile_instance): Make class.
253 <type_map_t, symbol_err_map_t>: Define.
254 <fe>: Rename to `m_gcc_fe'.
255 <scope, block, gcc_target_options>: Add `m_' prefix.
256 <m_type_map, m_symbol_err_map>: New fields, moved from
257 compile_c_instance.
258 <destroy>: Remove.
259 (convert_type, new_compile_instance): Remove.
260 * compile/compile.c (cleanup_compile_instance): Remove.
261 (compile_to_object): Use unique_ptr to eliminate cleanups.
262 (compile_instance::set_print_callback, compile_instance::version)
263 (compile_instance::set_verbose)
264 (compile_instance::set_driver_filename)
265 (compile_instance::set_triplet_regexp)
266 (compile_instance::set_arguments)
267 (compile_instance::set_source_file)
268 (compile_instance::compile): Define.
269
18cdc6d8
KS
2702018-08-10 Keith Seitz <keiths@redhat.com>
271
272 * Makefile.in (HFILES_NO_SRCDIR): Add compile/gcc-c-plugin.h.
273 * compile/compile-c-types.c: Define GCC_METHODN macros and include
274 gcc-c-fe.def to define C plugin.
275 (delete_instance): Delete `c_plugin'.
276 (new_compile_instance): Initialize `c_plugin'.
277 * compile/compile-c.h: Include gcc_c_plugin.h.
278 (struct compile_c_instance) <c_plugin>: New member.
279 * gcc-c-plugin.h: New file.
280 Update all callers with API change.
281
b7dc48b4
KS
2822018-08-10 Keith Seitz <keiths@redhat.com>
283
284 * Makefile.in (SUBDIR_GCC_COMPILE_SRCS): Move header files ...
285 (HFILES_NO_SRCDIR): ... to here.
286 Add compile-internal.h and compile-c.h.
287 * compile/compile-c-support.c: Include compile-c.h.
288 * compile/compile-c-symbols.c: Include compile-c.h.
289 (generate_c_for_variable_locations): Update comment.
290 * compile/compile-c-types.c: Include compile-c.h.
291 * compile/compile-c.h: New file -- moved C language declarations
292 from other files here.
293 * compile/compile-internal.h: Do not include hashtab.h or
294 common/enum-flags.h.
295 (gcc_qualifiers_flags, struct compile_c_instance, C_CTX)
296 (gcc_convert_symbol, gcc_symbol_address)
297 (generate_c_for_variable_locations, c_get_mode_for_size)
298 (c_get_range_decl_name): Definitions moved to compile-c.h.
299 * compile/compile-loc2c.c: Include compile-c.h.
300
6f36b6d2
KS
3012018-08-10 Keith Seitz <keiths@redhat.com>
302
303 * compile/compile-c-symbols.c (symbol_substitution_name): Rename to ...
304 (c_symbol_substitution_name): ... this.
305 Update all callers.
306
bd923e51
KS
3072018-08-10 Keith Seitz <keiths@redhat.com>
308
309 * compile/compile-c-support.c (c_compute_program): Use
310 unique_xmalloc_ptr to eliminate cleanup.
311 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
312 Return a unique_xmalloc_ptr and eliminate cleanup.
313 * compile/compile-internal.h (generate_c_for_variable_locations):
314 Return unique_xmalloc_ptr and update description.
315
dbd534fe
AH
3162018-08-10 Alan Hayward <alan.hayward@arm.com>
317
318 * corelow.c (core_target::get_core_register_section): Rename
319 min_size to section_min_size.
320
90ad3654
JW
3212018-08-09 Jim Wilson <jimw@sifive.com>
322
52a187f8
JW
323 * Makefile.in (ALL_TARGET_OBS): Add riscv-linux-tdep.c.
324 (ALLDEPFILES): Add riscv-linux-nat.c, and riscv-linux-tdep.c.
325 * NEWS: Mention new GNU/Linux RISC-V target.
326 * configure.host: Add riscv*-*-linux*.
327 * configure.nat: Add riscv*.
328 * configure.tgt: Add riscv*-*-linux*.
3c77f97e 329 * riscv-linux-nat.c: New file.
90ad3654
JW
330 * riscv-linux-tdep.c: New file.
331
aff4e175
AB
3322018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
333
334 * infrun.c (resume): Make static, add forward declaration.
335 (proceed): Update header comment.
336 * infrun.h (resume): Delete declaration.
337
06ab9219
TT
3382018-08-09 Tom Tromey <tom@tromey.com>
339
340 * riscv-tdep.h: Minor formatting fixes.
341
83c8d318
SM
3422018-08-09 Simon Marchi <simon.marchi@ericsson.com>
343
344 * common/scoped_mmap.c (mmap_file): Silence ARI warning.
345 * dwarf-index-cache.c (create_dir_and_check): Likewise.
346 (test_mkdir_recursive): Likewise.
347 * dwarf-index-write.c (write_psymtabs_to_index): Likewise.
348
5ff2bbae
AB
3492018-08-09 Andrew Burgess <andrew.burgess@embecosm.com>
350
351 * valarith.c (value_subscripted_rvalue): If an array is not in
352 memory, and we don't know the upper bound, then we can't know that
353 the requested element exists or not.
354
fdbac7d8
SM
3552018-08-08 Simon Marchi <simon.marchi@ericsson.com>
356
357 * target.c (str_comma_list_concat_elem): Fix typo in comment.
358 (target_options_to_string): Add comment.
359
83202f7a
TT
3602018-08-08 Tom Tromey <tom@tromey.com>
361
362 * unittests/scoped_mmap-selftests.c: Check result of "write".
363
411baa47
JW
3642018-08-08 Jim Wilson <jimw@sifive.com>
365
5c720ed8
JW
366 * riscv-tdep.c (enum opcode): Add jump, branch, lr, and sc opcodes.
367 (decode_register_index_short): New.
368 (decode_j_type_insn, decode_cj_type_insn): New.
369 (decode_b_type_insn, decode_cb_type_insn): New.
370 (riscv_insn::decode): Add support for jumps, branches, lr, and sc. New
371 local xlen. Check xlen when decoding ambiguous compressed insns. In
372 compressed decode, use is_c_lui_insn instead of is_lui_insn, and
373 is_c_sw_insn instead of is_sw_insn.
374 (riscv_next_pc, riscv_next_pc_atomic_sequence): New.
375 (riscv_software_single_step): New.
376 * riscv-tdep.h (riscv_software_single_step): Declare.
377
411baa47
JW
378 * riscv-tdep.c (riscv_isa_xlen): Drop static.
379 * riscv-tdep.h (riscv_isa_xlen): Add extern declaration.
380
9d4a934c
AB
3812018-08-08 Andrew Burgess <andrew.burgess@embecosm.com>
382
383 PR gdb/18050:
384 * target.c (dispose_inferior): Don't dispose of inferiors that are
385 already killed.
386
ff36536c
SN
3872018-08-08 Szabolcs Nagy <szabolcs.nagy@arm.com>
388
389 * remote.c (remote_target::download_tracepoint): Change char* to
390 const char*.
391
09ce46f2
SM
3922018-08-07 Simon Marchi <simon.marchi@polymtl.ca>
393
394 * target.h (target_options_to_string): Return an std::string.
395 * target.c (str_comma_list_concat_elem): Return void, use
396 std::string.
397 (do_option): Likewise.
398 (target_options_to_string): Return an std::string.
399 * linux-nat.c (linux_nat_target::wait): Adjust.
400 * target-debug.h (target_debug_print_options): Adjust.
401
9c612964
TT
4022018-08-07 Tom Tromey <tom@tromey.com>
403
404 * Makefile.in (CPPFLAGS): New variable.
405 (INTERNAL_CPPFLAGS): Use it.
406
7d11235d
SM
4072018-08-07 Simon Marchi <simon.marchi@ericsson.com>
408
409 * NEWS: Mention the index cache.
410
87d6a7aa
SM
4112018-08-07 Simon Marchi <simon.marchi@ericsson.com>
412
413 * common/pathstuff.h (get_standard_cache_dir): New.
414 * common/pathstuff.c (get_standard_cache_dir): New.
415 * build-id.h (build_id_to_string): New.
416 * dwarf-index-common.h (INDEX4_SUFFIX, INDEX5_SUFFIX,
417 DEBUG_STR_SUFFIX): Move to here.
418 * dwarf-index-write.c (INDEX4_SUFFIX, INDEX5_SUFFIX,
419 DEBUG_STR_SUFFIX): Move from there.
420 (write_psymtabs_to_index): Make non-static, add basename
421 parameter. Write to temporary files, rename when done.
422 (save_gdb_index_command): Adjust call to
423 write_psymtabs_to_index.
424 * dwarf2read.h (dwarf2_per_objfile) <index_cache_res>: New
425 field.
426 * dwarf2read.c (dwz_file) <index_cache_res>: New field.
427 (get_gdb_index_contents_from_cache): New.
428 (get_gdb_index_contents_from_cache_dwz): New.
429 (dwarf2_initialize_objfile): Read index from cache.
430 (dwarf2_build_psymtabs): Save to index.
431 * dwarf-index-cache.h: New file.
432 * dwarf-index-cache.c: New file.
433 * dwarf-index-write.h: New file.
434
8a99096f
SM
4352018-08-07 Simon Marchi <simon.marchi@ericsson.com>
436
437 * gnulib/aclocal.m4: Re-generate.
438 * gnulib/config.in: Re-generate.
439 * gnulib/configure: Re-generate.
440 * gnulib/import/Makefile.am: Re-generate.
441 * gnulib/import/Makefile.in: Re-generate.
442 * gnulib/import/m4/gnulib-cache.m4: Re-generate.
443 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
444 * gnulib/import/m4/mkdir.m4: New file.
445 * gnulib/import/mkdir.c: New file.
446 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkdir
447 module.
448
5c831bb1
SM
4492018-08-07 Simon Marchi <simon.marchi@ericsson.com>
450
451 * Makefile.in (COMMON_SFILES): Add common/scoped_mmap.c.
452 * common/scoped_mmap.c: New file.
453 * common/scoped_mmap.h (destroy): New method.
454 (~scoped_mmap, reset): Use destroy.
455 (scoped_mmap): New move constructor.
456 (mmap_file): New declaration.
457 * unittests/scoped_mmap-selftests.c (test_normal,
458 test_invalid_filename, run_tests): New functions.
459 (_initialize_scoped_mmap_selftests): Register selftest.
460
4485a1c1
SM
4612018-08-07 Simon Marchi <simon.marchi@ericsson.com>
462
463 * dwarf2read.c (read_gdb_index_from_section): Rename to...
464 (read_gdb_index_from_buffer): ... this. Remove section
465 parameter, add buffer parameter.
466 (get_gdb_index_contents_ftype,
467 get_gdb_index_contents_dwz_ftype): New typedefs.
468 (dwarf2_read_gdb_index): Add callback parameters to get the
469 index contents.
470 (get_gdb_index_contents_from_section): New.
471 (dwarf2_initialize_objfile): Update call to
472 dwarf2_read_gdb_index.
473
528e1572
SM
4742018-08-07 Simon Marchi <simon.marchi@ericsson.com>
475
476 * common/filestuff.h (gdb_fopen_cloexec): New overload.
477 (gdb_open_cloexec): Likewise.
478 * nat/linux-osdata.c (command_from_pid): Use string_printf.
479 (commandline_from_pid): Likewise.
480 (linux_xfer_osdata_threads): Likewise.
481 (linux_xfer_osdata_fds): Likewise.
482 * ada-lang.c (is_package_name): Likewise.
483 * auxv.c (procfs_xfer_auxv): Likewise.
484 * breakpoint.c (print_one_breakpoint_location): Use
485 uiout::field_fmt.
486 (print_one_catch_solib): Use string_printf.
487 * coff-pe-read.c (add_pe_exported_sym): Likewise.
488 (add_pe_forwarded_sym): Likewise.
489 * dwarf2read.c (create_type_unit_group): Likewise.
490 (build_error_marker_type): Likewise.
491 * infcall.c (get_function_name): Likewise.
492 * valprint.c (print_converted_chars_to_obstack): Likewise.
493 * xtensa-tdep.c (xtensa_register_type): Likewise.
494
a7f25a84
SM
4952018-08-06 Simon Marchi <simon.marchi@ericsson.com>
496
497 * remote.c (remote_target::download_tracepoint): Fix format
498 string errors.
499
296956be
PFC
5002018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
501
502 * tracefile.c: Include common/byte-vector.h.
503 (trace_save): Change type of buf to gdb::byte_vector. Initialize
504 with trace_regblock_size if needed. Update uses of buf.
505
a04b9d62
PFC
5062018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
507
508 * tracepoint.h (collection_list) <m_regs_mask>: Change type to
509 std::vector<unsigned char>.
510 * tracepoint.c (collection_list::collection_list): Remove
511 m_regs_mask initializer from initializer list. Resize
512 m_regs_mask using the largest remote register number.
513 (collection_list::add_remote_register): Remove size check on
514 m_regs_mask. Use at to access element.
515 (collection_list::stringify): Change type of temp_buf to
516 gdb::char_vector. Update uses of temp_buf. Resize if needed to
517 stringify the register mask. Use pack_hex_byte for the register
518 mask.
519
4277c4b8
PFC
5202018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
521
522 * tracepoint.h (class collection_list) <add_register>: Remove.
523 <add_remote_register, add_ax_registers, add_local_register>:
524 Declare.
525 <add_memrange>: Add scope parameter.
526 * tracepoint.c (encode_actions_1): Likewise.
527 (collection_list::add_register): Rename to ...
528 (collection_list::add_remote_register): ... this. Update
529 comment.
530 (collection_list::add_ax_registers, add_local_register): New
531 methods.
532 (collection_list::add_memrange): Add scope parameter. Call
533 add_local_register instead of add_register.
534 (finalize_tracepoint_aexpr): New function.
535 (collection_list::collect_symbol): Update calls to add_memrange.
536 Call add_local_register instead of add_register. Call
537 add_ax_registers. Call finalize_tracepoint_aexpr.
538 (encode_actions_1): Get remote regnos for $reg action. Call
539 add_remote_register, add_ax_registers, and add_local_register.
540 Update call to add_memrange. Call finalize_tracepoint_aexpr.
541 (validate_actionline): Call finalize_tracepoint_aexpr.
542
3df3a985
PFC
5432018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
544
545 * remote.c (remote_target::download_tracepoint): Remove BUF_SIZE.
546 Replace array buf with gdb::char_vector buf, of size
547 get_remote_packet_size (). Replace references to buf and
548 BUF_SIZE to buf.data () and buf.size (). Replace strcpy, strcat
549 and xsnprintf with snprintf. Raise errors if the buffer is too
550 small.
551
aa6f3694
PFC
5522018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
553
554 * remote.c (remote_target::download_tracepoint): Fix the has_more
555 predicate in the QTDP action list iteration.
556
05abfc39
PFC
5572018-08-06 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
558
559 * remote.c (remote_target::download_tracepoint): Fix indentation
560 in for block.
561
821a2682
RO
5622018-08-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
563
564 * proc-api.c (_initialize_proc_api): Remove c, unused.
565 * procfs.c (procfs_init_inferior): Remove signals, unused.
566 (procfs_target::make_corefile_notes): Remove old_chain, fpregs,
567 unused.
568
95347337
AB
5692018-08-06 Sergey Korolev <s.korolev@ndmsystems.com>
570 Andrew Burgess <andrew.burgess@embecosm.com>
571
572 * linux-nat.c (linux_nat_target::follow_fork): Avoid using
573 'W_STOPCODE (0)' as this could be ambiguous.
574
425699f5
SDJ
5752018-08-03 Sergio Durigan Junior <sergiodj@redhat.com>
576
577 * ser-tcp.c (net_open): Fix thinko when deciding whether to
578 disable TCP's Nagle algorithm (use "ai_protocol" instead of
579 "ai_socktype").
580
3e1d3d8c
TT
5812018-08-02 Tom Tromey <tom@tromey.com>
582
583 PR symtab/16842.
584 * dwarf2read.c (read_func_scope): Set symtab on template parameter
585 symbols.
586 (process_structure_scope): Likewise.
587
15843549
XR
5882018-08-02 Xavier Roirand <roirand@adacore.com>
589
590 PR gdb/22629:
591 * darwin-nat.c (darwin_kill_inferior): Fix handling of
592 kill inferior.
593
b5bddbbb
TT
5942018-08-02 Tom Tromey <tom@tromey.com>
595
596 * darwin-nat.c (find_inferior_task_it, darwin_find_thread)
597 (darwin_suspend_inferior, darwin_resume_inferior)
598 (darwin_decode_notify_message, darwin_resume_inferior_threads)
599 (darwin_check_new_threads): Check result of get_darwin_inferior.
600
f61cfa07
JB
6012018-07-31 Joel Brobecker <brobecker@adacore.com>
602
603 GDB 8.1.1 released.
604
5abe0f0c
JV
6052018-07-31 Jan Vrany <jan.vrany@fit.cvut.cz>
606
607 * varobj.c (varobj_get_path_expr_parent): Report an error if
608 parent is a dynamic varobj.
609
472fa5ee
SM
6102018-07-31 Simon Marchi <simon.marchi@ericsson.com>
611
612 * gnulib/aclocal.m4: Re-generate.
613 * gnulib/config.in: Re-generate.
614 * gnulib/configure: Re-generate.
615 * gnulib/import/Makefile.in: Re-generate.
616 * gnulib/import/m4/gnulib-comp.m4: Re-generate.
617 * gnulib/import/m4/onceonly.m4: Re-generate.
618
1c28969e
SM
6192018-07-31 Simon Marchi <simon.marchi@ericsson.com>
620
621 * target-descriptions.c (struct xml_test_tdesc): New.
622 (xml_tdesc): Change type to std::vector<xml_test_tdesc>.
623 (record_xml_tdesc): Update.
624 (maintenance_check_xml_descriptions): Update.
625 * target-descriptions.h (record_xml_tdesc): Update comment.
626
c8f2dc0d
AB
6272018-07-30 Andrew Burgess <andrew.burgess@embecosm.com>
628
629 * eval.c (evaluate_subexp_for_sizeof): Check for array type before
630 checking array bounds are defined.
631
463c08d1
TT
6322018-07-30 Tom Tromey <tom@tromey.com>
633
634 * nat/linux-osdata.c (pid_pgid_entry::operator<): Fix
635 irreflexivity violation.
636
dba7455e
TT
6372018-07-30 Tom Tromey <tom@tromey.com>
638
639 * cli/cli-decode.c (lookup_cmd): Remove lint code.
640 * value.c (unpack_long): Remove lint code.
641 * valops.c (value_ind): Remove lint code.
642 * valarith.c (value_x_binop, value_x_unop, value_equal)
643 (value_pos): Remove lint code.
644
37cc0cae
TV
6452018-07-28 Tom de Vries <tdevries@suse.de>
646
647 * eval.c (evaluate_subexp_for_sizeof): Interpret size of dynamic type
648 with undefined upper bound as <optimized out>.
649
129eb0f1
SDJ
6502018-07-27 Sergio Durigan Junior <sergiodj@redhat.com>
651
652 * gcore.in: Rename variable "name" to "prefix". Expand
653 "usage" text.
654
6af79d7b
JT
6552018-07-14 Jon Turney <jon.turney@dronecode.org.uk>
656
657 * windows-nat.c (windows_nat_target::create_inferior): Update to
658 call close() in global namespace.
659
79748972
TT
6602018-07-26 Tom Tromey <tom@tromey.com>
661
662 * dwarf-index-write.c (add_address_entry): Don't add objfile
663 offsets.
664 * dbxread.c (find_stab_function): Rename from
665 find_stab_function_addr. Return a bound_minimal_symbol.
666 (read_dbx_symtab): Use raw_text_low, raw_text_high.
667 Don't add objfile offsets.
668 (end_psymtab): Use raw_text_low, raw_text_high,
669 MSYMBOL_VALUE_RAW_ADDRESS.
670 (read_ofile_symtab): Update.
671 (process_one_symbol): Update.
672 * dwarf2read.c (create_addrmap_from_index): Don't add objfile
673 offsets.
674 (dw2_relocate): Remove.
675 (dw2_find_pc_sect_symtab): Bias PC by the text offset before
676 searching addrmap.
677 (dwarf2_gdb_index_functions, dwarf2_debug_names_functions):
678 Update.
679 (process_psymtab_comp_unit_reader, add_partial_symbol)
680 (add_partial_subprogram, dwarf2_ranges_read): Update.
681 (load_partial_dies): Update.
682 (add_address_entry): Don't add objfile offsets.
683 (dwarf2_build_include_psymtabs): Update.
684 (create_addrmap_from_aranges): Don't add objfile offsets.
685 (dw2_find_pc_sect_compunit_symtab): Update.
686 * mdebugread.c (parse_symbol): Don't add objfile offsets.
687 (parse_lines): Remove 'pst' parameter, replace with 'textlow'.
688 Update.
689 (parse_partial_symbols): Don't add objfile offsets. Use
690 raw_text_low, raw_text_high. Update.
691 (handle_psymbol_enumerators, psymtab_to_symtab_1): Update.
692 * objfiles.c (objfile_relocate1): Don't relocate psymtabs_addrmap
693 or call 'relocate' quick function. Clear psymbol_map.
694 * psympriv.h (struct partial_symbol) <address>: Add section
695 offset.
696 <set_unrelocated_address>: Rename from set_address.
697 <raw_text_low, raw_text_high>: New methods.
698 <text_low, text_high>: Add objfile parameter.
699 (add_psymbol_to_bcache): Add 'section' parameter. Call
700 set_unrelocated_address.
701 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
702 (find_pc_psymbol): Update.
703 (fixup_psymbol_section, relocate_psymtabs): Remove.
704 (dump_psymtab, psym_functions): Update.
705 (add_psymbol_to_bcache, add_psymbol_to_list): Add 'section'
706 parameter.
707 (maintenance_info_psymtabs, maintenance_check_psymtabs): Update.
708 (start_psymtab_common): Update.
709 * symfile-debug.c (debug_qf_relocate): Remove.
710 (debug_sym_quick_functions): Update.
711 * symfile.h (struct quick_symbol_functions) <relocate>: Remove.
712 * xcoffread.c (scan_xcoff_symtab): Don't add objfile offsets.
713 Update.
714
52948f01
TT
7152018-07-26 Tom Tromey <tromey@redhat.com>
716
717 * dbxread.c (end_psymtab): Use text_high_valid and
718 text_low_valid.
719 * mdebugread.c (parse_partial_symbols): Use text_low_valid.
720 (psymtab_to_symtab_1): Use text_high_valid and text_low_valid.
721 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
722 Update comment.
723 <text_low_valid, text_high_valid>: New fields.
724 <set_text_low, set_text_high>: Update.
725 * xcoffread.c (scan_xcoff_symtab): Use text_low_valid.
726
4ae976d1
TT
7272018-07-26 Tom Tromey <tom@tromey.com>
728
729 * dbxread.c (read_dbx_symtab, end_psymtab, read_ofile_symtab):
730 Update.
731 * dwarf2read.c (dwarf2_create_include_psymtab): Don't initialize
732 textlow and texthigh fields.
733 (process_psymtab_comp_unit_reader, dwarf2_build_include_psymtabs):
734 Update.
735 * mdebugread.c (parse_lines, parse_partial_symbols)
736 (psymtab_to_symtab_1): Update.
737 * psympriv.h (struct partial_symtab) <m_text_low, m_text_high>:
738 Rename fields. Update comment. Now private.
739 <text_low, text_high, set_text_low, set_text_high>: New methods.
740 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
741 (find_pc_sect_psymbol, relocate_psymtabs, dump_psymtab)
742 (start_psymtab_common, maintenance_info_psymtabs)
743 (maintenance_check_psymtabs): Update.
744 * xcoffread.c (xcoff_end_psymtab): Don't initialize textlow and
745 texthigh fields.
746 (scan_xcoff_symtab): Update.
747
02e9e7f7
TT
7482018-07-26 Tom Tromey <tromey@redhat.com>
749
750 * psympriv.h (struct partial_symbol) <unrelocated_address,
751 address, set_address>: New methods.
752 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymbol)
753 (fixup_psymbol_section, relocate_psymtabs): Update.
754 (print_partial_symbols): Add 'objfile' parameter. Update.
755 (dump_psymtab, add_psymbol_to_bcache, psym_fill_psymbol_map):
756 Update.
757
8a6d4234
TT
7582018-07-26 Tom Tromey <tom@tromey.com>
759
760 * dwarf-index-write.c (write_psymbols, debug_names::insert)
761 (debug_names::write_psymbols): Update.
762 * psympriv.h (struct partial_symbol): Derive from
763 general_symbol_info.
764 <obj_section>: New method.
765 (PSYMBOL_DOMAIN, PSYMBOL_CLASS): Remove.n
766 * psymtab.c (find_pc_sect_psymtab_closer, find_pc_sect_psymtab)
767 (find_pc_sect_psymbol, fixup_psymbol_section)
768 (match_partial_symbol, lookup_partial_symbol, relocate_psymtabs)
769 (print_partial_symbols, recursively_search_psymtabs)
770 (compare_psymbols, psymbol_hash, psymbol_compare)
771 (add_psymbol_to_bcache, maintenance_check_psymtabs)
772 (psymbol_name_matches, psym_fill_psymbol_map): Update.
773
08994e1d
TT
7742018-07-26 Tom Tromey <tromey@redhat.com>
775
776 * dbxread.c (end_psymtab): Remove dead code.
777
3c3bb058
AB
7782018-07-26 Andrew Burgess <andrew.burgess@embecosm.com>
779
780 * dwarf2-frame-tailcall.c (tailcall_frame_sniffer): Exit early if
781 DWARF unwinders are disabled.
782 * dwarf2-frame.c: Add dwarf2read.h include.
783 (dwarf2_frame_sniffer): Exit early if DWARF unwinders are
784 disabled.
785 (dwarf2_frame_unwinders_enabled_p): Define.
786 (show_dwarf_unwinders_enabled_p): New function.
787 (_initialize_dwarf2_frame): Register switch to control DWARF
788 unwinder use.
789 * dwarf2-frame.h (dwarf2_frame_unwinders_enabled_p): Declare.
790 * dwarf2read.c (set_dwarf_cmdlist): Remove static keyword.
791 (show_dwarf_cmdlist): Remove static keyword.
792 * dwarf2read.h (set_dwarf_cmdlist): Declare.
793 (show_dwarf_cmdlist): Declare.
794 * NEWS: Document new feature.
795
9e7f3bbb
TV
7962018-07-26 Tom de Vries <tdevries@suse.de>
797
798 PR breakpoints/23366
799 * infcmd.c (info_program_command): Handle ptid == minus_one_ptid.
800
506f5c41
TV
8012018-07-26 Tom de Vries <tdevries@suse.de>
802
803 * dwarf2read.c (read_subrange_type): Warn if DW_AT_upper_bound or
804 DW_AT_count can't be translated to a dynamic prop.
805
16f808ec
TV
8062018-07-25 Tom de Vries <tdevries@suse.de>
807
808 * dwarf2loc.c (dwarf2_locexpr_baton_eval): Wrap ctx.eval call in
809 try/catch.
810
d7154a8d
JV
8112018-07-25 Jan Vrany <jan.vrany@fit.cvut.cz>
812
813 * breakpoint.c (enable_disable_bp_num_loc): Notify observers.
814
a45389f6
JB
8152018-07-25 Joel Brobecker <brobecker@adacore.com>
816
817 * MAINTAINERS (Global Maintainers): Add Tom Tromey.
818
380618d6
KS
8192018-07-24 Keith Seitz <keiths@redhat.comt
820
821 PR symtab/23010
822 * dwarf2read.c (dw2_add_symbol_to_list): New function.
823 (fixup_go_packaging, new_symbol): Use dw2_add_symbol_to_list
824 instead of add_symbol_to_list.
825 (read_file_scope): Call prepare_one_comp_unit before reading
826 any other DIEs.
827
4b17aefe
SM
8282018-07-24 Simon Marchi <simon.marchi@ericsson.com>
829
830 * common/scoped_mmap.h (class scoped_mmap): Fix indentation.
831
29d17e47
TT
8322018-07-24 Tom Tromey <tom@tromey.com>
833
834 * utils.c (malloc, realloc, free): Don't declare.
835 * configure, config.in: Rebuild.
836 * configure.ac: Don't check for declarations of free, malloc, or
837 realloc.
838
cf4088a9
SM
8392018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
840
841 * aarch64-linux-nat.c
842 (aarch64_linux_nat_target::stopped_data_address): Remove unused
843 variable.
844 * arm-linux-nat.c (fetch_regs): Likewise.
845 (store_regs): Likewise.
846 (fetch_vfp_regs): Likewise.
847 (store_vfp_regs): Likewise.
848 (arm_linux_nat_target::insert_hw_breakpoint): Likewise.
849 (arm_linux_nat_target::remove_hw_breakpoint): Likewise.
850 (arm_linux_nat_target::insert_watchpoint): Likewise.
851 (arm_linux_nat_target::remove_watchpoint): Likewise.
852 * mips-linux-nat.c (mips_linux_nat_target::insert_watchpoint):
853 Likewise.
854 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs):
855 Likewise.
856 * ppc-linux-nat.c (fetch_register): Likewise.
857 (fetch_all_gp_regs): Likewise.
858 (fetch_ppc_registers): Likewise.
859 (store_all_gp_regs): Likewise.
860 (store_ppc_registers): Likewise.
861 (hwdebug_insert_point): Likewise.
862 (can_use_watchpoint_cond_accel): Likewise.
863 * remote-sim.c (gdb_os_write_stdout): Likewise.
864
a0de763e
TT
8652018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
866 Tom Tromey <tom@tromey.com>
867
868 * warning.m4 (AM_GDB_WARNINGS): Add -Wunused-variable and special
869 test for it.
870 * configure: Rebuild.
871
3b20124b
TT
8722018-07-22 Tom Tromey <tom@tromey.com>
873
874 * regformats/regdat.sh: Define xmltarget_${name} inside
875 #ifndef IN_PROCESS_AGENT.
876
8c8807f4
TT
8772018-07-22 Tom Tromey <tom@tromey.com>
878
879 * value.c (value_fetch_lazy_bitfield): Remove unused variable.
880
c486b610
TT
8812018-07-22 Tom Tromey <tom@tromey.com>
882
883 * symfile.c (reread_symbols): Notify iter, not objfile.
884
494f80a9
TT
8852018-07-22 Tom Tromey <tom@tromey.com>
886
887 * ravenscar-thread.c (ravenscar_thread_target::store_registers):
888 Use arch_ops.
889 (ravenscar_thread_target::prepare_to_store): Likewise.
890
c51f6a54
TT
8912018-07-22 Tom Tromey <tom@tromey.com>
892
893 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Remove
894 unused variable. Call value_fetch_lazy when needed.
895 * guile/scm-pretty-print.c (gdbscm_apply_val_pretty_printer):
896 Remove unused variable. Call value_fetch_lazy when needed.
897
374fd1fd
TT
8982018-07-22 Tom Tromey <tom@tromey.com>
899
900 * m32c-tdep.c (mark_dma): Return void.
901 (make_regs): Remove unused declarations.
902
d5e9a511
TT
9032018-07-22 Tom Tromey <tom@tromey.com>
904
905 * guile/scm-cmd.c (gdbscm_dont_repeat): Call
906 cmdscm_get_valid_command_smob_arg_unsafe for effect.
907 * guile/scm-block.c (gdbscm_make_block_syms_iter): Call
908 bkscm_get_valid_block_smob_arg_unsafe for effect.
909
996d693a
TT
9102018-07-22 Tom Tromey <tom@tromey.com>
911
912 * bfin-tdep.c (bfin_push_dummy_call): Use arg_type, not
913 value_type.
914
15766370
TT
9152018-07-22 Tom Tromey <tom@tromey.com>
916
917 * windows-nat.c (saved_context): Conditionally define.
918 * remote.c (remote_target::remote_btrace_maybe_reopen):
919 Conditionally declare "warned".
920 * inflow.c (sigquit_ours): Conditionally define.
921 (new_tty): Move "tty" declaration inside #if.
922 * guile/guile.c (guile_datadir): Conditionally define.
923 * charset.c (set_be_le_names): Move some declarations inside #if.
924 * btrace.c (parse_xml_btrace): Move "errcode" declaration inside
925 #if.
926 (parse_xml_btrace_conf): Likewise.
927
f4e80e13
TT
9282018-07-22 Tom Tromey <tom@tromey.com>
929
930 * spu-tdep.c (spu_get_overlay_table): Remove unused variable.
931
8d49165d
TT
9322018-07-22 Tom Tromey <tom@tromey.com>
933
934 * guile/scm-value.c (gdbscm_value_call): Remove unused variables.
935 * guile/scm-math.c (vlscm_unop_gdbthrow, vlscm_binop_gdbthrow)
936 (vlscm_convert_typed_value_from_scheme): Remove unused variable.
937 * buildsym-legacy.c (get_macro_table): Remove unused variable.
938 * stack.c (frame_apply_level_command): Remove unused variable.
939 * tic6x-tdep.c (tic6x_push_dummy_call): Remove unused variable.
940 * sparc64-tdep.c (adi_examine_command): Remove unused variable.
941 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Remove
942 unused variable.
943 * nios2-tdep.c (nios2_push_dummy_call): Remove unused variable.
944 * mep-tdep.c (mep_push_dummy_call): Remove unused variable.
945 * ada-lang.c (ada_lookup_symbol_list_worker): Remove unused
946 variable.
947 * amd64-tdep.c (amd64_supply_xsave): Remove unused variable.
948 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Remove unused
949 variable.
950 * breakpoint.c (check_no_tracepoint_commands, update_watchpoint):
951 Remove unused variable.
952 * cli/cli-script.c (recurse_read_control_structure): Remove unused
953 variable.
954 * common/tdesc.c (print_xml_feature::visit): Remove unused
955 variable.
956 * compile/compile-object-load.c (store_regs): Remove unused
957 variables.
958 * complaints.c (clear_complaints): Remove unused variable.
959 * corelow.c (core_target_open): Remove unused variable.
960 * fbsd-tdep.c (fbsd_core_info_proc_status): Remove unused
961 variable.
962 * guile/scm-frame.c (gdbscm_frame_read_var): Remove unused
963 variable.
964 * guile/scm-symtab.c (stscm_print_sal_smob): Remove unused
965 variable.
966 * guile/scm-type.c (gdbscm_field_baseclass_p): Remove unused
967 variable.
968 * guile/scm-utils.c (gdbscm_parse_function_args): Remove unused
969 variable.
970 * hppa-tdep.c (hppa_stub_frame_unwind_cache): Remove unused
971 variable.
972 * ia64-tdep.c (examine_prologue): Remove unused variable.
973 * infcall.c (run_inferior_call): Remove unused variable.
974 * inferior.c (exit_inferior): Remove unused variable.
975 * infrun.c (infrun_thread_ptid_changed): Remove unused variable.
976 * linespec.c (decode_line_2): Remove unused variable.
977 * linux-nat.c (super_close): Remove.
978 * linux-tdep.c (linux_info_proc): Remove unused variable.
979 * mi/mi-main.c (mi_execute_command): Remove unused variable.
980 * microblaze-linux-tdep.c (microblaze_linux_sigtramp_cache):
981 Remove unused variable.
982 * parse.c (find_minsym_type_and_address): Remove unused variable.
983 * printcmd.c (info_symbol_command, printf_floating): Remove unused
984 variable.
985 * python/py-breakpoint.c (bppy_set_commands): Remove unused
986 variable.
987 * python/py-unwind.c (unwind_infopy_dealloc): Remove unused
988 variables.
989 * record-btrace.c (record_btrace_target::store_registers): Remove
990 unused variable.
991 (cmd_show_record_btrace_cpu): Remove unused variable.
992 * riscv-tdep.c (riscv_register_reggroup_p)
993 (riscv_push_dummy_call, riscv_return_value): Remove unused
994 variable.
995 * rust-exp.y (literal): Remove unused variable.
996 * rust-lang.c (rust_evaluate_subexp) <OP_RUST_ARARAY>: Remove
997 unused variable.
998 <STRUCTOP_ANONYMOUS>: Likewise.
999 * s390-linux-tdep.c (s390_linux_init_abi_31)
1000 (s390_linux_init_abi_64): Remove unused variable.
1001 * ser-ming2.c (ser_windows_read_prim, pipe_select_thread)
1002 (file_select_thread, net_windows_open, _initialize_ser_windows):
1003 Remove unused variables.
1004 * symtab.c (find_pc_sect_line): Remove unused variable.
1005 * target-memory.c (compute_garbled_blocks): Remove unused
1006 variable.
1007 (target_write_memory_blocks): Remove unused variable.
1008 * target.c (target_stack::unpush): Remove unused variables.
1009 * tracepoint.c (start_tracing, all_tracepoint_actions)
1010 (merge_uploaded_trace_state_variables)
1011 (print_one_static_tracepoint_marker): Remove unused variable.
1012 * unittests/basic_string_view/element_access/char/1.cc (test01):
1013 Remove unused variable.
1014 * windows-nat.c (windows_continue, windows_add_all_dlls)
1015 (do_initial_windows_stuff, windows_nat_target::create_inferior):
1016 Remove unused variables.
1017
17cbafdb
SM
10182018-07-21 Simon Marchi <simon.marchi@polymtl.ca>
1019
1020 * arm-tdep.c (arm_gdbarch_init): Declare attr_arch and
1021 attr_profile in HAVE_ELF.
1022 * rs6000-tdep.c (bfd_uses_spe_extensions): Declare vector_abi in
1023 HAVE_ELF.
1024
0ee6c332
SM
10252018-07-20 Simon Marchi <simon.marchi@polymtl.ca>
1026
1027 * frame.c (frame_register_unwind): Change parameter name.
1028 (frame_unwind_register): Likewise.
1029 (frame_unwind_register_value): Likewise.
1030 (frame_unwind_register_signed): Likewise.
1031 (frame_unwind_register_unsigned): Likewise.
1032 * frame.h (frame_register_unwind): Likewise.
1033 (frame_unwind_register): Likewise.
1034 (frame_unwind_register_value): Likewise.
1035 (frame_unwind_register_signed): Likewise.
1036 (frame_unwind_register_unsigned): Likewise.
1037 (frame_unwind_arch): Likewise.
1038
e2e31f10
MR
10392018-07-20 Maciej W. Rozycki <macro@mips.com>
1040
1041 * MAINTAINERS: Update my e-mail address, downgrade to MIPS I-IV
1042 ISA maintenance.
1043
2d389915
MR
10442018-07-20 Maciej W. Rozycki <macro@mips.com>
1045
1046 * mips-linux-nat.c (mips_linux_nat_target::read_description):
1047 Call `get_ptrace_pid' rather than extracting the ptrace PID by
1048 hand.
1049
cbb09508
KS
10502018-07-20 Keith Seitz <keiths@redhat.com>
1051
1052 * buildsym.h (struct buildsym_compunit) <m_objfile, m_subfiles,
1053 m_main_subfile, m_comp_dir, m_producer, m_debugformat,
1054 m_compunit_symtab, m_language>: Add "m_" prefix.
1055 Update all uses.
1056 * buildsym.c: Update all uses.
1057
bfe2e011
TT
10582018-07-20 Tom Tromey <tom@tromey.com>
1059
1060 * buildsym-legacy.h (record_line): Don't use record_line_ftype.
1061 * buildsym.h (record_line_ftype): Remove typedef.
1062
0e6f3061
TT
10632018-07-20 Tom Tromey <tom@tromey.com>
1064
1065 * buildsym-legacy.h (augment_type_symtab): Don't declare.
1066 (end_expandable_symtab): Likewise.
1067 (end_symtab_get_static_block): Likewise.
1068 (end_symtab_from_static_block): Likewise.
1069 * buildsym-legacy.c (augment_type_symtab): Remove.
1070 (end_expandable_symtab): Remove.
1071 (end_symtab_get_static_block): Remove.
1072 (end_symtab_from_static_block): Remove.
1073
804d2729
TT
10742018-07-20 Tom Tromey <tom@tromey.com>
1075
1076 * dwarf2read.c: Include buildsym.h.
1077 (struct dwarf2_cu) <builder>: New method.
1078 (fixup_go_packaging): Update.
1079 (process_full_comp_unit, process_full_type_unit): Update. Don't
1080 use scoped_free_pendings.
1081 (using_directives): Add "cu" parameter, remove "language".
1082 (read_import_statement, setup_type_unit_groups, )
1083 (read_func_scope, read_lexical_block_scope)
1084 (dwarf2_record_block_ranges, read_namespace): Update.
1085 (lnp_state_machine::lnp_state_machine): Add cu parameter.
1086 (lnp_state_machine::handle_end_sequence): Update.
1087 (class lnp_state_machine) <m_cu>: New member.
1088 <m_record_line_callback>: Remove.
1089 <m_currently_recording_lines>: New member.
1090 (lnp_state_machine::handle_set_file): Update.
1091 (noop_record_line): Remove.
1092 (dwarf_record_line_p): Add cu parameter.
1093 (dwarf_record_line_1, dwarf_finish_line): Likewise.
1094 (lnp_state_machine::record_line)
1095 (lnp_state_machine::lnp_state_machine)
1096 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
1097 (dwarf_decode_lines): Update.
1098 (dwarf2_start_subfile): Add cu parameter.
1099 (dwarf2_start_symtab, new_symbol): Update.
1100 (macro_start_file, dwarf_decode_macro_bytes): Add cu parameter.
1101 Remove dwarf2_per_objfile parameter.
1102 (dwarf_decode_macros): Update.
1103
80e649fc
TT
11042018-07-20 Tom Tromey <tom@tromey.com>
1105
1106 * stabsread.c (define_symbol): Update.
1107 * buildsym-legacy.h (get_buildsym_compunit): Declare.
1108 * dwarf2read.c (new_symbol): Update.
1109 * cp-support.h (cp_scan_for_anonymous_namespaces): Update.
1110 * cp-namespace.c: Include buildsym.h.
1111 (cp_scan_for_anonymous_namespaces): Add "compunit" parameter.
1112 * buildsym-legacy.c (get_buildsym_compunit): New function.
1113
0baae8db
TT
11142018-07-20 Tom Tromey <tom@tromey.com>
1115
1116 * xcoffread.c: Include buildsym-legacy.h.
1117 * windows-nat.c: Include buildsym-legacy.h.
1118 * stabsread.c: Include buildsym-legacy.h.
1119 * mdebugread.c: Include buildsym-legacy.h.
1120 * buildsym-legacy.h: New file.
1121 * buildsym-legacy.c: New file, from buildsym.c.
1122 * go32-nat.c: Include buildsym-legacy.h.
1123 * dwarf2read.c: Include buildsym-legacy.h.
1124 * dbxread.c: Include buildsym-legacy.h.
1125 * cp-namespace.c: Include buildsym-legacy.h.
1126 * coffread.c: Include buildsym-legacy.h.
1127 * buildsym.h: Move some contents to buildsym-legacy.h.
1128 * buildsym.c: Include buildsym-legacy.h. Move many functions to
1129 buildsym-legacy.c.
1130 * Makefile.in (HFILES_NO_SRCDIR): Add buildsym-legacy.h.
1131
ab209f6f
TT
11322018-07-20 Tom Tromey <tom@tromey.com>
1133
1134 * buildsym.h (struct buildsym_compunit): Move from buildsym.c.
1135 * buildsym.c (struct buildsym_compunit): Move to buildsym.h.
1136 (buildsym_compunit::buildsym_compunit)
1137 (buildsym_compunit::~buildsym_compunit)
1138 (buildsym_compunit::get_macro_table): Define.
1139
74c72eac
TT
11402018-07-20 Tom Tromey <tom@tromey.com>
1141
1142 * buildsym.c (reset_symtab_globals): Remove.
1143 (buildsym_compunit::end_symtab_from_static_block): Update.
1144 (buildsym_compunit::augment_type_symtab): Update.
1145 (end_symtab_from_static_block): Call free_buildsym_compunit.
1146 (augment_type_symtab, end_symtab, end_expandable_symtab):
1147 Likewise.
1148
da6580e5
TT
11492018-07-20 Tom Tromey <tom@tromey.com>
1150
1151 * arch-utils.c: Do not include buildsym.h.
1152 * mipsread.c: Do not include buildsym.h.
1153 * machoread.c: Do not include buildsym.h.
1154 * elfread.c: Do not include buildsym.h.
1155
4a2125f5
TT
11562018-07-20 Tom Tromey <tom@tromey.com>
1157
1158 * buildsym.c (buildsym_compunit::buildsym_compunit): Do more
1159 initialization.
1160 (buildsym_compunit): Add new constructor.
1161 (struct buildsym_compunit) <get_last_source_file, finish_block,
1162 record_block_range, start_subfile, patch_subfile_names,
1163 push_subfile, pop_subfile, record_line, get_compunit_symtab,
1164 set_last_source_start_addr, get_last_source_start_addr,
1165 get_local_using_directives, set_local_using_directives,
1166 get_global_using_directives, outermost_context_p,
1167 get_current_context_stack, get_context_stack_depth,
1168 get_current_subfile, get_local_symbols, get_file_symbols,
1169 get_global_symbols, record_debugformat, record_producer,
1170 push_context, pop_context, end_symtab_get_static_block,
1171 end_symtab_from_static_block, end_symtab, end_expandable_symtab>:
1172 New public methods.
1173 <record_pending_block, finish_block_internal, make_blockvector,
1174 watch_main_source_file_lossage, end_symtab_with_blockvector>: New
1175 private methods.
1176 Update all users.
1177
11782018-05-22 Tom Tromey <tom@tromey.com>
1179
1180 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1181 parameter.
1182 (finish_block_internal): Update.
1183
6b213a47
TT
11842018-07-20 Tom Tromey <tom@tromey.com>
1185
1186 * buildsym.c (record_pending_block): Move earlier. Remove objfile
1187 parameter.
1188 (finish_block_internal): Update.
1189
b80a981d
TT
11902018-07-20 Tom Tromey <tom@tromey.com>
1191
1192 * buildsym.h (EXTERN): Don't define or undef.
1193 * buildsym.c (EXTERN): Don't define.
1194
ddb70602
TT
11952018-07-20 Tom Tromey <tom@tromey.com>
1196
1197 * buildsym.c: Remove TODO comment.
1198
b37dd3bc
TT
11992018-07-20 Tom Tromey <tom@tromey.com>
1200
1201 * coffread.c (coff_symtab_read): Update.
1202 * xcoffread.c (xcoff_psymtab_to_symtab_1): Update.
1203 (xcoff_new_init): Update.
1204 * mipsread.c (mipscoff_new_init): Update.
1205 * mdebugread.c (mdebug_build_psymtabs): Update.
1206 * elfread.c (elf_new_init): Update.
1207 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1208 Update.
1209 * dbxread.c (dbx_new_init, dbx_psymtab_to_symtab_1)
1210 (coffstab_build_psymtabs, elfstab_build_psymtabs)
1211 (stabsect_build_psymtabs): Update.
1212 * buildsym.h (buildsym_init): Don't declare.
1213 * buildsym.c: Update comment.
1214 (prepare_for_building): Remove.
1215 (start_symtab, restart_symtab): Update.
1216 (reset_symtab_globals): Update comment.
1217 (buildsym_init): Remove.
1218
e148f09d
TT
12192018-07-20 Tom Tromey <tom@tromey.com>
1220
1221 * xcoffread.c (read_xcoff_symtab, process_xcoff_symbol): Update.
1222 * stabsread.c (patch_block_stabs, define_symbol, read_type)
1223 (read_enum_type, common_block_start, common_block_end)
1224 (cleanup_undefined_types_1, finish_global_stabs): Update.
1225 * mdebugread.c (psymtab_to_symtab_1): Update.
1226 * dwarf2read.c (fixup_go_packaging, read_func_scope)
1227 (read_lexical_block_scope, new_symbol): Update.
1228 * dbxread.c (process_one_symbol): Update.
1229 * coffread.c (coff_symtab_read, process_coff_symbol)
1230 (coff_read_enum_type): Update.
1231 * buildsym.h (file_symbols, global_symbols, local_symbols): Don't
1232 declare.
1233 (get_local_symbols, get_file_symbols, get_global_symbols): New
1234 functions.
1235 * buildsym.c (~buildsym_compunit): Clean up m_file_symbols and
1236 m_global_symbols.
1237 <m_file_symbols, m_local_symbols, m_global_symbols>: New members.
1238 (~scoped_free_pendings): Update.
1239 (finish_block, prepare_for_building, reset_symtab_globals)
1240 (end_symtab_get_static_block, end_symtab_with_blockvector)
1241 (augment_type_symtab, push_context): Update.
1242 (get_local_symbols, get_file_symbols, get_global_symbols): New
1243 functions.
1244 (buildsym_init): Update.
1245
93b8bea4
TT
12462018-07-20 Tom Tromey <tom@tromey.com>
1247
1248 * dwarf2read.c (process_full_comp_unit): Do not set list_in_scope.
1249 (process_full_type_unit): Likewise.
1250 (dwarf2_start_symtab): Set list_in_scope.
1251
f62f6af5
TT
12522018-07-20 Tom Tromey <tom@tromey.com>
1253
1254 * dwarf2read.c (process_psymtab_comp_unit_reader)
1255 (build_type_psymtabs_reader): Do not set list_in_scope.
1256
1d376700
TT
12572018-07-20 Tom Tromey <tom@tromey.com>
1258
1259 * buildsym.c (free_pendings): Remove.
1260 (add_symbol_to_list, scoped_free_pendings)
1261 (finish_block_internal, buildsym_init): Update.
1262
c233e9c6
TT
12632018-07-20 Tom Tromey <tom@tromey.com>
1264
1265 * xcoffread.c (read_xcoff_symtab): Update.
1266 * dwarf2read.c (read_func_scope, read_lexical_block_scope):
1267 Update.
1268 * dbxread.c (process_one_symbol): Update.
1269 * coffread.c (coff_symtab_read): Update.
1270 * buildsym.h (finish_block): Update.
1271 * buildsym.c (finish_block): Remove "listhead" argument.
1272 (end_symtab_get_static_block): Update.
1273
5ac04550
TT
12742018-07-20 Tom Tromey <tom@tromey.com>
1275
1276 * buildsym.h (class scoped_free_pendings): Remove constructor.
1277 * buildsym.c (struct buildsym_compunit) <free_pending_blocks>: New
1278 method.
1279 <m_pending_block_obstack, m_pending_blocks>: New members.
1280 (pending_block_obstack, pending_blocks): Remove.
1281 (scoped_free_pendings::scoped_free_pendings): Default.
1282 (~scoped_free_pendings): Update.
1283 (free_pending_blocks): Remove.
1284 (finish_block_internal, record_pending_block, make_blockvector)
1285 (end_symtab_get_static_block, augment_type_symtab, push_context)
1286 (buildsym_init): Update.
1287
7ea05a7b
TT
12882018-07-20 Tom Tromey <tom@tromey.com>
1289
1290 * buildsym.c (struct buildsym_compunit) <m_pending_addrmap,
1291 m_pending_addrmap_obstack, m_pending_addrmap_interesting>: New
1292 members.
1293 (pending_addrmap, pending_addrmap_obstack)
1294 (pending_addrmap_interesting): Remove.
1295 (scoped_free_pendings, record_block_range, make_blockvector)
1296 (prepare_for_building, reset_symtab_globals, buildsym_init):
1297 Update.
1298
3c65e5b3
TT
12992018-07-20 Tom Tromey <tom@tromey.com>
1300
1301 * xcoffread.c (process_linenos): Update.
1302 * stabsread.c (define_symbol, read_type, read_enum_type): Update.
1303 * mdebugread.c (psymtab_to_symtab_1): Update.
1304 * dwarf2read.c (setup_type_unit_groups)
1305 (lnp_state_machine::handle_set_file, dwarf_record_line_p)
1306 (lnp_state_machine::record_line, dwarf_decode_lines): Update.
1307 * dbxread.c (process_one_symbol): Update.
1308 * coffread.c (coff_symtab_read, enter_linenos)
1309 (process_coff_symbol): Update.
1310 * buildsym.h (current_subfile): Don't declare.
1311 (get_current_subfile): Declare.
1312 * buildsym.c (struct buildsym_compunit) <m_current_subfile>: New
1313 member.
1314 (start_subfile, free_buildsym_compunit, push_subfile)
1315 (prepare_for_building, start_symtab): Update.
1316 (get_current_subfile): New function.
1317
a60f3166
TT
13182018-07-20 Tom Tromey <tom@tromey.com>
1319
1320 * coffread.c (coff_symtab_read): Update.
1321 * xcoffread.c (read_xcoff_symtab): Update.
1322 * dwarf2read.c (new_symbol): Update.
1323 (read_func_scope, read_lexical_block_scope): Update.
1324 * dbxread.c (process_one_symbol): Update.
1325 * buildsym.h (context_stack, context_stack_depth): Don't declare.
1326 (outermost_context_p): Remove macro.
1327 (outermost_context_p, get_current_context_stack)
1328 (get_context_stack_depth): Declare.
1329 (pop_context): Return struct context_stack.
1330 * buildsym.c (struct buildsym_compunit) <m_context_stack: New
1331 member.
1332 (context_stack_size): Remove.
1333 (INITIAL_CONTEXT_STACK_SIZE): Remove.
1334 (prepare_for_building, end_symtab_get_static_block)
1335 (augment_type_symtab, push_context): Update.
1336 (pop_context): Return struct context_stack.
1337 (outermost_context_p, get_current_context_stack)
1338 (get_context_stack_depth): New functions.
1339 (buildsym_init): Update.
1340
56ba65a0
TT
13412018-07-20 Tom Tromey <tom@tromey.com>
1342
1343 * rust-exp.y: Now a pure parser. Update all rules.
1344 (%union): Move earlier.
1345 (current_parser, work_obstack): Remove globals.
1346 (rust_parser, ~rust_parser): Update.
1347 (class rust_parser) <copy_name, concat3, crate_name, super_name,
1348 lex_character, lex_number, lex_string, lex_identifier,
1349 rust_lookup_type, convert_params_to_types, convert_ast_to_type,
1350 convert_name, convert_params_to_expression,
1351 convert_ast_to_expression, ast_basic_type, ast_operation,
1352 ast_compound_assignment, rust_op, ast_literal, ast_dliteral,
1353 ast_structop, ast_structop_anonymous, ast_unary, ast_cast,
1354 ast_call_ish, ast_path, ast_string, ast_struct, ast_range,
1355 ast_array_type, ast_slice_type, ast_reference_type,
1356 ast_pointer_type, ast_function_type, ast_tuple_type>: New methods.
1357 (rust_parse): Update.
1358 (rustyyerror, rustyylex): Add parser parameter.
1359 (rust_lex_test_one, rust_lex_int_test, rust_lex_exception_test)
1360 (rust_lex_stringish_test, rust_lex_test_sequence)
1361 (rust_lex_test_trailing_dot, rust_lex_test_completion)
1362 (rust_lex_test_push_back, rust_lex_tests): Update.
1363
4c693332
PA
13642018-07-19 Pedro Alves <palves@redhat.com>
1365
1366 * guile/guile-internal.h (gdbscm_scm_to_c_string): Now returns a
1367 gdb::unique_xmalloc_ptr.
1368 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_condition_x):
1369 Adjust to use dbscm_wrap and gdb::unique_xmalloc_ptr.
1370 * guile/scm-exception.c (gdbscm_exception_message_to_string): Use
1371 copy-initialization.
1372 * guile/scm-pretty-print.c (ppscm_print_children): Use
1373 gdb::unique_xmalloc_ptr instead of cleanups.
1374 (gdbscm_apply_val_pretty_printer): Remove cleanups.
1375 * guile/scm-string.c (gdbscm_scm_to_c_string): Now returns a
1376 gdb::unique_xmalloc_ptr.
1377 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1378 Adjust to use gdb::unique_xmalloc_ptr.
1379 * guile/scm-utils.c (extract_arg): Adjust.
1380 * guile/scm-value.c (gdbscm_value_field): Adjust to use
1381 gdb::unique_xmalloc_ptr instead of a cleanup.
1382
4581dc82
TT
13832018-07-19 Tom Tromey <tom@tromey.com>
1384
1385 * utils.c (do_value_free_to_mark)
1386 (make_cleanup_value_free_to_mark): Remove.
1387 * utils.h (make_cleanup_value_free_to_mark): Remove.
1388
43cc6c3a
PA
13892018-07-19 Pedro Alves <palves@redhat.com>
1390
1391 * guile/guile-internal.h (gdbscm_wrap): Really make 'args' a
1392 forwarding reference.
1393
3a5f2a48
PA
13942018-07-18 Pedro Alves <palves@redhat.com>
1395
1396 * guile/guile.c (gdbscm_execute_gdb_command): Adjust to use
1397 gdbscm_wrap. Use gdb::unique_xmalloc_ptr<char> instead of a
1398 cleanup.
1399
557e56be
PA
14002018-07-18 Pedro Alves <palves@redhat.com>
1401
1402 * guile/guile-internal.h: Add comment about mixing GDB and Scheme
1403 exceptions.
1404 (GDBSCM_HANDLE_GDB_EXCEPTION_WITH_CLEANUPS): Delete.
1405 (gdbscm_wrap): New.
1406 * guile/scm-frame.c (gdbscm_frame_read_register): Use xfree
1407 directly instead of a cleanup.
1408 * guile/scm-math.c (vlscm_unop_gdbthrow): New, factored out from ...
1409 (vlscm_unop): ... this. Reimplement using gdbscm_wrap.
1410 (vlscm_binop_gdbthrow): New, factored out from ...
1411 (vlscm_binop): ... this. Reimplement using gdbscm_wrap.
1412 (vlscm_rich_compare): Use gdbscm_wrap.
1413 * guile/scm-symbol.c (gdbscm_lookup_symbol): Use xfree directly
1414 instead of a cleanup.
1415 (gdbscm_lookup_global_symbol): Use xfree directly instead of a
1416 cleanup.
1417 * guile/scm-type.c (gdbscm_type_field, gdbscm_type_has_field_p):
1418 Use xfree directly instead of a cleanup.
1419 * guile/scm-value.c (gdbscm_make_value, gdbscm_make_lazy_value):
1420 Adjust to use gdbscm_wrap and scoped_value_mark.
1421 (gdbscm_value_optimized_out_p): Adjust to use gdbscm_wrap.
1422 (gdbscm_value_address, gdbscm_value_dereference)
1423 (gdbscm_value_referenced_value): Adjust to use gdbscm_wrap and
1424 scoped_value_mark.
1425 (gdbscm_value_dynamic_type): Use scoped_value_mark.
1426 (vlscm_do_cast, gdbscm_value_field): Adjust to use gdbscm_wrap and
1427 scoped_value_mark.
1428 (gdbscm_value_subscript, gdbscm_value_call): Adjust to use
1429 gdbscm_wrap and scoped_value_mark.
1430 (gdbscm_value_to_string): Use xfree directly instead of a
1431 cleanup. Move 'buffer' unique_ptr to TRY scope.
1432 (gdbscm_value_to_lazy_string): Use xfree directly instead of a
1433 cleanup. Move 'buffer' unique_ptr to TRY scope. Use
1434 scoped_value_mark.
1435 (gdbscm_value_fetch_lazy_x): Use gdbscm_wrap.
1436 (gdbscm_parse_and_eval): Adjust to use gdbscm_wrap and
1437 scoped_value_mark.
1438 (gdbscm_history_ref, gdbscm_history_append_x): Adjust to use
1439 gdbscm_wrap.
1440
42dc7699
TV
14412018-07-18 Tom de Vries <tdevries@suse.de>
1442
1443 * findvar.c (default_read_var_value): Also resolve dynamic type for
1444 LOC_OPTIMIZED_OUT vars.
1445
6592ceed
MR
14462018-07-18 Maciej W. Rozycki <macro@mips.com>
1447
1448 * mips-tdep.c (micromips_next_pc): Add SYSCALL instruction
1449 decoding.
1450
c6c6149a
TT
14512018-07-17 Tom Tromey <tom@tromey.com>
1452
1453 * guile/scm-param.c (pascm_set_func, pascm_show_func)
1454 (compute_enum_list, pascm_set_param_value_x)
1455 (gdbscm_parameter_value): Update.
1456 * guile/guile-internal.h (gdbscm_scm_to_string): Update.
1457 (gdbscm_scm_to_host_string): Update.
1458 * guile/scm-math.c (vlscm_convert_typed_value_from_scheme):
1459 Update.
1460 * guile/scm-cmd.c (cmdscm_add_completion): Update.
1461 * guile/scm-pretty-print.c (ppscm_print_string_repr): Update.
1462 * guile/scm-string.c (gdbscm_scm_to_string): Return
1463 unique_xmalloc_ptr.
1464 (gdbscm_scm_to_host_string): Likewise.
1465
a1a31cb8
TT
14662018-07-17 Tom Tromey <tom@tromey.com>
1467
1468 * guile/guile.c (gdbscm_eval_from_control_command): Update.
1469 * guile/guile-internal.h (gdbscm_safe_eval_string): Update.
1470 * guile/scm-objfile.c (gdbscm_execute_objfile_script): Update.
1471 * guile/scm-safe-call.c (gdbscm_safe_eval_string): Return
1472 unique_xmalloc_ptr.
1473
15bf3002
TT
14742018-07-17 Tom Tromey <tom@tromey.com>
1475
1476 * guile/scm-param.c (pascm_signal_setshow_error): Update.
1477 * guile/guile-internal.h (gdbscm_exception_message_to_string):
1478 Update.
1479 * guile/scm-cmd.c (cmdscm_function): Update.
1480 * guile/scm-pretty-print.c
1481 (ppscm_print_exception_unless_memory_error): Update.
1482 * guile/scm-exception.c (gdbscm_exception_message_to_string):
1483 Return unique_xmalloc_ptr.
1484
7eb1a66c
TT
14852018-07-17 Tom Tromey <tom@tromey.com>
1486
1487 * guile/scm-pretty-print.c (ppscm_make_pp_type_error_exception):
1488 Use string_printf.
1489
ce73f310
JW
14902018-07-17 Jim Wilson <jimw@sifive.com>
1491
27724bad
JW
1492 * riscv-tdep.c (riscv_has_feature): Delete comment that refers to
1493 set_gdbarch_decr_pc_after_break. Call riscv_read_misa_reg always.
1494 (riscv_gdbarch_init): Delete local has_compressed_isa. Delete now
1495 unecessary braces after EF_RISCV_RVC test. Delete call to
1496 set_gdbarch_decr_pc_after_break.
1497
ce73f310
JW
1498 * riscv-tdep.h (DECLARE_CSR): Use RISCV_FIRST_CSR_REGNUM instead of
1499 RISCV_LAST_FP_REGNUM + 1.
1500 (RSICV_CSR_LEGACY_MISA_REGNUM): Add RISCV_FIRST_CSR_REGNUM.
1501
056dec39
TT
15022018-07-17 Tom Tromey <tom@tromey.com>
1503
1504 * configure.ac: Remove --disable-gdbcli.
1505 * configure: Rebuild.
1506 * Makefile.in (SUBDIR_CLI_DEPS, SUBDIR_CLI_LDFLAGS)
1507 (SUBDIR_CLI_CFLAGS): Remove.
1508 (SFILES): Use SUBDIR_CLI_SRCS.
1509 (COMMON_OBS): Use SUBDIR_CLI_OBS.
1510
4735f0ed
TT
15112018-07-17 Tom Tromey <tom@tromey.com>
1512
1513 PR gdb/18624:
1514 * coffread.c (coff_symtab_read): Use scoped_free_pendings.
1515
117a0e99
JW
15162018-07-16 Jim Wilson <jimw@sifive.com>
1517
1518 * riscv-tdep.c (riscv_gdbarch_init): Call gdbarch_init_osabi.
1519
8a67aaa8
SM
15202018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1521
1522 * ia64-libunwind-tdep.c (libunwind_frame_cache): Remove unused
1523 variable.
1524 (libunwind_frame_sniffer): Likewise.
1525 (libunwind_frame_prev_register): Likewise.
1526 (libunwind_sigtramp_frame_sniffer): Likewise.
1527 * ia64-tdep.c (ia64_access_reg): Likewise.
1528 (ia64_access_rse_reg): Likewise.
1529 (ia64_libunwind_sigtramp_frame_this_id): Likewise.
1530 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Likewise.
1531
ec74dcd8
SM
15322018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1533
1534 * ia64-vms-tdep.c (ia64_vms_find_proc_info_x): Add cast.
1535
a700e753
SM
15362018-07-16 Simon Marchi <simon.marchi@ericsson.com>
1537
1538 * remote-sim.c (gdbsim_target::close,
1539 gdbsim_target::mourn_inferior): Remove unused variables.
1540
8b411ff8
SM
15412018-07-16 Simon Marchi <simon.marchi@polymtl.ca>
1542
1543 * ia64-tdep.c (ktab_buf): New global.
1544 (getunwind_table): Return a gdb::optional<gdb::byte_vector>.
1545 (get_kernel_table): Adjust.
1546
edb0470b
TT
15472018-07-16 Tom Tromey <tom@tromey.com>
1548
1549 * xcoffread.c (read_xcoff_symtab): Use outermost_context_p.
1550 * dwarf2read.c (using_directives, new_symbol): Use
1551 outermost_context_p.
1552 * dbxread.c (process_one_symbol): Use outermost_context_p.
1553 * coffread.c (coff_symtab_read): Use outermost_context_p.
1554
6cccc9a8
TT
15552018-07-16 Tom Tromey <tom@tromey.com>
1556
1557 * dwarf2read.c (using_directives, read_func_scope)
1558 (read_lexical_block_scope): Update.
1559 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
1560 * buildsym.h (local_using_directives, global_using_directives):
1561 Don't declare.
1562 (get_local_using_directives, set_local_using_directives)
1563 (get_global_using_directives): Declare.
1564 * buildsym.c (struct buildsym_compunit) <m_local_using_directives,
1565 m_global_using_directives>: New members.
1566 (finish_block_internal, prepare_for_building)
1567 (reset_symtab_globals, end_symtab_get_static_block)
1568 (push_context): Update.
1569 (get_local_using_directives, set_local_using_directives)
1570 (get_global_using_directives): New functions.
1571 (buildsym_init): Update.
1572
652788a7
TT
15732018-07-16 Tom Tromey <tom@tromey.com>
1574
1575 * xcoffread.c (xcoff_initial_scan): Don't call
1576 free_pending_blocks.
1577 * dbxread.c (dbx_symfile_read): Don't call free_pending_blocks.
1578 * buildsym.h (class scoped_free_pendings): Add constructor.
1579 (free_pending_blocks): Don't declare.
1580 * buildsym.c (scoped_free_pendings::scoped_free_pendings): New.
1581 (free_pending_blocks): Now static.
1582
8419ee53
TT
15832018-07-16 Tom Tromey <tom@tromey.com>
1584
1585 * buildsym.h (push_subfile, pop_subfile): Update declarations.
1586 * buildsym.c (struct buildsym_compunit) <m_subfile_stack>: New
1587 member.
1588 (struct subfile_stack): Remove.
1589 (subfile_stack): Remove.
1590 (push_subfile, pop_subfile, buildsym_init): Update.
1591
ccdac490
TT
15922018-07-16 Tom Tromey <tom@tromey.com>
1593
1594 * buildsym.c (push_subfile): Use gdb_assert.
1595 (pop_subfile): Use gdb_assert.
1596
43130d6f
TT
15972018-07-16 Tom Tromey <tom@tromey.com>
1598
1599 * buildsym.h (merge_symbol_lists): Remove.
1600 * buildsym.c (merge_symbol_lists): Remove.
1601
77d6f1aa
TT
16022018-07-16 Tom Tromey <tom@tromey.com>
1603
1604 * stabsread.c (scan_file_globals): Update comment.
1605 * stabsread.h (scan_file_globals): Move from buildsym.h.
1606 * buildsym.h (scan_file_globals): Move to stabsread.h.
1607
2c722d18
TT
16082018-07-16 Tom Tromey <tom@tromey.com>
1609
1610 * xcoffread.c (xcoff_new_init): Update.
1611 * mipsread.c (mipscoff_new_init): Update.
1612 * mdebugread.c (mdebug_build_psymtabs): Update.
1613 * elfread.c (elf_new_init): Update.
1614 * dbxread.c (dbx_new_init, coffstab_build_psymtabs)
1615 (elfstab_build_psymtabs, stabsect_build_psymtabs): Update.
1616 * buildsym.h (buildsym_new_init): Don't declare.
1617 * buildsym.c (buildsym_new_init): Remove.
1618
5985ac61
TT
16192018-07-16 Tom Tromey <tom@tromey.com>
1620
1621 * stabsread.h (within_function): Move from buildsym.h.
1622 * stabsread.c (start_stabs): Clear within_function.
1623 * coffread.c (coff_start_symtab): Clear within_function.
1624 * buildsym.h (within_function): Move to stabsread.h.
1625 * buildsym.c (prepare_for_building): Update.
1626
6b84eeb2
TT
16272018-07-16 Tom Tromey <tom@tromey.com>
1628
1629 * stabsread.h (processing_gcc_compilation): Move from buildsym.h.
1630 * dwarf2read.c (dwarf2_start_symtab): Don't set
1631 processing_gcc_compilation.
1632 * buildsym.h (processing_gcc_compilation): Move to stabsread.h.
1633
2150c3ef
TT
16342018-07-16 Tom Tromey <tom@tromey.com>
1635
1636 * stabsread.h (HASHSIZE, hashname, symnum, next_symbol_text)
1637 (next_symbol_text_func): Move from buildsym.h.
1638 * stabsread.c (hashname): Move from buildsym.c.
1639 * buildsym.h (HASHSIZE, symnum, next_symbol_text)
1640 (next_symbol_text_func, hashname): Move to stabsread.h.
1641 * buildsym.c: Don't include bcache.h
1642 (hashname): Move to stasbread.c.
1643
0ec44fc0
TT
16442018-07-16 Tom Tromey <tom@tromey.com>
1645
1646 * buildsym.h (context_stack_size): Don't declare.
1647 * buildsym.c (context_stack_size): New global.
1648
81cc346d
TT
16492018-07-16 Tom Tromey <tom@tromey.com>
1650
1651 * dbxread.c (processing_acc_compilation): New global.
1652 * buildsym.h (processing_acc_compilation): Don't declare.
1653
2c99ee5c
TT
16542018-07-16 Tom Tromey <tom@tromey.com>
1655
1656 * xcoffread.c (aix_process_linenos, complete_symtab): Update.
1657 * dbxread.c (read_ofile_symtab): Update.
1658 * coffread.c (coff_start_symtab, coff_end_symtab): Update.
1659 * buildsym.h (last_source_start_addr): Remove.
1660 (set_last_source_start_addr, get_last_source_start_addr):
1661 Declare.
1662 * buildsym.c (buildsym_compunit::buildsym_compunit): Add last_addr
1663 parameter.
1664 (struct buildsym_compunit) <m_last_source_start_addr>: New
1665 member.
1666 (prepare_for_building): Remove start_addr parameter.
1667 (start_symtab, restart_symtab, end_symtab_get_static_block)
1668 (end_symtab_with_blockvector): Update.
1669 (set_last_source_start_addr, get_last_source_start_addr): New
1670 functions.
1671
530fedbc
TT
16722018-07-16 Tom Tromey <tom@tromey.com>
1673
1674 * buildsym.c (struct buildsym_compunit) <m_have_line_numbers>: New
1675 member.
1676 (have_line_numbers): Remove.
1677 (record_line, prepare_for_building, end_symtab_get_static_block)
1678 (augment_type_symtab): Update.
1679
6a976300
TT
16802018-07-16 Tom Tromey <tom@tromey.com>
1681
1682 * buildsym.c (~buildsym_compunit): Free the macro table.
1683 (struct buildsym_compunit) <get_macro_table, release_macros>: New
1684 methods.
1685 <m_pending_macros>: New member.
1686 (pending_macros): Remove.
1687 (~scoped_free_pendings, get_macro_table, prepare_for_building)
1688 (reset_symtab_globals, end_symtab_get_static_block)
1689 (end_symtab_with_blockvector, augment_type_symtab)
1690 (buildsym_init): Update.
1691
c0015d44
TT
16922018-07-16 Tom Tromey <tom@tromey.com>
1693
1694 * buildsym.c (buildsym_compunit::buildsym_compunit): Add name
1695 parameter.
1696 (buildsym_compunit::set_last_source_file): New method.
1697 <m_last_source_file>: New member.
1698 (prepare_for_building): Remove "name" parameter.
1699 (start_symtab, restart_symtab, reset_symtab_globals): Update.
1700 (last_source_file): Remove.
1701 (set_last_source_file, get_last_source_file): Update.
1702
e62cca7c
TT
17032018-07-16 Tom Tromey <tom@tromey.com>
1704
1705 * buildsym.c (prepare_for_building): Add assert.
1706
905eb0e2
TT
17072018-07-16 Tom Tromey <tom@tromey.com>
1708
1709 * buildsym.c (~buildsym_compunit): Update.
1710 (struct buildsym_compunit) <comp_unit>: Now a unique_xmalloc_ptr.
1711 (start_subfile, patch_subfile_names)
1712 (end_symtab_with_blockvector): Update.
1713
b248663f
TT
17142018-07-16 Tom Tromey <tom@tromey.com>
1715
1716 * buildsym.c (struct buildsym_compunit): Add constructor,
1717 destructor, initializers.
1718 (start_buildsym_compunit): Remove.
1719 (free_buildsym_compunit): Use "delete".
1720 (start_symtab, restart_symtab): Use "new".
1721
ff27d073
SM
17222018-07-13 Simon Marchi <simon.marchi@polymtl.ca>
1723
1724 * symfile.c (set_objfile_default_section_offset): Remove struct
1725 keyword.
1726
6a15ecf5
SH
17272018-07-14 Stafford Horne <shorne@gmail.com>
1728
1729 * (Responsible Maintainers): Add myself as or1k maintainer.
1730
027a4c30
TT
17312018-07-13 Tom Tromey <tom@tromey.com>
1732
1733 * symfile.c (set_objfile_default_section_offset): Use extra braces
1734 around initializer.
1735
5c1eda30
AA
17362018-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1737
1738 * s390-tdep.c (s390_displaced_step_fixup): Adjust PC for a
1739 non-branching basr.
1740
bc7b042b
PW
17412018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1742
1743 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1744 unittests/cli-utils-selftests.c
1745 * unittests/cli-utils-selftests.c: New file.
1746
a14c4daa
PW
17472018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1748
1749 * NEWS: Mention new commands. Mention change to 'thread apply'.
1750
1fe75df7
PW
17512018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1752
1753 * thread.c (thr_try_catch_cmd): New function.
1754 (thread_apply_all_command): Handle qcs flags.
1755 (thread_apply_command): Handle qcs flags.
1756 (taas_command): New function.
1757 (tfaas_command): New function.
1758 (_initialize_thread): Update to setup the new commands 'taas
1759 and 'tfaas'. Change doc string for 'thread apply'.
1760
6a70eb7d
PW
17612018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1762
1763 * stack.c: (trailing_outermost_frame): New function, mostly
1764 extracted from backtrace_command_1.
1765 (leading_innermost_frame): New function.
1766 (backtrace_command_1): Update to call trailing_outermost_frame.
1767 (frame_apply_command_count): New function.
1768 (frame_apply_level_command): New function.
1769 (frame_apply_all_command): New function.
1770 (frame_apply_command): New function.
1771 (faas_command): New function.
1772 (frame_cmd_list): New variable.
1773 (_initialize_stack): Update to setup the new commands 'frame apply'
1774 and 'faas'.
1775
529c08b2
PW
17762018-07-12 Philippe Waroquiers <philippe.waroquiers@skynet.be>
1777
1778 * cli-utils.c (number_or_range_parser::get_number): Only handle
1779 numbers or convenience var as numbers.
1780 (parse_flags): New function.
1781 (parse_flags_qcs): New function.
1782 (number_or_range_parser::finished): Ensure parsing end is detected
1783 before end of string.
1784 * cli-utils.h (parse_flags): New function.
1785 (parse_flags_qcs): New function.
1786 (number_or_range_parser): Remove m_finished bool.
1787 (number_or_range_parser::skip_range): Set m_in_range to false.
1788
64b58472
SDJ
17892018-07-12 Sergio Durigan Junior <sergiodj@redhat.com>
1790
1791 * ser-tcp.c (try_connect): Declare 'ioarg' as 'u_long' if building
1792 on Windows.
1793
c7ab0aef
SDJ
17942018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1795 Jan Kratochvil <jan.kratochvil@redhat.com>
1796 Paul Fertser <fercerpav@gmail.com>
1797 Tsutomu Seki <sekiriki@gmail.com>
1798 Pedro Alves <palves@redhat.com>
1799
1800 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1801 'unittests/parse-connection-spec-selftests.c'.
1802 (COMMON_SFILES): Add 'common/netstuff.c'.
1803 (HFILES_NO_SRCDIR): Add 'common/netstuff.h'.
1804 * NEWS (Changes since GDB 8.2): Mention IPv6 support.
1805 * common/netstuff.c: New file.
1806 * common/netstuff.h: New file.
1807 * ser-tcp.c: Include 'netstuff.h' and 'wspiapi.h'.
1808 (wait_for_connect): Update comment. New parameter
1809 'gdb::optional<int> sock' instead of 'struct serial *scb'.
1810 Use 'sock' directly instead of 'scb->fd'.
1811 (try_connect): New function, with code from 'net_open'.
1812 (net_open): Rewrite main loop to deal with multiple
1813 sockets/addresses. Handle IPv6-style hostnames; implement
1814 support for IPv6 connections.
1815 * unittests/parse-connection-spec-selftests.c: New file.
1816
4c7333b3
PA
18172018-07-11 Pedro Alves <palves@redhat.com>
1818
1819 PR gdb/23377
1820 * remote.c (remote_target::remote_detach_pid): Call
1821 set_current_process.
1822
a6f88f6e
PA
18232018-07-11 Pedro Alves <palves@redhat.com>
1824
1825 * h8300-tdep.c (h8300_gdbarch_init): Remove
1826 set_gdbarch_ecoff_reg_to_regnum calls.
1827
16ff70dd
SDJ
18282018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
1829
1830 PR c++/23373
1831 * c-typeprint.c (c_type_print_base_struct_union): Don't print
1832 offsets/sizes for static members of a class/struct.
1833
12863263
AH
18342018-07-11 Alan Hayward <alan.hayward@arm.com>
1835
1836 * target-descriptions.c (tdesc_register_bitsize): Rename.
1837 * target-descriptions.h (tdesc_register_bitsize): Likewise.
1838 * rs6000-tdep.c (rs6000_gdbarch_init): Use new name.
1839 * aarch64-tdep.c (aarch64_get_tdesc_vq): Convert size.
1840
1123588c
TT
18412018-07-10 Tom Tromey <tom@tromey.com>
1842
1843 * breakpoint.c (moribund_locations): Now static and a
1844 std::vector.
1845 (breakpoint_init_inferior, moribund_breakpoint_here_p)
1846 (build_bpstat_chain, update_global_location_list)
1847 (breakpoint_retire_moribund): Update.
1848 * breakpoint.h (bp_location_p): Remove typedef. Don't declare
1849 VEC.
1850
8c49aa89
AB
18512018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1852
1853 * riscv-tdep.c (riscv_is_fp_regno_p): New function.
1854 (riscv_register_reggroup_p): Use new function, remove unneeded
1855 parenthesis.
1856 (riscv_push_dummy_call): Extend assert to compare against xlen or
1857 flen based on register type.
1858
42ecac17
AB
18592018-07-10 Andrew Burgess <andrew.burgess@embecosm.com>
1860
1861 * riscv-tdep.c (riscv_print_arg_location): Use TYPE_SAFE_NAME.
1862
055303e2
AB
18632018-07-09 Andrew Burgess <andrew.burgess@embecosm.com>
1864
1865 * remote.c (show_hardware_watchpoint_limit): New function.
1866 (show_hardware_watchpoint_length_limit): New function.
1867 (show_hardware_breakpoint_limit): New function.
1868 (_initialize_remote): Use add_setshow_zuinteger_unlimited_cmd
1869 where appropriate, update help text.
1870
8fd32c1c
TT
18712018-07-09 Tom Tromey <tom@tromey.com>
1872
1873 * Makefile.in (CDEPS): Don't mention XM_CDEPS.
1874 (CLIBS): Don't mention NAT_CLIBS.
1875
31278b51
TT
18762018-07-09 Tom Tromey <tom@tromey.com>
1877
1878 * Makefile.in (ADD_FILES, ADD_DEPS): Remove.
1879 (LIBGDB_OBS, clean mostlyclean): Update.
1880 (gdb$(EXEEXT), insight$(EXEEXT)): Update.
1881
e5fd1493
TT
18822018-07-09 Tom Tromey <tom@tromey.com>
1883
1884 * Makefile.in (%.c: %.y): Use ECHO_YACC.
1885 (%.c: %.l): Use ECHO_LEX. Just fail if flex not available.
1886 * silent-rules.mk (ECHO_YACC, ECHO_LEX): New variables.
1887
981e0c0c
TT
18882018-07-09 Tom Tromey <tom@tromey.com>
1889
1890 * Makefile.in (ALLDEPFILES): Remove exec.c.
1891 (COMMON_OBS): Remove exec.o.
1892 (COMMON_SFILES): Add exec.c.
1893
14ccceb2
TT
18942018-07-09 Tom Tromey <tom@tromey.com>
1895
1896 * Makefile.in (LINT, LINTFLAGS, LINTFILES, lint): Remove.
1897
5d3c3a68
TT
18982018-07-09 Tom Tromey <tom@tromey.com>
1899
1900 * Makefile.in (clean mostlyclean): Remove stamp-version.
1901 (version.c): Depend on stamp-version.
1902 (stamp-version): New rule, from version.c rule.
1903
1998086d
TT
19042018-07-09 Tom Tromey <tom@tromey.com>
1905
1906 * Makefile.in (init.c): Depend on stamp-init.
1907 (stamp-init): New rule, from init.c rule.
1908 (clean mostlyclean): Remove stamp-init.
1909
4c754949
TT
19102018-07-09 Tom Tromey <tom@tromey.com>
1911
1912 * Makefile.in (INIT_FILES): Remove CONFIG_SRCS,
1913 SUBDIR_GCC_COMPILE_SRCS.
1914
6497f1dd
TT
19152018-07-09 Tom Tromey <tom@tromey.com>
1916
1917 * Makefile.in (init.c): Remove some unused sed rules.
1918
97a34db9
TT
19192018-07-09 Tom Tromey <tom@tromey.com>
1920
1921 * Makefile.in (TSOBS): Remove.
1922 (INIT_FILES): Update.
1923 (LIBGDB_OBS): Update.
1924 (COMMON_SFILES): Add inflow.c.
1925 (SFILES): Remove inflow.c.
1926
25289ac1
JK
19272018-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
1928
1929 * contrib/gdb-add-index.sh ($dwarf5): New, use it.
1930
e83f4d97
SM
19312018-07-07 Simon Marchi <simon.marchi@polymtl.ca>
1932
4869c585
SM
1933 * ia64-libunwind-tdep.c (get_reg_name, get_fpreg_name,
1934 get_saveloc_name, is_signal_frame_name, step_name,
1935 init_remote_name, create_addr_space_name,
1936 destroy_addr_space_name, search_unwind_table_name,
1937 find_dyn_list_name): Constify.
e83f4d97 1938
6821842f
SM
19392018-07-05 Simon Marchi <simon.marchi@polymtl.ca>
1940
1941 * darwin-nat.c (darwin_pthread_kill): New function.
1942 (darwin_resume_thread): Use darwin_pthread_kill.
1943
c530603c
TV
19442018-07-05 Tom de Vries <tdevries@suse.de>
1945
1946 * macroexp.c (macro_buffer) <operator=>: New member function.
1947
a7d0f0f0
TT
19482018-07-04 Tom Tromey <tom@tromey.com>
1949
1950 * darwin-nat.c (darwin_attach_pid): Use exit_inferior.
1951
6242c6a6
SM
19522018-07-04 Simon Marchi <simon.marchi@polymtl.ca>
1953
1954 * common/common-defs.h (HAVE_USEFUL_SBRK): Define.
1955 * main.c: Use HAVE_USEFUL_SBRK instead of HAVE_SBRK.
1956 * maint.c: Likewise.
1957 * top.c: Likewise.
1958
4e5b2f89
JB
19592018-07-04 Joel Brobecker <brobecker@adacore.com>
1960
1961 * NEWS: Create a new section for the next release branch.
1962 Rename the section of the current branch, now that it has
1963 been cut.
1964
538ccc4a
JB
19652018-07-04 Joel Brobecker <brobecker@adacore.com>
1966
1967 GDB 8.2 branch created (1b919490e8ba30bf1d6941df0ed112b0e557017e):
1968 * version.in: Bump version to 8.2.50.DATE-git.
1969
1b919490
VB
19702018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
1971 Pedro Alves <palves@redhat.com>
1972
1973 * linux-nat.c (linux_init_ptrace): Rename to ...
1974 (linux_init_ptrace_procfs): ... this. Call
1975 linux_proc_init_warnings.
1976 (linux_nat_target::post_attach)
1977 (linux_nat_target::post_startup_inferior): Adjust.
1978 * nat/linux-procfs.c (linux_proc_init_warnings): Define function.
1979 * nat/linux-procfs.h (linux_proc_init_warnings): Declare function.
1980
1ea5da02
TV
19812018-07-04 Tom de Vries <tdevries@suse.de>
1982
1983 * dwarf2read.c (error_check_comp_unit_head): Move dwarf version
1984 check ...
1985 (read_comp_unit_head): ... here.
1986
f51e0e20
TT
19872018-07-03 Tom Tromey <tom@tromey.com>
1988
1989 * tracepoint.c (process_tracepoint_on_disconnect, start_tracing)
1990 (stop_tracing, tstatus_command)
1991 (find_matching_tracepoint_location, merge_uploaded_tracepoints)
1992 (print_one_static_tracepoint_marker): Update.
1993 * breakpoint.c (static_tracepoints_here, all_tracepoints): Return
1994 std::vector.
1995 * breakpoint.h (breakpoint_p): Remove typedef. Don't declare
1996 VEC.
1997 (all_tracepoints, static_tracepoints_here): Return std::vector.
1998
d7e15655
TT
19992018-07-03 Tom Tromey <tom@tromey.com>
2000
2001 * common/ptid.c (ptid_equal): Remove.
2002 * common/ptid.h (ptid_equal): Don't declare.
2003 * ada-tasks.c: Update.
2004 * breakpoint.c: Update.
2005 * common/agent.c: Update.
2006 * corelow.c: Update.
2007 * darwin-nat-info.c: Update.
2008 * darwin-nat.c: Update.
2009 * dcache.c: Update.
2010 * dtrace-probe.c: Update.
2011 * dummy-frame.c: Update.
2012 * fbsd-nat.c: Update.
2013 * frame.c: Update.
2014 * gdbthread.h: Update.
2015 * gnu-nat.c: Update.
2016 * go32-nat.c: Update.
2017 * inf-loop.c: Update.
2018 * inf-ptrace.c: Update.
2019 * infcall.c: Update.
2020 * infcmd.c: Update.
2021 * inflow.c: Update.
2022 * infrun.c: Update.
2023 * linux-fork.c: Update.
2024 * linux-nat.c: Update.
2025 * linux-thread-db.c: Update.
2026 * mi/mi-cmd-var.c: Update.
2027 * mi/mi-interp.c: Update.
2028 * mi/mi-main.c: Update.
2029 * nto-procfs.c: Update.
2030 * ppc-linux-tdep.c: Update.
2031 * procfs.c: Update.
2032 * python/py-inferior.c: Update.
2033 * python/py-record-btrace.c: Update.
2034 * python/py-record.c: Update.
2035 * ravenscar-thread.c: Update.
2036 * regcache.c: Update.
2037 * remote-sim.c: Update.
2038 * remote.c: Update.
2039 * sol-thread.c: Update.
2040 * solib.c: Update.
2041 * target.c: Update.
2042 * tui/tui-stack.c: Update.
2043 * varobj.c: Update.
2044 * windows-nat.c: Update.
2045 * windows-tdep.c: Update.
2046
26a57c92
TT
20472018-07-03 Tom Tromey <tom@tromey.com>
2048
2049 * common/ptid.c (ptid_match): Remove.
2050 * common/ptid.h (ptid_match): Don't declare.
2051 * fbsd-nat.c: Update.
2052 * infcmd.c: Update.
2053 * infrun.c: Update.
2054 * linux-nat.c: Update.
2055 * record-btrace.c: Update.
2056 * regcache.c: Update.
2057 * remote.c: Update.
2058
d2a107e3
TT
20592018-07-03 Tom Tromey <tom@tromey.com>
2060
2061 * common/ptid.c (ptid_tid_p): Remove.
2062 * common/ptid.h (ptid_tid_p): Don't declare.
2063 * sol-thread.c: Update.
2064
15a9e13e
TT
20652018-07-03 Tom Tromey <tom@tromey.com>
2066
2067 * common/ptid.c (ptid_lwp_p): Remove.
2068 * common/ptid.h (ptid_lwp_p): Don't declare.
2069 * fbsd-nat.c: Update.
2070 * linux-nat.c: Update.
2071 * nat/linux-procfs.c: Update.
2072 * nat/x86-linux-dregs.c: Update.
2073 * sol-thread.c: Update.
2074
0e998d96
TT
20752018-07-03 Tom Tromey <tom@tromey.com>
2076
2077 * common/ptid.c (ptid_is_pid): Remove.
2078 * common/ptid.h (ptid_is_pid): Don't declare.
2079 * infrun.c: Update.
2080 * linux-nat.c: Update.
2081 * mi/mi-interp.c: Update.
2082 * remote.c: Update.
2083 * thread.c: Update.
2084
cc6bcb54
TT
20852018-07-03 Tom Tromey <tom@tromey.com>
2086
2087 * common/ptid.c (ptid_get_tid): Remove.
2088 * common/ptid.h (ptid_get_tid): Don't declare.
2089 * ada-tasks.c: Update.
2090 * aix-thread.c: Update.
2091 * bsd-uthread.c: Update.
2092 * darwin-nat.c: Update.
2093 * fbsd-nat.c: Update.
2094 * i386-darwin-nat.c: Update.
2095 * infrun.c: Update.
2096 * linux-tdep.c: Update.
2097 * nto-procfs.c: Update.
2098 * ppc-ravenscar-thread.c: Update.
2099 * python/py-infthread.c: Update.
2100 * ravenscar-thread.c: Update.
2101 * sol-thread.c: Update.
2102 * sparc-ravenscar-thread.c: Update.
2103 * windows-nat.c: Update.
2104
e38504b3
TT
21052018-07-03 Tom Tromey <tom@tromey.com>
2106
2107 * common/ptid.c (ptid_get_lwp): Remove.
2108 * common/ptid.h (ptid_get_lwp): Don't declare.
2109 * aarch64-linux-nat.c: Update.
2110 * ada-tasks.c: Update.
2111 * aix-thread.c: Update.
2112 * amd64-linux-nat.c: Update.
2113 * arm-linux-nat.c: Update.
2114 * corelow.c: Update.
2115 * fbsd-nat.c: Update.
2116 * fbsd-tdep.c: Update.
2117 * gnu-nat.c: Update.
2118 * i386-cygwin-tdep.c: Update.
2119 * i386-gnu-nat.c: Update.
2120 * i386-linux-nat.c: Update.
2121 * ia64-linux-nat.c: Update.
2122 * inf-ptrace.c: Update.
2123 * infrun.c: Update.
2124 * linux-fork.c: Update.
2125 * linux-nat.c: Update.
2126 * linux-tdep.c: Update.
2127 * linux-thread-db.c: Update.
2128 * mips-linux-nat.c: Update.
2129 * nat/aarch64-linux-hw-point.c: Update.
2130 * nat/aarch64-linux.c: Update.
2131 * nat/linux-btrace.c: Update.
2132 * nat/linux-osdata.c: Update.
2133 * nat/linux-procfs.c: Update.
2134 * nat/x86-linux-dregs.c: Update.
2135 * obsd-nat.c: Update.
2136 * ppc-fbsd-nat.c: Update.
2137 * ppc-linux-nat.c: Update.
2138 * procfs.c: Update.
2139 * python/py-infthread.c: Update.
2140 * ravenscar-thread.c: Update.
2141 * remote.c: Update.
2142 * s390-linux-nat.c: Update.
2143 * sol-thread.c: Update.
2144 * sol2-tdep.c: Update.
2145 * spu-linux-nat.c: Update.
2146 * x86-linux-nat.c: Update.
2147 * xtensa-linux-nat.c: Update.
2148
e99b03dc
TT
21492018-07-03 Tom Tromey <tom@tromey.com>
2150
2151 * common/ptid.c (ptid_get_pid): Remove.
2152 * common/ptid.h (ptid_get_pid): Don't declare.
2153 * aarch64-linux-nat.c: Update.
2154 * ada-lang.c: Update.
2155 * aix-thread.c: Update.
2156 * alpha-bsd-nat.c: Update.
2157 * amd64-fbsd-nat.c: Update.
2158 * amd64-linux-nat.c: Update.
2159 * arm-linux-nat.c: Update.
2160 * arm-nbsd-nat.c: Update.
2161 * auxv.c: Update.
2162 * break-catch-syscall.c: Update.
2163 * breakpoint.c: Update.
2164 * bsd-uthread.c: Update.
2165 * corelow.c: Update.
2166 * ctf.c: Update.
2167 * darwin-nat.c: Update.
2168 * fbsd-nat.c: Update.
2169 * fbsd-tdep.c: Update.
2170 * gcore.c: Update.
2171 * gnu-nat.c: Update.
2172 * hppa-nbsd-nat.c: Update.
2173 * hppa-obsd-nat.c: Update.
2174 * i386-fbsd-nat.c: Update.
2175 * ia64-linux-nat.c: Update.
2176 * inf-ptrace.c: Update.
2177 * infcmd.c: Update.
2178 * inferior.c: Update.
2179 * inferior.h: Update.
2180 * inflow.c: Update.
2181 * infrun.c: Update.
2182 * linux-fork.c: Update.
2183 * linux-nat.c: Update.
2184 * linux-tdep.c: Update.
2185 * linux-thread-db.c: Update.
2186 * m68k-bsd-nat.c: Update.
2187 * mi/mi-interp.c: Update.
2188 * mi/mi-main.c: Update.
2189 * mips-linux-nat.c: Update.
2190 * mips-nbsd-nat.c: Update.
2191 * mips64-obsd-nat.c: Update.
2192 * nat/aarch64-linux-hw-point.c: Update.
2193 * nat/aarch64-linux.c: Update.
2194 * nat/linux-btrace.c: Update.
2195 * nat/linux-osdata.c: Update.
2196 * nat/linux-procfs.c: Update.
2197 * nat/x86-linux-dregs.c: Update.
2198 * nto-procfs.c: Update.
2199 * obsd-nat.c: Update.
2200 * ppc-linux-nat.c: Update.
2201 * ppc-nbsd-nat.c: Update.
2202 * ppc-obsd-nat.c: Update.
2203 * proc-service.c: Update.
2204 * procfs.c: Update.
2205 * python/py-inferior.c: Update.
2206 * python/py-infthread.c: Update.
2207 * ravenscar-thread.c: Update.
2208 * record.c: Update.
2209 * remote-sim.c: Update.
2210 * remote.c: Update.
2211 * rs6000-nat.c: Update.
2212 * s390-linux-nat.c: Update.
2213 * sh-nbsd-nat.c: Update.
2214 * sol-thread.c: Update.
2215 * sparc-nat.c: Update.
2216 * sparc64-tdep.c: Update.
2217 * spu-linux-nat.c: Update.
2218 * spu-tdep.c: Update.
2219 * target-debug.h: Update.
2220 * target.c: Update.
2221 * thread.c: Update.
2222 * tid-parse.c: Update.
2223 * tracefile-tfile.c: Update.
2224 * vax-bsd-nat.c: Update.
2225 * windows-nat.c: Update.
2226 * x86-linux-nat.c: Update.
2227 * x86-nat.c: Update.
2228
f2907e49
TT
22292018-07-03 Tom Tromey <tom@tromey.com>
2230
2231 * common/ptid.c (pid_to_ptid): Remove.
2232 * common/ptid.h (pid_to_ptid): Don't declare.
2233 * aix-thread.c: Update.
2234 * arm-linux-nat.c: Update.
2235 * common/ptid.c: Update.
2236 * common/ptid.h: Update.
2237 * corelow.c: Update.
2238 * ctf.c: Update.
2239 * darwin-nat.c: Update.
2240 * fbsd-nat.c: Update.
2241 * fork-child.c: Update.
2242 * gnu-nat.c: Update.
2243 * go32-nat.c: Update.
2244 * inf-ptrace.c: Update.
2245 * infcmd.c: Update.
2246 * inferior.c: Update.
2247 * infrun.c: Update.
2248 * linux-fork.c: Update.
2249 * linux-nat.c: Update.
2250 * nat/aarch64-linux-hw-point.c: Update.
2251 * nat/fork-inferior.c: Update.
2252 * nat/x86-linux-dregs.c: Update.
2253 * nto-procfs.c: Update.
2254 * obsd-nat.c: Update.
2255 * procfs.c: Update.
2256 * progspace.c: Update.
2257 * remote.c: Update.
2258 * rs6000-nat.c: Update.
2259 * s390-linux-nat.c: Update.
2260 * sol-thread.c: Update.
2261 * spu-linux-nat.c: Update.
2262 * target.c: Update.
2263 * top.c: Update.
2264 * tracefile-tfile.c: Update.
2265 * windows-nat.c: Update.
2266
fd79271b
TT
22672018-07-03 Tom Tromey <tom@tromey.com>
2268
2269 * common/ptid.h (ptid_build): Don't declare.
2270 * common/ptid.c (ptid_build): Remove.
2271 * aix-thread.c: Update.
2272 * bsd-kvm.c: Update.
2273 * bsd-uthread.c: Update.
2274 * common/agent.c: Update.
2275 * common/ptid.c: Update.
2276 * common/ptid.h: Update.
2277 * corelow.c: Update.
2278 * darwin-nat.c: Update.
2279 * fbsd-nat.c: Update.
2280 * gnu-nat.c: Update.
2281 * linux-fork.c: Update.
2282 * linux-nat.c: Update.
2283 * linux-thread-db.c: Update.
2284 * nat/linux-osdata.c: Update.
2285 * nat/linux-procfs.c: Update.
2286 * nto-procfs.c: Update.
2287 * obsd-nat.c: Update.
2288 * proc-service.c: Update.
2289 * procfs.c: Update.
2290 * ravenscar-thread.c: Update.
2291 * remote-sim.c: Update.
2292 * remote.c: Update.
2293 * sol-thread.c: Update.
2294 * target.c: Update.
2295 * windows-nat.c: Update.
2296
057302ce
TT
22972018-07-03 Tom Tromey <tom@tromey.com>
2298
2299 * infrun.c (follow_exec): Use exit_inferior_silent.
2300 * inferior.c (exit_inferior_num_silent): Remove.
2301 * inferior.h (exit_inferior_num_silent): Don't declare.
2302
a50c11c6
TT
23032018-07-03 Tom Tromey <tom@tromey.com>
2304
2305 PR cli/23340:
2306 * darwin-nat.c (darwin_attach_pid): Reset inferior and
2307 inferior_ptid on error.
2308
471b9d15
MR
23092018-07-02 Maciej W. Rozycki <macro@mips.com>
2310 Simon Marchi <simon.marchi@polymtl.ca>
2311
2312 PR tdep/8282
2313 * disasm.h (gdb_disassembler): Add
2314 `m_disassembler_options_holder'. member
2315 * disasm.c (get_all_disassembler_options): New function.
2316 (gdb_disassembler::gdb_disassembler): Use it.
2317 (gdb_buffered_insn_length_init_dis): Likewise.
2318 (gdb_buffered_insn_length): Adjust accordingly.
2319 (set_disassembler_options): Handle options with arguments.
2320 (show_disassembler_options_sfunc): Likewise. Add a leading new
2321 line if showing options with descriptions.
2322 (disassembler_options_completer): Adapt to using the
2323 `disasm_options_and_args_t' structure.
2324 * mips-tdep.c (mips_disassembler_options): New variable.
2325 (mips_disassembler_options_o32): Likewise.
2326 (mips_disassembler_options_n32): Likewise.
2327 (mips_disassembler_options_n64): Likewise.
2328 (gdb_print_insn_mips): Don't set `disassembler_options'.
2329 (gdb_print_insn_mips_n32, gdb_print_insn_mips_n64): Remove
2330 functions.
2331 (mips_gdbarch_init): Always set `gdbarch_print_insn' to
2332 `gdb_print_insn_mips'. Set `gdbarch_disassembler_options',
2333 `gdbarch_disassembler_options_implicit' and
2334 `gdbarch_valid_disassembler_options'.
2335 * arm-tdep.c (_initialize_arm_tdep): Adapt to using the
2336 `disasm_options_and_args_t' structure.
2337 * gdbarch.sh (disassembler_options_implicit): New `gdbarch'
2338 method.
2339 (valid_disassembler_options): Switch from `disasm_options_t' to
2340 the `disasm_options_and_args_t' structure.
2341 * NEWS: Document `set disassembler-options' support for the MIPS
2342 target.
2343 * gdbarch.h: Regenerate.
2344 * gdbarch.c: Regenerate.
2345
41823f29
SH
23462018-07-02 Sebastian Huber <sebastian.huber@embedded-brains.de>
2347
2348 * riscv-tdep.c (riscv_register_aliases): Swap "fp" and "s0" entries.
2349
41206e32
JB
23502018-06-29 Joel Brobecker <brobecker@adacore.com>
2351
2352 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Add missing
2353 parameter in call to amd64_target_description.
2354 * amd64-dicos-tdep.c (amd64_dicos_init_abi): Likewise.
2355 * amd64-fbsd-tdep.c (amd64fbsd_core_read_description)
2356 (amd64fbsd_init_abi): Likewise.
2357 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Likewise.
2358 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
2359 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
2360 * amd64-fbsd-nat.c (amd64_fbsd_nat_target): Likewise.
2361
de52b960
PA
23622018-06-29 Pedro Alves <palves@redhat.com>
2363
2364 * gdb/amd64-tdep.h (amd64_create_target_description): Add
2365 "segments" parameter.
2366 * gdb/amd64-tdep.c (amd64_none_init_abi, amd64_x32_none_init_abi)
2367 (_initialize_amd64_tdep): Update call to
2368 amd64_create_target_description.
2369 (amd64_target_description): Add "segments" parameter. Adjust
2370 the implementation to use it.
2371 * gdb/amd64-linux-tdep.c (amd64_linux_read_description): Update
2372 call to amd64_create_target_description.
2373 * gdb/amd64-windows-tdep.c (amd64_windows_init_abi): Likewise.
2374 * gdb/arch/amd64.h (amd64_create_target_description): Add
2375 "segments" register.
2376 * gdb/arch/amd64.c (amd64_create_target_description): Add
2377 "segments" parameter. Call create_feature_i386_64bit_segments
2378 only if SEGMENTS is true.
2379 * gdb/gdbserver/win32-i386-low.c (i386_arch_setup): Update
2380 call to amd64_create_target_description.
2381
75acb486
PA
23822018-06-29 Pedro Alves <palves@redhat.com>
2383
2384 * thread.c (thread_target_id_str): New, factored out from ...
2385 (print_thread_info_1): ... here. Use it to compute the max
2386 "Target Id" column width.
2387
c76a8ea3
PA
23882018-06-29 Pedro Alves <palves@redhat.com>
2389
2390 * remote.c (remote_target::extra_thread_info): Delete
2391 'display_buf' and 'n' locals. from the cache, regardless of
2392 packet mechanims is in use. Use cache for qThreadExtra and qP
2393 methods too.
2394
cd2bb709
PA
23952018-06-29 Pedro Alves <palves@redhat.com>
2396
2397 * blockframe.c (find_pc_sect_containing_function): New function.
2398 * breakpoint.c (print_breakpoint_location): Don't call
2399 find_pc_sect_function.
2400 * linespec.c (create_sals_line_offset): Record the location's
2401 symbol in the sal.
2402 * linespec.c (convert_address_location_to_sals): Fill in sal's
2403 symbol with find_pc_sect_containing_function.
2404 * symtab.c (find_function_start_sal): Rename to ...
2405 (find_function_start_sal_1): ... this.
2406 (find_function_start_sal): Reimplement as wrapper around
2407 find_function_start_sal_1, and use
2408 find_pc_sect_containing_function to fill in the sal's symbol.
2409 (find_function_start_sal(symbol*, bool)): Adjust.
2410 * symtab.h (find_pc_function, find_pc_sect_function): Adjust
2411 comments.
2412 (find_pc_sect_containing_function): Declare.
2413
991ff292
PA
24142018-06-29 Pedro Alves <palves@redhat.com>
2415
2416 * inline-frame.c (stopped_by_user_bp_inline_frame): Return
2417 true if the the location has no symbol.
2418
44cee4fd
TT
24192018-06-28 Tom Tromey <tom@tromey.com>
2420
2421 * NEWS: Mention --enable-codesign.
2422 * silent-rules.mk (ECHO_SIGN): New variable.
2423 * configure.ac: Add --enable-codesign.
2424 * configure: Rebuild.
2425 * Makefile.in (CODESIGN, CODESIGN_CERT): New variables.
2426 (gdb$(EXEEXT)): Optionally invoke codesign.
2427
f2ffa92b
PA
24282018-06-28 Pedro Alves <palves@redhat.com>
2429
2430 * gdbthread.h (struct thread_suspend_state) <stop_pc>: Extend
2431 comments.
2432 (switch_to_thread_no_regs): Adjust comment.
2433 * infcmd.c (stop_pc): Delete.
2434 (post_create_inferior, info_program_command): Replace references
2435 to stop_pc with references to thread_info->suspend.stop_pc.
2436 * inferior.h (stop_pc): Delete declaration.
2437 * infrun.c (proceed, handle_syscall_event, fill_in_stop_func)
2438 (handle_inferior_event_1, handle_signal_stop)
2439 (process_event_stop_test, keep_going_stepped_thread)
2440 (handle_step_into_function, handle_step_into_function_backward)
2441 (print_stop_location): Replace references to stop_pc with
2442 references to thread_info->suspend.stop_pc.
2443 (struct infcall_suspend_state) <stop_pc>: Delete field.
2444 (save_infcall_suspend_state, restore_infcall_suspend_state):
2445 Remove references to inf_stat->stop_pc.
2446 * linux-fork.c (fork_load_infrun_state): Likewise.
2447 * record-btrace.c (record_btrace_set_replay): Likewise.
2448 * record-full.c (record_full_goto_entry): Likewise.
2449 * remote.c (print_one_stopped_thread): Likewise.
2450 * target.c (target_resume): Extend comment.
2451 * thread.c (set_executing_thread): New.
2452 (set_executing): Use it.
2453 (switch_to_thread_no_regs, switch_to_no_thread, switch_to_thread):
2454 Remove references to stop_pc.
2455
ecdc3a72
PA
24562018-06-28 Pedro Alves <palves@redhat.com>
2457
2458 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>:
2459 Moving fetching stop_pc until after ecs->event_thread is refreshed.
2460
d95d3aef
TT
24612018-06-28 Tom Tromey <tom@tromey.com>
2462
2463 * coffread.c (coff_symfile_finish): Update.
2464 * xcoffread.c (xcoff_symfile_finish): Update.
2465 * elfread.c (elf_symfile_finish): Update.
2466 * symfile.h (dwarf2_free_objfile): Don't declare.
2467 * dwarf2read.c (_initialize_dwarf2_read): Use
2468 register_objfile_data_with_cleanup.
2469 (dwarf2_free_objfile): Now static. Change signature.
2470
291f9a96
PT
24712018-06-28 Petr Tesarik <ptesarik@suse.cz>
2472
2473 * symfile.c (add_symbol_file_command, _initialize_symfile): Add
2474 option "-o" to add-symbol-file-load to add an offset to each
2475 section's load address.
2476 * symfile.c (set_objfile_default_section_offset): New function.
2477
d81a3eaf
PT
24782018-06-28 Petr Tesarik <ptesarik@suse.cz>
2479
2480 * symfile.c (add_symbol_file_command): Make sure that sections
2481 with the same name are sorted in the same order.
2482
ed6dfe51
PT
24832018-06-28 Petr Tesarik <ptesarik@suse.cz>
2484
2485 * symfile.c (add_symbol_file_command, _initialize_symfile): Do not
2486 require the second argument. If omitted, load sections at the
2487 addresses specified in the file.
2488
d4d429d5
PT
24892018-06-28 Petr Tesarik <ptesarik@suse.cz>
2490
2491 * symfile.c (symbol_file_command, symbol_file_add_main_1)
2492 (_initialize_symfile): Add option "-o" to symbol-file to add an
2493 offset to each section of the symbol file.
2494
39b27ab6
PT
24952018-06-28 Petr Tesarik <ptesarik@suse.cz>
2496
2497 * MAINTAINERS (Write After Approval): Add Petr Tesarik.
2498
41827fc3
TT
24992018-06-27 Tom Tromey <tom@tromey.com>
2500
2501 * stack.c (_initialize_stack): Update "func" help text.
2502
0c6aef22
TT
25032018-06-27 Tom Tromey <tom@tromey.com>
2504
2505 * python/py-unwind.c (unwind_info_object) <saved_regs>: Now a
2506 std::vector.
2507 (unwind_infopy_str, pyuw_create_unwind_info)
2508 (unwind_infopy_add_saved_register, pyuw_sniffer)
2509 (unwind_infopy_dealloc, unwind_infopy_add_saved_register):
2510 Update.
2511 (struct saved_reg): Add constructor.
2512 <value>: Now a gdbpy_ref<>.
2513
63177289
TT
25142018-06-27 Tom Tromey <tom@tromey.com>
2515
2516 * machoread.c (macho_symfile_read): Define "symbol_table" earlier.
2517
e76f78a0
SM
25182018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2519
2520 * gdb-gdb.py.in: Format using autopep8.
2521
9a14af7b
SM
25222018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2523
2524 * gdb-gdb.py.in (CoreAddrPrettyPrinter): New class.
2525 (type_lookup_function): Recognize CORE_ADDR values.
2526
189366cd
SM
25272018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2528
2529 * gdb-gdb.py.in (StructMainTypePrettyPrinter) <to_string>: Don't
2530 print tag_name.
2531
68ad5fb9
SM
25322018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2533
2534 * gdb-gdb.py.in (TypeFlag) <__cmp__>: Remove.
2535 <__lt__>: Add.
2536
141ec9f6
SM
25372018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2538
2539 * gdb-gdb.py: Move to...
2540 * gdb-gdb.py.in: ... here.
2541 * configure.ac (AC_CONFIG_FILES): Add gdb-gdb.py.
2542 * Makefile.in (all): Add gdb-gdb.gdb and gdb-gdb.py as
2543 dependencies.
2544 (distclean): Remove gdb-gdb.py when cleaning.
2545 (gdb-gdb.py, gdb-gdb.gdb): New rules.
2546 * configure: Re-generate.
2547
4c4e7ad4
PA
25482018-06-27 Pedro Alves <palves@redhat.com>
2549
2550 * proc-service.c (get_ps_regcache): New.
2551 (ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2552 (ps_lsetfpregs): Use it.
2553
7ab6656f
OJ
25542018-06-27 Omair Javaid <omair.javaid@linaro.org>
2555
2556 PR gdb/21695
2557 * dwarf2read.c (lnp_state_machine::check_line_address): Update declaration.
2558 (dwarf_decode_lines_1): Adjust.
2559
bd583225
SM
25602018-06-27 Simon Marchi <simon.marchi@ericsson.com>
2561
2562 * fbsd-nat.h (class fbsd_nat_target) <find_memory_regions>: Add
2563 override.
2564 <info_proc>: Likewise.
2565
9a325b7b
JB
25662018-06-26 Joel Brobecker <brobecker@adacore.com>
2567
2568 * windows-nat.c (do_windows_fetch_inferior_registers): Rename
2569 to windows_fetch_one_register, and only handle the case of
2570 fetching one register. Move the code that reloads the context
2571 and iterates over all registers if R is negative to...
2572 (windows_nat_target::fetch_registers): ... here.
2573 (do_windows_store_inferior_registers): Rename to
2574 windows_store_one_register, and only handle the case of storing
2575 one register. Move the code that handles the case where r is
2576 negative to...
2577 (windows_nat_target::store_registers) ... here.
2578
a33ccfc7
TT
25792018-06-26 Tom Tromey <tom@tromey.com>
2580
2581 PR rust/22574:
2582 * typeprint.c (whatis_exp): Allow ptype/o for Rust.
2583 * rust-lang.c (rust_print_struct_def): Add podata parameter.
2584 Update.
2585 (rust_internal_print_type): Add podata parameter.
2586 (rust_print_type): Update.
2587
e0c547d1
TT
25882018-06-26 Tom Tromey <tom@tromey.com>
2589
2590 * typeprint.h (struct print_offset_data) <update, finish,
2591 maybe_print_hole>: New methods.
2592 <indentation>: New constant.
2593 * typeprint.c (print_offset_data::indentation): Define.
2594 (print_offset_data::maybe_print_hole, print_offset_data::update)
2595 (print_offset_data::finish): Move from c-typeprint.c and rename.
2596 * c-typeprint.c (OFFSET_SPC_LEN): Remove.
2597 (print_spaces_filtered_with_print_options): Update.
2598 (c_print_type_union_field_offset, maybe_print_hole)
2599 (c_print_type_struct_field_offset): Move to typeprint.c and
2600 rename.
2601 (c_type_print_base_struct_union): Update.
2602
75cbc781
PA
26032018-06-25 Pedro Alves <palves@redhat.com>
2604
2605 * gdbthread.h (thread_info_ref, delete_thread)
2606 (delete_thread_silent, first_thread_of_inferior)
2607 (any_thread_of_inferior, switch_to_thread)
2608 (enable_thread_stack_temporaries)
2609 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2610 (get_last_thread_stack_temporary)
2611 (value_in_thread_stack_temporaries, can_access_registers_thread):
2612 Spell out "struct thread_info" instead of just "thread_info".
2613 * inferior.h (notice_new_inferior): Likewise.
2614
b7a08269
PA
26152018-06-25 Pedro Alves <palves@redhat.com>
2616
2617 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2618 pass thread_info pointer to delete_thread.
2619 (windows_nat_target::detach): Pass inferior pointer to
2620 detach_inferior.
2621 * aix-thread.c (sync_threadlists): Pass thread_info pointer to
2622 delete_thread.
2623 * bsd-kvm.c (bsd_kvm_target::close): Use discard_all_inferiors.
2624 * darwin-nat.c (darwin_check_new_threads): Use find_thread_ptid
2625 and pass a thread_info pointer to delete_thread.
2626 * fbsd-nat.c (fbsd_nat_target::wait): Use find_thread_ptid and
2627 pass thread_info pointer to delete_thread.
2628 * go32-nat.c (go32_nat_target::mourn_inferior): Remove
2629 delete_thread_silent call.
2630 * procfs.c (procfs_target::detach): Pass inferior pointer to
2631 detach_inferior.
2632 (procfs_target::wait): Pass thread_info pointer to delete_thread.
2633 * remote-sim.c (gdbsim_target::mourn_inferior): Remove
2634 delete_thread_silent call.
2635 * windows-nat.c (windows_delete_thread): Use find_thread_ptid and
2636 pass thread_info pointer to delete_thread.
2637 (windows_nat_target::detach): Pass inferior pointer to
2638 delete_inferior.
2639
8e7767e3
AH
26402018-06-22 Alan Hayward <alan.hayward@arm.com>
2641
2642 * regcache.c (readable_regcache::read_part): Fix asserts.
2643 (reg_buffer::raw_collect_part): New function.
2644 (regcache::write_part): Fix asserts.
2645 (reg_buffer::raw_supply_part): New function.
2646 (regcache::transfer_regset_register): New helper function.
2647 (regcache::transfer_regset): Call new functions.
2648 (regcache_supply_regset): Use gdb_byte*.
2649 (regcache::supply_regset): Likewise.
2650 (regcache_collect_regset): Likewise.
2651 (regcache::collect_regset): Likewise.
2652 * regcache.h (reg_buffer::raw_collect_part): New declaration.
2653 (reg_buffer::raw_supply_part): Likewise.
2654 (regcache::transfer_regset_register): Likewise.
2655 (regcache::transfer_regset): Use gdb_byte*.
2656
bfd60e34
AH
26572018-06-22 Alan Hayward <alan.hayward@arm.com>
2658
2659 * nat/aarch64-sve-linux-ptrace.h (HAS_SVE_STATE): Use &.
2660
00431a78
PA
26612018-06-21 Pedro Alves <palves@redhat.com>
2662
2663 * ada-lang.h (ada_get_task_number): Take a thread_info pointer
2664 instead of a ptid_t. All callers adjusted.
2665 * ada-tasks.c (ada_get_task_number): Likewise. All callers
2666 adjusted.
2667 (print_ada_task_info, display_current_task_id, task_command_1):
2668 Adjust.
2669 * breakpoint.c (watchpoint_in_thread_scope): Adjust to use
2670 inferior_thread.
2671 (breakpoint_kind): Adjust.
2672 (remove_breakpoints_pid): Rename to ...
2673 (remove_breakpoints_inf): ... this. Adjust to take an inferior
2674 pointer. All callers adjusted.
2675 (bpstat_clear_actions): Use inferior_thread.
2676 (get_bpstat_thread): New.
2677 (bpstat_do_actions): Use it.
2678 (bpstat_check_breakpoint_conditions, bpstat_stop_status): Adjust
2679 to take a thread_info pointer. All callers adjusted.
2680 (set_longjmp_breakpoint_for_call_dummy, set_momentary_breakpoint)
2681 (breakpoint_re_set_thread): Use inferior_thread.
2682 * breakpoint.h (struct inferior): Forward declare.
2683 (bpstat_stop_status): Update.
2684 (remove_breakpoints_pid): Delete.
2685 (remove_breakpoints_inf): New.
2686 * bsd-uthread.c (bsd_uthread_target::wait)
2687 (bsd_uthread_target::update_thread_list): Use find_thread_ptid.
2688 * btrace.c (btrace_add_pc, btrace_enable, btrace_fetch)
2689 (maint_btrace_packet_history_cmd)
2690 (maint_btrace_clear_packet_history_cmd): Adjust.
2691 (maint_btrace_clear_cmd, maint_info_btrace_cmd): Adjust to use
2692 inferior_thread.
2693 * cli/cli-interp.c: Include "inferior.h".
2694 * common/refcounted-object.h (struct
2695 refcounted_object_ref_policy): New.
2696 * compile/compile-object-load.c: Include gdbthread.h.
2697 (store_regs): Use inferior_thread.
2698 * corelow.c (core_target::close): Use current_inferior.
2699 (core_target_open): Adjust to use first_thread_of_inferior and use
2700 the current inferior.
2701 * ctf.c (ctf_target::close): Adjust to use current_inferior.
2702 * dummy-frame.c (dummy_frame_id) <ptid>: Delete, replaced by ...
2703 <thread>: ... this new field. All references adjusted.
2704 (dummy_frame_pop, dummy_frame_discard, register_dummy_frame_dtor):
2705 Take a thread_info pointer instead of a ptid_t.
2706 * dummy-frame.h (dummy_frame_push, dummy_frame_pop)
2707 (dummy_frame_discard, register_dummy_frame_dtor): Take a
2708 thread_info pointer instead of a ptid_t.
2709 * elfread.c: Include "inferior.h".
2710 (elf_gnu_ifunc_resolver_stop, elf_gnu_ifunc_resolver_return_stop):
2711 Use inferior_thread.
2712 * eval.c (evaluate_subexp): Likewise.
2713 * frame.c (frame_pop, has_stack_frames, find_frame_sal): Use
2714 inferior_thread.
2715 * gdb_proc_service.h (struct thread_info): Forward declare.
2716 (struct ps_prochandle) <ptid>: Delete, replaced by ...
2717 <thread>: ... this new field. All references adjusted.
2718 * gdbarch.h, gdbarch.c: Regenerate.
2719 * gdbarch.sh (get_syscall_number): Replace 'ptid' parameter with a
2720 'thread' parameter. All implementations and callers adjusted.
2721 * gdbthread.h (thread_info) <set_running>: New method.
2722 (delete_thread, delete_thread_silent): Take a thread_info pointer
2723 instead of a ptid.
2724 (global_thread_id_to_ptid, ptid_to_global_thread_id): Delete.
2725 (first_thread_of_process): Delete, replaced by ...
2726 (first_thread_of_inferior): ... this new function. All callers
2727 adjusted.
2728 (any_live_thread_of_process): Delete, replaced by ...
2729 (any_live_thread_of_inferior): ... this new function. All callers
2730 adjusted.
2731 (switch_to_thread, switch_to_no_thread): Declare.
2732 (is_executing): Delete.
2733 (enable_thread_stack_temporaries): Update comment.
2734 <enable_thread_stack_temporaries>: Take a thread_info pointer
2735 instead of a ptid_t. Incref the thread.
2736 <~enable_thread_stack_temporaries>: Decref the thread.
2737 <m_ptid>: Delete
2738 <m_thr>: New.
2739 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2740 (get_last_thread_stack_temporary)
2741 (value_in_thread_stack_temporaries, can_access_registers_thread):
2742 Take a thread_info pointer instead of a ptid_t. All callers
2743 adjusted.
2744 * infcall.c (get_call_return_value): Use inferior_thread.
2745 (run_inferior_call): Work with thread pointers instead of ptid_t.
2746 (call_function_by_hand_dummy): Work with thread pointers instead
2747 of ptid_t. Use thread_info_ref.
2748 * infcmd.c (proceed_thread_callback): Access thread's state
2749 directly.
2750 (ensure_valid_thread, ensure_not_running): Use inferior_thread,
2751 access thread's state directly.
2752 (continue_command): Use inferior_thread.
2753 (info_program_command): Use find_thread_ptid and access thread
2754 state directly.
2755 (proceed_after_attach_callback): Use thread state directly.
2756 (notice_new_inferior): Take a thread_info pointer instead of a
2757 ptid_t. All callers adjusted.
2758 (exit_inferior): Take an inferior pointer instead of a pid. All
2759 callers adjusted.
2760 (exit_inferior_silent): New.
2761 (detach_inferior): Delete.
2762 (valid_gdb_inferior_id, pid_to_gdb_inferior_id)
2763 (gdb_inferior_id_to_pid, in_inferior_list): Delete.
2764 (detach_inferior_command, kill_inferior_command): Use
2765 find_inferior_id instead of valid_gdb_inferior_id and
2766 gdb_inferior_id_to_pid.
2767 (inferior_command): Use inferior and thread pointers.
2768 * inferior.h (struct thread_info): Forward declare.
2769 (notice_new_inferior): Take a thread_info pointer instead of a
2770 ptid_t. All callers adjusted.
2771 (detach_inferior): Delete declaration.
2772 (exit_inferior, exit_inferior_silent): Take an inferior pointer
2773 instead of a pid. All callers adjusted.
2774 (gdb_inferior_id_to_pid, pid_to_gdb_inferior_id, in_inferior_list)
2775 (valid_gdb_inferior_id): Delete.
2776 * infrun.c (follow_fork_inferior, proceed_after_vfork_done)
2777 (handle_vfork_child_exec_or_exit, follow_exec): Adjust.
2778 (struct displaced_step_inferior_state) <pid>: Delete, replaced by
2779 ...
2780 <inf>: ... this new field.
2781 <step_ptid>: Delete, replaced by ...
2782 <step_thread>: ... this new field.
2783 (get_displaced_stepping_state): Take an inferior pointer instead
2784 of a pid. All callers adjusted.
2785 (displaced_step_in_progress_any_inferior): Adjust.
2786 (displaced_step_in_progress_thread): Take a thread pointer instead
2787 of a ptid_t. All callers adjusted.
2788 (displaced_step_in_progress, add_displaced_stepping_state): Take
2789 an inferior pointer instead of a pid. All callers adjusted.
2790 (get_displaced_step_closure_by_addr): Adjust.
2791 (remove_displaced_stepping_state): Take an inferior pointer
2792 instead of a pid. All callers adjusted.
2793 (displaced_step_prepare_throw, displaced_step_prepare)
2794 (displaced_step_fixup): Take a thread pointer instead of a ptid_t.
2795 All callers adjusted.
2796 (start_step_over): Adjust.
2797 (infrun_thread_ptid_changed): Remove bit updating ptids in the
2798 displaced step queue.
2799 (do_target_resume): Adjust.
2800 (fetch_inferior_event): Use inferior_thread.
2801 (context_switch, get_inferior_stop_soon): Take an
2802 execution_control_state pointer instead of a ptid_t. All callers
2803 adjusted.
2804 (switch_to_thread_cleanup): Delete.
2805 (stop_all_threads): Use scoped_restore_current_thread.
2806 * inline-frame.c: Include "gdbthread.h".
2807 (inline_state) <inline_state>: Take a thread pointer instead of a
2808 ptid_t. All callers adjusted.
2809 <ptid>: Delete, replaced by ...
2810 <thread>: ... this new field.
2811 (find_inline_frame_state): Take a thread pointer instead of a
2812 ptid_t. All callers adjusted.
2813 (skip_inline_frames, step_into_inline_frame)
2814 (inline_skipped_frames, inline_skipped_symbol): Take a thread
2815 pointer instead of a ptid_t. All callers adjusted.
2816 * inline-frame.h (skip_inline_frames, step_into_inline_frame)
2817 (inline_skipped_frames, inline_skipped_symbol): Likewise.
2818 * linux-fork.c (delete_checkpoint_command): Adjust to use thread
2819 pointers directly.
2820 * linux-nat.c (get_detach_signal): Likewise.
2821 * linux-thread-db.c (thread_from_lwp): New 'stopped' parameter.
2822 (thread_db_notice_clone): Adjust.
2823 (thread_db_find_new_threads_silently)
2824 (thread_db_find_new_threads_2, thread_db_find_new_threads_1): Take
2825 a thread pointer instead of a ptid_t. All callers adjusted.
2826 * mi/mi-cmd-var.c: Include "inferior.h".
2827 (mi_cmd_var_update_iter): Update to use thread pointers.
2828 * mi/mi-interp.c (mi_new_thread): Update to use the thread's
2829 inferior directly.
2830 (mi_output_running_pid, mi_inferior_count): Delete, bits factored
2831 out to ...
2832 (mi_output_running): ... this new function.
2833 (mi_on_resume_1): Adjust to use it.
2834 (mi_user_selected_context_changed): Adjust to use inferior_thread.
2835 * mi/mi-main.c (proceed_thread): Adjust to use thread pointers
2836 directly.
2837 (interrupt_thread_callback): : Adjust to use thread and inferior
2838 pointers.
2839 * proc-service.c: Include "gdbthread.h".
2840 (ps_pglobal_lookup): Adjust to use the thread's inferior directly.
2841 * progspace-and-thread.c: Include "inferior.h".
2842 * progspace.c: Include "inferior.h".
2843 * python/py-exitedevent.c (create_exited_event_object): Adjust to
2844 hold a reference to an inferior_object.
2845 * python/py-finishbreakpoint.c (bpfinishpy_init): Adjust to use
2846 inferior_thread.
2847 * python/py-inferior.c (struct inferior_object): Give the type a
2848 tag name instead of a typedef.
2849 (python_on_normal_stop): No need to check if the current thread is
2850 listed.
2851 (inferior_to_inferior_object): Change return type to
2852 inferior_object. All callers adjusted.
2853 (find_thread_object): Delete, bits factored out to ...
2854 (thread_to_thread_object): ... this new function.
2855 * python/py-infthread.c (create_thread_object): Use
2856 inferior_to_inferior_object.
2857 (thpy_is_stopped): Use thread pointer directly.
2858 (gdbpy_selected_thread): Use inferior_thread.
2859 * python/py-record-btrace.c (btpy_list_object) <ptid>: Delete
2860 field, replaced with ...
2861 <thread>: ... this new field. All users adjusted.
2862 (btpy_insn_or_gap_new): Drop const.
2863 (btpy_list_new): Take a thread pointer instead of a ptid_t. All
2864 callers adjusted.
2865 * python/py-record.c: Include "gdbthread.h".
2866 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2867 a ptid_t. All callers adjusted.
2868 (gdbpy_current_recording): Use inferior_thread.
2869 * python/py-record.h (recpy_record_object) <ptid>: Delete
2870 field, replaced with ...
2871 <thread>: ... this new field. All users adjusted.
2872 (recpy_element_object) <ptid>: Delete
2873 field, replaced with ...
2874 <thread>: ... this new field. All users adjusted.
2875 (recpy_insn_new, recpy_func_new): Take a thread pointer instead of
2876 a ptid_t. All callers adjusted.
2877 * python/py-threadevent.c: Include "gdbthread.h".
2878 (get_event_thread): Use thread_to_thread_object.
2879 * python/python-internal.h (struct inferior_object): Forward
2880 declare.
2881 (find_thread_object, find_inferior_object): Delete declarations.
2882 (thread_to_thread_object, inferior_to_inferior_object): New
2883 declarations.
2884 * record-btrace.c: Include "inferior.h".
2885 (require_btrace_thread): Use inferior_thread.
2886 (record_btrace_frame_sniffer)
2887 (record_btrace_tailcall_frame_sniffer): Use inferior_thread.
2888 (get_thread_current_frame): Use scoped_restore_current_thread and
2889 switch_to_thread.
2890 (get_thread_current_frame): Use thread pointer directly.
2891 (record_btrace_replay_at_breakpoint): Use thread's inferior
2892 pointer directly.
2893 * record-full.c: Include "inferior.h".
2894 * regcache.c: Include "gdbthread.h".
2895 (get_thread_arch_regcache): Use the inferior's address space
2896 directly.
2897 (get_thread_regcache, registers_changed_thread): New.
2898 * regcache.h (get_thread_regcache(thread_info *thread)): New
2899 overload.
2900 (registers_changed_thread): New.
2901 (remote_target) <remote_detach_1>: Swap order of parameters.
2902 (remote_add_thread): <remote_add_thread>: Return the new thread.
2903 (get_remote_thread_info(ptid_t)): New overload.
2904 (remote_target::remote_notice_new_inferior): Use thread pointers
2905 directly.
2906 (remote_target::process_initial_stop_replies): Use
2907 thread_info::set_running.
2908 (remote_target::remote_detach_1, remote_target::detach)
2909 (extended_remote_target::detach): Adjust.
2910 * stack.c (frame_show_address): Use inferior_thread.
2911 * target-debug.h (target_debug_print_thread_info_pp): New.
2912 * target-delegates.c: Regenerate.
2913 * target.c (default_thread_address_space): Delete.
2914 (memory_xfer_partial_1): Use current_inferior.
2915 (target_detach): Use current_inferior.
2916 (target_thread_address_space): Delete.
2917 (generic_mourn_inferior): Use current_inferior.
2918 * target.h (struct target_ops) <thread_address_space>: Delete.
2919 (target_thread_address_space): Delete.
2920 * thread.c (init_thread_list): Use ALL_THREADS_SAFE. Use thread
2921 pointers directly.
2922 (delete_thread_1, delete_thread, delete_thread_silent): Take a
2923 thread pointer instead of a ptid_t. Adjust all callers.
2924 (ptid_to_global_thread_id, global_thread_id_to_ptid): Delete.
2925 (first_thread_of_process): Delete, replaced by ...
2926 (first_thread_of_inferior): ... this new function. All callers
2927 adjusted.
2928 (any_thread_of_process): Rename to ...
2929 (any_thread_of_inferior): ... this, and take an inferior pointer.
2930 (any_live_thread_of_process): Rename to ...
2931 (any_live_thread_of_inferior): ... this, and take an inferior
2932 pointer.
2933 (thread_stack_temporaries_enabled_p, push_thread_stack_temporary)
2934 (value_in_thread_stack_temporaries)
2935 (get_last_thread_stack_temporary): Take a thread pointer instead
2936 of a ptid_t. Adjust all callers.
2937 (thread_info::set_running): New.
2938 (validate_registers_access): Use inferior_thread.
2939 (can_access_registers_ptid): Rename to ...
2940 (can_access_registers_thread): ... this, and take a thread
2941 pointer.
2942 (print_thread_info_1): Adjust to compare thread pointers instead
2943 of ptids.
2944 (switch_to_no_thread, switch_to_thread): Make extern.
2945 (scoped_restore_current_thread::~scoped_restore_current_thread):
2946 Use m_thread pointer directly.
2947 (scoped_restore_current_thread::scoped_restore_current_thread):
2948 Use inferior_thread.
2949 (thread_command): Use thread pointer directly.
2950 (thread_num_make_value_helper): Use inferior_thread.
2951 * top.c (execute_command): Use inferior_thread.
2952 * tui/tui-interp.c: Include "inferior.h".
2953 * varobj.c (varobj_create): Use inferior_thread.
2954 (value_of_root_1): Use find_thread_global_id instead of
2955 global_thread_id_to_ptid.
2956
33bab475
AH
29572018-06-21 Alan Hayward <alan.hayward@arm.com>
2958
2959 * regcache.c (readable_regcache::read_part): Avoid memcpy when
2960 possible.
2961 (regcache::write_part): Likewise.
2962 (readable_regcache::cooked_read_part): Update comment.
2963 (readable_regcache::cooked_write_part): Likewise.
2964 * regcache.h: (readable_regcache::read_part): Likewise.
2965 (regcache::write_part): Likewise.
2966
8363f9d5
RB
29672018-06-21 Richard Bunt <richard.bunt@arm.com>
2968 Dirk Schubert <dirk.schubert@arm.com>
2969
2970 * aarch64-linux-nat.c (post_attach): New.
2971 (aarch64_linux_nat_target::post_attach): Override post_attach to
2972 record the number of hardware debug registers.
2973
0d0b0ea2
TT
29742018-06-20 Tom Tromey <tom@tromey.com>
2975
2976 * python/py-param.c (add_setshow_generic): Make parameters const.
2977 (parmpy_init): Update.
2978
302abd6e
SM
29792018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2980
2981 * regcache.h (regcache_cooked_read_ftype): Rename to...
2982 (register_read_ftype): ...this, change type to function_view.
2983 (class reg_buffer) <save>: Remove src parameter.
2984 (readonly_detached_regcache) <readonly_detached_regcache>: Make
2985 parameter non-const in first overload. Remove src parameter in
2986 second overload.
2987 * regcache.c (do_cooked_read): Remove.
2988 (readonly_detached_regcache::readonly_detached_regcache): Make
2989 parameter non-const, adjust call to other constructor.
2990 (reg_buffer::save): Remove src parameter.
2991 * frame.c (do_frame_register_read): Remove.
2992 (frame_save_as_regcache): Use lambda function.
2993 * ppc-linux-tdep.c (ppu2spu_unwind_register): Change type of src
2994 parameter to ppu2spu_data *.
2995 (ppu2spu_sniffer): Use lambda function.
2996
19f3f25f
SM
29972018-06-20 Simon Marchi <simon.marchi@polymtl.ca>
2998
2999 * record-full.c (record_full_target::insert_breakpoint): Remove
3000 "struct" keyword, add const.
3001
d0ac1c44
SM
30022018-06-19 Simon Marchi <simon.marchi@ericsson.com>
3003
3004 * common/common-defs.h (PACKAGE_NAME, PACKAGE_VERSION,
3005 PACKAGE_STRING, PACKAGE_TARNAME): Undefine.
3006 * configure.ac: Remove AC_PREREQ, add missing quoting.
3007 * gnulib/configure.ac: Modernize usage of
3008 AC_INIT/AM_INIT_AUTOMAKE. Remove AC_PREREQ.
3009 * gnulib/update-gnulib.sh (AUTOCONF_VERSION): Bump to 2.69.
3010 (AUTOMAKE_VERSION): Bump to 1.15.1.
3011 * configure: Re-generate.
3012 * config.in: Re-generate.
3013 * aclocal.m4: Re-generate.
3014 * gnulib/aclocal.m4: Re-generate.
3015 * gnulib/config.in: Re-generate.
3016 * gnulib/configure: Re-generate.
3017 * gnulib/import/Makefile.in: Re-generate.
3018
6ae50267
PA
30192018-06-19 Pedro Alves <palves@redhat.com>
3020
3021 * minsyms.c (msym_prefer_to_msym_type): New, factored out from ...
3022 (lookup_minimal_symbol_by_pc_section): ... here with
3023 gdb_assert_not_reached added.
3024
61b04dd0
PA
30252018-06-19 Pedro Alves <palves@redhat.com>
3026
3027 * inline-frame.c (stopped_by_user_bp_inline_frame): Replace PC
3028 parameter with a block parameter. Compare location's block symbol
3029 with the frame's block instead of addresses.
3030 (skip_inline_frames): Pass the current block instead of the
3031 frame's address. Break out as soon as we determine the frame
3032 should not be skipped.
3033
f709fabb
TT
30342018-06-18 Tom Tromey <tom@tromey.com>
3035
3036 * solib-aix.c (solib_aix_get_section_offsets): Return
3037 unique_xmalloc_ptr.
3038 (solib_aix_solib_create_inferior_hook): Update.
3039
668eb2f0
TT
30402018-06-18 Tom Tromey <tom@tromey.com>
3041
3042 * solib-darwin.c (darwin_current_sos): Use unique_xmalloc_ptr.
3043
309822ca
TT
30442018-06-18 Tom Tromey <tom@tromey.com>
3045
3046 * solib-frv.c (frv_relocate_main_executable): Use
3047 unique_xmalloc_ptr.
3048 * solib-dsbt.c (dsbt_relocate_main_executable): Use
3049 unique_xmalloc_ptr.
3050
06424eac
TT
30512018-06-18 Tom Tromey <tom@tromey.com>
3052
3053 * objfiles.h (inhibit_section_map_updates): Update.
3054 (resume_section_map_updates, resume_section_map_updates_cleanup):
3055 Remove.
3056 * solib-svr4.c (svr4_handle_solib_event): Update.
3057 * objfiles.c (inhibit_section_map_updates): Return
3058 scoped_restore_tmpl<int>.
3059 (resume_section_map_updates, resume_section_map_updates_cleanup):
3060 Remove.
3061
b4be9fad
TT
30622018-06-18 Tom Tromey <tom@tromey.com>
3063
3064 * valprint.h (read_string): Update.
3065 * valprint.c (read_string): Change type of "buffer".
3066 (val_print_string): Update.
3067 * python/py-value.c (valpy_string): Update.
3068 * language.h (struct language_defn) <la_get_string>: Change
3069 type of "buffer".
3070 (default_get_string, c_get_string): Update.
3071 * language.c (default_get_string): Change type of "buffer".
3072 * guile/scm-value.c (gdbscm_value_to_string): Update.
3073 * c-lang.c (c_get_string): Change type of "buffer".
3074
3f0dbd67
TT
30752018-06-18 Tom Tromey <tom@tromey.com>
3076
3077 * ser-mingw.c (struct pipe_state_destroyer): New.
3078 (pipe_state_up): New typedef.
3079 (cleanup_pipe_state): Remove.
3080 (pipe_windows_open): Use pipe_state_up. Don't release argv.
3081
69d340c6
TT
30822018-06-18 Tom Tromey <tom@tromey.com>
3083
3084 * rust-lang.h (rust_yyerror): Don't declare.
3085 * rust-lang.c (rust_language_defn): Update.
3086 * rust-exp.y (yyerror): Now static.
3087 * parse.c (parse_exp_in_context_1): Update.
3088 * p-lang.h (p_yyerror): Don't declare.
3089 * p-lang.c (p_language_defn): Update.
3090 * p-exp.y (yyerror): Now static.
3091 * opencl-lang.c (opencl_language_defn): Update.
3092 * objc-lang.c (objc_language_defn): Update.
3093 * m2-lang.h (m2_yyerror): Don't declare.
3094 * m2-lang.c (m2_language_defn): Update.
3095 * m2-exp.y (yyerror): Now static.
3096 * language.h (struct language_defn) <la_error>: Remove.
3097 * language.c (unk_lang_error): Remove.
3098 (unknown_language_defn, auto_language_defn): Remove.
3099 * go-lang.h (go_yyerror): Don't declare.
3100 * go-lang.c (go_language_defn): Update.
3101 * go-exp.y (yyerror): Now static.
3102 * f-lang.h (f_yyerror): Don't declare.
3103 * f-lang.c (f_language_defn): Update.
3104 * f-exp.y (yyerror): Now static.
3105 * d-lang.h (d_yyerror): Don't declare.
3106 * d-lang.c (d_language_defn): Update.
3107 * d-exp.y (yyerror): Now static.
3108 * c-lang.h (c_yyerror): Don't declare.
3109 * c-lang.c (c_language_defn, cplus_language_defn)
3110 (asm_language_defn, minimal_language_defn): Update.
3111 * c-exp.y (yyerror): Now static.
3112 * ada-lang.h (ada_yyerror): Don't declare.
3113 * ada-lang.c (ada_language_defn): Update.
3114 * ada-exp.y (yyerror): Now static.
3115
e9902bfc
AH
31162018-06-18 Alan Hayward <alan.hayward@arm.com>
3117
3118 * aarch64-linux-nat.c (fetch_sveregs_from_thread): New function.
3119 (store_sveregs_to_thread): Likewise.
3120 (aarch64_linux_fetch_inferior_registers): Check for SVE.
3121 (aarch64_linux_store_inferior_registers): Likewise.
3122 * nat/aarch64-sve-linux-ptrace.c (aarch64_sve_get_sveregs): New
3123 function.
3124 (aarch64_sve_regs_copy_to_regcache): Likewise.
3125 (aarch64_sve_regs_copy_from_regcache): Likewise.
3126 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_sveregs): New
3127 declaration.
3128 (aarch64_sve_regs_copy_to_regcache): Likewise.
3129 (aarch64_sve_regs_copy_from_regcache): Likewise.
3130 (sve_context): Structure from Linux headers.
3131 (SVE_SIG_ZREGS_SIZE): Define from Linux headers.
3132 (SVE_SIG_ZREG_SIZE): Likewise.
3133 (SVE_SIG_PREG_SIZE): Likewise.
3134 (SVE_SIG_FFR_SIZE): Likewise.
3135 (SVE_SIG_REGS_OFFSET): Likewise.
3136 (SVE_SIG_ZREGS_OFFSET): Likewise.
3137 (SVE_SIG_ZREG_OFFSET): Likewise.
3138 (SVE_SIG_ZREGS_SIZE): Likewise.
3139 (SVE_SIG_PREGS_OFFSET): Likewise.
3140 (SVE_SIG_PREG_OFFSET): Likewise.
3141 (SVE_SIG_PREGS_SIZE): Likewise.
3142 (SVE_SIG_FFR_OFFSET): Likewise.
3143 (SVE_SIG_REGS_SIZE): Likewise.
3144 (SVE_SIG_CONTEXT_SIZE): Likewise.
3145 (SVE_PT_REGS_MASK): Likewise.
3146 (SVE_PT_REGS_FPSIMD): Likewise.
3147 (SVE_PT_REGS_SVE): Likewise.
3148 (SVE_PT_VL_INHERIT): Likewise.
3149 (SVE_PT_VL_ONEXEC): Likewise.
3150 (SVE_PT_REGS_OFFSET): Likewise.
3151 (SVE_PT_FPSIMD_OFFSET): Likewise.
3152 (SVE_PT_FPSIMD_SIZE): Likewise.
3153 (SVE_PT_SVE_ZREG_SIZE): Likewise.
3154 (SVE_PT_SVE_PREG_SIZE): Likewise.
3155 (SVE_PT_SVE_FFR_SIZE): Likewise.
3156 (SVE_PT_SVE_FPSR_SIZE): Likewise.
3157 (SVE_PT_SVE_FPCR_SIZE): Likewise.
3158 (__SVE_SIG_TO_PT): Likewise.
3159 (SVE_PT_SVE_OFFSET): Likewise.
3160 (SVE_PT_SVE_ZREGS_OFFSET): Likewise.
3161 (SVE_PT_SVE_ZREG_OFFSET): Likewise.
3162 (SVE_PT_SVE_ZREGS_SIZE): Likewise.
3163 (SVE_PT_SVE_PREGS_OFFSET): Likewise.
3164 (SVE_PT_SVE_PREG_OFFSET): Likewise.
3165 (SVE_PT_SVE_PREGS_SIZE): Likewise.
3166 (SVE_PT_SVE_FFR_OFFSET): Likewise.
3167 (SVE_PT_SVE_FPSR_OFFSET): Likewise.
3168 (SVE_PT_SVE_FPCR_OFFSET): Likewise.
3169 (SVE_PT_SVE_SIZE): Likewise.
3170 (SVE_PT_SIZE): Likewise.
3171 (HAS_SVE_STATE): New define.
3172
17a1cc89
AH
31732018-06-18 Alan Hayward <alan.hayward@arm.com>
3174
3175 * nat/aarch64-sve-linux-sigcontext.h: New file.
3176 * nat/aarch64-sve-linux-ptrace.h (SVE_VQ_BYTES): Move to
3177 new files.
3178 (SVE_VQ_MIN): Likewise.
3179 (SVE_VQ_MAX): Likewise.
3180 (SVE_VL_MIN): Likewise.
3181 (SVE_VL_MAX): Likewise.
3182 (SVE_NUM_ZREGS): Likewise.
3183 (SVE_NUM_PREGS): Likewise.
3184 (sve_vl_valid): Likewise.
3185 (struct user_sve_header): Likewise.
3186
7010835a
AB
31872018-06-16 Andrew Burgess <andrew.burgess@embecosm.com>
3188 Richard Bunt <Richard.Bunt@arm.com>
3189
3190 * linux-nat.c (stop_wait_callback): Don't discard SIGSTOP if it
3191 was requested by GDB.
3192
479b3ef4
TV
31932018-06-15 Tom de Vries <tdevries@suse.de>
3194
3195 * MAINTAINERS (Write After Approval): Add Tom de Vries.
3196
8199b8f4
SM
31972018-06-14 Simon Marchi <simon.marchi@polymtl.ca>
3198
3199 * gnulib/update-gnulib.sh: Print expected versions of
3200 autoconf/aclocal.
3201
55c748a1
SM
32022018-06-14 Simon Marchi <simon.marchi@ericsson.com>
3203
3204 * arch-utils.c (default_type_align): Use type_length_units.
3205 * gdbtypes.c (type_align): Use type_length_units.
3206
87a8eca7
PW
32072018-06-14 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3208
3209 * cli/cli-script.c (_initialize_cli_script): Fix online documentation
3210 of 'define' command.
3211
5d9a0608
TV
32122018-06-14 Tom de Vries <tdevries@suse.de>
3213
3214 PR cli/22573
3215 * infcmd.c (print_return_value_1): Use get_user_print_options instead of
3216 get_no_prettyformat_print_options.
3217
ab89b5a5
SM
32182018-06-13 Simon Marchi <simon.marchi@ericsson.com>
3219
3220 * sparc-nat.h: Include target.h.
3221 * sparc64-linux-nat.c (class sparc64_linux_nat_target)
3222 <fetch_registers>: Remove this argument in function call.
3223 <store_registers>: Remove this argument in function call, remove
3224 extra semicolon.
3225 <low_forget_process>: Call sparc64_forget_process instead of
3226 sparc_forget_process.
3227
62c808ae
RO
32282018-06-13 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3229
3230 * procfs.c (_initialize_procfs): Use add_inf_child_target.
3231 (procfs_target::make_corefile_notes): Adjust to new
3232 target_read_alloc return type.
3233
1840d81a
AB
32342018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3235 Stephen Roberts <stephen.roberts@arm.com>
3236
3237 PR gdb/22882
3238 * infrun.c (fetch_inferior_event): If GDB is not proceeding then
3239 run INF_EXEC_COMPLETE handler, even when not calling normal_stop.
3240 Move should_notify_stop local into more inner scope.
3241
9516f85a
AB
32422018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3243 Stephen Roberts <stephen.roberts@arm.com>
3244
3245 PR gdb/22882
3246 * infrun.c (resume_1): Add call to mark_async_event_handler.
3247
defd2172
AB
32482018-06-12 Andrew Burgess <andrew.burgess@embecosm.com>
3249
3250 * infrun.c (do_target_wait): Change old version of $pc printed.
3251
7b23e087
SM
32522018-06-11 Simon Marchi <simon.marchi@ericsson.com>
3253
3254 * dwarf2read.c (read_index_from_section): Rename to...
3255 (read_gdb_index_from_section): ... this, update all callers.
3256 (dwarf2_read_index): Rename to...
3257 (dwarf2_read_gdb_index): ... this, update all callers.
3258
69c67a0b
JDA
32592018-06-11 John David Anglin <danglin@gcc.gnu.org>
3260
3261 * gdb/hppa-linux-nat.c
3262 (hppa_linux_nat_target::fetch_inferior_registers): Rename to
3263 hppa_linux_nat_target::fetch_registers.
3264
65d4cada
AH
32652018-06-11 Alan Hayward <alan.hayward@arm.com>
3266
3267 * aarch64-tdep.c (aarch64_dwarf_reg_to_regnum): Add mappings.
3268 * aarch64-tdep.h (AARCH64_DWARF_SVE_VG): Add define.
3269 (AARCH64_DWARF_SVE_FFR): Likewise.
3270 (AARCH64_DWARF_SVE_P0): Likewise.
3271 (AARCH64_DWARF_SVE_Z0): Likewise.
3272
f868386e
AH
32732018-06-11 Alan Hayward <alan.hayward@arm.com>
3274
3275 * common/common-regcache.h (raw_compare): New function.
3276 * regcache.c (regcache::raw_compare): Likewise.
3277 * regcache.h (regcache::raw_compare): New declaration.
3278
9c861883
AH
32792018-06-11 Alan Hayward <alan.hayward@arm.com>
3280
3281 * common/common-regcache.h (reg_buffer_common): New structure.
3282 * regcache.c (reg_buffer::invalidate): Move from detached_regcache.
3283 (reg_buffer::raw_supply): Likewise.
3284 (reg_buffer::raw_supply_integer): Likewise.
3285 (reg_buffer::raw_supply_zeroed): Likewise.
3286 (reg_buffer::raw_collect): Likewise.
3287 (reg_buffer::raw_collect_integer): Likewise.
3288 * regcache.h (reg_buffer::invalidate): Move from detached_regcache.
3289 (reg_buffer::raw_supply): Likewise.
3290 (reg_buffer::raw_supply_integer): Likewise.
3291 (reg_buffer::raw_supply_zeroed): Likewise.
3292 (reg_buffer::raw_collect): Likewise.
3293 (reg_buffer::raw_collect_integer): Likewise.
3294
953edf2b
TT
32952018-06-10 Tom Tromey <tom@tromey.com>
3296
3297 * remote.c (stop_reply_p): Remove typedef. Don't declare queue.
3298 (class remote_state) <stop_reply_queue>: Now std::vector.
3299 (remote_state::~remote_state)
3300 (remote_target::stop_reply_queue_length): Update.
3301 (struct queue_iter_param, remove_child_of_pending_fork)
3302 (struct check_pending_event_prevents_wildcard_vcont_callback_data)
3303 (check_pending_event_prevents_wildcard_vcont_callback)
3304 (remove_stop_reply_for_inferior)
3305 (remove_stop_reply_of_remote_state)
3306 (remote_notif_remove_once_on_match)
3307 (stop_reply_match_ptid_and_ws)
3308 (remote_kill_child_of_pending_fork): Remove.
3309 (remote_target::remove_new_fork_children)
3310 (remote_target::check_pending_events_prevent_wildcard_vcont)
3311 (remote_target::discard_pending_stop_replies)
3312 (remote_target::discard_pending_stop_replies_in_queue)
3313 (remote_target::remote_notif_remove_queued_reply)
3314 (remote_target::queued_stop_reply)
3315 (remote_target::push_stop_reply, remote_target::peek_stop_reply)
3316 (remote_target::wait, remote_target::kill_new_fork_children)
3317 (remote_target::async): Update.
3318
1ddbba9d
TT
33192018-06-10 Tom Tromey <tom@tromey.com>
3320
3321 * record-full.c (record_full_arch_list_cleanups): Remove.
3322 (record_full_message): Use try/catch.
3323 (record_full_wait_cleanups): Remove.
3324 (record_full_wait_1): Use try/catch.
3325 (record_full_restore): Likewise.
3326
219605fd
TT
33272018-06-10 Tom Tromey <tom@tromey.com>
3328
3329 * record-full.c (record_full_breakpoint_p): Remove typedef. Don't
3330 declare VEC. Add constructor.
3331 <in_target_beneath>: Now bool.
3332 (record_full_breakpoints): Now a std::vector, static.
3333 (record_full_sync_record_breakpoints)
3334 (record_full_init_record_breakpoints)
3335 (record_full_target::insert_breakpoint)
3336 (record_full_target::remove_breakpoint): Update. Don't use XNEW.
3337
71b73764
SM
33382018-06-10 Simon Marchi <simon.marchi@polymtl.ca>
3339
3340 * dwarf2read.c (process_cu_includes): Remove struct keyword.
3341 * serial.c (serial_interface_lookup): Remove struct keyword.
3342
4360561f
TT
33432018-06-10 Tom Tromey <tom@tromey.com>
3344
3345 * procfs.c (procfs_target::xfer_partial): Use "beneath" as a
3346 method.
3347 * nto-procfs.c (nto_procfs_target::xfer_partial): Use "beneath" as
3348 a method.
3349 * go32-nat.c (go32_nat_target::xfer_partial): Use "beneath" as a
3350 method.
3351 * arm-linux-nat.c (arm_linux_nat_target::read_description): Use
3352 "beneath" as a method.
3353 * arm-fbsd-nat.c (arm_fbsd_nat_target::read_description):
3354 Use "beneath" as a method.
3355
d14b92bf
TT
33562018-06-10 Tom Tromey <tom@tromey.com>
3357
3358 * tracefile.c (struct trace_file_writer_deleter): New.
3359 <operator()>: Rename from trace_file_writer_xfree.
3360 (trace_file_writer_up): New typedef.
3361 (tsave_command, trace_save_tfile, trace_save_ctf): Update.
3362
835dcf92
SM
33632018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3364
3365 * regcache.h (reg_buffer) <~reg_buffer>: Use default destructor.
3366 <m_registers, m_register_status>: Change type to
3367 std::unique_ptr.
3368 * regcache.c (reg_buffer::reg_buffer): Use new instead of
3369 XCNEWVEC.
3370
aac0d564
SM
33712018-06-09 Simon Marchi <simon.marchi@ericsson.com>
3372
3373 * common/common-regcache.h (enum register_status): Add
3374 underlying type "signed char".
3375 * regcache.h (reg_buffer) <m_register_status>: Change type to
3376 register_status *.
3377 * regcache.c (reg_buffer::reg_buffer): Alocate arrays of
3378 register_status instead of signed char.
3379 (reg_buffer::save): Use REG_UNKNOWN instead of 0.
3380 (reg_buffer::get_register_status): Remove cast.
3381 (readable_regcache::raw_read): Remove cast.
3382 (readable_regcache::cooked_read): Remove cast.
3383
77ad7394
TT
33842018-06-09 Tom Tromey <tom@tromey.com>
3385
3386 * source.c (reverse_search_command, forward_search_command): Use
3387 scoped_fd.
3388
191cca63
TT
33892018-06-09 Tom Tromey <tom@tromey.com>
3390
3391 * serial.c (serial_ops_p): Remove typedef. Don't declare VEC.
3392 (serial_ops_list): Now static, std::vector.
3393 (serial_interface_lookup, serial_add_interface): Update.
3394
c5d0225d
TT
33952018-06-09 Tom Tromey <tom@tromey.com>
3396
3397 * dwarf2read.c (process_cu_includes): Update.
3398 (process_full_comp_unit): Update.
3399 * dwarf2read.h (struct dwarf2_per_objfile) <just_read_cus>: Now a
3400 std::vector.
3401
aeab5128
PK
34022018-06-08 Paul Koning <paul_koning@dell.com>
3403
3404 PR gdb/23252
3405
3406 * python/python.c (do_start_initialization):
3407 Avoid call to internal Python API.
3408 (init__gdb_module): New function.
3409
5045b3d7
GB
34102018-06-08 Gary Benson <gbenson@redhat.com>
3411
3412 * linux-thread-db.c (valprint.h): New include.
3413 (struct check_thread_db_info): New structure.
3414 (check_thread_db_on_load, tdb_testinfo): New static globals.
3415 (check_thread_db, check_thread_db_callback): New functions.
3416 (try_thread_db_load_1): Run integrity checks if requested.
3417 (maintenance_check_libthread_db): New function.
3418 (_initialize_thread_db): Register "maint check libthread-db"
3419 and "maint set/show check-libthread-db".
3420 * NEWS: Mention the above new commands.
3421
2f4f025f
TT
34222018-06-08 Tom Tromey <tom@tromey.com>
3423
3424 * windows-nat.c (windows_nat_target::xfer_partial): "beneath" is
3425 now a method.
3426
343b0027
TT
34272018-06-08 Tom Tromey <tom@tromey.com>
3428
3429 * btrace.c (parse_xml_raw): Use gdb::unique_xmalloc_ptr.
3430
8dcc53b3
TT
34312018-06-08 Tom Tromey <tom@tromey.com>
3432
3433 * common/btrace-common.h (struct btrace_data): Add constructor,
3434 destructor, move assignment operator.
3435 <empty, clear, fini>: New methods.
3436 <format>: Initialize.
3437 (btrace_data_init, btrace_data_fini, btrace_data_clear)
3438 (btrace_data_empty): Don't declare.
3439 * common/btrace-common.c (btrace_data_init): Remove.
3440 (btrace_data::fini): Rename from btrace_data_fini.
3441 (btrace_data::empty): Rename from btrace_data_empty.
3442 (btrace_data::clear): Rename from btrace_data_clear. Return
3443 bool.
3444 * btrace.h (make_cleanup_btrace_data): Don't declare.
3445 * btrace.c (btrace_add_pc, btrace_stitch_trace, btrace_clear)
3446 (parse_xml_btrace): Update.
3447 (do_btrace_data_cleanup, make_cleanup_btrace_data): Remove.
3448 (maint_btrace_clear_packet_history_cmd): Update.
3449
a1740ee1
PA
34502018-06-07 Pedro Alves <palves@redhat.com>
3451
3452 * target.h (target_ops) <beneath>: Now a method. All references
3453 updated.
3454 (class target_stack): New.
3455 * target.c (g_target_stack): New.
3456 (g_current_top_target): Delete.
3457 (current_top_target): Get the top target out of g_target_stack.
3458 (target_stack::push, target_stack::unpush): New.
3459 (push_target, unpush_target): Reimplement.
3460 (target_is_pushed): Reimplement in terms of g_target_stack.
3461 (target_ops::beneath, target_stack::find_beneath): New.
3462
d6ca69cd
PA
34632018-06-07 Pedro Alves <palves@redhat.com>
3464
3465 * target.h (find_target_beneath): Delete declaration.
3466 * target.c (find_target_beneath): Delete definition.
3467 * aix-thread.c: All callers of find_target_beneath adjusted to
3468 call target_ops::beneath instead.
3469 * bsd-uthread.c: Likewise.
3470 * linux-thread-db.c: Likewise.
3471 * ravenscar-thread.c: Likewise.
3472 * sol-thread.c: Likewise.
3473 * spu-multiarch.c: Likewise.
3474
b6a8c27b
PA
34752018-06-07 Pedro Alves <palves@redhat.com>
3476
3477 * target.h (target_ops) <beneath>: Now a method. All references
3478 updated.
3479 (target_ops) <m_beneath>: New.
3480 * target.c (target_ops::beneath): New.
3481 * corelow.c: Adjust all references to target_ops::beneath.
3482 * linux-thread-db.c: Likewise.
3483 * make-target-delegates: Likewise.
3484 * record-btrace.c: Likewise.
3485 * record-full.c: Likewise.
3486 * remote.c: Likewise.
3487 * target.c: Likewise.
3488 * target-delegates.c: Regenerate.
3489
8b88a78e
PA
34902018-06-07 Pedro Alves <palves@redhat.com>
3491
3492 * target.h (target_stack): Delete.
3493 (current_top_target): Declare function.
3494 * target.c (target_stack): Delete.
3495 (g_current_top_target): New.
3496 (current_top_target): New function.
3497 * auxv.c: Use current_top_target instead of target_stack
3498 throughout.
3499 * avr-tdep.c: Likewise.
3500 * breakpoint.c: Likewise.
3501 * corefile.c: Likewise.
3502 * elfread.c: Likewise.
3503 * eval.c: Likewise.
3504 * exceptions.c: Likewise.
3505 * frame.c: Likewise.
3506 * gdbarch-selftests.c: Likewise.
3507 * gnu-v3-abi.c: Likewise.
3508 * ia64-tdep.c: Likewise.
3509 * ia64-vms-tdep.c: Likewise.
3510 * infcall.c: Likewise.
3511 * infcmd.c: Likewise.
3512 * infrun.c: Likewise.
3513 * linespec.c: Likewise.
3514 * linux-tdep.c: Likewise.
3515 * minsyms.c: Likewise.
3516 * ppc-linux-nat.c: Likewise.
3517 * ppc-linux-tdep.c: Likewise.
3518 * procfs.c: Likewise.
3519 * regcache.c: Likewise.
3520 * remote.c: Likewise.
3521 * rs6000-tdep.c: Likewise.
3522 * s390-linux-nat.c: Likewise.
3523 * s390-tdep.c: Likewise.
3524 * solib-aix.c: Likewise.
3525 * solib-darwin.c: Likewise.
3526 * solib-dsbt.c: Likewise.
3527 * solib-spu.c: Likewise.
3528 * solib-svr4.c: Likewise.
3529 * solib-target.c: Likewise.
3530 * sparc-tdep.c: Likewise.
3531 * sparc64-tdep.c: Likewise.
3532 * spu-tdep.c: Likewise.
3533 * symfile.c: Likewise.
3534 * symtab.c: Likewise.
3535 * target-descriptions.c: Likewise.
3536 * target-memory.c: Likewise.
3537 * target.c: Likewise.
3538 * target.h: Likewise.
3539 * tracefile-tfile.c: Likewise.
3540 * tracepoint.c: Likewise.
3541 * valops.c: Likewise.
3542 * valprint.c: Likewise.
3543 * value.c: Likewise.
3544 * windows-tdep.c: Likewise.
3545 * mi/mi-main.c: Likewise.
3546
c7110220
TT
35472018-06-07 Tom Tromey <tom@tromey.com>
3548
3549 * valprint.h (build_address_symbolic): Declare.
3550 * printcmd.c (print_address_symbolic): Update.
3551 (build_address_symbolic): Change "name" and "filename" to
3552 std::string.
3553 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
3554 Update.
3555 * defs.h (build_address_symbolic): Remove declaration.
3556
63bad7b6
AH
35572018-06-07 Alan Hayward <alan.hayward@arm.com>
3558
3559 * aarch64-tdep.c (AARCH64_SVE_V0_REGNUM): Add define.
3560 (aarch64_vnv_type): Add function.
3561 (aarch64_pseudo_register_name): Add V regs for SVE.
3562 (aarch64_pseudo_register_type): Likewise.
3563 (aarch64_pseudo_register_reggroup_p): Likewise.
3564 (aarch64_pseudo_read_value_2): Use V0 offset for SVE
3565 (aarch64_pseudo_read_value): Add V regs for SVE.
3566 (aarch64_pseudo_write_2): Use V0 offset for SVE
3567 (aarch64_pseudo_write): Add V regs for SVE.
3568 * aarch64-tdep.h (struct gdbarch_tdep): Add vnv_type.
3569
13e3c608
SDJ
35702018-06-06 Sergio Durigan Junior <sergiodj@redhat.com>
3571
3572 * arch/aarch64.h (sve_vq_from_vl): Guard with #ifndef.
3573 (sve_vl_from_vq): Likewise.
3574
c61b06a1
TT
35752018-06-05 Tom Tromey <tom@tromey.com>
3576
3577 * cli/cli-cmds.c (show_version): Update.
3578 * top.c (print_gdb_version): Add "interactive" parameter.
3579 Update.
3580 * main.c (captured_main_1): Update.
3581 * top.h (print_gdb_version): Add "interactive" parameter and a
3582 comment.
3583
115f7325
DM
35842018-06-05 David Malcolm <dmalcolm@redhat.com>
3585
3586 * common/enum-flags.h: Add trailing semicolon to example in
3587 comment.
3588
eb6af809
TT
35892018-06-05 Tom Tromey <tom@tromey.com>
3590
3591 PR cli/12326:
3592 * NEWS: Add entry about pager.
3593 * utils.c (pagination_disabled_for_command): New global.
3594 (prompt_for_continue): Allow "c" response to prompt.
3595 (reinitialize_more_filter): Clear
3596 pagination_disabled_for_command.
3597 (fputs_maybe_filtered): Check pagination_disabled_for_command.
3598
54d343a2
TT
35992018-06-04 Tom Tromey <tom@tromey.com>
3600
3601 * ada-lang.h (ada_lookup_symbol_list): Update.
3602 * ada-lang.c (resolve_subexp): Update.
3603 (symbols_are_identical_enums): Change type of syms. Remove nsyms
3604 parameter.
3605 (remove_extra_symbols, remove_irrelevant_renamings): Likewise.
3606 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list): Change
3607 results parameter to std::vector.
3608 (ada_iterate_over_symbols, ada_lookup_symbol, get_var_value):
3609 Update.
3610 * ada-exp.y (block_lookup): Update.
3611 (select_possible_type_sym): Change type of syms. Remove nsyms
3612 parameter.
3613 (write_var_or_type, write_name_assoc): Update.
3614
178d6a63
JB
36152018-06-04 Joel Brobecker <brobecker@adacore.com>
3616
3617 * windows-nat.c (windows_nat_target::xfer_partial): Return
3618 TARGET_XFER_E_IO if we need to delegate to the target beneath
3619 but BENEATH is NULL.
3620
baf00c2d
SM
36212018-06-04 Simon Marchi <simon.marchi@ericsson.com>
3622
3623 * Makefile.in (config.status): Add configure.nat as a
3624 dependency.
3625
214b073c
TT
36262018-06-04 Tom Tromey <tom@tromey.com>
3627
3628 * cp-name-parser.y (cpname_state): Add method declarations.
3629 (HANDLE_QUAL): Update.
3630 (cpname_state::d_grab, cpname_state::fill_comp)
3631 (cpname_state::make_operator, cpname_state::make_dtor)
3632 (cpname_state::make_builtin_type, cpname_state::make_name)
3633 (cpname_state::d_qualify, cpname_state::d_int_type)
3634 (cpname_state::d_unary, cpname_state::d_binary): Now methods.
3635 (%union): Move earlier.
3636
62b74cb8
AH
36372018-06-04 Alan Hayward <alan.hayward@arm.com>
3638
3639 * elfread.c (elf_symfile_segments): Use ELF_SECTION_IN_SEGMENT.
3640
3c5cd5c3
AH
36412018-06-04 Alan Hayward <alan.hayward@arm.com>
3642
3643 * aarch64-tdep.c (aarch64_pseudo_read_value_1): New helper func.
3644 (aarch64_pseudo_write_1): Likewise.
3645 (aarch64_pseudo_read_value): Use helper.
3646 (aarch64_pseudo_write): Likewise.
3647
59f413d5
PA
36482018-06-04 Pedro Alves <palves@redhat.com>
3649
3650 * darwin-nat.c (darwin_ops): Delete.
3651 (darwin_attach_pid): Use get_native_target.
3652
1332a140
AH
36532018-06-04 Alan Hayward <alan.hayward@arm.com>
3654
3655 * aarch64-tdep.c (aarch64_get_tdesc_vq): Use uint64_t for VQ.
3656 * aarch64-tdep.h (struct gdbarch_tdep): Likewise.
3657
ba2d2bb2
AH
36582018-06-04 Alan Hayward <alan.hayward@arm.com>
3659
3660 * aarch64-linux-nat.c (aarch64_linux_read_description): Support SVE.
3661 * aarch64-tdep.c (aarch64_get_tdesc_vq): New function.
3662 (aarch64_gdbarch_init): Check for SVE.
3663 * aarch64-tdep.h (gdbarch_tdep::has_sve): New function.
3664
36652018-06-04 Alan Hayward <alan.hayward@arm.com>
39bfb937
AH
3666
3667 * aarch64-tdep.c (aarch64_read_description): Use uint64_t for VQ.
3668 * aarch64-tdep.h (aarch64_read_description): Likewise.
3669 * arch/aarch64.c (aarch64_create_target_description): Likewise.
3670 * arch/aarch64.h (aarch64_create_target_description): Likewise.
3671 * features/aarch64-sve.c (create_feature_aarch64_sve): Likewise.
3672 * nat/aarch64-sve-linux-ptrace.c(aarch64_sve_get_vq): Likewise.
3673 * nat/aarch64-sve-linux-ptrace.h (aarch64_sve_get_vq): Likewise.
3674
41c60b4b
SM
36752018-06-02 Simon Marchi <simon.marchi@ericsson.com>
3676
3677 * value.c (value_fetch_lazy_bitfield): New.
3678 (value_fetch_lazy_memory): New.
3679 (value_fetch_lazy_register): New.
3680 (value_fetch_lazy): Factor out to smaller functions.
3681
7b640f72
TT
36822018-06-01 Tom Tromey <tom@tromey.com>
3683
3684 * cp-name-parser.y (backslashable, represented): Now const.
3685
98e69eb3
TT
36862018-06-01 Tom Tromey <tom@tromey.com>
3687
3688 * cp-name-parser.y: Include parser-defs.h.
3689 (parser_fprintf): Remove declaration.
3690
49265499
TT
36912018-06-01 Tom Tromey <tom@tromey.com>
3692
3693 * cp-name-parser.y: Use %pure-parser, %lex-param, and
3694 %parse-param.
3695 (lexptr, prev_lexptr, error_lexptr, global_errmsg, demangle_info)
3696 (global_result): Remove globals.
3697 (struct cpname_state): New.
3698 (yyparse): Don't declare.
3699 (yylex, yyerror): Move declarations after %union.
3700 (d_grab, fill_comp, make_operator, make_dtor, make_builtin_type)
3701 (make_name): Add state parameter.
3702 Update all callers.
3703 (d_qualify, d_int_type, d_unary, d_binary, parse_number) Add state
3704 parameter.
3705 (HANDLE_QUAL, HANDLE_SPECIAL, HANDLE_TOKEN2, HANDLE_TOKEN3):
3706 Update.
3707 (yylex): Add lvalp, state parameters.
3708 (yyerror): Add state parameter.
3709 (cp_demangled_name_to_comp): Update.
3710
55b6c984
TT
37112018-06-01 Tom Tromey <tom@tromey.com>
3712
3713 * cp-name-parser.y (parser_fprintf): Declare.
3714 (GDB_YY_REMAP_PREFIX): Define.
3715 Include yy-remap.h. Don't redefine yy* identifiers.
3716
3513a6bb
TT
37172018-06-01 Tom Tromey <tom@tromey.com>
3718
3719 * python/py-type.c (typy_legacy_template_argument): Update.
3720 * cp-support.h (cp_demangled_name_to_comp): Update.
3721 * cp-name-parser.y (cp_demangled_name_to_comp): Change errmsg
3722 parameter to be a "std::string *".
3723 (main): Update.
3724
e9cb46ab
L
37252018-06-01 H.J. Lu <hongjiu.lu@intel.com>
3726
3727 * ada-lex.l: Include "diagnostics.h" instead of
3728 "common/diagnostics.h".
3729 * unittests/environ-selftests.c: Likewise.
3730 * common/diagnostics.h: Moved to ../include.
3731
8e817061
JB
37322018-06-01 Joel Brobecker <brobecker@adacore.com>
3733
3734 * breakpoint.c (breakpoint_re_set): Temporarily force language_mode
3735 to language_mode_manual while calling breakpoint_re_set_one.
3736
a737d952
TT
37372018-06-01 Tom Tromey <tom@tromey.com>
3738
3739 * valops.c (value_cast_structs, destructor_name_p): Update.
3740 * symtab.c (gdb_mangle_name): Update.
3741 * stabsread.c (define_symbol, read_cpp_abbrev, read_baseclasses):
3742 Update.
3743 * p-valprint.c (pascal_object_is_vtbl_ptr_type)
3744 (pascal_object_print_value_fields, pascal_object_print_value):
3745 Update.
3746 * p-typeprint.c (pascal_type_print_derivation_info): Update.
3747 * linespec.c (find_methods): Update.
3748 * gdbtypes.h (type_name_no_tag): Remove.
3749 (type_name_or_error): Rename from type_name_no_tag_or_error.
3750 * gdbtypes.c (type_name_no_tag): Remove.
3751 (type_name_or_error): Rename from type_name_no_tag_or_error.
3752 (lookup_struct_elt_type, check_typedef): Update.
3753 * expprint.c (print_subexp_standard): Update.
3754 * dwarf2read.c (dwarf2_add_field, load_partial_dies): Update.
3755 * d-namespace.c (d_lookup_nested_symbol): Update.
3756 * cp-valprint.c (cp_is_vtbl_ptr_type, cp_print_value_fields)
3757 (cp_print_class_member): Update.
3758 * cp-namespace.c (cp_lookup_nested_symbol): Update.
3759 * completer.c (add_struct_fields): Update.
3760 * c-typeprint.c (cp_type_print_derivation_info)
3761 (c_type_print_varspec_prefix, c_type_print_base_struct_union):
3762 Update.
3763 * ada-lang.c (parse_old_style_renaming, xget_renaming_scope)
3764 (ada_prefer_type, ada_is_exception_sym): Update.
3765
e86ca25f
TT
37662018-06-01 Tom Tromey <tom@tromey.com>
3767
3768 * valops.c (enum_constant_from_type, value_namespace_elt)
3769 (value_maybe_namespace_elt): Update.
3770 * valarith.c (find_size_for_pointer_math): Update.
3771 * target-descriptions.c (make_gdb_type): Update.
3772 * symmisc.c (print_symbol): Update.
3773 * stabsread.c (define_symbol, read_type)
3774 (complain_about_struct_wipeout, add_undefined_type)
3775 (cleanup_undefined_types_1): Update.
3776 * rust-lang.c (rust_tuple_type_p, rust_slice_type_p)
3777 (rust_range_type_p, val_print_struct, rust_print_struct_def)
3778 (rust_internal_print_type, rust_composite_type)
3779 (rust_evaluate_funcall, rust_evaluate_subexp)
3780 (rust_inclusive_range_type_p): Update.
3781 * python/py-type.c (typy_get_tag): Update.
3782 * p-typeprint.c (pascal_type_print_base): Update.
3783 * mdebugread.c (parse_symbol, parse_type): Update.
3784 * m2-typeprint.c (m2_long_set, m2_record_fields, m2_enum):
3785 Update.
3786 * guile/scm-type.c (gdbscm_type_tag): Update.
3787 * go-lang.c (sixg_string_p): Update.
3788 * gnu-v3-abi.c (build_gdb_vtable_type, build_std_type_info_type):
3789 Update.
3790 * gdbtypes.h (struct main_type) <tag_name>: Remove.
3791 (TYPE_TAG_NAME): Remove.
3792 * gdbtypes.c (type_name_no_tag): Simplify.
3793 (check_typedef, check_types_equal, recursive_dump_type)
3794 (copy_type_recursive, arch_composite_type): Update.
3795 * f-typeprint.c (f_type_print_base): Update. Print "Type" prefix
3796 in summary mode when needed.
3797 * eval.c (evaluate_funcall): Update.
3798 * dwarf2read.c (fixup_go_packaging, read_structure_type)
3799 (process_structure_scope, read_enumeration_type)
3800 (read_namespace_type, read_module_type, determine_prefix): Update.
3801 * cp-support.c (inspect_type): Update.
3802 * coffread.c (process_coff_symbol, decode_base_type): Update.
3803 * c-varobj.c (c_is_path_expr_parent): Update.
3804 * c-typeprint.c (c_type_print_base_struct_union): Update.
3805 (c_type_print_base_1): Update. Print struct/class/union/enum in
3806 summary when using C language.
3807 * ax-gdb.c (gen_struct_ref, gen_namespace_elt)
3808 (gen_maybe_namespace_elt): Update.
3809 * ada-lang.c (ada_type_name): Simplify.
3810 (empty_record, ada_template_to_fixed_record_type_1)
3811 (template_to_static_fixed_type)
3812 (to_record_with_fixed_variant_part, ada_check_typedef): Update.
3813
c1ec8cea
TT
38142018-06-01 Tom Tromey <tom@tromey.com>
3815
3816 * dwarf2read.c (dwarf2_compute_name): Pass CU's language to
3817 c_print_type.
3818 * c-typeprint.c (c_print_type_1): Add "language" parameter.
3819 (c_print_type): Update.
3820 (c_print_type): New overload.
3821 (c_type_print_varspec_prefix, c_type_print_args)
3822 (c_type_print_varspec_suffix, c_print_type_no_offsets)
3823 (c_type_print_base_struct_union, c_type_print_base_1)
3824 (cp_type_print_method_args): Add "language" parameter.
3825 (c_type_print_base): Update.
3826 * c-lang.h (c_print_type): Add new overload.
3827
bc8453a7
TT
38282018-06-01 Tom Tromey <tom@tromey.com>
3829
3830 * typeprint.h (c_type_print_varspec_suffix): Don't declare.
3831 * c-typeprint.c (c_type_print_varspec_suffix): Now static.
3832
739e8682
AH
38332018-06-01 Alan Hayward <alan.hayward@arm.com>
3834
3835 * aarch64-tdep.c (aarch64_sve_register_names): New const
3836 var.
3837 * arch/aarch64.h (enum aarch64_regnum): Add SVE entries.
3838 (AARCH64_SVE_Z_REGS_NUM): New define.
3839 (AARCH64_SVE_P_REGS_NUM): Likewise.
3840 (AARCH64_SVE_NUM_REGS): Likewise.
3841
8a60efe7
UB
38422018-05-31 Uros Bizjak <ubizjak@gmail.com>
3843
3844 * nat/linux-ptrace.h [__alpha__]
3845 (GDB_ARCH_IS_TRAP_BRKPT, GDB_ARCH_IS_TRAP_HWBKPT): Remove
3846 definitions.
3847
4b2dfa9d
MR
38482018-05-31 Maciej W. Rozycki <macro@mips.com>
3849
3850 * arch-utils.c (gdbarch_info_fill): Set `default_byte_order' to
3851 the endianness selected.
3852 * NEWS: Document `set endian auto' mode operation update.
3853
122394f1
AH
38542018-05-31 Alan Hayward <alan.hayward@arm.com>
3855
3856 * Makefile.in: Add new header.
3857 * gdb/arch/aarch64.h (sve_vg_from_vl): New macro.
3858 (sve_vl_from_vg): Likewise.
3859 (sve_vq_from_vl): Likewise.
3860 (sve_vl_from_vq): Likewise.
3861 (sve_vq_from_vg): Likewise.
3862 (sve_vg_from_vq): Likewise.
3863 * configure.nat: Add new c file.
3864 * nat/aarch64-sve-linux-ptrace.c: New file.
3865 * nat/aarch64-sve-linux-ptrace.h: New file.
3866
95228a0d
AH
38672018-05-31 Alan Hayward <alan.hayward@arm.com>
3868
3869 * aarch64-linux-nat.c (aarch64_linux_read_description):
3870 Add parmeter zero.
3871 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
3872 Likewise.
3873 * aarch64-tdep.c (tdesc_aarch64_list): Add.
3874 (aarch64_read_description): Use VQ to index tdesc_aarch64_list.
3875 (aarch64_gdbarch_init): Add parmeter zero.
3876 * aarch64-tdep.h (aarch64_read_description): Add VQ parmeter.
3877 * arch/aarch64.c (aarch64_create_target_description): Check VQ.
3878 * arch/aarch64.h (aarch64_create_target_description): Add VQ.
3879 parmeter.
3880 * doc/gdb.texinfo: Describe SVE feature
3881 * features/aarch64-sve.c: New file.
3882
5969f0db
OJ
38832018-05-31 Omair Javaid <omair.javaid@linaro.org>
3884
3885 PR gdb/23210
3886 * gdbarch.sh (significant_addr_bit): Default to zero when
3887 not set by target architecture.
3888 * gdbarch.c: Re-generated.
3889 * utils.c (address_significant): Update.
3890
61367c61
JB
38912018-05-30 Joel Brobecker <brobecker@adacore.com>
3892
3893 * stack.c (func_command): Remove trailing newline in call to error.
3894
34a79281
SM
38952018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3896
3897 * regcache.h (regcache_raw_collect): Remove, update callers to
3898 use regcache::raw_collect.
3899 * regcache.c (regcache_raw_collect): Remove.
3900
73e1c03f
SM
39012018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3902
3903 * regcache.h (regcache_raw_supply): Remove, update callers to
3904 use detached_regcache::raw_supply.
3905 * regcache.c (regcache_raw_supply): Remove.
3906
e4c4a59b
SM
39072018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3908
3909 * regcache.h (regcache_cooked_write_part): Remove, update
3910 callers to use regcache::cooked_write_part.
3911 * regcache.c (regcache_cooked_write_part): Remove.
3912
73bb0000
SM
39132018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3914
3915 * regcache.h (regcache_cooked_read_part): Remove, update callers
3916 to use readable_regcache::cooked_read_part.
3917 * regcache.c (regcache_cooked_read_part): Remove.
3918
46a45e9d
SM
39192018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3920
3921 * regcache.h (regcache_cooked_read_value): Remove, update
3922 callers to use readable_regcache::cooked_read_value.
3923 * regcache.c (regcache_cooked_read_value): Remove.
3924
b66f5587
SM
39252018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3926
3927 * regcache.h (regcache_cooked_write): Remove, update callers to
3928 use regcache::cooked_write.
3929 * regcache.c (regcache_cooked_write): Remove.
3930
6aa7d724
SM
39312018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3932
3933 * regcache.h (regcache_invalidate): Remove, update callers to
3934 use detached_regcache::invalidate instead.
3935 * regcache.c (regcache_invalidate): Remove.
3936
4f0420fd
SM
39372018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3938
3939 * regcache.h (regcache_raw_write_part): Remove, update callers
3940 to use regcache::raw_write_part instead.
3941 * regcache.c (regcache_raw_write_part): Remove.
3942
502fe83e
SM
39432018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3944
3945 * regcache.h (regcache_raw_read_part): Remove, update callers to
3946 use readable_regcache::raw_read_part instead.
3947 * regcache.c (regcache_raw_read_part): Remove.
3948
dca08e1f
SM
39492018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3950
3951 * regcache.h (regcache_cooked_read): Remove, update callers to
3952 use readable_regcache::cooked_read instead.
3953 * regcache.c (regcache_cooked_read): Remove.
3954
10eaee5f
SM
39552018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3956
3957 * regcache.h (regcache_raw_write): Remove, update callers to use
3958 regcache::raw_write instead.
3959 * regcache.c (regcache_raw_write): Remove.
3960
0b883586
SM
39612018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3962
3963 * regcache.h (regcache_raw_read): Remove, update callers to use
3964 readable_regcache::raw_read instead.
3965 * regcache.c (regcache_raw_read): Remove.
3966
0b47d985
SM
39672018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3968
3969 * regcache.h (regcache_raw_update): Remove, update callers to
3970 use readable_regcache::raw_update instead.
3971 * regcache.c (regcache_raw_update): Remove.
3972
0ec9f114
SM
39732018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3974
3975 * regcache.h (regcache_register_status): Remove, update callers
3976 to use reg_buffer::get_register_status directly instead.
3977 * regcache.c (regcache_register_status): Remove.
3978
222312d3
SM
39792018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3980
3981 * regcache.h (regcache_get_ptid): Remove, update all callers to
3982 call regcache::ptid instead.
3983 * regcache.c (regcache_get_ptid): Remove.
3984
fdbe37e3
SM
39852018-05-30 Simon Marchi <simon.marchi@ericsson.com>
3986
3987 * Makefile.in (ALL_TARGET_OBS): Add or1k-tdep.o.
3988
f7c6f423
PA
39892018-05-30 Pedro Alves <palves@redhat.com>
3990
3991 * common/common-exceptions.h (exception_rethrow): Use
3992 ATTRIBUTE_NORETURN.
3993
52941706
SM
39942018-05-29 Simon Marchi <simon.marchi@polymtl.ca>
3995
3996 * breakpoint.c (print_solib_event, check_status_catch_solib):
3997 Remove struct keyword in range-based for loops.
3998 * dbxread.c (find_corresponding_bincl_psymtab): Likewise.
3999 * dwarf2read.c (compute_delayed_physnames, rust_union_quirks);
4000 Likewise.
4001 * linespec.c (find_superclass_methods, search_minsyms_for_name):
4002 Likewise.
4003 * symfile.c (addr_info_make_relative): Likewise.
4004 * thread.c (value_in_thread_stack_temporaries): Likewise.
4005
bf2977b5
WP
40062018-06-12 Weimin Pan <weimin.pan@oracle.com>
4007
4008 PR gdb/16841
4009 * valops.c (value_struct_elt_for_reference): Call check_typedef on
4010 aggregate type to get its real type before accessing it.
4011
64cc34d8
WP
40122018-05-29 Weimin Pan <weimin.pan@oracle.com>
4013
4014 * minsyms.h (lookup_minimal_symbol_and_objfile): Remove declaration.
4015 * minsyms.c (lookup_minimal_symbol_and_objfile): Remove definition.
4016 * coff-pe-read.c (add_pe_forwarded_sym): Replace
4017 lookup_minimal_symbol_and_objfile with lookup_bound_minimal_symbol.
4018 * glibc-tdep.c (glibc_skip_solib_resolver): Likewise.
4019 * jit.c (jit_breakpoint_re_set_internal): Likewise.
4020 * printcmd.c (info_address_command): Likewise.
4021
e7ec8713
TT
40222018-05-29 Tom Tromey <tom@tromey.com>
4023
4024 * windows-nat.c (handle_exception): Update fall-through comment.
4025
bcb430e4
TT
40262018-05-29 Tom Tromey <tom@tromey.com>
4027
4028 * progspace.h (so_list_ptr): Remove typedef. Don't declare VEC.
4029 (struct program_space) <added_solibs>: Now a std::vector.
4030 * breakpoint.c (print_solib_event): Update.
4031 (check_status_catch_solib): Update.
4032 * progspace.c (clear_program_space_solib_cache): Update.
4033 * solib.c (update_solib_list): Update.
4034
894882e3
TT
40352018-05-29 Tom Tromey <tom@tromey.com>
4036
4037 * python/py-type.c (typy_richcompare): Update.
4038 * guile/scm-type.c (tyscm_equal_p_type_smob): Update.
4039 * gdbtypes.h (types_deeply_equal): Return bool.
4040 (types_equal): Likewise.
4041 * gdbtypes.c (type_equality_entry_d): Remove typedef. Don't
4042 declare VEC.
4043 (check_types_equal): Change worklist to std::vector. Return
4044 bool.
4045 (struct type_equality_entry): Add constructor.
4046 (compare_maybe_null_strings): Return bool.
4047 (check_types_worklist): Return bool. Change worklist to
4048 std::vector.
4049 (types_deeply_equal): Use std::vector.
4050 (types_equal): Return bool.
4051 (compare_maybe_null_strings): Simplify.
4052
10b2ded4
TT
40532018-05-29 Tom Tromey <tom@tromey.com>
4054
4055 * record-btrace.c (tp_t): Remove typedef. Don't declare VEC.
4056
4f7deebe
TT
40572018-05-29 Tom Tromey <tom@tromey.com>
4058
4059 * objc-lang.h: Don't include cp-support.h.
4060 * common/gdb_vecs.h (const_char_ptr): Remove typedef. Don't
4061 declare VEC.
4062
b8283aea
TT
40632018-05-27 Tom Tromey <tom@tromey.com>
4064
4065 * Makefile.in (DEPFILES): Don't reference REMOTE_OBS.
4066
41a883c8
TT
40672018-05-25 Tom Tromey <tom@tromey.com>
4068
4069 * value.c (value::location): Initialize.
4070
bf259e25
TT
40712018-05-25 Tom Tromey <tom@tromey.com>
4072
4073 * dbxread.c (init_bincl_list): Remove.
4074 (bincl_list): Now a std::vector.
4075 (bincls_allocated, next_bincl): Remove.
4076 (free_bincl_list, do_free_bincl_list_cleanup)
4077 (make_cleanup_free_bincl_list): Remove.
4078 (dbx_read_symtab, elfstab_build_psymtabs): Use scoped_restore,
4079 unique_xmalloc_ptr.
4080 (find_corresponding_bincl_psymtab, read_dbx_symtab): Update.
4081 (struct header_file_location): Add constructor.
4082 (add_bincl_to_list): Remove.
4083
d525a99b
TT
40842018-05-25 Tom Tromey <tom@tromey.com>
4085
4086 * tui/tui.c (tui_enable): Update.
4087 * mi/mi-interp.c (mi_interp::init): Update.
4088 * interps.h (class interp) <name>: New method.
4089 <m_name>: Rename from name.
4090 (~scoped_restore_interp): Update.
4091 * interps.c (interp::interp): Update.
4092 (interp_add, interp_set, interp_lookup_existing)
4093 (current_interp_named_p): Update.
4094
da505cff
TT
40952018-05-25 Tom Tromey <tom@tromey.com>
4096
4097 * interps.c (interp_name): Remove.
4098 * mi/mi-interp.c (mi_interp::init): Update.
4099 * interps.h (interp_name): Remove.
4100 (~scoped_restore_interp): Update.
4101 * tui/tui.c (tui_enable): Update.
4102
29f94340
TT
41032018-05-25 Tom Tromey <tom@tromey.com>
4104
4105 * utils.c (fputs_maybe_filtered): Update.
4106 * linespec.c (decode_line_full): Update.
4107 * mi/mi-interp.c (mi_on_normal_stop_1, mi_tsv_modified)
4108 (mi_print_breakpoint_for_event, mi_solib_loaded)
4109 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4110 (mi_user_selected_context_changed): Update.
4111 * mi/mi-main.c (mi_execute_command): Update.
4112 * cli/cli-script.c (execute_control_command): Update.
4113 * python/python.c (execute_gdb_command): Update.
4114 * solib.c (info_sharedlibrary_command): Update.
4115 * interps.c (interp_ui_out): Remove.
4116 * interps.h (interp_ui_out): Remove.
4117
716b8bc5
TT
41182018-05-25 Tom Tromey <tom@tromey.com>
4119
4120 * tui/tui-interp.c (as_tui_interp): Use dynamic_cast.
4121 * mi/mi-interp.c (as_mi_interp): Use dynamic_cast.
4122 * cli/cli-interp.c (as_cli_interp): Use dynamic_cast.
4123
753ff9bd
TT
41242018-05-25 Tom Tromey <tom@tromey.com>
4125
4126 * cli/cli-interp.c (safe_execute_command): Use scoped_restore.
4127 * interps.c (interp_exec): Use scoped_restore.
4128
5ca3b260
TT
41292018-05-25 Tom Tromey <tom@tromey.com>
4130
4131 * remote.c (remote_target::remote_file_get): Use
4132 gdb::byte_vector.
4133 (remote_target::remote_file_put): Likewise.
4134
3173aa2f
TT
41352018-05-25 Tom Tromey <tom@tromey.com>
4136
4137 * coff-pe-read.c (struct read_pe_section_data) <section_name>: Now
4138 a std::string.
4139 (get_pe_section_index, add_pe_exported_sym): Update.
4140 (read_pe_exported_syms): Use gdb::def_vector.
4141
09a5e1b5
TT
41422018-05-25 Tom Tromey <tom@tromey.com>
4143
4144 * frame.c (remove_prev_frame): Remove.
4145 (get_prev_frame_if_no_cycle): Use TRY/CATCH.
4146
d8dab6c3
MR
41472018-05-25 Maciej W. Rozycki <macro@mips.com>
4148
4149 * mips-linux-tdep.h (mips_supply_fpregset, mips_fill_fpregset):
4150 Remove prototypes.
4151 * mips-linux-nat.c (supply_fpregset): Always call
4152 `mips64_supply_fpregset' rather than `mips_supply_fpregset'.
4153 (fill_fpregset): Always call `mips64_fill_fpregset' rather than
4154 `mips_fill_fpregset'.
4155 * mips-linux-tdep.c (mips_supply_fpregset)
4156 (mips_supply_fpregset_wrapper, mips_fill_fpregset)
4157 (mips_fill_fpregset_wrapper): Remove functions.
4158 (mips64_supply_fpregset, mips64_fill_fpregset): Update comments.
4159 (mips_linux_fpregset): Remove variable.
4160 (mips_linux_iterate_over_regset_sections): Use
4161 `mips64_linux_fpregset' in place of `mips_linux_fpregset'.
4162 (mips_linux_o32_sigframe_init): Remove comment.
4163
3c69da40
PA
41642018-05-25 Pedro Alves <palves@redhat.com>
4165
4166 * remote.c (struct vCont_action_support, MAXTHREADLISTRESULTS)
4167 (struct readahead_cache, struct packet_reg, struct
4168 remote_arch_state, class remote_state): Move higher up in the
4169 file.
4170 (remote_target::m_remote_state): Now an object instead of a pointer.
4171 (remote_target::get_remote_state): Adjust.
4172
39f0c204
AB
41732018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4174
4175 * stack.c (select_and_print_frame): Delete.
4176 (struct function_bounds): Move struct within function.
4177 (func_command): Most content moved into new function
4178 find_frame_for_function, use new function, print result, add
4179 function comment.
4180 (find_frame_for_function): New function, now returns a result.
4181
d392224a
PW
41822018-05-24 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4183
4184 * stack.c (iterate_over_block_arg_vars): Fix comment.
4185 (print_frame_arg_vars): Pass stream in cb_data, not gdb_stdout.
4186
45f25d6c
AB
41872018-05-24 Andrew Burgess <andrew.burgess@embecosm.com>
4188
4189 PR gdb/23203
4190 * frame.c
4191 (scoped_restore_selected_frame::scoped_restore_selected_frame):
4192 Define.
4193 (scoped_restore_selected_frame::~scoped_restore_selected_frame):
4194 Define.
4195 * frame.h (class scoped_restore_selected_frame): New class.
4196 * stack.c (print_frame_local_vars): Remove catching and rethrowing
4197 of any exception, use scoped_restore_selected_frame to restore the
4198 frame instead.
4199
da05d921
PA
42002018-05-24 Pedro Alves <palves@redhat.com>
4201
4202 * darwin-nat.h (darwin_nat_target::create_inferior): Mark with
4203 override.
4204
a8be540e
TT
42052018-05-23 Tom Tromey <tom@tromey.com>
4206
4207 * complaints.c (struct complaints): Remove.
4208 (symfile_complaint_book): Remove.
4209 (series): New global.
4210 (complaint_internal): Update.
4211 (clear_complaints): Update.
4212
ff1cf532
TT
42132018-05-23 Tom Tromey <tom@tromey.com>
4214
4215 * complaints.c (counters): New global.
4216 (struct complain): Remove.
4217 (struct complaints) <root>: Remove.
4218 (complaint_sentinel): Remove.
4219 (symfile_complaint_book): Update.
4220 (find_complaint) Remove.
4221 (complaint_internal, clear_complaints): Update.
4222
7ff88174
TT
42232018-05-23 Tom Tromey <tom@tromey.com>
4224
4225 * complaints.c (struct complain) <file, line>: Remove.
4226 (find_complaint): Remove file, line parameters.
4227 (complaint_internal): Update.
4228
de54e1a5
TT
42292018-05-23 Tom Tromey <tom@tromey.com>
4230
4231 * complaints.c (vcomplaint): Remove.
4232 (complaint_internal) Merge in contents of vcomplaint.
4233
2ac237e5
TT
42342018-05-23 Tom Tromey <tom@tromey.com>
4235
4236 * complaints.c (struct complaints) <explanation>: Remove.
4237 (symfile_explanations): Remove.
4238 (symfile_complaint_book): Update.
4239 (vcomplaint): Update.
4240 (struct explanation): Remove.
4241
b98664d3
TT
42422018-05-23 Tom Tromey <tom@tromey.com>
4243
4244 * complaints.c (symfile_complaints): Remove.
4245 (complaint_internal): Remove "complaints" parameter.
4246 (clear_complaints, vcomplaint): Remove "c" parameter.
4247 (get_complaints): Remove.
4248 * dwarf2read.c (dwarf2_statement_list_fits_in_line_number_section_complaint)
4249 (dwarf2_debug_line_missing_file_complaint)
4250 (dwarf2_debug_line_missing_end_sequence_complaint)
4251 (dwarf2_complex_location_expr_complaint)
4252 (dwarf2_const_value_length_mismatch_complaint)
4253 (dwarf2_section_buffer_overflow_complaint)
4254 (dwarf2_macro_malformed_definition_complaint)
4255 (dwarf2_invalid_attrib_class_complaint)
4256 (create_addrmap_from_index, dw2_symtab_iter_next)
4257 (dw2_expand_marked_cus)
4258 (dw2_debug_names_iterator::find_vec_in_debug_names)
4259 (dw2_debug_names_iterator::next, dw2_debug_names_iterator::next)
4260 (create_debug_type_hash_table, init_cutu_and_read_dies)
4261 (partial_die_parent_scope, add_partial_enumeration)
4262 (skip_one_die, fixup_go_packaging, quirk_rust_enum, process_die)
4263 (dwarf2_compute_name, dwarf2_physname, read_namespace_alias)
4264 (read_import_statement, read_file_scope, create_dwo_cu_reader)
4265 (create_cus_hash_table, create_dwp_hash_table)
4266 (inherit_abstract_dies, read_func_scope, read_call_site_scope)
4267 (dwarf2_rnglists_process, dwarf2_ranges_process)
4268 (dwarf2_add_type_defn, dwarf2_attach_fields_to_type)
4269 (dwarf2_add_member_fn, get_alignment, maybe_set_alignment)
4270 (handle_struct_member_die, process_structure_scope)
4271 (read_array_type, read_common_block, read_module_type)
4272 (read_tag_pointer_type, read_typedef, read_base_type)
4273 (read_subrange_type, load_partial_dies, partial_die_info::read)
4274 (partial_die_info::read, partial_die_info::read)
4275 (partial_die_info::read, read_checked_initial_length_and_offset)
4276 (dwarf2_string_attr, read_formatted_entries)
4277 (dwarf_decode_line_header)
4278 (lnp_state_machine::check_line_address, dwarf_decode_lines_1)
4279 (new_symbol, dwarf2_const_value_attr, lookup_die_type)
4280 (read_type_die_1, determine_prefix, dwarf2_get_ref_die_offset)
4281 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
4282 (get_signatured_type, get_DW_AT_signature_type)
4283 (decode_locdesc, file_file_name, consume_improper_spaces)
4284 (skip_form_bytes, skip_unknown_opcode, dwarf_parse_macro_header)
4285 (dwarf_decode_macro_bytes, dwarf_decode_macros)
4286 (dwarf2_symbol_mark_computed, set_die_type)
4287 (read_attribute_value): Update.
4288 * stap-probe.c (handle_stap_probe, get_stap_base_address):
4289 Update.
4290 * dbxread.c (unknown_symtype_complaint)
4291 (lbrac_mismatch_complaint, repeated_header_complaint)
4292 (set_namestring, function_outside_compilation_unit_complaint)
4293 (read_dbx_symtab, process_one_symbol): Update.
4294 * gdbtypes.c (stub_noname_complaint): Update.
4295 * windows-nat.c (handle_unload_dll): Update.
4296 * coffread.c (coff_symtab_read, enter_linenos, decode_type)
4297 (decode_base_type): Update.
4298 * xcoffread.c (bf_notfound_complaint, ef_complaint)
4299 (eb_complaint, record_include_begin, record_include_end)
4300 (enter_line_range, xcoff_next_symbol_text, read_xcoff_symtab)
4301 (process_xcoff_symbol, read_symbol)
4302 (function_outside_compilation_unit_complaint)
4303 (scan_xcoff_symtab): Update.
4304 * machoread.c (macho_symtab_read, macho_add_oso_symfile): Update.
4305 * buildsym.c (finish_block_internal, make_blockvector)
4306 (end_symtab_get_static_block, augment_type_symtab): Update.
4307 * dtrace-probe.c (dtrace_process_dof)
4308 (dtrace_static_probe_ops::get_probes): Update.
4309 * complaints.h (struct complaint): Don't declare.
4310 (symfile_complaints): Remove.
4311 (complaint_internal): Remove "complaints" parameter.
4312 (complaint): Likewise.
4313 (clear_complaints): Likewise.
4314 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4315 (reread_symbols): Update.
4316 * dwarf2-frame.c (dwarf2_restore_rule, execute_cfa_program)
4317 (dwarf2_frame_cache, decode_frame_entry): Update.
4318 * dwarf2loc.c (dwarf_reg_to_regnum): Update.
4319 * objc-lang.c (lookup_objc_class, lookup_child_selector)
4320 (info_selectors_command): Update.
4321 * macrotab.c (macro_include, check_for_redefinition)
4322 (macro_undef): Update.
4323 * objfiles.c (filter_overlapping_sections): Update.
4324 * stabsread.c (invalid_cpp_abbrev_complaint)
4325 (reg_value_complaint, stabs_general_complaint, dbx_lookup_type)
4326 (define_symbol, error_type, read_type, rs6000_builtin_type)
4327 (stabs_method_name_from_physname, read_member_functions)
4328 (read_cpp_abbrev, read_baseclasses, read_tilde_fields)
4329 (attach_fields_to_type, complain_about_struct_wipeout)
4330 (read_range_type, read_args, common_block_start)
4331 (common_block_end, cleanup_undefined_types_1, scan_file_globals):
4332 Update.
4333 * mdebugread.c (index_complaint, unknown_ext_complaint)
4334 (basic_type_complaint, bad_tag_guess_complaint)
4335 (bad_rfd_entry_complaint, unexpected_type_code_complaint)
4336 (reg_value_complaint, parse_symbol, parse_type, upgrade_type)
4337 (parse_procedure, parse_lines)
4338 (function_outside_compilation_unit_complaint)
4339 (parse_partial_symbols, psymtab_to_symtab_1, cross_ref)
4340 (bad_tag_guess_complaint, reg_value_complaint): Update.
4341 * cp-support.c (demangled_name_complaint): Update.
4342 * macroscope.c (sal_macro_scope): Update.
4343 * dwarf-index-write.c (class debug_names): Update.
4344
4e9668d0
TT
43452018-05-23 Tom Tromey <tom@tromey.com>
4346
4347 * complaints.c (clear_complaints): Remove "noisy" parameter.
4348 * complaints.h (clear_complaints): Update.
4349 * symfile.c (syms_from_objfile_1, finish_new_objfile)
4350 (reread_symbols): Update.
4351
43ba33c7
TT
43522018-05-23 Tom Tromey <tom@tromey.com>
4353
4354 * complaints.c (enum complaint_series): Remove FIRST_MESSAGE,
4355 SUBSEQUENT_MESSAGE.
4356 (vcomplaint, clear_complaints): Update.
4357 (symfile_explanations): Remove some messages.
4358
2b9496b2
TT
43592018-05-23 Tom Tromey <tom@tromey.com>
4360
4361 * complaints.c (internal_complaint): Remove.
4362 * complaints.h (internal_complaint): Remove.
4363
35f1fea3
MR
43642018-05-22 Maciej W. Rozycki <macro@mips.com>
4365
4366 * i387-tdep.c (i387_collect_xsave): Make `i' unsigned.
4367
6b8edb51
PA
43682018-05-22 Pedro Alves <palves@redhat.com>
4369
4370 * remote-fileio.c (remote_fileio_reply, remote_fileio_ioerror)
4371 (remote_fileio_badfd, remote_fileio_return_errno)
4372 (remote_fileio_return_success, remote_fileio_func_open)
4373 (remote_fileio_func_open, remote_fileio_func_close)
4374 (remote_fileio_func_read, remote_fileio_func_write)
4375 (remote_fileio_func_lseek, remote_fileio_func_rename)
4376 (remote_fileio_func_unlink, remote_fileio_func_stat)
4377 (remote_fileio_func_fstat, remote_fileio_func_gettimeofday)
4378 (remote_fileio_func_isatty, remote_fileio_func_system): Add
4379 remote_target parameter.
4380 (remote_fio_func_map) <func>: Add remote_target parameter.
4381 (do_remote_fileio_request, remote_fileio_request):
4382 * remote-fileio.h (remote_fileio_request):
4383 * remote-notif.c (remote_notif_ack, remote_notif_parse, ): Add
4384 remote_target parameter.
4385 (remote_notif_process, handle_notification): Adjust to pass down
4386 the remote.
4387 (remote_notif_state_allocate): Add remote_target parameter. Save
4388 it.
4389 * remote-notif.h (struct remote_target): Forward declare.
4390 (struct notif_client) <parse, ack, can_get_pending_events>: Add
4391 remote_target parameter.
4392 (struct remote_notif_state) <remote>: New field.
4393 (remote_notif_ack, remote_notif_parse): Add remote_target
4394 parameter.
4395 (remote_notif_state_allocate, remote_notif_state_allocate): Add
4396 remote_target parameter.
4397 * remote.c (OPAQUETHREADBYTES, threadref, gdb_ext_thread_info)
4398 (threads_listing_context, rmt_thread_action, protocol_feature)
4399 (packet_reg, stop_reply, stop_reply_p, enum packet_support)
4400 (packet_result, struct threads_listing_context, remote_state):
4401 Move definitions and declarations higher up.
4402 (remote_target) <~remote_target>: Declare.
4403 (remote_download_command_source, remote_file_put, remote_file_get)
4404 (remote_file_delete, remote_hostio_pread, remote_hostio_pwrite)
4405 (remote_hostio_pread_vFile, remote_hostio_send_command)
4406 (remote_hostio_set_filesystem, remote_hostio_open)
4407 (remote_hostio_close, remote_hostio_unlink, remote_state)
4408 (get_remote_state, get_remote_packet_size, get_memory_packet_size)
4409 (get_memory_write_packet_size, get_memory_read_packet_size)
4410 (append_pending_thread_resumptions, remote_detach_1)
4411 (append_resumption, remote_resume_with_vcont)
4412 (add_current_inferior_and_thread, wait_ns, wait_as)
4413 (process_stop_reply, remote_notice_new_inferior)
4414 (process_initial_stop_replies, remote_add_thread)
4415 (btrace_sync_conf, remote_btrace_maybe_reopen)
4416 (remove_new_fork_children, kill_new_fork_children)
4417 (discard_pending_stop_replies, stop_reply_queue_length)
4418 (check_pending_events_prevent_wildcard_vcont)
4419 (discard_pending_stop_replies_in_queue, stop_reply)
4420 (remote_notif_remove_queued_reply, stop_reply *queued_stop_reply)
4421 (peek_stop_reply, remote_parse_stop_reply, remote_stop_ns)
4422 (remote_interrupt_as, remote_interrupt_ns)
4423 (remote_get_noisy_reply, remote_query_attached)
4424 (remote_add_inferior, remote_current_thread, get_current_thread)
4425 (set_thread, set_general_thread, set_continue_thread)
4426 (set_general_process, write_ptid)
4427 (remote_unpack_thread_info_response, remote_get_threadinfo)
4428 (parse_threadlist_response, remote_get_threadlist)
4429 (remote_threadlist_iterator, remote_get_threads_with_ql)
4430 (remote_get_threads_with_qxfer)
4431 (remote_get_threads_with_qthreadinfo, extended_remote_restart)
4432 (get_offsets, remote_check_symbols, remote_supported_packet)
4433 (remote_query_supported, remote_packet_size)
4434 (remote_serial_quit_handler, remote_detach_pid)
4435 (remote_vcont_probe, remote_resume_with_hc)
4436 (send_interrupt_sequence, interrupt_query)
4437 (remote_notif_get_pending_events, fetch_register_using_p)
4438 (send_g_packet, process_g_packet, fetch_registers_using_g)
4439 (store_register_using_P, store_registers_using_G)
4440 (set_remote_traceframe, check_binary_download)
4441 (remote_write_bytes_aux, remote_write_bytes, remote_read_bytes_1)
4442 (remote_xfer_live_readonly_partial, remote_read_bytes)
4443 (remote_send_printf, remote_flash_write, readchar)
4444 (remote_serial_write, putpkt, putpkt_binary, skip_frame)
4445 (read_frame, getpkt, getpkt_or_notif_sane_1, getpkt_sane)
4446 (getpkt_or_notif_sane, remote_vkill, remote_kill_k)
4447 (extended_remote_disable_randomization, extended_remote_run)
4448 (send_environment_packet, extended_remote_environment_support)
4449 (extended_remote_set_inferior_cwd, remote_write_qxfer)
4450 (remote_read_qxfer, push_stop_reply, vcont_r_supported)
4451 (packet_command): Now methods of ...
4452 (remote_target): ... this class.
4453 (m_remote_state) <remote_target>: New field.
4454 (struct remote_state) <stop_reply_queue,
4455 remote_async_inferior_event_token, wait_forever_enabled_p>: New
4456 fields.
4457 (remote_state::remote_state): Allocate stop_reply_queue.
4458 (remote_state): Delete global.
4459 (get_remote_state_raw): Delete.
4460 (remote_target::get_remote_state): Allocate m_remote_state on
4461 demand.
4462 (get_current_remote_target): New.
4463 (remote_ops, extended_remote_ops): Delete.
4464 (wait_forever_enabled_p, remote_async_inferior_event_token):
4465 Delete, moved to struct remote_state.
4466 (remote_target::close): Delete self. Destruction bits split to
4467 ...
4468 (remote_target::~remote_target): ... this.
4469 (show_memory_packet_size): Adjust to use
4470 get_current_remote_target.
4471 (struct protocol_feature) <func>: Add remote_target parameter.
4472 All callers adjusted.
4473 (curr_quit_handler_target): New.
4474 (remote_serial_quit_handler): Reimplement.
4475 (remote_target::open_1): Adjust to use get_current_remote_target.
4476 Heap-allocate remote_target/extended_remote_target instances.
4477 (vcont_builder::vcont_builder): Add remote_target parameter, and
4478 save it in m_remote. All callers adjusted.
4479 (vcont_builder::m_remote): New field.
4480 (vcont_builder::restart, vcont_builder::flush)
4481 (vcont_builder::push_action): Use it.
4482 (remote_target::commit_resume): Use it.
4483 (struct queue_iter_param) <remote>: New field.
4484 (remote_target::remove_new_fork_children): Fill in 'remote' field.
4485 (check_pending_event_prevents_wildcard_vcont_callback_data): New.
4486 (check_pending_event_prevents_wildcard_vcont_callback)
4487 (remote_target::check_pending_events_prevent_wildcard_vcont)
4488 (remote_target::discard_pending_stop_replies)
4489 (remote_target::discard_pending_stop_replies_in_queue)
4490 (remote_target::remote_notif_remove_queued_reply): Fill in
4491 'remote' field.
4492 (remote_notif_get_pending_events): New.
4493 (remote_target::readchar, remote_target::remote_serial_write):
4494 Save/restore curr_quit_handler_target.
4495 (putpkt): New.
4496 (kill_new_fork_children): Fill in 'remote' field.
4497 (packet_command): Use get_current_remote_target, defer to
4498 remote_target method of same name.
4499 (scoped_remote_fd::scoped_remote_fd): Add 'remote_target'
4500 parameter, and save it in m_remote. All callers adjusted.
4501 (scoped_remote_fd::release): Use m_remote.
4502 (scoped_remote_fd::m_remote): New field.
4503 (remote_file_put, remote_file_get, remote_file_delete): Use
4504 get_current_remote_target, defer to remote_target method of same
4505 name.
4506 (remote_btrace_reset): Add remote_state paremeter. Update all
4507 callers.
4508 (remote_async_inferior_event_handler). Pass down 'data'.
4509 (remote_new_objfile): Use get_current_remote_target.
4510 (remote_target::vcont_r_supported): New.
4511 (set_range_stepping): Use get_current_remote_target and
4512 remote_target::vcont_r_supported.
4513 (_initialize_remote): Don't allocate 'remote_state' and
4514 'stop_reply_queue' globals.
4515 * remote.h (struct remote_target): Forward declare.
4516 (getpkt, putpkt, remote_notif_get_pending_events): Add
4517 'remote_target' parameter.
4518
f5db4863
PA
45192018-05-22 Pedro Alves <palves@redhat.com>
4520
4521 * remote.c (vcont_builder): Now a class. Make all data members
4522 private.
4523 (vcont_builder) <vcont_builder, restart, flush, push_action>:
4524 Declare methods.
4525 (vcont_builder_restart): Rename to ...
4526 (vcont_builder::restart): ... this.
4527 (vcont_builder_flush): Rename to ...
4528 (vcont_builder::flush): ... this.
4529 (vcont_builder_push_action): Rename to ...
4530 (vcont_builder::push_action): ... this.
4531 (remote_target::commit_resume): Adjust.
4532
cc0be08f
PA
45332018-05-22 Pedro Alves <palves@redhat.com>
4534
4535 * remote.c (DEFAULT_MAX_MEMORY_PACKET_SIZE): Rename to ...
4536 (DEFAULT_MAX_MEMORY_PACKET_SIZE_FIXED): ... this.
4537 (get_fixed_memory_packet_size): New.
4538 (get_memory_packet_size): Use it.
4539 (set_memory_packet_size): Don't override the config size with
4540 DEFAULT_MAX_MEMORY_PACKET_SIZE.
4541 (show_memory_packet_size): Use get_fixed_memory_packet_size.
4542 Don't refer to get_memory_packet_size if not connected to a remote
4543 target. Show "(default)" if configured size is 0.
4544
9607784a
PA
45452018-05-22 Pedro Alves <palves@redhat.com>
4546
4547 * remote.c (remote_target::mourn_inferior): Move
4548 discard_pending_stop_replies call here from ...
4549 (_initialize_remote): ... here.
4550
0e9a6b2f
PA
45512018-05-22 Pedro Alves <palves@redhat.com>
4552
4553 * remote.c (compare_section_command): Remove set_general_process
4554 call.
4555
43c3a0e4
PA
45562018-05-22 Pedro Alves <palves@redhat.com>
4557
4558 * remote.c (struct packet_reg, struct remote_arch_state):
4559 Move higher up in the file.
4560 (remote_state) <m_arch_states>: Store remote_arch_state values
4561 instead of remote_arch_state pointers.
4562 (remote_state::get_remote_arch_state): Adjust.
4563
9d6eea31
PA
45642018-05-22 Pedro Alves <palves@redhat.com>
4565
4566 * remote.c: Include <unordered_map>.
4567 (remote_state): Now a class.
4568 (remote_state) <get_remote_arch_state>: Declare method.
4569 <get_remote_arch_state>: New field.
4570 (remote_arch_state) <remote_arch_state>: Declare ctor.
4571 <regs>: Now a unique_ptr.
4572 (remote_gdbarch_data_handle): Delete.
4573 (get_remote_arch_state): Delete.
4574 (remote_state::get_remote_arch_state): New.
4575 (get_remote_state): Adjust to call remote_state's
4576 get_remote_arch_state method.
4577 (init_remote_state): Delete, bits factored out to ...
4578 (remote_arch_state::remote_arch_state): ... this new method.
4579 (get_remote_packet_size, get_memory_packet_size)
4580 (process_g_packet, remote_target::fetch_registers)
4581 (remote_target::prepare_to_store, store_registers_using_G)
4582 (remote_target::store_registers, remote_target::get_trace_status):
4583 Adjust to call remote_state's method.
4584 (_initialize_remote): Remove reference to
4585 remote_gdbarch_data_handle.
4586
dd194f6b
PA
45872018-05-22 Pedro Alves <palves@redhat.com>
4588
4589 * remote.c (struct readahead_cache) <invalidate, invalidate_fd,
4590 pread>: New method declarations.
4591 (remote_target::open_1): Adjust.
4592 (readahead_cache_invalidate): Rename to ...
4593 (readahead_cache::invalidate): ... this, and adjust to be a class
4594 method.
4595 (readahead_cache_invalidate_fd): Rename to ...
4596 (readahead_cache::invalidate_fd): ... this, and adjust to be a
4597 class method.
4598 (remote_hostio_pwrite): Adjust.
4599 (remote_hostio_pread_from_cache): Rename to ...
4600 (readahead_cache::pread): ... this, and adjust to be a class
4601 method.
4602 (remote_hostio_close): Adjust.
4603
440b7aec
PA
46042018-05-22 Pedro Alves <palves@redhat.com>
4605
4606 * remote.c (remote_hostio_close_cleanup): Delete.
4607 (class scoped_remote_fd): New.
4608 (remote_file_put, remote_file_get): Use it.
4609
de44f5a7
PA
46102018-05-22 Pedro Alves <palves@redhat.com>
4611
4612 (struct vCont_action_support): Use bool and initialize all fields.
4613 (struct readahead_cache): Initialize all fields.
4614 (remote_state): Use bool and initialize all fields.
4615 (remote_state::remote_state, remote_state::~remote_state): New.
4616 (new_remote_state): Delete.
4617 (_initialize_remote): Use new to allocate remote_state.
4618
b1b60145
PA
46192018-05-22 Pedro Alves <palves@redhat.com>
4620 張俊芝 <zjz@zjz.name>
4621
4622 PR gdb/22973
4623 * c-exp.y: Include "c-support.h".
4624 (parse_number, c_parse_escape, lex_one_token): Use TOLOWER instead
4625 of tolower. Use c_ident_is_alpha to scan names.
4626 * c-lang.c: Include "c-support.h".
4627 (convert_ucn, convert_octal, convert_hex, convert_escape): Use
4628 ISXDIGIT instead of isxdigit and ISDIGIT instead of isdigit.
4629 * c-support.h: New file, with bits factored out from ...
4630 * cp-name-parser.y: ... this file.
4631 Include "c-support.h".
4632 (cp_ident_is_alpha, cp_ident_is_alnum): Deleted, moved to
4633 c-support.h and renamed.
4634 (symbol_end, yylex): Adjust.
4635
0ec848ad
PFC
46362018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4637
4638 * arch/ppc-linux-common.c (ppc_linux_has_isa205): Change the
4639 parameter type to CORE_ADDR.
4640 * arch/ppc-linux-common.h (ppc_linux_has_isa205): Change the
4641 parameter type in declaration to CORE_ADDR.
4642 * ppc-linux-tdep.c (ppc_linux_core_read_description): Call
4643 target_auxv_search to get AT_HWCAP and use the result to get the
4644 target description.
4645 * ppc-linux-nat.c (ppc_linux_get_hwcap): Change the return type
4646 to CORE_ADDR. Remove the cast of the return value to unsigned
4647 long. Fix error predicate of target_auxv_search.
4648 (ppc_linux_nat_target::read_description): Change the type of the
4649 hwcap variable to CORE_ADDR.
4650
0fb2aaa1
PFC
46512018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4652
4653 * rs6000-tdep.c (rs6000_gdbarch_init): Assign 1 to have_dfp only
4654 if the size of fpscr is larger than 32 bits.
4655
2c3305f6
PFC
46562018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4657
4658 * ppc-linux-tdep.c (ppc_linux_vsxregset): New function.
4659 (ppc32_linux_vsxregmap): New global.
4660 (ppc32_linux_vsxregset): Initialize with ppc32_linux_vsxregmap,
4661 regcache_supply_regset, and regcache_collect_regset.
4662 * ppc-linux-tdep.h (ppc_linux_vsxregset): Declare.
4663 * ppc-linux-nat.c (supply_vsxregset, fill_vsxregset): Remove.
4664 (fetch_vsx_register, store_vsx_register): Remove.
4665 (fetch_vsx_registers): Add regno parameter. Get regset using
4666 ppc_linux_vsxregset. Use regset to supply registers.
4667 (store_vsx_registers): Add regno parameter. Get regset using
4668 ppc_linux_vsxregset. Use regset to collect registers.
4669 (fetch_register): Call fetch_vsx_registers instead of
4670 fetch_vsx_register.
4671 (store_register): Call store_vsx_registers instead of
4672 store_vsx_register.
4673 (fetch_ppc_registers): Call fetch_vsx_registers with -1 for the
4674 new regno parameter.
4675 (store_ppc_registers): Call store_vsx_registers with -1 for the
4676 new regno parameter.
4677 * rs6000-tdep.c (ppc_vsx_support_p, ppc_supply_vsxreget)
4678 (ppc_collect_vsxregset): Remove.
4679
1d75a658
PFC
46802018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4681
4682 * ppc-tdep.h (struct ppc_reg_offsets): Remove vector register
4683 offset fields.
4684 * ppc-fbsd-tdep.c (ppc32_fbsd_reg_offsets): Remove initializers
4685 for vector register offset fields.
4686 (ppc64_fbsd_reg_offsets): Likewise.
4687 * ppc-nbsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4688 to vector register offset fields.
4689 * ppc-obsd-tdep.c (_initialize_ppcnbsd_tdep): Remove assignment
4690 to vector register offset fields.
4691 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Remove assignment to
4692 vector register offset fields.
4693 * rs6000-aix-tdep.c (rs6000_aix32_reg_offsets): Remove
4694 initializers for vector register offset fields.
4695 (rs6000_aix64_reg_offsets): Likewise.
4696 * rs6000-tdep.c (ppc_vrreg_offset): Remove.
4697 (ppc_supply_vrregset): Remove.
4698 (ppc_collect_vrregset): Remove.
4699 * ppc-linux-tdep.c (ppc_linux_collect_vrregset): New function.
4700 (ppc_linux_vrregset) : New function.
4701 (ppc32_le_linux_vrregmap, ppc32_be_linux_vrregmap)
4702 (ppc32_le_linux_vrregset, ppc32_be_linux_vrregset): New globals.
4703 (ppc32_linux_vrregset): Remove.
4704 (ppc_linux_iterate_over_regset_sections): Call ppc_linux_vrregset
4705 and use result instead of ppc32_linux_vrregset.
4706 (ppc32_linux_reg_offsets): Remove initializers for vector register
4707 offset fields.
4708 (ppc64_linux_reg_offsets): Likewise.
4709 * ppc-linux-tdep.h (ppc_linux_vrregset): New declaration.
4710 * ppc-linux-nat.c: Include regset.h.
4711 (gdb_vrregset_t): Adjust comment to account for little-endian
4712 mode.
4713 (supply_vrregset, fill_vrregset): Remove.
4714 (fetch_altivec_register, store_altivec_register): Remove.
4715 (fetch_altivec_registers): Add regno parameter. Get regset using
4716 ppc_linux_vrregset. Use regset to supply registers.
4717 (store_altivec_registers): Add regno parameter. Get regset using
4718 ppc_linux_vrregset. Use regset to collect registers.
4719 (fetch_register): Call fetch_altivec_registers instead of
4720 fetch_altivec_register.
4721 (store_register): Call store_altivec_registers instead of
4722 store_altivec_register.
4723 (fetch_ppc_registers): Call fetch_altivec_registers with -1 for
4724 the new regno parameter.
4725 (store_ppc_registers): Call store_altivec_registers with -1 for
4726 the new regno parameter.
4727
d078308a
PFC
47282018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4729
4730 * arch/ppc-linux-common.h (PPC_LINUX_SIZEOF_VRREGSET)
4731 (PPC_LINUX_SIZEOF_VSXREGSET): Define.
4732 * ppc-linux-nat.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
4733 (gdb_vrregset_t): Change array type size to
4734 PPC_LINUX_SIZEOF_VRREGSET.
4735 (gdb_vsxregset_t): Change array type size to
4736 PPC_LINUX_SIZEOF_VSXREGSET.
4737 * ppc-linux-tdep.c (ppc_linux_iterate_over_regset_sections):
4738 Change integer literals to PPC_LINUX_SIZEOF_VRREGSET and
4739 PPC_LINUX_SIZEOF_VSXREGSET.
4740
2e077f5e
PFC
47412018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4742
4743 * configure.nat <linux powerpc>: Add ppc-linux.o to NATDEPFILES.
4744 * ppc-linux-nat.c (ppc_linux_target_wordsize): Move to
4745 nat/ppc-linux.c.
4746 (ppc_linux_nat_target::auxv_parse): Get thread id tid. Call
4747 ppc_linux_target_wordsize with tid.
4748 (ppc_linux_nat_target::read_description): Call ppc_linux_target
4749 wordsize with tid.
4750 * nat/ppc-linux.c: Include nat/gdb_ptrace.h.
4751 (ppc64_64bit_inferior_p): Add static and inline specifiers.
4752 (ppc_linux_target_wordsize): Move here from ppc-linux-nat.c. Add
4753 tid parameter. Remove static specifier.
4754 * nat/ppc-linux.h (ppc64_64bit_inferior_p): Remove declaration.
4755 (ppc_linux_target_wordsize): New declaration.
4756
bd64614e
PFC
47572018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
4758
4759 * arch/ppc-linux-common.c: New file.
4760 * arch/ppc-linux-common.h: New file.
4761 * arch/ppc-linux-tdesc.h: New file.
4762 * configure.tgt (powerpc*-*-linux*): Add arch/ppc-linux-common.o.
4763 * Makefile.in (ALL_TARGET_OBS): Add arch/ppc-linux-common.o.
4764 (HFILES_NO_SRCDIR): Add arch/ppc-linux-common.h and
4765 arch/ppc-linux-tdesc.h.
4766 * ppc-linux-nat.c: Include arch/ppc-linux-common.h and
4767 arch/ppc-linux-tdesc.h.
4768 (ppc_linux_nat_target::read_description): Remove target
4769 description matching code. Fill a ppc_linux_features struct and
4770 call ppc_linux_match_description with it. Move comment about ISA
4771 2.05 to ppc-linux-common.c.
4772 * ppc-linux-tdep.c: Include arch/ppc-linux-common.h and
4773 arch/ppc-linux-tdesc.h.
4774 (ppc_linux_core_read_description): Remove target description
4775 matching code. Fill a ppc_linux_features struct and call
4776 ppc_linux_match_description with it.
4777 * ppc-linux-tdep.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
4778 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
4779 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
4780 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
4781 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
4782 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
4783 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
4784 (tdesc_powerpc_e500l): Remove.
4785
241db429
JB
47862018-05-22 Joel Brobecker <brobecker@adacore.com>
4787
4788 * ada-lang.c (catch_assert_command): Pass empty string instead
4789 of NULL for excep_string argument.
4790
75d74cca
MR
47912018-05-22 Maciej W. Rozycki <macro@mips.com>
4792
4793 * mips-linux-nat.c (mips64_linux_register_addr): Return -1 if
4794 the width of the requested register exceeds the width of the
4795 `ptrace' data type.
4796
122b53ea
TT
47972018-05-21 Tom Tromey <tom@tromey.com>
4798
4799 * printcmd.c (output_command): Remove.
4800 (output_command_const): Rename to output_command.
4801 * valprint.h (output_command): Rename from output_command_const.
4802 * tracepoint.c (trace_dump_actions): Call output_command.
4803
bc18fbb5
TT
48042018-05-21 Tom Tromey <tom@tromey.com>
4805
4806 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
4807 (mi_cmd_catch_exception, mi_cmd_catch_handlers): Update.
4808 * ada-lang.h (create_ada_exception_catchpoint): Update.
4809 * ada-lang.c (struct ada_catchpoint) <excep_string>: Now a
4810 std::string.
4811 (create_excep_cond_exprs, ~ada_catchpoint)
4812 (should_stop_exception, print_one_exception)
4813 (print_mention_exception, print_recreate_exception): Update.
4814 (ada_get_next_arg): Remove.
4815 (catch_ada_exception_command_split): Use std::string. Change type
4816 of "excep_string", "cond_string".
4817 (catch_ada_exception_command): Update.
4818 (create_ada_exception_catchpoint): Change type of excep_string.
4819 (ada_exception_sal): Remove excep_string parameter.
4820 (~ada_catchpoint): Remove.
4821
790217f6
TT
48222018-05-21 Tom Tromey <tom@tromey.com>
4823
4824 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
4825 cleanup.
4826
6f46ac85
TT
48272018-05-21 Tom Tromey <tom@tromey.com>
4828
4829 * ada-lang.c (ada_exception_message_1, ada_exception_message):
4830 Return unique_xmalloc_ptr.
4831 (print_it_exception): Update.
4832
15b6611c
TT
48332018-05-21 Tom Tromey <tom@tromey.com>
4834
4835 * tracepoint.c (trace_dump_actions): Use std::string.
4836
c0c9f665
TT
48372018-05-21 Tom Tromey <tom@tromey.com>
4838
4839 * symfile.c (reread_symbols): Use std::string for original_name.
4840
22ca247e
TT
48412018-05-21 Tom Tromey <tom@tromey.com>
4842
4843 * dwarf2read.c (dwarf2_read_debug_names): Use std::unique_ptr.
4844 (mapped_index_base): Use DISABLE_COPY_AND_ASSIGN. Default
4845 constructor.
4846
184cde75
SM
48472018-05-20 Simon Marchi <simon.marchi@polymtl.ca>
4848
4849 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Rename the wrong
4850 instance to...
4851 (HAVE_IS_TRIVIALLY_CONSTRUCTIBLE): ... this.
4852 * objfiles.c (get_objfile_bfd_data): Allocate
4853 objfile_per_bfd_storage with obstack_new when allocating on
4854 obstack.
4855
e39db4db
SM
48562018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4857
4858 * ada-lang.c (cache_symbol): Use XOBNEW and/or XOBNEWVEC and/or
4859 OBSTACK_ZALLOC.
4860 * dwarf2-frame.c (dwarf2_build_frame_info): Likewise.
4861 * hppa-tdep.c (hppa_init_objfile_priv_data): Likewise.
4862 * mdebugread.c (mdebug_build_psymtabs): Likewise.
4863 (add_pending): Likewise.
4864 (parse_symbol): Likewise.
4865 (parse_partial_symbols): Likewise.
4866 (psymtab_to_symtab_1): Likewise.
4867 (new_psymtab): Likewise.
4868 (elfmdebug_build_psymtabs): Likewise.
4869 * minsyms.c (terminate_minimal_symbol_table): Likewise.
4870 * objfiles.c (get_objfile_bfd_data): Likewise.
4871 (objfile_register_static_link): Likewise.
4872 * psymtab.c (allocate_psymtab): Likewise.
4873 * stabsread.c (read_member_functions): Likewise.
4874 * xcoffread.c (xcoff_end_psymtab): Likewise.
4875
284a0e3c
SM
48762018-05-20 Simon Marchi <simon.marchi@ericsson.com>
4877
4878 * common/traits.h (HAVE_IS_TRIVIALLY_COPYABLE): Define if
4879 compiler supports std::is_trivially_constructible.
4880 * common/poison.h: Include obstack.h.
4881 (IsMallocable): Define to is_trivially_constructible if the
4882 compiler supports it, define to true_type otherwise.
4883 (xobnew): New.
4884 (XOBNEW): Redefine.
4885 (xobnewvec): New.
4886 (XOBNEWVEC): Redefine.
4887 * gdb_obstack.h (obstack_zalloc): New.
4888 (OBSTACK_ZALLOC): Redefine.
4889 (obstack_calloc): New.
4890 (OBSTACK_CALLOC): Redefine.
4891 (obstack_new): New.
4892 * gdbarch.sh: Include gdb_obstack in gdbarch.h.
4893 (gdbarch_obstack): New declaration in gdbarch.h, definition in
4894 gdbarch.c.
4895 (GDBARCH_OBSTACK_CALLOC, GDBARCH_OBSTACK_ZALLOC): Use
4896 obstack_calloc/obstack_zalloc.
4897 (gdbarch_obstack_zalloc): Remove.
4898 * target-descriptions.c (tdesc_data_init): Use obstack_new.
4899
59f66be3
PW
49002018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4901
4902 * stack.c (backtrace_command_1): Remove useless variable int i.
4903
50c65c2d
PW
49042018-05-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4905
4906 * stack.c (print_frame_info): Fix comment.
4907
7ff8cb8c
TT
49082018-05-18 Tom Tromey <tom@tromey.com>
4909
4910 * dwarf2read.c (struct dwz_file): Add constructor, initializers.
4911 <dwz_bfd>: Now a gdb_bfd_ref_ptr.
4912 (~dwarf2_per_objfile): Update
4913 (dwarf2_get_dwz_file): Use new.
4914 * dwarf2read.h (struct dwarf2_per_objfile) <dwz_file>: Now a
4915 unique_ptr.
4916
400174b1
TT
49172018-05-18 Tom Tromey <tom@tromey.com>
4918
4919 * dwarf2read.h (struct dwarf2_per_objfile) <dwp_file>: Now a
4920 unique_ptr.
4921 * dwarf2read.c (struct dwp_file): Add constructor and
4922 initializers.
4923 (open_and_init_dwp_file): Return a unique_ptr.
4924 (dwarf2_per_objfile, create_dwp_hash_table)
4925 (create_dwo_unit_in_dwp_v1, create_dwo_unit_in_dwp_v2)
4926 (lookup_dwo_unit_in_dwp): Update.
4927 (open_and_init_dwp_file, get_dwp_file): Update.
4928
3063847f
TT
49292018-05-18 Tom Tromey <tom@tromey.com>
4930
4931 * dwarf2read.c (dwarf2_per_objfile): Update.
4932 (struct mapped_index): Add initializers.
4933 (dwarf2_read_index): Use new.
4934 (dw2_symtab_iter_init): Update.
4935 * dwarf2read.h (struct dwarf2_per_objfile) <index_table>: Now a
4936 unique_ptr.
4937
d3d02dee
SM
49382018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4939
4940 * dwarf2read.c (mapped_index) <total_size>: Remove.
4941
1d143c36
SM
49422018-05-18 Simon Marchi <simon.marchi@ericsson.com>
4943
4944 * unittests/format_pieces-selftests.c (test_format_specifier):
4945 Add ARI comments.
4946
ce1e8424
TT
49472018-05-18 Tom Tromey <tom@tromey.com>
4948
4949 * c-typeprint.c (maybe_print_hole): New function.
4950 (c_print_type_struct_field_offset): Update.
4951 (c_type_print_base_struct_union): Call maybe_print_hole.
4952
ddfe970e
KS
49532018-05-17 Keith Seitz <keiths@redhat.com>
4954
4955 * breakpoint.c (build_bpstat_chain): New function, moved from
4956 bpstat_stop_status.
4957 (bpstat_stop_status): Add optional parameter, `stop_chain'.
4958 If no stop chain is passed, call build_bpstat_chain to build it.
4959 * breakpoint.h (build_bpstat_chain): Declare.
4960 (bpstat_stop_status): Move documentation here from breakpoint.c.
4961 * infrun.c (handle_signal_stop): Before eliding inlined frames,
4962 build the stop chain and pass it to skip_inline_frames.
4963 Pass this stop chain to bpstat_stop_status.
4964 * inline-frame.c: Include breakpoint.h.
4965 (stopped_by_user_bp_inline_frame): New function.
4966 (skip_inline_frames): Add parameter `stop_chain'.
4967 Move documention to inline-frame.h.
4968 If non-NULL, use stopped_by_user_bp_inline_frame to determine
4969 whether the frame should be elided.
4970 * inline-frame.h (skip_inline_frames): Add parameter `stop_chain'.
4971 Add moved documentation and update for new parameter.
4972
b17992c1
SM
49732018-05-17 Simon Marchi <simon.marchi@ericsson.com>
4974
4975 PR cli/14975
4976 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4977 unittests/format_pieces-selftests.c.
4978 * common/format.h (format_piece) <operator==>: New.
4979 (format_pieces) <operator[]>: Remove.
4980 * common/format.c (format_pieces::format_pieces): Handle \e.
4981 * unittests/format_pieces-selftests.c: New.
4982
58f0c718
TT
49832018-05-17 Tom Tromey <tom@tromey.com>
4984
4985 PR symtab/23010:
4986 * dwarf2read.c (load_cu, dw2_do_instantiate_symtab)
4987 (dw2_instantiate_symtab): Add skip_partial parameter.
4988 (dw2_find_last_source_symtab, dw2_map_expand_apply)
4989 (dw2_lookup_symbol, dw2_expand_symtabs_for_function)
4990 (dw2_expand_all_symtabs, dw2_expand_symtabs_with_fullname)
4991 (dw2_expand_symtabs_matching_one)
4992 (dw2_find_pc_sect_compunit_symtab)
4993 (dw2_debug_names_lookup_symbol)
4994 (dw2_debug_names_expand_symtabs_for_function): Update.
4995 (init_cutu_and_read_dies): Add skip_partial parameter.
4996 (process_psymtab_comp_unit, build_type_psymtabs_1)
4997 (process_skeletonless_type_unit, load_partial_comp_unit)
4998 (psymtab_to_symtab_1): Update.
4999 (load_full_comp_unit): Add skip_partial parameter.
5000 (process_imported_unit_die, dwarf2_read_addr_index)
5001 (follow_die_offset, dwarf2_fetch_die_loc_sect_off)
5002 (dwarf2_fetch_constant_bytes, dwarf2_fetch_die_type_sect_off)
5003 (read_signatured_type): Update.
5004
3e618834
SM
50052018-05-17 Simon Marchi <simon.marchi@ericsson.com>
5006
5007 * value.c (release_value): Remove unused variable.
5008 (record_latest_value): Likewise.
5009 (access_value_history): Likewise.
5010 (preserve_values): Likewise.
5011
fe10fe31
TT
50122018-05-17 Tom Tromey <tom@tromey.com>
5013
5014 * extension.h (struct ext_lang_type_printers) <py_type_printers>:
5015 Initialize.
5016
1d761124
MR
50172018-05-16 Maciej W. Rozycki <macro@mips.com>
5018
5019 PR gdb/22286
5020 * linux-nat-trad.c (linux_nat_trad_target::fetch_register):
5021 Also handle registers whose width is not a multiple of
5022 PTRACE_TYPE_RET.
5023 (linux_nat_trad_target::store_register): Likewise.
5024
06333fea
TT
50252018-05-16 Tom Tromey <tom@tromey.com>
5026
5027 * gdbcore.h (core_bfd): Redefine.
5028 * corelow.c (core_target::close): Update.
5029 (core_target_open): Update.
5030 * progspace.h (struct program_space) <cbfd>: Now a
5031 gdb_bfd_ref_ptr.
5032
921222e2
TT
50332018-05-16 Tom Tromey <tom@tromey.com>
5034
5035 PR cli/19551:
5036 * symfile-add-flags.h (enum symfile_add_flags)
5037 <SYMFILE_NOT_FILENAME>: New constant.
5038 * symfile.c (read_symbols): Use SYMFILE_NOT_FILENAME. Get
5039 objfile name from BFD.
5040 (symbol_file_add_with_addrs): Check SYMFILE_NOT_FILENAME.
5041 * minidebug.c (find_separate_debug_file_in_section): Put
5042 ".gnu_debugdata" into BFD's file name.
5043
3acb7083
SM
50442018-05-16 Simon Marchi <simon.marchi@ericsson.com>
5045
5046 * regcache.c (regcache_read_ftype, regcache_write_ftype):
5047 Remove.
5048
561a72d4
TC
50492018-05-15 Tamar Christina <tamar.christina@arm.com>
5050
5051 PR binutils/21446
5052 * aarch64-tdep.c (aarch64_analyze_prologue,
5053 aarch64_software_single_step, aarch64_displaced_step_copy_insn):
5054 Indicate not interested in errors.
5055
4e6ff0e1
MR
50562018-05-15 Maciej W. Rozycki <macro@mips.com>
5057
5058 * mips-linux-nat.c (mips_linux_nat_target::fetch_registers):
5059 Supply the MIPS_ZERO_REGNUM register.
5060
ea33cd92
MR
50612018-05-15 Maciej W. Rozycki <macro@mips.com>
5062
5063 * mips-tdep.c (mask_address_var): Make variable static.
5064
2d79090e
TT
50652018-05-14 Tom Tromey <tom@tromey.com>
5066
5067 * dwarf2read.c (rust_union_quirks): Clear rust_unions.
5068
cf4912ae
AB
50692018-05-11 Andrew Burgess <andrew.burgess@embecosm.com>
5070
5071 * i387-tdep.c (i387_collect_xsave): Use FXSAVE_MXCSR_ADDR not
5072 FXSAVE_ADDR for the mxcsr register.
5073
67e6f569
MF
50742018-05-11 Max Filippov <jcmvbkbc@gmail.com>
5075
5076 * configure.tgt (xtensa*-*-linux*): Drop gdb_target definition.
5077
15244507
PA
50782018-05-11 Pedro Alves <palves@redhat.com>
5079
5080 * corelow.c (core_target) <core_target>: No longer inline.
5081 Initialize m_core_gdbarch, m_core_vec and build the section table
5082 here.
5083 <~core_target>: New.
5084 <core_gdbarch, get_core_register_section>: New methods.
5085 <m_core_section_table, m_core_vec, m_core_gdbarch>: New fields,
5086 factored out from ...
5087 <core_data, core_vec, core_gdbarch>: ... these deleted globals.
5088 (core_ops): Delete.
5089 (sniff_core_bfd): Add gdbarch parameter.
5090 (core_close): Delete, merged into ...
5091 (core_target::close): ... here. Delete self.
5092 (core_close_cleanup): Delete.
5093 (core_target_open): Allocate a core_target on the heap. Use a
5094 unique_ptr instead of a cleanup. Bits moved into the core_target
5095 ctor. Adjust to use core_target methods instead of globals.
5096 (get_core_register_section): Rename to ...
5097 (core_target::get_core_register_section): ... this and adjust.
5098 (struct get_core_registers_cb_data): New.
5099 (get_core_registers_cb): Use it. Use bool.
5100 (core_target::fetch_registers, core_target::files_info)
5101 (core_target::xfer_partial, core_target::read_description)
5102 (core_target::pid_to, core_target::thread_name): Adjust to
5103 reference class fields instead of globals.
5104 * target.h (struct target_ops_deleter, target_ops_up): New.
5105
451953fa
PA
51062018-05-11 Pedro Alves <palves@redhat.com>
5107
5108 * corefile.c (core_file_command): Move to corelow.c.
5109 * corelow.c (the_core_target): Delete.
5110 (core_file_command): Moved from corefile.c. Check exec_bfd
5111 instead of the_core_target. Use target_detach instead of calling
5112 into the_core_target directly.
5113 (maybe_say_no_core_file_now): New.
5114 (core_target::detach): Use it.
5115 (_initialize_corelow): Remove references to the_core_target.
5116 * gdbcore.h (the_core_target): Delete.
5117
e540a5a2 51182018-05-11 Tom Tromey <tromey@redhat.com>
3afc23a6 5119 Pedro Alves <palves@redhat.com>
e540a5a2
TT
5120
5121 * corefile.c (core_bfd): Remove.
5122 * gdbcore.h (core_bfd): Now a macro.
5123 * progspace.h (struct program_space) <cbfd>: New field.
5124
633cf254
TT
51252018-05-11 Tom Tromey <tom@tromey.com>
5126
5127 * mdebugread.c (parse_partial_symbols, psymtab_to_symtab_1): Use
5128 gdb::def_vector.
5129
1a34f210
TT
51302018-05-10 Tom Tromey <tom@tromey.com>
5131
5132 * configure: Rebuild.
5133 * warning.m4 (AM_GDB_WARNINGS): Use -Wimplicit-fallthrough=3.
5134
190852c8
JB
51352018-05-10 Joel Brobecker <brobecker@adacore.com>
5136
5137 PR server/23158:
5138 * regformats/regdat.sh: Adjust script, following the addition
5139 of the new expedite_regs parameter to init_target_desc.
5140
8727de56
OJ
51412018-05-10 Omair Javaid <omair.javaid@linaro.org>
5142
5143 PR gdb/23127
5144 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Add call to
5145 set_gdbarch_significant_addr_bit.
5146 * aarch64-tdep.c (aarch64_gdbarch_init): Remove call to
5147 set_gdbarch_significant_addr_bit.
5148 * utils.c (address_significant): Update to sign extend addr.
5149
37d9e062
MF
51502018-05-09 Max Filippov <jcmvbkbc@gmail.com>
5151
5152 * xtensa-linux-tdep.c (xtensa-tdep.h): New include.
5153 (xtensa_linux_init_abi): Limit tdep->num_regs by
5154 tdep->num_nopriv_regs.
5155 * xtensa-tdep.c (xtensa_derive_tdep): Calculate
5156 tdep->num_nopriv_regs and only copy it to tdep->num_regs if it's
5157 not initialized.
5158
7402fbca
SM
51592018-05-08 Simon Marchi <simon.marchi@ericsson.com>
5160
5161 * unittests/string_view-selftests.c: Define GNULIB_NAMESPACE.
5162
8ee22052
AB
51632018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
5164
5165 * common/x86-xstate.h (I387_FCTRL_INIT_VAL): New constant.
5166 (I387_MXCSR_INIT_VAL): New constant.
5167 * amd64-tdep.c (amd64_supply_xsave): Only read state from xsave
5168 buffer if it was supplied by the inferior.
5169 * i387-tdep.c (i387_supply_fsave): Use I387_MXCSR_INIT_VAL.
5170 (i387_xsave_get_clear_bv): New function.
5171 (i387_supply_xsave): Only read x87 control registers from the
5172 xsave buffer if the feature is enabled, and the state will have
5173 been written, otherwise, provide a suitable default.
5174 (i387_collect_xsave): Pre-clear all registers in xsave buffer,
5175 including x87 control registers. Update control registers if they
5176 have changed from the default value, and mark features as enabled
5177 as required.
5178 * i387-tdep.h (i387_xsave_get_clear_bv): Declare.
5179
968ae51b
UW
51802018-05-08 Ulrich Weigand <uweigand@de.ibm.com>
5181
5182 * spu-tdep.c (info_spu_event_command): Fix output formatting.
5183
aff689d3
TT
51842018-05-07 Tom Tromey <tom@tromey.com>
5185
5186 * configure: Rebuild.
5187 * warning.m4 (AM_GDB_WARNINGS): Add -Wduplicated-cond.
5188
ce887586
TT
51892018-05-07 Tom Tromey <tom@tromey.com>
5190
5191 PR tdep/20362:
5192 * arm-tdep.c (arm_record_vfp_data_proc_insn): Properly mask off D
5193 bit. Use correct value for VDIV.
5194
85e26832
TT
51952018-05-04 Tom Tromey <tom@tromey.com>
5196
5197 * configure: Rebuild.
5198 * warning.m4 (AM_GDB_WARNINGS): Add -Wimplicit-fallthrough.
5199
449b1ac7
TT
52002018-05-04 Tom Tromey <tom@tromey.com>
5201
5202 * linux-record.c (record_linux_system_call) <case
5203 RECORD_SYS_RECVFROM>: Add "break".
5204
15c9ffd6
TT
52052018-05-04 Tom Tromey <tom@tromey.com>
5206
5207 * mi/mi-main.c (mi_cmd_trace_frame_collected) <REGISTERS_FORMAT>:
5208 Add missing "break".
5209 * mi/mi-cmd-stack.c (mi_cmd_stack_list_locals) <NO_FRAME_FILTERS>:
5210 Add missing "break".
5211
e3829d13
TT
52122018-05-04 Tom Tromey <tom@tromey.com>
5213
5214 * rs6000-tdep.c (ppc_process_record_op4)
5215 (ppc_process_record_op63): Add fall-through comment.
5216
da0e1563
TT
52172018-05-04 Tom Tromey <tom@tromey.com>
5218
5219 * i386-tdep.c (i386_process_record): Add fall-through comment.
5220
0019cd49
TT
52212018-05-04 Tom Tromey <tom@tromey.com>
5222
5223 * stabsread.c (define_symbol) <case 'p'>: Add fall-through
5224 comment.
5225
565e0eda
TT
52262018-05-04 Tom Tromey <tom@tromey.com>
5227
5228 * riscv-tdep.c (riscv_isa_xlen): Add fall-through comment.
5229 * utils.c (can_dump_core) <LIMIT_CUR>: Add fall-through comment.
5230 * eval.c (fetch_subexp_value) <MEMORY_ERROR>: Add fall-through
5231 comment.
5232 * d-valprint.c (d_val_print) <TYPE_CODE_STRUCT>: Add fall-through
5233 comment.
5234 * coffread.c (coff_symtab_read) <C_LABEL>: Add fall-through
5235 comment.
5236
621846f4
TT
52372018-05-04 Tom Tromey <tom@tromey.com>
5238
5239 * dwarf2loc.c (unimplemented): Add ATTRIBUTE_NORETURN.
5240
86a73007
TT
52412018-05-04 Tom Tromey <tom@tromey.com>
5242
5243 * s390-tdep.c (s390_process_record): Fix fall-through comments.
5244 * xcoffread.c (scan_xcoff_symtab): Move comment later.
5245 * symfile.c (section_is_mapped): Fix fall-through comment.
5246 * stabsread.c (define_symbol, read_member_functions): Fix
5247 fall-through comment.
5248 * s390-linux-tdep.c (s390_process_record): Fix fall-through
5249 comment.
5250 * remote.c (remote_wait_as): Fix fall-through comment.
5251 * p-exp.y (yylex): Fix fall-through comment.
5252 * nat/x86-dregs.c (x86_length_and_rw_bits): Fix fall-through
5253 comment.
5254 * msp430-tdep.c (msp430_gdbarch_init): Fix fall-through comment.
5255 * mdebugread.c (parse_partial_symbols): Fix fall-through comment.
5256 * jv-exp.y (yylex): Fix fall-through comment.
5257 * go-exp.y (lex_one_token): Fix fall-through comment.
5258 * gdbtypes.c (get_discrete_bounds, rank_one_type): Fix
5259 fall-through comment.
5260 * f-exp.y (yylex): Fix fall-through comment.
5261 * dwarf2read.c (process_die): Fix fall-through comments.
5262 * dbxread.c (process_one_symbol): Fix fall-through comment.
5263 * d-exp.y (lex_one_token): Fix fall-through comment.
5264 * cp-name-parser.y (yylex): Fix fall-through comment.
5265 * coffread.c (coff_symtab_read): Fix fall-through comment.
5266 * c-exp.y (lex_one_token): Fix fall-through comment.
5267 * arm-tdep.c (arm_decode_miscellaneous): Fix fall-through
5268 comment.
5269 * arch/arm.c (arm_instruction_changes_pc): Fix fall-through
5270 comment.
5271
56bcdbea
TT
52722018-05-04 Tom Tromey <tom@tromey.com>
5273
5274 PR python/22730:
5275 * NEWS: Mention gdb.execute change.
5276 * gdbcmd.h (execute_control_command): Don't declare.
5277 * python/python.c (execute_gdb_command): Use read_command_lines_1,
5278 execute_control_commands, execute_control_commands_to_string.
5279 * cli/cli-script.h (execute_control_commands)
5280 (execute_control_commands_to_string): Declare.
5281 (execute_control_command): Add from_tty parameter.
5282 * cli/cli-script.c (execute_control_commands)
5283 (execute_control_commands_to_string): New functions.
5284 (execute_user_command): Use execute_control_commands.
5285 (execute_control_command_1): Add "from_tty" parameter. Update.
5286 (execute_control_command): Likewise.
5287
a913fffb
TT
52882018-05-04 Tom Tromey <tom@tromey.com>
5289
5290 PR python/22731:
5291 * NEWS: Mention that breakpoint commands are writable.
5292 * python/py-breakpoint.c (bppy_set_commands): New function.
5293 (breakpoint_object_getset) <"commands">: Use it.
5294
60b3cef2
TT
52952018-05-04 Tom Tromey <tom@tromey.com>
5296
5297 * tracepoint.c (actions_command): Update.
5298 * mi/mi-cmd-break.c (mi_command_line_array)
5299 (mi_command_line_array_cnt, mi_command_line_array_ptr)
5300 (mi_read_next_line): Remove.
5301 (mi_cmd_break_commands): Update.
5302 * cli/cli-script.h (read_command_lines, read_command_lines_1): Use
5303 function_view.
5304 * cli/cli-script.c (get_command_line): Update.
5305 (process_next_line): Use function_view. Constify.
5306 (recurse_read_control_structure, read_command_lines)
5307 (read_command_lines_1): Change argument types to function_view.
5308 (do_define_command, document_command): Update.
5309 * breakpoint.h (check_tracepoint_command): Don't declare.
5310 * breakpoint.c (check_tracepoint_command): Remove.
5311 (commands_command_1, create_tracepoint_from_upload): Update.
5312
7a2c85f2
TT
53132018-05-04 Tom Tromey <tom@tromey.com>
5314
5315 PR gdb/11750:
5316 * cli/cli-script.h (enum command_control_type) <define_control>:
5317 New constant.
5318 * cli/cli-script.c (multi_line_command_p): Handle define_control.
5319 (build_command_line, execute_control_command_1)
5320 (process_next_line): Likewise.
5321 (do_define_command): New function, extracted from define_command.
5322 (define_command): Use it.
5323
295dc222
TT
53242018-05-04 Tom Tromey <tom@tromey.com>
5325
5326 * tracepoint.c (actions_command): Update.
5327 * cli/cli-script.h (read_command_lines): Update.
5328 * cli/cli-script.c (read_command_lines): Constify prompt_arg.
5329 (MAX_TMPBUF): Remove define.
5330 (define_command): Use string_printf.
5331 (document_command): Likewise.
5332 * breakpoint.c (commands_command_1): Update.
5333
1263a9d5
TT
53342018-05-04 Tom Tromey <tom@tromey.com>
5335
5336 * top.c (execute_command): Update.
5337 * cli/cli-script.h (print_command_lines): Now varargs.
5338 * cli/cli-script.c (print_command_lines): Now varargs.
5339 (execute_control_command_1) <case while_control, case if_control>:
5340 Update.
5341
12973681
TT
53422018-05-04 Tom Tromey <tom@tromey.com>
5343
5344 * tracepoint.c (all_tracepoint_actions): Rename from
5345 all_tracepoint_actions_and_cleanup. Change return type.
5346 (actions_command, encode_actions_1, encode_actions)
5347 (trace_dump_actions, tdump_command): Update.
5348 * remote.c (remote_download_command_source): Update.
5349 * python/python.c (gdbpy_eval_from_control_command)
5350 (python_command, python_interactive_command): Update.
5351 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
5352 * guile/guile.c (guile_command)
5353 (gdbscm_eval_from_control_command, guile_command): Update.
5354 * compile/compile.c (compile_code_command)
5355 (compile_print_command, compile_to_object): Update.
5356 * cli/cli-script.h (struct command_lines_deleter): New.
5357 (counted_command_line): New typedef.
5358 (struct command_line): Add constructor, destructor.
5359 <body_list>: Remove.
5360 <body_list_0, body_list_1>: New members.
5361 (command_line_up): Remove typedef.
5362 (read_command_lines, read_command_lines_1, get_command_line):
5363 Update.
5364 (copy_command_lines): Don't declare.
5365 * cli/cli-script.c (build_command_line): Use "new".
5366 (get_command_line): Return counted_command_line.
5367 (print_command_lines, execute_user_command)
5368 (execute_control_command_1, while_command, if_command): Update.
5369 (realloc_body_list): Remove.
5370 (process_next_line, recurse_read_control_structure): Update.
5371 (read_command_lines, read_command_lines_1): Return counted_command_line.
5372 (free_command_lines): Use "delete".
5373 (copy_command_lines): Remove.
5374 (define_command, document_command, show_user_1): Update.
5375 * cli/cli-decode.h (struct cmd_list_element) <user_commands>: Now
5376 a counted_command_line.
5377 * breakpoint.h (counted_command_line): Remove typedef.
5378 (breakpoint_set_commands): Update.
5379 * breakpoint.c (check_no_tracepoint_commands)
5380 (validate_commands_for_breakpoint): Update.
5381 (breakpoint_set_commands): Change commands to be a
5382 counted_command_line.
5383 (commands_command_1, update_dprintf_command_list)
5384 (create_tracepoint_from_upload): Update.
5385
e2fc72e2
TT
53862018-05-04 Tom Tromey <tom@tromey.com>
5387
5388 * cli/cli-decode.h (cmd_list_element): New constructor.
5389 (~cmd_list_element): New destructor.
5390 (struct cmd_list_element): Add initializers.
5391 * cli/cli-decode.c (do_add_cmd): Use "new".
5392 (delete_cmd): Use "delete".
5393
a3b60e45
JK
53942018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
5395 Pedro Alves <palves@redhat.com>
5396
5397 PR breakpoints/19806 and support for PR external/20207.
5398 * NEWS: Mention Aarch64 watchpoint improvements.
5399 * aarch64-linux-nat.c (aarch64_linux_stopped_data_address): Fix missed
5400 watchpoints and PR external/20207 watchpoints.
5401 * nat/aarch64-linux-hw-point.c
5402 (kernel_supports_any_contiguous_range): New.
5403 (aarch64_watchpoint_offset): New.
5404 (aarch64_watchpoint_length): Support PR external/20207 watchpoints.
5405 (aarch64_point_encode_ctrl_reg): New parameter offset, new asserts.
5406 (aarch64_point_is_aligned): Support PR external/20207 watchpoints.
5407 (aarch64_align_watchpoint): New parameters aligned_offset_p and
5408 next_addr_orig_p. Support PR external/20207 watchpoints.
5409 (aarch64_downgrade_regs): New.
5410 (aarch64_dr_state_insert_one_point): New parameters offset and
5411 addr_orig.
5412 (aarch64_dr_state_remove_one_point): Likewise.
5413 (aarch64_handle_breakpoint): Update caller.
5414 (aarch64_handle_aligned_watchpoint): Likewise.
5415 (aarch64_handle_unaligned_watchpoint): Support addr_orig and
5416 aligned_offset.
5417 (aarch64_linux_set_debug_regs): Remove const from state. Call
5418 aarch64_downgrade_regs.
5419 (aarch64_show_debug_reg_state): Print also dr_addr_orig_wp.
5420 * nat/aarch64-linux-hw-point.h (DR_CONTROL_LENGTH): Rename to ...
5421 (DR_CONTROL_MASK): ... this.
5422 (struct aarch64_debug_reg_state): New field dr_addr_orig_wp.
5423 (unsigned int aarch64_watchpoint_offset): New prototype.
5424 (aarch64_linux_set_debug_regs): Remove const from state.
5425 * utils.c (align_up, align_down): Move to ...
5426 * common/common-utils.c (align_up, align_down): ... here.
5427 * utils.h (align_up, align_down): Move to ...
5428 * common/common-utils.h (align_up, align_down): ... here.
5429
05bc7456
JB
54302018-05-04 Joel Brobecker <brobecker@adacore.com>
5431
5432 * sparc-tdep.c (sparc_structure_return_p): Re-implement to
5433 match the ABI as summarized in GCC's gcc/config/sparc/sparc.c.
5434 (sparc_arg_by_memory_p): Renamed from sparc_arg_on_registers_p.
5435 Re-implement to match the ABI as summarized in GCC's
5436 gcc/config/sparc/sparc.c. All callers updated.
5437 (sparc32_store_arguments): Remove assertion.
5438
2f433492
TT
54392018-05-04 Tom Tromey <tom@tromey.com>
5440
5441 * printcmd.c: Don't include tui.h.
5442 (decode_format): Use skip_spaces.
5443
9be2ae8f
TT
54442018-05-04 Tom Tromey <tom@tromey.com>
5445
5446 PR gdb/22619:
5447 * printcmd.c (last_count): New global.
5448 (x_command): Use saved count when repeating.
5449
f0b3976b
TT
54502018-05-04 Tom Tromey <tom@tromey.com>
5451
5452 * nto-procfs.c (do_closedir_cleanup): Remove.
5453 (procfs_pidlist): Use gdb_dir_up.
5454 * procfs.c (do_closedir_cleanup): Remove.
5455 (proc_update_threads): Use gdb_dir_up.
5456 * common/filestuff.h (struct gdb_dir_deleter): New.
5457 (gdb_dir_up): New typedef.
5458
862d101a
TT
54592018-05-04 Tom Tromey <tom@tromey.com>
5460
5461 * ada-lang.c (print_mention_exception): Use std::string.
5462
cb7de75e
TT
54632018-05-04 Tom Tromey <tom@tromey.com>
5464
5465 * ada-lang.c (create_excep_cond_exprs): Update.
5466 (ada_exception_catchpoint_cond_string): Use std::string.
5467
49d83361
TT
54682018-05-04 Tom Tromey <tom@tromey.com>
5469
5470 * ada-lang.c (xget_renaming_scope): Return std::string.
5471 (old_renaming_is_invisible): Update.
5472
ade72a34
TT
54732018-05-04 Tom Tromey <tom@tromey.com>
5474
5475 * bfd-target.c (target_bfd::m_bfd): Now a gdb_bfd_ref_ptr.
5476 (target_bfd::target_bfd, target_bfd::~target_bfd): Update.
5477
2be4d7f0
UW
54782018-05-04 Ulrich Weigand <uweigand@de.ibm.com>
5479
5480 * spu-linux-nat.c (spu_linux_nat_target::wait): Fix syntax error.
5481
69b6ecb0
TT
54822018-05-04 Tom Tromey <tom@tromey.com>
5483
5484 * remote.c (remote_query_supported_append): Change type.
5485 (remote_check_symbols): Update.
5486
bf27f0e2
PP
54872018-05-04 Paul Pluzhnikov <ppluzhnikov@google.com>
5488
5489 PR gdb/11420
5490 * configure.ac: Prepend libpython.
5491 * python/python-config.py: Likewise.
5492 * configure: Regenerate.
5493
4ea17de8
SM
54942018-05-03 Simon Marchi <simon.marchi@ericsson.com>
5495
5496 * Makefile.in (%.c: %.l): Use -t instead of --stdout.
5497
bd732259
PA
54982018-05-03 Pedro Alves <palves@redhat.com>
5499
5500 * s390-linux-nat.c
5501 (s390_linux_nat_target::have_continuable_watchpoint): Mark with
5502 override. Write 'true' instead of '1'.
5503 (s390_linux_nat_target::watchpoint_addr_within_range): Remove
5504 declaration.
5505
d9f719f1
PA
55062018-05-02 Pedro Alves <palves@redhat.com>
5507
5508 * aarch64-fbsd-nat.c (_initialize_aarch64_fbsd_nat): Use
5509 add_inf_child_target.
5510 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Use
5511 add_inf_child_target.
5512 * aix-thread.c (aix_thread_target_info): New.
5513 (aix_thread_target) <shortname, longname, doc>: Delete.
5514 <info>: New.
5515 * alpha-bsd-nat.c (_initialize_alphabsd_nat): Use
5516 add_inf_child_target.
5517 * alpha-linux-nat.c (_initialize_alpha_linux_nat): Use
5518 add_inf_child_target.
5519 * amd64-fbsd-nat.c (_initialize_amd64fbsd_nat): Use
5520 add_inf_child_target.
5521 * amd64-linux-nat.c (_initialize_amd64_linux_nat): Use
5522 add_inf_child_target.
5523 * amd64-nbsd-nat.c (_initialize_amd64nbsd_nat): Use
5524 add_inf_child_target.
5525 * amd64-obsd-nat.c (_initialize_amd64obsd_nat): Use
5526 add_inf_child_target.
5527 * arm-fbsd-nat.c (_initialize_arm_fbsd_nat): Use
5528 add_inf_child_target.
5529 * arm-linux-nat.c (_initialize_arm_linux_nat): Use
5530 add_inf_child_target.
5531 * arm-nbsd-nat.c (_initialize_arm_netbsd_nat): Use
5532 add_inf_child_target.
5533 * bfd-target.c (target_bfd_target_info): New.
5534 (target_bfd) <shortname, longname, doc>: Delete.
5535 <info>: New.
5536 * bsd-kvm.c (bsd_kvm_target_info): New.
5537 (bsd_kvm_target) <shortname, longname, doc>: Delete.
5538 <info>: New.
5539 (bsd_kvm_target::open): Rename to ...
5540 (bsd_kvm_target_open): ... this. Adjust.
5541 * bsd-uthread.c (bsd_uthread_target_info): New.
5542 (bsd_uthread_target) <shortname, longname, doc>: Delete.
5543 <info>: New.
5544 * corefile.c (core_file_command): Adjust.
5545 * corelow.c (core_target_info): New.
5546 (core_target) <shortname, longname, doc>: Delete.
5547 <info>: New.
5548 (core_target::open): Rename to ...
5549 (core_target_open): ... this. Adjust.
5550 * ctf.c (ctf_target_info): New.
5551 (ctf_target) <shortname, longname, doc>: Delete.
5552 <info>: New.
5553 (ctf_target::open): Rename to ...
5554 (ctf_target_open): ... this.
5555 (_initialize_ctf): Adjust.
5556 * exec.c (exec_target_info): New.
5557 (exec_target) <shortname, longname, doc>: Delete.
5558 <info>: New.
5559 (exec_target::open): Rename to ...
5560 (exec_target_open): ... this.
5561 * gdbcore.h (core_target_open): Declare.
5562 * go32-nat.c (_initialize_go32_nat): Use add_inf_child_target.
5563 * hppa-linux-nat.c (_initialize_hppa_linux_nat): Use
5564 add_inf_child_target.
5565 * hppa-nbsd-nat.c (_initialize_hppanbsd_nat): Use
5566 add_inf_child_target.
5567 * hppa-obsd-nat.c (_initialize_hppaobsd_nat): Use
5568 add_inf_child_target.
5569 * i386-darwin-nat.c (_initialize_i386_darwin_nat): Use
5570 add_inf_child_target.
5571 * i386-fbsd-nat.c (_initialize_i386fbsd_nat): Use
5572 add_inf_child_target.
5573 * i386-gnu-nat.c (_initialize_i386gnu_nat): Use
5574 add_inf_child_target.
5575 * i386-linux-nat.c (_initialize_i386_linux_nat): Use
5576 add_inf_child_target.
5577 * i386-nbsd-nat.c (_initialize_i386nbsd_nat): Use
5578 add_inf_child_target.
5579 * i386-obsd-nat.c (_initialize_i386obsd_nat): Use
5580 add_inf_child_target.
5581 * ia64-linux-nat.c (_initialize_ia64_linux_nat): Use
5582 add_inf_child_target.
5583 * inf-child.c (inf_child_target_info): New.
5584 (inf_child_target::info): New.
5585 (inf_child_open_target): Remove 'target' parameter. Use
5586 get_native_target instead.
5587 (inf_child_target::open): Delete.
5588 (add_inf_child_target): New.
5589 * inf-child.h (inf_child_target) <shortname, longname, doc, open>:
5590 Delete.
5591 <info>: New.
5592 (add_inf_child_target): Declare.
5593 (inf_child_open_target): Declare.
5594 * linux-thread-db.c (thread_db_target_info): New.
5595 (thread_db_target) <shortname, longname, doc>: Delete.
5596 <info>: New.
5597 * m32r-linux-nat.c (_initialize_m32r_linux_nat): Use
5598 add_inf_child_target.
5599 * m68k-bsd-nat.c (_initialize_m68kbsd_nat): Use
5600 add_inf_child_target.
5601 * m68k-linux-nat.c (_initialize_m68k_linux_nat): Use
5602 add_inf_child_target.
5603 * m88k-bsd-nat.c (_initialize_m88kbsd_nat): Use
5604 add_inf_child_target.
5605 * make-target-delegates (print_class): Adjust.
5606 * mips-fbsd-nat.c (_initialize_mips_fbsd_nat): Use
5607 add_inf_child_target.
5608 * mips-linux-nat.c (_initialize_mips_linux_nat): Use
5609 add_inf_child_target.
5610 * mips-nbsd-nat.c (_initialize_mipsnbsd_nat): Use
5611 add_inf_child_target.
5612 * mips64-obsd-nat.c (_initialize_mips64obsd_nat): Use
5613 add_inf_child_target.
5614 * nto-procfs.c (nto_native_target_info): New.
5615 (nto_procfs_target_native) <shortname, longname, doc>:
5616 Delete.
5617 <info>: New.
5618 (nto_procfs_target_info): New.
5619 (nto_procfs_target_procfs) <shortname, longname, doc>:
5620 Delete.
5621 <info>: New.
5622 (init_procfs_targets): Adjust.
5623 * ppc-fbsd-nat.c (_initialize_ppcfbsd_nat): Use
5624 add_inf_child_target.
5625 * ppc-linux-nat.c (_initialize_ppc_linux_nat): Use
5626 add_inf_child_target.
5627 * ppc-nbsd-nat.c (_initialize_ppcnbsd_nat): Use
5628 add_inf_child_target.
5629 * ppc-obsd-nat.c (_initialize_ppcobsd_nat): Use
5630 add_inf_child_target.
5631 * ravenscar-thread.c (ravenscar_target_info): New.
5632 (ravenscar_thread_target) <shortname, longname, doc>:
5633 Delete.
5634 <info>: New.
5635 * record-btrace.c (record_btrace_target_info):
5636 (record_btrace_target) <shortname, longname, doc>: Delete.
5637 <info>: New.
5638 (record_btrace_target::open): Rename to ...
5639 (record_btrace_target_open): ... this. Adjust.
5640 * record-full.c (record_longname, record_doc): New.
5641 (record_full_base_target) <shortname, longname, doc>: Delete.
5642 <info>: New.
5643 (record_full_target_info): New.
5644 (record_full_target): <shortname>: Delete.
5645 <info>: New.
5646 (record_full_core_open_1, record_full_open_1): Update comments.
5647 (record_full_base_target::open): Rename to ...
5648 (record_full_open): ... this.
5649 (cmd_record_full_restore): Update.
5650 (_initialize_record_full): Update.
5651 * remote-sim.c (remote_sim_target_info): New.
5652 (gdbsim_target) <shortname, longname, doc>: Delete.
5653 <info>: New.
5654 (gdbsim_target::open): Rename to ...
5655 (gdbsim_target_open): ... this.
5656 (_initialize_remote_sim): Adjust.
5657 * remote.c (remote_doc): New.
5658 (remote_target_info): New.
5659 (remote_target) <shortname, longname, doc>: Delete.
5660 <info>: New.
5661 (extended_remote_target_info): New.
5662 (extended_remote_target) <shortname, longname, doc>: Delete.
5663 <info>: New.
5664 (remote_target::open_1): Make static. Adjust.
5665 * rs6000-nat.c (_initialize_rs6000_nat): Use add_inf_child_target.
5666 * s390-linux-nat.c (_initialize_s390_nat): Use
5667 add_inf_child_target.
5668 * sh-nbsd-nat.c (_initialize_shnbsd_nat): Use
5669 add_inf_child_target.
5670 * sol-thread.c (thread_db_target_info): New.
5671 (sol_thread_target) <shortname, longname, doc>: Delete.
5672 <info>: New.
5673 * sparc-linux-nat.c (_initialize_sparc_linux_nat): Use
5674 add_inf_child_target.
5675 * sparc-nbsd-nat.c (_initialize_sparcnbsd_nat): Use
5676 add_inf_child_target.
5677 * sparc64-fbsd-nat.c (_initialize_sparc64fbsd_nat): Use
5678 add_inf_child_target.
5679 * sparc64-linux-nat.c (_initialize_sparc64_linux_nat): Use
5680 add_inf_child_target.
5681 * sparc64-nbsd-nat.c (_initialize_sparc64nbsd_nat): Use
5682 add_inf_child_target.
5683 * sparc64-obsd-nat.c (_initialize_sparc64obsd_nat): Use
5684 add_inf_child_target.
5685 * spu-linux-nat.c (_initialize_spu_nat): Use
5686 add_inf_child_target.
5687 * spu-multiarch.c (spu_multiarch_target_info): New.
5688 (spu_multiarch_target) <shortname, longname, doc>: Delete.
5689 <info>: New.
5690 * target-delegates.c: Regenerate.
5691 * target.c: Include <unordered_map>.
5692 (target_ops_p): Delete.
5693 (DEF_VEC_P(target_ops_p)): Delete.
5694 (target_factories): New.
5695 (test_target_info): New.
5696 (test_target_ops::info): New.
5697 (open_target): Adjust to use target_factories.
5698 (add_target_with_completer): Rename to ...
5699 (add_target): ... this. Change prototype. Register target_info
5700 and open callback in target_factories. Register target_info in
5701 command context instead of target_ops.
5702 (add_target): Delete old implementation.
5703 (add_deprecated_target_alias): Change prototype. Adjust.
5704 (the_native_target): New.
5705 (set_native_target, get_native_target): New.
5706 (find_default_run_target): Use the_native_target.
5707 (find_attach_target, find_run_target): Simplify.
5708 (target_ops::open): Delete.
5709 (dummy_target_info): New.
5710 (dummy_target::shortname, dummy_target::longname)
5711 (dummy_target::doc): Delete.
5712 (dummy_target::info): New.
5713 (debug_target::shortname, debug_target::longname)
5714 (debug_target::doc): Delete.
5715 (debug_target::info): New.
5716 * target.h (struct target_info): New.
5717 (target_ops::~target_ops): Add comment.
5718 (target_ops::info): New.
5719 (target_ops::shortname, target_ops::longname, target_ops::doc): No
5720 longer virtual. Implement in terms of target_info.
5721 (set_native_target, get_native_target): Declare.
5722 (target_open_ftype): New.
5723 (add_target, add_target_with_completer)
5724 (add_deprecated_target_alias): Change prototype.
5725 (test_target) <shortname, longname, doc>: Delete.
5726 <info>: New.
5727 * tilegx-linux-nat.c (_initialize_tile_linux_nat): Use
5728 add_inf_child_target.
5729 * tracefile-tfile.c (tfile_target_info): New.
5730 (tfile_target) <shortname, longname, doc>: Delete.
5731 <info>: New.
5732 (tfile_target::open): Rename to ...
5733 (tfile_target_open): ... this.
5734 (_initialize_tracefile_tfile): Adjust.
5735 * vax-bsd-nat.c (_initialize_vaxbsd_nat): Use
5736 add_inf_child_target.
5737 * windows-nat.c (_initialize_windows_nat): Use
5738 add_inf_child_target.
5739 * xtensa-linux-nat.c (_initialize_xtensa_linux_nat): Use
5740 add_inf_child_target.
5741
135340af
PA
57422018-05-02 Pedro Alves <palves@redhat.com>
5743
5744 * linux-nat.h (linux_nat_target) <low_new_thread,
5745 low_delete_thread, low_new_fork, low_forget_process,
5746 low_prepare_to_resume, low_siginfo_fixup, low_status_is_event>:
5747 New virtual methods.
5748 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5749 (linux_nat_new_fork_ftype, linux_nat_set_new_fork)
5750 (linux_nat_forget_process_ftype, linux_nat_set_forget_process)
5751 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5752 (linux_nat_set_prepare_to_resume, linux_nat_set_status_is_event):
5753 Delete.
5754 * linux-fork.c (delete_fork): Adjust to call low method.
5755 * linux-nat.c (linux_nat_new_thread, linux_nat_delete_thread)
5756 (linux_nat_new_fork, linux_nat_forget_process_hook)
5757 (linux_nat_prepare_to_resume, linux_nat_siginfo_fixup)
5758 (linux_nat_status_is_event):
5759 (linux_nat_target::follow_fork, lwp_free, add_lwp, detach_one_lwp)
5760 (linux_resume_one_lwp_throw, linux_handle_extended_wait): Adjust
5761 to call low method.
5762 (sigtrap_is_event): Rename to ...
5763 (linux_nat_target::low_status_is_event): ... this.
5764 (linux_nat_set_status_is_event): Delete.
5765 (save_stop_reason, linux_nat_wait_1)
5766 (linux_nat_target::mourn_inferior, siginfo_fixup): Adjust to call
5767 low methods.
5768 (linux_nat_set_new_thread, linux_nat_set_delete_thread)
5769 (linux_nat_set_new_fork, linux_nat_set_forget_process)
5770 (linux_nat_forget_process, linux_nat_set_siginfo_fixup)
5771 (linux_nat_set_prepare_to_resume): Delete.
5772 * aarch64-linux-nat.c: All linux_nat_set_* callbacks converted to
5773 low virtual methods.
5774 * amd64-linux-nat.c: Likewise.
5775 * arm-linux-nat.c: Likewise.
5776 * i386-linux-nat.c: Likewise.
5777 * ia64-linux-nat.c: Likewise.
5778 * mips-linux-nat.c: Likewise.
5779 * ppc-linux-nat.c: Likewise.
5780 * s390-linux-nat.c: Likewise.
5781 * sparc64-linux-nat.c: Likewise.
5782 * x86-linux-nat.c: Likewise.
5783 * x86-linux-nat.h: Include "nat/x86-linux.h".
5784 (x86_linux_nat_target) <low_new_fork, low_forget_process,
5785 low_prepare_to_resume, low_new_thread, low_delete_thread>:
5786 Override methods.
5787
57810aa7
PA
57882018-05-02 Pedro Alves <palves@redhat.com>
5789
5790 * target.h (target_ops)
5791 <stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5792 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint,
5793 stopped_by_watchpoint, have_continuable_watchpoint,
5794 stopped_data_address, watchpoint_addr_within_range,
5795 can_accel_watchpoint_condition, can_run, thread_alive,
5796 has_all_memory, has_memory, has_stack, has_registers,
5797 has_execution, can_async_p, is_async_p, supports_non_stop,
5798 always_non_stop_p, can_execute_reverse, supports_multi_process,
5799 supports_enable_disable_tracepoint,
5800 supports_disable_randomization, supports_string_tracing,
5801 supports_evaluation_of_breakpoint_conditions,
5802 can_run_breakpoint_commands, filesystem_is_local,
5803 can_download_tracepoint, get_trace_state_variable_value,
5804 set_trace_notes, get_tib_address, use_agent, can_use_agent,
5805 record_is_replaying, record_will_replay,
5806 augmented_libraries_svr4_read>: Adjust to return bool.
5807 * aarch64-linux-nat.c: All implementations adjusted.
5808 * aix-thread.c: All implementations adjusted.
5809 * arm-linux-nat.c: All implementations adjusted.
5810 * breakpoint.c: All implementations adjusted.
5811 * bsd-kvm.c: All implementations adjusted.
5812 * bsd-uthread.c: All implementations adjusted.
5813 * corelow.c: All implementations adjusted.
5814 * ctf.c: All implementations adjusted.
5815 * darwin-nat.c: All implementations adjusted.
5816 * darwin-nat.h: All implementations adjusted.
5817 * exec.c: All implementations adjusted.
5818 * fbsd-nat.c: All implementations adjusted.
5819 * fbsd-nat.h: All implementations adjusted.
5820 * gnu-nat.c: All implementations adjusted.
5821 * gnu-nat.h: All implementations adjusted.
5822 * go32-nat.c: All implementations adjusted.
5823 * ia64-linux-nat.c: All implementations adjusted.
5824 * inf-child.c: All implementations adjusted.
5825 * inf-child.h: All implementations adjusted.
5826 * inf-ptrace.c: All implementations adjusted.
5827 * inf-ptrace.h: All implementations adjusted.
5828 * linux-nat.c: All implementations adjusted.
5829 * linux-nat.h: All implementations adjusted.
5830 * mips-linux-nat.c: All implementations adjusted.
5831 * nto-procfs.c: All implementations adjusted.
5832 * ppc-linux-nat.c: All implementations adjusted.
5833 * procfs.c: All implementations adjusted.
5834 * ravenscar-thread.c: All implementations adjusted.
5835 * record-btrace.c: All implementations adjusted.
5836 * record-full.c: All implementations adjusted.
5837 * remote-sim.c: All implementations adjusted.
5838 * remote.c: All implementations adjusted.
5839 * s390-linux-nat.c: All implementations adjusted.
5840 * sol-thread.c: All implementations adjusted.
5841 * spu-multiarch.c: All implementations adjusted.
5842 * target-delegates.c: All implementations adjusted.
5843 * target.c: All implementations adjusted.
5844 * target.h: All implementations adjusted.
5845 * tracefile-tfile.c: All implementations adjusted.
5846 * tracefile.c: All implementations adjusted.
5847 * tracefile.h: All implementations adjusted.
5848 * windows-nat.c: All implementations adjusted.
5849 * x86-linux-nat.h: All implementations adjusted.
5850 * x86-nat.h: All implementations adjusted.
5851
ad6a4e2d
PA
58522018-05-02 Pedro Alves <palves@redhat.com>
5853
5854 * make-target-delegates (scan_target_h): Don't trim lines here.
5855 Replace sequences of tabs and/or whitespace with a single
5856 whitespace.
5857 (top level, parsing methods): Trim each line before processing it
5858 here.
5859
f6ac5f3d
PA
58602018-05-02 Pedro Alves <palves@redhat.com>
5861 John Baldwin <jhb@freebsd.org>
5862
5863 * target.h (enum strata) <debug_stratum>: New.
5864 (struct target_ops) <all delegation methods>: Replace by C++
5865 virtual methods, and drop "to_" prefix. All references updated
5866 throughout.
5867 <to_shortname, to_longname, to_doc, to_data,
5868 to_have_steppable_watchpoint, to_have_continuable_watchpoint,
5869 to_has_thread_control, to_attach_no_wait>: Delete, replaced by
5870 virtual methods. All references updated throughout.
5871 <can_attach, supports_terminal_ours, can_create_inferior,
5872 get_thread_control_capabilities, attach_no_wait>: New
5873 virtual methods.
5874 <insert_breakpoint, remove_breakpoint>: Now
5875 TARGET_DEFAULT_NORETURN methods.
5876 <info_proc>: Now returns bool.
5877 <to_magic>: Delete.
5878 (OPS_MAGIC): Delete.
5879 (current_target): Delete. All references replaced by references
5880 to ...
5881 (target_stack): ... this. New.
5882 (target_shortname, target_longname): Adjust.
5883 (target_can_run): Now a function declaration.
5884 (default_child_has_all_memory, default_child_has_memory)
5885 (default_child_has_stack, default_child_has_registers)
5886 (default_child_has_execution): Remove target_ops parameter.
5887 (complete_target_initialization): Delete.
5888 (memory_breakpoint_target): New template class.
5889 (test_target_ops): Refactor as a C++ class with virtual methods.
5890 * make-target-delegates (NAME_PART): Tighten.
5891 (POINTER_PART, CP_SYMBOL): New.
5892 (SIMPLE_RETURN_PART): Reimplement.
5893 (VEC_RETURN_PART): Expect less.
5894 (RETURN_PART, VIRTUAL_PART): New.
5895 (METHOD): Adjust to C++ virtual methods.
5896 (scan_target_h): Remove reference to C99.
5897 (dname): Output "target_ops::" prefix.
5898 (write_function_header): Adjust to output a C++ class method.
5899 (write_declaration): New.
5900 (write_delegator): Adjust to output a C++ class method.
5901 (tdname): Output "dummy_target::" prefix.
5902 (write_tdefault, write_debugmethod): Adjust to output a C++ class
5903 method.
5904 (tdefault_names, debug_names): Delete.
5905 (return_types, tdefaults, styles, argtypes_array): New.
5906 (top level): All methods are delegators.
5907 (print_class): New.
5908 (top level): Print dummy_target and debug_target classes.
5909 * target-delegates.c: Regenerate.
5910 * target-debug.h (target_debug_print_enum_info_proc_what)
5911 (target_debug_print_thread_control_capabilities)
5912 (target_debug_print_thread_info_p): New.
5913 * target.c (dummy_target): Delete.
5914 (the_dummy_target, the_debug_target): New.
5915 (target_stack): Now extern.
5916 (set_targetdebug): Push/unpush debug target.
5917 (default_child_has_all_memory, default_child_has_memory)
5918 (default_child_has_stack, default_child_has_registers)
5919 (default_child_has_execution): Remove target_ops parameter.
5920 (complete_target_initialization): Delete.
5921 (add_target_with_completer): No longer call
5922 complete_target_initialization.
5923 (target_supports_terminal_ours): Use regular delegation.
5924 (update_current_target): Delete.
5925 (push_target): No longer check magic number. Don't call
5926 update_current_target.
5927 (unpush_target): Don't call update_current_target.
5928 (target_is_pushed): No longer check magic number.
5929 (target_require_runnable): Skip for all stratums over
5930 process_stratum.
5931 (target_ops::info_proc): New.
5932 (target_info_proc): Use find_target_at and
5933 find_default_run_target.
5934 (target_supports_disable_randomization): Use regular delegation.
5935 (target_get_osdata): Use find_target_at.
5936 (target_ops::open, target_ops::close, target_ops::can_attach)
5937 (target_ops::attach, target_ops::can_create_inferior)
5938 (target_ops::create_inferior, target_ops::can_run)
5939 (target_can_run): New.
5940 (default_fileio_target): Use regular delegation.
5941 (target_ops::fileio_open, target_ops::fileio_pwrite)
5942 (target_ops::fileio_pread, target_ops::fileio_fstat)
5943 (target_ops::fileio_close, target_ops::fileio_unlink)
5944 (target_ops::fileio_readlink): New.
5945 (target_fileio_open_1, target_fileio_unlink)
5946 (target_fileio_readlink): Always call the target method. Handle
5947 FILEIO_ENOSYS.
5948 (return_zero, return_zero_has_execution): Delete.
5949 (init_dummy_target): Delete.
5950 (dummy_target::dummy_target, dummy_target::shortname)
5951 (dummy_target::longname, dummy_target::doc)
5952 (debug_target::debug_target, debug_target::shortname)
5953 (debug_target::longname, debug_target::doc): New.
5954 (target_supports_delete_record): Use regular delegation.
5955 (setup_target_debug): Delete.
5956 (maintenance_print_target_stack): Skip debug_stratum.
5957 (initialize_targets): Instantiate the_dummy_target and
5958 the_debug_target.
5959 * auxv.c (target_auxv_parse): Remove 'ops' parameter. Adjust to
5960 use target_stack.
5961 (target_auxv_search, fprint_target_auxv): Adjust.
5962 (info_auxv_command): Adjust to use target_stack.
5963 * auxv.h (target_auxv_parse): Remove 'ops' parameter.
5964 * exceptions.c (print_flush): Handle a NULL target_stack.
5965 * regcache.c (target_ops_no_register): Refactor as class with
5966 virtual methods.
5967
5968 * exec.c (exec_target): New class.
5969 (exec_ops): Now an exec_target.
5970 (exec_open, exec_close_1, exec_get_section_table)
5971 (exec_xfer_partial, exec_files_info, exec_has_memory)
5972 (exec_make_note_section): Refactor as exec_target methods.
5973 (exec_file_clear, ignore, exec_remove_breakpoint, init_exec_ops):
5974 Delete.
5975 (exec_target::find_memory_regions): New.
5976 (_initialize_exec): Don't call init_exec_ops.
5977 * gdbcore.h (exec_file_clear): Delete.
5978
5979 * corefile.c (core_target): Delete.
5980 (core_file_command): Adjust.
5981 * corelow.c (core_target): New class.
5982 (the_core_target): New.
5983 (core_close): Remove target_ops parameter.
5984 (core_close_cleanup): Adjust.
5985 (core_target::close): New.
5986 (core_open, core_detach, get_core_registers, core_files_info)
5987 (core_xfer_partial, core_thread_alive, core_read_description)
5988 (core_pid_to_str, core_thread_name, core_has_memory)
5989 (core_has_stack, core_has_registers, core_info_proc): Rework as
5990 core_target methods.
5991 (ignore, core_remove_breakpoint, init_core_ops): Delete.
5992 (_initialize_corelow): Initialize the_core_target.
5993 * gdbcore.h (core_target): Delete.
5994 (the_core_target): New.
5995
5996 * ctf.c: (ctf_target): New class.
5997 (ctf_ops): Now a ctf_target.
5998 (ctf_open, ctf_close, ctf_files_info, ctf_fetch_registers)
5999 (ctf_xfer_partial, ctf_get_trace_state_variable_value)
6000 (ctf_trace_find, ctf_traceframe_info): Refactor as ctf_target
6001 methods.
6002 (init_ctf_ops): Delete.
6003 (_initialize_ctf): Don't call it.
6004 * tracefile-tfile.c (tfile_target): New class.
6005 (tfile_ops): Now a tfile_target.
6006 (tfile_open, tfile_close, tfile_files_info)
6007 (tfile_get_tracepoint_status, tfile_trace_find)
6008 (tfile_fetch_registers, tfile_xfer_partial)
6009 (tfile_get_trace_state_variable_value, tfile_traceframe_info):
6010 Refactor as tfile_target methods.
6011 (tfile_xfer_partial_features): Remove target_ops parameter.
6012 (init_tfile_ops): Delete.
6013 (_initialize_tracefile_tfile): Don't call it.
6014 * tracefile.c (tracefile_has_all_memory, tracefile_has_memory)
6015 (tracefile_has_stack, tracefile_has_registers)
6016 (tracefile_thread_alive, tracefile_get_trace_status): Refactor as
6017 tracefile_target methods.
6018 (init_tracefile_ops): Delete.
6019 (tracefile_target::tracefile_target): New.
6020 * tracefile.h: Include "target.h".
6021 (tracefile_target): New class.
6022 (init_tracefile_ops): Delete.
6023
6024 * spu-multiarch.c (spu_multiarch_target): New class.
6025 (spu_ops): Now a spu_multiarch_target.
6026 (spu_thread_architecture, spu_region_ok_for_hw_watchpoint)
6027 (spu_fetch_registers, spu_store_registers, spu_xfer_partial)
6028 (spu_search_memory, spu_mourn_inferior): Refactor as
6029 spu_multiarch_target methods.
6030 (init_spu_ops): Delete.
6031 (_initialize_spu_multiarch): Remove references to init_spu_ops,
6032 complete_target_initialization.
6033
6034 * ravenscar-thread.c (ravenscar_thread_target): New class.
6035 (ravenscar_ops): Now a ravenscar_thread_target.
6036 (ravenscar_resume, ravenscar_wait, ravenscar_update_thread_list)
6037 (ravenscar_thread_alive, ravenscar_pid_to_str)
6038 (ravenscar_fetch_registers, ravenscar_store_registers)
6039 (ravenscar_prepare_to_store, ravenscar_stopped_by_sw_breakpoint)
6040 (ravenscar_stopped_by_hw_breakpoint)
6041 (ravenscar_stopped_by_watchpoint, ravenscar_stopped_data_address)
6042 (ravenscar_mourn_inferior, ravenscar_core_of_thread)
6043 (ravenscar_get_ada_task_ptid): Refactor as ravenscar_thread_target
6044 methods.
6045 (init_ravenscar_thread_ops): Delete.
6046 (_initialize_ravenscar): Remove references to
6047 init_ravenscar_thread_ops and complete_target_initialization.
6048
6049 * bsd-uthread.c (bsd_uthread_ops_hack): Delete.
6050 (bsd_uthread_target): New class.
6051 (bsd_uthread_ops): Now a bsd_uthread_target.
6052 (bsd_uthread_activate): Adjust to refer to bsd_uthread_ops.
6053 (bsd_uthread_close, bsd_uthread_mourn_inferior)
6054 (bsd_uthread_fetch_registers, bsd_uthread_store_registers)
6055 (bsd_uthread_wait, bsd_uthread_resume, bsd_uthread_thread_alive)
6056 (bsd_uthread_update_thread_list, bsd_uthread_extra_thread_info)
6057 (bsd_uthread_pid_to_str): Refactor as bsd_uthread_target methods.
6058 (bsd_uthread_target): Delete function.
6059 (_initialize_bsd_uthread): Remove reference to
6060 complete_target_initialization.
6061
6062 * bfd-target.c (target_bfd_data): Delete. Fields folded into ...
6063 (target_bfd): ... this new class.
6064 (target_bfd_xfer_partial, target_bfd_get_section_table)
6065 (target_bfd_close): Refactor as target_bfd methods.
6066 (target_bfd::~target_bfd): New.
6067 (target_bfd_reopen): Adjust.
6068 (target_bfd::close): New.
6069
6070 * record-btrace.c (record_btrace_target): New class.
6071 (record_btrace_ops): Now a record_btrace_target.
6072 (record_btrace_open, record_btrace_stop_recording)
6073 (record_btrace_disconnect, record_btrace_close)
6074 (record_btrace_async, record_btrace_info)
6075 (record_btrace_insn_history, record_btrace_insn_history_range)
6076 (record_btrace_insn_history_from, record_btrace_call_history)
6077 (record_btrace_call_history_range)
6078 (record_btrace_call_history_from, record_btrace_record_method)
6079 (record_btrace_is_replaying, record_btrace_will_replay)
6080 (record_btrace_xfer_partial, record_btrace_insert_breakpoint)
6081 (record_btrace_remove_breakpoint, record_btrace_fetch_registers)
6082 (record_btrace_store_registers, record_btrace_prepare_to_store)
6083 (record_btrace_to_get_unwinder)
6084 (record_btrace_to_get_tailcall_unwinder, record_btrace_resume)
6085 (record_btrace_commit_resume, record_btrace_wait)
6086 (record_btrace_stop, record_btrace_can_execute_reverse)
6087 (record_btrace_stopped_by_sw_breakpoint)
6088 (record_btrace_supports_stopped_by_sw_breakpoint)
6089 (record_btrace_stopped_by_hw_breakpoint)
6090 (record_btrace_supports_stopped_by_hw_breakpoint)
6091 (record_btrace_update_thread_list, record_btrace_thread_alive)
6092 (record_btrace_goto_begin, record_btrace_goto_end)
6093 (record_btrace_goto, record_btrace_stop_replaying_all)
6094 (record_btrace_execution_direction)
6095 (record_btrace_prepare_to_generate_core)
6096 (record_btrace_done_generating_core): Refactor as
6097 record_btrace_target methods.
6098 (init_record_btrace_ops): Delete.
6099 (_initialize_record_btrace): Remove reference to
6100 init_record_btrace_ops.
6101 * record-full.c (RECORD_FULL_IS_REPLAY): Adjust to always refer to
6102 the execution_direction global.
6103 (record_full_base_target, record_full_target)
6104 (record_full_core_target): New classes.
6105 (record_full_ops): Now a record_full_target.
6106 (record_full_core_ops): Now a record_full_core_target.
6107 (record_full_target::detach, record_full_target::disconnect)
6108 (record_full_core_target::disconnect)
6109 (record_full_target::mourn_inferior, record_full_target::kill):
6110 New.
6111 (record_full_open, record_full_close, record_full_async): Refactor
6112 as methods of the record_full_base_target class.
6113 (record_full_resume, record_full_commit_resume): Refactor
6114 as methods of the record_full_target class.
6115 (record_full_wait, record_full_stopped_by_watchpoint)
6116 (record_full_stopped_data_address)
6117 (record_full_stopped_by_sw_breakpoint)
6118 (record_full_supports_stopped_by_sw_breakpoint)
6119 (record_full_stopped_by_hw_breakpoint)
6120 (record_full_supports_stopped_by_hw_breakpoint): Refactor as
6121 methods of the record_full_base_target class.
6122 (record_full_store_registers, record_full_xfer_partial)
6123 (record_full_insert_breakpoint, record_full_remove_breakpoint):
6124 Refactor as methods of the record_full_target class.
6125 (record_full_can_execute_reverse, record_full_get_bookmark)
6126 (record_full_goto_bookmark, record_full_execution_direction)
6127 (record_full_record_method, record_full_info, record_full_delete)
6128 (record_full_is_replaying, record_full_will_replay)
6129 (record_full_goto_begin, record_full_goto_end, record_full_goto)
6130 (record_full_stop_replaying): Refactor as methods of the
6131 record_full_base_target class.
6132 (record_full_core_resume, record_full_core_kill)
6133 (record_full_core_fetch_registers)
6134 (record_full_core_prepare_to_store)
6135 (record_full_core_store_registers, record_full_core_xfer_partial)
6136 (record_full_core_insert_breakpoint)
6137 (record_full_core_remove_breakpoint)
6138 (record_full_core_has_execution): Refactor
6139 as methods of the record_full_core_target class.
6140 (record_full_base_target::supports_delete_record): New.
6141 (init_record_full_ops): Delete.
6142 (init_record_full_core_ops): Delete.
6143 (record_full_save): Refactor as method of the
6144 record_full_base_target class.
6145 (_initialize_record_full): Remove references to
6146 init_record_full_ops and init_record_full_core_ops.
6147
6148 * remote.c (remote_target, extended_remote_target): New classes.
6149 (remote_ops): Now a remote_target.
6150 (extended_remote_ops): Now an extended_remote_target.
6151 (remote_insert_fork_catchpoint, remote_remove_fork_catchpoint)
6152 (remote_insert_vfork_catchpoint, remote_remove_vfork_catchpoint)
6153 (remote_insert_exec_catchpoint, remote_remove_exec_catchpoint)
6154 (remote_pass_signals, remote_set_syscall_catchpoint)
6155 (remote_program_signals, )
6156 (remote_thread_always_alive): Remove target_ops parameter.
6157 (remote_thread_alive, remote_thread_name)
6158 (remote_update_thread_list, remote_threads_extra_info)
6159 (remote_static_tracepoint_marker_at)
6160 (remote_static_tracepoint_markers_by_strid)
6161 (remote_get_ada_task_ptid, remote_close, remote_start_remote)
6162 (remote_open): Refactor as methods of remote_target.
6163 (extended_remote_open, extended_remote_detach)
6164 (extended_remote_attach, extended_remote_post_attach):
6165 (extended_remote_supports_disable_randomization)
6166 (extended_remote_create_inferior): : Refactor as method of
6167 extended_remote_target.
6168 (remote_set_permissions, remote_open_1, remote_detach)
6169 (remote_follow_fork, remote_follow_exec, remote_disconnect)
6170 (remote_resume, remote_commit_resume, remote_stop)
6171 (remote_interrupt, remote_pass_ctrlc, remote_terminal_inferior)
6172 (remote_terminal_ours, remote_wait, remote_fetch_registers)
6173 (remote_prepare_to_store, remote_store_registers)
6174 (remote_flash_erase, remote_flash_done, remote_files_info)
6175 (remote_kill, remote_mourn, remote_insert_breakpoint)
6176 (remote_remove_breakpoint, remote_insert_watchpoint)
6177 (remote_watchpoint_addr_within_range)
6178 (remote_remove_watchpoint, remote_region_ok_for_hw_watchpoint)
6179 (remote_check_watch_resources, remote_stopped_by_sw_breakpoint)
6180 (remote_supports_stopped_by_sw_breakpoint)
6181 (remote_stopped_by_hw_breakpoint)
6182 (remote_supports_stopped_by_hw_breakpoint)
6183 (remote_stopped_by_watchpoint, remote_stopped_data_address)
6184 (remote_insert_hw_breakpoint, remote_remove_hw_breakpoint)
6185 (remote_verify_memory): Refactor as methods of remote_target.
6186 (remote_write_qxfer, remote_read_qxfer): Remove target_ops
6187 parameter.
6188 (remote_xfer_partial, remote_get_memory_xfer_limit)
6189 (remote_search_memory, remote_rcmd, remote_memory_map)
6190 (remote_pid_to_str, remote_get_thread_local_address)
6191 (remote_get_tib_address, remote_read_description): Refactor as
6192 methods of remote_target.
6193 (remote_target::fileio_open, remote_target::fileio_pwrite)
6194 (remote_target::fileio_pread, remote_target::fileio_close): New.
6195 (remote_hostio_readlink, remote_hostio_fstat)
6196 (remote_filesystem_is_local, remote_can_execute_reverse)
6197 (remote_supports_non_stop, remote_supports_disable_randomization)
6198 (remote_supports_multi_process, remote_supports_cond_breakpoints)
6199 (remote_supports_enable_disable_tracepoint)
6200 (remote_supports_string_tracing)
6201 (remote_can_run_breakpoint_commands, remote_trace_init)
6202 (remote_download_tracepoint, remote_can_download_tracepoint)
6203 (remote_download_trace_state_variable, remote_enable_tracepoint)
6204 (remote_disable_tracepoint, remote_trace_set_readonly_regions)
6205 (remote_trace_start, remote_get_trace_status)
6206 (remote_get_tracepoint_status, remote_trace_stop)
6207 (remote_trace_find, remote_get_trace_state_variable_value)
6208 (remote_save_trace_data, remote_get_raw_trace_data)
6209 (remote_set_disconnected_tracing, remote_core_of_thread)
6210 (remote_set_circular_trace_buffer, remote_traceframe_info)
6211 (remote_get_min_fast_tracepoint_insn_len)
6212 (remote_set_trace_buffer_size, remote_set_trace_notes)
6213 (remote_use_agent, remote_can_use_agent, remote_enable_btrace)
6214 (remote_disable_btrace, remote_teardown_btrace)
6215 (remote_read_btrace, remote_btrace_conf)
6216 (remote_augmented_libraries_svr4_read, remote_load)
6217 (remote_pid_to_exec_file, remote_can_do_single_step)
6218 (remote_execution_direction, remote_thread_handle_to_thread_info):
6219 Refactor as methods of remote_target.
6220 (init_remote_ops, init_extended_remote_ops): Delete.
6221 (remote_can_async_p, remote_is_async_p, remote_async)
6222 (remote_thread_events, remote_upload_tracepoints)
6223 (remote_upload_trace_state_variables): Refactor as methods of
6224 remote_target.
6225 (_initialize_remote): Remove references to init_remote_ops and
6226 init_extended_remote_ops.
6227
6228 * remote-sim.c (gdbsim_target): New class.
6229 (gdbsim_fetch_register, gdbsim_store_register, gdbsim_kill)
6230 (gdbsim_load, gdbsim_create_inferior, gdbsim_open, gdbsim_close)
6231 (gdbsim_detach, gdbsim_resume, gdbsim_interrupt)
6232 (gdbsim_wait, gdbsim_prepare_to_store, gdbsim_xfer_partial)
6233 (gdbsim_files_info, gdbsim_mourn_inferior, gdbsim_thread_alive)
6234 (gdbsim_pid_to_str, gdbsim_has_all_memory, gdbsim_has_memory):
6235 Refactor as methods of gdbsim_target.
6236 (gdbsim_ops): Now a gdbsim_target.
6237 (init_gdbsim_ops): Delete.
6238 (gdbsim_cntrl_c): Adjust.
6239 (_initialize_remote_sim): Remove reference to init_gdbsim_ops.
6240
6241 * amd64-linux-nat.c (amd64_linux_nat_target): New class.
6242 (the_amd64_linux_nat_target): New.
6243 (amd64_linux_fetch_inferior_registers)
6244 (amd64_linux_store_inferior_registers): Refactor as methods of
6245 amd64_linux_nat_target.
6246 (_initialize_amd64_linux_nat): Adjust. Set linux_target.
6247 * i386-linux-nat.c: Don't include "linux-nat.h".
6248 (i386_linux_nat_target): New class.
6249 (the_i386_linux_nat_target): New.
6250 (i386_linux_fetch_inferior_registers)
6251 (i386_linux_store_inferior_registers, i386_linux_resume): Refactor
6252 as methods of i386_linux_nat_target.
6253 (_initialize_i386_linux_nat): Adjust. Set linux_target.
6254 * inf-child.c (inf_child_ops): Delete.
6255 (inf_child_fetch_inferior_registers)
6256 (inf_child_store_inferior_registers): Delete.
6257 (inf_child_post_attach, inf_child_prepare_to_store): Refactor as
6258 methods of inf_child_target.
6259 (inf_child_target::supports_terminal_ours)
6260 (inf_child_target::terminal_init)
6261 (inf_child_target::terminal_inferior)
6262 (inf_child_target::terminal_ours_for_output)
6263 (inf_child_target::terminal_ours, inf_child_target::interrupt)
6264 (inf_child_target::pass_ctrlc, inf_child_target::terminal_info):
6265 New.
6266 (inf_child_open, inf_child_disconnect, inf_child_close)
6267 (inf_child_mourn_inferior, inf_child_maybe_unpush_target)
6268 (inf_child_post_startup_inferior, inf_child_can_run)
6269 (inf_child_pid_to_exec_file): Refactor as methods of
6270 inf_child_target.
6271 (inf_child_follow_fork): Delete.
6272 (inf_child_target::can_create_inferior)
6273 (inf_child_target::can_attach): New.
6274 (inf_child_target::has_all_memory, inf_child_target::has_memory)
6275 (inf_child_target::has_stack, inf_child_target::has_registers)
6276 (inf_child_target::has_execution): New.
6277 (inf_child_fileio_open, inf_child_fileio_pwrite)
6278 (inf_child_fileio_pread, inf_child_fileio_fstat)
6279 (inf_child_fileio_close, inf_child_fileio_unlink)
6280 (inf_child_fileio_readlink, inf_child_use_agent)
6281 (inf_child_can_use_agent): Refactor as methods of
6282 inf_child_target.
6283 (return_zero, inf_child_target): Delete.
6284 (inf_child_target::inf_child_target): New.
6285 * inf-child.h: Include "target.h".
6286 (inf_child_target): Delete function prototype.
6287 (inf_child_target): New class.
6288 (inf_child_open_target, inf_child_mourn_inferior)
6289 (inf_child_maybe_unpush_target): Delete.
6290 * inf-ptrace.c (inf_ptrace_target::~inf_ptrace_target): New.
6291 (inf_ptrace_follow_fork, inf_ptrace_insert_fork_catchpoint)
6292 (inf_ptrace_remove_fork_catchpoint, inf_ptrace_create_inferior)
6293 (inf_ptrace_post_startup_inferior, inf_ptrace_mourn_inferior)
6294 (inf_ptrace_attach, inf_ptrace_post_attach, inf_ptrace_detach)
6295 (inf_ptrace_detach_success, inf_ptrace_kill, inf_ptrace_resume)
6296 (inf_ptrace_wait, inf_ptrace_xfer_partial)
6297 (inf_ptrace_thread_alive, inf_ptrace_files_info)
6298 (inf_ptrace_pid_to_str, inf_ptrace_auxv_parse): Refactor as
6299 methods of inf_ptrace_target.
6300 (inf_ptrace_target): Delete function.
6301 * inf-ptrace.h: Include "inf-child.h".
6302 (inf_ptrace_target): Delete function declaration.
6303 (inf_ptrace_target): New class.
6304 (inf_ptrace_trad_target, inf_ptrace_detach_success): Delete.
6305 * linux-nat.c (linux_target): New.
6306 (linux_ops, linux_ops_saved, super_xfer_partial): Delete.
6307 (linux_nat_target::~linux_nat_target): New.
6308 (linux_child_post_attach, linux_child_post_startup_inferior)
6309 (linux_child_follow_fork, linux_child_insert_fork_catchpoint)
6310 (linux_child_remove_fork_catchpoint)
6311 (linux_child_insert_vfork_catchpoint)
6312 (linux_child_remove_vfork_catchpoint)
6313 (linux_child_insert_exec_catchpoint)
6314 (linux_child_remove_exec_catchpoint)
6315 (linux_child_set_syscall_catchpoint, linux_nat_pass_signals)
6316 (linux_nat_create_inferior, linux_nat_attach, linux_nat_detach)
6317 (linux_nat_resume, linux_nat_stopped_by_watchpoint)
6318 (linux_nat_stopped_data_address)
6319 (linux_nat_stopped_by_sw_breakpoint)
6320 (linux_nat_supports_stopped_by_sw_breakpoint)
6321 (linux_nat_stopped_by_hw_breakpoint)
6322 (linux_nat_supports_stopped_by_hw_breakpoint, linux_nat_wait)
6323 (linux_nat_kill, linux_nat_mourn_inferior)
6324 (linux_nat_xfer_partial, linux_nat_thread_alive)
6325 (linux_nat_update_thread_list, linux_nat_pid_to_str)
6326 (linux_nat_thread_name, linux_child_pid_to_exec_file)
6327 (linux_child_static_tracepoint_markers_by_strid)
6328 (linux_nat_is_async_p, linux_nat_can_async_p)
6329 (linux_nat_supports_non_stop, linux_nat_always_non_stop_p)
6330 (linux_nat_supports_multi_process)
6331 (linux_nat_supports_disable_randomization, linux_nat_async)
6332 (linux_nat_stop, linux_nat_close, linux_nat_thread_address_space)
6333 (linux_nat_core_of_thread, linux_nat_filesystem_is_local)
6334 (linux_nat_fileio_open, linux_nat_fileio_readlink)
6335 (linux_nat_fileio_unlink, linux_nat_thread_events): Refactor as
6336 methods of linux_nat_target.
6337 (linux_nat_wait_1, linux_xfer_siginfo, linux_proc_xfer_partial)
6338 (linux_proc_xfer_spu, linux_nat_xfer_osdata): Remove target_ops
6339 parameter.
6340 (check_stopped_by_watchpoint): Adjust.
6341 (linux_xfer_partial): Delete.
6342 (linux_target_install_ops, linux_target, linux_nat_add_target):
6343 Delete.
6344 (linux_nat_target::linux_nat_target): New.
6345 * linux-nat.h: Include "inf-ptrace.h".
6346 (linux_nat_target): New.
6347 (linux_target, linux_target_install_ops, linux_nat_add_target):
6348 Delete function declarations.
6349 (linux_target): Declare global.
6350 * linux-thread-db.c (thread_db_target): New.
6351 (thread_db_target::thread_db_target): New.
6352 (thread_db_ops): Delete.
6353 (the_thread_db_target): New.
6354 (thread_db_detach, thread_db_wait, thread_db_mourn_inferior)
6355 (thread_db_update_thread_list, thread_db_pid_to_str)
6356 (thread_db_extra_thread_info)
6357 (thread_db_thread_handle_to_thread_info)
6358 (thread_db_get_thread_local_address, thread_db_get_ada_task_ptid)
6359 (thread_db_resume): Refactor as methods of thread_db_target.
6360 (init_thread_db_ops): Delete.
6361 (_initialize_thread_db): Remove reference to init_thread_db_ops.
6362 * x86-linux-nat.c: Don't include "linux-nat.h".
6363 (super_post_startup_inferior): Delete.
6364 (x86_linux_nat_target::~x86_linux_nat_target): New.
6365 (x86_linux_child_post_startup_inferior)
6366 (x86_linux_read_description, x86_linux_enable_btrace)
6367 (x86_linux_disable_btrace, x86_linux_teardown_btrace)
6368 (x86_linux_read_btrace, x86_linux_btrace_conf): Refactor as
6369 methods of x86_linux_nat_target.
6370 (x86_linux_create_target): Delete. Bits folded ...
6371 (x86_linux_add_target): ... here. Now takes a linux_nat_target
6372 pointer.
6373 * x86-linux-nat.h: Include "linux-nat.h" and "x86-nat.h".
6374 (x86_linux_nat_target): New class.
6375 (x86_linux_create_target): Delete.
6376 (x86_linux_add_target): Now takes a linux_nat_target pointer.
6377 * x86-nat.c (x86_insert_watchpoint, x86_remove_watchpoint)
6378 (x86_region_ok_for_watchpoint, x86_stopped_data_address)
6379 (x86_stopped_by_watchpoint, x86_insert_hw_breakpoint)
6380 (x86_remove_hw_breakpoint, x86_can_use_hw_breakpoint)
6381 (x86_stopped_by_hw_breakpoint): Remove target_ops parameter and
6382 make extern.
6383 (x86_use_watchpoints): Delete.
6384 * x86-nat.h: Include "breakpoint.h" and "target.h".
6385 (x86_use_watchpoints): Delete.
6386 (x86_can_use_hw_breakpoint, x86_region_ok_for_hw_watchpoint)
6387 (x86_stopped_by_watchpoint, x86_stopped_data_address)
6388 (x86_insert_watchpoint, x86_remove_watchpoint)
6389 (x86_insert_hw_breakpoint, x86_remove_hw_breakpoint)
6390 (x86_stopped_by_hw_breakpoint): New declarations.
6391 (x86_nat_target): New template class.
6392
6393 * ppc-linux-nat.c (ppc_linux_nat_target): New class.
6394 (the_ppc_linux_nat_target): New.
6395 (ppc_linux_fetch_inferior_registers)
6396 (ppc_linux_can_use_hw_breakpoint)
6397 (ppc_linux_region_ok_for_hw_watchpoint)
6398 (ppc_linux_ranged_break_num_registers)
6399 (ppc_linux_insert_hw_breakpoint, ppc_linux_remove_hw_breakpoint)
6400 (ppc_linux_insert_mask_watchpoint)
6401 (ppc_linux_remove_mask_watchpoint)
6402 (ppc_linux_can_accel_watchpoint_condition)
6403 (ppc_linux_insert_watchpoint, ppc_linux_remove_watchpoint)
6404 (ppc_linux_stopped_data_address, ppc_linux_stopped_by_watchpoint)
6405 (ppc_linux_watchpoint_addr_within_range)
6406 (ppc_linux_masked_watch_num_registers)
6407 (ppc_linux_store_inferior_registers, ppc_linux_auxv_parse)
6408 (ppc_linux_read_description): Refactor as methods of
6409 ppc_linux_nat_target.
6410 (_initialize_ppc_linux_nat): Adjust. Set linux_target.
6411
6412 * procfs.c (procfs_xfer_partial): Delete forward declaration.
6413 (procfs_target): New class.
6414 (the_procfs_target): New.
6415 (procfs_target): Delete function.
6416 (procfs_auxv_parse, procfs_attach, procfs_detach)
6417 (procfs_fetch_registers, procfs_store_registers, procfs_wait)
6418 (procfs_xfer_partial, procfs_resume, procfs_pass_signals)
6419 (procfs_files_info, procfs_kill_inferior, procfs_mourn_inferior)
6420 (procfs_create_inferior, procfs_update_thread_list)
6421 (procfs_thread_alive, procfs_pid_to_str)
6422 (procfs_can_use_hw_breakpoint, procfs_stopped_by_watchpoint)
6423 (procfs_stopped_data_address, procfs_insert_watchpoint)
6424 (procfs_remove_watchpoint, procfs_region_ok_for_hw_watchpoint)
6425 (proc_find_memory_regions, procfs_info_proc)
6426 (procfs_make_note_section): Refactor as methods of procfs_target.
6427 (_initialize_procfs): Adjust.
6428 * sol-thread.c (sol_thread_target): New class.
6429 (sol_thread_ops): Now a sol_thread_target.
6430 (sol_thread_detach, sol_thread_resume, sol_thread_wait)
6431 (sol_thread_fetch_registers, sol_thread_store_registers)
6432 (sol_thread_xfer_partial, sol_thread_mourn_inferior)
6433 (sol_thread_alive, solaris_pid_to_str, sol_update_thread_list)
6434 (sol_get_ada_task_ptid): Refactor as methods of sol_thread_target.
6435 (init_sol_thread_ops): Delete.
6436 (_initialize_sol_thread): Adjust. Remove references to
6437 init_sol_thread_ops and complete_target_initialization.
6438
6439 * windows-nat.c (windows_nat_target): New class.
6440 (windows_fetch_inferior_registers)
6441 (windows_store_inferior_registers, windows_resume, windows_wait)
6442 (windows_attach, windows_detach, windows_pid_to_exec_file)
6443 (windows_files_info, windows_create_inferior)
6444 (windows_mourn_inferior, windows_interrupt, windows_kill_inferior)
6445 (windows_close, windows_pid_to_str, windows_xfer_partial)
6446 (windows_get_tib_address, windows_get_ada_task_ptid)
6447 (windows_thread_name, windows_thread_alive): Refactor as
6448 windows_nat_target methods.
6449 (do_initial_windows_stuff): Adjust.
6450 (windows_target): Delete function.
6451 (_initialize_windows_nat): Adjust.
6452
6453 * darwin-nat.c (darwin_resume, darwin_wait_to, darwin_interrupt)
6454 (darwin_mourn_inferior, darwin_kill_inferior)
6455 (darwin_create_inferior, darwin_attach, darwin_detach)
6456 (darwin_pid_to_str, darwin_thread_alive, darwin_xfer_partial)
6457 (darwin_pid_to_exec_file, darwin_get_ada_task_ptid)
6458 (darwin_supports_multi_process): Refactor as darwin_nat_target
6459 methods.
6460 (darwin_resume_to, darwin_files_info): Delete.
6461 (_initialize_darwin_inferior): Rename to ...
6462 (_initialize_darwin_nat): ... this. Adjust to C++ification.
6463 * darwin-nat.h: Include "inf-child.h".
6464 (darwin_nat_target): New class.
6465 (darwin_complete_target): Delete.
6466 * i386-darwin-nat.c (i386_darwin_nat_target): New class.
6467 (darwin_target): New.
6468 (i386_darwin_fetch_inferior_registers)
6469 (i386_darwin_store_inferior_registers): Refactor as methods of
6470 darwin_nat_target.
6471 (darwin_complete_target): Delete, with ...
6472 (_initialize_i386_darwin_nat): ... bits factored out here.
6473
6474 * alpha-linux-nat.c (alpha_linux_nat_target): New class.
6475 (the_alpha_linux_nat_target): New.
6476 (alpha_linux_register_u_offset): Refactor as
6477 alpha_linux_nat_target method.
6478 (_initialize_alpha_linux_nat): Adjust.
6479 * linux-nat-trad.c (inf_ptrace_register_u_offset): Delete.
6480 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6481 (inf_ptrace_store_register, inf_ptrace_store_registers): Refact as
6482 methods of linux_nat_trad_target.
6483 (linux_trad_target): Delete.
6484 * linux-nat-trad.h (linux_trad_target): Delete function.
6485 (linux_nat_trad_target): New class.
6486 * mips-linux-nat.c (mips_linux_nat_target): New class.
6487 (super_fetch_registers, super_store_registers, super_close):
6488 Delete.
6489 (the_mips_linux_nat_target): New.
6490 (mips64_linux_regsets_fetch_registers)
6491 (mips64_linux_regsets_store_registers)
6492 (mips64_linux_fetch_registers, mips64_linux_store_registers)
6493 (mips_linux_register_u_offset, mips_linux_read_description)
6494 (mips_linux_can_use_hw_breakpoint)
6495 (mips_linux_stopped_by_watchpoint)
6496 (mips_linux_stopped_data_address)
6497 (mips_linux_region_ok_for_hw_watchpoint)
6498 (mips_linux_insert_watchpoint, mips_linux_remove_watchpoint)
6499 (mips_linux_close): Refactor as methods of mips_linux_nat.
6500 (_initialize_mips_linux_nat): Adjust to C++ification.
6501
6502 * aix-thread.c (aix_thread_target): New class.
6503 (aix_thread_ops): Now an aix_thread_target.
6504 (aix_thread_detach, aix_thread_resume, aix_thread_wait)
6505 (aix_thread_fetch_registers, aix_thread_store_registers)
6506 (aix_thread_xfer_partial, aix_thread_mourn_inferior)
6507 (aix_thread_thread_alive, aix_thread_pid_to_str)
6508 (aix_thread_extra_thread_info, aix_thread_get_ada_task_ptid):
6509 Refactor as methods of aix_thread_target.
6510 (init_aix_thread_ops): Delete.
6511 (_initialize_aix_thread): Remove references to init_aix_thread_ops
6512 and complete_target_initialization.
6513 * rs6000-nat.c (rs6000_xfer_shared_libraries): Delete.
6514 (rs6000_nat_target): New class.
6515 (the_rs6000_nat_target): New.
6516 (rs6000_fetch_inferior_registers, rs6000_store_inferior_registers)
6517 (rs6000_xfer_partial, rs6000_wait, rs6000_create_inferior)
6518 (rs6000_xfer_shared_libraries): Refactor as rs6000_nat_target methods.
6519 (super_create_inferior): Delete.
6520 (_initialize_rs6000_nat): Adjust to C++ification.
6521
6522 * arm-linux-nat.c (arm_linux_nat_target): New class.
6523 (the_arm_linux_nat_target): New.
6524 (arm_linux_fetch_inferior_registers)
6525 (arm_linux_store_inferior_registers, arm_linux_read_description)
6526 (arm_linux_can_use_hw_breakpoint, arm_linux_insert_hw_breakpoint)
6527 (arm_linux_remove_hw_breakpoint)
6528 (arm_linux_region_ok_for_hw_watchpoint)
6529 (arm_linux_insert_watchpoint, arm_linux_remove_watchpoint)
6530 (arm_linux_stopped_data_address, arm_linux_stopped_by_watchpoint)
6531 (arm_linux_watchpoint_addr_within_range): Refactor as methods of
6532 arm_linux_nat_target.
6533 (_initialize_arm_linux_nat): Adjust to C++ification.
6534
6535 * aarch64-linux-nat.c (aarch64_linux_nat_target): New class.
6536 (the_aarch64_linux_nat_target): New.
6537 (aarch64_linux_fetch_inferior_registers)
6538 (aarch64_linux_store_inferior_registers)
6539 (aarch64_linux_child_post_startup_inferior)
6540 (aarch64_linux_read_description)
6541 (aarch64_linux_can_use_hw_breakpoint)
6542 (aarch64_linux_insert_hw_breakpoint)
6543 (aarch64_linux_remove_hw_breakpoint)
6544 (aarch64_linux_insert_watchpoint, aarch64_linux_remove_watchpoint)
6545 (aarch64_linux_region_ok_for_hw_watchpoint)
6546 (aarch64_linux_stopped_data_address)
6547 (aarch64_linux_stopped_by_watchpoint)
6548 (aarch64_linux_watchpoint_addr_within_range)
6549 (aarch64_linux_can_do_single_step): Refactor as methods of
6550 aarch64_linux_nat_target.
6551 (super_post_startup_inferior): Delete.
6552 (_initialize_aarch64_linux_nat): Adjust to C++ification.
6553
6554 * hppa-linux-nat.c (hppa_linux_nat_target): New class.
6555 (the_hppa_linux_nat_target): New.
6556 (hppa_linux_fetch_inferior_registers)
6557 (hppa_linux_store_inferior_registers): Refactor as methods of
6558 hppa_linux_nat_target.
6559 (_initialize_hppa_linux_nat): Adjust to C++ification.
6560
6561 * ia64-linux-nat.c (ia64_linux_nat_target): New class.
6562 (the_ia64_linux_nat_target): New.
6563 (ia64_linux_insert_watchpoint, ia64_linux_remove_watchpoint)
6564 (ia64_linux_stopped_data_address)
6565 (ia64_linux_stopped_by_watchpoint, ia64_linux_fetch_registers)
6566 (ia64_linux_store_registers, ia64_linux_xfer_partial): Refactor as
6567 ia64_linux_nat_target methods.
6568 (super_xfer_partial): Delete.
6569 (_initialize_ia64_linux_nat): Adjust to C++ification.
6570
6571 * m32r-linux-nat.c (m32r_linux_nat_target): New class.
6572 (the_m32r_linux_nat_target): New.
6573 (m32r_linux_fetch_inferior_registers)
6574 (m32r_linux_store_inferior_registers): Refactor as
6575 m32r_linux_nat_target methods.
6576 (_initialize_m32r_linux_nat): Adjust to C++ification.
6577
6578 * m68k-linux-nat.c (m68k_linux_nat_target): New class.
6579 (the_m68k_linux_nat_target): New.
6580 (m68k_linux_fetch_inferior_registers)
6581 (m68k_linux_store_inferior_registers): Refactor as
6582 m68k_linux_nat_target methods.
6583 (_initialize_m68k_linux_nat): Adjust to C++ification.
6584
6585 * s390-linux-nat.c (s390_linux_nat_target): New class.
6586 (the_s390_linux_nat_target): New.
6587 (s390_linux_fetch_inferior_registers)
6588 (s390_linux_store_inferior_registers, s390_stopped_by_watchpoint)
6589 (s390_insert_watchpoint, s390_remove_watchpoint)
6590 (s390_can_use_hw_breakpoint, s390_insert_hw_breakpoint)
6591 (s390_remove_hw_breakpoint, s390_region_ok_for_hw_watchpoint)
6592 (s390_auxv_parse, s390_read_description): Refactor as methods of
6593 s390_linux_nat_target.
6594 (_initialize_s390_nat): Adjust to C++ification.
6595
6596 * sparc-linux-nat.c (sparc_linux_nat_target): New class.
6597 (the_sparc_linux_nat_target): New.
6598 (_initialize_sparc_linux_nat): Adjust to C++ification.
6599 * sparc-nat.c (sparc_fetch_inferior_registers)
6600 (sparc_store_inferior_registers): Remove target_ops parameter.
6601 * sparc-nat.h (sparc_fetch_inferior_registers)
6602 (sparc_store_inferior_registers): Remove target_ops parameter.
6603 * sparc64-linux-nat.c (sparc64_linux_nat_target): New class.
6604 (the_sparc64_linux_nat_target): New.
6605 (_initialize_sparc64_linux_nat): Adjust to C++ification.
6606
6607 * spu-linux-nat.c (spu_linux_nat_target): New class.
6608 (the_spu_linux_nat_target): New.
6609 (spu_child_post_startup_inferior, spu_child_post_attach)
6610 (spu_child_wait, spu_fetch_inferior_registers)
6611 (spu_store_inferior_registers, spu_xfer_partial)
6612 (spu_can_use_hw_breakpoint): Refactor as spu_linux_nat_target
6613 methods.
6614 (_initialize_spu_nat): Adjust to C++ification.
6615
6616 * tilegx-linux-nat.c (tilegx_linux_nat_target): New class.
6617 (the_tilegx_linux_nat_target): New.
6618 (fetch_inferior_registers, store_inferior_registers):
6619 Refactor as methods.
6620 (_initialize_tile_linux_nat): Adjust to C++ification.
6621
6622 * xtensa-linux-nat.c (xtensa_linux_nat_target): New class.
6623 (the_xtensa_linux_nat_target): New.
6624 (xtensa_linux_fetch_inferior_registers)
6625 (xtensa_linux_store_inferior_registers): Refactor as
6626 xtensa_linux_nat_target methods.
6627 (_initialize_xtensa_linux_nat): Adjust to C++ification.
6628
6629 * fbsd-nat.c (USE_SIGTRAP_SIGINFO): Delete.
6630 (fbsd_pid_to_exec_file, fbsd_find_memory_regions)
6631 (fbsd_find_memory_regions, fbsd_info_proc, fbsd_xfer_partial)
6632 (fbsd_thread_alive, fbsd_pid_to_str, fbsd_thread_name)
6633 (fbsd_update_thread_list, fbsd_resume, fbsd_wait)
6634 (fbsd_stopped_by_sw_breakpoint)
6635 (fbsd_supports_stopped_by_sw_breakpoint, fbsd_follow_fork)
6636 (fbsd_insert_fork_catchpoint, fbsd_remove_fork_catchpoint)
6637 (fbsd_insert_vfork_catchpoint, fbsd_remove_vfork_catchpoint)
6638 (fbsd_post_startup_inferior, fbsd_post_attach)
6639 (fbsd_insert_exec_catchpoint, fbsd_remove_exec_catchpoint)
6640 (fbsd_set_syscall_catchpoint)
6641 (super_xfer_partial, super_resume, super_wait)
6642 (fbsd_supports_stopped_by_hw_breakpoint): Delete.
6643 (fbsd_handle_debug_trap): Remove target_ops parameter.
6644 (fbsd_nat_add_target): Delete.
6645 * fbsd-nat.h: Include "inf-ptrace.h".
6646 (fbsd_nat_add_target): Delete.
6647 (USE_SIGTRAP_SIGINFO): Define.
6648 (fbsd_nat_target): New class.
6649
6650 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers)
6651 (amd64bsd_store_inferior_registers): Remove target_ops parameter.
6652 (amd64bsd_target): Delete.
6653 * amd64-bsd-nat.h: New file.
6654 * amd64-fbsd-nat.c: Include "amd64-bsd-nat.h" instead of
6655 "x86-bsd-nat.h".
6656 (amd64_fbsd_nat_target): New class.
6657 (the_amd64_fbsd_nat_target): New.
6658 (amd64fbsd_read_description): Refactor as method of
6659 amd64_fbsd_nat_target.
6660 (amd64_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6661 (_initialize_amd64fbsd_nat): Adjust to C++ification.
6662 * amd64-nat.h (amd64bsd_target): Delete function declaration.
6663 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers)
6664 (i386bsd_store_inferior_registers): Remove target_ops parameter.
6665 (i386bsd_target): Delete.
6666 * i386-bsd-nat.h (i386bsd_target): Delete function declaration.
6667 (i386bsd_fetch_inferior_registers)
6668 (i386bsd_store_inferior_registers): Declare.
6669 (i386_bsd_nat_target): New class.
6670 * i386-fbsd-nat.c (i386_fbsd_nat_target): New class.
6671 (the_i386_fbsd_nat_target): New.
6672 (i386fbsd_resume, i386fbsd_read_description): Refactor as
6673 i386_fbsd_nat_target methods.
6674 (i386_fbsd_nat_target::supports_stopped_by_hw_breakpoint): New.
6675 (_initialize_i386fbsd_nat): Adjust to C++ification.
6676 * x86-bsd-nat.c (super_mourn_inferior): Delete.
6677 (x86bsd_mourn_inferior, x86bsd_target): Delete.
6678 (_initialize_x86_bsd_nat): Adjust to C++ification.
6679 * x86-bsd-nat.h: Include "x86-nat.h".
6680 (x86bsd_target): Delete declaration.
6681 (x86bsd_nat_target): New class.
6682
6683 * aarch64-fbsd-nat.c (aarch64_fbsd_nat_target): New class.
6684 (the_aarch64_fbsd_nat_target): New.
6685 (aarch64_fbsd_fetch_inferior_registers)
6686 (aarch64_fbsd_store_inferior_registers): Refactor as methods of
6687 aarch64_fbsd_nat_target.
6688 (_initialize_aarch64_fbsd_nat): Adjust to C++ification.
6689 * alpha-bsd-nat.c (alpha_bsd_nat_target): New class.
6690 (the_alpha_bsd_nat_target): New.
6691 (alphabsd_fetch_inferior_registers)
6692 (alphabsd_store_inferior_registers): Refactor as
6693 alpha_bsd_nat_target methods.
6694 (_initialize_alphabsd_nat): Refactor as methods of
6695 alpha_bsd_nat_target.
6696 * amd64-nbsd-nat.c: Include "amd64-bsd-nat.h".
6697 (the_amd64_nbsd_nat_target): New.
6698 (_initialize_amd64nbsd_nat): Adjust to C++ification.
6699 * amd64-obsd-nat.c: Include "amd64-bsd-nat.h".
6700 (the_amd64_obsd_nat_target): New.
6701 (_initialize_amd64obsd_nat): Adjust to C++ification.
6702 * arm-fbsd-nat.c (arm_fbsd_nat_target): New.
6703 (the_arm_fbsd_nat_target): New.
6704 (arm_fbsd_fetch_inferior_registers)
6705 (arm_fbsd_store_inferior_registers, arm_fbsd_read_description):
6706 (_initialize_arm_fbsd_nat): Refactor as methods of
6707 arm_fbsd_nat_target.
6708 (_initialize_arm_fbsd_nat): Adjust to C++ification.
6709 * arm-nbsd-nat.c (arm_netbsd_nat_target): New class.
6710 (the_arm_netbsd_nat_target): New.
6711 (armnbsd_fetch_registers, armnbsd_store_registers): Refactor as
6712 arm_netbsd_nat_target.
6713 (_initialize_arm_netbsd_nat): Adjust to C++ification.
6714 * hppa-nbsd-nat.c (hppa_nbsd_nat_target): New class.
6715 (the_hppa_nbsd_nat_target): New.
6716 (hppanbsd_fetch_registers, hppanbsd_store_registers): Refactor as
6717 hppa_nbsd_nat_target methods.
6718 (_initialize_hppanbsd_nat): Adjust to C++ification.
6719 * hppa-obsd-nat.c (hppa_obsd_nat_target): New class.
6720 (the_hppa_obsd_nat_target): New.
6721 (hppaobsd_fetch_registers, hppaobsd_store_registers): Refactor as
6722 methods of hppa_obsd_nat_target.
6723 (_initialize_hppaobsd_nat): Adjust to C++ification. Use
6724 add_target.
6725 * i386-nbsd-nat.c (the_i386_nbsd_nat_target): New.
6726 (_initialize_i386nbsd_nat): Adjust to C++ification. Use
6727 add_target.
6728 * i386-obsd-nat.c (the_i386_obsd_nat_target): New.
6729 (_initialize_i386obsd_nat): Use add_target.
6730 * m68k-bsd-nat.c (m68k_bsd_nat_target): New class.
6731 (the_m68k_bsd_nat_target): New.
6732 (m68kbsd_fetch_inferior_registers)
6733 (m68kbsd_store_inferior_registers): Refactor as methods of
6734 m68k_bsd_nat_target.
6735 (_initialize_m68kbsd_nat): Adjust to C++ification.
6736 * mips-fbsd-nat.c (mips_fbsd_nat_target): New class.
6737 (the_mips_fbsd_nat_target): New.
6738 (mips_fbsd_fetch_inferior_registers)
6739 (mips_fbsd_store_inferior_registers): Refactor as methods of
6740 mips_fbsd_nat_target.
6741 (_initialize_mips_fbsd_nat): Adjust to C++ification. Use
6742 add_target.
6743 * mips-nbsd-nat.c (mips_nbsd_nat_target): New class.
6744 (the_mips_nbsd_nat_target): New.
6745 (mipsnbsd_fetch_inferior_registers)
6746 (mipsnbsd_store_inferior_registers): Refactor as methods of
6747 mips_nbsd_nat_target.
6748 (_initialize_mipsnbsd_nat): Adjust to C++ification.
6749 * mips64-obsd-nat.c (mips64_obsd_nat_target): New class.
6750 (the_mips64_obsd_nat_target): New.
6751 (mips64obsd_fetch_inferior_registers)
6752 (mips64obsd_store_inferior_registers): Refactor as methods of
6753 mips64_obsd_nat_target.
6754 (_initialize_mips64obsd_nat): Adjust to C++ification. Use
6755 add_target.
6756 * nbsd-nat.c (nbsd_pid_to_exec_file): Refactor as method of
6757 nbsd_nat_target.
6758 * nbsd-nat.h: Include "inf-ptrace.h".
6759 (nbsd_nat_target): New class.
6760 * obsd-nat.c (obsd_pid_to_str, obsd_update_thread_list)
6761 (obsd_wait): Refactor as methods of obsd_nat_target.
6762 (obsd_add_target): Delete.
6763 * obsd-nat.h: Include "inf-ptrace.h".
6764 (obsd_nat_target): New class.
6765 * ppc-fbsd-nat.c (ppc_fbsd_nat_target): New class.
6766 (the_ppc_fbsd_nat_target): New.
6767 (ppcfbsd_fetch_inferior_registers)
6768 (ppcfbsd_store_inferior_registers): Refactor as methods of
6769 ppc_fbsd_nat_target.
6770 (_initialize_ppcfbsd_nat): Adjust to C++ification. Use
6771 add_target.
6772 * ppc-nbsd-nat.c (ppc_nbsd_nat_target): New class.
6773 (the_ppc_nbsd_nat_target): New.
6774 (ppcnbsd_fetch_inferior_registers)
6775 (ppcnbsd_store_inferior_registers): Refactor as methods of
6776 ppc_nbsd_nat_target.
6777 (_initialize_ppcnbsd_nat): Adjust to C++ification.
6778 * ppc-obsd-nat.c (ppc_obsd_nat_target): New class.
6779 (the_ppc_obsd_nat_target): New.
6780 (ppcobsd_fetch_registers, ppcobsd_store_registers): Refactor as
6781 methods of ppc_obsd_nat_target.
6782 (_initialize_ppcobsd_nat): Adjust to C++ification. Use
6783 add_target.
6784 * sh-nbsd-nat.c (sh_nbsd_nat_target): New class.
6785 (the_sh_nbsd_nat_target): New.
6786 (shnbsd_fetch_inferior_registers)
6787 (shnbsd_store_inferior_registers): Refactor as methods of
6788 sh_nbsd_nat_target.
6789 (_initialize_shnbsd_nat): Adjust to C++ification.
6790 * sparc-nat.c (sparc_xfer_wcookie): Make extern.
6791 (inf_ptrace_xfer_partial): Delete.
6792 (sparc_xfer_partial, sparc_target): Delete.
6793 * sparc-nat.h (sparc_fetch_inferior_registers)
6794 (sparc_store_inferior_registers, sparc_xfer_wcookie): Declare.
6795 (sparc_target): Delete function declaration.
6796 (sparc_target): New template class.
6797 * sparc-nbsd-nat.c (the_sparc_nbsd_nat_target): New.
6798 (_initialize_sparcnbsd_nat): Adjust to C++ification.
6799 * sparc64-fbsd-nat.c (the_sparc64_fbsd_nat_target): New.
6800 (_initialize_sparc64fbsd_nat): Adjust to C++ification. Use
6801 add_target.
6802 * sparc64-nbsd-nat.c (the_sparc64_nbsd_nat_target): New.
6803 (_initialize_sparc64nbsd_nat): Adjust to C++ification.
6804 * sparc64-obsd-nat.c (the_sparc64_obsd_nat_target): New.
6805 (_initialize_sparc64obsd_nat): Adjust to C++ification. Use
6806 add_target.
6807 * vax-bsd-nat.c (vax_bsd_nat_target): New class.
6808 (the_vax_bsd_nat_target): New.
6809 (vaxbsd_fetch_inferior_registers)
6810 (vaxbsd_store_inferior_registers): Refactor as vax_bsd_nat_target
6811 methods.
6812 (_initialize_vaxbsd_nat): Adjust to C++ification.
6813
6814 * bsd-kvm.c (bsd_kvm_target): New class.
6815 (bsd_kvm_ops): Now a bsd_kvm_target.
6816 (bsd_kvm_open, bsd_kvm_close, bsd_kvm_xfer_partial)
6817 (bsd_kvm_files_info, bsd_kvm_fetch_registers)
6818 (bsd_kvm_thread_alive, bsd_kvm_pid_to_str): Refactor as methods of
6819 bsd_kvm_target.
6820 (bsd_kvm_return_one): Delete.
6821 (bsd_kvm_add_target): Adjust to C++ification.
6822
6823 * nto-procfs.c (nto_procfs_target, nto_procfs_target_native)
6824 (nto_procfs_target_procfs): New classes.
6825 (procfs_open_1, procfs_thread_alive, procfs_update_thread_list)
6826 (procfs_files_info, procfs_pid_to_exec_file, procfs_attach)
6827 (procfs_post_attach, procfs_wait, procfs_fetch_registers)
6828 (procfs_xfer_partial, procfs_detach, procfs_insert_breakpoint)
6829 (procfs_remove_breakpoint, procfs_insert_hw_breakpoint)
6830 (procfs_remove_hw_breakpoint, procfs_resume)
6831 (procfs_mourn_inferior, procfs_create_inferior, procfs_interrupt)
6832 (procfs_kill_inferior, procfs_store_registers)
6833 (procfs_pass_signals, procfs_pid_to_str, procfs_can_run): Refactor
6834 as methods of nto_procfs_target.
6835 (nto_procfs_ops): Now an nto_procfs_target_procfs.
6836 (nto_native_ops): Delete.
6837 (procfs_open, procfs_native_open): Delete.
6838 (nto_native_ops): Now an nto_procfs_target_native.
6839 (init_procfs_targets): Adjust to C++ification.
6840 (procfs_can_use_hw_breakpoint, procfs_remove_hw_watchpoint)
6841 (procfs_insert_hw_watchpoint, procfs_stopped_by_watchpoint):
6842 Refactor as methods of nto_procfs_target.
6843
6844 * go32-nat.c (go32_nat_target): New class.
6845 (the_go32_nat_target): New.
6846 (go32_attach, go32_resume, go32_wait, go32_fetch_registers)
6847 (go32_store_registers, go32_xfer_partial, go32_files_info)
6848 (go32_kill_inferior, go32_create_inferior, go32_mourn_inferior)
6849 (go32_terminal_init, go32_terminal_info, go32_terminal_inferior)
6850 (go32_terminal_ours, go32_pass_ctrlc, go32_thread_alive)
6851 (go32_pid_to_str): Refactor as methods of go32_nat_target.
6852 (go32_target): Delete.
6853 (_initialize_go32_nat): Adjust to C++ification.
6854
6855 * gnu-nat.c (gnu_wait, gnu_resume, gnu_kill_inferior)
6856 (gnu_mourn_inferior, gnu_create_inferior, gnu_attach, gnu_detach)
6857 (gnu_stop, gnu_thread_alive, gnu_xfer_partial)
6858 (gnu_find_memory_regions, gnu_pid_to_str): Refactor as methods of
6859 gnu_nat_target.
6860 (gnu_target): Delete.
6861 * gnu-nat.h (gnu_target): Delete.
6862 (gnu_nat_target): New class.
6863 * i386-gnu-nat.c (gnu_base_target): New.
6864 (i386_gnu_nat_target): New class.
6865 (the_i386_gnu_nat_target): New.
6866 (_initialize_i386gnu_nat): Adjust to C++ification.
6867
3fffc070
PA
68682018-05-02 Pedro Alves <palves@redhat.com>
6869
6870 * bfd-target.c (target_bfd_xclose): Rename to ...
6871 (target_bfd_close): ... this.
6872 (target_bfd_reopen): Adjust.
6873 * target.c (target_close): Remove references to to_xclose.
6874 * target.h (target_ops::to_xclose): Delete.
6875 (target_ops::to_close): Update comments.
6876
6798487f
PA
68772018-05-02 Pedro Alves <palves@redhat.com>
6878
6879 * alpha-linux-nat.c: Include "linux-nat-trad.h" instead of
6880 "linux-nat.h".
6881 * configure.nat (alpha-linux, linux-mips): Add linux-nat-trad.o.
6882 * inf-ptrace.c (inf_ptrace_register_u_offset)
6883 (inf_ptrace_fetch_register, inf_ptrace_fetch_registers)
6884 (inf_ptrace_store_register, inf_ptrace_store_registers)
6885 (inf_ptrace_trad_target): Move to ...
6886 * linux-nat-trad.c: ... this new file.
6887 * linux-nat-trad.h: New file.
6888 * linux-nat.c (linux_target_install_ops): Make extern.
6889 (linux_trad_target): Delete.
6890 * linux-nat.h (linux_trad_target): Delete declaration.
6891 (linux_target_install_ops): Declare.
6892 * mips-linux-nat.c: Include "linux-nat-trad.h" instead of
6893 "linux-nat.h".
6894
c1955e17
PA
68952018-05-02 Pedro Alves <palves@redhat.com>
6896
6897 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6898 procfs_target/add_target here.
6899 * procfs.c (procfs_target): Make static.
6900 (_initialize_procfs): Call add_target here.
6901 * procfs.h (struct target_ops): Remove forward declaration.
6902 (procfs_target): Remove declaration.
6903 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Delete.
6904
b5c8fcb1
PA
69052018-05-02 Pedro Alves <palves@redhat.com>
6906
6907 * procfs.c (procfs_stopped_by_watchpoint)
6908 (procfs_insert_watchpoint, procfs_remove_watchpoint)
6909 (procfs_region_ok_for_hw_watchpoint, procfs_stopped_data_address):
6910 Forward declare.
6911 (procfs_use_watchpoints): Delete, move contents...
6912 (procfs_target): ... here.
6913 * procfs.h (procfs_use_watchpoints): Delete declaration.
6914 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Don't call
6915 procfs_use_watchpoints.
6916 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Don't call
6917 procfs_use_watchpoints.
6918
0489430a
TT
69192018-05-02 Tom Tromey <tom@tromey.com>
6920
6921 PR python/20084:
6922 * python/python.c (gdbpy_parameter_value): Handle var_zuinteger
6923 and var_zuinteger_unlimited.
6924 * python/py-param.c (struct parm_constant): Add PARAM_ZUINTEGER
6925 and PARAM_ZUINTEGER_UNLIMITED.
6926 (set_parameter_value): Handle var_zuinteger and
6927 var_zuinteger_unlimited.
6928 (add_setshow_generic): Likewise.
6929 (parmpy_init): Likewise.
6930
1632f8ba
DR
69312018-04-28 Dan Robertson <danlrobertson89@gmail.com>
6932
6933 PR rust/23124
6934 * gdb/rust-exp.y (convert_params_to_types): Ensure that the params
6935 pointer is not null before dereferencing it.
6936
76761936
TT
69372018-04-30 Tom Tromey <tom@tromey.com>
6938
6939 * darwin-nat-info.c (darwin_debug_regions_recurse): Remove use of
6940 is_mi_like_p.
6941
2d33446d
TT
69422018-04-30 Tom Tromey <tom@tromey.com>
6943
6944 * breakpoint.c (mention): Remove use of is_mi_like_p.
6945 (print_mention_ranged_breakpoint): Likewise.
6946 * break-catch-throw.c (print_it_exception_catchpoint): Remove use
6947 of is_mi_like_p.
6948
f3c6abab
TT
69492018-04-30 Tom Tromey <tom@tromey.com>
6950
6951 * tracepoint.c (tvariables_info_1): Remove use of is_mi_like_p.
6952
40c03530
TT
69532018-04-30 Tom Tromey <tom@tromey.com>
6954
6955 * spu-tdep.c (info_spu_mailbox_list, info_spu_dma_cmdlist)
6956 (info_spu_event_command): Remove some uses of is_mi_like_p.
6957
2038b7fd
TT
69582018-04-30 Tom Tromey <tom@tromey.com>
6959
6960 * python/py-framefilter.c (py_print_single_arg)
6961 (enumerate_locals, py_print_args, py_print_frame): Remove some
6962 uses of is_mi_like_p.
6963
4904c3c6
TT
69642018-04-30 Tom Tromey <tom@tromey.com>
6965
6966 * ui-out.c: Update.
6967 * cli-out.h (cli_ui_out::do_is_mi_like_p): Update.
6968 * ui-out.h (ui_out::is_mi_like_p): Now const.
6969 (ui_out::do_is_mi_like_p): Now const.
6970 * mi/mi-out.h (mi_ui_out::do_is_mi_like_p): Update.
6971
7c66fffc
TT
69722018-04-30 Tom Tromey <tom@tromey.com>
6973
6974 * varobj.c (varobj_set_visualizer): Use new_reference.
6975 * python/python.c (gdbpy_decode_line): Use new_reference.
6976 * python/py-cmd.c (cmdpy_function, cmdpy_completer_helper): Use
6977 new_reference.
6978
bbfa6f00
TT
69792018-04-30 Tom Tromey <tom@tromey.com>
6980
6981 * varobj.c (install_new_value): Use new_reference.
6982 * value.h (value_incref): Return void. Swap intro comment with
6983 value_decref.
6984 * value.c (set_value_parent): Use new_reference.
6985 (value_incref): Return void. Update intro comment.
6986 (release_value): Use new_reference.
6987 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use new_reference.
6988
1831a9f9
TT
69892018-04-30 Tom Tromey <tom@tromey.com>
6990
6991 * symfile-mem.c (symbol_file_add_from_memory): Use new_reference.
6992 * gdb_bfd.h (new_bfd_ref): Remove.
6993 (gdb_bfd_open): Update comment.
6994 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
6995 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_record_inclusion)
6996 (gdb_bfd_fdopenr): Use new_reference.
6997 * exec.c (exec_file_attach): Use new_reference.
6998
7c1b5f3d
TT
69992018-04-30 Tom Tromey <tom@tromey.com>
7000
7001 * common/gdb_ref_ptr.h (ref_ptr::new_reference): New static
7002 method.
7003
e11fb955
TT
70042018-04-30 Tom Tromey <tom@tromey.com>
7005
7006 * jit.c (jit_read_code_entry): Use type_align.
7007 * i386-tdep.c (i386_gdbarch_init): Don't call
7008 set_gdbarch_long_long_align_bit.
7009 * gdbarch.sh: Remove long_long_align_bit.
7010 * gdbarch.c, gdbarch.h: Rebuild.
7011 * arc-tdep.c (arc_type_align): New function.
7012 (arc_gdbarch_init): Use arc_type_align. Don't call
7013 set_gdbarch_long_long_align_bit.
7014
2fff16dd
TT
70152018-04-30 Tom Tromey <tom@tromey.com>
7016
7017 * rust-lang.c (rust_type_alignment): Remove.
7018 (rust_composite_type): Use type_align.
7019
6d7bb824
TT
70202018-04-30 Tom Tromey <tom@tromey.com>
7021
7022 * NEWS: Mention Type.align.
7023 * python/py-type.c (typy_get_alignof): New function.
7024 (type_object_getset): Add "alignof".
7025
007e1530
TT
70262018-04-30 Tom Tromey <tom@tromey.com>
7027
7028 PR exp/17095:
7029 * NEWS: Update.
7030 * std-operator.def (UNOP_ALIGNOF): New operator.
7031 * expprint.c (dump_subexp_body_standard) <case UNOP_ALIGNOF>:
7032 New.
7033 * eval.c (evaluate_subexp_standard) <case UNOP_ALIGNOF>: New.
7034 * c-lang.c (c_op_print_tab): Add alignof.
7035 * c-exp.y (ALIGNOF): New token.
7036 (exp): Add "ALIGNOF" production.
7037 (ident_tokens): Add _Alignof and alignof.
7038
2b4424c3
TT
70392018-04-30 Tom Tromey <tom@tromey.com>
7040
7041 * i386-tdep.c (i386_type_align): New function.
7042 (i386_gdbarch_init): Update.
7043 * gdbarch.sh (type_align): New method.
7044 * gdbarch.c, gdbarch.h: Rebuild.
7045 * arch-utils.h (default_type_align): Declare.
7046 * arch-utils.c (default_type_align): New function.
7047 * gdbtypes.h (TYPE_ALIGN_BITS): New define.
7048 (struct type) <align_log2>: New field.
7049 <instance_flags>: Now a bitfield.
7050 (TYPE_RAW_ALIGN): New macro.
7051 (type_align, type_raw_align, set_type_align): Declare.
7052 * gdbtypes.c (type_align, type_raw_align, set_type_align): New
7053 functions.
7054 * dwarf2read.c (quirk_rust_enum): Set type alignment.
7055 (get_alignment, maybe_set_alignment): New functions.
7056 (read_structure_type, read_enumeration_type, read_array_type)
7057 (read_set_type, read_tag_pointer_type, read_tag_reference_type)
7058 (read_subrange_type, read_base_type): Set type alignment.
7059
d33bc52e
SM
70602018-04-30 Simon Marchi <simon.marchi@ericsson.com>
7061
7062 * dwarf2read.c (read_index_from_section): Use bool.
7063
e28b63a9
FG
70642018-04-29 Fabian Groffen <grobian@gentoo.org>
7065
7066 PR gdb/22950
7067 * proc-events.c (init_syscall_table): Guard usage os SYS_uuidsys
7068 with #ifdef.
7069
cd8c76e4
JR
70702018-04-29 John Reiser <jreiser@BitWagon.com>
7071
7072 PR build/22873
7073 * gdb/Makefile.in: (.c:.l, .c:.y): Write the target only in the
7074 last step, and do it atomically.
7075
476d250e
AO
70762018-04-27 Alexandre Oliva <aoliva@redhat.com>
7077
7078 * compile/compile-c-types.c (convert_int, convert_float):
7079 Update for C FE v1.
7080
6873858b
TT
70812018-04-27 Tom Tromey <tom@tromey.com>
7082
7083 PR rust/22545:
7084 * rust-lang.c (rust_inclusive_range_type_p): New function.
7085 (rust_range): Handle inclusive ranges.
7086 (rust_compute_range): Likewise.
7087 * rust-exp.y (struct rust_op) <inclusive>: New field.
7088 (DOTDOTEQ): New constant.
7089 (range_expr): Add "..=" productions.
7090 (operator_tokens): Add "..=" token.
7091 (ast_range): Add "inclusive" parameter.
7092 (convert_ast_to_expression) <case OP_RANGE>: Handle inclusive
7093 ranges.
7094 * parse.c (operator_length_standard) <case OP_RANGE>: Handle new
7095 bounds values.
7096 * expression.h (enum range_type) <NONE_BOUND_DEFAULT_EXCLUSIVE,
7097 LOW_BOUND_DEFAULT_EXCLUSIVE>: New constants.
7098 Update comments.
7099 * expprint.c (print_subexp_standard): Handle new bounds values.
7100 (dump_subexp_body_standard): Likewise.
7101
632e107b
TT
71022018-04-27 Tom Tromey <tom@tromey.com>
7103
7104 * configure: Rebuild.
7105 * warning.m4 (AM_GDB_WARNINGS): Add -Wsuggest-override.
7106 * dwarf2loc.c (class dwarf_evaluate_loc_desc): Use "override", not
7107 "OVERRIDE".
7108 (class symbol_needs_eval_context): Likewise.
7109 * dwarf2read.c (mock_mapped_index::symbol_name_count)
7110 (mock_mapped_index::symbol_name_at): Use "override". Remove
7111 "virtual".
7112 * dwarf2-frame.c (dwarf_expr_executor::get_addr_index): Use
7113 "override".
7114 (class dwarf_expr_executor): Use "override", not "OVERRIDE".
7115 * aarch64-tdep.c (instruction_reader::read): Use "override".
7116 (instruction_reader_test::read): Likewise.
7117 * arm-tdep.c (instruction_reader::read): Use "override".
7118 (instruction_reader_thumb::read): Likewise.
7119
b75abf5b
AK
71202018-04-26 Andrzej Kaczmarek <andrzej.kaczmarek@codecoup.pl>
7121
7122 PR remote/9665
7123 * remote.c (send_g_packet): Use putpkt/getpkt/packet_check_result
7124 instead of remote_send.
7125 (remote_send): Remove.
7126
79188d8d
PA
71272018-04-26 Pedro Alves <palves@redhat.com>
7128
7129 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Use
7130 find_function_start_sal instead of find_pc_line.
7131
f50776aa
PA
71322018-04-26 Pedro Alves <palves@redhat.com>
7133
7134 * breakpoint.c (set_breakpoint_location_function): Handle
7135 mst_data_gnu_ifunc.
7136 * c-exp.y (variable production): Handle mst_data_gnu_ifunc.
7137 * elfread.c (elf_symtab_read): Give data symbols with
7138 BSF_GNU_INDIRECT_FUNCTION set mst_data_gnu_ifunc type.
7139 (elf_rel_plt_read): Update comment.
7140 * linespec.c (convert_linespec_to_sals): Handle
7141 mst_data_gnu_ifunc.
7142 (minsym_found): Handle mst_data_gnu_ifunc.
7143 * minsyms.c (msymbol_is_function, minimal_symbol_reader::record)
7144 (find_solib_trampoline_target): Handle mst_data_gnu_ifunc.
7145 * parse.c (find_minsym_type_and_address): Handle
7146 mst_data_gnu_ifunc.
7147 * symmisc.c (dump_msymbols): Handle mst_data_gnu_ifunc.
7148 * symtab.c (find_gnu_ifunc): Handle mst_data_gnu_ifunc.
7149 * symtab.h (minimal_symbol_type) <mst_text_gnu_ifunc>: Update
7150 comment.
7151 <mst_data_gnu_ifunc>: New enumerator.
7152
20944a6e
PA
71532018-04-26 Pedro Alves <palves@redhat.com>
7154
7155 * minsyms.c (lookup_minimal_symbol_by_pc_section_1): Rename to ...
7156 (lookup_minimal_symbol_by_pc_section): ... this. Replace
7157 'want_trampoline' parameter by a lookup_msym_prefer parameter.
7158 Handle it.
7159 (lookup_minimal_symbol_by_pc_section): Delete old implementation.
7160 (lookup_minimal_symbol_by_pc): Adjust.
7161 (in_gnu_ifunc_stub): Prefer GNU ifunc symbols.
7162 (lookup_solib_trampoline_symbol_by_pc): Adjust.
7163 * minsyms.h (lookup_msym_prefer): New enum.
7164 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7165 parameter by a lookup_msym_prefer parameter.
7166
1adeb822
PA
71672018-04-26 Pedro Alves <palves@redhat.com>
7168
7169 * elfread.c (elf_gnu_ifunc_record_cache): Check if the symbol name
7170 ends in "@plt" instead of looking at the symbol's section.
7171
a0aca7b0
PA
71722018-04-26 Pedro Alves <palves@redhat.com>
7173
7174 * blockframe.c (cache_pc_function_is_gnu_ifunc): Delete. Remove
7175 all references.
7176 (find_pc_partial_function_gnu_ifunc): Rename to ...
7177 (find_pc_partial_function): ... this, and remove references to
7178 'is_gnu_ifunc_p'.
7179 (find_pc_partial_function): Delete old implementation.
7180 * symtab.h (find_pc_partial_function_gnu_ifunc): Delete.
7181
76af0f26
PA
71822018-04-26 Pedro Alves <palves@redhat.com>
7183
7184 * linespec.c (struct bound_minimal_symbol_search_key): New.
7185 (convert_linespec_to_sals): Sort minimal symbols earlier. Don't
7186 skip first line if we found a GNU ifunc minimal symbol by name.
7187 (compare_msymbols): Change parameters to work with a destructured
7188 lhs minsym.
7189 (compare_msymbols_for_qsort, compare_msymbols_for_bsearch): New
7190 functions.
7191
3467ec66
PA
71922018-04-26 Pedro Alves <palves@redhat.com>
7193
7194 * breakpoint.c (set_breakpoint_location_function): Don't resolve
7195 ifunc targets here. Instead, if we have an ifunc minsym, use its
7196 address/name.
7197 (add_location_to_breakpoint): Store the minsym and the objfile in
7198 the breakpoint location.
7199 * breakpoint.h (bp_location) <msymbol, objfile>: New fields.
7200 * linespec.c (minsym_found): Resolve GNU ifunc targets here.
7201 Record the minsym in the sal.
7202 * symtab.h (symtab_and_line) <msymbol>: New field.
7203
28f4fa4d
PA
72042018-04-26 Pedro Alves <palves@redhat.com>
7205
7206 * elfread.c (elf_gnu_ifunc_resolve_by_got): Don't write to *ADDR_P
7207 unless we actually resolved the ifunc.
7208
ca31ab1d
PA
72092018-04-26 Pedro Alves <palves@redhat.com>
7210
7211 * c-exp.y (variable production): Prefer ifunc minsyms over
7212 regular function symbols.
7213 * symtab.c (find_gnu_ifunc): New function.
7214 * minsyms.h (lookup_msym_prefer): New enum.
7215 (lookup_minimal_symbol_by_pc_section): Replace 'want_trampoline'
7216 parameter by a lookup_msym_prefer parameter.
7217 * symtab.h (find_gnu_ifunc): New declaration.
7218
8388016d
PA
72192018-04-26 Pedro Alves <palves@redhat.com>
7220
7221 * blockframe.c (find_gnu_ifunc_target_type): New function.
7222 (find_function_type): New.
7223 * eval.c (evaluate_var_msym_value): For GNU ifunc types, always
7224 return a value with a memory address.
7225 (eval_call): For calls to GNU ifunc functions, try to find the
7226 type of the target function from the type that the resolver
7227 returns.
7228 * gdbtypes.c (objfile_type): Don't install a return type for ifunc
7229 symbols.
7230 * infcall.c (find_function_return_type): Delete.
7231 (find_function_addr): Add 'function_type' parameter. For calls to
7232 GNU ifunc functions, try to find the type of the target function
7233 from the type that the resolver returns, and return it via
7234 FUNCTION_TYPE.
7235 (call_function_by_hand_dummy): Adjust to use the function type
7236 returned by find_function_addr.
7237 (find_function_addr): Add 'function_type' parameter and move
7238 description here.
7239 * symtab.h (find_function_type, find_gnu_ifunc_target_type): New
7240 declarations.
7241
a376e11d
PA
72422018-04-26 Pedro Alves <palves@redhat.com>
7243
7244 * c-exp.y (variable production): Skip finding an alias for ifunc
7245 symbols.
7246
02e169e2
PA
72472018-04-26 Pedro Alves <palves@redhat.com>
7248
7249 * elfread.c (elf_rel_plt_read): Look for relocations for .got.plt too.
7250
249b5733
PA
72512018-04-25 Pedro Alves <palves@redhat.com>
7252
7253 * infcmd.c (kill_command): Print the pid as string, not the whole
7254 thread's ptid. Add comment. s/has been killed/killed/ in output
7255 message.
7256 * remote.c (remote_detach_1): Print the pid as string, not the
7257 whole thread's ptid.
7258
f67c0c91
SDJ
72592018-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
7260 Sergio Durigan Junior <sergiodj@redhat.com>
7261 Pedro Alves <palves@redhat.com>
7262
7263 * infcmd.c (kill_command): Print message when inferior has
7264 been killed.
7265 * inferior.c (print_inferior_events): Remove 'static'. Set as
7266 '1'.
7267 (add_inferior): Improve message printed when
7268 'print_inferior_events' is on.
7269 (exit_inferior): Remove message printed when
7270 'print_inferior_events' is on.
7271 (detach_inferior): Improve message printed when
7272 'print_inferior_events' is on.
7273 (initialize_inferiors): Use 'add_inferior_silent' to set
7274 'current_inferior_'.
7275 * inferior.h (print_inferior_events): Declare here as
7276 'extern'.
7277 * infrun.c (follow_fork_inferior): Print '[Attaching...]' or
7278 '[Detaching...]' messages when 'print_inferior_events' is on.
7279 Use 'add_thread_silent' instead of 'add_thread'. Add '[' and ']'
7280 as prefix/suffix for messages. Remove periods. Fix erroneous
7281 'Detaching after fork from child...', replace it by '... from
7282 parent...'.
7283 (handle_vfork_child_exec_or_exit): Add '[' and ']' as
7284 prefix/suffix when printing 'Detaching...' messages. Print
7285 them when 'print_inferior_events' is on.
7286 * remote.c (remote_detach_1): Print message when detaching
7287 from inferior and '!is_fork_parent'.
7288
e427af18
TT
72892018-04-24 Tom Tromey <tom@tromey.com>
7290
7291 * cli-out.h: Reindent.
7292
05b1d8d6
TT
72932018-04-24 Tom Tromey <tom@tromey.com>
7294
7295 * cli-out.c (cli_ui_out::out_field_fmt): Remove.
7296 (cli_ui_out::do_field_string): Use fputs_filtered.
7297 * cli-out.h (class cli_ui_out) <out_field_fmt>: Remove.
7298
a95c7dab
TT
72992018-04-23 Tom Tromey <tom@tromey.com>
7300
7301 * guile/scm-frame.c (gdbscm_frame_read_var): Use
7302 gdb::unique_xmalloc_ptr.
7303
458412c3
TT
73042018-04-23 Tom Tromey <tom@tromey.com>
7305
7306 * configure: Rebuild.
7307
db86b02b
RS
73082018-04-22 Rajendra SY <rajendra.sy@gmail.com>
7309
7310 PR gdb/23095
7311 * gdb/testsuite/gdb.base/break-probes.exp: Pass shlib_load to
7312 prepare_for_testing. Set normal_bp to r_debug_state if target
7313 is bsd.
7314
00aecdcf
PA
73152018-04-21 Pedro Alves <palves@redhat.com>
7316 Rajendra SY <rajendra.sy@gmail.com>
7317
7318 * inf-ptrace.c (inf_ptrace_attach): Mark the thread as executing.
7319 * remote.c (extended_remote_attach): In all-stop mode, mark the
7320 thread as executing.
7321
224608c3
PW
73222018-04-19 Philippe Waroquiers <philippe.waroquiers@skynet.be>
7323
7324 * thread.c (thread_apply_all_command): Fix comment.
7325 (thread_command): Fix comment.
7326
3b74854b
AH
73272018-04-10 Alan Hayward <alan.hayward@arm.com>
7328
7329 * common/tdesc.h (tdesc_create_feature): Remove xml filename
7330 parameter.
7331 * features/aarch64-core.c (create_feature_aarch64_core):
7332 Regenerate.
7333 * features/aarch64-fpu.c (create_feature_aarch64_fpu):
7334 Likewise.
7335 * features/i386/32bit-avx.c (create_feature_i386_32bit_avx):
7336 Likewise.
7337 * features/i386/32bit-avx512.c
7338 (create_feature_i386_32bit_avx512): Likewise.
7339 * features/i386/32bit-core.c (create_feature_i386_32bit_core):
7340 Likewise.
7341 * features/i386/32bit-linux.c (create_feature_i386_32bit_linux):
7342 Likewise.
7343 * features/i386/32bit-mpx.c (create_feature_i386_32bit_mpx):
7344 Likewise.
7345 * features/i386/32bit-pkeys.c (create_feature_i386_32bit_pkeys):
7346 Likewise.
7347 * features/i386/32bit-sse.c (create_feature_i386_32bit_sse):
7348 Likewise.
7349 * features/i386/64bit-avx.c (create_feature_i386_64bit_avx):
7350 Likewise.
7351 * features/i386/64bit-avx512.c
7352 (create_feature_i386_64bit_avx512): Likewise.
7353 * features/i386/64bit-core.c (create_feature_i386_64bit_core):
7354 Likewise.
7355 * features/i386/64bit-linux.c (create_feature_i386_64bit_linux):
7356 Likewise.
7357 * features/i386/64bit-mpx.c (create_feature_i386_64bit_mpx):
7358 Likewise.
7359 * features/i386/64bit-pkeys.c (create_feature_i386_64bit_pkeys):
7360 Likewise.
7361 * features/i386/64bit-segments.c
7362 (create_feature_i386_64bit_segments): Likewise.
7363 * features/i386/64bit-sse.c (create_feature_i386_64bit_sse):
7364 Likewise.
7365 * features/i386/x32-core.c
7366 (create_feature_i386_x32_core): Likewise.
7367 * features/tic6x-c6xp.c (create_feature_tic6x_c6xp): Likewise.
7368 * features/tic6x-core.c (create_feature_tic6x_core): Likewise.
7369 * features/tic6x-gp.c (create_feature_tic6x_gp): Likewise.
7370 * target-descriptions.c: In generated code, don't pass xml
7371 filename.
7372
e98577a9
AH
73732018-04-18 Alan Hayward <alan.hayward@arm.com>
7374
7375 * common/tdesc.c (print_xml_feature::visit_pre): Add xml parsing.
7376 (print_xml_feature::visit_post): Likewise.
7377 (print_xml_feature::visit): Likewise.
7378 * common/tdesc.h (tdesc_get_features_xml): Use const tdesc.
7379 (print_xml_feature): Add new class.
7380 * regformats/regdat.sh: Null xmltarget on feature targets.
7381 * target-descriptions.c (struct target_desc): Add xmltarget.
7382 (maintenance_check_tdesc_xml_convert): Add unittest function.
7383 (tdesc_get_features_xml): Add function to get xml.
7384 (maintenance_check_xml_descriptions): Test xml generation.
7385 * xml-tdesc.c (string_read_description_xml): Add function.
7386 * xml-tdesc.h (string_read_description_xml): Add declaration.
7387
ad7fc756
AH
73882018-04-18 Alan Hayward <alan.hayward@arm.com>
7389
7390 * features/Makefile: Add feature marker to targets with new style
7391 target descriptions.
7392 * regformats/aarch64.dat: Regenerate.
7393 * regformats/i386/amd64-avx-avx512-linux.dat: Likewise.
7394 * regformats/i386/amd64-avx-linux.dat: Likewise.
7395 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Likewise.
7396 * regformats/i386/amd64-avx-mpx-linux.dat: Likewise.
7397 * regformats/i386/amd64-linux.dat: Likewise.
7398 * regformats/i386/amd64-mpx-linux.dat: Likewise.
7399 * regformats/i386/amd64.dat: Likewise.
7400 * regformats/i386/i386-avx-avx512-linux.dat: Likewise.
7401 * regformats/i386/i386-avx-linux.dat: Likewise.
7402 * regformats/i386/i386-avx-mpx-avx512-pku-linux.dat: Likewise.
7403 * regformats/i386/i386-avx-mpx-linux.dat: Likewise.
7404 * regformats/i386/i386-linux.dat: Likewise.
7405 * regformats/i386/i386-mmx-linux.dat: Likewise.
7406 * regformats/i386/i386-mpx-linux.dat: Likewise.
7407 * regformats/i386/i386.dat: Likewise.
7408 * regformats/i386/x32-avx-avx512-linux.dat: Likewise.
7409 * regformats/i386/x32-avx-linux.dat: Likewise.
7410 * regformats/i386/x32-linux.dat: Likewise.
7411 * regformats/tic6x-c62x-linux.dat: Likewise.
7412 * regformats/tic6x-c64x-linux.dat: Likewise.
7413 * regformats/tic6x-c64xp-linux.dat: Likewise.
7414 * regformats/regdat.sh: Parse feature marker.
7415
d278f585
AH
74162018-04-18 Alan Hayward <alan.hayward@arm.com>
7417
7418 * common/tdesc.h (tdesc_architecture_name): Add new declaration.
7419 (tdesc_osabi_name): Likewise.
7420 * target-descriptions.c (tdesc_architecture_name): Add new
7421 function.
7422 (tdesc_osabi_name): Likewise.
7423
eee8a18d
AH
74242018-04-18 Alan Hayward <alan.hayward@arm.com>
7425
7426 * common/tdesc.c (tdesc_predefined_type): Move to here.
7427 (tdesc_named_type): Likewise.
7428 (tdesc_create_vector): Likewise.
7429 (tdesc_create_struct): Likewise.
7430 (tdesc_set_struct_size): Likewise.
7431 (tdesc_create_union): Likewise.
7432 (tdesc_create_flags): Likewise.
7433 (tdesc_create_enum): Likewise.
7434 (tdesc_add_field): Likewise.
7435 (tdesc_add_typed_bitfield): Likewise.
7436 (tdesc_add_bitfield): Likewise.
7437 (tdesc_add_flag): Likewise.
7438 (tdesc_add_enum_value): Likewise.
7439 * common/tdesc.h (struct tdesc_type_builtin): Likewise.
7440 (struct tdesc_type_vector): Likewise.
7441 (struct tdesc_type_field): Likewise.
7442 (struct tdesc_type_with_fields): Likewise.
7443 (tdesc_create_enum): Add declaration.
7444 (tdesc_add_typed_bitfield): Likewise.
7445 (tdesc_add_enum_value): Likewise.
7446 * target-descriptions.c (tdesc_type_field): Move from here.
7447 (tdesc_type_builtin): Likewise.
7448 (tdesc_type_vector): Likewise.
7449 (tdesc_type_with_fields): Likewise.
7450 (tdesc_predefined_types): Likewise.
7451 (tdesc_named_type): Likewise.
7452 (tdesc_create_vector): Likewise.
7453 (tdesc_create_struct): Likewise.
7454 (tdesc_set_struct_size): Likewise.
7455 (tdesc_create_union): Likewise.
7456 (tdesc_create_flags): Likewise.
7457 (tdesc_create_enum): Likewise.
7458 (tdesc_add_field): Likewise.
7459 (tdesc_add_typed_bitfield): Likewise.
7460 (tdesc_add_bitfield): Likewise.
7461 (tdesc_add_flag): Likewise.
7462 (tdesc_add_enum_value): Likewise.
7463 * gdb/target-descriptions.h (tdesc_create_enum): Likewise.
7464 (tdesc_add_typed_bitfield): Likewise.
7465 (tdesc_add_enum_value): Likewise.
7466
82ec9bc7
AH
74672018-04-18 Alan Hayward <alan.hayward@arm.com>
7468
7469 * common/tdesc.c (tdesc_feature::accept): Move to here.
7470 (tdesc_feature::operator==): Likewise.
7471 (tdesc_create_reg): Likewise.
7472 * common/tdesc.h (tdesc_type_kind): Likewise.
7473 (struct tdesc_type): Likewise.
7474 (struct tdesc_feature): Likewise.
7475 * regformats/regdat.sh: Create a feature.
7476 * target-descriptions.c (tdesc_type_kind): Move from here.
7477 (tdesc_type): Likewise.
7478 (tdesc_type_up): Likewise.
7479 (tdesc_feature): Likewise.
7480 (tdesc_create_reg): Likewise.
7481
ea3e7d71
AH
74822018-04-18 Alan Hayward <alan.hayward@arm.com>
7483
7484 * Makefile.in: Add arch/tdesc.c
7485 * common/tdesc.c: New file.
7486 * common/tdesc.h (tdesc_element_visitor): Move to here.
7487 (tdesc_element): Likewise.
7488 (tdesc_reg): Likewise.
7489 (tdesc_reg_up): Likewise.
7490 * regformats/regdef.h (reg): Add offset to constructors.
7491 * target-descriptions.c (tdesc_element_visitor): Move from here.
7492 (tdesc_element): Likewise.
7493 (tdesc_reg): Likewise.
7494 (tdesc_reg_up): Likewise.
7495
bedda9ac
TT
74962018-04-17 Tom Tromey <tom@tromey.com>
7497
7498 * dwarf2read.c (quirk_rust_enum): Conditionally drop the
7499 discriminant field.
7500
a037790e
TT
75012018-04-17 Tom Tromey <tom@tromey.com>
7502
7503 * dwarf2read.c (quirk_rust_enum): Handle unions correctly.
7504
c7dcbf88
AA
75052018-04-17 Andreas Arnez <arnez@linux.vnet.ibm.com>
7506
7507 * symtab.c (print_symbol_info): Skip printing filename and line
7508 number when `last' is NULL.
7509 (symtab_symbol_info): Use empty string instead of NULL for first
7510 invocation of print_symbol_info.
7511 (rbreak_command): Pass NULL to `last' parameter of
7512 print_symbol_info.
7513
07d28c77
SM
75142018-04-16 Simon Marchi <simon.marchi@ericsson.com>
7515
7516 * linux-tdep.c (linux_spu_make_corefile_notes): Return note_data
7517 instead of nullptr.
7518
8a3de5e1
PA
75192018-04-16 Pedro Alves <palves@redhat.com>
7520
7521 * MAINTAINERS (sh): Remove.
7522 * Makefile.in (ALL_TARGET_OBS): Remove sh64-tdep.o.
7523 (HFILES_NO_SRCDIR): Remove sh64-tdep.h.
7524 (ALLDEPFILES): Remove sh64-tdep.c.
7525 * NEWS: Mentions that support for SH-5/SH64 is removed.
7526 * configure.tgt (sh*-*-linux*): Remove reference to sh64-tdep.o.
7527 (sh*-*-openbsd*): Ditto.
7528 (sh64-*-elf*): Remove.
7529 (sh*): Remove.
7530 * regcache.c (cooked_write_test): Remove bfd_mach_sh5 case.
7531 * sh-linux-tdep.c: Remove reference to bfd_mach_sh5.
7532 * sh-tdep.c: No longer include "sh64-tdep.h".
7533 (sh_gdbarch_init): Remove reference to bfd_mach_sh5.
7534 * sh64-tdep.c, sh64-tdep.h: Remove files.
7535
a2a79012
PA
75362018-04-16 Pedro Alves <palves@redhat.com>
7537
7538 * MAINTAINERS: Remove m88k.
7539 * Makefile.in (ALL_TARGET_OBS): Remove m88k-tdep.o.
7540 (HFILES_NO_SRCDIR): Remove m88k-tdep.h.
7541 (ALLDEPFILES): Remove m88k-bsd-nat.c and m88k-tdep.c.
7542 * NEWS: Mention that support for m88k was removed.
7543 * configure.host (m88*-*-*): Remove support.
7544 * configure.nat (m88k-*-*): Remove support.
7545 * configure.tgt (m88*-*-openbsd*): Remove.
7546 * m88k-bsd-nat.c, m88k-tdep.c, m88k-tdep.h: Delete.
7547
eda4efb1
SM
75482018-04-15 Simon Marchi <simon.marchi@polymtl.ca>
7549
7550 * configure.tgt (x86_tobjs): New variable.
7551 (amd64_tobjs, i386_tobjs): Use it.
7552
b744723f
AA
75532018-04-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
7554
7555 * symtab.c (print_symbol_info): Precede the symbol definition by
7556 the line number when available.
7557 * NEWS: Advertise this enhancement.
7558
4a4495d6
MM
75592018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7560
7561 * NEWS (New options): announce set/show record btrace cpu.
7562 * btrace.c: Include record-btrace.h.
7563 (btrace_compute_ftrace_pt): Skip enabling errata workarounds if
7564 the vendor is unknown.
7565 (btrace_compute_ftrace_1): Add cpu parameter. Update callers.
7566 Maybe overwrite the btrace configuration's cpu.
7567 (btrace_compute_ftrace): Add cpu parameter. Update callers.
7568 (btrace_fetch): Add cpu parameter. Update callers.
7569 (btrace_maint_update_pt_packets): Call record_btrace_get_cpu.
7570 Maybe overwrite the btrace configuration's cpu. Skip enabling
7571 errata workarounds if the vendor is unknown.
7572 * python/py-record-btrace.c: Include record-btrace.h.
7573 (recpy_bt_begin, recpy_bt_end, recpy_bt_instruction_history)
7574 (recpy_bt_function_call_history): Call record_btrace_get_cpu.
7575 * record-btrace.c (record_btrace_cpu_state_kind): New.
7576 (record_btrace_cpu): New.
7577 (set_record_btrace_cpu_cmdlist): New.
7578 (record_btrace_get_cpu): New.
7579 (require_btrace_thread, record_btrace_info)
7580 (record_btrace_resume_thread): Call record_btrace_get_cpu.
7581 (cmd_set_record_btrace_cpu_none): New.
7582 (cmd_set_record_btrace_cpu_auto): New.
7583 (cmd_set_record_btrace_cpu): New.
7584 (cmd_show_record_btrace_cpu): New.
7585 (_initialize_record_btrace): Initialize set/show record btrace cpu
7586 commands.
7587 * record-btrace.h (record_btrace_get_cpu): New.
7588
69f90c75
MM
75892018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7590
7591 * record.c (set_record_command): Fix typo in message.
7592
b85310e1
MM
75932018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7594
7595 * record-btrace.c (cmd_set_record_btrace): Print sub-commands.
7596
1d509aa6
MM
75972018-04-13 Markus Metzger <markus.t.metzger@intel.com>
7598
7599 * infrun.c (process_event_stop_test): Call
7600 gdbarch_in_indirect_branch_thunk.
7601 * gdbarch.sh (in_indirect_branch_thunk): New.
7602 * gdbarch.c: Regenerated.
7603 * gdbarch.h: Regenerated.
7604 * x86-tdep.h: New.
7605 * x86-tdep.c: New.
7606 * Makefile.in (ALL_TARGET_OBS): Add x86-tdep.o.
7607 (HFILES_NO_SRCDIR): Add x86-tdep.h.
7608 (ALLDEPFILES): Add x86-tdep.c.
7609 * arch-utils.h (default_in_indirect_branch_thunk): New.
7610 * arch-utils.c (default_in_indirect_branch_thunk): New.
7611 * i386-tdep: Include x86-tdep.h.
7612 (i386_in_indirect_branch_thunk): New.
7613 (i386_elf_init_abi): Set in_indirect_branch_thunk gdbarch
7614 function.
7615 * amd64-tdep: Include x86-tdep.h.
7616 (amd64_in_indirect_branch_thunk): New.
7617 (amd64_init_abi): Set in_indirect_branch_thunk gdbarch function.
7618
b4be9bfd
JK
76192018-04-12 Jan Kratochvil <jan.kratochvil@redhat.com>
7620
7621 PR gdb/23053
7622 * dwarf-index-write.c (data_buf::grow) (write_one_signatured_type)
7623 (recursively_write_psymbols) (debug_names::recursively_write_psymbols)
7624 (debug_names::write_one_signatured_type): Fix -D_GLIBCXX_DEBUG
7625 regression.
7626
53d7df28
TT
76272018-04-12 Tom Tromey <tom@tromey.com>
7628
7629 * rust-lang.c (rust_print_struct_def): Remove univariant code.
7630 (rust_evaluate_subexp): Likewise.
7631
70b33f19
PA
76322018-04-12 Pedro Alves <palves@redhat.com>
7633
7634 * procfs.c (procfs_detach): Make forward declaration's prototype
7635 match definition's protototype.
7636 (proc_get_LDT_entry): Remove stale do_cleanups call.
7637
436411b1
PA
76382018-04-12 Pedro Alves <palves@redhat.com>
7639
7640 * target.h (target_ops::to_has_exited): Delete.
7641 (target_has_exited): Delete.
7642 * target-delegates.c: Regenerate.
7643
20db9c52
PA
76442018-04-11 Pedro Alves <palves@redhat.com>
7645
7646 * target.c (fileio_fh_t::t): Add comment.
7647 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7648 (target_fileio_close): Handle a NULL target.
7649 (invalidate_fileio_fh): New.
7650 (target_close): Call it.
7651 * remote.c (remote_hostio_send_command): No longer check whether
7652 remote_desc is open.
7653
5ff79300
PA
76542018-04-11 Pedro Alves <palves@redhat.com>
7655
7656 * target.c (fileio_fh_t): Make it a named struct instead of a
7657 typedef.
7658 (fileio_fh_t::is_closed): New method.
7659 (DEF_VEC_O (fileio_fh_t)): Remove.
7660 (fileio_fhandles): Now a std::vector.
7661 (is_closed_fileio_fh): Delete.
7662 (acquire_fileio_fd): Adjust. Rename parameters.
7663 (release_fileio_fd): Adjust.
7664 (fileio_fd_to_fh): Reimplement as a function instead of a macro.
7665 (target_fileio_pwrite, target_fileio_pread, target_fileio_fstat)
7666 (target_fileio_close): Adjust.
7667
6e22e10d
SM
76682018-04-10 Simon Marchi <simon.marchi@ericsson.com>
7669
7670 * auto-load.c (auto_load_safe_path_vec_update): Iterate by
7671 index.
7672
731f534f
PA
76732018-04-10 Pedro Alves <palves@redhat.com>
7674
7675 * gdbthread.h (finish_thread_state_cleanup): Delete declaration.
7676 (scoped_finish_thread_state): New class.
7677 * infcmd.c (run_command_1): Use it instead of finish_thread_state
7678 cleanup.
7679 * infrun.c (proceed, prepare_for_detach, wait_for_inferior)
7680 (fetch_inferior_event, normal_stop): Likewise.
7681 * thread.c (finish_thread_state_cleanup): Delete.
7682
d5f4488f
SM
76832018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7684 Pedro Alves <palves@redhat.com>
7685
7686 * value.c: Include "selftest.h" and "common/array-view.h".
7687 (struct range) <operator ==>: New.
7688 (test_ranges_contain): New.
7689 (check_ranges_vector): New.
7690 (test_insert_into_bit_range_vector): New.
7691 (_initialize_values): Register selftests.
7692 * common/array-view.h (operator==, operator!=): New.
7693
b24531ed
SM
76942018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7695
7696 * common/gdb_vecs.h (unordered_remove): Add overload that takes
7697 an iterator.
7698 * inline-frame.c: Include <algorithm>.
7699 (struct inline_state): Add constructor.
7700 (inline_state_s): Remove.
7701 (DEF_VEC_O(inline_state_s)): Remove.
7702 (inline_states): Change type to std::vector.
7703 (find_inline_frame_state): Adjust to std::vector.
7704 (allocate_inline_frame_state): Remove.
7705 (clear_inline_frame_state): Adjust to std::vector.
7706 (skip_inline_frames): Adjust to std::vector.
7707
c252925c
SM
77082018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7709
7710 * tracepoint.h (struct trace_state_variable): Add constructor.
7711 <name>: Change type to std::string.
7712 * tracepoint.c (tsv_s): Remove.
7713 (DEF_VEC_O(tsv_s)): Remove.
7714 (tvariables): Change to std::vector.
7715 (create_trace_state_variable): Adjust to std::vector.
7716 (find_trace_state_variable): Likewise.
7717 (find_trace_state_variable_by_number): Likewise.
7718 (delete_trace_state_variable): Likewise.
7719 (trace_variable_command): Adjust to std::string.
7720 (delete_trace_variable_command): Likewise.
7721 (tvariables_info_1): Adjust to std::vector.
7722 (save_trace_state_variables): Likewise.
7723 (start_tracing): Likewise.
7724 (merge_uploaded_trace_state_variables): Adjust to std::vector
7725 and std::string.
7726 * target.h (struct target_ops)
7727 <to_download_trace_state_variable>: Pass reference to
7728 trace_state_variable.
7729 * target-debug.h (target_debug_print_const_trace_state_variable_r): New.
7730 * target-delegates.c: Re-generate.
7731 * mi/mi-interp.c (mi_tsv_created): Adjust to std::string.
7732 (mi_tsv_deleted): Likewise.
7733 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
7734 * remote.c (remote_download_trace_state_variable): Change
7735 pointer to reference and adjust.
7736 * make-target-delegates (parse_argtypes): Handle references.
7737 (write_function_header): Likewise.
7738 (munge_type): Likewise.
7739
c9638d26
SM
77402018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7741
7742 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
7743 string_view-selftests.c.
7744 * unittests/basic_string_view/capacity/1.cc: Adapt to GDB
7745 testsuite.
7746 * unittests/basic_string_view/cons/char/1.cc: Likewise.
7747 * unittests/basic_string_view/cons/char/2.cc: Likewise.
7748 * unittests/basic_string_view/cons/char/3.cc: Likewise.
7749 * unittests/basic_string_view/element_access/char/1.cc:
7750 Likewise.
7751 * unittests/basic_string_view/element_access/char/empty.cc:
7752 Likewise.
7753 * unittests/basic_string_view/element_access/char/front_back.cc:
7754 Likewise.
7755 * unittests/basic_string_view/inserters/char/2.cc: Likewise.
7756 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc:
7757 Likewise.
7758 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc:
7759 Likewise.
7760 * unittests/basic_string_view/modifiers/swap/char/1.cc:
7761 Likewise.
7762 * unittests/basic_string_view/operations/compare/char/1.cc:
7763 Likewise.
7764 * unittests/basic_string_view/operations/compare/char/13650.cc:
7765 Likewise.
7766 * unittests/basic_string_view/operations/copy/char/1.cc:
7767 Likewise.
7768 * unittests/basic_string_view/operations/data/char/1.cc:
7769 Likewise.
7770 * unittests/basic_string_view/operations/find/char/1.cc:
7771 Likewise.
7772 * unittests/basic_string_view/operations/find/char/2.cc:
7773 Likewise.
7774 * unittests/basic_string_view/operations/find/char/3.cc:
7775 Likewise.
7776 * unittests/basic_string_view/operations/find/char/4.cc:
7777 Likewise.
7778 * unittests/basic_string_view/operations/rfind/char/1.cc:
7779 Likewise.
7780 * unittests/basic_string_view/operations/rfind/char/2.cc:
7781 Likewise.
7782 * unittests/basic_string_view/operations/rfind/char/3.cc:
7783 Likewise.
7784 * unittests/basic_string_view/operations/substr/char/1.cc:
7785 Likewise.
7786 * unittests/basic_string_view/operators/char/2.cc: Likewise.
7787 * unittests/string_view-selftests.c: New file.
7788
fdc11678
SM
77892018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7790
7791 * unittests/basic_string_view/capacity/1.cc: New file.
7792 * unittests/basic_string_view/capacity/empty_neg.cc: New file.
7793 * unittests/basic_string_view/cons/char/1.cc: New file.
7794 * unittests/basic_string_view/cons/char/2.cc: New file.
7795 * unittests/basic_string_view/cons/char/3.cc: New file.
7796 * unittests/basic_string_view/cons/wchar_t/1.cc: New file.
7797 * unittests/basic_string_view/cons/wchar_t/2.cc: New file.
7798 * unittests/basic_string_view/cons/wchar_t/3.cc: New file.
7799 * unittests/basic_string_view/element_access/char/1.cc: New file.
7800 * unittests/basic_string_view/element_access/char/2.cc: New file.
7801 * unittests/basic_string_view/element_access/char/empty.cc: New file.
7802 * unittests/basic_string_view/element_access/char/front_back.cc: New file.
7803 * unittests/basic_string_view/element_access/wchar_t/1.cc: New file.
7804 * unittests/basic_string_view/element_access/wchar_t/2.cc: New file.
7805 * unittests/basic_string_view/element_access/wchar_t/empty.cc: New file.
7806 * unittests/basic_string_view/element_access/wchar_t/front_back.cc: New file.
7807 * unittests/basic_string_view/include.cc: New file.
7808 * unittests/basic_string_view/inserters/char/1.cc: New file.
7809 * unittests/basic_string_view/inserters/char/2.cc: New file.
7810 * unittests/basic_string_view/inserters/char/3.cc: New file.
7811 * unittests/basic_string_view/inserters/pod/10081-out.cc: New file.
7812 * unittests/basic_string_view/inserters/wchar_t/1.cc: New file.
7813 * unittests/basic_string_view/inserters/wchar_t/2.cc: New file.
7814 * unittests/basic_string_view/inserters/wchar_t/3.cc: New file.
7815 * unittests/basic_string_view/literals/types.cc: New file.
7816 * unittests/basic_string_view/literals/values.cc: New file.
7817 * unittests/basic_string_view/modifiers/remove_prefix/char/1.cc: New file.
7818 * unittests/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc: New file.
7819 * unittests/basic_string_view/modifiers/remove_suffix/char/1.cc: New file.
7820 * unittests/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc: New file.
7821 * unittests/basic_string_view/modifiers/swap/char/1.cc: New file.
7822 * unittests/basic_string_view/modifiers/swap/wchar_t/1.cc: New file.
7823 * unittests/basic_string_view/operations/compare/char/1.cc: New file.
7824 * unittests/basic_string_view/operations/compare/char/13650.cc: New file.
7825 * unittests/basic_string_view/operations/compare/char/2.cc: New file.
7826 * unittests/basic_string_view/operations/compare/char/70483.cc: New file.
7827 * unittests/basic_string_view/operations/compare/wchar_t/1.cc: New file.
7828 * unittests/basic_string_view/operations/compare/wchar_t/13650.cc: New file.
7829 * unittests/basic_string_view/operations/compare/wchar_t/2.cc: New file.
7830 * unittests/basic_string_view/operations/copy/char/1.cc: New file.
7831 * unittests/basic_string_view/operations/copy/wchar_t/1.cc: New file.
7832 * unittests/basic_string_view/operations/data/char/1.cc: New file.
7833 * unittests/basic_string_view/operations/data/wchar_t/1.cc: New file.
7834 * unittests/basic_string_view/operations/find/char/1.cc: New file.
7835 * unittests/basic_string_view/operations/find/char/2.cc: New file.
7836 * unittests/basic_string_view/operations/find/char/3.cc: New file.
7837 * unittests/basic_string_view/operations/find/char/4.cc: New file.
7838 * unittests/basic_string_view/operations/find/wchar_t/1.cc: New file.
7839 * unittests/basic_string_view/operations/find/wchar_t/2.cc: New file.
7840 * unittests/basic_string_view/operations/find/wchar_t/3.cc: New file.
7841 * unittests/basic_string_view/operations/find/wchar_t/4.cc: New file.
7842 * unittests/basic_string_view/operations/rfind/char/1.cc: New file.
7843 * unittests/basic_string_view/operations/rfind/char/2.cc: New file.
7844 * unittests/basic_string_view/operations/rfind/char/3.cc: New file.
7845 * unittests/basic_string_view/operations/rfind/wchar_t/1.cc: New file.
7846 * unittests/basic_string_view/operations/rfind/wchar_t/2.cc: New file.
7847 * unittests/basic_string_view/operations/rfind/wchar_t/3.cc: New file.
7848 * unittests/basic_string_view/operations/string_conversion/1.cc: New file.
7849 * unittests/basic_string_view/operations/substr/char/1.cc: New file.
7850 * unittests/basic_string_view/operations/substr/wchar_t/1.cc: New file.
7851 * unittests/basic_string_view/operators/char/2.cc: New file.
7852 * unittests/basic_string_view/operators/wchar_t/2.cc: New file.
7853 * unittests/basic_string_view/range_access/char/1.cc: New file.
7854 * unittests/basic_string_view/range_access/wchar_t/1.cc: New file.
7855 * unittests/basic_string_view/requirements/explicit_instantiation/1.cc: New file.
7856 * unittests/basic_string_view/requirements/explicit_instantiation/char/1.cc: New file.
7857 * unittests/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc: New file.
7858 * unittests/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc: New file.
7859 * unittests/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc: New file.
7860 * unittests/basic_string_view/requirements/typedefs.cc: New file.
7861 * unittests/basic_string_view/typedefs.cc: New file.
7862 * unittests/basic_string_view/types/1.cc: New file.
7863
8345c4a2
SM
78642018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7865
7866 * common/gdb_string_view.h: Remove libstdc++ implementation
7867 details, adjust to gdb reality.
7868 * common/gdb_string_view.tcc: Likewise.
7869 * cli/cli-script.c (struct string_view): Remove.
7870 (user_args) <m_args>: Change element type to gdb::string_view.
7871 (user_args::insert_args): Adjust.
7872
7adcdf08
SM
78732018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7874
7875 * common/gdb_string_view.h: New file.
7876 * common/gdb_string_view.tcc: New file.
7877
41260ac2
SM
78782018-04-09 Simon Marchi <simon.marchi@polymtl.ca>
7879
7880 * ax_cxx_compile_stdcxx.m4: Sync with upstream.
7881 * configure: Re-generate.
7882
0bee6dd4
PA
78832018-04-09 Pedro Alves <palves@redhat.com>
7884
7885 * gdbarch.sh: Include "observable.h" instead of "observer.h".
7886 (set_target_gdbarch): Call
7887 gdb::observers::architecture_changed.notify instead of
7888 observer_notify_architecture_changed.
7889
6f14adc5
SM
78902018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7891
7892 * tracepoint.c (struct current_traceframe_cleanup): Remove.
7893 (do_restore_current_traceframe_cleanup): Remove.
7894 (restore_current_traceframe_cleanup_dtor): Remove.
7895 (make_cleanup_restore_current_traceframe): Remove.
7896 (scoped_restore_current_traceframe::scoped_restore_current_traceframe):
7897 New.
7898 * tracepoint.h (struct scoped_restore_current_traceframe): New.
7899 * infrun.c (fetch_inferior_event): Use
7900 scoped_restore_current_traceframe.
7901
b2bdb8cf
SM
79022018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7903
7904 * dwarf2read.h (struct dwarf2_per_objfile) <n_type_units>:
7905 Remove.
7906 <n_allocated_type_units>: Remove.
7907 <all_type_units>: Change to std::vector.
7908 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7909 to std::vector change.
7910 (dwarf2_per_objfile::get_cutu): Likewise.
7911 (dwarf2_per_objfile::get_tu): Likewise.
7912 (create_signatured_type_table_from_index): Likewise.
7913 (create_signatured_type_table_from_debug_names): Likewise.
7914 (dw2_symtab_iter_next): Likewise.
7915 (dw2_print_stats): Likewise.
7916 (dw2_expand_all_symtabs): Likewise.
7917 (dw2_expand_marked_cus): Likewise.
7918 (dw2_debug_names_iterator::next): Likewise.
7919 (dwarf2_initialize_objfile): Likewise.
7920 (add_signatured_type_cu_to_table): Likewise.
7921 (create_all_type_units): Likewise.
7922 (add_type_unit): Likewise.
7923 (struct tu_abbrev_offset): Add constructor.
7924 (build_type_psymtabs_1): Adjust to std::vector change.
7925 (print_tu_stats): Likewise.
7926 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7927 (write_debug_names): Likewise.
7928
b76e467d
SM
79292018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7930
7931 * dwarf2read.h (struct dwarf2_per_objfile) <all_comp_units>: Likewise.
7932 Make an std::vector.
7933 <n_comp_units>: Remove.
7934 * dwarf2read.c (dwarf2_per_objfile::~dwarf2_per_objfile): Adjust
7935 to std::vector change.
7936 (dwarf2_per_objfile::get_cutu): Likewise.
7937 (dwarf2_per_objfile::get_cu): Likewise.
7938 (create_cus_from_index): Likewise.
7939 (create_addrmap_from_index): Likewise.
7940 (create_addrmap_from_aranges): Likewise.
7941 (dwarf2_read_index): Likewise.
7942 (dw2_find_last_source_symtab): Likewise.
7943 (dw2_map_symtabs_matching_filename): Likewise.
7944 (dw2_symtab_iter_next): Likewise.
7945 (dw2_print_stats): Likewise.
7946 (dw2_expand_all_symtabs): Likewise.
7947 (dw2_expand_symtabs_with_fullname): Likewise.
7948 (dw2_expand_marked_cus): Likewise.
7949 (dw2_map_symbol_filenames): Likewise.
7950 (create_cus_from_debug_names): Likewise.
7951 (dwarf2_read_debug_names): Likewise.
7952 (dw2_debug_names_iterator::next): Likewise.
7953 (dwarf2_initialize_objfile): Likewise.
7954 (set_partial_user): Likewise.
7955 (dwarf2_build_psymtabs_hard): Likewise.
7956 (read_comp_units_from_section): Remove arguments, adjust to
7957 std::vector change.
7958 (create_all_comp_units): Adjust to std::vector and
7959 read_comp_units_from_section changes.
7960 (dwarf2_find_containing_comp_unit): Adjust to std::vector
7961 change.
7962 * dwarf-index-write.c (check_dwarf64_offsets): Likewise.
7963 (psyms_seen_size): Likewise.
7964 (write_gdbindex): Likewise.
7965 (write_debug_names): Likewise.
7966
12359b5e
SM
79672018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7968
7969 * dwarf2read.c (create_cus_from_index_list): Replace objfile arg
7970 with dwarf2_per_objfile.
7971 (create_cus_from_index): Likewise.
7972 (create_signatured_type_table_from_index): Likewise.
7973 (dwarf2_read_index): Likewise.
7974 (dwarf2_initialize_objfile): Likewise.
7975 (dwarf2_fetch_die_loc_sect_off): Get dwarf2_per_objfile from
7976 per_cu rather than get_dwarf2_per_objfile.
7977
ff4c9fec
SM
79782018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
7979
7980 * dwarf2read.h (struct signatured_type): Forward declare.
7981 (struct dwarf2_per_objfile) <get_cutu, get_cu, get_tu>:
7982 New methods.
7983 * dwarf2read.c (dwarf2_per_objfile::get_cutu): Rename from...
7984 (dw2_get_cutu): ...this.
7985 (dwarf2_per_objfile::get_cu): Rename from...
7986 (dw2_get_cu): ...this.
7987 (dwarf2_per_objfile::get_tu): New.
7988 (create_addrmap_from_index): Adjust.
7989 (create_addrmap_from_aranges): Adjust.
7990 (dw2_find_last_source_symtab): Adjust.
7991 (dw2_map_symtabs_matching_filename): Adjust.
7992 (dw2_symtab_iter_next): Adjust.
7993 (dw2_print_stats): Adjust.
7994 (dw2_expand_all_symtabs): Adjust.
7995 (dw2_expand_symtabs_with_fullname): Adjust.
7996 (dw2_expand_marked_cus): Adjust.
7997 (dw_expand_symtabs_matching_file_matcher): Adjust.
7998 (dw2_map_symbol_filenames): Adjust.
7999 (dw2_debug_names_iterator::next): Adjust.
8000 (dwarf2_initialize_objfile): Adjust.
8001 (set_partial_user): Adjust.
8002 (dwarf2_build_psymtabs_hard): Adjust.
8003
5ca3fcb6
SM
80042018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8005
8006 * dwarf2read.c (create_signatured_type_table_from_debug_names):
8007 Remove unused variables.
8008 (dw2_map_symtabs_matching_filename): Likewise.
8009 (dwarf2_record_block_ranges): Likewise.
8010 (dwarf2_read_addr_index): Likewise.
8011 (follow_die_offset): Likewise.
8012
b2e586e8
SM
80132018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8014
8015 * progspace.c (clone_program_space): Pass SYMFILE_DEFER_BP_RESET
8016 to symbol_file_add_main.
8017
7c4e78cf
SM
80182018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8019
8020 PR mi/22299
8021 * mi/mi-console.c (do_fputc_async_safe): New.
8022 (mi_console_file::write_async_safe): New.
8023 (mi_console_file::flush): Adjust calls to fputstrn_unfiltered.
8024 * mi/mi-console.h (class mi_console_file) <write_async_safe>:
8025 New.
8026 * ui-file.c (ui_file::putstrn): Adjust call to
8027 fputstrn_unfiltered.
8028 * utils.c (printchar): Replace do_fputs and do_fprintf
8029 parameters by do_fputc.
8030 (fputstr_filtered): Adjust call to printchar.
8031 (fputstr_unfiltered): Likewise.
8032 (fputstrn_filtered): Likewise.
8033 (fputstrn_unfiltered): Add do_fputc parameter, pass to
8034 printchar.
8035 * utils.h (do_fputc_ftype): New typedef.
8036 (fputstrn_unfiltered): Add do_fputc parameter.
8037
5dc026d3
SM
80382018-04-07 Simon Marchi <simon.marchi@polymtl.ca>
8039
8040 * regformats/i386/i386-avx.dat: Remove.
8041
c912f608
SM
80422018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8043
8044 PR gdb/22979
8045 * amd64-tdep.c (amd64_none_init_abi): New function.
8046 (amd64_x32_none_init_abi): New function.
8047 (_initialize_amd64_tdep): Register handlers for x86-64 and
8048 x64_32 with GDB_OSABI_NONE.
8049 * osabi.c (gdbarch_init_osabi): Allow running handlers for the
8050 GDB_OSABI_NONE osabi.
8051
26540402
SM
80522018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8053
8054 PR gdb/22980
8055 * defs.h (enum gdb_osabi): Remove GDB_OSABI_UNINITIALIZED, add
8056 GDB_OSABI_NONE.
8057 * arch-utils.c (gdbarch_info_init): Don't set info->osabi.
8058 * osabi.c (gdb_osabi_names): Add "unknown" entry.
8059
9018be22
SM
80602018-04-07 Simon Marchi <simon.marchi@ericsson.com>
8061
8062 * common/byte-vector.h (char_vector): New type.
8063 * target.h (target_read_alloc): Return
8064 gdb::optional<byte_vector>.
8065 (target_read_stralloc): Return gdb::optional<char_vector>.
8066 (target_get_osdata): Return gdb::optional<char_vector>.
8067 * target.c (target_read_alloc_1): Templatize. Replacement
8068 manual memory management with vector.
8069 (target_read_alloc): Change return type, adjust.
8070 (target_read_stralloc): Change return type, adjust.
8071 (target_get_osdata): Change return type, adjust.
8072 * auxv.c (struct auxv_info) <length>: Remove.
8073 <data>: Change type to gdb::optional<byte_vector>.
8074 (auxv_inferior_data_cleanup): Free auxv_info with delete.
8075 (get_auxv_inferior_data): Allocate auxv_info with new, adjust.
8076 (target_auxv_search): Adjust.
8077 (fprint_target_auxv): Adjust.
8078 * avr-tdep.c (avr_io_reg_read_command): Adjust.
8079 * linux-tdep.c (linux_spu_make_corefile_notes): Adjust.
8080 (linux_make_corefile_notes): Adjust.
8081 * osdata.c (get_osdata): Adjust.
8082 * remote.c (remote_get_threads_with_qxfer): Adjust.
8083 (remote_memory_map): Adjust.
8084 (remote_traceframe_info): Adjust.
8085 (btrace_read_config): Adjust.
8086 (remote_read_btrace): Adjust.
8087 (remote_pid_to_exec_file): Adjust.
8088 * solib-aix.c (solib_aix_get_library_list): Adjust.
8089 * solib-dsbt.c (decode_loadmap): Don't free buf.
8090 (dsbt_get_initial_loadmaps): Adjust.
8091 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Adjust.
8092 * solib-target.c (solib_target_current_sos): Adjust.
8093 * tracepoint.c (sdata_make_value): Adjust.
8094 * xml-support.c (xinclude_start_include): Adjust.
8095 (xml_fetch_content_from_file): Adjust.
8096 * xml-support.h (xml_fetch_another): Change return type.
8097 (xml_fetch_content_from_file): Change return type.
8098 * xml-syscall.c (xml_init_syscalls_info): Adjust.
8099 * xml-tdesc.c (file_read_description_xml): Adjust.
8100 (fetch_available_features_from_target): Change return type.
8101 (target_fetch_description_xml): Adjust.
8102 (target_read_description_xml): Adjust.
8103
14c88955
TT
81042018-04-06 Tom Tromey <tom@tromey.com>
8105
8106 * value.c (~value): Update.
8107 (struct value) <contents>: Now unique_xmalloc_ptr.
8108 (value_contents_bits_eq, allocate_value_contents)
8109 (value_contents_raw, value_contents_all_raw)
8110 (value_contents_for_printing, value_contents_for_printing_const)
8111 (set_value_enclosing_type): Update.
8112
0c7e6dd8
TT
81132018-04-06 Tom Tromey <tom@tromey.com>
8114
8115 * value.c (range_s): Remove typedef, VEC.
8116 (struct range): Add operator<.
8117 (range_lessthan): Remove.
8118 (ranges_contain): Change type.
8119 (~value): Update.
8120 (struct value) <unavailable, optimized_out>: Now std::vector.
8121 (value_entirely_available)
8122 (value_entirely_covered_by_range_vector)
8123 (value_entirely_unavailable, value_entirely_optimized_out):
8124 Update.
8125 (insert_into_bit_range_vector): Change argument type.
8126 (find_first_range_overlap): Likewise.
8127 (struct ranges_and_idx, value_contents_bits_eq)
8128 (require_not_optimized_out, require_available): Update.
8129 (ranges_copy_adjusted): Change argument types.
8130 (value_optimized_out, value_copy, value_fetch_lazy): Update.
8131
2c8331b9
TT
81322018-04-06 Tom Tromey <tom@tromey.com>
8133
8134 * value.c (~value): Update.
8135 (struct value) <parent>: Now a value_ref_ptr.
8136 (value_parent, set_value_parent, value_address, value_copy):
8137 Update.
8138
466ce3ae
TT
81392018-04-06 Tom Tromey <tom@tromey.com>
8140
8141 * value.c (struct value): Add constructor, destructor, and member
8142 initializers.
8143 (allocate_value_lazy, value_decref): Update.
8144
062d818d
TT
81452018-04-06 Tom Tromey <tom@tromey.com>
8146
8147 * value.c (struct value) <released, next>: Remove.
8148 (all_values): Now a std::vector.
8149 (allocate_value_lazy): Update.
8150 (value_next): Remove.
8151 (value_mark, value_free_to_mark, release_value)
8152 (value_release_to_mark): Update.
8153
a6535de1
TT
81542018-04-06 Tom Tromey <tom@tromey.com>
8155
8156 * value.h (fetch_subexp_value, value_release_to_mark): Update.
8157 (free_value_chain): Remove.
8158 * value.c (free_value_chain): Remove.
8159 (value_release_to_mark): Return a std::vector.
8160 * ppc-linux-nat.c (num_memory_accesses): Change "chain" to a
8161 std::vector.
8162 (check_condition): Update.
8163 * eval.c (fetch_subexp_value): Change "val_chain" to a
8164 std::vector.
8165 * breakpoint.c (update_watchpoint): Update.
8166 (can_use_hardware_watchpoint): Change "vals" to a std::vector.
8167
b5621201
TT
81682018-04-06 Tom Tromey <tom@tromey.com>
8169
8170 * value.h (free_all_values): Remove.
8171 * value.c (free_all_values): Remove.
8172
4d0266a0
TT
81732018-04-06 Tom Tromey <tom@tromey.com>
8174
8175 * value.c (VALUE_HISTORY_CHUNK, struct value_history_chunk)
8176 (value_history_chain, value_history_count): Remove.
8177 (value_history): New global.
8178 (record_latest_value, access_value_history, show_values)
8179 (preserve_values): Update.
8180
b4d61099
TT
81812018-04-06 Tom Tromey <tom@tromey.com>
8182
8183 * varobj.h (struct varobj) <value>: Now a value_ref_ptr.
8184 * varobj.c (varobj_set_display_format, varobj_set_value)
8185 (install_default_visualizer, construct_visualizer)
8186 (install_new_value, ~varobj, varobj_get_value_type)
8187 (my_value_of_variable, varobj_editable_p): Update.
8188 * c-varobj.c (c_describe_child, c_value_of_variable)
8189 (cplus_number_of_children, cplus_describe_child): Update.
8190 * ada-varobj.c (ada_number_of_children, ada_name_of_child)
8191 (ada_path_expr_of_child, ada_value_of_child, ada_type_of_child)
8192 (ada_value_of_variable, ada_value_is_changeable_p): Update.
8193
9b558729
TT
81942018-04-06 Tom Tromey <tom@tromey.com>
8195
8196 * printcmd.c (last_examine_address): Change type to
8197 value_ref_ptr.
8198 (do_examine, x_command): Update.
8199
850645cf
TT
82002018-04-06 Tom Tromey <tom@tromey.com>
8201
8202 * value.c (release_value): Update.
8203 * breakpoint.h (struct watchpoint) <val>: Now a value_ref_ptr.
8204 (struct bpstats) <val>: Now a value_ref_ptr.
8205 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8206 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8207 (~watchpoint, print_it_watchpoint, watch_command_1)
8208 (invalidate_bp_value_on_memory_change): Update.
8209
22bc8444
TT
82102018-04-06 Tom Tromey <tom@tromey.com>
8211
8212 * varobj.c (varobj_clear_saved_item)
8213 (update_dynamic_varobj_children, install_new_value, ~varobj):
8214 Update.
8215 * value.h (value_incref): Move declaration earlier.
8216 (value_decref): Rename from value_free.
8217 (struct value_ref_policy): New.
8218 (value_ref_ptr): New typedef.
8219 (struct value_deleter): Remove.
8220 (gdb_value_up): Remove typedef.
8221 (release_value): Change return type.
8222 (release_value_or_incref): Remove.
8223 * value.c (set_value_parent): Update.
8224 (value_incref): Change return type.
8225 (value_decref): Rename from value_free.
8226 (value_free_to_mark, free_all_values, free_value_chain): Update.
8227 (release_value): Return value_ref_ptr.
8228 (release_value_or_incref): Remove.
8229 (record_latest_value, set_internalvar, clear_internalvar):
8230 Update.
8231 * stack.c (info_frame_command): Don't call value_free.
8232 * python/py-value.c (valpy_dealloc, valpy_new)
8233 (value_to_value_object): Update.
8234 * printcmd.c (do_examine): Update.
8235 * opencl-lang.c (lval_func_free_closure): Update.
8236 * mi/mi-main.c (register_changed_p): Don't call value_free.
8237 * mep-tdep.c (mep_frame_prev_register): Don't call value_free.
8238 * m88k-tdep.c (m88k_frame_prev_register): Don't call value_free.
8239 * m68hc11-tdep.c (m68hc11_frame_prev_register): Don't call
8240 value_free.
8241 * guile/scm-value.c (vlscm_free_value_smob)
8242 (vlscm_scm_from_value): Update.
8243 * frame.c (frame_register_unwind, frame_unwind_register_signed)
8244 (frame_unwind_register_unsigned, get_frame_register_bytes)
8245 (put_frame_register_bytes): Don't call value_free.
8246 * findvar.c (address_from_register): Don't call value_free.
8247 * dwarf2read.c (dwarf2_compute_name): Don't call value_free.
8248 * dwarf2loc.c (entry_data_value_free_closure)
8249 (value_of_dwarf_reg_entry, free_pieced_value_closure)
8250 (dwarf2_evaluate_loc_desc_full): Update.
8251 * breakpoint.c (update_watchpoint, breakpoint_init_inferior)
8252 (~bpstats, bpstats, bpstat_clear_actions, watchpoint_check)
8253 (~watchpoint, watch_command_1)
8254 (invalidate_bp_value_on_memory_change): Update.
8255 * alpha-tdep.c (alpha_register_to_value): Don't call value_free.
8256
7f8a5d38
SM
82572018-04-06 Simon Marchi <simon.marchi@polymtl.ca>
8258
8259 PR gdb/23022
8260 * warning.m4: Add -Wno-error=deprecated-register.
8261 * configure: Re-generate.
8262
8a76bd3b
TT
82632018-04-05 Tom Tromey <tom@tromey.com>
8264
8265 * linespec.h: Remove include of "vec.h".
8266
8e8d776e
TT
82672018-04-05 Tom Tromey <tom@tromey.com>
8268
8269 * linespec.c (typep): Remove typedef.
8270 (find_methods, find_superclass_methods): Take a std::vector.
8271 (find_method): Use std::vector.
8272
9b2f8581
TT
82732018-04-05 Tom Tromey <tom@tromey.com>
8274
8275 * utils.c (compare_strings): Remove.
8276 * utils.h (compare_strings): Remove.
8277 * objc-lang.h (find_imps): Update.
8278 * objc-lang.c (find_methods): Take a std::vector.
8279 (uniquify_strings, find_imps): Likewise.
8280 * linespec.c (find_methods): Take a std::vector.
8281 (decode_objc): Use std::vector.
8282 (add_all_symbol_names_from_pspace, find_superclass_methods): Take
8283 a std::vector.
8284 (find_method, find_function_symbols): Use std::vector.
8285
459a2e4c
TT
82862018-04-05 Tom Tromey <tom@tromey.com>
8287
8288 * completer.c (completion_tracker::completion_tracker): Remove
8289 cast.
8290 (completion_tracker::discard_completions): Likewise.
8291 * breakpoint.c (ambiguous_names_p): Remove cast.
8292 * ada-lang.c (_initialize_ada_language): Remove cast.
8293 * utils.h (streq): Update.
8294 (streq_hash): Add new declaration.
8295 * utils.c (streq): Return bool.
8296 (streq_hash): New function.
8297
9be2c17a
TT
82982018-04-05 Tom Tromey <tom@tromey.com>
8299
8300 * linespec.c (event_location_to_sals) <case ADDRESS_LOCATION>:
8301 Remove a string copy.
8302
f73c6ece
TT
83032018-04-05 Tom Tromey <tom@tromey.com>
8304
8305 * linespec.c (filter_results): Use std::vector.
8306 (decode_line_2, decode_line_full): Update.
8307
53a0f8a2
TT
83082018-04-05 Tom Tromey <tom@tromey.com>
8309
8310 * linespec.c (canonical_to_fullform): Return std::string.
8311 (filter_results): Update.
8312 (struct decode_line_2_item): Add constructor.
8313 <fullform, displayform>: Now std::string.
8314 (decode_line_2_compare_items): Now a std::sort comparator.
8315 (decode_line_2): Update.
8316
a5b5adf5
TT
83172018-04-05 Tom Tromey <tom@tromey.com>
8318
8319 * linespec.c (copy_token_string): Return a unique_xmalloc_ptr.
8320 (unexpected_linespec_error): Update.
8321 (linespec_parse_basic, parse_linespec): Update.
8322
6a307fc5
TT
83232018-04-05 Tom Tromey <tom@tromey.com>
8324
8325 * linespec.c (linespec_parse_basic): Reindent.
8326
41c1efc6
TT
83272018-04-05 Tom Tromey <tom@tromey.com>
8328
8329 * minsyms.h (iterate_over_minimal_symbols): Update.
8330 * minsyms.c (iterate_over_minimal_symbols): Take a
8331 gdb::function_view.
8332 * linespec.c (struct collect_minsyms): Remove.
8333 (compare_msyms): Now a std::sort comparator.
8334 (add_minsym): Add parameters.
8335 (search_minsyms_for_name): Update. Use std::vector.
8336
c5edbf3d
TT
83372018-04-03 Tom Tromey <tom@tromey.com>
8338
8339 * mipsread.c (read_alphacoff_dynamic_symtab): Use
8340 gdb::byte_vector.
8341
b39efc48
WP
83422018-04-02 Weimin Pan <weimin.pan@oracle.com>
8343
8344 * MAINTAINERS (Write After Approval): Add Weimin Pan.
8345
121ad66c 83462018-04-02 Weimin Pan <weimin.pan@oracle.com>
79f18731
WP
8347
8348 PR gdb/16959
8349 * cp-valprint.c: (cp_print_static_field) Fix infinite recursion when
8350 printing static type.
8351
09473be8
TT
83522018-04-01 Tom Tromey <tom@tromey.com>
8353
8354 * rs6000-nat.c (rs6000_ptrace_ldinfo): Return a byte_vector.
8355 (rs6000_xfer_shared_libraries): Update.
8356
ec1f2d91
SM
83572018-04-01 Simon Marchi <simon.marchi@polymtl.ca>
8358
8359 * common/gdb_vecs.h (char_ptr): Remove.
8360 * tracepoint.c (encode_actions_1): Remove usage of char_ptr.
8361
d8611974
SM
83622018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8363
8364 * guile/scm-utils.c (gdbscm_parse_function_args): Replace VEC
8365 with std::vector.
8366 * common/gdb_vecs.h (DEF_VEC_P (char_ptr)): Remove.
8367
a18ba4e4
SM
83682018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
8369
8370 * tracepoint.h (struct uploaded_tp): Initialize fields.
8371 <actions, step_actions, cmd_strings>: Change type to
8372 std::vector<char *>.
8373 * tracepoint.c (get_uploaded_tp): Allocate with new.
8374 (free_uploaded_tps): Free with delete.
8375 (parse_tracepoint_definition): Adjust to std::vector change.
8376 * breakpoint.c (read_uploaded_action): Likewise.
8377 (create_tracepoint_from_upload): Likewise.
8378 * ctf.c (ctf_write_uploaded_tp): Likewise.
8379 (SET_ARRAY_FIELD): Likewise.
8380 * tracefile-tfile.c (tfile_write_uploaded_tp): Likewise.
8381
a7961323
TT
83822018-03-30 Tom Tromey <tom@tromey.com>
8383
8384 * solib-svr4.c (lm_info_read): Use gdb::byte_vector. Return
8385 std::unique_ptr.
8386 (svr4_keep_data_in_core): Update.
8387 (svr4_read_so_list): Update.
8388
e83e4e24
TT
83892018-03-30 Tom Tromey <tom@tromey.com>
8390
8391 * windows-nat.c (handle_output_debug_string, handle_exception):
8392 Update.
8393 * target.h (target_read_string): Update.
8394 * target.c (target_read_string): Change "string" to
8395 unique_xmalloc_ptr.
8396 * solib-svr4.c (open_symbol_file_object, svr4_read_so_list):
8397 Update.
8398 * solib-frv.c (frv_current_sos): Update.
8399 * solib-dsbt.c (dsbt_current_sos): Update.
8400 * solib-darwin.c (darwin_current_sos): Update.
8401 * linux-thread-db.c (inferior_has_bug): Update.
8402 * expprint.c (print_subexp_standard) <case OP_OBJC_MSGCALL>:
8403 Update. Remove alloca.
8404 * ada-lang.c (ada_main_name): Update.
8405
263db9a1
TT
84062018-03-30 Tom Tromey <tom@tromey.com>
8407
8408 * dwarf2read.c (struct free_dwo_file_cleanup_data): Remove.
8409 (struct dwo_file_deleter): New.
8410 (dwo_file_up): New typedef.
8411 (open_and_init_dwo_file): Use dwo_file_up.
8412 (free_dwo_file_cleanup): Remove.
8413
5dafb3d1
TT
84142018-03-30 Tom Tromey <tom@tromey.com>
8415
8416 * dwarf2read.c (free_dwo_file): Remove "objfile" parameter.
8417 (free_dwo_file_cleanup, free_dwo_file_from_slot): Update.
8418
11ed8cad
TT
84192018-03-30 Tom Tromey <tom@tromey.com>
8420
8421 * dwarf2read.c (class free_cached_comp_units): New class.
8422 (dw2_instantiate_symtab, dwarf2_build_psymtabs_hard): Use it.
8423 (free_cached_comp_units): Remove function.
8424
9ae79dac
TT
84252018-03-30 Tom Tromey <tom@tromey.com>
8426
8427 * utils.h (make_cleanup_unpush_target): Remove.
8428 * inf-ptrace.c (struct target_unpusher): New.
8429 (target_unpush_up) New typedef.
8430 (inf_ptrace_create_inferior, inf_ptrace_attach): Use
8431 target_unpush_up.
8432 * utils.c (do_unpush_target, make_cleanup_unpush_target): Remove.
8433
5aa89276
TT
84342018-03-27 Tom Tromey <tom@tromey.com>
8435
8436 * utils.c (prompt_for_continue): Use unique_xmalloc_ptr.
8437
1dbeed45
TT
84382018-03-27 Pedro Alves <palves@redhat.com>
8439 Tom Tromey <tom@tromey.com>
8440
8441 * top.c (class gdb_readline_wrapper_cleanup): Add constructor,
8442 destructor. Now a class.
8443 (gdb_readline_wrapper_cleanup): Remove function.
8444 (gdb_readline_wrapper): Remove cleanups.
8445
c819b2c0
TT
84462018-03-27 Tom Tromey <tom@tromey.com>
8447
8448 * typeprint.h (struct type_print_options) <local_typedefs,
8449 global_typedefs>: Remove "struct" keyword.
8450 (class typedef_hash_table): New class.
8451 (recursively_update_typedef_hash, add_template_parameters)
8452 (create_typedef_hash, free_typedef_hash, copy_typedef_hash)
8453 (find_typedef_in_hash): Don't declare.
8454 * typeprint.c (struct typedef_hash_table): Move to typeprint.h.
8455 (typedef_hash_table::recursively_update): Rename from
8456 recursively_update_typedef_hash. Now a member.
8457 (typedef_hash_table::add_template_parameters): Rename from
8458 add_template_parameters. Now a member.
8459 (typedef_hash_table::typedef_hash_table): Now a constructor;
8460 rename from create_typedef_hash.
8461 (typedef_hash_table::~typedef_hash_table): Now a destructor;
8462 rename from free_typedef_hash.
8463 (do_free_typedef_hash, make_cleanup_free_typedef_hash)
8464 (do_free_global_table): Remove.
8465 (typedef_hash_table::typedef_hash_table): New constructor; renamed
8466 from copy_type_recursive.
8467 (create_global_typedef_table): Remove.
8468 (typedef_hash_table::find_global_typedef): Now a member of
8469 typedef_hash_table.
8470 (typedef_hash_table::find_typedef): Rename from
8471 find_typedef_in_hash; now a member.
8472 (whatis_exp): Update.
8473 * extension.h (struct ext_lang_type_printers): Add constructor and
8474 destructor.
8475 (start_ext_lang_type_printers, free_ext_lang_type_printers): Don't
8476 declare.
8477 * extension.c (ext_lang_type_printers::ext_lang_type_printers):
8478 Now a constructor; rename from start_ext_lang_type_printers.
8479 (ext_lang_type_printers): Now a destructor; rename from
8480 free_ext_lang_type_printers.
8481 * c-typeprint.c (find_typedef_for_canonicalize, c_print_type_1):
8482 Update.
8483 (c_type_print_base_struct_union): Update. Remove cleanups.
8484
608219fb
TT
84852018-03-27 Tom Tromey <tom@tromey.com>
8486
8487 * dwarf-index-write.c: Include <cmath>.
8488
3fcded8f
JB
84892018-03-27 Joel Brobecker <brobecker@adacore.com>
8490
8491 * NEWS: Add entry describing new "set|show varsize-limit" command.
8492 * ada-lang.c (_initialize_ada_language): Add "set/show varsize-limit"
8493 command.
8494 * printcmd.c (_initialize_printcmd): Add "set var" alias of
8495 "set variable".
8496
cd4fb1b2
SM
84972018-03-27 Simon Marchi <simon.marchi@ericsson.com>
8498
8499 * Makefile.in (COMMON_SFILES): Add dwarf-index-common.c and
8500 dwarf-index-write.c
8501 (HFILES_NO_SRCDIR): Add dwarf-index-common.h and dwarf2read.h.
8502 * dwarf-index-common.c: New file.
8503 * dwarf-index-common.h: New file.
8504 * dwarf-index-write.c: New file.
8505 * dwarf2read.c: Include dwarf2read.h and dwarf-index-common.h.
8506 (struct dwarf2_section_info): Move from here.
8507 (dwarf2_section_info_def): Likewise.
8508 (DEF_VEC_O (dwarf2_section_info_def)): Likewise.
8509 (offset_type): Likewise.
8510 (DW2_GDB_INDEX_SYMBOL_STATIC_SET_VALUE): Likewise.
8511 (DW2_GDB_INDEX_SYMBOL_KIND_SET_VALUE): Likewise.
8512 (DW2_GDB_INDEX_CU_SET_VALUE): Likewise.
8513 (byte_swap): Likewise.
8514 (MAYBE_SWAP): Likewise.
8515 (dwarf2_per_cu_ptr): Likewise.
8516 (DEF_VEC_P (dwarf2_per_cu_ptr)): Likewise.
8517 (struct tu_stats): Likewise.
8518 (struct dwarf2_per_objfile): Likewise.
8519 (struct dwarf2_per_cu_data): Likewise.
8520 (struct signatured_type): Likewise.
8521 (sig_type_ptr): Likewise.
8522 (DEF_VEC_P (sig_type_ptr)): Likewise.
8523 (INDEX4_SUFFIX): Likewise.
8524 (INDEX5_SUFFIX): Likewise.
8525 (DEBUG_STR_SUFFIX): Likewise.
8526 (dwarf2_read_section): Make non-static.
8527 (mapped_index_string_hash): Move from here.
8528 (dwarf5_djb_hash): Likewise.
8529 (file_write): Likewise.
8530 (class data_buf): Likewise.
8531 (struct symtab_index_entry): Likewise.
8532 (struct mapped_symtab): Likewise.
8533 (find_slot): Likewise.
8534 (hash_expand): Likewise.
8535 (add_index_entry): Likewise.
8536 (uniquify_cu_indices): Likewise.
8537 (class c_str_view): Likewise.
8538 (class c_str_view_hasher): Likewise.
8539 (class vector_hasher): Likewise.
8540 (write_hash_table): Likewise.
8541 (psym_index_map): Likewise.
8542 (struct addrmap_index_data): Likewise.
8543 (add_address_entry): Likewise.
8544 (add_address_entry_worker): Likewise.
8545 (write_address_map): Likewise.
8546 (symbol_kind): Likewise.
8547 (write_psymbols): Likewise.
8548 (struct signatured_type_index_data): Likewise.
8549 (write_one_signatured_type): Likewise.
8550 (recursively_count_psymbols): Likewise.
8551 (recursively_write_psymbols): Likewise.
8552 (class debug_names): Likewise.
8553 (check_dwarf64_offsets): Likewise.
8554 (psyms_seen_size): Likewise.
8555 (write_gdbindex): Likewise.
8556 (write_debug_names): Likewise.
8557 (assert_file_size): Likewise.
8558 (write_psymtabs_to_index): Likewise.
8559 (save_gdb_index_command): Likewise.
8560 (_initialize_dwarf2_read): Don't register the "save gdb-index"
8561 command.
8562 * dwarf2read.h: New file.
8563
59cc4834
JB
85642018-03-27 Joel Brobecker <brobecker@adacore.com>
8565
8566 PR gdb/22670
8567 * dwarf2read.c (dwarf2_physname): Do not return the demangled
8568 symbol name if the CU's language stores symbol names in linkage
8569 format.
8570 * language.h (struct language_defn)
8571 <la_store_sym_names_in_linkage_form_p>: New field. Adjust
8572 all instances of this struct.
8573
67501539
TT
85742018-03-26 Tom Tromey <tom@tromey.com>
8575
8576 * stack.c (backtrace_command_1): Remove verbose code.
8577
76c939ac
TT
85782018-03-26 Tom Tromey <tom@tromey.com>
8579
8580 * python/py-framefilter.c (py_print_type): Don't catch
8581 exceptions. Return void.
8582 (py_print_value): Likewise.
8583 (py_print_single_arg): Likewise.
8584 (enumerate_args): Don't catch exceptions.
8585 (py_print_args): Likewise.
8586 (py_print_frame): Likewise.
8587 (gdbpy_apply_frame_filter): Catch exceptions here.
8588
9507b29c
TT
85892018-03-26 Tom Tromey <tom@tromey.com>
8590
8591 * stack.c (_initialize_stack): Remove trailing newlines from help
8592 text. Add "Usage" line to "backtrace" help.
8593
eb68e487
TT
85942018-03-26 Tom Tromey <tom@tromey.com>
8595
8596 PR python/16486:
8597 * python/py-framefilter.c (py_print_args): Call wrap_hint.
8598
1f111921
TT
85992018-03-26 Tom Tromey <tom@tromey.com>
8600
8601 * python/py-framefilter.c (py_print_single_arg): Return
8602 EXT_LANG_BT_ERROR from catch.
8603
fb7eb8b5
TT
86042018-03-26 Tom Tromey <tom@tromey.com>
8605
8606 PR backtrace/15584:
8607 * stack.c (backtrace_command_1): Move some code into no-filters
8608 "if".
8609
4ca59a9f
TT
86102018-03-26 Tom Tromey <tom@tromey.com>
8611
8612 * python/py-framefilter.c (throw_quit_or_print_exception): New
8613 function.
8614 (gdbpy_apply_frame_filter): Use it.
8615
92256134
TT
86162018-03-26 Tom Tromey <tom@tromey.com>
8617
8618 PR cli/17716:
8619 * python/py-framefilter.c (py_print_type, py_print_value)
8620 (enumerate_args, py_print_args, gdbpy_apply_frame_filter): Use
8621 RETURN_MASK_ERROR.
8622
7a630bc2
TT
86232018-03-26 Tom Tromey <tom@tromey.com>
8624
8625 * python/py-framefilter.c (enumerate_args): Use
8626 gdb::unique_xmalloc_ptr.
8627
63283d4a
TT
86282018-03-26 Tom Tromey <tom@tromey.com>
8629
8630 * python/py-framefilter.c (py_print_frame): Return
8631 EXT_LANG_BT_OK.
8632 (gdbpy_apply_frame_filter): Update comment.
8633 * extension.h (enum ext_lang_bt_status) <EXT_LANG_BT_COMPLETED>:
8634 Remove.
8635 <EXT_LANG_BT_NO_FILTERS>: Change value.
8636
978d6c75
TT
86372018-03-26 Tom Tromey <tom@tromey.com>
8638
8639 PR backtrace/15582:
8640 * stack.c (backtrace_command): Parse "hide" argument.
8641 * python/py-framefilter.c (py_print_frame): Handle PRINT_HIDE.
8642 * extension.h (enum frame_filter_flags) <PRINT_HIDE>: New
8643 constant.
8644
1cf7e640
TT
86452018-03-26 Tom Tromey <tom@tromey.com>
8646
8647 * stack.c (backtrace_command_1): Remove "show_locals" parameter,
8648 add "flags".
8649 (backtrace_command): Remove "fulltrace", add "flags".
8650
ea3b0687
TT
86512018-03-26 Tom Tromey <tom@tromey.com>
8652
8653 * stack.c (backtrace_command): Rewrite command line parsing.
8654
9f034d75
SM
86552018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8656
8657 * dwarf2read.c (DEF_VEC_I(offset_type)): Remove.
8658
ce1459e5
SM
86592018-03-26 Simon Marchi <simon.marchi@ericsson.com>
8660
8661 * filename-seen-cache.h: Add include guard.
8662
4f7ae6f5
KS
86632018-03-26 Keith Seitz <keiths@redhat.com>
8664
8665 * symfile.c (place_section): Remove "struct" from section_addr_info
8666 in comment.
8667 * windows-nat.c (struct safe_symbol_file_add_args) <addrs>: Remove
8668 "struct" keyword from section_addr_info.
8669
5cd3e386
AH
86702018-03-26 Alan Hayward <alan.hayward@arm.com>
8671
8672 * regformats/regdef.h (reg): Add constructors.
8673
3e5ef9a4
PA
86742018-03-25 Pedro Alves <palves@redhat.com>
8675
8676 * eval.c (evaluate_funcall): Swap OP_VAR_MSYM_VALUE/OP_VAR_VALUE
8677 if then/else bodies in var_func_name extraction.
8678
c88d2fcc 86792018-03-23 Weimin Pan <weimin.pan@oracle.com>
bce02d88
WP
8680
8681 * minsyms.c (lookup_minimal_symbol_and_objfile): Use
8682 lookup_minimal_symbol() to find symbol entry.
8683 * minsyms.h (lookup_minimal_symbol_and_objfile): Update comment.
8684
b7fee5a3
KS
86852018-03-23 Keith Seitz <keiths@redhat.com>
8686
8687 PR c++/22968
8688 * dwarf2read.c (scan_partial_symbols): Scan structs/classes for
8689 nested type definitions for C++, too.
8690
2cc9b304
TT
86912018-03-23 Tom Tromey <tom@tromey.com>
8692
8693 * machoread.c (struct oso_el): Add a constructor. Don't define as
8694 a typedef.
8695 (macho_register_oso): Remove.
8696 (macho_symtab_read): Take a std::vector.
8697 (oso_el_compare_name): Now a std::sort comparator.
8698 (macho_symfile_read_all_oso): Take a std::vector.
8699 (macho_symfile_read): Use std::vector. Remove cleanups.
8700
a2b2bc12
TT
87012018-03-22 Tom Tromey <tom@tromey.com>
8702
8703 * record-full.c (record_full_exec_insn): Use gdb::byte_vector.
8704 (record_full_goto_bookmark): Use std::string.
8705
7a8f494c
PFC
87062018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8707
8708 PR tdep/18295
8709 * rs6000-tdep.c (skip_prologue): Match both stwux and stdux
8710 a single mask.
8711
dd6d677f
PFC
87122018-03-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8713
8714 * rs6000-tdep.c (store_insn_p): New function.
8715 (skip_prologue): New variable alloca_reg_offset. Set lr_reg
8716 and cr_reg to their unshifted values. Use store_insn_p to
8717 match LR saves using either R1 or fdata->alloca_reg. Use
8718 store_insn_p to match CR saves. Set alloca_reg_offset
8719 when alloca_reg and framep are set. Remove lr_reg shift
8720 when assigning to fdata->lr_register.
8721
26d6cec4
AA
87222018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
8723
8724 * linux-tdep.c (linux_info_proc): For "info proc cmdline", print
8725 command line args instead of emitting a warning.
8726
5d9310c4
SM
87272018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8728
8729 * tracepoint.h (struct static_tracepoint_marker): Initialize
8730 fields, define default constructor, move constructor and move
8731 assignment, disable the rest.
8732 <str_id, extra>: Make std::string.
8733 (release_static_tracepoint_marker): Remove.
8734 (free_current_marker): Remove.
8735 * tracepoint.c (free_current_marker): Remove.
8736 (parse_static_tracepoint_marker_definition): Adjust to
8737 std::string, use new hex2str overload.
8738 (release_static_tracepoint_marker): Remove.
8739 (print_one_static_tracepoint_marker): Get marker by reference
8740 and adjust to std::string.
8741 (info_static_tracepoint_markers_command): Adjust to std::vector
8742 changes
8743 * target.h (static_tracepoint_marker_p): Remove typedef.
8744 (DEF_VEC_P(static_tracepoint_marker_p)): Remove.
8745 (struct target_ops) <to_static_tracepoint_marker_at>: Return
8746 bool.
8747 <to_static_tracepoint_markers_by_strid>: Return std::vector.
8748 * target-debug.h
8749 (target_debug_print_VEC_static_tracepoint_marker_p_p): Remove.
8750 (target_debug_print_std_vector_static_tracepoint_marker): New.
8751 (target_debug_print_struct_static_tracepoint_marker_p): Rename
8752 to...
8753 (target_debug_print_static_tracepoint_marker_p): ... this.
8754 * target-delegates.c: Re-generate.
8755 * breakpoint.h (struct tracepoint) <static_trace_marker_id>:
8756 Make std::string.
8757 * breakpoint.c (init_breakpoint_sal): Adjust to std::string.
8758 (decode_static_tracepoint_spec): Adjust to std::vector.
8759 (tracepoint_print_one_detail): Adjust to std::string.
8760 (strace_marker_decode_location): Adjust to std::string.
8761 (update_static_tracepoint): Adjust to std::string, remove call
8762 to release_static_tracepoint_marker.
8763 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
8764 Adjust to std::vector.
8765 * remote.c (remote_static_tracepoint_marker_at): Return bool.
8766 (remote_static_tracepoint_markers_by_strid): Adjust to
8767 std::vector.
8768 * common/rsp-low.h (hex2str): New overload with explicit count
8769 of bytes.
8770 * common/rsp-low.c (hex2str): New overload with explicit count
8771 of bytes.
8772 * unittests/rsp-low-selftests.c (test_hex2str): New function.
8773 (_initialize_rsp_low_selftests): Add test_hex2str test.
8774 * unittests/tracepoint-selftests.c
8775 (test_parse_static_tracepoint_marker_definition): Adjust to
8776 std::string.
8777
62c222b6
SM
87782018-03-22 Simon Marchi <simon.marchi@polymtl.ca>
8779
8780 * tracepoint.c (parse_static_tracepoint_marker_definition):
8781 Consider case where the definition is followed by more
8782 definitions.
8783 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8784 tracepoint-selftests.c.
8785 * unittests/tracepoint-selftests.c: New.
8786
7eb2418f
PFC
87872018-03-21 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
8788
8789 * MAINTAINERS (Write After Approval): Add Pedro Franco de
8790 Carvalho.
8791
7cbe16e9
SR
87922018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8793
3d6b3b82 8794 * symtab.c (find_pc_sect_line): fixed indentation.
7cbe16e9 8795
4ee89e90
SR
87962018-03-20 Stephen Roberts <stephen.roberts@arm.com>
8797
3d6b3b82 8798 * symtab.c (find_pc_sect_line): now uses binary search.
4ee89e90 8799
92630041
TT
88002018-03-19 Tom Tromey <tom@tromey.com>
8801
8802 * rust-exp.y (struct_expr_tail, struct_expr_list): Add plain
8803 "IDENT" production.
8804
76727919
TT
88052018-03-19 Pedro Alves <palves@redhat.com>
8806 Tom Tromey <tom@tromey.com>
8807
8808 * unittests/observable-selftests.c: New file.
8809 * common/observable.h: New file.
8810 * observable.h: New file.
8811 * ada-lang.c, ada-tasks.c, agent.c, aix-thread.c, annotate.c,
8812 arm-tdep.c, auto-load.c, auxv.c, break-catch-syscall.c,
8813 breakpoint.c, bsd-uthread.c, cli/cli-interp.c, cli/cli-setshow.c,
8814 corefile.c, dummy-frame.c, event-loop.c, event-top.c, exec.c,
8815 extension.c, frame.c, gdbarch.c, guile/scm-breakpoint.c,
8816 infcall.c, infcmd.c, inferior.c, inflow.c, infrun.c, jit.c,
8817 linux-tdep.c, linux-thread-db.c, m68klinux-tdep.c,
8818 mi/mi-cmd-break.c, mi/mi-interp.c, mi/mi-main.c, objfiles.c,
8819 ppc-linux-nat.c, ppc-linux-tdep.c, printcmd.c, procfs.c,
8820 python/py-breakpoint.c, python/py-finishbreakpoint.c,
8821 python/py-inferior.c, python/py-unwind.c, ravenscar-thread.c,
8822 record-btrace.c, record-full.c, record.c, regcache.c, remote.c,
8823 riscv-tdep.c, sol-thread.c, solib-aix.c, solib-spu.c, solib.c,
8824 spu-multiarch.c, spu-tdep.c, stack.c, symfile-mem.c, symfile.c,
8825 symtab.c, thread.c, top.c, tracepoint.c, tui/tui-hooks.c,
8826 tui/tui-interp.c, valops.c: Update all users.
8827 * tui/tui-hooks.c (tui_bp_created_observer)
8828 (tui_bp_deleted_observer, tui_bp_modified_observer)
8829 (tui_inferior_exit_observer, tui_before_prompt_observer)
8830 (tui_normal_stop_observer, tui_register_changed_observer):
8831 Remove.
8832 (tui_observers_token): New global.
8833 (attach_or_detach, tui_attach_detach_observers): New functions.
8834 (tui_install_hooks, tui_remove_hooks): Use
8835 tui_attach_detach_observers.
8836 * record-btrace.c (record_btrace_thread_observer): Remove.
8837 (record_btrace_thread_observer_token): New global.
8838 * observer.sh: Remove.
8839 * observer.c: Rename to observable.c.
8840 * observable.c (namespace gdb_observers): Define new objects.
8841 (observer_debug): Move into gdb_observers namespace.
8842 (struct observer, struct observer_list, xalloc_observer_list_node)
8843 (xfree_observer_list_node, generic_observer_attach)
8844 (generic_observer_detach, generic_observer_notify): Remove.
8845 (_initialize_observer): Update.
8846 Don't include observer.inc.
8847 * Makefile.in (generated_files): Remove observer.h, observer.inc.
8848 (clean mostlyclean): Likewise.
8849 (observer.h, observer.inc): Remove targets.
8850 (SUBDIR_UNITTESTS_SRCS): Add observable-selftests.c.
8851 (COMMON_SFILES): Use observable.c, not observer.c.
8852 * .gitignore: Remove observer.h.
8853
1cb1f3da
TT
88542018-03-18 Tom Tromey <tom@tromey.com>
8855
8856 * solib.c (gdb_bfd_lookup_symbol_from_symtab): Use
8857 gdb::def_vector.
8858 (bfd_lookup_symbol_from_dyn_symtab): Likewise.
8859
a06ab151
TT
88602018-03-17 Tom Tromey <tom@tromey.com>
8861
8862 * auto-load.c (auto_load_objfile_script_1): Use std::string.
8863
770623f7
TT
88642018-03-17 Tom Tromey <tom@tromey.com>
8865
8866 * target.c (class scoped_target_fd): New.
8867 (target_fileio_close_cleanup): Remove.
8868 (target_fileio_read_alloc_1): Use scoped_target_fd.
8869
39be3c7e
SM
88702018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
8871
8872 * silent-rules.mk: New.
8873 * Makefile.in: Include silent-rules.mk
8874 (srcdir, VPATH, top_srcdir): Move up.
8875 (COMPILE): Add ECHO_CXX.
8876 (test-cp-name-parser$(EXEEXT)): Add ECHO_CXXLD.
8877 (init.c): Add ECHO_INIT_C.
8878 (gdb$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
8879 (version.c): Add ECHO_GEN.
8880 (printcmd.o): Add ECHO_CXX.
8881 (target-float.o): Add ECHO_CXX.
8882 (ada-exp.o): Add ECHO_CXX.
8883 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN.
8884 (insight$(EXEEXT)): Add ECHO_CXXLD.
8885 * gnulib/configure.ac: Add AM_SILENT_RULES.
8886 * gnulib/aclocal.m4: Re-generate.
8887 * gnulib/configure: Re-generate.
8888 * gnulib/import/Makefile.in: Re-generate.
8889
37e136b1
TT
88902018-03-16 Tom Tromey <tom@tromey.com>
8891
8892 * xcoffread.c (xcoff_symfile_offsets): Change type of "addrs".
8893 * utils.h (make_cleanup_free_section_addr_info): Don't declare.
8894 * utils.c (do_free_section_addr_info)
8895 (make_cleanup_free_section_addr_info): Remove.
8896 * symfile.h (struct other_sections): Add constructor.
8897 (struct section_addr_info): Remove.
8898 (section_addr_info): New typedef.
8899 (struct sym_fns) <sym_offsets>: Change type of parameter.
8900 (build_section_addr_info_from_objfile)
8901 (relative_addr_info_to_section_offsets, addr_info_make_relative)
8902 (default_symfile_offsets, symbol_file_add)
8903 (symbol_file_add_from_bfd)
8904 (build_section_addr_info_from_section_table): Update.
8905 (alloc_section_addr_info, free_section_addr_info): Don't declare.
8906 * symfile.c (alloc_section_addr_info): Remove.
8907 (build_section_addr_info_from_section_table): Change return type.
8908 Update.
8909 (build_section_addr_info_from_bfd)
8910 (build_section_addr_info_from_objfile): Likewise.
8911 (free_section_addr_info): Remove.
8912 (relative_addr_info_to_section_offsets): Change type of "addrs".
8913 (addrs_section_compar): Now a std::sort comparator.
8914 (addrs_section_sort): Change return type.
8915 (addr_info_make_relative): Change type of "addrs". Update.
8916 (default_symfile_offsets, syms_from_objfile_1)
8917 (syms_from_objfile, symbol_file_add_with_addrs): Likewise.
8918 (symbol_file_add_separate): Update.
8919 (symbol_file_add): Change type of "addrs". Update.
8920 (add_symbol_file_command): Update. Remove cleanups.
8921 * symfile-mem.c (symbol_file_add_from_memory): Update. Remove
8922 cleanups.
8923 * symfile-debug.c (debug_sym_offsets): Change type of "info".
8924 * solib.c (solib_read_symbols): Update.
8925 * objfiles.c (objfile_relocate): Update. Remove cleanups.
8926 * machoread.c (macho_symfile_offsets): Update.
8927 * jit.c (jit_bfd_try_read_symtab): Update.
8928
03afa6ef
SM
89292018-03-15 Simon Marchi <simon.marchi@polymtl.ca>
8930
8931 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8932 unittests/utils-selftests.c.
8933 * unittests/utils-selftests.c: New file.
8934
3ae9ce5d
TT
89352018-03-14 Tom Tromey <tom@tromey.com>
8936
8937 PR cli/14977:
8938 * printcmd.c (printf_c_string, printf_wide_c_string): Special case
8939 for NULL.
8940
b8c2339b
TT
89412018-03-14 Tom Tromey <tom@tromey.com>
8942
8943 PR cli/19918:
8944 * printcmd.c (printf_pointer): Allow "-" in format.
8945
80ae639d
TT
89462018-03-14 Tom Tromey <tom@tromey.com>
8947
8948 * printcmd.c (_initialize_printcmd): Add usage to printf.
8949
0d671d99
YQ
89502018-03-14 Yao Qi <qiyao@sourceware.org>
8951
8952 * MAINTAINERS: Update my email address.
8953
b577b6af
TT
89542018-03-13 Tom Tromey <tom@tromey.com>
8955
8956 * machoread.c (macho_check_dsym): Change filenamep to a
8957 std::string*.
8958 (macho_symfile_read): Update.
8959 * symfile.c (load_command): Use std::string.
8960
89a3b63e
AB
89612018-03-12 Andrew Burgess <andrew.burgess@embecosm.com>
8962
8963 * riscv-tdep.c (riscv_sw_breakpoint_from_kind): Add localization
8964 to error message string.
8965 (riscv_register_name): Use xsnprintf instead of sprintf.
8966 (riscv_insn::fetch_instruction): Use gdb_assert instead of
8967 internal_error.
8968 (riscv_print_arg_location): Use gdb_assert_not_reached instead of
8969 error.
8970 (riscv_push_dummy_call): Likewise.
8971
984c7238
TT
89722018-03-12 Tom Tromey <tom@tromey.com>
8973
8974 * rs6000-aix-tdep.c (rs6000_aix_core_xfer_shared_libraries_aix):
8975 Use gdb::byte_vector.
8976 * arm-tdep.c (arm_exidx_new_objfile): Use gdb::byte_vector.
8977
933522d1
YQ
89782018-03-12 Yao Qi <yao.qi@linaro.org>
8979
8980 * ia64-libunwind-tdep.c (libunwind_get_reg_special): Change
8981 parameter type to readable_regcache.
8982 * ia64-libunwind-tdep.h (libunwind_get_reg_special): Update
8983 the declaration.
8984
be2daae6
TT
89852018-03-11 Tom Tromey <tom@tromey.com>
8986
8987 * dwarf2read.c (struct nextfield): Add initializers.
8988 (struct nextfnfield): Remove.
8989 (struct fnfieldlist): Add initializers. Remove "length" and
8990 "head", use std::vector.
8991 (struct decl_field_list): Remove.
8992 (struct field_info): Add initializers.
8993 <fields, baseclasses>: Now std::vector.
8994 <nbaseclasses, nfnfields, typedef_field_list_count,
8995 nested_types_list_count>: Remove.
8996 (dwarf2_add_field, dwarf2_add_type_defn)
8997 (dwarf2_attach_fields_to_type, dwarf2_add_member_fn)
8998 (dwarf2_attach_fn_fields_to_type, handle_struct_member_die)
8999 (process_structure_scope): Update.
9000
484cf504
TT
90012018-03-11 Tom Tromey <tom@tromey.com>
9002
9003 * dwarf2read.c (sort_tu_by_abbrev_offset): Change to be suitable
9004 for use by std::sort.
9005 (build_type_psymtabs_1): Use std::vector.
9006
9bd8e0b0
EZ
90072018-03-09 Eli Zaretskii <eliz@gnu.org>
9008
9009 * top.c (print_gdb_configuration): Reflect LIBIPT, LIBMEMCHECK,
9010 and LIBMPFR in the printed configuration.
9011
5dc1a704
TT
90122018-03-08 Tom Tromey <tom@tromey.com>
9013
9014 * source.c (get_filename_and_charpos): Use scoped_fd.
9015 * nto-procfs.c (procfs_open_1): Use scoped_fd.
9016 (procfs_pidlist): Likewise.
9017 * procfs.c (proc_get_LDT_entry): Use scoped_fd.
9018 (iterate_over_mappings): Likewise.
9019
fdf07f3a
TT
90202018-03-08 Tom Tromey <tom@tromey.com>
9021
9022 * infcall.c (struct call_return_meta_info)
9023 <stack_temporaries_enabled>: Remove.
9024 (get_call_return_value, call_function_by_hand_dummy): Update.
9025 * thread.c (disable_thread_stack_temporaries): Remove.
9026 (enable_thread_stack_temporaries): Remove.
9027 (thread_stack_temporaries_enabled_p): Return bool.
9028 (push_thread_stack_temporary, value_in_thread_stack_temporaries)
9029 (get_last_thread_stack_temporary): Update.
9030 * eval.c (evaluate_subexp): Update.
9031 * gdbthread.h (class enable_thread_stack_temporaries): Now a
9032 class, not a function.
9033 (value_ptr, value_vec): Remove typedefs.
9034 (class thread_info) <stack_temporaries_enabled>: Now bool.
9035 <stack_temporaries>: Now a std::vector.
9036 (thread_stack_temporaries_enabled_p)
9037 (value_in_thread_stack_temporaries): Return bool.
9038
567a3e54
SM
90392018-03-08 Simon Marchi <simon.marchi@ericsson.com>
9040
9041 * remote.c (putpkt_binary): Fix omitted bytes reporting.
9042 (getpkt_or_notif_sane_1): Likewise.
9043
00b40057
SM
90442018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9045
9046 * build-id.c (build_id_to_debug_bfd): Use std::string.
9047
a8dbfd58
SM
90482018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9049
9050 * build-id.c (find_separate_debug_file_by_buildid): Return
9051 std::string.
9052 * build-id.h (find_separate_debug_file_by_buildid): Return
9053 std::string.
9054 * coffread.c (coff_symfile_read): Adjust to std::string.
9055 * elfread.c (elf_symfile_read): Adjust to std::string.
9056 * symfile.c (separate_debug_file_exists): Change parameter to
9057 std::string.
9058 (find_separate_debug_file): Return std::string.
9059 (find_separate_debug_file_by_debuglink): Return std::string.
9060 * symfile.h (find_separate_debug_file_by_debuglink): Return
9061 std::string.
9062
e6a58aa8
SM
90632018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
9064
9065 * common/xml-utils.c (xml_escape_text): Move code to...
9066 (xml_escape_text_append): ... this new function.
9067 * common/xml-utils.h (xml_escape_text_append): New declaration.
9068 * unittests/xml-utils-selftests.c (test_xml_escape_text_append):
9069 New function.
9070 (_initialize_xml_utils): register test_xml_escape_text_append as
9071 a selftest.
9072
4ef0bef6
AH
90732018-03-07 Alan Hayward <alan.hayward@arm.com>
9074
9075 * defs.h: Remove MAX_REGISTER_SIZE.
9076 * regcache.c (init_regcache_descr): Remove MAX_REGISTER_SIZE
9077 asserts.
9078 * python/py-unwind.c (pyuw_sniffer): Likewise.
9079
e0d3522b
TT
90802018-03-07 Tom Tromey <tom@tromey.com>
9081
9082 * linux-tdep.c (linux_info_proc): Update.
9083 * target.h (struct target_ops) <to_fileio_readlink>: Return
9084 optional<string>.
9085 (target_fileio_readlink): Return optional<string>.
9086 * remote.c (remote_hostio_readlink): Return optional<string>.
9087 * inf-child.c (inf_child_fileio_readlink): Return
9088 optional<string>.
9089 * target.c (target_fileio_readlink): Return optional<string>.
9090
ea005f31
AB
90912018-03-07 Andrew Burgess <andrew.burgess@embecosm.com>
9092
9093 * regcache.c (cooked_read_test): Add riscv to the list of
9094 architectures that have a save_reggroup.
9095
e95a97d4
AA
90962018-03-07 Andreas Arnez <arnez@linux.vnet.ibm.com>
9097
9098 * gnu-v3-abi.c (gnuv3_rtti_type): Add early exit if the given
9099 value is not a dynamic class object.
9100
d8344f3d
TT
91012018-03-06 Tom Tromey <tom@tromey.com>
9102
9103 * rust-exp.y: Formatting fixes.
9104
9add17f2
AB
91052018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9106
9107 * riscv-tdep.c (riscv_register_name): Remove target description
9108 support.
9109 (riscv_gdbarch_init): Remove target description check.
9110
c9486dfe
AB
91112018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9112
9113 * riscv-tdep.c: Remove 'Contributed by ...' lines from header
9114 comment.
9115 * riscv-tdep.h: Likewise.
9116
d74aff3d
AB
91172018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9118
9119 * riscv-tdep.c (riscv_pseudo_register_read): Delete.
9120 (riscv_pseudo_register_write): Delete.
9121 (riscv_gdbarch_init): Remove all use of pseudo registers.
9122
7ea78b59
SM
91232018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9124
9125 * record-btrace.c (btrace_print_lines): Replace cleanup
9126 parameter with RAII equivalents.
9127 (btrace_insn_history): Replace cleanup with RAII equivalents.
9128 * ui-out.h (make_cleanup_ui_out_list_begin_end,
9129 make_cleanup_ui_out_tuple_begin_end): Remove.
9130 * ui-out.c (struct ui_out_end_cleanup_data, do_cleanup_end,
9131 make_cleanup_ui_out_end, make_cleanup_ui_out_tuple_begin_end,
9132 make_cleanup_ui_out_list_begin_end): Remove.
9133
53127008
SM
91342018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9135
9136 * record-btrace.c (record_btrace_maybe_mark_async_event): Change
9137 parameter types to std::vector. Use bool.
9138 (record_btrace_wait): Replace VEC(tp_t) with
9139 std::vector<thread_info *>.
9140 * common/gdb_vecs.h (unordered_remove, ordered_remove): New.
9141
228f1508
SM
91422018-03-06 Simon Marchi <simon.marchi@polymtl.ca>
9143
9144 * record-btrace.c (record_btrace_disable_callback): Remove.
9145 (struct scoped_btrace_disable): New.
9146 (record_btrace_open): Use scoped_btrace_disable.
9147
b2970c23
AB
91482018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9149
9150 * riscv-tdep.c (riscv_return_value): Change type to ULONGEST for
9151 reading values from registers.
9152
fb294655
AB
91532018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9154
9155 * riscv-tdep.c (riscv_push_dummy_call): Use core_addr_to_string_nz
9156 where appropriate.
9157
cab5bb9d
AB
91582018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9159
9160 * riscv-tdep.c (riscv_print_arg_location): Add header comment,
9161 change parameter type. Use GDB's print functions, and use
9162 core_addr_to_string where appropriate.
9163 (riscv_push_dummy_call): Use core_addr_to_string where
9164 appropriate, update call to riscv_print_arg_location, and reindent
9165 a few lines.
9166 (riscv_return_value): Update call to riscv_print_arg_location.
9167
dbbb1059
AB
91682018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9169 Tim Newsome <tim@sifive.com>
9170 Albert Ou <a0u@eecs.berkeley.edu>
9171 Darius Rad <darius@bluespec.com>
9172
9173 * Makefile.in (ALL_TARGET_OBS): Add riscv-tdep.o
9174 (HFILES_NO_SRCDIR): Add riscv-tdep.h.
9175 (ALLDEPFILES): Add riscv-tdep.c
9176 * configure.tgt: Add riscv support.
9177 * riscv-tdep.c: New file.
9178 * riscv-tdep.h: New file.
9179 * NEWS: Mention new target.
9180 * MAINTAINERS: Add entry for riscv.
9181
5dc43913
AB
91822018-03-06 Andrew Burgess <andrew.burgess@embecosm.com>
9183
9184 * amd64-tdep.c (amd64_classify_aggregate): Ignore zero sized
9185 fields within aggregates.
9186
3dea1ef7
SM
91872018-03-04 Simon Marchi <simon.marchi@polymtl.ca>
9188
9189 * record-btrace.c (btrace_print_lines): Change type of flags to
9190 gdb_disassembly_flags.
9191
7efba073
JB
91922018-03-04 John Baldwin <jhb@FreeBSD.org>
9193
9194 * fbsd-nat.c: Include "inf-ptrace.h".
9195 (USE_SIGTRAP_SIGINFO): Conditionally define.
9196 [USE_SIGTRAP_SIGINFO] (fbsd_handle_debug_trap): New function.
9197 (fbsd_wait) [USE_SIGTRAP_SIGINFO]: Call "fbsd_handle_debug_trap".
9198 [USE_SIGTRAP_SIGINFO] (fbsd_stopped_by_sw_breakpoint): New
9199 function.
9200 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_sw_breakpoint):
9201 Likewise.
9202 [USE_SIGTRAP_SIGINFO] (fbsd_supports_stopped_by_hw_breakpoint):
9203 Likewise.
9204 (fbsd_nat_add_target) [USE_SIGTRAP_SIGINFO]: Set
9205 "stopped_by_sw_breakpoint", "supports_stopped_by_sw_breakpoint",
9206 "supports_stopped_by_hw_breakpoint" target methods.
9207
386a8676
JB
92082018-03-04 John Baldwin <jhb@FreeBSD.org>
9209
9210 * NEWS (Changes since GDB 8.1): Add "set/show debug fbsd-nat".
9211 * fbsd-nat.c (debug_fbsd_nat): New variable.
9212 (show_fbsd_nat_debug): New function.
9213 (fbsd_wait): Log LWP info if "debug_fbsd_nat" is enabled.
9214 (_initialize_fbsd_nat): Add "fbsd-nat" debug boolean command.
9215
12279366
JB
92162018-03-04 John Baldwin <jhb@FreeBSD.org>
9217
9218 * nat/x86-dregs.c (x86_dr_stopped_by_hw_breakpoint): New function.
9219 * nat/x86-dregs.h (x86_dr_stopped_by_hw_breakpoint): New
9220 prototype.
9221 * x86-nat.c (x86_stopped_by_hw_breakpoint): New function.
9222 (x86_use_watchpoints): Set "stopped_by_hw_breakpoint" target
9223 method.
9224
54693cf5
SM
92252018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9226
9227 * common/gdb_vecs.c (free_char_ptr_vec): Remove.
9228 * common/gdb_vecs.h (free_char_ptr_vec): Remove.
9229
ccb2231c
SM
92302018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9231
9232 * charset.c (struct charset_vector): New.
9233 (charsets): Change type to charset_vector.
9234 (find_charset_names): Adjust.
9235 (add_one): Adjust.
9236 (_initialize_charset): Adjust.
9237
6fb16ce6
SM
92382018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9239
9240 * progspace.h (struct program_space) <deleted_solibs>: Change
9241 type to std::vector<std::string>.
9242 * progspace.c (clear_program_space_solib_cache): Adjust.
9243 * breakpoint.c (print_solib_event): Adjust.
9244 (check_status_catch_solib): Adjust.
9245 * solib.c (update_solib_list): Adjust.
9246 * ui-out.h (class ui_out) <field_string>: New overload.
9247 * ui-out.c (ui_out::field_string): New overload.
9248
564b1e3f
SM
92492018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9250
9251 * progspace.h (struct program_space): Add constructor and
9252 destructor, initialize fields.
9253 (add_program_space): Remove.
9254 * progspace.c (add_program_space): Rename to...
9255 (program_space::program_space): ... this.
9256 (release_program_space): Rename to...
9257 (program_space::~program_space): ... this.
9258 (delete_program_space): Use delete to delete program_space.
9259 (initialize_progspace): Use new to allocate program_space.
9260 * inferior.c (add_inferior_with_spaces): Likewise.
9261 (clone_inferior_command): Likewise.
9262 * infrun.c (follow_fork_inferior): Likewise.
9263 (handle_vfork_child_exec_or_exit): Likewise.
9264
e80aaf61
SM
92652018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
9266
9267 * common/gdb_vecs.h (make_cleanup_free_char_ptr_vec): Remove.
9268 (delim_string_to_char_ptr_vec): Return std::vector of
9269 gdb::unique_xmalloc_ptr.
9270 (dirnames_to_char_ptr_vec_append): Take std::vector of
9271 gdb::unique_xmalloc_ptr.
9272 (dirnames_to_char_ptr_vec): Return std::vector of
9273 gdb::unique_xmalloc_ptr.
9274 * common/gdb_vecs.c (delim_string_to_char_ptr_vec_append):
9275 Take std::vector of gdb::unique_xmalloc_ptr, adjust the code.
9276 (delim_string_to_char_ptr_vec): Return an std::vector of
9277 gdb::unique_xmalloc_ptr, adjust the code.
9278 (dirnames_to_char_ptr_vec_append): Take an std::vector of
9279 gdb::unique_xmalloc_ptr, adjust the code.
9280 (dirnames_to_char_ptr_vec): Return an std::vector of
9281 gdb::unique_xmalloc_ptr, adjust the code.
9282 * auto-load.c (auto_load_safe_path_vec): Change type to
9283 std::vector of gdb::unique_xmalloc_ptr.
9284 (auto_load_expand_dir_vars): Return an std::vector of
9285 gdb::unique_xmalloc_ptr, adjust the code.
9286 (auto_load_safe_path_vec_update): Adjust.
9287 (filename_is_in_auto_load_safe_path_vec): Adjust.
9288 (auto_load_objfile_script_1): Adjust.
9289 * build-id.c (build_id_to_debug_bfd): Adjust.
9290 * linux-thread-db.c (thread_db_load_search): Adjust.
9291 * source.c (add_path): Adjust.
9292 (openp): Adjust.
9293 * symfile.c (find_separate_debug_file): Adjust.
9294 * utils.c (do_free_char_ptr_vec): Remove.
9295 (make_cleanup_free_char_ptr_vec): Remove.
9296
ab818ade
SDJ
92972018-03-01 Sergio Durigan Junior <sergiodj@redhat.com>
9298
9299 PR gdb/22907
9300 * common/pathstuff.c: Conditionally include "<windows.h>".
9301
e1e6f073
GS
93022018-03-01 Georg Sauthoff <mail@georg.so>
9303
9304 PR gdb/22888
9305 * gcore.in: Quote variables and switch interpreter to bash.
9306
c7b15a66
TT
93072018-03-01 Tom Tromey <tom@tromey.com>
9308
9309 * dwarf2read.c (alloc_discriminant_info): Fix default_index
9310 assertion. Add assertion for discriminant_index.
9311 (quirk_rust_enum): Use correct base type name in univariant case.
9312
0cb7c7b0
SM
93132018-03-01 Simon Marchi <simon.marchi@ericsson.com>
9314
9315 * record.c (get_call_history_modifiers): Return a
9316 record_print_flags.
9317 (cmd_record_call_history): Adjust.
9318 * record-btrace.c (record_btrace_call_history): Adjust.
9319 (record_btrace_call_history_range): Adjust.
9320 (record_btrace_call_history_from): Adjust.
9321 * target-debug.h (target_debug_print_record_print_flags): New.
9322 * target-delegates.c: Re-generate.
9323 * target.c (target_call_history): Change flags type.
9324 (target_call_history_from): Likewise.
9325 (target_call_history_range): Likewise.
9326 * target.h (struct target_ops) <target_call_history>: Likewise.
9327 (target_call_history_from): Likewise.
9328 (target_call_history_range): Likewise.
9329
25e3c82c
SDJ
93302018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9331 Simon Marchi <simon.marchi@polymtl.ca>
9332
9333 * common/common-utils.c: Include "sys/stat.h".
9334 (is_regular_file): Move here from "source.c"; change return
9335 type to "bool".
9336 * common/common-utils.h (is_regular_file): New prototype.
9337 * common/pathstuff.c (contains_dir_separator): New function.
9338 * common/pathstuff.h (contains_dir_separator): New prototype.
9339 * source.c: Don't include "sys/stat.h".
9340 (is_regular_file): Move to "common/common-utils.c".
9341
b4987c95
SDJ
93422018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
9343
9344 * Makefile.in (COMMON_SFILES): Add "common/pathstuff.c".
9345 (HFILES_NO_SRCDIR): Add "common/pathstuff.h".
9346 * auto-load.c: Include "common/pathstuff.h".
9347 * common/common-def.h (current_directory): Move here.
9348 * common/gdb_tilde_expand.c (gdb_tilde_expand_up): New
9349 function.
9350 * common/gdb_tilde_expand.h (gdb_tilde_expand_up): New
9351 prototype.
9352 * common/pathstuff.c: New file.
9353 * common/pathstuff.h: New file.
9354 * compile/compile.c: Include "common/pathstuff.h".
9355 * defs.h (current_directory): Move to "common/common-defs.h".
9356 * dwarf2read.c: Include "common/pathstuff.h".
9357 * exec.c: Likewise.
9358 * guile/scm-safe-call.c: Likewise.
9359 * linux-thread-db.c: Likewise.
9360 * main.c: Likewise.
9361 * nto-tdep.c: Likewise.
9362 * objfiles.c: Likewise.
9363 * source.c: Likewise.
9364 * symtab.c: Likewise.
9365 * utils.c: Include "common/pathstuff.h".
9366 (gdb_realpath): Move to "common/pathstuff.c".
9367 (gdb_realpath_keepfile): Likewise.
9368 (gdb_abspath): Likewise.
9369 * utils.h (gdb_realpath): Move to "common/pathstuff.h".
9370 (gdb_realpath_keepfile): Likewise.
9371 (gdb_abspath): Likewise.
9372
f169cfdc
JB
93732018-02-28 John Baldwin <jhb@FreeBSD.org>
9374
9375 * fbsd-nat.c (fbsd_resume): Use PT_SETSTEP for stepping and a
9376 wildcard process pid for super_resume for kernels with a
9377 specific bug.
9378
e05cac70
PM
93792018-02-27 Phil Muldoon <pmuldoon@redhat.com>
9380
9381 * compile/compile.c (get_args): Add additional comments
9382 explaining function.
9383
55089490
TT
93842018-02-27 Simon Marchi <simon.marchi@polymtl.ca>
9385 Tom Tromey <tom@tromey.com>
9386
9387 * target.h (memory_write_request_s): Remove typedef. Don't define
9388 VEC.
9389 (target_write_memory_blocks): Change argument to std::vector.
9390 (struct memory_write_request): Add constructor.
9391 * target-memory.c (compare_block_starting_address): Return bool.
9392 Change argument types.
9393 (claim_memory): Change arguments to use std::vector.
9394 (split_regular_and_flash_blocks, blocks_to_erase)
9395 (compute_garbled_blocks): Likewise.
9396 (cleanup_request_data, cleanup_write_requests_vector): Remove.
9397 (target_write_memory_blocks): Change argument to std::vector.
9398 * symfile.c (struct load_section_data): Add constructor and
9399 destructor. Use std::vector for "requests".
9400 (struct load_progress_data): Add initializers.
9401 (load_section_callback): Update. Use "new".
9402 (clear_memory_write_data): Remove.
9403 (generic_load): Update.
9404
0c305b61
AH
94052018-02-27 Alan Hayward <alan.hayward@arm.com>
9406
9407 * arch/aarch64.h: Use common/tdesc.h.
9408
c5196c92
MR
94092018-02-26 Maciej W. Rozycki <macro@mips.com>
9410
9411 * mips-tdep.c (mips_gdbarch_init): Don't use a 32-bit BFD
9412 architecture with a 64-bit ABI.
9413
37c33887
MR
94142018-02-26 Maciej W. Rozycki <macro@mips.com>
9415
9416 * gdb/mips-tdep.c (mips_gdbarch_init): Reorder ABI determination
9417 ahead of target description loading.
9418
d4dd3282
TT
94192018-02-26 Tom Tromey <tom@tromey.com>
9420
9421 * stack.c (backtrace_command_1): Update.
9422 * python/python-internal.h (gdbpy_apply_frame_filter): Change type
9423 of "flags".
9424 * python/py-framefilter.c (py_print_frame)
9425 (gdbpy_apply_frame_filter): Change type of "flags".
9426 * mi/mi-cmd-stack.c (mi_apply_ext_lang_frame_filter): Change type
9427 of "flags".
9428 (mi_cmd_stack_list_frames, mi_cmd_stack_list_locals)
9429 (mi_cmd_stack_list_args, mi_cmd_stack_list_variables): Update.
9430 * extension.h (enum frame_filter_flag): Rename from
9431 frame_filter_flags.
9432 (frame_filter_flags): Define using DEF_ENUM_FLAGS_TYPE.
9433 (apply_ext_lang_frame_filter): Change type of "flags".
9434 * extension.c (apply_ext_lang_frame_filter): Change type of
9435 "flags".
9436 * extension-priv.h (struct extension_language_ops)
9437 <apply_frame_filter>: Change type of "flags".
9438
6893c19a
TT
94392018-02-26 Tom Tromey <tom@tromey.com>
9440
9441 PR python/16497:
9442 * stack.c (backtrace_command_1): Set PRINT_MORE_FRAMES flag. Fix
9443 off-by-one in py_end computation.
9444 * python/py-framefilter.c (gdbpy_apply_frame_filter): Handle
9445 PRINT_MORE_FRAMES.
9446 * extension.h (enum frame_filter_flags) <PRINT_MORE_FRAMES>: New
9447 constant.
9448
2ddeaf8a
TT
94492018-02-26 Tom Tromey <tom@tromey.com>
9450
9451 * dwarf2read.c (struct variant_field): New.
9452 (struct nextfield) <variant>: New field.
9453 (dwarf2_add_field): Handle DW_TAG_variant_part.
9454 (dwarf2_attach_fields_to_type): Attach a discriminant_info to a
9455 discriminated union.
9456 (read_structure_type): Handle DW_TAG_variant_part.
9457 (handle_struct_member_die): New function, extracted from
9458 process_structure_scope. Handle DW_TAG_variant.
9459 (process_structure_scope): Handle discriminated unions. Call
9460 handle_struct_member_die.
9461
c9317f21
TT
94622018-02-26 Tom Tromey <tom@tromey.com>
9463
9464 * rust-lang.h (rust_last_path_segment): Declare.
9465 * rust-lang.c (rust_last_path_segment): Now public. Change
9466 contract.
9467 (struct disr_info): Remove.
9468 (RUST_ENUM_PREFIX, RUST_ENCODED_ENUM_REAL)
9469 (RUST_ENCODED_ENUM_HIDDEN, rust_union_is_untagged)
9470 (rust_get_disr_info, rust_tuple_variant_type_p): Remove.
9471 (rust_enum_p, rust_enum_variant): New function.
9472 (rust_underscore_fields): Remove "offset" parameter.
9473 (rust_print_enum): New function.
9474 (rust_val_print) <TYPE_CODE_UNION>: Remove enum code.
9475 <TYPE_CODE_STRUCT>: Call rust_print_enum when appropriate.
9476 (rust_print_struct_def): Add "for_rust_enum" parameter. Handle
9477 enums.
9478 (rust_internal_print_type): New function, from rust_print_type.
9479 Remove enum code.
9480 (rust_print_type): Call rust_internal_print_type.
9481 (rust_evaluate_subexp) <STRUCTOP_ANONYMOUS, STRUCTOP_STRUCT>:
9482 Update enum handling.
9483 * dwarf2read.c (struct dwarf2_cu) <rust_unions>: New field.
9484 (rust_fully_qualify, alloc_discriminant_info, quirk_rust_enum)
9485 (rust_union_quirks): New functions.
9486 (process_full_comp_unit, process_full_type_unit): Call
9487 rust_union_quirks.
9488 (process_structure_scope): Update rust_unions if necessary.
9489
7c22600a
TT
94902018-02-26 Tom Tromey <tom@tromey.com>
9491
9492 * value.h (value_union_variant): Declare.
9493 * valops.c (value_union_variant): New function.
9494 * gdbtypes.h (TYPE_FLAG_DISCRIMINATED_UNION): New macro.
9495 (struct discriminant_info): New.
9496 (enum dynamic_prop_node_kind) <DYN_PROP_DISCRIMINATED>: New
9497 enumerator.
9498 (struct main_type) <flag_discriminated_union>: New field.
9499
15ce8941
TT
95002018-02-26 Tom Tromey <tom@tromey.com>
9501
9502 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9503 unittests/unpack-selftests.c.
9504 * unittests/unpack-selftests.c: New file.
9505 * value.c (unpack_bits_as_long): Fix bugs in non-bitfield cases.
9506
48fbe735
YQ
95072018-02-26 Yao Qi <yao.qi@linaro.org>
9508
9509 * dwarf2read.c (struct partial_die_info) <read>: New method.
9510 (read_partial_die): Remove the declaration.
9511 (load_partial_dies): Update.
9512 (partial_die_info::partial_die_info):
9513 (read_partial_die): Change it to partial_die_info::read.
9514
52356b79
YQ
95152018-02-26 Yao Qi <yao.qi@linaro.org>
9516
9517 * dwarf2read.c (struct partial_die_info) <fixup>: New method.
9518 (fixup_partial_die): Remove declaration.
9519 (scan_partial_symbols): Update.
9520 (partial_die_parent_scope): Likewise.
9521 (partial_die_full_name): Likewise.
9522 (fixup_partial_die): Change it to partial_die_info::fixup.
9523
35cc7ed7
YQ
95242018-02-26 Yao Qi <yao.qi@linaro.org>
9525
9526 * dwarf2read.c (read_partial_die): Update the declaration.
9527 (load_partial_dies): Caller update.
9528 (read_partial_die): Remove one argument abbrev_len.
9529
6f06d47b
YQ
95302018-02-26 Yao Qi <yao.qi@linaro.org>
9531
9532 * dwarf2read.c (struct partial_die_info): Add ctor, delete
9533 assignment operator.
9534 (load_partial_dies): Use ctor and copy ctor.
9535 (read_partial_die): Update.
9536 (dwarf2_cu::find_partial_die): Use ctor.
9537
d590ff25
YQ
95382018-02-26 Yao Qi <yao.qi@linaro.org>
9539
9540 * dwarf2read.c (struct dwarf2_cu) <find_partial_die>: New method.
9541 (find_partial_die_in_comp_unit): Change it to
9542 dwarf2_cu::find_partial_die.
9543 (find_partial_die): Update.
9544
fd0a254f
YQ
95452018-02-26 Yao Qi <yao.qi@linaro.org>
9546
9547 * dwarf2read.c (read_partial_die): Remove the code checking abbrev
9548 is NULL.
9549
cd9983dd
YQ
95502018-02-26 Yao Qi <yao.qi@linaro.org>
9551
9552 * dwarf2read.c (load_partial_dies): Move the location of XOBNEW.
9553
f46cd62a
AH
95542018-02-26 Alan Hayward <alan.hayward@arm.com>
9555
9556 * arch/amd64.h: Use common/tdesc.h.
9557 * arch/i386.c: Likewise.
9558 * arch/i386.h: Likewise.
9559 * arch/tic6x.c: Likewise.
9560 * arch/tdesc.h: Move file from here...
9561 * common/tdesc.h: ...to here.
9562 * features/aarch64-core.c: Regenerate.
9563 * features/aarch64-fpu.c: Regenerate.
9564 * features/i386/32bit-avx.c: Regenerate.
9565 * features/i386/32bit-avx512.c: Regenerate.
9566 * features/i386/32bit-core.c: Regenerate.
9567 * features/i386/32bit-linux.c: Regenerate.
9568 * features/i386/32bit-mpx.c: Regenerate.
9569 * features/i386/32bit-pkeys.c: Regenerate.
9570 * features/i386/32bit-sse.c: Regenerate.
9571 * features/i386/64bit-avx.c: Regenerate.
9572 * features/i386/64bit-avx512.c: Regenerate.
9573 * features/i386/64bit-core.c: Regenerate.
9574 * features/i386/64bit-linux.c: Regenerate.
9575 * features/i386/64bit-mpx.c: Regenerate.
9576 * features/i386/64bit-pkeys.c: Regenerate.
9577 * features/i386/64bit-segments.c: Regenerate.
9578 * features/i386/64bit-sse.c: Regenerate.
9579 * features/i386/x32-core.c: Regenerate.
9580 * features/tic6x-c6xp.c: Regenerate.
9581 * features/tic6x-core.c: Regenerate.
9582 * features/tic6x-gp.c: Regenerate.
9583 * target-descriptions.c: Use common/tdesc.h.
9584 * target-descriptions.h: Likewise.
9585
9b292f68
TT
95862018-02-24 Tom Tromey <tom@tromey.com>
9587
9588 * linux-thread-db.c (try_thread_db_load_from_pdir_1)
9589 (try_thread_db_load_from_dir, thread_db_load_search): Use
9590 std::string.
9591 (info_auto_load_libthread_db_compare): Return bool. Change
9592 argument types.
9593 (info_auto_load_libthread_db): Use std::vector, std::string.
9594 Remove cleanups.
9595
281d762b
TT
95962018-02-24 Tom Tromey <tom@tromey.com>
9597
9598 * i386-tdep.c (i386_fast_tracepoint_valid_at): "msg" now a
9599 std::string.
9600 * gdbarch.sh (fast_tracepoint_valid_at): Change "msg" to a
9601 std::string*.
9602 * gdbarch.c: Rebuild.
9603 * gdbarch.h: Rebuild.
9604 * breakpoint.c (check_fast_tracepoint_sals): Use std::string.
9605 * arch-utils.h (default_fast_tracepoint_valid_at): Update.
9606 * arch-utils.c (default_fast_tracepoint_valid_at): "msg" now a
9607 std::string*.
9608
9d8780f0
SM
96092018-02-23 Simon Marchi <simon.marchi@polymtl.ca>
9610
9611 * gdbtypes.h (sect_offset): Change type to uint64_t.
9612 (sect_offset_str): New function.
9613 * dwarf2read.c (create_addrmap_from_aranges): Use
9614 sect_offset_str.
9615 (error_check_comp_unit_head): Likewise.
9616 (create_debug_type_hash_table): Likewise.
9617 (read_cutu_die_from_dwo): Likewise.
9618 (init_cutu_and_read_dies): Likewise.
9619 (init_cutu_and_read_dies_no_follow): Likewise.
9620 (process_psymtab_comp_unit_reader): Likewise.
9621 (partial_die_parent_scope): Likewise.
9622 (peek_die_abbrev): Likewise.
9623 (process_queue): Likewise.
9624 (dwarf2_physname): Likewise.
9625 (read_namespace_alias): Likewise.
9626 (read_import_statement): Likewise.
9627 (create_dwo_cu_reader): Likewise.
9628 (create_cus_hash_table): Likewise.
9629 (lookup_dwo_cutu): Likewise.
9630 (inherit_abstract_dies): Likewise.
9631 (read_func_scope): Likewise.
9632 (read_call_site_scope): Likewise.
9633 (dwarf2_add_member_fn): Likewise.
9634 (read_common_block): Likewise.
9635 (read_module_type): Likewise.
9636 (read_typedef): Likewise.
9637 (read_subrange_type): Likewise.
9638 (load_partial_dies): Likewise.
9639 (read_partial_die): Likewise.
9640 (find_partial_die): Likewise.
9641 (read_str_index): Likewise.
9642 (dwarf2_string_attr): Likewise.
9643 (build_error_marker_type): Likewise.
9644 (lookup_die_type): Likewise.
9645 (dump_die_shallow): Likewise.
9646 (follow_die_ref): Likewise.
9647 (dwarf2_fetch_die_loc_sect_off): Likewise.
9648 (dwarf2_fetch_constant_bytes): Likewise.
9649 (follow_die_sig): Likewise.
9650 (get_signatured_type): Likewise.
9651 (get_DW_AT_signature_type): Likewise.
9652 (dwarf2_find_containing_comp_unit): Likewise.
9653 (set_die_type): Likewise.
9654
8ec57239
JB
96552018-02-21 John Baldwin <jhb@FreeBSD.org>
9656
9657 * arch/aarch64.c: Include "common-defs.h".
9658 * arch/amd64.c: Likewise.
9659 * arch/i386.c: Likewise.
9660
3eac2b65
TT
96612018-02-21 Tom Tromey <tom@tromey.com>
9662
9663 * value.h: (extract_field_op): Update.
9664 * eval.c (extract_field_op): Return a const char *.
9665 * expression.h (parse_expression_for_completion): Update.
9666 * completer.c (complete_expression): Update.
9667 (add_struct_fields): Make fieldname const.
9668 * parse.c (expout_completion_name): Now a unique_xmalloc_ptr.
9669 (mark_completion_tag, parse_exp_in_context_1): Update.
9670 (parse_expression_for_completion): Change "name" to
9671 unique_xmalloc_ptr*.
9672
6ccb583f
TT
96732018-02-21 Tom Tromey <tom@tromey.com>
9674
9675 * infcall.c (call_function_by_hand_dummy): Use std::vector.
9676
c113ed0c
YQ
96772018-02-21 Yao Qi <yao.qi@linaro.org>
9678
9679 * avr-tdep.c (avr_read_pc): Change parameter type to
9680 readable_regcache.
9681 * gdbarch.sh (read_pc): Likewise.
9682 * gdbarch.c: Re-generated.
9683 * gdbarch.h: Re-generated.
9684 * hppa-tdep.c (hppa_read_pc): Change parameter type to
9685 readable_regcache.
9686 * ia64-tdep.c (ia64_read_pc): Likewise.
9687 * mips-tdep.c (mips_read_pc): Likewise.
9688 * spu-tdep.c (spu_read_pc): Likewise.
9689
4c74fe6b
YQ
96902018-02-21 Yao Qi <yao.qi@linaro.org>
9691
9692 * Makefile.in (COMMON_SFILES): Add regcache-dump.c
9693 * regcache-dump.c: New file.
9694 * regcache.c: Move register_dump to regcache-dump.c.
9695 (maintenance_print_registers): Likewise.
9696 (maintenance_print_raw_registers): Likewise.
9697 (maintenance_print_cooked_registers): Likewise.
9698 (maintenance_print_register_groups): Likewise.
9699 (maintenance_print_remote_registers): Likewise.
9700 (_initialize_regcache): Likewise.
9701 * regcache.h (register_dump): Moved from regcache.c.
9702
796bb026
YQ
97032018-02-21 Yao Qi <yao.qi@linaro.org>
9704
9705 * regcache.c (regcache::regcache): Update.
9706 (regcache::invalidate): Move it to detached_regcache::invalidate.
9707 (get_thread_arch_aspace_regcache): Update.
9708 (regcache::raw_update): Update.
9709 (regcache::cooked_read): Remove some code.
9710 (regcache::cooked_read_value): Likewise.
9711 (regcache::raw_write): Remove assert on m_readonly_p.
9712 (regcache::raw_supply_integer): Move it to
9713 detached_regcache::raw_supply_integer.
9714 (regcache::raw_supply_zeroed): Likewise.
9715 * regcache.h (detached_regcache) <raw_supply_integer>: New
9716 declaration.
9717 <raw_supply_zeroed, invalidate>: Likewise.
9718 (regcache) <raw_supply_integer, raw_supply_zeroed>: Removed.
9719 <invalidate>: Likewise.
9720 <m_readonly_p>: Removed.
9721
215c69dc
YQ
97222018-02-21 Yao Qi <yao.qi@linaro.org>
9723
9724 * infcmd.c (get_return_value): Let stop_regs point to
9725 get_current_regcache.
9726 * regcache.c (regcache::regcache): Remove.
9727 (register_dump_reg_buffer): New class.
9728 (regcache_print): Adjust.
9729 * regcache.h (regcache): Remove constructors.
9730
f3384e66
YQ
97312018-02-21 Yao Qi <yao.qi@linaro.org>
9732
9733 * regcache.c (class register_dump): New class.
9734 (register_dump_regcache, register_dump_none): New class.
9735 (register_dump_remote, register_dump_groups): New class.
9736 (regcache_print): Update.
9737 * regcache.h (regcache_dump_what): Move it to regcache.c.
9738 (regcache) <dump>: Remove.
9739
c8ec2f33
YQ
97402018-02-21 Yao Qi <yao.qi@linaro.org>
9741
9742 * jit.c (struct jit_unwind_private) <regcache>: Change its type to
9743 reg_buffer_rw *.
9744 (jit_unwind_reg_set_impl): Call raw_supply.
9745 (jit_frame_sniffer): Use reg_buffer_rw.
9746 * record-full.c (record_full_core_regbuf): Change its type.
9747 (record_full_core_open_1): Use reg_buffer_rw.
9748 (record_full_close): Likewise.
9749 (record_full_core_fetch_registers): Use regcache->raw_supply.
9750 (record_full_core_store_registers): Likewise.
9751 * regcache.c (regcache::get_register_status): Move it to
9752 reg_buffer.
9753 (regcache_raw_set_cached_value): Remove.
9754 (regcache::raw_set_cached_value): Remove.
9755 (regcache::raw_write): Call raw_supply.
9756 (regcache::raw_supply): Move it to reg_buffer_rw.
9757 * regcache.h (regcache_raw_set_cached_value): Remove.
9758 (reg_buffer_rw): New class.
9759
daf6667d
YQ
97602018-02-21 Yao Qi <yao.qi@linaro.org>
9761
9762 * dummy-frame.c (dummy_frame_cache) <prev_regcache>: Use
9763 readonly_detached_regcache.
9764 (dummy_frame_prev_register): Use regcache->cooked_read.
9765 * frame.c (frame_save_as_regcache): Change return type.
9766 (frame_pop): Update.
9767 * frame.h (frame_save_as_regcache): Update declaration.
9768 * inferior.h (get_infcall_suspend_state_regcache): Update
9769 declaration.
9770 * infrun.c (infcall_suspend_state) <registers>: use
9771 readonly_detached_regcache.
9772 (save_infcall_suspend_state): Don't use regcache_dup.
9773 (get_infcall_suspend_state_regcache): Change return type.
9774 * linux-fork.c (struct fork_info) <savedregs>: Change to
9775 readonly_detached_regcache.
9776 <pc>: New field.
9777 (fork_save_infrun_state): Don't use regcache_dup.
9778 (info_checkpoints_command): Adjust.
9779 * mi/mi-main.c (register_changed_p): Update declaration.
9780 (mi_cmd_data_list_changed_registers): Use
9781 readonly_detached_regcache.
9782 (register_changed_p): Change parameter type to
9783 readonly_detached_regcache.
9784 * ppc-linux-tdep.c (ppu2spu_cache) <regcache>: Use
9785 readonly_detached_regcache.
9786 (ppu2spu_sniffer): Construct a new readonly_detached_regcache.
9787 * regcache.c (readonly_detached_regcache::readonly_detached_regcache):
9788 New.
9789 (regcache::save): Move it to reg_buffer.
9790 (regcache::restore): Change parameter type.
9791 (regcache_dup): Remove.
9792 * regcache.h (reg_buffer) <save>: New method.
9793 (readonly_detached_regcache): New class.
9794 * spu-tdep.c (spu2ppu_cache) <regcache>: Use
9795 readonly_detached_regcache.
9796 (spu2ppu_sniffer): Construct a new readonly_detached_regcache.
9797
fc5b8736
YQ
97982018-02-21 Yao Qi <yao.qi@linaro.org>
9799
9800 * frame.c (frame_save_as_regcache): Use regcache method save.
9801 (frame_pop): Use regcache method restore.
9802 * infrun.c (restore_infcall_suspend_state): Likewise.
9803 * linux-fork.c (fork_load_infrun_state): Likewise.
9804 * ppc-linux-tdep.c (ppu2spu_sniffer): User regcache method
9805 save.
9806 * regcache.c (regcache_save): Remove.
9807 (regcache::restore): More asserts.
9808 (regcache_cpy): Remove.
9809 * regcache.h (regcache_save): Remove the declaration.
9810 (regcache::restore): Move from private to public.
9811 Remove the friend declaration of regcache_cpy.
9812 (regcache_cpy): Remove declaration.
9813
849d0ba8
YQ
98142018-02-21 Yao Qi <yao.qi@linaro.org>
9815
9816 * aarch64-tdep.c (aarch64_pseudo_register_read_value): Change
9817 parameter type to 'readable_regcache *'.
9818 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
9819 * arm-tdep.c (arm_neon_quad_read): Likewise.
9820 (arm_pseudo_read): Likewise.
9821 * avr-tdep.c (avr_pseudo_register_read): Likewise.
9822 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
9823 * frv-tdep.c (frv_pseudo_register_read): Likewise.
9824 * gdbarch.c: Re-generated.
9825 * gdbarch.h: Re-generated.
9826 * gdbarch.sh (pseudo_register_read): Change parameter type to
9827 'readable_regcache *'.
9828 (pseudo_register_read_value): Likewise.
9829 * h8300-tdep.c (pseudo_from_raw_register): Likewise.
9830 (h8300_pseudo_register_read): Likewise.
9831 * hppa-tdep.c (hppa_pseudo_register_read): Likewise.
9832 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
9833 (i386_pseudo_register_read_into_value): Likewise.
9834 (i386_pseudo_register_read_value): Likewise.
9835 * i386-tdep.h (i386_pseudo_register_read_into_value): Update
9836 declaration.
9837 * ia64-tdep.c (ia64_pseudo_register_read): Likewise.
9838 * m32c-tdep.c (m32c_raw_read): Likewise.
9839 (m32c_read_flg): Likewise.
9840 (m32c_banked_register): Likewise.
9841 (m32c_banked_read): Likewise.
9842 (m32c_sb_read): Likewise.
9843 (m32c_part_read): Likewise.
9844 (m32c_cat_read): Likewise.
9845 (m32c_r3r2r1r0_read): Likewise.
9846 (m32c_pseudo_register_read): Likewise.
9847 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
9848 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
9849 (mep_pseudo_cr64_read): Likewise.
9850 (mep_pseudo_register_read): Likewise.
9851 * mips-tdep.c (mips_pseudo_register_read): Likewise.
9852 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
9853 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
9854 * regcache.c (regcache::raw_read): Move it to readable_regcache.
9855 (regcache::cooked_read): Likewise.
9856 (regcache::cooked_read_value): Likewise.
9857 (regcache_cooked_read_signed):
9858 (regcache::cooked_read): Likewise.
9859 * regcache.h (readable_regcache): New class.
9860 (regcache): Inherit readable_regcache. Move some methods to
9861 readable_regcache.
9862 * rl78-tdep.c (rl78_pseudo_register_read): Change
9863 parameter type to 'readable_regcache *'.
9864 * rs6000-tdep.c (do_regcache_raw_read): Remove.
9865 (e500_pseudo_register_read): Change parameter type to
9866 'readable_regcache *'.
9867 (dfp_pseudo_register_read): Likewise.
9868 (vsx_pseudo_register_read): Likewise.
9869 (efpr_pseudo_register_read): Likewise.
9870 * s390-tdep.c (s390_pseudo_register_read): Likewise.
9871 * sh-tdep.c (sh_pseudo_register_read): Likewise.
9872 * sh64-tdep.c (pseudo_register_read_portions): Likewise.
9873 (sh64_pseudo_register_read): Likewise.
9874 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
9875 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
9876 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
9877 (spu_pseudo_register_read): Likewise.
9878 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
9879 (xtensa_pseudo_register_read): Likewise.
9880
31716595
YQ
98812018-02-21 Yao Qi <yao.qi@linaro.org>
9882
9883 * regcache.c (regcache::regcache): Call reg_buffer ctor.
9884 (regcache::arch): Move it to reg_buffer::arch.
9885 (regcache::register_buffer): Likewise.
9886 (regcache::assert_regnum): Likewise.
9887 (regcache::num_raw_registers): Likewise.
9888 * regcache.h (reg_buffer): New class.
9889 (regcache): Inherit reg_buffer.
9890
7104e59b
SM
98912018-02-20 Simon Marchi <simon.marchi@ericsson.com>
9892
9893 * remote-sim.c (gdb_os_printf_filtered, gdb_os_vprintf_filtered,
9894 gdb_os_evprintf_filtered, gdb_os_error): Add ATTRIBUTE_PRINTF.
9895
2d8adcbd
MM
98962018-02-20 Markus Metzger <markus.t.metzger@intel.com>
9897
9898 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add mkstemp.
9899
b5884fa7
AH
99002018-02-19 Alan Hayward <alan.hayward@arm.com>
9901
9902 * Makefile.in: (COMMON_SFILES): Add common/*.c files.
9903 (SFILES): Remove common/*.c files.
9904 (COMMON_OBS): Remove some *.o files built from common/*.c files.
9905 * common/common.host: Add common reference.
9906 * configure.ac: Likewise.
9907 * configure: Regenerate.
9908
fd90ace4
YQ
99092018-02-16 Yao Qi <yao.qi@linaro.org>
9910
9911 * block.c (block_namespace_info): Inherit allocate_on_obstack.
9912 (block_initialize_namespace): Use new.
9913 * dwarf2read.c (dwarf2_per_objfile): Inherit allocate_on_obstack.
9914 (dwarf2_free_objfile): Use delete.
9915 * gdbtypes.c (type_pair): Inherit allocate_on_obstack.
9916 (copy_type_recursive): Use new.
9917 * gdb_obstack.h (allocate_on_obstack): New.
9918
85046ae2
YQ
99192018-02-15 Yao Qi <yao.qi@linaro.org>
9920
9921 PR gdb/22849
9922 * inferior.c (exit_inferior_1): Reset inf->control.
9923
355c559b
JB
99242018-02-15 Joel Brobecker <brobecker@adacore.com>
9925
9926 * ada-lang.c (ada_to_fixed_value_create): Delete advance
9927 declaration.
9928
980548fd
PA
99292018-02-14 Pedro Alves <palves@redhat.com>
9930
9931 * frame-unwind.c (frame_unwind_try_unwinder): Always call
9932 frame_cleanup_after_sniffer on exception.
9933
692d6f97
TT
99342018-02-14 Tom Tromey <tom@tromey.com>
9935
9936 * solist.h (struct target_so_ops) <bfd_open>: Make pathname
9937 const.
9938 (solib_bfd_open): Make pathname const.
9939 * solib.c (solib_bfd_open): Make pathname const.
9940 * solib-spu.c (spu_bfd_fopen): Make name const.
9941 (spu_bfd_open): Make pathname const.
9942 * solib-darwin.c (darwin_bfd_open): Make pathname const.
9943 * solib-aix.c (solib_aix_bfd_open): Make pathname const.
9944
e0cc99a6
TT
99452018-02-14 Tom Tromey <tom@tromey.com>
9946
9947 * symfile.c (symfile_bfd_open): Update.
9948 * source.h (openp, source_full_path_of, find_and_open_source):
9949 Change argument type to unique_xmalloc_ptr.
9950 * source.c (openp): Take a unique_xmalloc_ptr.
9951 (source_full_path_of, find_and_open_source): Likewise.
9952 (open_source_file, symtab_to_fullname): Update.
9953 * solist.h (struct target_so_ops) <find_and_open_solib>: Take a
9954 unique_xmalloc_ptr.
9955 * solib.c (solib_find_1): Use unique_xmalloc_ptr.
9956 (exec_file_find): Update.
9957 * psymtab.c (psymtab_to_fullname): Update.
9958 * nto-tdep.h (nto_find_and_open_solib): Update.
9959 * nto-tdep.c (nto_find_and_open_solib): Change temp_path to a
9960 unique_xmalloc_ptr.
9961 * exec.c (exec_file_attach): Update.
9962 * dwarf2read.c (try_open_dwop_file): Use unique_xmalloc_ptr.
9963 * cli/cli-cmds.c (find_and_open_script): Use unique_xmalloc_ptr.
9964
b46a8d7c
TT
99652018-02-14 Tom Tromey <tom@tromey.com>
9966
9967 * solib.c: Include source.h.
9968 * nto-tdep.c: Include source.h.
9969 * mi/mi-cmd-env.c: Include source.h.
9970 * infcmd.c: Include source.h.
9971 * exec.c: Include source.h.
9972 * defs.h (enum openp_flag, openp, source_full_path_of, mod_path)
9973 (add_path, directory_switch, source_path, init_source_path): Move
9974 declarations...
9975 * source.h (enum openp_flag, openp, source_full_path_of, mod_path)
9976 (add_path, directory_switch, source_path, init_source_path):
9977 ...here.
9978
797bc1cb
TT
99792018-02-14 Tom Tromey <tom@tromey.com>
9980
9981 * solist.h (exec_file_find, solib_find): Return
9982 unique_xmalloc_ptr.
9983 (solib_bfd_fopen): Take a const char *.
9984 * solib.c (solib_find_1): Return unique_xmalloc_ptr.
9985 (exec_file_find, solib_find): Likewise.
9986 (solib_bfd_fopen): Do not take ownership of "pathname".
9987 (solib_bfd_open): Use unique_xmalloc_ptr.
9988 * solib-darwin.c (darwin_bfd_open): Use unique_xmalloc_ptr.
9989 * solib-aix.c (solib_aix_bfd_open): Use unique_xmalloc_ptr.
9990 * infrun.c (follow_exec): Use unique_xmalloc_ptr.
9991 * exec.c (exec_file_locate_attach): Use unique_xmalloc_ptr.
9992
f98b2e33
JB
99932018-02-14 Joel Brobecker <brobecker@adacore.com>
9994
9995 * ada-lang.c (name_match_type_from_name): Remove reference to
9996 ada_name_for_lookup in function's documentation.
9997 * ada-lang.h (ada_name_for_lookup): Delete declaration.
9998
24b9144d
SM
99992018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10000
10001 * defs.h (enum openp_flags): New enum.
10002 (OPF_TRY_CWD_FIRST, OPF_SEARCH_IN_PATH, OPF_RETURN_REALPATH):
10003 Move to enum openp_flags.
10004 (openp_flags): New enum flags.
10005 (openp): Change parameter type to openp_flags.
10006 * source.c (openp): Change parameter type to openp_flags.
10007 * cli/cli-cmds.c (find_and_open_script): Use openp_flags.
10008 * dwarf2read.c (try_open_dwop_file): Use openp_flags.
10009
387cd15b
SM
100102018-02-13 Simon Marchi <simon.marchi@polymtl.ca>
10011
10012 * maint.c (_initialize_maint_cmds): Fix prefix of maint set/show
10013 per-command.
10014
b303c6f6
AB
100152018-02-12 Andrew Burgess <andrew.burgess@embecosm.com>
10016
10017 * dwarf2read.c (dwarf2_release_queue): Delete function, move body
10018 into...
10019 (class dwarf2_queue_guard): ...the destructor of this new class.
10020 (dw2_do_instantiate_symtab): Create instance of the new class
10021 dwarf2_queue_guard, remove cleanup.
10022
9c3630e9
TT
100232018-02-09 Tom Tromey <tom@tromey.com>
10024
10025 * source.c (find_source_lines): Don't reference past the end of
10026 the vector.
10027
c4e12631
MM
100282018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10029
10030 * remote.c (remote_btrace_maybe_reopen): Change error message.
10031 * btrace.c (btrace_enable): Likewise.
10032 (parse_xml_btrace): Likewise.
10033 (parse_xml_btrace_conf): Likewise.
10034
88711fbf
MM
100352018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10036
10037 * nat/linux-btrace.c (diagnose_perf_event_open_fail): New.
10038 (linux_enable_pt, linux_enable_bts): Call
10039 diagnose_perf_event_open_fail.
10040
17ad2a4f
MM
100412018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10042
10043 * nat/linux-btrace.c (perf_event_pt_event_type): Improve error message.
10044 Remove parameter and change return type. Update callers. Move it.
10045 (linux_enable_bts, linux_enable_pt): Improve error message.
10046 (linux_enable_pt): Remove zero buffer size check.
10047 (linux_enable_btrace): Improve error messages. Remove NULL return
10048 check.
10049
de6242d3
MM
100502018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10051
10052 * btrace.c (btrace_enable): Remove target_supports_btrace call.
10053 * nat/linux-btrace.c (perf_event_pt_event_type): Move.
10054 (kernel_supports_bts, kernel_supports_pt, linux_supports_bts)
10055 (linux_supports_pt, linux_supports_btrace): Remove.
10056 (linux_enable_bts): Call cpu_supports_bts.
10057 * nat/linux-btrace.h (linux_supports_btrace): Remove.
10058 * remote.c (remote_supports_btrace): Remove.
10059 (init_remote_ops): Remove remote_supports_btrace.
10060 * target-delegates.c: Regenerated.
10061 * target.c (target_supports_btrace): Remove.
10062 * target.h (target_ops) <to_supports_btrace>: Remove
10063 (target_supports_btrace): Remove.
10064 * x86-linux-nat.c (x86_linux_create_target): Remove
10065 linux_supports_btrace.
10066
9ee23a85
MM
100672018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10068
10069 * nat/linux-btrace.c (linux_enable_btrace): Throw exception if enabling
10070 btrace failed.
10071 * x86-linux-nat.c (x86_linux_enable_btrace): Catch btrace enabling
10072 exception and use message in own exception.
10073
5c3284c1
MM
100742018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10075
10076 * nat/linux-btrace.c: Include scoped_fd.h and scoped_mmap.h.
10077 (perf_event_pt_event_type): Use gdb_file_up.
10078 (linux_enable_bts, linux_enable_pt): Use gdb::unique_xmalloc_ptr,
10079 scoped_fd, and scoped_mmap.
10080
84696f37
MM
100812018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10082
10083 * common/scoped_mmap.h: New.
10084 * unittests/scoped_mmap-selftest.c: New.
10085 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10086 unittests/scoped_mmap-selftest.c.
10087
ea4a0888
MM
100882018-02-09 Markus Metzger <markus.t.metzger@intel.com>
10089
10090 * common/scoped_fd.h: New.
10091 * unittests/scoped_fd-selftest.c: New.
10092 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
10093 unittests/scoped_fd-selftest.c.
10094
869e8290
TT
100952018-02-09 Tom Tromey <tom@tromey.com>
10096
10097 * auto-load.c (auto_load_section_scripts): Use
10098 gdb::unique_xmalloc_ptr.
10099
a37a2ae7
TT
101002018-02-09 Tom Tromey <tom@tromey.com>
10101
10102 * auto-load.c (execute_script_contents): Use std::string.
10103
4e725347
JB
101042018-02-09 Joel Brobecker <brobecker@adacore.com>
10105
10106 * NEWS <Changes in GDB 8.1>: Clarify that "rbreak" is a new
10107 Python function, rather than a new command.
10108
9a897d43
TT
101092018-02-08 Tom Tromey <tom@tromey.com>
10110
10111 * solib.c (solib_find_1): Use std::string.
10112 (solib_bfd_fopen): Use unique_xmalloc_ptr.
10113
58ef3771
TT
101142018-02-08 Tom Tromey <tom@tromey.com>
10115
10116 * build-id.c (build_id_to_debug_bfd): Use unique_xmalloc_ptr.
10117
a9abc434
TT
101182018-02-08 Tom Tromey <tom@tromey.com>
10119
10120 * source.c (find_source_lines): Use gdb::def_vector.
10121
84f27c6f
TT
101222018-02-08 Tom Tromey <tom@tromey.com>
10123
10124 * macrocmd.c (struct temporary_macro_definition): New.
10125 (macro_define_command): Use temporary_macro_definition. Remove
10126 cleanups.
10127 (free_macro_definition_ptr): Remove.
10128
0354904b
TT
101292018-02-08 Tom Tromey <tom@tromey.com>
10130
10131 * macroexp.c (maybe_expand): Use std::string.
10132
1739cf24
TT
101332018-02-08 Tom Tromey <tom@tromey.com>
10134
10135 * macroexp.c (struct macro_buffer): Add initializers for some
10136 members.
10137 (init_buffer, init_shared_buffer, free_buffer)
10138 (free_buffer_return_text): Remove.
10139 (macro_buffer): New constructors.
10140 (~macro_buffer): New destructor.
10141 (macro_buffer::set_shared): New method.
10142 (macro_buffer::resize_buffer, macro_buffer::appendc)
10143 (macro_buffer::appendmem): Now methods, not free functions.
10144 (set_token, append_tokens_without_splicing, stringify)
10145 (macro_stringify): Update.
10146 (gather_arguments): Change return type. Remove argc_p argument,
10147 add args_ptr argument. Use std::vector.
10148 (substitute_args): Remove argc argument. Accept std::vector.
10149 (expand): Update. Use std::vector.
10150 (scan, macro_expand, macro_expand_next): Update.
10151
f6c2623e
TT
101522018-02-08 Tom Tromey <tom@tromey.com>
10153
10154 * symtab.c (default_collect_symbol_completion_matches_break_on):
10155 Use unique_xmalloc_ptr.
10156 * macroscope.h: (sal_macro_scope, user_macro_scope)
10157 (default_macro_scope): Return unique_xmalloc_ptr.
10158 * macroscope.c (sal_macro_scope, user_macro_scope)
10159 (default_macro_scope): Return unique_xmalloc_ptr.
10160 * macroexp.h (macro_expand, macro_expand_once): Return
10161 unique_xmalloc_ptr.
10162 * macroexp.c (macro_expand, macro_expand_once): Return
10163 unique_xmalloc_ptr.
10164 * macrocmd.c (macro_expand_command, macro_expand_once_command)
10165 (info_macro_command, info_macros_command): Use
10166 unique_xmalloc_ptr.
10167 * compile/compile-c-support.c (write_macro_definitions): Use
10168 unique_xmalloc_ptr.
10169 * c-exp.y (c_parse): Use unique_xmalloc_ptr.
10170
c2e0e465
SM
101712018-02-07 Simon Marchi <simon.marchi@ericsson.com>
10172
10173 * value.c (value_static_field): Assign field type instead of
10174 containing type when returning an optimized out value.
10175
3f8c94b4
YQ
101762018-02-06 Yao Qi <yao.qi@linaro.org>
10177
10178 * ft32-tdep.c (ft32_read_pc): Remove.
10179 (ft32_write_pc): Remove.
10180 (ft32_gdbarch_init): Update.
10181 * m32r-tdep.c (m32r_read_pc): Remove.
10182 (m32r_gdbarch_init): Update.
10183 * mep-tdep.c (mep_read_pc): Remove.
10184 (mep_gdbarch_init): Update.
10185 * microblaze-tdep.c (microblaze_write_pc): Remove.
10186 (microblaze_gdbarch_init): Update.
10187 * mn10300-tdep.c (mn10300_read_pc): Remove.
10188 (mn10300_write_pc): Remove.
10189 (mn10300_gdbarch_init): Update.
10190 * moxie-tdep.c (moxie_read_pc): Remove.
10191 (moxie_write_pc): Remove.
10192 (moxie_gdbarch_init): Update.
10193
bca65a23
YQ
101942018-02-06 Yao Qi <yao.qi@linaro.org>
10195
10196 * expprint.c (print_subexp_standard): Handle
10197 OP_F77_UNDETERMINED_ARGLIST.
10198 (dump_subexp_body_standard): Likewise.
10199
583e3f90 102002018-02-05 Alan Hayward <alan.hayward@arm.com>
b8df6ca7 10201
583e3f90
YQ
10202 * target-descriptions.c (tdesc_element_visitor) Add empty
10203 implementations.
b8df6ca7
AH
10204 (tdesc_type): Move make_gdb_type from here.
10205 (tdesc_type_builtin): Likewise.
10206 (tdesc_type_vector): Likewise.
10207 (tdesc_type_with_fields): Move make_gdb_type_ functions from here.
10208 (make_gdb_type_struct): Move from tdesc_type_with_fields.
10209 (make_gdb_type_union): Likewise.
10210 (make_gdb_type_flags): Likewise.
10211 (make_gdb_type_enum): Likewise.
10212 (make_gdb_type): New function.
10213 (tdesc_register_type): Use static make_gdb_type.
10214
e813d34a
RK
102152018-02-05 Ruslan Kabatsayev <b7.10110111@gmail.com>
10216
10217 * infcmd.c (default_print_one_register_info): Align natural-format
10218 column values consistently one under another.
10219 (pad_to_column): New function.
10220
0eb876f5
JB
102212018-02-05 Joel Brobecker <brobecker@adacore.com>
10222
10223 * dwarf2read.c (dwarf2_physname): Move commment.
10224
0625771b
LS
102252018-02-01 Leszek Swirski <leszeks@google.com>
10226
10227 * varobj.c (varobj_formatted_print_options): Allow recursive
10228 pretty printing if pretty printing is enabled.
10229
59498c30
LS
102302018-02-01 Leszek Swirski <leszeks@google.com>
10231
10232 * c-exp.y (lex_one_token, classify_name, yylex): Don't classify
10233 names after a structop as a filename.
10234
2d9e6acb
YQ
102352018-02-01 Yao Qi <yao.qi@linaro.org>
10236
10237 * arm-tdep.c (arm_record_data_proc_misc_ld_str): Rewrite it.
10238 (arm_record_coproc_data_proc): Likewise.
10239
df95a9cf
YQ
102402018-02-01 Yao Qi <yao.qi@linaro.org>
10241
10242 * arm-tdep.c (arm_record_extension_space): Change ret to signed.
10243
07e5f5cf
NP
102442018-01-31 Nikola Prica <nikola.prica@rt-rk.com>
10245
10246 * rs6000-tdep.c (skip_prologue): Remove shifting for lr_reg and
10247 assign shifted lr_reg to fdata->lr_register when lr_reg is set.
10248
3045b475
PA
102492018-01-31 Pedro Alves <palves@redhat.com>
10250
10251 * darwin-nat.c (darwin_interrupt): Remove ptid_t parameter.
10252 * inflow.c (child_terminal_save_inferior): Wrap reference to
10253 tcgetpgrp in HAVE_TERMIOS_H.
10254 (child_interrupt, child_pass_ctrlc): Wrap references to signal in
10255 _WIN32.
10256 * remote-sim.c (gdbsim_interrupt): Remove ptid_t parameter and
10257 always iterate over all inferiors.
10258 (gdbsim_cntrl_c): Adjust.
10259 * windows-nat.c (windows_interrupt): Remove 'ptid_t' parameter.
10260
929b5ad4
JB
102612018-01-31 Joel Brobecker <brobecker@adacore.com>
10262
10263 * gdbtypes.c (lookup_array_range_type): Make sure the array's
10264 index type is objfile-owned if the element type is as well.
10265
29236ca2
JB
102662018-01-31 Joel Brobecker <brobecker@adacore.com>
10267
10268 GDB 8.1 released.
10269
c81e8879
PR
102702018-01-30 Philipp Rudo <prudo@linux.vnet.ibm.com>
10271
10272 * s390-linux-tdep.c: Remove includes "features/s390-linux32.c" and
10273 "features/s390x-linux64.c".
10274 (_initialize_s390_linux_tdep): Remove initialization of tdescs
10275 s390_linux32 and s390x_linux64.
10276 (s390_linux_init_abi_31, s390_linux_init_abi_64): Don't set
10277 default tdesc.
10278 * s390-tdep.c: Include "features/s390-linux32.c" and
10279 "features/s390x-linux64.c".
10280 (s390_tdesc_valid): Add check for tdesc_has_registers.
10281 (s390_gdbarch_init): Make sure there is always a valid tdesc.
10282 (_initialize_s390_tdep): Initialize tdesc_s390_linux32 and
10283 tdesc_s390x_linux64.
10284 * s390-linux-tdep.h: Move export of tdesc_s390_linux32 and
10285 tdesc_s390x_linux64 to...
10286 * s390-tdep.h: ...here.
10287
e671cd59
PA
102882018-01-30 Pedro Alves <palves@redhat.com>
10289
10290 PR gdb/13211
10291 * config.in, configure: Regenerate.
10292 * configure.ac: Check for getpgid.
10293 * go32-nat.c (go32_pass_ctrlc): New.
10294 (go32_target): Install it.
10295 * inf-child.c (inf_child_target): Install
10296 child_terminal_save_inferior, child_pass_ctrlc and
10297 child_interrupt.
10298 * inf-ptrace.c (inf_ptrace_interrupt): Delete.
10299 (inf_ptrace_target): No longer install it.
10300 * infcmd.c (interrupt_target_1): Adjust.
10301 * inferior.h (child_terminal_save_inferior, child_pass_ctrlc)
10302 (child_interrupt): Declare.
10303 (inferior::terminal_state): New.
10304 * inflow.c (struct terminal_info): Update comments.
10305 (inferior_process_group): Delete.
10306 (terminal_is_ours): Delete.
10307 (gdb_tty_state): New.
10308 (child_terminal_init): Adjust.
10309 (is_gdb_terminal, sharing_input_terminal_1)
10310 (sharing_input_terminal): New functions.
10311 (child_terminal_inferior): Adjust. Use sharing_input_terminal.
10312 Set the process's actual process group in the foreground if
10313 possible. Handle is_ours_for_output/is_ours distinction. Don't
10314 mark terminal as the inferior's if not sharing GDB's terminal.
10315 Don't check attach_flag.
10316 (child_terminal_ours_for_output, child_terminal_ours): Adjust to
10317 pass down a target_terminal_state.
10318 (child_terminal_save_inferior): New, factored out from ...
10319 (child_terminal_ours_1): ... this. Handle
10320 target_terminal_state::is_ours_for_output.
10321 (child_interrupt, child_pass_ctrlc): New.
10322 (inflow_inferior_exit): Clear the inferior's terminal_state.
10323 (copy_terminal_info): Copy the inferior's terminal state.
10324 (_initialize_inflow): Remove reference to terminal_is_ours.
10325 * inflow.h (inferior_process_group): Delete.
10326 * nto-procfs.c (nto_handle_sigint, procfs_interrupt): Adjust.
10327 * procfs.c (procfs_target): Don't install procfs_interrupt.
10328 (procfs_interrupt): Delete.
10329 * remote.c (remote_serial_quit_handler): Adjust.
10330 (remote_interrupt): Remove ptid parameter. Adjust.
10331 * target-delegates.c: Regenerate.
10332 * target.c: Include "terminal.h".
10333 (target_terminal::terminal_state): Rename to ...
10334 (target_terminal::m_terminal_state): ... this.
10335 (target_terminal::init): Adjust.
10336 (target_terminal::inferior): Adjust to per-inferior
10337 terminal_state.
10338 (target_terminal::restore_inferior, target_terminal_is_ours_kind): New.
10339 (target_terminal::ours, target_terminal::ours_for_output): Use
10340 target_terminal_is_ours_kind.
10341 (target_interrupt): Remove ptid parameter. Adjust.
10342 (default_target_pass_ctrlc): Adjust.
10343 * target.h (target_ops::to_terminal_save_inferior): New field.
10344 (target_ops::to_interrupt): Remove ptid_t parameter.
10345 (target_interrupt): Remove ptid_t parameter. Update comment.
10346 (target_pass_ctrlc): Update comment.
10347 * target/target.h (target_terminal_state): New scoped enum,
10348 factored out of ...
10349 (target_terminal::terminal_state): ... here.
10350 (target_terminal::inferior): Update comments.
10351 (target_terminal::restore_inferior): New.
10352 (target_terminal::is_inferior, target_terminal::is_ours)
10353 (target_terminal::is_ours_for_output): Adjust.
10354 (target_terminal::scoped_restore_terminal_state): Adjust to
10355 rename, and call restore_inferior() instead of inferior().
10356 (target_terminal::scoped_restore_terminal_state::m_state): Change
10357 type.
10358 (target_terminal::terminal_state): Rename to ...
10359 (target_terminal::m_terminal_state): ... this and change type.
10360
9c3a5d93
PA
103612018-01-30 Pedro Alves <palves@redhat.com>
10362
10363 * linux-nat.c (wait_for_signal): New function.
10364 (wait_lwp, linux_nat_wait_1): Use it instead of calling sigsuspend
10365 directly.
10366 (async_terminal_is_ours)
10367 (linux_nat_terminal_inferior, linux_nat_terminal_ours): Delete.
10368 (linux_nat_add_target): Don't override
10369 to_terminal_inferior/to_terminal_ours.
10370
69ab5edb
SDJ
103712018-01-29 Sergio Durigan Junior <sergiodj@redhat.com>
10372
10373 * remote.c (remote_follow_fork): Don't call "detach_inferior".
10374
fc8e7e75
SM
103752018-01-28 Simon Marchi <simon.marchi@ericsson.com>
10376
10377 * dwarf2read.c (free_dwo_files): Add forward-declaration.
10378 (dwarf2_per_objfile::~dwarf2_per_objfile): Move content from
10379 dwarf2_per_objfile_free here.
10380 (dwarf2_per_objfile_free): Remove.
10381 (_initialize_dwarf2_read): Don't register
10382 dwarf2_per_objfile_free as a registry cleanup.
10383
b2a426e2
EZ
103842018-01-27 Eli Zaretskii <eliz@gnu.org>
10385
10386 Avoid compilation errors in MinGW native builds
10387
10388 The error is triggered by including python-internal.h, and the
10389 error message is:
10390
10391 In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
10392 from build-gnulib/import/math.h:27,
10393 from d:/usr/Python26/include/pyport.h:235,
10394 from d:/usr/Python26/include/Python.h:58,
10395 from python/python-internal.h:94,
10396 from python/py-arch.c:24:
10397 d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
10398 using ::hypot;
10399 ^~~~~
10400
10401 This happens because Python headers define 'hypot' to expand t
10402 '_hypot' in the Windows builds.
10403 * python/python-internal.h (_hypot) [__MINGW32__]: Define back to
10404 'hypoth'. This avoids a compilation error.
10405
0bdd8eac
AH
104062018-01-26 Alan Hayward <alan.hayward@arm.com>
10407
10408 * MAINTAINERS (Write After Approval): Fix ordering.
10409
56ae9dc3
AH
104102018-01-26 Alan Hayward <alan.hayward@arm.com>
10411
10412 * MAINTAINERS (Write After Approval): Add Alan Hayward.
10413
7433498b
AM
104142018-01-26 Alan Modra <amodra@gmail.com>
10415
10416 * ppc-linux-tdep.c (powerpc32_plt_stub): Make const.
10417 (powerpc32_plt_stub_so_1): Rename from powerpc32_plt_stub_so.
10418 Remove nop. Make const. Comment.
10419 (powerpc32_plt_stub_so_2): New.
10420 (POWERPC32_PLT_CHECK_LEN): Rename from POWERPC32_PLT_STUB_LEN.
10421 Correct count. Update uses.
10422 (ppc_skip_trampoline_code): Match powerpc32_plt_stub_so_2 too.
10423 Move common code reading PLT entry word. Correct
10424 powerpc32_plt_stub PLT address calculation.
10425 * ppc64-tdep.c (ppc64_standard_linkage1): Make const.
10426 (ppc64_standard_linkage2, ppc64_standard_linkage3): Likewise.
10427 (ppc64_standard_linkage4, ppc64_standard_linkage5): Likewise.
10428 (ppc64_standard_linkage6, ppc64_standard_linkage7): Likewise.
10429 (ppc64_standard_linkage8): Likewise.
10430 * rs6000-tdep.c (ppc_insns_match_pattern): Make pattern const.
10431 Correct insns description.
10432 * ppc-tdep.h (ppc_insns_match_pattern): Update prototype.
10433
0f59d5fc
PA
104342018-01-24 Pedro Alves <palves@redhat.com>
10435
10436 GCC PR libstdc++/83906
10437 * gdbtypes.c (operator==(const dynamic_prop &,
10438 const dynamic_prop &)): New.
10439 (operator==(const range_bounds &, const range_bounds &)): New.
10440 (check_types_equal): Use them instead of memcmp.
10441 * gdbtypes.h (operator==(const dynamic_prop &,
10442 const dynamic_prop &)): Declare.
10443 (operator!=(const dynamic_prop &, const dynamic_prop &)): Declare.
10444 (operator==(const range_bounds &, const range_bounds &)): Declare.
10445 (operator!=(const range_bounds &, const range_bounds &)): Declare.
10446
ef8914a4
PR
104472018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10448
10449 * s390-linux-tdep.c (s390_record_address_mask)
10450 (s390_record_calc_disp_common, s390_record_calc_disp)
10451 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10452 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10453 (s390_process_record): Move to s390-tdep.c.
10454 (s390_linux_init_abi_any): Adjust.
10455 * s390-tdep.c (s390_record_address_mask)
10456 (s390_record_calc_disp_common, s390_record_calc_disp)
10457 (s390_record_calc_disp_vsce, s390_record_calc_rl, s390_popcnt)
10458 (s390_record_gpr_g, s390_record_gpr_h, s390_record_vr)
10459 (s390_process_record): Moved from s390-linux-tdep.c
10460 (s390_gdbarch_init): Adjust.
10461
d6e58945
PR
104622018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10463
10464 * s390-linux-nat.c (s390-tdep.h): New include.
10465 * Makefile.in (ALL_TARGET_OBS): Add s390-tdep.o.
10466 (HFILES_NO_SRCDIR): Add s390-tdep.h.
10467 (ALLDEPFILES): Add s390-tdep.c.
10468 * configure.tgt (s390*-*-linux*): Add s390-tdep.o.
10469 * s390-linux-tdep.h (HWCAP_S390_*, S390_*_REGNUM): Move to...
10470 * s390-tdep.h: ...this. New file.
10471 * s390-linux-tdep.c (s390-tdep.h): New include.
10472 (_initialize_s390_tdep): Rename to...
10473 (_initialize_s390_linux_tdep): ...this and adjust.
10474 (s390_abi_kind, s390_vector_abi_kind, gdbarch_tdep)
10475 (enum named opcodes, S390_NUM_GPRS, S390_NUM_FPRS): Move to
10476 s390-tdep.h.
10477 (s390_break_insn, s390_breakpoint, s390_readinstruction, is_ri)
10478 (is_ril, is_rr, is_rre, is_rs, is_rsy, is_rx, is_rxy)
10479 (s390_is_partial_instruction, s390_software_single_step)
10480 (is_non_branch_ril, s390_displaced_step_copy_insn)
10481 (s390_displaced_step_fixup, s390_displaced_step_hw_singlestep)
10482 (s390_prologue_data, s390_addr, s390_store, s390_load)
10483 (s390_check_for_saved, s390_analyze_prologue, s390_skip_prologue)
10484 (s390_register_call_saved, s390_guess_tracepoint_registers)
10485 (s390_register_name, s390_dwarf_regmap, s390_dwarf_reg_to_regnum)
10486 (regnum_is_gpr_full, regnum_is_vxr_full, s390_value_from_register)
10487 (s390_pseudo_register_name, s390_pseudo_register_type)
10488 (s390_pseudo_register_read, s390_pseudo_register_write)
10489 (s390_pseudo_register_reggroup_p, s390_ax_pseudo_register_collect)
10490 (s390_ax_pseudo_register_push_stack, s390_gen_return_address)
10491 (s390_addr_bits_remove, s390_address_class_type_flags)
10492 (s390_address_class_type_flags_to_name)
10493 (s390_address_class_name_to_type_flags, s390_effective_inner_type)
10494 (s390_function_arg_float, s390_function_arg_vector)
10495 (is_power_of_two, s390_function_arg_integer, s390_arg_state)
10496 (s390_handle_arg, s390_push_dummy_call, s390_dummy_id)
10497 (s390_frame_align, s390_register_return_value, s390_return_value)
10498 (s390_stack_frame_destroyed_p, s390_unwind_pc, s390_unwind_sp)
10499 (s390_unwind_pseudo_register, s390_adjust_frame_regnum)
10500 (s390_dwarf2_prev_register, s390_dwarf2_frame_init_reg)
10501 (s390_trad_frame_prev_register, s390_unwind_cache)
10502 (s390_prologue_frame_unwind_cache)
10503 (s390_backchain_frame_unwind_cache, s390_frame_unwind_cache)
10504 (s390_frame_this_id, s390_frame_prev_register, s390_frame_unwind)
10505 (s390_stub_unwind_cache, s390_stub_frame_unwind_cache)
10506 (s390_stub_frame_this_id, s390_stub_frame_prev_register)
10507 (s390_stub_frame_sniffer, s390_stub_frame_unwind)
10508 (s390_frame_base_address, s390_local_base_address)
10509 (s390_frame_base, s390_gcc_target_options)
10510 (s390_gnu_triplet_regexp, s390_stap_is_single_operand)
10511 (s390_validate_reg_range, s390_tdesc_valid)
10512 (s390_gdbarch_tdep_alloc, s390_gdbarch_init): Move to...
10513 * s390-tdep.c: ...this. New file.
10514
9c0b896e
PR
105152018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10516
10517 * s390-linux-tdep.c (gdbarch_tdep.s390_syscall_record): New hook.
10518 (s390_process_record, s390_gdbarch_tdep_alloc)
10519 (s390_linux_init_abi_any): Use/set new hook.
10520
7042632b
PR
105212018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10522
10523 * s390-linux-tdep.c (osabi.h): New include.
10524 (s390_linux_init_abi_31, s390_linux_init_abi_64)
10525 (s390_linux_init_abi_any): New functions.
10526 (s390_gdbarch_init, _initialize_s390_tdep): Adjust.
10527
650f5e13
PR
105282018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10529
10530 * s390-linux-tdep.c (s390_gdbarch_init): Use gdb_assert for
10531 tdesc_has_registers check
10532
47c9317e
PR
105332018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10534
10535 * s390-linux-tdep.c (s390_tdesc_valid): New function.
10536 (s390_validate_reg_range): New macro.
10537 (s390_gdbarch_init): Adjust.
10538
095085d8
PR
105392018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10540
10541 * s390-linux-tdep.c (gdbarch_tdep) <tdesc>: New field.
10542 (s390_gdbarch_tdep_alloc): Adjust.
10543 (s390_gdbarch_init): Adjust.
10544
ab9bcc67
PR
105452018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10546
10547 * s390-linux-tdep.c (gdbarch_tdep) <have_linux_v1, have_linux_v2>
10548 <have_tdb>: Change type to bool.
10549 (s390_gdbarch_tdep_alloc): Adjust.
10550 (s390_gdbarch_init): Adjust.
10551
21f6f5ff
PR
105522018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10553
10554 * s390-linux-tdep (s390_abi_kind) <ABI_NONE>: New default field.
10555 (gdbarch_tdep) <have_upper, have_vx>: New fields.
10556 (s390_gdbarch_tdep_alloc): New function.
10557 (s390_gdbarch_init): Allocate tdep at start and use its fields
10558 instead of separate variables.
10559
0eb97953
PR
105602018-01-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
10561
10562 * s390-linux-tdep.c (s390_gdbarch_init): Remove duplicate checks
10563 when looking for cached gdbarch and add comment for remaining.
10564
5c319bb2
PA
105652018-01-22 Pedro Alves <palves@redhat.com>
10566 Sergio Durigan Junior <sergiodj@redhat.com>
10567
10568 * typeprint.c (whatis_exp): Initialize "val" in the "whatis type"
10569 case.
10570
d65ce302
MR
105712018-01-22 Maciej W. Rozycki <macro@mips.com>
10572
10573 * MAINTAINERS: Update my company e-mail address.
10574
ec7a5fcb
YQ
105752018-01-22 Yao Qi <yao.qi@linaro.org>
10576
10577 * regcache.c (cooked_write_test): New function.
10578 (_initialize_regcache): Register the test.
10579
11f57cb6
YQ
105802018-01-22 Yao Qi <yao.qi@linaro.org>
10581
10582 * ia64-tdep.c (ia64_pseudo_register_read): Call
10583 regcache->cooked_read instead of regcache_cooked_read_unsigned.
10584 * m32c-tdep.c (m32c_cat_read): Likewise.
10585 (m32c_r3r2r1r0_read): Likewise.
10586 * m68hc11-tdep.c (m68hc11_pseudo_register_read): Likewise.
10587 * xtensa-tdep.c (xtensa_register_read_masked): Likewise.
10588
03f50fc8
YQ
105892018-01-22 Yao Qi <yao.qi@linaro.org>
10590
10591 * aarch64-tdep.c (aarch64_pseudo_read_value): Call regcache
10592 method raw_read instead of regcache_raw_read.
10593 * amd64-tdep.c (amd64_pseudo_register_read_value): Likewise.
10594 * arm-tdep.c (arm_neon_quad_read): Likewise.
10595 * avr-tdep.c (avr_pseudo_register_read): Likewise.
10596 * bfin-tdep.c (bfin_pseudo_register_read): Likewise.
10597 * frv-tdep.c (frv_pseudo_register_read): Likewise.
10598 * h8300-tdep.c (h8300_pseudo_register_read): Likewise.
10599 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
10600 (i386_pseudo_register_read_into_value): Likewise.
10601 * mep-tdep.c (mep_pseudo_cr32_read): Likewise.
10602 * msp430-tdep.c (msp430_pseudo_register_read): Likewise.
10603 * nds32-tdep.c (nds32_pseudo_register_read): Likewise.
10604 * rl78-tdep.c (rl78_pseudo_register_read): Likewise.
10605 * s390-linux-tdep.c (s390_pseudo_register_read): Likewise.
10606 * sparc-tdep.c (sparc32_pseudo_register_read): Likewise.
10607 * sparc64-tdep.c (sparc64_pseudo_register_read): Likewise.
10608 * spu-tdep.c (spu_pseudo_register_read_spu): Likewise.
10609 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
10610
dc711524
YQ
106112018-01-22 Yao Qi <yao.qi@linaro.org>
10612
10613 * Makefile.in (ALL_TARGET_OBS): Remove mt-tdep.o.
10614 * configure.tgt: Remove target mt.
10615 * mt-tdep.c: Remove.
10616 * regcache.c (cooked_read_test): Remove the check for mt.
10617
3f5a868b
YQ
106182018-01-22 Yao Qi <yao.qi@linaro.org>
10619
10620 * jit.c (jit_frame_prev_register): Call regcache::cooked_read
10621 instead of gdbarch_pseudo_register_read_value.
10622
de4cb04a
JB
106232018-01-22 Joel Brobecker <brobecker@adacore.com>
10624
10625 * dwarf2read.c (need_gnat_info): Return nonzero if the cu's
10626 language is Ada.
10627
a9e40818
JB
106282018-01-22 Joel Brobecker <brobecker@adacore.com>
10629
10630 * linespec.c (create_sals_line_offset): Remove code that preserved
10631 the symtab_and_line's line number.
10632
e707fc44
AB
106332018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10634
10635 * varobj.c (varobj_create): Don't set valid_block when creating a
10636 floating varobj.
10637
03d0bf7b
AB
106382018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10639
10640 * varobj.c (varobj_create): Remove out of date comment.
10641
ae451627
AB
106422018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10643
10644 PR mi/20395
10645 * ada-exp.y (write_var_from_sym): Pass extra parameter when
10646 updating innermost block.
10647 * parse.c (innermost_block_tracker::update): Take extra type
10648 parameter, and check types match before updating innermost block.
10649 (write_dollar_variable): Update innermost block for registers.
10650 * parser-defs.h (enum innermost_block_tracker_type): New enum.
10651 (innermost_block_tracker::innermost_block_tracker): Initialise
10652 m_types member.
10653 (innermost_block_tracker::reset): Take type parameter.
10654 (innermost_block_tracker::update): Take type parameter, and pass
10655 type through as needed.
10656 (innermost_block_tracker::m_types): New member.
10657 * varobj.c (varobj_create): Pass type when reseting innermost
10658 block.
10659
aee1fcdf
AB
106602018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10661
10662 * ada-exp.y (write_var_from_sym): Switch to innermost_block API.
10663 * ada-lang.c (resolve_subexp): Likewise.
10664 * breakpoint.c (set_breakpoint_condition) Likewise.
10665 (watch_command_1) Likewise.
10666 * c-exp.y (variable): Likewise.
10667 * d-exp.y (PrimaryExpression): Likewise.
10668 * f-exp.y (variable): Likewise.
10669 * go-exp.y (variable): Likewise.
10670 * m2-exp.y (variable): Likewise.
10671 * objfiles.c (objfile::~objfile): Likewise.
10672 * p-exp.y (variable): Likewise.
10673 * parse.c (innermost_block): Change type.
10674 * parser-defs.h (class innermost_block_tracker): New.
10675 (innermost_block): Change to innermost_block_tracker.
10676 * printcmd.c (display_command): Switch to innermost_block API.
10677 (do_one_display): Likewise.
10678 * rust-exp.y (do_one_display): Likewise.
10679 * symfile.c (clear_symtab_users): Likewise.
10680 * varobj.c (varobj_create): Switch to innermost_block API, replace
10681 use of innermost_block with block stored on varobj object.
10682
396af9a1
AB
106832018-01-21 Andrew Burgess <andrew.burgess@embecosm.com>
10684
10685 * expression.h (innermost_block): Remove declaration.
10686 * varobj.c: Add 'parser-defs.h' include.
10687
fcfcc376
TT
106882018-01-19 Tom Tromey <tom@tromey.com>
10689
10690 * rust-lang.c (rust_lookup_symbol_nonlocal): Look up qualified
10691 symbols in the static and global blocks.
10692
5a6c3296
JC
106932018-01-19 James Clarke <jrtc27@jrtc27.com>
10694
10695 * nat/linux-ptrace.c: Remove unnecessary reinclusion of
10696 gdb_ptrace.h, and move including gdb_wait.h ...
10697 * nat/linux-ptrace.h: ... to here.
10698
bc09b0c1
SM
106992018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10700
10701 * inf-ptrace.c (inf_ptrace_detach): Adjust call to
10702 inf_ptrace_detach_success.
10703 (inf_ptrace_detach_success): Add inferior parameter, use it
10704 instead of inferior_ptid, pass it to detach_inferior.
10705 * inf-ptrace.h (inf_ptrace_detach_success): Add inferior
10706 parameter.
10707 * inferior.c (detach_inferior): Add overload that takes an
10708 inferior object.
10709 * inferior.h (detach_inferior): Likewise.
10710 * linux-nat.c (linux_nat_detach): Use the inf parameter, don't
10711 use inferior_ptid, adjust call to inf_ptrace_detach_success.
10712 * linux-thread-db.c (thread_db_detach): Use inf parameter.
10713
6e1e1966
SM
107142018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10715
10716 * target.h (struct target_ops) <to_detach>: Add inferior
10717 parameter.
10718 (target_detach): Likewise.
10719 * target.c (dispose_inferior): Pass inferior down.
10720 (target_detach): Pass inferior down. Assert that it is equal to
10721 the current inferior.
10722 * aix-thread.c (aix_thread_detach): Pass inferior down.
10723 * corefile.c (core_file_command): Pass current_inferior() down.
10724 * corelow.c (core_detach): Add inferior parameter.
10725 * darwin-nat.c (darwin_detach): Likewise.
10726 * gnu-nat.c (gnu_detach): Likewise.
10727 * inf-ptrace.c (inf_ptrace_detach): Likewise.
10728 * infcmd.c (detach_command): Pass current_inferior() down to
10729 target_detach.
10730 * infrun.c (follow_fork_inferior): Pass parent_inf to
10731 target_detach.
10732 (handle_vfork_child_exec_or_exit): Pass inf->vfork_parent to
10733 target_detach.
10734 * linux-nat.c (linux_nat_detach): Add inferior parameter.
10735 * linux-thread-db.c (thread_db_detach): Likewise.
10736 * nto-procfs.c (procfs_detach): Likewise.
10737 * procfs.c (procfs_detach): Likewise.
10738 * record.c (record_detach): Likewise.
10739 * record.h (struct inferior): Forward-declare.
10740 (record_detach): Add inferior parameter.
10741 * remote-sim.c (gdbsim_detach): Likewise.
10742 * remote.c (remote_detach_1): Likewise.
10743 (remote_detach): Likewise.
10744 (extended_remote_detach): Likewise.
10745 * sol-thread.c (sol_thread_detach): Likewise.
10746 * target-debug.h (target_debug_print_inferior_p): New macro.
10747 * target-delegates.c: Re-generate.
10748 * top.c (kill_or_detach): Pass inferior down to target_detach.
10749 * windows-nat.c (windows_detach): Add inferior parameter.
10750
6bd6f3b6
SM
107512018-01-19 Simon Marchi <simon.marchi@ericsson.com>
10752
10753 * target.h (struct target_ops) <to_detach>: Remove args
10754 parameter.
10755 (target_detach): Likewise.
10756 * target.c (dispose_inferior): Adjust.
10757 (target_detach): Remove args parameter, adjust.
10758 * aix-thread.c (aix_thread_detach): Adjust.
10759 * corefile.c (core_file_command): Adjust.
10760 * corelow.c (core_detach): Adjust.
10761 * darwin-nat.c (darwin_detach): Adjust.
10762 * gnu-nat.c (gnu_detach): Adjust.
10763 * inf-ptrace.c (inf_ptrace_detach): Adjust.
10764 * infcmd.c (detach_command): Adjust
10765 * infrun.c (follow_fork_inferior): Adjust.
10766 (handle_vfork_child_exec_or_exit): Adjust.
10767 * linux-fork.c (linux_fork_detach): Remove args parameter.
10768 * linux-fork.h (linux_fork_detach): Likewise.
10769 * linux-nat.c (linux_nat_detach): Likewise, and adjust.
10770 * linux-thread-db.c (thread_db_detach): Likewise.
10771 * nto-procfs.c (procfs_detach): Likewise.
10772 * procfs.c (procfs_detach): Likewise.
10773 (do_detach): Remove signo parameter.
10774 * record.c (record_detach): Remove args parameter.
10775 * record.h (record_detach): Likewise.
10776 * remote-sim.c (gdbsim_detach): Likewise.
10777 * remote.c (remote_detach_1): Likewise.
10778 (remote_detach): Likewise.
10779 (extended_remote_detach): Likewise.
10780 * sol-thread.c (sol_thread_detach): Likewise.
10781 * target-delegates.c: Re-generate.
10782 * top.c (struct qt_args) <args>: Remove field.
10783 (kill_or_detach): Don't pass args.
10784 (quit_force): Don't set args.
10785 * windows-nat.c (windows_detach): Remove args parameter.
10786
88af8ea8
YQ
107872018-01-19 Yao Qi <yao.qi@linaro.org>
10788
10789 * arm-linux-tdep.c (arm_linux_gcc_target_options): New function.
10790 (arm_linux_init_abi): Install it.
10791
dea445b9
YQ
107922018-01-19 Yao Qi <yao.qi@linaro.org>
10793
10794 * osabi.c (gdb_osabi_names): Extend the regexp for
10795 arm-linux-gnueabihf.
10796
4a17f768
YQ
107972018-01-18 Yao Qi <yao.qi@linaro.org>
10798
10799 * dwarf2read.c (abbrev_table) <abbrevs>: Rename it to
10800 m_abbrevs.
10801 (abbrev_table::add_abbrev): Update.
10802 (abbrev_table::lookup_abbrev): Update.
10803
d679c21a
YQ
108042018-01-18 Yao Qi <yao.qi@linaro.org>
10805
10806 * ppc-linux-tdep.c (ppu2spu_prev_register): Call cooked_read.
10807
7d937cad
SDJ
108082018-01-17 Sergio Durigan Junior <sergiodj@redhat.com>
10809
10810 * compile/compile.c (compile_to_object): Convert "triplet_rx"
10811 to "std::string".
10812
9e14690d
TT
108132018-01-17 Tom Tromey <tom@tromey.com>
10814
10815 * dwarf2read.c (symbolp): Remove typedef. Don't instantiate VEC.
10816
50a82047
TT
108172018-01-17 Tom Tromey <tom@tromey.com>
10818
10819 * gdbtypes.h (add_dyn_prop): Remove objfile parameter.
10820 * gdbtypes.c (add_dyn_prop): Remove objfile parameter.
10821 (create_array_type_with_stride): Update.
10822 * dwarf2read.c (set_die_type): Update.
10823
c89b44cd
TT
108242018-01-17 Tom Tromey <tom@tromey.com>
10825
10826 * dwarf2read.c (delayed_method_info): Remove typedef.
10827 (dwarf2_cu::method_info): Now a std::vector.
10828 (add_to_method_list): Update.
10829 (free_delayed_list): Remove.
10830 (compute_delayed_physnames): Update.
10831 (process_full_comp_unit, process_full_type_unit): Clear the method
10832 list. Remove cleanups.
10833 (psymtab_include_file_name): Add name_holder parameter. Use
10834 unique_xmalloc_ptr.
10835 (dwarf_decode_lines): Update.
10836
fcd3b13d
SM
108372018-01-17 Tom Tromey <tom@tromey.com>
10838 Simon Marchi <simon.marchi@ericsson.com>
10839
10840 * dwarf2read.c (struct dwarf2_cu): Add constructor, destructor.
10841 (dwarf2_per_objfile::free_cached_comp_units)
10842 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10843 (init_cutu_and_read_dies_no_follow): Update.
10844 (dwarf2_cu::dwarf2_cu): Rename from init_one_comp_unit.
10845 (dwarf2_cu::~dwarf2_cu): New.
10846 (free_heap_comp_unit, free_stack_comp_unit): Remove.
10847 (age_cached_comp_units, free_one_cached_comp_unit): Update.
10848
685af9cd
TT
108492018-01-17 Tom Tromey <tom@tromey.com>
10850 Simon Marchi <simon.marchi@ericsson.com>
10851
10852 * dwarf2read.c (struct dwarf2_cu) <abbrev_table>: Remove.
10853 (struct die_reader_specs) <abbrev_table>: New member.
10854 (struct abbrev_table): Add constructor.
10855 <alloc_abbrev, add_abbrev, lookup_abbrev>: Declare.
10856 <abbrev_obstack>: Now an auto_obstack.
10857 (abbrev_table_up): New typedef.
10858 (init_cu_die_reader): Add abbrev_table parameter.
10859 (read_cutu_die_from_dwo): Remove abbrev_table_provided parameter.
10860 Add result_dwo_abbrev_table.
10861 (init_tu_and_read_dwo_dies, init_cutu_and_read_dies)
10862 (init_cutu_and_read_dies_no_follow, build_type_psymtabs_1):
10863 Update.
10864 (peek_die_abbrev): Take die_reader_specs, not dwarf_cu as
10865 parameter.
10866 (skip_children): Update.
10867 (abbrev_table::alloc_abbrev): Rename from
10868 abbrev_table_alloc_abbrev.
10869 (abbrev_table::add_abbrev): Rename from abbrev_table_add_abbrev.
10870 (abbrev_table::lookup_abbrev): Rename from
10871 abbrev_table_lookup_abbrev.
10872 (abbrev_table_read_table): Return abbrev_table_up.
10873 (abbrev_table_free, abbrev_table_free_cleanup)
10874 (dwarf2_read_abbrevs, dwarf2_free_abbrev_table): Remove.
10875 (load_partial_dies): Update.
10876
5e2db402
TT
108772018-01-17 Tom Tromey <tom@tromey.com>
10878
10879 * dwarf2read.c (dwarf2_compute_name): Update comment.
10880 (read_func_scope, read_variable): Update.
10881 (new_symbol): Remove.
10882 (new_symbol_full): Rename to new_symbol.
10883
ee7f689e 108842018-01-17 Mike Gulick <mgulick@mathworks.com>
41667530
MG
10885
10886 PR gdb/16577
10887 * gdb_bfd.c (gdb_bfd_map_section): If unable to read object file, issue
10888 a warning instead of throwing an error, set section size to 0 and return
10889 NULL.
10890 * gdb_bfd.h (gdb_bfd_map_section): Update description.
10891
4d9b86e1
SM
108922018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10893
10894 * nat/linux-ptrace.h (linux_ptrace_attach_fail_reason): Return
10895 std::string.
10896 (linux_ptrace_attach_fail_reason_string): Likewise.
10897 * nat/linux-ptrace.c (linux_ptrace_attach_fail_reason):
10898 Likewise.
10899 (linux_ptrace_attach_fail_reason_string): Likewise.
10900 * linux-nat.c (attach_proc_task_lwp_callback): Adjust.
10901
a7b2d0fb
SM
109022018-01-17 Simon Marchi <simon.marchi@ericsson.com>
10903
10904 * linux-nat.c (linux_nat_attach): Remove xstrdup.
10905
f517c180
EA
109062018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
10907
10908 PR gdb/21559
10909 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
10910 checking for fs_base/gs_base fields in struct user_regs_struct.
10911 * configure: Regenerate.
10912
7045b1ca
YQ
109132018-01-17 Yao Qi <yao.qi@linaro.org>
10914
10915 * aarch64-linux-tdep.c (aarch64_linux_gcc_target_options): New
10916 function.
10917 (aarch64_linux_init_abi): Install it to gdbarch hook
10918 gcc_target_options.
10919
db422fb2
PA
109202018-01-15 Pedro Alves <palves@redhat.com>
10921
10922 * common/signals-state-save-restore.c
10923 (save_original_signals_state): Fix typos.
10924
ba643918
SDJ
109252017-01-12 Tom Tromey <tom@tromey.com>
10926 Sergio Durigan Junior <sergiodj@redhat.com>
10927
10928 * Makefile.in (install-only): Install gdb-add-index.
10929
906b4aac
JB
109302018-01-12 John Baldwin <jhb@FreeBSD.org>
10931
10932 * fbsd-tdep.c (KVE_PROTECTION): Correct value.
10933
bdf2a94a
AA
109342018-01-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
10935
10936 * infrun.c (keep_going_pass_signal): Clear step-over info when
10937 insert_breakpoints fails.
10938
71d378ae
PA
109392018-01-11 Pedro Alves <palves@redhat.com>
10940
10941 PR gdb/22583
10942 * infrun.c (resume): Rename to ...
10943 (resume_1): ... this.
10944 (resume): Reimplement as wrapper around resume_1.
10945
3cada740
PA
109462018-01-11 Pedro Alves <palves@redhat.com>
10947
10948 PR remote/22597
10949 * remote.c (remote_parse_stop_reply): Default to the last-set
10950 general thread instead of to 'magic_null_ptid'.
10951
618daa93
PA
109522018-01-10 Pedro Alves <palves@redhat.com>
10953
10954 * language.h (language_get_symbol_name_matcher): Rename ...
10955 (get_symbol_name_matcher): ... this.
10956 * language.c (language_get_symbol_name_matcher): Ditto.
10957 * dictionary.c, linespec.c, minsyms.c, psymtab.c, symtab.c: All
10958 callers adjusted.
10959
c63d3e8d
PA
109602018-01-10 Pedro Alves <palves@redhat.com>
10961
10962 PR gdb/22670
10963 * dwarf2read.c
10964 (gdb_index_symbol_name_matcher::gdb_index_symbol_name_matcher):
10965 Adjust to use language_get_symbol_name_matcher instead of
10966 language_defn::la_get_symbol_name_matcher.
10967 * language.c (language_get_symbol_name_matcher): If in Ada mode
10968 and the lookup name is a verbatim match, return Ada's matcher.
10969 * language.h (language_get_symbol_name_matcher): Adjust comment.
10970 (ada_lookup_name_info::verbatim_p):: New method.
10971
d4c2a405
PA
109722018-01-10 Pedro Alves <palves@redhat.com>
10973
10974 PR gdb/22670
10975 * ada-lang.c (ada_collect_symbol_completion_matches): If the
10976 minsym's language is language_auto or language_cplus, pass down
10977 language_ada instead.
10978 * symtab.c (compare_symbol_name): Don't frob symbol language here.
10979
8825213e
PA
109802018-01-10 Pedro Alves <palves@redhat.com>
10981
10982 PR gdb/22670
10983 * minsyms.c (linkage_name_str): New function.
10984 (iterate_over_minimal_symbols): Use it.
10985
2d97a5d9
JB
109862018-01-09 John Baldwin <jhb@FreeBSD.org>
10987
10988 * NEWS: Document that 'info proc' now works on FreeBSD.
10989
92fce24d
JB
109902018-01-09 John Baldwin <jhb@FreeBSD.org>
10991
10992 * configure.ac: Check for kinfo_getfile in libutil.
10993 * configure: Regenerate.
10994 * config.in: Regenerate.
10995 * fbsd-nat.c: Include "fbsd-tdep.h".
10996 (fbsd_fetch_cmdline): New.
10997 (fbsd_fetch_kinfo_proc): Move earlier and change to return a bool
10998 rather than calling error.
10999 (fbsd_info_proc): New.
11000 (fbsd_thread_name): Report error if fbsd_fetch_kinfo_proc fails.
11001 (fbsd_wait): Report warning if fbsd_fetch_kinfo_proc fails.
11002 (fbsd_nat_add_target): Set "to_info_proc" to "fbsd_info_proc".
11003
262f62f5
JB
110042018-01-09 John Baldwin <jhb@FreeBSD.org>
11005
11006 * fbsd-nat.c (struct free_deleter): Remove.
11007 (fbsd_find_memory_regions): Use gdb::unique_xmalloc_ptr<>.
11008
b999e203
JB
110092018-01-09 John Baldwin <jhb@FreeBSD.org>
11010
11011 * fbsd-nat.c (fbsd_pid_to_exec_file) [KERN_PROC_PATHNAME]: Return
11012 NULL for an empty pathname.
11013
d2176225
JB
110142018-01-09 John Baldwin <jhb@FreeBSD.org>
11015
11016 * fbsd-tdep.c (KVE_STRUCTSIZE, KVE_START, KVE_END, KVE_OFFSET)
11017 (KVE_FLAGS, KVE_PROTECTION, KVE_PATH, KINFO_VME_PROT_READ)
11018 (KINFO_VME_PROT_WRITE, KINFO_VME_PROT_EXEC, KINFO_VME_FLAG_COW)
11019 (KINFO_VME_FLAG_NEEDS_COPY, KINFO_VME_FLAG_NOCOREDUMP)
11020 (KINFO_VME_FLAG_SUPER, KINFO_VME_FLAG_GROWS_UP)
11021 (KINFO_VME_FLAG_GROWS_DOWN, KF_STRUCTSIZE, KF_TYPE, KF_FD)
11022 (KF_PATH, KINFO_FILE_TYPE_VNODE, KINFO_FILE_FD_TYPE_CWD)
11023 (KINFO_FILE_FD_TYPE_TEXT, SIG_WORDS, struct kinfo_proc_layout)
11024 (kinfo_proc_layout_32, kinfo_proc_layout_i386)
11025 (kinfo_proc_layout_64, fbsd_vm_map_entry_flags)
11026 (fbsd_core_info_proc_mappings, fbsd_core_vnode_path)
11027 (fbsd_core_fetch_timeval, fbsd_print_sigset)
11028 (fbsd_core_info_proc_status, fbsd_core_info_proc): New.
11029 (fbsd_init_abi): Install gdbarch "core_info_proc" method.
11030 * fbsd-tdep.h (fbsd_vm_map_entry_flags): New.
11031
9c4ac400
ST
110322018-01-08 Samuel Thibault <samuel.thibault@ens-lyon.org>
11033
11034 * gdb/gnu-nat.c: Include <elf.h> and <link.h>.
11035 (gnu_xfer_auxv): New function.
11036 (gnu_xfer_partial): Call gnu_xfer_auxv when `object' is
11037 TARGET_OBJECT_AUXV.
11038
1e5ded6c
YQ
110392018-01-08 Yao Qi <yao.qi@linaro.org>
11040 Simon Marchi <simon.marchi@ericsson.com>
11041
11042 * Makefile.in (COMMON_SFILES): Remove selftest-arch.c and
11043 common/selftest.c.
11044 (COMMON_OBS): Remove selftest.o.
11045 * configure.ac: Append selftest-arch.c and common/selftest.c to
11046 CONFIG_SRCS. Append selftest-arch.o and selftest.o to COMMON_OBS.
11047 * configure: Re-generated.
11048 * maint.c (maintenance_selftest): Wrap selftests::run_tests with
11049 GDB_SELF_TEST.
11050 (maintenance_info_selftests): Likewise.
11051
04bafb1e
XR
110522018-01-08 Xavier Roirand <roirand@adacore.com>
11053
11054 * ada-valprint.c (val_print_packed_array_elements): Use
11055 proper number of elements when printing an array indexed
11056 by an enumeration type.
11057
518817b3
SM
110582018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11059
11060 * dwarf2read.c (struct dwarf2_cu) <dwarf2_per_objfile>: Remove.
11061 (dw2_get_file_names_reader): Adjust.
11062 (lookup_dwo_signatured_type): Adjust.
11063 (lookup_dwp_signatured_type): Adjust.
11064 (lookup_signatured_type): Adjust.
11065 (create_type_unit_group): Adjust.
11066 (get_type_unit_group): Adjust.
11067 (process_psymtab_comp_unit_reader): Adjust.
11068 (build_type_psymtabs_reader): Adjust.
11069 (scan_partial_symbols): Adjust.
11070 (add_partial_symbol): Adjust.
11071 (add_partial_subprogram): Adjust.
11072 (peek_die_abbrev): Adjust.
11073 (fixup_go_packaging): Adjust.
11074 (process_imported_unit_die): Adjust.
11075 (dwarf2_compute_name): Adjust.
11076 (dwarf2_physname): Adjust.
11077 (read_import_statement): Adjust.
11078 (handle_DW_AT_stmt_list): Adjust.
11079 (read_file_scope): Adjust.
11080 (read_func_scope): Adjust.
11081 (read_lexical_block_scope): Adjust.
11082 (read_call_site_scope): Adjust.
11083 (read_variable): Adjust.
11084 (dwarf2_rnglists_process): Adjust.
11085 (dwarf2_ranges_process): Adjust.
11086 (dwarf2_ranges_read): Adjust.
11087 (dwarf2_get_pc_bounds): Adjust.
11088 (dwarf2_record_block_ranges): Adjust.
11089 (dwarf2_add_field): Adjust.
11090 (dwarf2_add_member_fn): Adjust.
11091 (read_structure_type): Adjust.
11092 (process_structure_scope): Adjust.
11093 (read_enumeration_type): Adjust.
11094 (read_array_type): Adjust.
11095 (mark_common_block_symbol_computed): Adjust.
11096 (read_common_block): Adjust.
11097 (read_namespace_type): Adjust.
11098 (read_namespace): Adjust.
11099 (read_module_type): Adjust.
11100 (read_tag_pointer_type): Adjust.
11101 (read_tag_ptr_to_member_type): Adjust.
11102 (read_tag_string_type): Adjust.
11103 (read_subroutine_type): Adjust.
11104 (read_typedef): Adjust.
11105 (read_base_type): Adjust.
11106 (attr_to_dynamic_prop): Adjust.
11107 (read_subrange_type): Adjust.
11108 (read_unspecified_type): Adjust.
11109 (dwarf2_read_abbrevs): Adjust.
11110 (load_partial_dies): Adjust.
11111 (read_partial_die): Adjust.
11112 (find_partial_die): Adjust.
11113 (guess_partial_die_structure_name): Adjust.
11114 (fixup_partial_die): Adjust.
11115 (read_attribute_value): Adjust.
11116 (read_addr_index): Adjust.
11117 (read_addr_index_from_leb128): Adjust.
11118 (read_str_index): Adjust.
11119 (dwarf2_string_attr): Adjust.
11120 (get_debug_line_section): Adjust.
11121 (dwarf_decode_line_header): Adjust.
11122 (lnp_state_machine::check_line_address): Adjust.
11123 (dwarf_decode_lines_1): Adjust.
11124 (dwarf_decode_lines): Adjust.
11125 (dwarf2_start_symtab): Adjust.
11126 (var_decode_location): Adjust.
11127 (new_symbol_full): Adjust.
11128 (dwarf2_const_value_data): Adjust.
11129 (dwarf2_const_value_attr): Adjust.
11130 (dwarf2_const_value): Adjust.
11131 (die_type): Adjust.
11132 (die_containing_type): Adjust.
11133 (build_error_marker_type): Adjust.
11134 (lookup_die_type): Adjust.
11135 (guess_full_die_structure_name): Adjust.
11136 (anonymous_struct_prefix): Adjust.
11137 (determine_prefix): Adjust.
11138 (dwarf2_name): Adjust.
11139 (follow_die_ref_or_sig): Adjust.
11140 (follow_die_offset): Adjust.
11141 (follow_die_ref): Adjust.
11142 (follow_die_sig_1): Adjust.
11143 (follow_die_sig): Adjust.
11144 (get_signatured_type): Adjust.
11145 (get_DW_AT_signature_type): Adjust.
11146 (decode_locdesc): Adjust.
11147 (dwarf_decode_macros): Adjust.
11148 (cu_debug_loc_section): Adjust.
11149 (fill_in_loclist_baton): Adjust.
11150 (dwarf2_symbol_mark_computed): Adjust.
11151 (init_one_comp_unit): Don't assign
11152 dwarf2_cu::dwarf2_per_objfile.
11153 (set_die_type): Adjust.
11154
ed2dc618
SM
111552018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11156
11157 * dwarf2read.c (struct mapped_debug_names): Add constructor.
11158 <dwarf2_per_objfile>: New field.
11159 (dwarf2_per_objfile): Remove global.
11160 (get_dwarf2_per_objfile): New function.
11161 (set_dwarf2_per_objfile): New function.
11162 (dwarf2_build_psymtabs_hard): Change objfile parameter to
11163 dwarf2_per_objfile.
11164 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11165 (read_abbrev_offset): Likewise.
11166 (read_indirect_string): Likewise.
11167 (read_indirect_line_string): Likewise.
11168 (read_indirect_string_at_offset): Likewise.
11169 (read_indirect_string_from_dwz): Likewise.
11170 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11171 dwarf2_per_objfile.
11172 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11173 (create_all_comp_units): Change objfile parameter to
11174 dwarf2_per_objfile.
11175 (create_all_type_units): Likewise.
11176 (process_queue): Add dwarf2_per_objfile parameter.
11177 (read_and_check_comp_unit_head): Likewise.
11178 (lookup_dwo_unit_in_dwp): Likewise.
11179 (get_dwp_file): Likewise.
11180 (process_cu_includes): Likewise.
11181 (struct free_dwo_file_cleanup_data): New struct.
11182 (dwarf2_has_info): Use get_dwarf2_per_objfile and
11183 set_dwarf2_per_objfile.
11184 (dwarf2_get_dwz_file): Add dwarf2_per_objfile parameter.
11185 (dw2_do_instantiate_symtab): Get dwarf2_per_objfile from
11186 context, adjust calls.
11187 (dw2_instantiate_symtab): Likewise.
11188 (dw2_get_cutu): Add dwarf2_per_objfile parameter.
11189 (dw2_get_cu): Likewise.
11190 (create_cu_from_index_list): Change objfile parameter to
11191 dwarf2_per_objfile.
11192 (create_cus_from_index_list): Get dwarf2_per_objfile from
11193 context, adjust calls.
11194 (create_cus_from_index): Likewise.
11195 (create_signatured_type_table_from_index): Change objfile
11196 parameter to dwarf2_per_objfile.
11197 (create_signatured_type_table_from_debug_names): Change objfile
11198 parameter to dwarf2_per_objfile.
11199 (create_addrmap_from_index): Likewise.
11200 (create_addrmap_from_aranges): Likewise.
11201 (dwarf2_read_index): Use get_dwarf2_per_objfile, adjust calls.
11202 (dw2_setup): Remove.
11203 (dw2_get_file_names_reader): Get dwarf2_per_objfile from
11204 context.
11205 (dw2_find_last_source_symtab): Get dwarf2_per_objfile using
11206 get_dwarf2_per_objfile.
11207 (dw2_forget_cached_source_info): Likewise.
11208 (dw2_map_symtabs_matching_filename): Likewise.
11209 (struct dw2_symtab_iterator) <index>: Remove.
11210 <dwarf2_per_objfile>: New field.
11211 (dw2_symtab_iter_init): Replace index parameter with
11212 dwarf2_per_objfile.
11213 (dw2_symtab_iter_next): Use dwarf2_per_objfile from iter.
11214 (dw2_lookup_symbol): Use get_dwarf2_per_objfile and adjust.
11215 (dw2_print_stats): Likewise.
11216 (dw2_dump): Likewise.
11217 (dw2_expand_symtabs_for_function): Likewise.
11218 (dw2_expand_all_symtabs): Likewise.
11219 (dw2_expand_symtabs_with_fullname): Likewise.
11220 (dw2_expand_marked_cus): Replace index and objfile parameters
11221 with dwarf2_per_objfile.
11222 (dw_expand_symtabs_matching_file_matcher): Add
11223 dwarf2_per_objfile parameter and adjust calls.
11224 (dw2_expand_symtabs_matching): Use get_dwarf2_per_objfile and
11225 adjust calls.
11226 (dw2_find_pc_sect_compunit_symtab): Don't call dw2_setup.
11227 (dw2_map_symbol_filenames): Use get_dwarf2_per_objfile and
11228 adjust calls.
11229 (create_cus_from_debug_names_list): Replace objfile parameter
11230 with dwarf2_per_objfile and adjust calls.
11231 (create_cus_from_debug_names): Likewise.
11232 (dwarf2_read_debug_names): Likewise.
11233 (mapped_debug_names::namei_to_name): Adjust call.
11234 (dw2_debug_names_iterator::next): Likewise.
11235 (dw2_debug_names_iterator::find_vec_in_debug_names): Likewise.
11236 (dw2_debug_names_lookup_symbol): Use get_dwarf2_per_objfile.
11237 (dw2_debug_names_dump): Likewise.
11238 (dw2_debug_names_expand_symtabs_for_function): Likewise.
11239 (dw2_debug_names_expand_symtabs_matching): Likewise.
11240 (dwarf2_initialize_objfile): Likewise.
11241 (dwarf2_build_psymtabs): Likewise.
11242 (get_abbrev_section_for_cu): Get dwarf2_per_objfile from
11243 this_cu.
11244 (error_check_comp_unit_head): Add dwarf2_per_objfile parameter.
11245 (read_and_check_comp_unit_head): Likewise.
11246 (read_abbrev_offset): Likewise.
11247 (create_debug_type_hash_table): Likewise.
11248 (create_debug_types_hash_table): Likewise.
11249 (create_all_type_units): Replace objfile parameter with
11250 dwarf2_per_objfile.
11251 (add_type_unit): Add dwarf2_per_objfile parameter.
11252 (fill_in_sig_entry_from_dwo_entry): Replace objfile parameter
11253 with dwarf2_per_objfile.
11254 (lookup_dwo_signatured_type): Get dwarf2_per_objfile from cu.
11255 (lookup_dwp_signatured_type): Likewise.
11256 (lookup_signatured_type): Likewise.
11257 (read_cutu_die_from_dwo): Likewise.
11258 (init_tu_and_read_dwo_dies): Likewise.
11259 (init_cutu_and_read_dies): Likewise.
11260 (init_cutu_and_read_dies_no_follow): Likewise.
11261 (allocate_type_unit_groups_table): Add objfile parameter.
11262 (create_type_unit_group): Use dwarf2_per_objfile from cu.
11263 (get_type_unit_group): Likewise.
11264 (process_psymtab_comp_unit): Update call.
11265 (build_type_psymtabs_reader): Use dwarf2_per_objfile from cu.
11266 (build_type_psymtabs_1): Add dwarf2_per_objfile parameter.
11267 (print_tu_stats): Likewise.
11268 (build_type_psymtab_dependencies): Use dwarf2_per_objfile passed
11269 in void* parameter.
11270 (build_type_psymtabs): Change objfile parameter to
11271 dwarf2_per_objfile.
11272 (process_skeletonless_type_unit): Use dwarf2_per_objfile
11273 passed in void* parameter.
11274 (process_skeletonless_type_units): Change objfile parameter to
11275 dwarf2_per_objfile.
11276 (set_partial_user): Likewise.
11277 (dwarf2_build_psymtabs_hard): Likewise.
11278 (read_comp_units_from_section): Likewise.
11279 (create_all_comp_units): Likewise.
11280 (scan_partial_symbols): Update calls.
11281 (add_partial_symbol): Likewise.
11282 (dwarf2_read_symtab): Use get_dwarf2_per_objfile.
11283 (maybe_queue_comp_unit): Use dwarf2_read_symtab from cu.
11284 (process_queue): Add dwarf2_per_objfile parameter.
11285 (get_compunit_symtab): Use dwarf2_per_objfile from cu.
11286 (compute_compunit_symtab_includes): Likewise.
11287 (process_cu_includes): Add dwarf2_per_objfile parameter.
11288 (process_full_comp_unit): Use dwarf2_per_objfile from cu.
11289 (process_full_type_unit): Likewise.
11290 (process_imported_unit_die): Update call.
11291 (handle_DW_AT_stmt_list): Use dwarf2_per_objfile from cu.
11292 (read_file_scope): Likewise.
11293 (allocate_dwo_file_hash_table): Add objfile parameter.
11294 (lookup_dwo_file_slot): Add dwarf2_per_objfile parameter.
11295 (create_cus_hash_table): Likewise.
11296 (create_dwp_hash_table): Likewise.
11297 (create_dwo_unit_in_dwp_v1): Likewise.
11298 (create_dwp_v2_section): Likewise.
11299 (create_dwo_unit_in_dwp_v2): Likewise.
11300 (lookup_dwo_unit_in_dwp): Likewise.
11301 (try_open_dwop_file): Likewise.
11302 (open_dwo_file): Likewise. Use dwarf2_per_objfile from cu.
11303 (open_and_init_dwo_file): Use dwarf2_per_objfile from cu, update
11304 cleanup to include a reference to dwarf2_per_objfile.
11305 (open_dwp_file): Add dwarf2_per_objfile parameter.
11306 (open_and_init_dwp_file): Likewise.
11307 (get_dwp_file): Likewise.
11308 (lookup_dwo_cutu): Use dwarf2_per_objfile from cu.
11309 (queue_and_load_all_dwo_tus): Update call.
11310 (free_dwo_file_cleanup): Use dwarf2_per_objfile from cleanup
11311 data.
11312 (dwarf2_rnglists_process): Use dwarf2_per_objfile from cu.
11313 (dwarf2_ranges_process): Likewise.
11314 (dwarf2_get_pc_bounds): Likewise.
11315 (mark_common_block_symbol_computed): Likewise.
11316 (abbrev_table_read_table): Add dwarf2_per_objfile parameter.
11317 (dwarf2_read_abbrevs): Update call.
11318 (read_partial_die): Use dwarf2_per_objfile from cu.
11319 (find_partial_die): Likewise.
11320 (fixup_partial_die): Likewise.
11321 (read_attribute_value): Likewise.
11322 (read_indirect_string_at_offset_from): Add objfile parameter.
11323 (read_indirect_string_at_offset): Add dwarf2_per_objfile
11324 parameter.
11325 (read_indirect_string_from_dwz): Add objfile parameter.
11326 (read_indirect_string): Add objfile parameter.
11327 (read_addr_index_1): Add dwarf2_per_objfile parameter.
11328 (read_addr_index): Use dwarf2_per_objfile from cu.
11329 (dwarf2_read_addr_index): Use dwarf2_per_objfile from cu, don't
11330 call dw2_setup.
11331 (read_str_index): Use dwarf2_per_objfile from cu.
11332 (get_debug_line_section): Likewise.
11333 (read_formatted_entries): Add dwarf2_per_objfile parameter.
11334 (dwarf_decode_line_header): Use dwarf2_per_objfile from cu.
11335 (new_symbol_full): Use dwarf2_per_objfile from cu.
11336 (build_error_marker_type): Likewise.
11337 (lookup_die_type): Likewise.
11338 (determine_prefix): Likewise.
11339 (follow_die_offset): Likewise.
11340 (dwarf2_fetch_die_loc_sect_off): Use get_dwarf2_per_objfile.
11341 (dwarf2_fetch_constant_bytes): Don't call dw2_setup.
11342 (dwarf2_fetch_die_type_sect_off): Likewise.
11343 (dwarf2_get_die_type): Likewise.
11344 (follow_die_sig_1): Use dwarf2_per_objfile from cu.
11345 (get_signatured_type): Likewise.
11346 (get_DW_AT_signature_type): Likewise.
11347 (dwarf_decode_macro_bytes): Add dwarf2_per_objfile parameter.
11348 (dwarf_decode_macros): Use dwarf2_per_objfile from cu.
11349 (cu_debug_loc_section): Likewise.
11350 (fill_in_loclist_baton): Likewise.
11351 (dwarf2_symbol_mark_computed): Likewise.
11352 (dwarf2_find_containing_comp_unit): Change objfile parameter to
11353 dwarf2_per_objfile.
11354 (free_cached_comp_units): Use dwarf2_per_objfile passed in void*
11355 parameter.
11356 (age_cached_comp_units): Add dwarf2_per_objfile parameter.
11357 (free_one_cached_comp_unit): Use dwarf2_per_objfile from cu.
11358 (dwarf2_free_objfile): Use get_dwarf2_per_objfile.
11359 (set_die_type): Use dwarf2_free_objfile from cu.
11360 (get_die_type_at_offset): Likewise.
11361 (dwarf2_per_objfile_free): Don't assign global variable.
11362 (debug_names) <constructor>: Add dwarf2_per_objfile
11363 parameter, update m_debugstrlookup construction.
11364 (debug_names::debug_str_lookup): Add dwarf2_per_objfile
11365 parameter.
11366 <m_dwarf2_per_objfile>: New field.
11367 <lookup>: Use m_dwarf2_per_objfile.
11368 (check_dwarf64_offsets): Add dwarf2_per_objfile parameter.
11369 (psyms_seen_size): Likewise.
11370 (write_gdbindex): Replace objfile parameter with
11371 dwarf2_per_objfile.
11372 (write_debug_names): Likewise.
11373 (write_psymtabs_to_index): Likewise.
11374 (save_gdb_index_command): Use get_dwarf2_per_objfile, update
11375 calls.
11376
e3b94546
SM
113772018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11378
11379 * dwarf2read.c (struct dwarf2_cu) <objfile>: Remove.
11380 <dwarf2_per_objfile>: New field.
11381 (struct dwarf2_per_cu_data) <objfile>: Remove.
11382 <dwarf2_per_objfile>: New field.
11383 (create_cu_from_index_list): Assign dwarf2_per_objfile instead
11384 of objfile.
11385 (create_signatured_type_table_from_index): Likewise.
11386 (create_debug_type_hash_table): Likewise.
11387 (fill_in_sig_entry_from_dwo_entry): Likewise.
11388 (lookup_dwo_unit): Access objfile through dwarf2_per_objfile.
11389 (create_type_unit_group): Assign dwarf2_per_objfile instead of
11390 objfile.
11391 (create_partial_symtab): Access objfile through
11392 dwarf2_per_objfile.
11393 (process_psymtab_comp_unit_reader): Likewise.
11394 (read_comp_units_from_section): Likewise.
11395 (scan_partial_symbols): Likewise.
11396 (add_partial_symbol): Likewise.
11397 (add_partial_subprogram): Likewise.
11398 (peek_die_abbrev): Likewise.
11399 (fixup_go_packaging): Likewise.
11400 (process_full_comp_unit): Likewise.
11401 (process_full_type_unit): Likewise.
11402 (process_imported_unit_die): Likewise.
11403 (dwarf2_compute_name): Likewise.
11404 (dwarf2_physname): Likewise.
11405 (read_import_statement): Likewise.
11406 (create_cus_hash_table): Assign dwarf2_physname instead of
11407 objfile.
11408 (read_func_scope): Access objfile through dwarf2_per_objfile.
11409 (read_lexical_block_scope): Likewise.
11410 (read_call_site_scope): Likewise.
11411 (read_variable): Likewise.
11412 (dwarf2_rnglists_process): Likewise.
11413 (dwarf2_ranges_process): Likewise.
11414 (dwarf2_ranges_read): Likewise.
11415 (dwarf2_record_block_ranges): Likewise.
11416 (dwarf2_add_field): Likewise.
11417 (dwarf2_add_member_fn): Likewise.
11418 (read_structure_type): Likewise.
11419 (process_structure_scope): Likewise.
11420 (read_enumeration_type): Likewise.
11421 (read_array_type): Likewise.
11422 (read_common_block): Likewise.
11423 (read_namespace_type): Likewise.
11424 (read_namespace): Likewise.
11425 (read_module_type): Likewise.
11426 (read_tag_pointer_type): Likewise.
11427 (read_tag_ptr_to_member_type): Likewise.
11428 (read_tag_string_type): Likewise.
11429 (read_subroutine_type): Likewise.
11430 (read_typedef): Likewise.
11431 (read_base_type): Likewise.
11432 (attr_to_dynamic_prop): Likewise.
11433 (read_subrange_type): Likewise.
11434 (read_unspecified_type): Likewise.
11435 (load_partial_dies): Likewise.
11436 (read_partial_die): Likewise.
11437 (find_partial_die): Likewise.
11438 (guess_partial_die_structure_name): Likewise.
11439 (fixup_partial_die): Likewise.
11440 (read_attribute_value): Likewise.
11441 (read_addr_index_from_leb128): Likewise.
11442 (dwarf2_read_addr_index): Likewise.
11443 (dwarf2_string_attr): Likewise.
11444 (lnp_state_machine::check_line_address): Likewise.
11445 (dwarf_decode_lines_1): Likewise.
11446 (dwarf_decode_lines): Likewise.
11447 (dwarf2_start_symtab): Likewise.
11448 (var_decode_location): Likewise.
11449 (new_symbol_full): Likewise.
11450 (dwarf2_const_value_data): Likewise.
11451 (dwarf2_const_value_attr): Likewise.
11452 (dwarf2_const_value): Likewise.
11453 (die_type): Likewise.
11454 (die_containing_type): Likewise.
11455 (lookup_die_type): Likewise.
11456 (guess_full_die_structure_name): Likewise.
11457 (anonymous_struct_prefix): Likewise.
11458 (dwarf2_name): Likewise.
11459 (follow_die_ref_or_sig): Likewise.
11460 (follow_die_offset): Likewise.
11461 (follow_die_ref): Likewise.
11462 (dwarf2_fetch_die_loc_sect_off): Likewise.
11463 (dwarf2_fetch_constant_bytes): Likewise.
11464 (dwarf2_fetch_die_type_sect_off): Likewise.
11465 (dwarf2_get_die_type): Likewise.
11466 (follow_die_sig): Likewise.
11467 (decode_locdesc): Likewise.
11468 (dwarf2_per_cu_objfile): Likewise.
11469 (dwarf2_per_cu_text_offset): Likewise.
11470 (init_one_comp_unit): Assign dwarf2_per_objfile instead of
11471 objfile.
11472 (set_die_type): Access objfile through
11473 dwarf2_per_objfile.
11474
b01ba14d
SM
114752018-01-07 Simon Marchi <simon.marchi@ericsson.com>
11476
11477 * valprint.c (converted_character_d): Remove typedef.
11478 (DEF_VEC_O (converted_character_d)): Remove.
11479 (count_next_character): Use std::vector.
11480 (print_converted_chars_to_obstack): Likewise.
11481 (generic_printstr): Likewise.
11482
4d0fdd9b
SM
114832018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11484
11485 * xml-support.h (struct gdb_xml_value): Add constructor.
11486 <value>: Change type to unique_xmalloc_ptr.
11487 (gdb_xml_value_s): Remove typedef.
11488 (DEF_VEC_O (gdb_xml_value_s)): Remove.
11489 (gdb_xml_element_start_handler): Change parameter type to
11490 std::vector.
11491 (xml_find_attribute): Likewise.
11492 * xml-support.c (xml_find_attribute): Change parameter type to
11493 std::vector and adjust.
11494 (gdb_xml_values_cleanup): Remove.
11495 (gdb_xml_parser::start_element): Adjust to std::vector.
11496 (xinclude_start_include): Change paraeter type to std::vector
11497 and adjust.
11498 * btrace.c (check_xml_btrace_version): Likewise.
11499 (parse_xml_btrace_block): Likewise.
11500 (parse_xml_btrace_pt_config_cpu): Likewise.
11501 (parse_xml_btrace_pt): Likewise.
11502 (parse_xml_btrace_conf_bts): Likewise.
11503 (parse_xml_btrace_conf_pt): Likewise.
11504 * memory-map.c (memory_map_start_memory): Likewise.
11505 (memory_map_start_property): Likewise.
11506 * osdata.c (osdata_start_osdata): Likewise.
11507 (osdata_start_item): Likewise.
11508 (osdata_start_column): Likewise.
11509 * remote.c (start_thread): Likewise.
11510 * solib-aix.c (library_list_start_library): Likewise.
11511 (library_list_start_list): Likewise.
11512 * solib-svr4.c (library_list_start_library): Likewise.
11513 (svr4_library_list_start_list): Likewise.
11514 * solib-target.c (library_list_start_segment): Likewise.
11515 (library_list_start_section): Likewise.
11516 (library_list_start_library): Likewise.
11517 (library_list_start_list): Likewise.
11518 * tracepoint.c (traceframe_info_start_memory): Likewise.
11519 (traceframe_info_start_tvar): Likewise.
11520 * xml-syscall.c (syscall_start_syscall): Likewise.
11521 * xml-tdesc.c (tdesc_start_target): Likewise.
11522 (tdesc_start_feature): Likewise.
11523 (tdesc_start_reg): Likewise.
11524 (tdesc_start_union): Likewise.
11525 (tdesc_start_struct): Likewise.
11526 (tdesc_start_flags): Likewise.
11527 (tdesc_start_enum): Likewise.
11528 (tdesc_start_field): Likewise.
11529 (tdesc_start_enum_value): Likewise.
11530 (tdesc_start_vector): Likewise.
11531
f979c73f
SM
115322018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11533
11534 * extension.h (struct xmethod_worker) <clone>: Remove.
11535 * python/py-xmethods.c (struct python_xmethod_worker) <clone>:
11536 Remove.
11537 (python_xmethod_worker::clone): Remove.
11538 * valops.c (find_overload_match): Use std::move instead of
11539 clone.
11540
ba18742c
SM
115412018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
11542
11543 * extension-priv.h (enum ext_lang_rc): Remove, move to extension.h.
11544 (struct extension_language_ops) <clone_xmethod_worker_data>: Remove.
11545 <free_xmethod_worker_data>: Remove.
11546 <get_matching_xmethod_workers>: Chance VEC to std::vector.
11547 <get_xmethod_arg_types>: Remove.
11548 <get_xmethod_result_type>: Remove.
11549 <invoke_xmethod>: Remove.
11550 * extension.c (new_xmethod_worker): Remove.
11551 (clone_xmethod_worker): Remove.
11552 (get_matching_xmethod_workers): Return void, pass std::vector by
11553 pointer.
11554 (get_xmethod_arg_types): Rename to...
11555 (xmethod_worker::get_arg_types): ... this, and adjust.
11556 (get_xmethod_result_type): Rename to...
11557 (xmethod_worker::get_result_type): ... this, and adjust.
11558 (invoke_xmethod): Remove.
11559 (free_xmethod_worker): Remove.
11560 (free_xmethod_worker_vec): Remove.
11561 * extension.h (enum ext_lang_rc): Move here from
11562 extension-priv.h.
11563 (struct xmethod_worker): Add constructor and destructor.
11564 <data>: Remove.
11565 <value>: Remove.
11566 <invoke, clone, do_get_result_type, do_get_arg_types>: New
11567 virtual pure methods.
11568 <get_arg_types, get_result_type>: New methods.
11569 (xmethod_worker_ptr): Remove typedef.
11570 (DEF_VEC_P (xmethod_worker_ptr)): Remove.
11571 (xmethod_worker_vec): Remove typedef.
11572 (xmethod_worker_up): New typedef.
11573 (invoke_xmethod): Remove.
11574 (clone_xmethod_worker): Remove.
11575 (free_xmethod_worker): Remove.
11576 (free_xmethod_worker_vec): Remove.
11577 (get_xmethod_arg_types): Remove.
11578 (get_xmethod_result_type): Remove.
11579 * valops.c (find_method_list): Use std::vector, don't use
11580 intermediate vector.
11581 (value_find_oload_method_list): Use std::vector.
11582 (find_overload_match): Use std::vector.
11583 (find_oload_champ): Use std::vector.
11584 * value.c (value_free): Use operator delete.
11585 (value_of_xmethod): Rename to...
11586 (value_from_xmethod): ... this. Don't assign
11587 xmethod_worker::value, take rvalue-reference.
11588 (result_type_of_xmethod): Adjust.
11589 (call_xmethod): Adjust.
11590 * value.h: Include extension.h.
11591 (struct xmethod_worker): Don't forward-declare.
11592 (value_of_xmethod): Rename to...
11593 (value_from_xmethod): ... this, take rvalue-reference.
11594 * python/py-xmethods.c (struct gdbpy_worker_data): Rename to...
11595 (struct python_xmethod_worker): ... this, add constructor and
11596 destructor.
11597 <invoke, clone, do_get_arg_types, do_get_result_type>: Implement.
11598 (gdbpy_free_xmethod_worker_data): Rename to...
11599 (python_xmethod_worker::~python_xmethod_worker): ... this and
11600 adjust.
11601 (gdbpy_clone_xmethod_worker_data): Rename to...
11602 (python_xmethod_worker::clone): ... this and adjust.
11603 (gdbpy_get_matching_xmethod_workers): Use std::vector, don't use
11604 temporary vector.
11605 (gdbpy_get_xmethod_arg_types): Rename to...
11606 (python_xmethod_worker::do_get_arg_types): ... this and adjust.
11607 (gdbpy_get_xmethod_result_type): Rename to...
11608 (python_xmethod_worker::do_get_result_type): ... this and
11609 adjust.
11610 (gdbpy_invoke_xmethod): Rename to...
11611 (python_xmethod_worker::invoke): ... this and adjust.
11612 (new_python_xmethod_worker): Rename to...
11613 (python_xmethod_worker::python_xmethod_worker): ... this and
11614 adjust.
11615 * python/python-internal.h (gdbpy_clone_xmethod_worker_data):
11616 Remove.
11617 (gdbpy_free_xmethod_worker_data): Remove.
11618 (gdbpy_get_matching_xmethod_workers): Use std::vector.
11619 (gdbpy_get_xmethod_arg_types): Remove.
11620 (gdbpy_get_xmethod_result_type): Remove.
11621 (gdbpy_invoke_xmethod): Remove.
11622 * python/python.c (python_extension_ops): Remove obsolete
11623 callbacks.
11624
e379cee6
PA
116252018-01-05 Pedro Alves <palves@redhat.com>
11626
11627 PR gdb/18653
11628 * common/signals-state-save-restore.c
11629 (save_original_signals_state): New parameter 'quiet'. Warn if we
11630 find a custom handler preinstalled, instead of internal erroring.
11631 But only warn if !quiet.
11632 * common/signals-state-save-restore.h
11633 (save_original_signals_state): New parameter 'quiet'.
11634 * main.c (captured_main_1): Move save_original_signals_state call
11635 after option handling, and pass QUIET.
11636
a655456c
PA
116372018-01-05 Pedro Alves <palves@redhat.com>
11638
11639 * spu-tdep.c (spu_catch_start): Pass
11640 symbol_name_match_type::SEARCH_NAME to block_lookup_symbol.
11641
de63c46b
PA
116422018-01-05 Pedro Alves <palves@redhat.com>
11643
11644 PR gdb/22670
11645 * ada-lang.c (literal_symbol_name_matcher): New function.
11646 (ada_get_symbol_name_matcher): Use it for
11647 symbol_name_match_type::SEARCH_NAME.
11648 * block.c (block_lookup_symbol): New parameter 'match_type'. Pass
11649 it down instead of assuming symbol_name_match_type::FULL.
11650 * block.h (block_lookup_symbol): New parameter 'match_type'.
11651 * c-valprint.c (print_unpacked_pointer): Use
11652 lookup_symbol_search_name instead of lookup_symbol.
11653 * compile/compile-object-load.c (get_out_value_type): Pass down
11654 symbol_name_match_type::SEARCH_NAME.
11655 * cp-namespace.c (cp_basic_lookup_symbol): Pass down
11656 symbol_name_match_type::FULL.
11657 * cp-support.c (cp_get_symbol_name_matcher): Handle
11658 symbol_name_match_type::SEARCH_NAME.
11659 * infrun.c (insert_exception_resume_breakpoint): Use
11660 lookup_symbol_search_name.
11661 * p-valprint.c (pascal_val_print): Use lookup_symbol_search_name.
11662 * psymtab.c (maintenance_check_psymtabs): Use
11663 symbol_name_match_type::SEARCH_NAME and SYMBOL_SEARCH_NAME.
11664 * stack.c (print_frame_args): Use lookup_symbol_search_name and
11665 SYMBOL_SEARCH_NAME.
11666 * symtab.c (lookup_local_symbol): Don't demangle the lookup name
11667 if symbol_name_match_type::SEARCH_NAME.
11668 (lookup_symbol_in_language): Pass down
11669 symbol_name_match_type::FULL.
11670 (lookup_symbol_search_name): New.
11671 (lookup_language_this): Pass down
11672 symbol_name_match_type::SEARCH_NAME.
11673 (lookup_symbol_aux, lookup_local_symbol): New parameter
11674 'match_type'. Pass it down.
11675 * symtab.h (symbol_name_match_type::SEARCH_NAME): New enumerator.
11676 (lookup_symbol_search_name): New declaration.
11677 (lookup_symbol_in_block): New 'match_type' parameter.
11678
f98fc17b
PA
116792018-01-05 Pedro Alves <palves@redhat.com>
11680
11681 PR gdb/22670
11682 * ada-lang.c (ada_lookup_encoded_symbol): Reimplement in terms of
11683 ada_lookup_symbol.
11684 (ada_lookup_symbol): Reimplement in terms of
11685 ada_lookup_symbol_list, bits factored out from
11686 ada_lookup_encoded_symbol.
11687
342f8240
JB
116882018-01-05 Joel Brobecker <brobecker@adacore.com>
11689
11690 * ada-exp.y (write_object_renaming): When subscripting an array
11691 using a symbol as the index, pass the block in call to
11692 ada_lookup_encoded_symbol when looking that symbol up.
11693
7150d33c
JG
116942018-01-05 Jerome Guitton <guitton@adacore.com>
11695
11696 * ada-lang.c (ada_array_length): Use ada_index_type instead of
11697 TYPE_INDEX_TYPE.
11698
cc0e770c
JB
116992018-01-05 Joel Brobecker <brobecker@adacore.com>
11700
11701 * ada-lang.c (ada_to_fixed_value_create): Add handling of
11702 the case where VALUE_LVAL (val0) is not lval_memory.
11703
f79da888 117042018-01-05 Xavier Roirand <roirand@adacore.com>
e3861a03
XR
11705
11706 * ada-valprint.c (print_optional_low_bound): Handle
11707 character-indexed array printing like boolean-indexed array
11708 printing.
11709
cd385f94
JB
117102018-01-05 Joel Brobecker <brobecker@adacore.com>
11711
11712 * NEWS: Create a new section for the next release branch.
11713 Rename the section of the current branch, now that it has
11714 been cut.
11715
09aca949
JB
117162018-01-05 Joel Brobecker <brobecker@adacore.com>
11717
11718 GDB 8.1 branch created (5219ac6237c272b938c28517bf371429260c71e7):
11719 * version.in: Bump version to 8.1.50.DATE-git.
11720
9f757bf7
XR
117212018-01-03 Xavier Roirand <roirand@adacore.com>
11722
11723 * ada-lang.h (ada_exception_catchpoint_kind) <ada_catch_handlers>:
11724 Add field.
11725 * ada-lang.c (struct exception_support_info) <catch_handlers_sym>:
11726 Add field.
11727 (default_exception_support_info) <catch_handlers_sym>: Add field.
11728 (exception_support_info_fallback) <catch_handlers_sym>: Add field.
11729 (ada_exception_name_addr_1): Add "catch handlers" handling.
11730 (ada_exception_catchpoint_cond_string) <ex>: New parameter.
11731 Update all callers.
11732 (create_excep_cond_exprs) <ex>: Add parameter.
11733 (re_set_exception): Update create_excep_cond_exprs call.
11734 (print_it_exception, print_one_exception, print_mention_exception)
11735 (print_recreate_exception): Add "catch handler" handling.
11736 (allocate_location_catch_handlers, re_set_catch_handlers)
11737 (check_status_catch_handlers, print_it_catch_handlers)
11738 (print_one_catch_handlers, print_mention_catch_handlers)
11739 (print_recreate_catch_handlers): New function.
11740 (catch_handlers_breakpoint_ops): New variable.
11741 (catch_ada_exception_command_split) <is_catch_handlers_cmd>:
11742 Add parameter. Add "catch handler" handling.
11743 (ada_exception_sym_name, ada_exception_breakpoint_ops):
11744 Add "catch handler" handling.
11745 (ada_exception_catchpoint_cond_string): Add "catch handler"
11746 handling.
11747 (create_ada_exception_catchpoint): Update create_excep_cond_exprs
11748 call.
11749 (catch_ada_handlers_command): New function.
11750 (initialize_ada_catchpoint_ops): Initialize "catch handlers"
11751 operations structure.
11752 (_initialize_ada_language): Add "catch handlers" command entry.
11753 * NEWS: Document "catch handlers" feature.
11754
9fe561ab
JB
117552018-01-02 Joel Brobecker <brobecker@adacore.com>
11756
11757 * ada-lang.c (ada_value_slice_from_ptr): Take array stride into
11758 account when creating the array type of the slice.
11759 (ada_value_slice): Likewise.
11760
a405673c
JB
117612018-01-02 Joel Brobecker <brobecker@adacore.com>
11762
11763 * gdbtypes.h (enum dynamic_prop_node_kind) <DYN_PROP_BYTE_STRIDE>:
11764 New enum value.
11765 (create_array_type_with_stride): Add byte_stride_prop parameter.
11766 * gdbtypes.c (create_array_type_with_stride) <byte_stride_prop>:
11767 New parameter. Update all callers in this file.
11768 (array_type_has_dynamic_stride): New function.
11769 (is_dynamic_type_internal, resolve_dynamic_array): Add handling
11770 of arrays with dynamic byte strides.
11771 * dwarf2read.c (read_array_type): Add support for dynamic
11772 DW_AT_byte_stride attributes.
11773
74a2f8ff
JB
117742018-01-02 Joel Brobecker <brobecker@adacore.com>
11775
11776 * dwarf2read.c (read_unspecified_type): Treat
11777 DW_TAG_enumeration_type DIEs from Ada units as stubs.
11778
e2882c85
JB
117792018-01-01 Joel Brobecker <brobecker@adacore.com>
11780
11781 Update copyright year range in all GDB files.
11782
1690bb24
JB
117832018-01-01 Joel Brobecker <brobecker@adacore.com>
11784
11785 * copyright.py (BY_HAND): Remove gdb/testsuite/gdb.base/step-line.inp
11786 and gdb/testsuite/gdb.base/step-line.c.
11787
0f0c98a8
JB
117882018-01-01 Joel Brobecker <brobecker@adacore.com>
11789
11790 * copyright.py (main): Dump the contents of
11791 MULTIPLE_COPYRIGHT_HEADERS (separately) from BY_HAND,
11792 even if BY_HAND is empty.
11793
82e1e79a
JB
117942018-01-01 Joel Brobecker <brobecker@adacore.com>
11795
11796 * top.c (print_gdb_version): Update Copyright year in version
11797 message.
11798
053f54e5 117992018-01-01 Joel Brobecker <brobecker@adacore.com>
47fea877 11800
053f54e5 11801 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2017.
47fea877 11802
053f54e5 11803For older changes see ChangeLog-2017.
c906108c
SS
11804\f
11805Local Variables:
11806mode: change-log
11807left-margin: 8
11808fill-column: 74
11809version-control: never
57da7796 11810coding: utf-8
c906108c 11811End:
This page took 3.118235 seconds and 4 git commands to generate.