gdb: Fix build failure with GCC 7
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
2
3 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
4
5 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
6 Yao Qi <yao.qi@linaro.org>
7
8 * cp-support.c (cp_canonicalize_string_full): Use
9 gdb::unique_xmalloc_ptr<char>.
10 (cp_canonicalize_string): Likewise.
11
12 2017-08-09 Yao Qi <yao.qi@linaro.org>
13
14 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
15 * regformats/i386/amd64-avx-avx512.dat: Remove.
16 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
17 * regformats/i386/amd64-avx-mpx.dat:Remove.
18 * regformats/i386/amd64-avx.dat: Remove.
19 * regformats/i386/amd64-mpx.dat: Remove.
20 * regformats/i386/i386-avx-avx512.dat: Remove.
21 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
22 * regformats/i386/i386-avx-mpx.dat: Remove.
23 * regformats/i386/i386-mmx.dat: Remove.
24 * regformats/i386/i386-mpx.dat: Remove.
25
26 2017-08-09 Yao Qi <yao.qi@linaro.org>
27
28 * amd64-tdep.h (tdesc_x32): Remove the declaration.
29 * amd64-tdep.c: Don't include features/i386/x32*.c.
30 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
31 functions.
32 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
33 and i386/x32-avx-avx512.
34 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
35 and i386/x32.xml.
36 * features/i386/x32-avx-avx512.c: Removed.
37 * features/i386/x32-avx-avx512.xml: Removed.
38 * features/i386/x32-avx.c: Removed.
39 * features/i386/x32-avx.xml: Removed.
40 * features/i386/x32.c: Removed.
41 * features/i386/x32.xml: Removed.
42 * regformats/i386/x32-avx-avx512.dat: Removed.
43 * regformats/i386/x32-avx.dat: Removed.
44 * regformats/i386/x32.dat: Removed.
45
46 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
47
48 PR breakpoints/21886
49 * mem-break.c (default_memory_insert_breakpoint): Use
50 `->placed_address' rather than `->reqstd_address' for the
51 breakpoint location.
52
53 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
54
55 * arch-utils.c (default_print_insn): Remove arch/mach/endian
56 assertions.
57
58 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
59
60 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
61 a union of `tdep_info', `tdesc_data' and `id'.
62 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
63 rather than `info.tdep_info'.
64 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
65 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
66 * i386-tdep.c (i386_gdbarch_init): Likewise.
67 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
68 * mips-tdep.c (mips_gdbarch_init): Likewise.
69 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
70 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
71 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
72 `info.tdep_info'.
73 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
74 `info.tdep_info'.
75 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
76 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
77 `info.tdep_info'.
78 * spu-tdep.c (spu_gdbarch_init): Likewise.
79 * gdbarch.h: Regenerate.
80
81 2017-08-07 Leszek Swirski <leszeks@google.com>
82
83 PR symtab/20899
84 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
85
86 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
87
88 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
89 (gdbsim_open): Rename gdb_argv args object to argv.
90
91 2017-08-05 Tom Tromey <tom@tromey.com>
92
93 * compile/compile-object-load.c (compile_object_load): Use
94 gdb::unique_xmalloc_ptr.
95 * cli/cli-dump.c (scan_filename): Rename from
96 scan_filename_with_cleanup. Change return type.
97 (scan_expression): Rename from scan_expression_with_cleanup.
98 Change return type.
99 (dump_memory_to_file, dump_value_to_file, restore_command):
100 Use gdb::unique_xmalloc_ptr. Update.
101 * cli/cli-cmds.c (find_and_open_script): Use
102 gdb::unique_xmalloc_ptr.
103 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
104 * symmisc.c (maintenance_print_symbols)
105 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
106 * symfile.c (symfile_bfd_open, generic_load)
107 (add_symbol_file_command, remove_symbol_file_command): Use
108 gdb::unique_xmalloc_ptr.
109 * source.c (openp): Use gdb::unique_xmalloc_ptr.
110 * psymtab.c (maintenance_print_psymbols): Use
111 gdb::unique_xmalloc_ptr.
112 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
113 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
114 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
115 (reload_shared_libraries_1): Likewise.
116
117 2017-08-05 Tom Tromey <tom@tromey.com>
118
119 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
120 (rust_op_vector, rust_set_vector): New typedefs.
121 (current_parser): New global.
122 (work_obstack): Change to pointer type. Update all users.
123 (rust_ast, pstate): Remove globals.
124 (struct rust_parser): New.
125 (%union) <params, field_inits>: Change type.
126 (start, tuple_expr, unit_expr, struct_expr_list, literal)
127 (field_expr, expr_list, maybe_expr_list, type_list): Update.
128 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
129 (convert_params_to_types, convert_params_to_expression): Change
130 type of "params".
131 (ast_string): Change type of "fields".
132 (rust_parse): Make a rust_parser. Remove cleanups.
133 (rust_lex_tests): Make and install an auto_obstack.
134
135 2017-08-04 Yao Qi <yao.qi@linaro.org>
136
137 * configure.srv (ipa_x32_linux_regobj): New.
138 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
139 instead of X86_TDESC_AVX512.
140 (initialize_low_tracepoint): Call
141 init_registers_x32_avx_avx512_linux.
142
143 2017-08-04 Yao Qi <yao.qi@linaro.org>
144
145 * utils.h (gdb_argv): Add namespace std for nullptr_t.
146
147 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
148
149 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
150
151 2017-08-03 Tom Tromey <tom@tromey.com>
152
153 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
154 Remove.
155 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
156
157 2017-08-03 Tom Tromey <tom@tromey.com>
158
159 * python/py-param.c (compute_enum_values): Use gdb_argv.
160
161 2017-08-03 Tom Tromey <tom@tromey.com>
162
163 * utils.h (struct gdb_argv_deleter): New.
164 (gdb_argv): New class.
165 * utils.c (gdb_argv::reset): New method.
166 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
167 * tracefile.c (tsave_command): Use gdb_argv.
168 * top.c (new_ui_command): Use gdb_argv.
169 * symmisc.c (maintenance_print_symbols)
170 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
171 * symfile.c (symbol_file_command, generic_load)
172 (remove_symbol_file_command): Use gdb_argv.
173 * stack.c (backtrace_command): Use gdb_argv.
174 * source.c (add_path, show_substitute_path_command)
175 (unset_substitute_path_command, set_substitute_path_command):
176 Use gdb_argv.
177 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
178 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
179 * remote.c (extended_remote_run, remote_put_command)
180 (remote_get_command, remote_delete_command): Use gdb_argv.
181 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
182 (gdbsim_open): Use gdb_argv.
183 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
184 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
185 * procfs.c (procfs_info_proc): Use gdb_argv.
186 * interps.c (interpreter_exec_cmd): Use gdb_argv.
187 * infrun.c (handle_command): Use gdb_argv.
188 * inferior.c (add_inferior_command, clone_inferior_command):
189 Use gdb_argv.
190 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
191 * exec.c (exec_file_command): Use gdb_argv.
192 * cli/cli-cmds.c (alias_command): Use gdb_argv.
193 * compile/compile.c (build_argc_argv): Use gdb_argv.
194
195 2017-08-03 Tom Tromey <tom@tromey.com>
196
197 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
198
199 2017-08-03 Tom Tromey <tom@tromey.com>
200
201 * python/python.c (compute_python_string): Return std::string.
202 (gdbpy_eval_from_control_command): Update.
203 (do_start_initialization): Use std::string.
204 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
205 xstrprintf.
206 * python/py-breakpoint.c (local_setattro): Use string_printf, not
207 xstrprintf.
208
209 2017-08-03 Tom Tromey <tom@tromey.com>
210
211 * top.h (do_restore_instream_cleanup): Remove.
212 * top.c (do_restore_instream_cleanup): Remove.
213 (read_command_file): Use scoped_restore.
214 * cli/cli-script.c (execute_user_command): Use scoped_restore.
215
216 2017-08-03 Tom Tromey <tom@tromey.com>
217
218 * cli/cli-script.c (execute_user_command)
219 (execute_control_command): Use scoped_restore.
220
221 2017-08-03 Tom Tromey <tom@tromey.com>
222
223 * cli/cli-script.c (do_restore_user_call_depth): Remove.
224 (execute_user_command): Remove user_call_depth; use
225 user_args_stack's size instead.
226
227 2017-08-03 Tom Tromey <tom@tromey.com>
228
229 * top.h (in_user_command): Remove.
230 * top.c (in_user_command): Remove.
231 * cli/cli-script.c (do_restore_user_call_depth)
232 (execute_user_command): Update.
233
234 2017-08-03 Tom Tromey <tom@tromey.com>
235
236 * valops.c (search_struct_method): Use gdb::byte_vector.
237 * valarith.c (value_concat): Use std::vector.
238 * target.c (memory_xfer_partial): Use gdb::byte_vector.
239 (simple_search_memory): Likewise.
240 * printcmd.c (find_string_backward): Use gdb::byte_vector.
241 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
242 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
243 * elfread.c (elf_rel_plt_read): Use std::string.
244 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
245 * cli/cli-dump.c (restore_section_callback): Use
246 gdb::byte_vector.
247
248 2017-08-03 Tom Tromey <tom@tromey.com>
249
250 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
251
252 2017-08-03 Tom Tromey <tom@tromey.com>
253
254 * tui/tui-regs.c (tui_restore_gdbout): Remove.
255 (tui_register_format): Use scoped_restore.
256
257 2017-08-03 Tom Tromey <tom@tromey.com>
258
259 * reverse.c (exec_direction_default): Remove.
260 (exec_reverse_once): Use scoped_restore.
261 * remote.c (restore_remote_timeout): Remove.
262 (remote_flash_erase, remote_flash_write, remote_flash_done)
263 (readchar, remote_serial_write): Use scoped_restore.
264 * cli/cli-script.c (struct source_cleanup_lines_args)
265 (source_cleanup_lines): Remove.
266 (script_from_file): Use scoped_restore.
267 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
268 (source_command): Use scoped_restore.
269
270 2017-08-03 Tom Tromey <tom@tromey.com>
271
272 * utils.h (make_cleanup_free_so): Remove.
273 * utils.c (do_free_so, make_cleanup_free_so): Remove.
274 * solist.h (struct so_deleter): New.
275 (so_list_up): New typedef.
276 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
277
278 2017-08-03 Tom Tromey <tom@tromey.com>
279
280 * utils.h (make_cleanup_restore_current_language): Remove.
281 * utils.c (do_restore_current_language)
282 (make_cleanup_restore_current_language): Remove.
283 * parse.c (parse_exp_in_context_1)
284 (parse_expression_with_language): Use
285 scoped_restore_current_language.
286 * mi/mi-main.c (mi_cmd_execute): Use
287 scoped_restore_current_language.
288 * language.h (scoped_restore_current_language): New class.
289
290 2017-08-03 Tom Tromey <tom@tromey.com>
291
292 * compile/compile.c (cleanup_unlink_file): Remove.
293 (compile_to_object): Use gdb::unlinker.
294 (eval_compile_command): Likewise.
295
296 2017-08-03 Tom Tromey <tom@tromey.com>
297
298 * utils.h (make_cleanup_fclose): Remove.
299 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
300
301 2017-08-03 Tom Tromey <tom@tromey.com>
302
303 * top.c (open_terminal_stream): Return gdb_file_up.
304 (new_ui_command): Update.
305
306 2017-08-03 Tom Tromey <tom@tromey.com>
307
308 * source.c (print_source_lines_base, forward_search_command)
309 (reverse_search_command): Use gdb_file_up.
310
311 2017-08-03 Tom Tromey <tom@tromey.com>
312
313 * fbsd-nat.c (fbsd_find_memory_regions): Update.
314
315 2017-08-03 Tom Tromey <tom@tromey.com>
316
317 * cli/cli-cmds.c (find_and_open_script): Change return type.
318 Remove "streamp" and "full_path" parameters.
319 (source_script_with_search): Update.
320 * auto-load.c (source_script_file): Update.
321 * cli/cli-cmds.h (find_and_open_script): Change type.
322 (open_script): New struct.
323
324 2017-08-03 Tom Tromey <tom@tromey.com>
325
326 * xml-support.c (xml_fetch_content_from_file): Update.
327 * ui-file.c (stdio_file::open): Update.
328 * tracefile-tfile.c (tfile_start): Update.
329 * remote.c (remote_file_put, remote_file_get): Update.
330 * nat/linux-procfs.c (linux_proc_get_int)
331 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
332 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
333 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
334 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
335 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
336 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
337 * linux-nat.c (linux_proc_pending_signals): Update.
338 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
339 (file_closer): Remove.
340 * compile/compile.c (compile_to_object): Update.
341 * common/filestuff.h (struct gdb_file_deleter): New.
342 (gdb_file_up): New typedef.
343 (gdb_fopen_cloexec): Change return type.
344 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
345 * cli/cli-dump.c (fopen_with_cleanup): Remove.
346 (dump_binary_file, restore_binary_file): Update.
347 * auto-load.c (auto_load_objfile_script_1): Update.
348
349 2017-08-03 Tom Tromey <tom@tromey.com>
350
351 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
352 (info_static_tracepoint_markers_command): Likewise.
353 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
354 * skip.c (skip_info): Use ui_out_emit_table.
355 * progspace.c (print_program_space): Use ui_out_emit_table.
356 * osdata.c (info_osdata): Use ui_out_emit_table.
357 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
358 ui_out_emit_table.
359 * linux-thread-db.c (info_auto_load_libthread_db): Use
360 ui_out_emit_table.
361 * inferior.c (print_inferior): Use ui_out_emit_table.
362 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
363 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
364 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
365 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
366 * ui-out.h (class ui_out_emit_table): New.
367
368 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
369
370 * mips-tdep.c (mips_fpu_type_str): New function.
371 (mips_dump_tdep): Call it.
372
373 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
374
375 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
376 `->mips_fpu_type'.
377
378 2017-07-31 Xavier Roirand <roirand@adacore.com>
379
380 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
381
382 2017-07-27 Xavier Roirand <roirand@adacore.com>
383
384 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
385
386 2017-07-26 Yao Qi <yao.qi@linaro.org>
387
388 * cli/cli-cmds.c (maintenancechecklist): New variable.
389 * gdbcmd.h (maintenancechecklist): Declare it.
390 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
391 Call i386_linux_read_description with different masks.
392 * maint.c (maintenance_check_command): New function.
393 (_initialize_maint_cmds): Call add_prefix_cmd.
394 * target-descriptions.c (tdesc_reg): override operator != and ==.
395 (tdesc_type): Likewise.
396 (tdesc_feature): Likewise.
397 (target_desc): Likewise.
398 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
399 (maintenance_check_xml_descriptions): New function.
400 (_initialize_target_descriptions) Add command "xml-descriptions".
401 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
402
403 2017-07-26 Yao Qi <yao.qi@linaro.org>
404
405 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
406 Include features/i386/32bit-*.c.
407 (i386_linux_read_description): Generate target description if it
408 doesn't exist.
409 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
410 functions.
411 * features/i386/32bit-linux.c: Re-generated.
412 * features/i386/32bit-sse.c: Likewise.
413 * target-descriptions.c (print_c_feature::visit): Print code to
414 set register number if needed.
415 (print_c_feature) <m_next_regnum>: New field.
416
417 2017-07-26 Yao Qi <yao.qi@linaro.org>
418
419 * features/Makefile (CFILES): Rename with TDESC_CFILES.
420 (FEATURE_XMLFILES): New.
421 (FEATURE_CFILES): New.
422 New rules.
423 (clean-cfiles): Remove generated c files.
424 * features/i386/32bit-avx.c: Generated.
425 * features/i386/32bit-avx512.c: Generated.
426 * features/i386/32bit-core.c: Generated.
427 * features/i386/32bit-linux.c: Generated.
428 * features/i386/32bit-mpx.c: Generated.
429 * features/i386/32bit-pkeys.c: Generated.
430 * features/i386/32bit-sse.c: Generated.
431 * target-descriptions.c: Include algorithm.
432 (tdesc_element_visitor): Add method visit_end.
433 (print_c_tdesc): Implement visit_end.
434 (print_c_tdesc:: m_filename_after_features): Move it to
435 protected.
436 (print_c_feature): New class.
437 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
438 name starts with "i386/32bit-".
439
440 2017-07-26 Yao Qi <yao.qi@linaro.org>
441
442 * target-descriptions.c (tdesc_element_visitor): New class.
443 (tdesc_element): New class.
444 (tdesc_reg): Inherit from tdesc_element.
445 (tdesc_reg::accept): New function.
446 (tdesc_type): Inherit from tdesc_element.
447 (tdesc_type::accept): New function.
448 (tdesc_feature): Inherit from tdesc_element.
449 (tdesc_feature::accept): New function.
450 (target_desc): Inherit from tdesc_element.
451 (target_desc::target_desc): New.
452 (target_desc::~target_desc): New.
453 (target_desc::accept): New.
454 (allocate_target_description): Use new.
455 (free_target_description): Use delete.
456 (print_c_tdesc): New class.
457 (maint_print_c_tdesc_cmd): Adjust.
458
459 * features/aarch64.c: Re-generated.
460 * features/arc-arcompact.c: Re-generated.
461 * features/arc-v2.c: Re-generated.
462 * features/arm/arm-with-iwmmxt.c: Re-generated.
463 * features/arm/arm-with-m.c: Re-generated.
464 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
465 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
466 * features/arm/arm-with-neon.c: Re-generated.
467 * features/arm/arm-with-vfpv2.c: Re-generated.
468 * features/arm/arm-with-vfpv3.c: Re-generated.
469 * features/i386/amd64-avx-avx512.c: Re-generated.
470 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
471 * features/i386/amd64-avx.c: Re-generated.
472 * features/i386/amd64-avx-linux.c: Re-generated.
473 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
474 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
475 * features/i386/amd64-avx-mpx.c: Re-generated.
476 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
477 * features/i386/amd64.c: Re-generated.
478 * features/i386/amd64-linux.c: Re-generated.
479 * features/i386/amd64-mpx.c: Re-generated.
480 * features/i386/amd64-mpx-linux.c: Re-generated.
481 * features/i386/i386-avx-avx512.c: Re-generated.
482 * features/i386/i386-avx-avx512-linux.c: Re-generated.
483 * features/i386/i386-avx.c: Re-generated.
484 * features/i386/i386-avx-linux.c: Re-generated.
485 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
486 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
487 * features/i386/i386-avx-mpx.c: Re-generated.
488 * features/i386/i386-avx-mpx-linux.c: Re-generated.
489 * features/i386/i386.c: Re-generated.
490 * features/i386/i386-linux.c: Re-generated.
491 * features/i386/i386-mmx.c: Re-generated.
492 * features/i386/i386-mmx-linux.c: Re-generated.
493 * features/i386/i386-mpx.c: Re-generated.
494 * features/i386/i386-mpx-linux.c: Re-generated.
495 * features/i386/x32-avx-avx512.c: Re-generated.
496 * features/i386/x32-avx-avx512-linux.c: Re-generated.
497 * features/i386/x32-avx.c: Re-generated.
498 * features/i386/x32-avx-linux.c: Re-generated.
499 * features/i386/x32.c: Re-generated.
500 * features/i386/x32-linux.c: Re-generated.
501 * features/microblaze.c: Re-generated.
502 * features/microblaze-with-stack-protect.c: Re-generated.
503 * features/mips64-dsp-linux.c: Re-generated.
504 * features/mips64-linux.c: Re-generated.
505 * features/mips-dsp-linux.c: Re-generated.
506 * features/mips-linux.c: Re-generated.
507 * features/nds32.c: Re-generated.
508 * features/nios2.c: Re-generated.
509 * features/nios2-linux.c: Re-generated.
510 * features/rs6000/powerpc-32.c: Re-generated.
511 * features/rs6000/powerpc-32l.c: Re-generated.
512 * features/rs6000/powerpc-403.c: Re-generated.
513 * features/rs6000/powerpc-403gc.c : Re-generated.
514 * features/rs6000/powerpc-405.c: Re-generated.
515 * features/rs6000/powerpc-505.c: Re-generated.
516 * features/rs6000/powerpc-601.c: Re-generated.
517 * features/rs6000/powerpc-602.c: Re-generated.
518 * features/rs6000/powerpc-603.c: Re-generated.
519 * features/rs6000/powerpc-604.c: Re-generated.
520 * features/rs6000/powerpc-64.c: Re-generated.
521 * features/rs6000/powerpc-64l.c: Re-generated.
522 * features/rs6000/powerpc-7400.c: Re-generated.
523 * features/rs6000/powerpc-750.c: Re-generated.
524 * features/rs6000/powerpc-860.c: Re-generated.
525 * features/rs6000/powerpc-altivec32.c: Re-generated.
526 * features/rs6000/powerpc-altivec32l.c: Re-generated.
527 * features/rs6000/powerpc-altivec64.c: Re-generated.
528 * features/rs6000/powerpc-altivec64l.c: Re-generated.
529 * features/rs6000/powerpc-cell32l.c: Re-generated.
530 * features/rs6000/powerpc-cell64l.c: Re-generated.
531 * features/rs6000/powerpc-e500.c: Re-generated.
532 * features/rs6000/powerpc-e500l.c: Re-generated.
533 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
534 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
535 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
536 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
537 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
538 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
539 * features/rs6000/powerpc-vsx32.c: Re-generated.
540 * features/rs6000/powerpc-vsx32l.c: Re-generated.
541 * features/rs6000/powerpc-vsx64.c: Re-generated.
542 * features/rs6000/powerpc-vsx64l.c: Re-generated.
543 * features/rs6000/rs6000.c: Re-generated.
544 * features/s390-linux32.c: Re-generated.
545 * features/s390-linux32v1.c: Re-generated.
546 * features/s390-linux32v2.c: Re-generated.
547 * features/s390-linux64.c: Re-generated.
548 * features/s390-linux64v1.c: Re-generated.
549 * features/s390-linux64v2.c: Re-generated.
550 * features/s390-te-linux64.c: Re-generated.
551 * features/s390-tevx-linux64.c: Re-generated.
552 * features/s390-vx-linux64.c: Re-generated.
553 * features/s390x-linux64.c: Re-generated.
554 * features/s390x-linux64v1.c: Re-generated.
555 * features/s390x-linux64v2.c: Re-generated.
556 * features/s390x-te-linux64.c: Re-generated.
557 * features/s390x-tevx-linux64.c: Re-generated.
558 * features/s390x-vx-linux64.c: Re-generated.
559 * features/sparc/sparc32-solaris.c: Re-generated.
560 * features/sparc/sparc64-solaris.c: Re-generated.
561 * features/tic6x-c62x.c: Re-generated.
562 * features/tic6x-c62x-linux.c: Re-generated.
563 * features/tic6x-c64x.c: Re-generated.
564 * features/tic6x-c64x-linux.c: Re-generated.
565 * features/tic6x-c64xp.c: Re-generated.
566 * features/tic6x-c64xp-linux.c: Re-generated.
567
568 2017-07-26 Yao Qi <yao.qi@linaro.org>
569
570 * i386-linux-tdep.c (i386_linux_read_description): New function.
571 (i386_linux_core_read_description): Call
572 i386_linux_read_description.
573 * i386-linux-tdep.h (i386_linux_read_description): Declare.
574 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
575 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
576 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
577 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
578 * x86-linux-nat.c (x86_linux_read_description): Call
579 i386_linux_read_description.
580
581 2017-07-26 Yao Qi <yao.qi@linaro.org>
582
583 * NEWS: Mention it.
584 * features/Makefile (%.c: %.xml): Pass the xml file name to
585 command "maint print c-tdesc".
586 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
587 name from 'arg'.
588
589 2017-07-26 Yao Qi <yao.qi@linaro.org>
590
591 * target-descriptions.c (target_desc): Add ctor and dtor. Do
592 in-class initialization.
593 (tdesc_create_feature): Call new instead of XCNEW.
594 (free_target_description): Ue delete.
595
596 2017-07-25 John Baldwin <jhb@FreeBSD.org>
597
598 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
599
600 2017-07-25 Yao Qi <yao.qi@linaro.org>
601
602 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
603 constant.
604 (amd64_x32_init_abi): Likewise.
605 * amd64-tdep.h (amd64_init_abi): Update declaration.
606 (amd64_x32_init_abi): Likewise.
607
608 2017-07-25 Yao Qi <yao.qi@linaro.org>
609
610 PR tdep/21717
611 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
612 condition for FPSCR.
613 (arm_linux_store_inferior_registers): Likewise.
614
615 2017-07-22 Tom Tromey <tom@tromey.com>
616
617 * break-catch-syscall.c (struct catch_syscall_inferior_data)
618 <syscalls_counts>: Now a std::vector.
619 (get_catch_syscall_inferior_data): Use "new".
620 (catch_syscall_inferior_data_cleanup): Use "delete".
621 (insert_catch_syscall, remove_catch_syscall)
622 (clear_syscall_counts): Update.
623
624 2017-07-22 Tom Tromey <tom@tromey.com>
625
626 * break-catch-syscall.c (syscall_catchpoint)
627 <syscalls_to_be_caught>: Now a std::vector<int>
628 (~syscall_catchpoint): Remove.
629 (insert_catch_syscall, remove_catch_syscall)
630 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
631 (print_mention_catch_syscall, print_recreate_catch_syscall):
632 Update.
633 (create_syscall_event_catchpoint): Change type of "filter"
634 parameter.
635 (catch_syscall_split_args): Return a std::vector.
636 (catch_syscall_command_1, catching_syscall_number_1): Update.
637
638 2017-07-22 Tom Tromey <tom@tromey.com>
639
640 * break-catch-throw.c (struct exception_catchpoint)
641 <exception_rx>: Now a std::string.
642 (~exception_catchpoint): Remove.
643 (print_one_detail_exception_catchpoint): Update.
644 (handle_gnu_v3_exceptions): Change type of except_rx.
645 (extract_exception_regexp): Return a std::string.
646 (catch_exception_command_1): Update.
647
648 2017-07-22 Tom Tromey <tom@tromey.com>
649
650 * break-catch-sig.c (gdb_signal_type): Remove typedef.
651 (struct signal_catchpoint) <signals_to_be_caught>: Now a
652 std::vector.
653 <catch_all>: Now a bool.
654 (~signal_catchpoint): Remove.
655 (signal_catchpoint_insert_location)
656 (signal_catchpoint_remove_location)
657 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
658 (signal_catchpoint_print_mention)
659 (signal_catchpoint_print_recreate)
660 (signal_catchpoint_explains_signal): Update.
661 (create_signal_catchpoint): Change type of "filter" and
662 "catch_all".
663 (catch_signal_split_args): Return a std::vector. Change type of
664 "catch_all".
665 (catch_signal_command): Update.
666
667 2017-07-20 Pedro Alves <palves@redhat.com>
668
669 * ada-lang.c (ada_language_defn): Make extern.
670 (_initialize_ada_language): Remove add_language call.
671 * c-lang.c (c_language_defn, cplus_language_defn)
672 (asm_language_defn, minimal_language_defn): Make extern.
673 (_initialize_c_language): Delete.
674 * completer.c (compare_cstrings): Delete, moved to utils.h.
675 * d-lang.c (d_language_defn): Make extern.
676 (_initialize_d_language): Remove add_language calls.
677 * defs.h (enum language): Add comment.
678 * f-lang.c (f_language_defn): Make extern.
679 (_initialize_f_language): Remove add_language call.
680 * go-lang.c (go_language_defn): Make extern.
681 (_initialize_go_language): Remove add_language call.
682 * language.c: Include <algorithm>.
683 (languages): Redefine as const array.
684 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
685 (set_language_command): Handle "local". Use for-range loop.
686 (set_language): Remove loop.
687 (language_enum): Rewrite.
688 (language_def, language_str): Remove loops.
689 (add_language): Delete.
690 (add_set_language_command): New, based on add_languages.
691 (skip_language_trampoline): Adjust.
692 (local_language_defn): Delete.
693 (language_gdbarch_post_init): Adjust.
694 (_initialize_language): Remove add_language calls. Call
695 add_set_language_command.
696 * language.h (add_language): Delete.
697 (auto_language_defn)
698 (unknown_language_defn, minimal_language_defn, ada_language_defn)
699 (asm_language_defn, c_language_defn, cplus_language_defn)
700 (d_language_defn, f_language_defn, go_language_defn)
701 (m2_language_defn, objc_language_defn, opencl_language_defn)
702 (pascal_language_defn, rust_language_defn): Declare.
703 * m2-lang.c (m2_language_defn): Make extern.
704 (_initialize_m2_language): Remove add_language call.
705 * objc-lang.c (objc_language_defn): Make extern.
706 (_initialize_objc_language): Remove add_language call.
707 * opencl-lang.c (opencl_language_defn): Make extern.
708 (_initialize_opencl_language): Remove add_language call.
709 * p-lang.c (pascal_language_defn): Make extern.
710 (_initialize_pascal_language): Delete.
711 * rust-lang.c (rust_language_defn): Make extern.
712 (_initialize_rust_language): Delete.
713 * utils.h (compare_cstrings): New static inline function.
714
715 2017-07-20 Pedro Alves <palves@redhat.com>
716
717 * ada-lang.c (ada_to_fixed_type_1): Adjust.
718 (get_var_value): Constify parameters.
719 (get_int_var_value): Change prototype.
720 (to_fixed_range_type): Adjust.
721 * ada-lang.h (get_int_var_value): Change prototype.
722
723 2017-07-20 Pedro Alves <palves@redhat.com>
724
725 * dwarf2read.c (dw2_lookup_symbol): Use
726 SYMBOL_MATCHES_SEARCH_NAME.
727 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
728
729 2017-07-20 Pedro Alves <palves@redhat.com>
730
731 * block.c (block_iter_name_step, block_iter_name_first)
732 (block_iter_name_next): Delete.
733 (block_lookup_symbol_primary): Adjust to use
734 dict_iter_match_first/dict_iter_match_next.
735 * block.h (block_iter_name_first, block_iter_name_next): Delete
736 declarations.
737 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
738 dict_iter_match_first/dict_iter_match_next.
739
740 2017-07-20 Pedro Alves <palves@redhat.com>
741
742 * cp-support.c (cp_find_first_component_aux): Add missing case for
743 end of string.
744
745 2017-07-18 David Blaikie <dblaikie@gmail.com>
746
747 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
748 of dwo_cu's dwo_file.
749
750 2017-07-18 Yao Qi <yao.qi@linaro.org>
751
752 * remote.c (store_registers_using_G): Remove one line comment.
753
754 2017-07-18 Yao Qi <yao.qi@linaro.org>
755
756 * regcache.c (regcache_cpy): Simplify it.
757 (regcache::cpy_no_passthrough): Remove it.
758 * regcache.h (cpy_no_passthrough): Remove it.
759 (regcache_dup, regcache_cpy): Update comments.
760
761 2017-07-18 Pedro Alves <palves@redhat.com>
762
763 * remote-sim.c (sim_command_completer): Adjust to work with a
764 completion_tracker instead of a VEC.
765
766 2017-07-17 Pedro Alves <palves@redhat.com>
767
768 * completer.c (complete_source_filenames): New function.
769 (complete_address_and_linespec_locations): New function.
770 (location_completer): Use complete_address_and_linespec_locations.
771 (completion_tracker::build_completion_result): Honor the tracker's
772 request to suppress append.
773 * completer.h (completion_tracker::suppress_append_ws)
774 (completion_tracker::set_suppress_append_ws): New methods.
775 (completion_tracker::m_suppress_append_ws): New field.
776 (complete_source_filenames): New declaration.
777 * linespec.c (linespec_complete_what): New.
778 (struct ls_parser) <complete_what, completion_word,
779 completion_quote_char, completion_quote_end, completion_tracker>:
780 New fields.
781 (string_find_incomplete_keyword_at_end): New.
782 (linespec_lexer_lex_string): Record quote char. If in completion
783 mode, don't throw.
784 (linespec_lexer_consume_token): Advance the completion word point.
785 (linespec_lexer_peek_token): Save/restore completion info.
786 (save_stream_and_consume_token): New.
787 (set_completion_after_number): New.
788 (linespec_parse_basic): Set what to complete next depending on
789 token. Handle function and label completions specially.
790 (parse_linespec): Disable objc shortcut in completion mode. Set
791 what to complete next depending on token type. Skip keyword if in
792 completion mode.
793 (complete_linespec_component, linespec_complete): New.
794 * linespec.h (linespec_complete): Declare.
795
796 2017-07-17 Pedro Alves <palves@redhat.com>
797
798 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
799 Handle 'operator<' / 'operator<<'.
800
801 2017-07-17 Pedro Alves <palves@redhat.com>
802
803 * completer.c (collect_explicit_location_matches): Handle
804 MATCH_LABEL.
805 (convert_explicit_location_to_linespec): New, factored out from
806 ...
807 (convert_explicit_location_to_sals): ... this.
808 (complete_label): New.
809 (linespec_complete_label, find_label_symbols_in_block): New.
810 (find_label_symbols): Add completion_mode parameter and adjust to
811 call find_label_symbols_in_block.
812 * linespec.h (linespec_complete_label): Declare.
813
814 2017-07-17 Pedro Alves <palves@redhat.com>
815
816 * ada-lang.c (ada_collect_symbol_completion_matches): Add
817 complete_symbol_mode parameter.
818 * cli/cli-cmds.c (complete_command): Get the completion result out
819 of the handle_brkchars tracker if used a custom word point.
820 * completer.c: Include "linespec.h".
821 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
822 (advance_to_expression_complete_word_point): New.
823 (completion_tracker::completes_to_completion_word): New.
824 (complete_files_symbols): Pass down
825 complete_symbol_mode::EXPRESSION.
826 (explicit_options, probe_options): New.
827 (collect_explicit_location_matches): Complete on the
828 explictit_loc->foo instead of word. Use
829 linespec_complete_function. Handle MATCH_LINE. Handle offering
830 keyword and options completions.
831 (backup_text_ptr): Delete.
832 (skip_keyword): New.
833 (complete_explicit_location): Remove 'word' parameter. Add
834 language, quoted_arg_start and quoted_arg_end parameters.
835 Rewrite, parsing left to right.
836 (location_completer): Rewrite.
837 (location_completer_handle_brkchars): New function.
838 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
839 (enum complete_line_internal_reason): Adjust comments.
840 (completion_tracker::discard_completions): New.
841 (completer_handle_brkchars_func_for_completer): Handle
842 location_completer.
843 (gdb_custom_word_point_brkchars)
844 (gdb_org_rl_basic_quote_characters): New.
845 (gdb_completion_word_break_characters_throw)
846 (completion_find_completion_word): Handle trackers that use a
847 custom word point.
848 (completion_tracker::advance_custom_word_point_by): New.
849 (completion_tracker::build_completion_result): Don't rely on
850 readline appending the quote char.
851 (gdb_rl_attempted_completion_function_throw): Handle trackers that
852 use a custom word point.
853 (gdb_rl_attempted_completion_function): Restore
854 rl_basic_quote_characters.
855 * completer.h (class completion_tracker): Extend intro comment.
856 (completion_tracker::set_quote_char)
857 (completion_tracker::quote_char)
858 (completion_tracker::set_use_custom_word_point)
859 (completion_tracker::use_custom_word_point)
860 (completion_tracker::custom_word_point)
861 (completion_tracker::set_custom_word_point)
862 (completion_tracker::advance_custom_word_point_by)
863 (completion_tracker::completes_to_completion_word)
864 (completion_tracker::discard_completions): New methods.
865 (completion_tracker::m_quote_char)
866 (completion_tracker::m_use_custom_word_point)
867 (completion_tracker::m_custom_word_point): New fields.
868 (advance_to_expression_complete_word_point): Declare.
869 * f-lang.c (f_collect_symbol_completion_matches): Add
870 complete_symbol_mode parameter.
871 * language.h (struct language_defn)
872 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
873 parameter.
874 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
875 (linespec_complete_function): New function.
876 (linespec_lexer_lex_keyword): Adjust.
877 * linespec.h (linespec_keywords, linespec_complete_function): New
878 declarations.
879 * location.c (find_end_quote): New function.
880 (explicit_location_lex_one): Add explicit_completion_info
881 parameter. Save quoting info. Don't throw if being called for
882 completion. Don't handle Ada operators here.
883 (is_cp_operator, skip_op_false_positives, first_of)
884 (explicit_location_lex_one_function): New function.
885 (string_to_explicit_location): Replace 'dont_throw' parameter with
886 an explicit_completion_info pointer parameter. Handle it. Don't
887 use explicit_location_lex_one to lex function names. Use
888 explicit_location_lex_one_function instead.
889 * location.h (struct explicit_completion_info): New.
890 (string_to_explicit_location): Replace 'dont_throw' parameter with
891 an explicit_completion_info pointer parameter.
892 * symtab.c (default_collect_symbol_completion_matches_break_on):
893 Add complete_symbol_mode parameter. Handle LINESPEC mode.
894 (default_collect_symbol_completion_matches)
895 (collect_symbol_completion_matches): Add complete_symbol_mode
896 parameter.
897 (collect_symbol_completion_matches_type): Pass down
898 complete_symbol_mode::EXPRESSION.
899 (collect_file_symbol_completion_matches): Add complete_symbol_mode
900 parameter. Handle LINESPEC mode.
901 * symtab.h (complete_symbol_mode): New.
902 (default_collect_symbol_completion_matches_break_on)
903 (default_collect_symbol_completion_matches)
904 (collect_symbol_completion_matches)
905 (collect_file_symbol_completion_matches): Add complete_symbol_mode
906 parameter.
907
908 2017-07-17 Pedro Alves <palves@redhat.com>
909
910 * utils.c (enum class strncmp_iw_mode): New.
911 (strcmp_iw): Rename to ...
912 (strncmp_iw_with_mode): ... this. Add string2_len and mode
913 parameters. Handle them.
914 (strncmp_iw): New.
915 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
916 * utils.h (strncmp_iw): Declare.
917 (strcmp_iw): Move describing comments here.
918
919 2017-07-17 Pedro Alves <palves@redhat.com>
920
921 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
922 CP_OPERATOR_STR.
923 * c-typeprint.c (is_type_conversion_operator): Use
924 CP_OPERATOR_STR.
925 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
926 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
927 CP_OPERATOR_LEN.
928 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
929 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
930 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
931 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
932 CP_OPERATOR_STR.
933 * location.c: Include "cp-support.h".
934 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
935 CP_OPERATOR_STR.
936 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
937 CP_OPERATOR_LEN.
938
939 2017-07-17 Pedro Alves <palves@redhat.com>
940
941 * cli/cli-cmds.c (complete_command): Use a completion tracker
942 along with completion_find_completion_word for handle_brkchars
943 phase.
944 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
945 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
946 (struct gdb_rl_completion_word_info): New.
947 (gdb_rl_find_completion_word): New.
948 (completion_find_completion_word): New.
949 * completer.h (completion_find_completion_word): Declare.
950
951 2017-07-17 Pedro Alves <palves@redhat.com>
952
953 * ada-lang.c (symbol_completion_match): Adjust comments.
954 (symbol_completion_add): Replace vector parameter with
955 completion_tracker parameter. Use it.
956 (ada_make_symbol_completion_list): Rename to...
957 (ada_collect_symbol_completion_matches): ... this. Add
958 completion_tracker parameter and use it.
959 (ada_language_defn): Adjust.
960 * break-catch-syscall.c (catch_syscall_completer): Adjust
961 prototype and work with completion_tracker instead of VEC.
962 * breakpoint.c (condition_completer): Adjust prototype and work
963 with completion_tracker instead of VEC.
964 * c-lang.c (c_language_defn, cplus_language_defn)
965 (asm_language_defn, minimal_language_defn): Adjust to renames.
966 * cli/cli-cmds.c (complete_command): Rework using
967 completion_tracker. Catch exceptions when completing.
968 * cli/cli-decode.c (integer_unlimited_completer)
969 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
970 with completion_tracker instead of VEC.
971 * command.h (struct completion_tracker): Forward declare.
972 (completer_ftype, completer_handle_brkchars_ftype): Change
973 types.
974 (complete_on_cmdlist, complete_on_enum): Adjust.
975 * completer.c: Include <algorithm>.
976 (struct gdb_completer_state): New.
977 (current_completion): New global.
978 (readline_line_completion_function): Delete.
979 (noop_completer, filename_completer)
980 (filename_completer_handle_brkchars, complete_files_symbols)
981 (linespec_location_completer): Adjust to work with a
982 completion_tracker instead of a VEC.
983 (string_or_empty): New.
984 (collect_explicit_location_matches): Adjust to work with a
985 completion_tracker instead of a VEC.
986 (explicit_location_completer): Rename to ...
987 (complete_explicit_location): ... this and adjust to work with a
988 completion_tracker instead of a VEC.
989 (location_completer): Adjust to work with a completion_tracker
990 instead of a VEC.
991 (add_struct_fields): Adjust to work with a completion_list instead
992 of VEC.
993 (expression_completer): Rename to ...
994 (complete_expression): ... this and adjust to work with a
995 completion_tracker instead of a VEC. Use complete_files_symbols.
996 (expression_completer): Reimplement on top of complete_expression.
997 (symbol_completer): Adjust to work with a completion_tracker
998 instead of a VEC.
999 (enum complete_line_internal_reason): Add describing comments.
1000 (complete_line_internal_normal_command): Adjust to work with a
1001 completion_tracker instead of a VEC.
1002 (complete_line_internal): Rename to ...
1003 (complete_line_internal_1): ... this and adjust to work with a
1004 completion_tracker instead of a VEC. Assert TEXT is NULL in the
1005 handle_brkchars phase.
1006 (new_completion_tracker): Delete.
1007 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
1008 complete_line_internal_1.
1009 (free_completion_tracker): Delete.
1010 (INITIAL_COMPLETION_HTAB_SIZE): New.
1011 (completion_tracker::completion_tracker)
1012 (completion_tracker::~completion_tracker): New.
1013 (maybe_add_completion): Delete.
1014 (completion_tracker::maybe_add_completion)
1015 (completion_tracker::add_completion)
1016 (completion_tracker::add_completions): New.
1017 (throw_max_completions_reached_error): Delete.
1018 (complete_line): Adjust to work with a completion_tracker instead
1019 of a VEC. Don't create a completion_tracker_t or check for max
1020 completions here.
1021 (command_completer, command_completer_handle_brkchars)
1022 (signal_completer, reg_or_group_completer_1)
1023 (reg_or_group_completer, default_completer_handle_brkchars):
1024 Adjust to work with a completion_tracker.
1025 (gdb_completion_word_break_characters_throw): New.
1026 (gdb_completion_word_break_characters): Reimplement.
1027 (line_completion_function): Delete.
1028 (completion_tracker::recompute_lowest_common_denominator)
1029 (expand_preserving_ws)
1030 (completion_tracker::build_completion_result)
1031 (completion_result::completion_result)
1032 (completion_result::completion_result)
1033 (completion_result::~completion_result)
1034 (completion_result::completion_result)
1035 (completion_result::release_match_list, compare_cstrings)
1036 (completion_result::sort_match_list)
1037 (completion_result::reset_match_list)
1038 (gdb_rl_attempted_completion_function_throw)
1039 (gdb_rl_attempted_completion_function): New.
1040 * completer.h (completion_list, struct completion_result)
1041 (class completion_tracker): New.
1042 (complete_line): Add completion_tracker parameter.
1043 (readline_line_completion_function): Delete.
1044 (gdb_rl_attempted_completion_function): New.
1045 (noop_completer, filename_completer, expression_completer)
1046 (location_completer, symbol_completer, command_completer)
1047 (signal_completer, reg_or_group_completer): Update prototypes.
1048 (completion_tracker_t, new_completion_tracker)
1049 (make_cleanup_free_completion_tracker): Delete.
1050 (enum maybe_add_completion_enum): Delete.
1051 (maybe_add_completion): Delete.
1052 (throw_max_completions_reached_error): Delete.
1053 * corefile.c (complete_set_gnutarget): Adjust to work with a
1054 completion_tracker instead of a VEC.
1055 * cp-abi.c (cp_abi_completer): Adjust to work with a
1056 completion_tracker instead of a VEC.
1057 * d-lang.c (d_language_defn): Adjust.
1058 * disasm.c (disassembler_options_completer): Adjust to work with a
1059 completion_tracker instead of a VEC.
1060 * f-lang.c (f_make_symbol_completion_list): Rename to ...
1061 (f_collect_symbol_completion_matches): ... this. Adjust to work
1062 with a completion_tracker instead of a VEC.
1063 (f_language_defn): Adjust.
1064 * go-lang.c (go_language_defn): Adjust.
1065 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
1066 Adjust to work with a completion_tracker instead of a VEC.
1067 * infrun.c (handle_completer): Likewise.
1068 * interps.c (interpreter_completer): Likewise.
1069 * interps.h (interpreter_completer): Likewise.
1070 * language.c (unknown_language_defn, auto_language_defn)
1071 (local_language_defn): Adjust.
1072 * language.h (language_defn::la_make_symbol_completion_list):
1073 Rename to ...
1074 (language_defn::la_collect_symbol_completion_matches): ... this
1075 and adjust to work with a completion_tracker instead of a VEC.
1076 * m2-lang.c (m2_language_defn): Adjust.
1077 * objc-lang.c (objc_language_defn): Adjust.
1078 * opencl-lang.c (opencl_language_defn): Adjust.
1079 * p-lang.c (pascal_language_defn): Adjust.
1080 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
1081 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
1082 with a completion_tracker.
1083 * rust-lang.c (rust_language_defn): Adjust.
1084 * symtab.c (free_completion_list, do_free_completion_list)
1085 (return_val, completion_tracker): Delete.
1086 (completion_list_add_name, completion_list_add_symbol)
1087 (completion_list_add_msymbol, completion_list_objc_symbol)
1088 (completion_list_add_fields, add_symtab_completions): Add
1089 completion_tracker parameter and use it.
1090 (default_make_symbol_completion_list_break_on_1): Rename to...
1091 (default_collect_symbol_completion_matches_break_on): ... this.
1092 Add completion_tracker parameter and use it instead of allocating
1093 a completion tracker here.
1094 (default_make_symbol_completion_list_break_on): Delete old
1095 implementation.
1096 (default_make_symbol_completion_list): Delete.
1097 (default_collect_symbol_completion_matches): New.
1098 (make_symbol_completion_list): Delete.
1099 (collect_symbol_completion_matches): New.
1100 (make_symbol_completion_type): Rename to ...
1101 (collect_symbol_completion_matches_type): ... this. Add
1102 completion_tracker parameter and use it instead of VEC.
1103 (make_file_symbol_completion_list_1): Rename to...
1104 (collect_file_symbol_completion_matches): ... this. Add
1105 completion_tracker parameter and use it instead of VEC.
1106 (make_file_symbol_completion_list): Delete.
1107 (add_filename_to_list): Use completion_list instead of a VEC.
1108 (add_partial_filename_data::list): Now a completion_list.
1109 (make_source_files_completion_list): Work with a completion_list
1110 instead of a VEC.
1111 * symtab.h: Include "completer.h".
1112 (default_make_symbol_completion_list_break_on)
1113 (default_make_symbol_completion_list, make_symbol_completion_list)
1114 (make_symbol_completion_type, make_file_symbol_completion_list)
1115 (make_source_files_completion_list): Delete.
1116 (default_collect_symbol_completion_matches_break_on)
1117 (default_collect_symbol_completion_matches)
1118 (collect_symbol_completion_matches)
1119 (collect_symbol_completion_matches_type)
1120 (collect_file_symbol_completion_matches)
1121 (make_source_files_completion_list): New.
1122 * top.c (init_main): Don't install a rl_completion_entry_function
1123 hook. Install a rl_attempted_completion_function hook instead.
1124 * tui/tui-layout.c (layout_completer): Adjust to work with a
1125 completion_tracker.
1126 * tui/tui-regs.c (tui_reggroup_completer):
1127 * tui/tui-win.c (window_name_completer, focus_completer)
1128 (winheight_completer): Adjust to work with a completion_tracker.
1129 * value.c: Include "completer.h".
1130 (complete_internalvar): Adjust to work with a completion_tracker.
1131 * value.h (complete_internalvar): Likewise.
1132
1133 2017-07-17 Pedro Alves <palves@redhat.com>
1134
1135 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
1136 renames.
1137 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
1138 comments to completer_ftype's declaration.
1139 <completer_handle_brkchars>: Change type to
1140 completer_handle_brkchars_ftype.
1141 * command.h (completer_ftype): Add describing comment and give
1142 names to parameters.
1143 (completer_ftype_void): Rename to ...
1144 (completer_handle_brkchars_ftype) ... this. Add describing comment.
1145 (set_cmd_completer_handle_brkchars): Adjust.
1146 * completer.c (filename_completer_handle_brkchars): New function.
1147 (complete_line_internal_normal_command): New function, factored
1148 out from ...
1149 (complete_line_internal): ... here.
1150 (command_completer_handle_brkchars)
1151 (default_completer_handle_brkchars)
1152 (completer_handle_brkchars_func_for_completer): New functions.
1153 * completer.h (set_gdb_completion_word_break_characters): Delete
1154 declaration.
1155 (completer_handle_brkchars_func_for_completer): New declaration.
1156 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
1157 completer_handle_brkchars_func_for_completer.
1158
1159 2017-07-17 Pedro Alves <palves@redhat.com>
1160
1161 * completer.c (symbol_completer): New function, based on
1162 make_symbol_completion_list_fn.
1163 * completer.h (symbol_completer): New declaration.
1164 * guile/scm-cmd.c (cmdscm_completers): Adjust.
1165 * python/py-cmd.c (completers): Adjust.
1166 * symtab.c (make_symbol_completion_list_fn): Delete.
1167 * symtab.h (make_symbol_completion_list_fn): Delete.
1168 * cli/cli-decode.c (add_cmd): Adjust.
1169
1170 2017-07-17 Pedro Alves <palves@redhat.com>
1171
1172 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
1173 * dwarf2read.c: Include "filename-seen-cache.h".
1174 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
1175 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
1176 * filename-seen-cache.c: New file.
1177 * filename-seen-cache.h: New file.
1178 * symtab.c: Include "filename-seen-cache.h".
1179 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
1180 (create_filename_seen_cache, clear_filename_seen_cache)
1181 (delete_filename_seen_cache, filename_seen): Delete, parts moved
1182 to filename-seen-cache.h/filename-seen-cache.c.
1183 (output_source_filename, sources_info)
1184 (maybe_add_partial_symtab_filename)
1185 (make_source_files_completion_list): Adjust to use
1186 filename_seen_cache.
1187
1188 2017-07-17 Pedro Alves <palves@redhat.com>
1189
1190 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
1191 fields.
1192 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
1193 dwarf2_debug_sections*)): New.
1194 (dwarf2_per_objfile::dwarf2_per_objfile(const
1195 dwarf2_per_objfile&)): Declare as deleted.
1196 (dwarf2_per_objfile::operator=): Declare as deleted.
1197 (dwarf2_per_objfile::dwarf2_per_objfile)
1198 (dwarf2_per_objfile::~dwarf2_per_objfile)
1199 (dwarf2_per_objfile::free_cached_comp_units): New.
1200 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
1201 ctor. Call dwarf2_per_objfile's ctor manually.
1202 (dwarf2_locate_sections): Deleted/refactored as ...
1203 (dwarf2_per_objfile::locate_sections): ... this new method.
1204 (free_cached_comp_units): Defer to
1205 dwarf2_per_objfile::free_cached_comp_units.
1206 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
1207
1208 2017-07-14 Tom Tromey <tom@tromey.com>
1209
1210 PR rust/21764:
1211 * rust-exp.y (convert_ast_to_expression): Add "want_type"
1212 parameter.
1213 <UNOP_SIZEOF>: Split into separate case.
1214 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
1215
1216 2017-07-14 Tom Tromey <tom@tromey.com>
1217
1218 PR rust/21763:
1219 * symtab.c (symbol_matches_domain): Add language_rust to special
1220 case.
1221 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
1222 treat LOC_TYPEDEF symbols as variables.
1223
1224 2017-07-14 Pedro Alves <palves@redhat.com>
1225
1226 * symtab.c (make_file_symbol_completion_list_1): Iterate over
1227 symtabs matching all symtabs with SRCFILE as file name instead of
1228 only considering the first hit, with lookup_symtab.
1229
1230 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
1231
1232 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
1233 operator_name parameters.
1234 (gen_expr): Update function call.
1235
1236 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
1237
1238 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
1239 parameter.
1240 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
1241 Likewise.
1242 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
1243 parameter, use agent_expr::gdbarch instead, update function
1244 calls.
1245 (locexpr_tracepoint_var_ref): Likewise.
1246 (loclist_tracepoint_var_ref): Likewise.
1247 * ax-gdb.c (gen_trace_static_fields): Likewise.
1248 (gen_traced_pop): Likewise.
1249 (gen_frame_args_address): Likewise.
1250 (gen_frame_locals_address): Likewise.
1251 (gen_var_ref): Likewise.
1252 (gen_struct_ref_recursive): Likewise.
1253 (gen_static_field): Likewise.
1254 (gen_maybe_namespace_elt): Likewise.
1255 (gen_expr): Likewise.
1256 (gen_trace_for_var): Likewise.
1257 (gen_trace_for_expr): Likewise.
1258 (gen_trace_for_return_address): Likewise.
1259
1260 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
1261
1262 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
1263 parameter.
1264 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
1265
1266 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
1267
1268 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
1269 from ax, update calls.
1270 (gen_usual_arithmetic): Likewise.
1271 (gen_integral_promotions): Likewise.
1272 (gen_bitfield_ref): Likewise.
1273 (gen_primitive_field): Likewise.
1274 (gen_struct_ref_recursive): Likewise.
1275 (gen_struct_ref): Likewise.
1276 (gen_maybe_namespace_elt): Likewise.
1277 (gen_struct_elt_for_reference): Likewise.
1278 (gen_namespace_elt): Likewise.
1279 (gen_aggregate_elt_ref): Likewise.
1280 (gen_expr): Get gdbarch from ax, update calls.
1281 (gen_expr_binop_rest): Likewise.
1282
1283 2017-07-13 Pedro Alves <palves@redhat.com>
1284
1285 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
1286 as default tdesc.
1287 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
1288 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
1289 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
1290 tdesc_amd64_linux as default tdesc. Get final tdesc from the
1291 tdep.
1292 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
1293 Get final tdesc from the tdep.
1294 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
1295 default tdesc.
1296 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
1297 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
1298 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
1299 Use it as default tdesc.
1300 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
1301 down to amd_init_abi. No longer handle fallback tdesc here.
1302 * amd64-tdep.h (tdesc_x32): Declare.
1303 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
1304 parameter.
1305 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
1306 as default tdesc.
1307
1308 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1309
1310 * s390-linux-tdep.c (s390_process_record): Add support for
1311 instructions new in arch12.
1312
1313 2017-07-11 John Baldwin <jhb@FreeBSD.org>
1314
1315 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
1316 PT_GETFSBASE and PT_GETGSBASE.
1317 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
1318 PT_SETGSBASE.
1319
1320 2017-07-11 John Baldwin <jhb@FreeBSD.org>
1321
1322 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
1323 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
1324 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
1325 those rules.
1326 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
1327 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
1328 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
1329 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
1330 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
1331 * features/i386/amd64.xml: Add 64bit-segments.xml.
1332 * features/i386/amd64-avx-avx512.c: Regenerated.
1333 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
1334 * features/i386/amd64-avx-mpx.c: Regenerated.
1335 * features/i386/amd64-avx.c: Regenerated.
1336 * features/i386/amd64-mpx.c: Regenerated.
1337 * features/i386/amd64.c: Regenerated.
1338 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
1339 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
1340 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
1341 * regformats/i386/amd64-avx.dat: Regenerated.
1342 * regformats/i386/amd64-mpx.dat: Regenerated.
1343 * regformats/i386/amd64.dat: Regenerated.
1344
1345 2017-07-10 Yao Qi <yao.qi@linaro.org>
1346
1347 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
1348 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
1349
1350 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
1351
1352 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
1353 unsetenv.
1354 * gnulib/aclocal.m4: Regenerate.
1355 * gnulib/config.in: Regenerate.
1356 * gnulib/configure: Regenerate.
1357 * gnulib/import/Makefile.am: Regenerate.
1358 * gnulib/import/Makefile.in: Regenerate.
1359 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
1360 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
1361 * gnulib/import/m4/environ.m4: New file.
1362 * gnulib/import/m4/setenv.m4: New file.
1363 * gnulib/import/setenv.c: New file.
1364 * gnulib/import/unsetenv.c: New file.
1365
1366 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
1367
1368 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
1369 address when op is DW_OP_addr.
1370
1371 2017-07-09 Tom Tromey <tom@tromey.com>
1372
1373 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
1374 check and apply to outer type.
1375
1376 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1377
1378 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
1379 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
1380 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
1381 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
1382
1383 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1384
1385 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
1386
1387 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1388
1389 * corelow.c (get_core_siginfo): Remove.
1390 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
1391 instead of get_core_siginfo.
1392 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
1393 * gdbarch.h: Re-generate.
1394 * gdbarch.c: Re-generate.
1395 * linux-tdep.c (linux_core_xfer_siginfo): New.
1396 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
1397
1398 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1399
1400 * corelow.c (thread_section_name): Move to ...
1401 * gdbcore.h (thread_section_name): ... here.
1402
1403 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1404
1405 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
1406 (struct siginfo32): New.
1407 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
1408 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
1409 via ptrace(PT_LWPINFO).
1410
1411 2017-07-07 John Baldwin <jhb@FreeBSD.org>
1412
1413 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
1414 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
1415 (fbsd_get_siginfo_type): New.
1416 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
1417 (_initialize_fbsd_tdep): New.
1418
1419 2017-07-06 David Blaikie <dblaikie@gmail.com>
1420
1421 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
1422 a singular dwo_unit*) to support multiple CUs in the same way that
1423 multiple TUs are supported.
1424 (create_cus_hash_table): Replace create_dwo_cu with a function for
1425 parsing multiple CUs from a DWO file.
1426 (open_and_init_dwo_file): Use create_cus_hash_table rather than
1427 create_dwo_cu.
1428 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
1429 htab_find, rather than comparing the signature to a singleton CU in
1430 the dwo_file.
1431
1432 2017-07-06 Pedro Alves <palves@redhat.com>
1433
1434 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
1435
1436 2017-07-04 Pedro Alves <palves@redhat.com>
1437
1438 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
1439 * gdbtypes.h (TYPE_STATIC): Delete.
1440 (struct fn_field) <is_public, is_abstract, is_static, is_final,
1441 is_synchronized, is_native>: Delete.
1442 <dummy>: Bump.
1443 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
1444 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
1445 (TYPE_FN_FIELD_ABSTRACT): Delete.
1446
1447 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
1448
1449 * buffer.h (buffer_finish): Fix spelling mistakes.
1450
1451 2017-07-01 Eli Zaretskii <eliz@gnu.org>
1452
1453 * .dir-locals.el: Automatically switch to C-style comments in
1454 versions of Emacs that support the feature.
1455
1456 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
1457 Pedro Alves <palves@redhat.com>
1458
1459 PR cli/21688
1460 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
1461 (process_next_line): New variable 'inline_cmd'.
1462 Adjust 'if' clauses for "python", "compile" and "guile" to use
1463 'command_name_equals' and check for '!inline_cmd'.
1464
1465 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
1466
1467 PR cli/21688
1468 * cli/cli-script.c (command_name_equals_not_inline): New function.
1469 (process_next_line): Adjust 'if' clauses for "python", "compile"
1470 and "guile" to use command_name_equals_not_inline.
1471
1472 2017-06-29 Pedro Alves <palves@redhat.com>
1473
1474 * completer.c (expression_completer): Call
1475 linespec_location_completer instead of location_completer.
1476
1477 2017-06-29 Pedro Alves <palves@redhat.com>
1478
1479 * completer.c (expression_completer): Remove code that recomputes
1480 'text' from 'word'.
1481
1482 2017-06-29 Yao Qi <yao.qi@linaro.org>
1483
1484 * regformats/regdat.sh: Generate code with
1485 "ifndef IN_PROCESS_AGENT".
1486
1487 2017-06-28 Pedro Alves <palves@redhat.com>
1488
1489 * command.h: Include "common/scoped_restore.h".
1490
1491 2017-06-28 Yao Qi <yao.qi@linaro.org>
1492
1493 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
1494 instead of obstack_grow.
1495
1496 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
1497
1498 PR gdb/21337
1499 * symfile.c (reread_symbols): Call objfiles_changed just before
1500 read_symbols.
1501
1502 2017-06-27 Pedro Alves <palves@redhat.com>
1503
1504 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
1505 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
1506 (completion_list_add_symbol, completion_list_add_msymbol):
1507 ... these new functions.
1508 (add_symtab_completions)
1509 (default_make_symbol_completion_list_break_on_1): Adjust.
1510
1511 2017-06-27 Pedro Alves <palves@redhat.com>
1512
1513 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
1514 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
1515 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
1516 dtor.
1517 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
1518 'storage_obstack' field an auto_obstack. In-class initialize all
1519 non-bitfield fields. Make minsyms_read bool.
1520 * symfile.c (read_symbols): Adjust.
1521
1522 2017-06-27 Alan Hayward <alan.hayward@arm.com>
1523
1524 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
1525 (gdbsim_store_register): Likewise.
1526
1527 2017-06-27 Pedro Alves <palves@redhat.com>
1528
1529 * c-exp.y (name_obstack): Now an auto_obstack.
1530 (yylex): Use auto_obstack::clear.
1531 (c_parse): Use auto_obstack::clear instead of reinitializing and
1532 freeing the obstack.
1533 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
1534 * d-exp.y (name_obstack): Now an auto_obstack.
1535 (yylex): Use auto_obstack::clear.
1536 (d_parse): Use auto_obstack::clear instead of reinitializing and
1537 freeing the obstack.
1538 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
1539 auto_obstack.
1540 * dwarf2read.c (create_addrmap_from_index)
1541 (dwarf2_build_psymtabs_hard)
1542 (update_enumeration_type_from_children): Likewise.
1543 * gdb_obstack.h (auto_obstack): New type.
1544 * go-exp.y (name_obstack): Now an auto_obstack.
1545 (build_packaged_name): Use auto_obstack::clear.
1546 (go_parse): Use auto_obstack::clear instead of reinitializing and
1547 freeing the obstack.
1548 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
1549 auto_obstack.
1550 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
1551 * rust-exp.y (work_obstack): Now an auto_obstack.
1552 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
1553 reinitializing and freeing the obstack.
1554 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
1555 (host_char_to_target): Use auto_obstack.
1556 * utils.h (make_cleanup_obstack_free): Delete declaration.
1557 * valprint.c (generic_emit_char, generic_printstr): Use
1558 auto_obstack.
1559
1560 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
1561
1562 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
1563 thread.
1564 (darwin_init_thread_list): Don't update dummy thread.
1565 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
1566
1567 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
1568
1569 * record-full.c (netorder16): Remove.
1570
1571 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
1572
1573 * common/diagnostics.h: Define macros for GCC.
1574 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
1575 * common/vec.h: Include diagnostics.h.
1576 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
1577 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
1578 warning.
1579
1580 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
1581
1582 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
1583 New macro.
1584 * ada-lex.l: Ignore deprecated register warnings.
1585
1586 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
1587
1588 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
1589 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
1590
1591 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
1592
1593 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
1594 its own line.
1595
1596 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
1597
1598 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
1599
1600 2017-06-23 Alan Hayward <alan.hayward@arm.com>
1601
1602 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
1603 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
1604 (xtensa_register_read_masked): Likewise.
1605
1606 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
1607
1608 * common/environ.c (gdb_environ::unset): Update comment.
1609
1610 2017-06-22 Alan Hayward <alan.hayward@arm.com>
1611
1612 * python/py-unwind.c (pyuw_sniffer): Allocate space for
1613 registers.
1614
1615 2017-06-22 Alan Hayward <alan.hayward@arm.com>
1616
1617 * record-full.c (record_full_exec_insn): Use byte_vector.
1618
1619 2017-06-22 Yao Qi <yao.qi@linaro.org>
1620
1621 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
1622 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
1623
1624 2017-06-22 Alan Hayward <alan.hayward@arm.com>
1625
1626 * remote.c (cached_reg): Move from here...
1627 * regcache.h (cached_reg): ...to here.
1628 * python/py-unwind.c (struct reg_info): Remove.
1629 (cached_frame_info): Use cached_reg_t.
1630 (pyuw_prev_register): Likewise.
1631 (pyuw_sniffer): Use cached_reg_t and allocate registers.
1632 (pyuw_dealloc_cache): Free all registers.
1633
1634 2017-06-22 Pedro Alves <palves@redhat.com>
1635 Simon Marchi <simon.marchi@ericsson.com>
1636
1637 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
1638 warning.
1639 * common/diagnostics.h: New file.
1640
1641 2017-06-22 Pedro Alves <palves@redhat.com>
1642
1643 * common/agent.h: Add include guards.
1644
1645 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
1646
1647 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
1648 talk about addressable units instead of bytes.
1649
1650 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1651
1652 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
1653 of '::const_iterator'.
1654
1655 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
1656
1657 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1658 'unittests/environ-selftests.c'.
1659 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
1660 * charset.c (find_charset_names): Declare object 'iconv_env'.
1661 Update code to use 'iconv_env' object. Remove call to
1662 'free_environ'.
1663 * common/environ.c: Include <utility>.
1664 (make_environ): Delete function.
1665 (free_environ): Delete function.
1666 (gdb_environ::clear): New function.
1667 (gdb_environ::operator=): New function.
1668 (gdb_environ::get): Likewise.
1669 (environ_vector): Delete function.
1670 (set_in_environ): Delete function.
1671 (gdb_environ::set): New function.
1672 (unset_in_environ): Delete function.
1673 (gdb_environ::unset): New function.
1674 (gdb_environ::envp): Likewise.
1675 * common/environ.h: Include <vector>.
1676 (struct gdb_environ): Delete; transform into...
1677 (class gdb_environ): ... this class.
1678 (free_environ): Delete prototype.
1679 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
1680 environ_vector): Likewise.
1681 * infcmd.c (run_command_1): Update code to call
1682 'envp' from 'gdb_environ' class.
1683 (environment_info): Update code to call methods from 'gdb_environ'
1684 class.
1685 (unset_environment_command): Likewise.
1686 (path_info): Likewise.
1687 (path_command): Likewise.
1688 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
1689 (inferior::inferior): Initialize 'environment' using the host's
1690 information.
1691 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
1692 Include "environ.h".
1693 (class inferior) <environment>: Change type from 'struct
1694 gdb_environ' to 'gdb_environ'.
1695 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
1696 methods from 'gdb_environ' class.
1697 * solib.c (solib_find_1): Likewise
1698 * unittests/environ-selftests.c: New file.
1699
1700 2017-06-20 Yao Qi <yao.qi@linaro.org>
1701
1702 * features/i386/i386-linux.xml: Exchange the order of including
1703 32bit-linux.xml and 32bit-sse.xml.
1704 * features/i386/i386-linux.c: Regenerated.
1705
1706 2017-06-20 Yao Qi <yao.qi@linaro.org>
1707
1708 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
1709 Delete copy ctor and assignment operator.
1710 (tdesc_type): Likewise.
1711 (tdesc_feature): Likewise.
1712 (tdesc_free_reg): Remove.
1713 (tdesc_create_reg): Use new.
1714 (tdesc_free_type): Remove.
1715 (tdesc_create_vector): Use new.
1716 (tdesc_create_union): Likewise.
1717 (tdesc_create_flags): Likewise.
1718 (tdesc_create_enum): Likewise.
1719 (tdesc_free_feature): Delete.
1720 (free_target_description): Use delete.
1721
1722 2017-06-19 John Baldwin <jhb@FreeBSD.org>
1723
1724 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
1725 registers.
1726
1727 2017-06-19 Pedro Alves <palves@redhat.com>
1728
1729 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
1730 after gdb::unlinker.
1731
1732 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
1733
1734 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
1735 gdb_environ to access an environment variable.
1736
1737 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
1738
1739 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
1740 gdb_byte*.
1741
1742 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1743
1744 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
1745
1746 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1747
1748 * configure: Re-generate.
1749 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
1750
1751 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1752
1753 * configure: Re-generate.
1754 * warning.m4: Pass -Werror to compiler when checking for
1755 supported warning flags.
1756
1757 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
1758
1759 * Makefile.in (COMPILE.pre): Add "-x c++".
1760
1761 2017-06-16 Alan Hayward <alan.hayward@arm.com>
1762 Pedro Alves <palves@redhat.com>
1763 Yao Qi <yao.qi@linaro.org>
1764
1765 * defs.h (RequireLongest): New.
1766 (extract_integer): Declare function template.
1767 (extract_signed_integer): Remove the declaration, but define it
1768 static inline.
1769 (extract_unsigned_integer): Likewise.
1770 (store_integer): Declare function template.
1771 (store_signed_integer): Remove the declaration, but define it
1772 static inline.
1773 (store_unsigned_integer): Likewise.
1774 * findvar.c (extract_integer): New function template.
1775 (extract_signed_integer): Remove.
1776 (extract_unsigned_integer): Remove.
1777 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
1778 instantiations.
1779 (store_integer): New function template.
1780 (store_signed_integer): Remove.
1781 (store_unsigned_integer): Remove.
1782 (store_integer): Explicit instantiations.
1783 * regcache.c (regcache_raw_read_signed): Update.
1784 (regcache::raw_read): New function.
1785 (regcache::raw_read_signed): Remove.
1786 (regcache::raw_read_unsigned): Remove.
1787 (regcache_raw_read_unsigned): Update.
1788 (regcache_raw_write_unsigned): Update.
1789 (regcache::raw_write_signed): Remove.
1790 (regcache::raw_write): New function.
1791 (regcache_cooked_read_signed): Update.
1792 (regcache::raw_write_unsigned): Remove.
1793 (regcache::cooked_read_signed): Remove.
1794 (regcache_cooked_read_unsigned): Update.
1795 (regcache::cooked_read_unsigned): Remove.
1796 (regcache_cooked_write_signed): Update.
1797 (regcache_cooked_write_unsigned): Update.
1798 * regcache.h (regcache) <raw_read_signed>: Remove.
1799 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
1800 <raw_read, raw_write>: New.
1801 <cooked_read_signed, cooked_write_signed>: Remove.
1802 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
1803 <cooked_read, cooked_write>: New.
1804 * sh64-tdep.c (sh64_pseudo_register_read): Update.
1805 (sh64_pseudo_register_write): Update.
1806
1807 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
1808
1809 * arc-tdep.c (arc_disassembler_options): New variable.
1810 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
1811 of default_print_insn.
1812 (arc_delayed_print_insn): Set info->section when needed,
1813 use default_print_insn to retrieve a disassembler.
1814
1815 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
1816
1817 PR gdb/21574
1818 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
1819 to mention $SHELL and startup-with-shell.
1820
1821 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
1822
1823 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
1824
1825 2017-06-14 Yao Qi <yao.qi@linaro.org>
1826
1827 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
1828 default_print_insn instead of print_insn_aarch64.
1829 * arm-tdep.c (gdb_print_insn_arm): Call
1830 default_print_insn instead of print_insn_big_arm
1831 and print_insn_little_arm.
1832 * i386-tdep.c (i386_print_insn): Call default_print_insn
1833 instead of print_insn_i386.
1834 * ia64-tdep.c (ia64_print_insn): Call
1835 default_print_insn instead of print_insn_ia64.
1836 * mips-tdep.c (gdb_print_insn_mips): Call
1837 default_print_insn instead of print_insn_big_mips
1838 and print_insn_little_mips.
1839 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
1840 instead of print_insn_spu.
1841
1842 2017-06-14 Pedro Alves <palves@redhat.com>
1843
1844 * ada-lang.c: Include "common/byte-vector.h".
1845 (ada_value_primitive_packed_val): Use gdb::byte_vector.
1846 * charset.c (wchar_iterator::iterate): Resize the vector instead
1847 of reserving it.
1848 * common/byte-vector.h: Include "common/def-vector.h".
1849 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
1850 * cli/cli-dump.c: Include "common/byte-vector.h".
1851 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
1852 * common/byte-vector.h: New file.
1853 * common/def-vector.h: New file.
1854 * common/default-init-alloc.h: New file.
1855 * dwarf2loc.c: Include "common/byte-vector.h".
1856 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
1857 instead of reserving it.
1858 * dwarf2read.c: Include "common/byte-vector.h".
1859 (data_buf::m_vec): Now a gdb::byte_vector.
1860 * gdb_regex.c: Include "common/def-vector.h".
1861 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
1862 * mi/mi-main.c: Include "common/byte-vector.h".
1863 (mi_cmd_data_read_memory): Use gdb::byte_vector.
1864 * printcmd.c: Include "common/byte-vector.h".
1865 (print_scalar_formatted): Use gdb::byte_vector.
1866 * valprint.c: Include "common/byte-vector.h".
1867 (maybe_negate_by_bytes, print_decimal_chars): Use
1868 gdb::byte_vector.
1869
1870 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
1871
1872 * darwin-nat.c: Include "nat/fork-inferior.h".
1873
1874 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
1875
1876 * configure.nat: Factor out Darwin bits that are not
1877 architecture-specific. Add fork-inferior.o.
1878
1879 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
1880
1881 * configure.nat: Factor out AIX bits that are not
1882 architecture-specific. Add fork-inferior.o.
1883
1884 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1885
1886 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
1887 (read_pieced_value, write_pieced_value): ...here. Reduce to
1888 wrappers that just call rw_pieced_value.
1889
1890 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1891
1892 * dwarf2loc.c (write_pieced_value): When writing the data for a
1893 memory piece, use write_memory_with_notification instead of
1894 write_memory.
1895
1896 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1897
1898 * valops.c (read_value_memory): Change embedded_offset to
1899 represent a bit offset instead of a byte offset.
1900 * value.h (read_value_memory): Adjust comment.
1901
1902 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1903
1904 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
1905 dest_offset_bits and source_offset_bits.
1906 (write_pieced_value): Likewise.
1907
1908 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1909
1910 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
1911 given by DW_OP_bit_piece.
1912 (write_pieced_value): Likewise.
1913
1914 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1915
1916 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
1917 some other preparations to the places where sufficient information
1918 is available.
1919 (write_pieced_value): Likewise.
1920
1921 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1922
1923 * dwarf2loc.c (bits_to_bytes): New function.
1924 (read_pieced_value): Fix offset calculations for register pieces
1925 on big-endian targets.
1926 (write_pieced_value): Likewise.
1927
1928 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1929
1930 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
1931 (write_pieced_value): Likewise.
1932
1933 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1934
1935 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
1936 transfer the source value's least significant bits, instead of its
1937 lowest-addressed ones. Rename type_len to max_offset.
1938 (read_pieced_value): Mirror above changes to write_pieced_value as
1939 applicable.
1940
1941 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1942
1943 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
1944 truncate full bytes from dest_offset_bits before using it as an
1945 offset into the buffer.
1946
1947 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1948
1949 * dwarf2loc.c (write_pieced_value): Include transfer size in
1950 byte-wise check.
1951
1952 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1953
1954 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
1955 calculation of this_size.
1956
1957 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1958
1959 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
1960 when targeting a bit-field.
1961 (write_pieced_value): Likewise.
1962
1963 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1964
1965 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
1966 (allocate_piece_closure): Drop addr_size parameter.
1967 (dwarf2_evaluate_loc_desc_full): Adjust call to
1968 allocate_piece_closure.
1969
1970 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1971
1972 PR gdb/21226
1973 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
1974 the LSB end, independent of endianness.
1975
1976 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
1977
1978 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
1979 size capping.
1980
1981 2017-06-13 Yao Qi <yao.qi@linaro.org>
1982
1983 * mips-linux-nat.c: Move include features/mips*-linux.c to
1984 mips-linux-tdep.c.
1985 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
1986 to mips-linux-tdep.c.
1987 * mips-linux-tdep.c: Include features/mips*-linux.c
1988 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
1989 functions.
1990 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
1991 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
1992 (tdesc_mips64_dsp_linux): Declare.
1993
1994 2017-06-12 Tom Tromey <tom@tromey.com>
1995
1996 * valprint.h (val_print_type_code_int): Remove.
1997 * valprint.c (generic_val_print_int): Always call
1998 val_print_scalar_formatted.
1999 (val_print_type_code_int): Remove.
2000 * printcmd.c (print_scalar_formatted): Handle options->format==0.
2001 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
2002 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
2003 * ada-valprint.c (ada_val_print_num): Use
2004 val_print_scalar_formatted.
2005
2006 2017-06-12 Tom Tromey <tom@tromey.com>
2007
2008 * printcmd.c (print_scalar_formatted): Unify the two switches.
2009 Don't convert scalars to LONGEST.
2010
2011 2017-06-12 Tom Tromey <tom@tromey.com>
2012
2013 PR exp/16225:
2014 * valprint.h (print_decimal_chars): Update.
2015 * valprint.c (maybe_negate_by_bytes): New function.
2016 (print_decimal_chars): Add "is_signed" argument.
2017 * printcmd.c (print_scalar_formatted): Update.
2018
2019 2017-06-12 Tom Tromey <tom@tromey.com>
2020
2021 PR exp/16225:
2022 * valprint.h (print_binary_chars, print_hex_chars): Update.
2023 * valprint.c (val_print_type_code_int): Update.
2024 (print_binary_chars): Add "zero_pad" argument.
2025 (emit_octal_digit): New function.
2026 (print_octal_chars): Don't zero-pad.
2027 (print_decimal_chars): Likewise.
2028 (print_hex_chars): Add "zero_pad" argument.
2029 * sh64-tdep.c (sh64_do_fp_register): Update.
2030 * regcache.c (regcache::dump): Update.
2031 * printcmd.c (print_scalar_formatted): Update.
2032 * infcmd.c (default_print_one_register_info): Update.
2033
2034 2017-06-12 Pedro Alves <palves@redhat.com>
2035 Alan Hayward <alan.hayward@arm.com>
2036
2037 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
2038 (mips_eabi_push_dummy_call): Rename local 'regsize' to
2039 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
2040 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
2041 Assert that abi_regsize bytes fit in 'ref_valbuf'.
2042
2043 2017-06-12 Pedro Alves <palves@redhat.com>
2044
2045 * dwarf2read.c (mapped_symtab::data): Now a vector of
2046 symtab_index_entry instead of vector of
2047 std::unique_ptr<symtab_index_entry>. All users adjusted to check
2048 whether an element's name is NULL instead of checking whether the
2049 element itself is NULL.
2050 (find_slot): Change return type. Adjust.
2051 (hash_expand, , add_index_entry, uniquify_cu_indices)
2052 (write_hash_table): Adjust.
2053
2054 2017-06-12 Pedro Alves <palves@redhat.com>
2055
2056 * dwarf2read.c (recursively_count_psymbols): New function.
2057 (write_psymtabs_to_index): Call it to compute number of psyms and
2058 pass estimate size of psyms_seen to unordered_set's ctor.
2059
2060 2017-06-12 Pedro Alves <palves@redhat.com>
2061
2062 * dwarf2read.c (write_hash_table): Check if key already exists
2063 before emplacing.
2064
2065 2017-06-12 Pedro Alves <palves@redhat.com>
2066
2067 * dwarf2read.c (data_buf::append_space): Rename to...
2068 (data_buf::grow): ... this, and make private. Adjust all callers.
2069 (data_buf::append_uint): New method.
2070 (add_address_entry, write_one_signatured_type)
2071 (write_psymtabs_to_index): Use it.
2072
2073 2017-06-12 Pedro Alves <palves@redhat.com>
2074
2075 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
2076 (file_write (FILE *, const std::vector<Elem>&)): Delete.
2077 (data_buf::file_write): Call ::fwrite directly.
2078
2079 2017-06-12 Pedro Alves <palves@redhat.com>
2080
2081 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
2082 std::vector::erase.
2083
2084 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
2085
2086 Code cleanup: C++ify .gdb_index producer.
2087 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
2088 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
2089 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
2090 (create_strtab, add_string): Remove.
2091 (file_write, data_buf): New.
2092 (struct symtab_index_entry): Use std::vector for cu_indices.
2093 (struct mapped_symtab): Use std::vector for data.
2094 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
2095 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
2096 Remove.
2097 (find_slot): Change return type. Update it to the new data structures.
2098 (hash_expand, add_index_entry): Update it to the new data structures.
2099 (offset_type_compare): Remove.
2100 (uniquify_cu_indices): Update it to the new data structures.
2101 (c_str_view, c_str_view_hasher, vector_hasher): New.
2102 (add_indices_to_cpool): Remove.
2103 (write_hash_table): Update it to the new data structures.
2104 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
2105 (eq_psymtab_cu_index): Remove.
2106 (psym_index_map): New typedef.
2107 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
2108 reference and std::unordered_map for cu_index_htab.
2109 (add_address_entry, add_address_entry_worker, write_address_map)
2110 (write_psymbols): Update it to the new data structures.
2111 (write_obstack): Remove.
2112 (struct signatured_type_index_data): Change types_list to a data_buf
2113 reference and psyms_seen to a std::unordered_set reference.
2114 (write_one_signatured_type, recursively_write_psymbols)
2115 (write_psymtabs_to_index): Update it to the new data structures.
2116
2117 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
2118
2119 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
2120 separate-debug-file commands.
2121 * symfile.h (separate_debug_file_debug): New global.
2122 * symfile.c (separate_debug_file_debug): New global.
2123 (separate_debug_file_exists, find_separate_debug_file): Add
2124 debug output.
2125 (_initialize_symfile): Add "set debug separate-debug-file"
2126 command.
2127 * build-id.c (build_id_to_debug_bfd,
2128 find_separate_debug_file_by_buildid): Add debug output.
2129
2130 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
2131
2132 * gdbarch.sh (displaced_step_free_closure): Remove.
2133 * gdbarch.h, gdbarch.c: Re-generate.
2134 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
2135 displaced_step_free_closure.
2136 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
2137 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
2138 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
2139 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
2140 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
2141 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
2142 * arch-utils.h (simple_displaced_step_free_closure): Remove.
2143 * arch-utils.c (simple_displaced_step_free_closure): Remove.
2144 * infrun.c (displaced_step_clear): Call xfree instead of
2145 gdbarch_displaced_step_free_closure.
2146
2147 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
2148
2149 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
2150 NULL".
2151
2152 2017-06-08 Alan Hayward <alan.hayward@arm.com>
2153
2154 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
2155 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
2156 (mn10300_push_dummy_call): Likewise.
2157
2158 2017-06-08 Alan Hayward <alan.hayward@arm.com>
2159
2160 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
2161
2162 2017-06-08 Alan Hayward <alan.hayward@arm.com>
2163
2164 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
2165
2166 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2167
2168 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
2169 able to start inferiors using a shell.
2170 (New remote packets): Announce new packet "QStartupWithShell".
2171 * remote.c: Add PACKET_QStartupWithShell.
2172 (extended_remote_create_inferior): Handle new
2173 PACKET_QStartupWithShell.
2174 (remote_protocol_features) <QStartupWithShell>: New entry for
2175 PACKET_QStartupWithShell.
2176 (_initialize_remote): Call "add_packet_config_cmd" for
2177 QStartupShell.
2178
2179 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2180 Pedro Alves <palves@redhat.com>
2181
2182 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
2183 and "nat/fork-inferior.h".
2184 * common/common-inferior.h: New file, with contents from
2185 "gdb/inferior.h".
2186 * commom/common-utils.c: Include "common-utils.h".
2187 (stringify_argv): New function.
2188 * common/common-utils.h (stringify_argv): New prototype.
2189 * configure.nat: Add "fork-inferior.o" as a dependency for
2190 "*linux*", "fbsd*" and "nbsd*" hosts.
2191 * corefile.c (get_exec_file): Update comment.
2192 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
2193 instead of "startup_inferior".
2194 (darwin_create_inferior): Call "add_thread_silent" after
2195 "fork_inferior".
2196 * fork-child.c: Cleanup unnecessary includes.
2197 (SHELL_FILE): Move to "common/common-fork-child.c".
2198 (environ): Likewise.
2199 (exec_wrapper): Initialize.
2200 (get_exec_wrapper): New function.
2201 (breakup_args): Move to "common/common-fork-child.c"; rename to
2202 "breakup_args_for_exec".
2203 (escape_bang_in_quoted_argument): Move to
2204 "common/common-fork-child.c".
2205 (saved_ui): New variable.
2206 (prefork_hook): New function.
2207 (postfork_hook): Likewise.
2208 (postfork_child_hook): Likewise.
2209 (gdb_startup_inferior): Likewise.
2210 (fork_inferior): Move to "common/common-fork-child.c". Update
2211 function to support gdbserver.
2212 (startup_inferior): Likewise.
2213 * gdbcore.h (get_exec_file): Remove declaration.
2214 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
2215 instead of "startup_inferior". Call "add_thread_silent" after
2216 "fork_inferior".
2217 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
2218 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
2219 instead of "startup_inferior". Call "add_thread_silent" after
2220 "fork_inferior".
2221 * inferior.h: Include "common-inferior.h".
2222 (trace_start_error): Move to "common/common-utils.h".
2223 (trace_start_error_with_name): Likewise.
2224 (fork_inferior): Move prototype to "nat/fork-inferior.h".
2225 (startup_inferior): Likewise.
2226 (gdb_startup_inferior): New prototype.
2227 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
2228 * nat/fork-inferior.h: New file.
2229 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
2230 instead of "startup_inferior". Call "add_thread_silent" after
2231 "fork_inferior".
2232 * target.h (target_terminal_init): Move prototype to
2233 "target/target.h".
2234 (target_terminal_inferior): Likewise.
2235 (target_terminal_ours): Likewise.
2236 * target/target.h (target_terminal_init): New prototype, moved
2237 from "target.h".
2238 (target_terminal_inferior): Likewise.
2239 (target_terminal_ours): Likewise.
2240 * utils.c (gdb_flush_out_err): New function.
2241
2242 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2243
2244 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
2245 * common/common-gdbthread.h: New file, with parts from
2246 "gdb/gdbthread.h".
2247 * gdbthread.h: Include "common-gdbthread.h".
2248 (switch_to_thread): Moved to "common/common-gdbthread.h".
2249
2250 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2251
2252 * Makefile.in (SFILES): Add "common/job-control.c".
2253 (HFILES_NO_SRCDIR): Add "common/job-control.h".
2254 (COMMON_OBS): Add "job-control.o".
2255 * common/job-control.c: New file, with contents from
2256 "gdb/inflow.c".
2257 * common/job-control.h: New file, with contents from "terminal.h".
2258 * fork-child.c: Include "job-control.h".
2259 * inflow.c: Include "job-control.h".
2260 (gdb_setpgid): Move to "common/common-inflow.c".
2261 (_initialize_inflow): Move setting of "job_control" to
2262 "handle_job_control".
2263 * terminal.h (job_control): Moved to "common/common-terminal.h".
2264 (gdb_setpgid): Likewise.
2265 * top.c: Include "job_control.h".
2266 * utils.c: Likewise.
2267 (job_control): Moved to "job-control.c".
2268
2269 2017-06-07 Pedro Alves <palves@redhat.com>
2270
2271 * Makefile.in (SFILES): Add gdb_regex.c.
2272 (COMMON_OBS): Add gdb_regex.o.
2273 * ada-lang.c (ada_add_standard_exceptions)
2274 (ada_add_exceptions_from_frame, name_matches_regex)
2275 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
2276 parameter type to compiled_regex. Adjust.
2277 (ada_exceptions_list): Use compiled_regex.
2278 * break-catch-throw.c (exception_catchpoint::pattern): Now a
2279 std::unique_ptr<compiled_regex>.
2280 (exception_catchpoint::~exception_catchpoint): Remove regfree
2281 call.
2282 (check_status_exception_catchpoint): Adjust to use compiled_regex.
2283 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
2284 * breakpoint.c (solib_catchpoint::compiled): Now a
2285 std::unique_ptr<compiled_regex>.
2286 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
2287 (check_status_catch_solib): Adjust to use compiled_regex.
2288 (add_solib_catchpoint): Adjust to use compiled_regex.
2289 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
2290 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
2291 compiled_regex reference. Adjust to use it.
2292 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
2293 declaration. Include "gdb_regex.h".
2294 (apropos_cmd): Change regex parameter to compiled_regex reference.
2295 * gdb_regex.c: New file.
2296 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
2297 declarations.
2298 (class compiled_regex): New.
2299 * linux-tdep.c: Include "common/gdb_optional.h".
2300 (struct mapping_regexes): New, factored out from
2301 mapping_is_anonymous_p, and adjusted to use compiled_regex.
2302 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
2303 gdb::optional and remove cleanups. Adjust to compiled_regex.
2304 * probe.c: Include "common/gdb_optional.h".
2305 (collect_probes): Use compiled_regex and gdb::optional and remove
2306 cleanups.
2307 * skip.c: Include "common/gdb_optional.h".
2308 (skiplist_entry::compiled_function_regexp): Now a
2309 gdb::optional<compiled_regex>.
2310 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
2311 (free_skiplist_entry): Remove regfree call.
2312 (compile_skip_regexp, skip_rfunction_p): Adjust to use
2313 compiled_regex and gdb::optional.
2314 * symtab.c: Include "common/gdb_optional.h".
2315 (search_symbols): Use compiled_regex and gdb::optional.
2316 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
2317 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
2318 to gdb_regex.c.
2319
2320 2017-06-07 Alan Hayward <alan.hayward@arm.com>
2321
2322 * regcache.c (regcache::save): Avoid buffer use.
2323 (regcache::dump): Likewise.
2324
2325 2017-06-07 Alan Hayward <alan.hayward@arm.com>
2326
2327 * sh-tdep.c (sh_pseudo_register_read): Remove
2328 MAX_REGISTER_SIZE.
2329 (sh_pseudo_register_write): Likewise.
2330 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
2331 (sh64_pseudo_register_write): Likewise
2332
2333 2017-06-07 Alan Hayward <alan.hayward@arm.com>
2334
2335 * aarch64-tdep.c (aarch64_store_return_value): Use
2336 V_REGISTER_SIZE.
2337 (aarch64_pseudo_read_value): Likewise.
2338 (aarch64_pseudo_write): Likewise.
2339
2340 2017-06-06 Yao Qi <yao.qi@linaro.org>
2341
2342 * regformats/regdef.h (set_register_cache): Remove the
2343 declaration.
2344
2345 2017-06-06 Alan Hayward <alan.hayward@arm.com>
2346
2347 * frame.c (frame_unwind_register_signed): Use
2348 frame_unwind_register_value.
2349
2350 2017-06-06 Pedro Alves <palves@redhat.com>
2351
2352 PR breakpoints/21553
2353 * breakpoint.c (create_breakpoints_sal_default)
2354 (init_breakpoint_sal, create_breakpoint_sal): Use
2355 gdb::unique_xmalloc_ptr for string parameters.
2356 (create_breakpoint): Constify 'extra_string' and 'cond_string'
2357 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
2358 (base_breakpoint_create_breakpoints_sal)
2359 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
2360 (strace_marker_create_breakpoints_sal)
2361 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
2362 string parameters.
2363 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
2364 gdb::unique_xmalloc_ptr for string parameters.
2365 (create_breakpoint): Constify 'extra_string' and 'cond_string'
2366 parameters.
2367
2368 2017-06-06 Alan Hayward <alan.hayward@arm.com>
2369
2370 * alpha-tdep.c (alpha_register_to_value): Use
2371 get_frame_register_value.
2372 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
2373
2374 2017-06-06 Alan Hayward <alan.hayward@arm.com>
2375
2376 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
2377 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
2378 (ia64_value_to_register): Likewise.
2379 (ia64_extract_return_value): Likewise.
2380 (ia64_store_return_value): Likewise.
2381 (ia64_push_dummy_call): Likewise.
2382
2383 2017-06-04 Joel Brobecker <brobecker@adacore.com>
2384
2385 GDB 8.0 released.
2386
2387 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
2388
2389 * x86-linux-nat.c (struct arch_lwp_info): Remove.
2390
2391 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
2392
2393 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
2394 parameter.
2395 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
2396
2397 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
2398
2399 * event-loop.c (poll_timers): Unallocate timer using delete
2400 instead of xfree.
2401
2402 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
2403
2404 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
2405 (struct breakpoint) <~breakpoint>: New.
2406 (struct watchpoint): Inherit from breakpoint.
2407 <~watchpoint>: New.
2408 <base>: Remove.
2409 (struct tracepoint): Inherit from breakpoint.
2410 <base>: Remove.
2411 * breakpoint.c (longjmp_breakpoint_ops): Remove.
2412 (struct longjmp_breakpoint): Inherit from breakpoint.
2413 <~longjmp_breakpoint>: New.
2414 <base>: Remove.
2415 (new_breakpoint_from_type): Remove casts.
2416 (watchpoint_in_thread_scope): Remove reference to base field.
2417 (watchpoint_del_at_next_stop): Likewise.
2418 (update_watchpoint): Likewise.
2419 (watchpoint_check): Likewise.
2420 (bpstat_check_watchpoint): Likewise.
2421 (set_longjmp_breakpoint): Likewise.
2422 (struct fork_catchpoint): Inherit from breakpoint.
2423 <base>: Remove.
2424 (struct solib_catchpoint): Inherit from breakpoint.
2425 <~solib_catchpoint>: New.
2426 <base>: Remove.
2427 (dtor_catch_solib): Change to ...
2428 (solib_catchpoint::~solib_catchpoint): ... this.
2429 (breakpoint_hit_catch_solib): Remove reference to base field.
2430 (add_solib_catchpoint): Likewise.
2431 (create_fork_vfork_event_catchpoint): Likewise.
2432 (struct exec_catchpoint): Inherit from breakpoint.
2433 <~exec_catchpoint>: New.
2434 <base>: Remove.
2435 (dtor_catch_exec): Change to ...
2436 (exec_catchpoint::~exec_catchpoint): ... this.
2437 (dtor_watchpoint): Change to ...
2438 (watchpoint::~watchpoint): ... this.
2439 (watch_command_1): Remove reference to base field.
2440 (catch_exec_command_1): Likewise.
2441 (base_breakpoint_dtor): Change to ...
2442 (breakpoint::~breakpoint): ... this.
2443 (base_breakpoint_ops): Remove dtor field value.
2444 (longjmp_bkpt_dtor): Change to ...
2445 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
2446 (strace_marker_create_breakpoints_sal): Remove reference to base
2447 field.
2448 (delete_breakpoint): Don't manually call breakpoint destructor.
2449 (create_tracepoint_from_upload): Remove reference to base field.
2450 (trace_pass_set_count): Likewise.
2451 (initialize_breakpoint_ops): Don't initialize
2452 momentary_breakpoint_ops, don't set dtors.
2453 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
2454 <~ada_catchpoint>: New.
2455 <base>: Remove.
2456 (create_excep_cond_exprs): Remove reference to base field.
2457 (dtor_exception): Change to ...
2458 (ada_catchpoint::~ada_catchpoint): ... this.
2459 (dtor_catch_exception): Remove.
2460 (dtor_catch_exception_unhandled): Remove.
2461 (dtor_catch_assert): Remove.
2462 (create_ada_exception_catchpoint): Remove reference to base
2463 field.
2464 (initialize_ada_catchpoint_ops): Don't set dtors.
2465 * break-catch-sig.c (struct signal_catchpoint): Inherit from
2466 breakpoint.
2467 <~signal_catchpoint>: New.
2468 <base>: Remove.
2469 (signal_catchpoint_dtor): Change to ...
2470 (signal_catchpoint::~signal_catchpoint): ... this.
2471 (create_signal_catchpoint): Remove reference to base field.
2472 (initialize_signal_catchpoint_ops): Don't set dtor.
2473 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
2474 from breakpoint.
2475 <~syscall_catchpoint>: New.
2476 <base>: Remove.
2477 (dtor_catch_syscall): Change to ...
2478 (syscall_catchpoint::~syscall_catchpoint): ... this.
2479 (create_syscall_event_catchpoint): Remove reference to base
2480 field.
2481 (initialize_syscall_catchpoint_ops): Don't set dtor.
2482 * break-catch-throw.c (struct exception_catchpoint): Inherit
2483 from breakpoint.
2484 <~exception_catchpoint>: New.
2485 <base>: Remove.
2486 (dtor_exception_catchpoint): Change to ...
2487 (exception_catchpoint::~exception_catchpoint): ... this.
2488 (handle_gnu_v3_exceptions): Remove reference to base field.
2489 (initialize_throw_catchpoint_ops): Don't set dtor.
2490 * ctf.c (ctf_get_traceframe_address): Remove reference to base
2491 field.
2492 * remote.c (remote_get_tracepoint_status): Likewise.
2493 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
2494 * tracefile.c (tracefile_fetch_registers): Likewise.
2495 * tracepoint.c (actions_command): Likewise.
2496 (validate_actionline): Likewise.
2497 (tfind_1): Likewise.
2498 (get_traceframe_location): Likewise.
2499 (find_matching_tracepoint_location): Likewise.
2500 (parse_tracepoint_status): Likewise.
2501 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
2502
2503 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
2504
2505 * breakpoint.c (struct longjmp_breakpoint): New struct.
2506 (is_tracepoint_type): Change return type to bool.
2507 (is_longjmp_type): New function.
2508 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
2509 (set_raw_breakpoint_without_location): Use
2510 new_breakpoint_from_type.
2511 (set_raw_breakpoint): Likewise.
2512
2513 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
2514
2515 * breakpoint.c (new_breakpoint_from_type): New function.
2516 (create_breakpoint_sal): Use new_breakpoint_from_type and
2517 unique_ptr.
2518 (create_breakpoint): Likewise.
2519
2520 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
2521
2522 * memattr.c (mem_info_command): Rename to ...
2523 (info_mem_command): ... this.
2524 (mem_enable_command): Rename to ...
2525 (enable_mem_command): ... this.
2526 (mem_disable_command): Rename to ...
2527 (disable_mem_command): ... this.
2528 (mem_delete_command): Rename to ...
2529 (delete_mem_command): ... this.
2530 (_initialize_mem): Adjust function names.
2531
2532 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
2533
2534 * btrace.c (handle_pt_insn_events): New.
2535 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
2536 STATUS. Split into this and ...
2537 (handle_pt_insn_event_flags): ... this.
2538
2539 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
2540
2541 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
2542 and struct pt_insn.resynced.
2543 * configure: Regenerated.
2544 * config.in: Regenerated.
2545
2546 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2547
2548 * btrace.c (ftrace_find_call_by_number): New function.
2549 (ftrace_new_function): Store objects, not pointers.
2550 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
2551 ftrace_new_gap, ftrace_update_function,
2552 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
2553 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
2554 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
2555 btrace_ends_with_single_insn, btrace_call_get): Account for
2556 btrace_thread_info::functions now storing objects.
2557 * btrace.h (struct btrace_thread_info): Add constructor.
2558 (struct btrace_thread_info) <functions>: Make std::vector.
2559 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
2560 Initialize with default values.
2561 * record-btrace.c (record_btrace_frame_sniffer): Account for
2562 btrace_thread_info::functions now storing objects.
2563
2564 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2565
2566 * btrace.c: Remove typedef bfun_s.
2567 (ftrace_new_gap): Directly add gaps to the list of gaps.
2568 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
2569 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
2570 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
2571 instead of gdb VEC.
2572
2573 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2574
2575 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
2576 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
2577 with btrace_thread_info::next_segment and
2578 btrace_thread_info::prev_segment.
2579 * btrace.h: Remove struct btrace_func_link.
2580 (struct btrace_function): Replace pair of function segment pointers
2581 with pair of indices.
2582 * python/py-record-btrace.c (btpy_call_prev_sibling,
2583 btpy_call_next_sibling): Replace references to
2584 btrace_thread_info::segment with btrace_thread_info::next_segment and
2585 btrace_thread_info::prev_segment.
2586 * record-btrace.c (record_btrace_frame_this_id): Use
2587 btrace_find_call_by_number.
2588
2589 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2590
2591 * btrace.c (ftrace_new_function, ftrace_fixup_level,
2592 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
2593 btrace_insn_next, btrace_insn_prev): Remove references to
2594 btrace_thread_info::flow.
2595 * btrace.h (struct btrace_function): Remove FLOW.
2596
2597 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2598
2599 * btrace.c (ftrace_find_call_by_number): New function.
2600 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
2601 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
2602 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
2603 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
2604 index.
2605 * btrace.h (struct btrace_function): Turn UP into an index.
2606 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
2607 as an index.
2608 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
2609 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
2610 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
2611
2612 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2613
2614 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
2615 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
2616 ftrace_update_function, ftrace_compute_global_level_offset,
2617 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
2618 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
2619 btrace_insn_end, btrace_is_empty): Remove references to
2620 btrace_thread_info::begin and btrace_thread_info::end.
2621 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
2622 (struct btrace_thread_info) <functions>: Adjust comment.
2623 * record-btrace.c (record_btrace_start_replaying): Remove reference to
2624 btrace_thread_info::begin.
2625
2626 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2627
2628 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
2629 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
2630 ftrace_update_function): Remove arguments that implicitly were always
2631 BTINFO->END.
2632 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
2633 Don't pass BTINFO->END.
2634
2635 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2636
2637 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
2638 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
2639 btrace_find_insn_by_number): Replace function segment pointer with
2640 index.
2641 (btrace_insn_cmp): Simplify.
2642 * btrace.h: (struct btrace_insn_iterator) Rename index to
2643 insn_index. Replace function segment pointer with index into function
2644 segment vector.
2645 * record-btrace.c (record_btrace_call_history): Replace function
2646 segment pointer use with index.
2647 (record_btrace_frame_sniffer): Retrieve function call segment through
2648 vector.
2649 (record_btrace_set_replay): Remove defunc't safety check.
2650
2651 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2652
2653 * btrace.c (btrace_ends_with_single_insn): New function.
2654 (btrace_call_get, btrace_call_number, btrace_call_begin,
2655 btrace_call_end, btrace_call_next, btrace_call_prev,
2656 btrace_find_call_by_number): Use index into call segment vector
2657 instead of pointer.
2658 (btrace_call_cmp): Simplify.
2659 * btrace.h (struct btrace_call_iterator): Replace function call segment
2660 pointer with index into vector.
2661 * record-btrace.c (record_btrace_call_history): Use index instead of
2662 pointer.
2663
2664 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2665
2666 * btrace.c (btrace_insn_begin, btrace_insn_end,
2667 btrace_find_insn_by_number): Add btinfo to iterator.
2668 * btrace.h (struct btrace_insn_iterator): Add btinfo.
2669
2670 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2671
2672 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
2673 and save pointers directly.
2674 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
2675 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
2676 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
2677 changed signature of functions.
2678 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
2679 (btrace_fetch): Remove code that adds btrace_function pointers to
2680 vector of btrace_functions.
2681 (btrace_clear): Simplify freeing vector of btrace_functions.
2682
2683 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
2684
2685 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
2686 Replace VEC_* with std::vector functions.
2687 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
2688 (struct btrace_thread_info)<functions>: Change type to std::vector.
2689
2690 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
2691
2692 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
2693 "Removed targets and native configurations" up. Merge duplicate
2694 "New commands" sub-sections. Add "New options" sub-sections.
2695
2696 2017-05-26 Alan Hayward <alan.hayward@arm.com>
2697
2698 * defs.h (copy_integer_to_size): New declaration.
2699 * findvar.c (copy_integer_to_size): New function.
2700 (do_cint_test): New selftest function.
2701 (copy_integer_to_size_test): Likewise.
2702 (_initialize_findvar): Likewise.
2703 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
2704 (mips_fbsd_collect_reg): Use raw_collect_integer.
2705 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
2706 (mips64_fill_gregset): Use raw_collect_integer
2707 (mips64_fill_fpregset): Use raw_supply_integer.
2708 * regcache.c (regcache::raw_supply_integer): New function.
2709 (regcache::raw_collect_integer): Likewise.
2710 * regcache.h: (regcache::raw_supply_integer): New declaration.
2711 (regcache::raw_collect_integer): Likewise.
2712
2713 2017-05-24 Yao Qi <yao.qi@linaro.org>
2714
2715 * Makefile.in (SFILES): Add gdbarch-selftests.c.
2716 (COMMON_OBS): Add gdbarch-selftests.o.
2717 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
2718 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
2719 * gdbarch-selftests.c: New file.
2720 * regcache.h (regcache) <~regcache>: Mark it virtual if
2721 GDB_SELF_TEST.
2722 <raw_write>: Likewise.
2723
2724 2017-05-24 Yao Qi <yao.qi@linaro.org>
2725
2726 * regcache.c (current_regcache): Change it to
2727 regcache::current_regcache.
2728 (regcache_observer_target_changed): Update.
2729 (regcache_thread_ptid_changed): Make it a regcache static
2730 method.
2731 (regcache_thread_ptid_changed): Update.
2732 (class regcache_access): New.
2733 (current_regcache_test): Update.
2734 (_initialize_regcache): Update.
2735 * regcache.h: Include forward_list.
2736 (regcache): Declare regcache_thread_ptid_changed and declare
2737 registers_changed_ptid as friend.
2738
2739 2017-05-24 Yao Qi <yao.qi@linaro.org>
2740
2741 * i387-tdep.c (i387_register_to_value): Use register_size
2742 instead of TYPE_LENGTH.
2743 * m68k-tdep.c (m68k_register_to_value): Likewise.
2744
2745 2017-05-24 Yao Qi <yao.qi@linaro.org>
2746
2747 * i387-tdep.c (i387_convert_register_p): Return false if type
2748 code isn't TYPE_CODE_FLT.
2749
2750 2017-05-24 Yao Qi <yao.qi@linaro.org>
2751
2752 * alpha-tdep.c (alpha_convert_register_p): Return true if type
2753 length is 4.
2754 (alpha_register_to_value): Remove type length check.
2755 (alpha_value_to_register): Likewise.
2756
2757 2017-05-24 Yao Qi <yao.qi@linaro.org>
2758
2759 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
2760 TYPE_CODE_FLT.
2761
2762 2017-05-24 Yao Qi <yao.qi@linaro.org>
2763
2764 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
2765 TYPE_CODE_FLT or not.
2766
2767 2017-05-24 Yao Qi <yao.qi@linaro.org>
2768
2769 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
2770 * avr-tdep.c (avr_gdbarch_init): Likewise.
2771 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
2772 * cris-tdep.c (cris_gdbarch_init): Likewise.
2773 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2774 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
2775 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
2776 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
2777 * mep-tdep.c (mep_gdbarch_init): Likewise.
2778 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
2779 * mips-tdep.c (mips_gdbarch_init): Likewise.
2780 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
2781 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
2782 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
2783 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
2784 * v850-tdep.c (v850_gdbarch_init): Likewise.
2785
2786 2017-05-24 Yao Qi <yao.qi@linaro.org>
2787
2788 * selftest-arch.c (tests_with_arch): Call registers_changed
2789 and reinit_frame_cache.
2790 * selftest.c (run_self_tests): Likewise.
2791
2792 2017-05-24 Yao Qi <yao.qi@linaro.org>
2793
2794 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
2795 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
2796
2797 2017-05-24 Yao Qi <yao.qi@linaro.org>
2798
2799 * rl78-tdep.c (rl78_gdbarch_init): Don't call
2800 set_gdbarch_print_insn.
2801
2802 2017-05-24 Yao Qi <yao.qi@linaro.org>
2803
2804 * h8300-tdep.c (h8300_gdbarch_init): Don't call
2805 set_gdbarch_print_insn.
2806
2807 2017-05-24 Yao Qi <yao.qi@linaro.org>
2808
2809 * alpha-tdep.c (alpha_gdbarch_init): Don't call
2810 set_gdbarch_print_insn.
2811 * arc-tdep.c (arc_gdbarch_init): Likewise.
2812 * arch-utils.c: include dis-asm.h.
2813 (default_print_insn): New function.
2814 * arch-utils.h (default_print_insn): Declare.
2815 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
2816 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
2817 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
2818 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
2819 * frv-tdep.c (frv_gdbarch_init): Likewise.
2820 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
2821 * gdbarch.sh (print_insn): Use default_print_insn.
2822 * gdbarch.c: Regenerated.
2823 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
2824 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
2825 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
2826 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
2827 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
2828 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
2829 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
2830 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
2831 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
2832 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
2833 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
2834 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
2835 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
2836 * mt-tdep.c (mt_gdbarch_init): Likewise.
2837 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
2838 * nios2-tdep.c (nios2_print_insn): Remove.
2839 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
2840 * rx-tdep.c (rx_gdbarch_init): Likewise.
2841 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
2842 * score-tdep.c (score_print_insn): Remove.
2843 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
2844 * sh-tdep.c (sh_gdbarch_init): Likewise.
2845 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
2846 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
2847 * tic6x-tdep.c (tic6x_print_insn): Remove.
2848 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
2849 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
2850 * v850-tdep.c (v850_gdbarch_init): Likewise.
2851 * vax-tdep.c (vax_gdbarch_init): Likewise.
2852 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
2853 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
2854
2855 2017-05-23 John Baldwin <jhb@FreeBSD.org>
2856
2857 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
2858 (MIPS_FP0_REGNUM): Remove.
2859 (MIPS_FSR_REGNUM): Remove.
2860 (mips_fbsd_supply_fpregs): Use mips_regnum.
2861 (mips_fbsd_supply_gregs): Likewise.
2862 (mips_fbsd_collect_fpregs): Likewise.
2863 (mips_fbsd_collect_gregs): Likewise.
2864
2865 2017-05-23 John Baldwin <jhb@FreeBSD.org>
2866
2867 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
2868 (getpfpregs_supplies): New function.
2869 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
2870 getfpregs_supplies.
2871 (mips_fbsd_store_inferior_registers): Likewise.
2872
2873 2017-05-22 Pedro Alves <palves@redhat.com>
2874
2875 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
2876 maintainer.
2877
2878 2017-05-22 Alan Hayward <alan.hayward@arm.com>
2879
2880 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
2881 (store_register): Likewise.
2882 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
2883 (get_decimal_float_return_value): Likewise.
2884 (do_ppc_sysv_return_value): Likewise.
2885 (ppc64_sysv_abi_push_integer): Likewise.
2886 (ppc64_sysv_abi_push_freg): Likewise.
2887 (ppc64_sysv_abi_return_value_base): Likewise.
2888 (ppc64_sysv_abi_return_value): Likewise.
2889 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
2890 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
2891 * rs6000-nat.c: Likewise.
2892 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
2893 (rs6000_value_to_register): Likewise.
2894 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
2895
2896 2017-05-21 Tom Tromey <tom@tromey.com>
2897
2898 PR rust/21466:
2899 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
2900 arrays as "[T]", not "[T; ]".
2901
2902 2017-05-19 Tom Tromey <tom@tromey.com>
2903
2904 PR rust/21484:
2905 * rust-lang.c (exp_descriptor_rust): New function.
2906 (rust_language_defn): Use it.
2907 * p-lang.c (pascal_language_defn): Update.
2908 * opencl-lang.c (opencl_language_defn): Update.
2909 * objc-lang.c (objc_language_defn): Update.
2910 * m2-lang.c (m2_language_defn): Update.
2911 * language.h (struct language_defn)
2912 <la_watch_location_expression>: New member.
2913 * language.c (unknown_language_defn, auto_language_defn)
2914 (local_language_defn): Update.
2915 * go-lang.c (go_language_defn): Update.
2916 * f-lang.c (f_language_defn): Update.
2917 * d-lang.c (d_language_defn): Update.
2918 * c-lang.h (c_watch_location_expression): Declare.
2919 * c-lang.c (c_watch_location_expression): New function.
2920 (c_language_defn, cplus_language_defn, asm_language_defn)
2921 (minimal_language_defn): Use it.
2922 * breakpoint.c (watch_command_1): Call
2923 la_watch_location_expression.
2924 * ada-lang.c (ada_language_defn): Update.
2925
2926 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2927
2928 PR tui/21482
2929 * gdb_curses.h (NOMACROS): Define.
2930 (NCURSES_NOMACROS): Define.
2931
2932 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2933
2934 PR tui/21482
2935 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
2936 arg to char *.
2937 * tui/tui-wingeneral.c (box_win): Likewise.
2938 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
2939 (tui_show_source_line): Likewise.
2940 (tui_show_exec_info_content): Likewise.
2941
2942 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
2943
2944 * sparc-tdep.c (sparc_structure_return_p)
2945 (sparc_arg_on_registers_p): New functions.
2946 (sparc32_store_arguments): Use them.
2947 * sparc64-tdep.c (sparc64_16_byte_align_p)
2948 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
2949 Handle TYPE_CODE_ARRAY.
2950
2951 2017-05-17 Yao Qi <yao.qi@linaro.org>
2952
2953 * cli/cli-decode.c (add_alias_cmd): New function.
2954 * command.h (add_alias_cmd): Declare.
2955 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
2956 instead call add_alias_cmd.
2957
2958 2017-05-17 Pedro Alves <palves@redhat.com>
2959
2960 * Makefile.in (nat_extra_makefile_frag): Rename to ...
2961 (nat_makefile_frag): ... this. All references updated.
2962 * configure.ac: Likewise.
2963 * configure.nat: Likewise. Enhance comments.
2964 * configure: Regenerate.
2965
2966 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2967
2968 * procfs.c (procfs_create_inferior): Change prototype to match
2969 definition.
2970
2971 2017-05-13 Eli Zaretskii <eliz@gnu.org>
2972
2973 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
2974 C++ compiler warning.
2975
2976 2017-05-12 Tom Tromey <tom@tromey.com>
2977
2978 PR rust/21483:
2979 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
2980 recurse, just call value_struct_elt directly.
2981
2982 2017-05-12 Tom Tromey <tom@tromey.com>
2983
2984 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
2985 OP_RUST_ARRAY>: Fix.
2986
2987 2017-05-12 Tom Tromey <tom@tromey.com>
2988
2989 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
2990
2991 2017-05-09 Yao Qi <yao.qi@linaro.org>
2992
2993 * regcache.c: Include <forward_list>.
2994 (struct regcache_list): Remove.
2995 (current_regcache): Update.
2996 (get_thread_arch_aspace_regcache): Update for std::forward_list.
2997 (regcache_thread_ptid_changed): Likewise.
2998 (registers_changed_ptid): Likewise.
2999 (current_regcache_size): Likewise.
3000
3001 2017-05-09 Yao Qi <yao.qi@linaro.org>
3002
3003 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
3004 (current_regcache_size): New function.
3005 (current_regcache_test): New function.
3006 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
3007
3008 2017-05-08 Alan Hayward <alan.hayward@arm.com>
3009
3010 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
3011 (print_gp_register_row): Use get_frame_register_value.
3012
3013 2017-05-08 Alan Hayward <alan.hayward@arm.com>
3014
3015 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
3016 (mips_supply_fpregset): Likewise.
3017 (mips64_supply_gregset): Likewise.
3018
3019 2017-05-08 Alan Hayward <alan.hayward@arm.com>
3020
3021 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
3022 regcache->raw_supply_zeroed.
3023
3024 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3025
3026 * configure.nat: Rearrange 'case' statements to match
3027 host before cpu.
3028
3029 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
3030
3031 * Makefile.in: Remove "@host_makefile_frag@". Add variables
3032 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
3033 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
3034 "@nat_extra_makefile_frag@".
3035 (Makefile): Remove dependency on "@frags@".
3036 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
3037 (data-directory/Makefile): Likewise.
3038 * config/aarch64/linux.mh: Deleted; moved contents to
3039 "gdb/configure.nat".
3040 * config/alpha/alpha-linux.mh: Likewise.
3041 * config/alpha/nbsd.mh: Likewise.
3042 * config/arm/linux.mh: Likewise.
3043 * config/arm/nbsdelf.mh: Likewise.
3044 * config/i386/cygwin.mh: Likewise.
3045 * config/i386/cygwin64.mh: Likewise.
3046 * config/i386/darwin.mh: Likewise.
3047 * config/i386/fbsd.mh: Likewise.
3048 * config/i386/fbsd64.mh: Likewise.
3049 * config/i386/go32.mh: Likewise.
3050 * config/i386/i386gnu.mh: Likewise.
3051 * config/i386/i386sol2.mh: Likewise.
3052 * config/i386/linux.mh: Likewise.
3053 * config/i386/linux64.mh: Likewise.
3054 * config/i386/mingw.mh: Likewise.
3055 * config/i386/mingw64.mh: Likewise.
3056 * config/i386/nbsd64.mh: Likewise.
3057 * config/i386/nbsdelf.mh: Likewise.
3058 * config/i386/nto.mh: Likewise.
3059 * config/i386/obsd.mh: Likewise.
3060 * config/i386/obsd64.mh: Likewise.
3061 * config/i386/sol2-64.mh: Likewise.
3062 * config/ia64/linux.mh: Likewise.
3063 * config/m32r/linux.mh: Likewise.
3064 * config/m68k/linux.mh: Likewise.
3065 * config/m68k/nbsdelf.mh: Likewise.
3066 * config/m68k/obsd.mh: Likewise.
3067 * config/m88k/obsd.mh: Likewise.
3068 * config/mips/fbsd.mh: Likewise.
3069 * config/mips/linux.mh: Likewise.
3070 * config/mips/nbsd.mh: Likewise.
3071 * config/mips/obsd64.mh: Likewise.
3072 * config/pa/linux.mh: Likewise.
3073 * config/pa/nbsd.mh: Likewise.
3074 * config/pa/obsd.mh: Likewise.
3075 * config/powerpc/aix.mh: Likewise.
3076 * config/powerpc/fbsd.mh: Likewise.
3077 * config/powerpc/linux.mh: Likewise.
3078 * config/powerpc/nbsd.mh: Likewise.
3079 * config/powerpc/obsd.mh: Likewise.
3080 * config/powerpc/ppc64-linux.mh: Likewise.
3081 * config/powerpc/spu-linux.mh: Likewise.
3082 * config/s390/linux.mh: Likewise.
3083 * config/sh/nbsd.mh: Likewise.
3084 * config/sparc/fbsd.mh: Likewise.
3085 * config/sparc/linux.mh: Likewise.
3086 * config/sparc/linux64.mh: Likewise.
3087 * config/sparc/nbsd64.mh: Likewise.
3088 * config/sparc/nbsdelf.mh: Likewise.
3089 * config/sparc/obsd64.mh: Likewise.
3090 * config/sparc/sol2.mh: Likewise.
3091 * config/tilegx/linux.mh: Likewise.
3092 * config/vax/nbsdelf.mh: Likewise.
3093 * config/vax/obsd.mh: Likewise.
3094 * config/xtensa/linux.mh: Likewise.
3095 * config/i386/i386gnu.mn: New file, with excerpts from
3096 "config/i386/i386gnu.mh".
3097 * configure: Regenerate.
3098 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
3099 *.mh files under "gdb/config".
3100 * configure.nat: New file, with contents from the
3101 "gdb/config/*/*.mh" files.
3102
3103 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
3104
3105 * btrace.c (btrace_clear): Free insn vector.
3106
3107 2017-05-05 Pedro Alves <palves@redhat.com>
3108
3109 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
3110 * configure: Regenerate.
3111
3112 2017-05-04 Pedro Alves <palves@redhat.com>
3113
3114 * Makefile.in (SFILES): Add progspace-and-thread.c.
3115 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
3116 (COMMON_OBS): Add progspace-and-thread.o.
3117 * breakpoint.c: Include "progspace-and-thread.h".
3118 (update_inserted_breakpoint_locations)
3119 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
3120 Use scoped_restore_current_pspace_and_thread.
3121 (create_std_terminate_master_breakpoint): Use
3122 scoped_restore_current_program_space.
3123 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
3124 (print_breakpoint_location): Use
3125 scoped_restore_current_program_space.
3126 (bp_loc_is_permanent): Use
3127 scoped_restore_current_pspace_and_thread.
3128 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
3129 (download_tracepoint_locations): Use
3130 scoped_restore_current_pspace_and_thread.
3131 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
3132 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
3133 (enum step_over_calls_kind): Moved from inferior.h.
3134 (class scoped_restore_current_thread): New class.
3135 * gdbthread.h (make_cleanup_restore_current_thread): Delete
3136 declaration.
3137 (scoped_restore_current_thread): New class.
3138 * infcmd.c: Include "common/gdb_optional.h".
3139 (continue_1, proceed_after_attach): Use
3140 scoped_restore_current_thread.
3141 (notice_new_inferior): Use scoped_restore_current_thread.
3142 * inferior.c: Include "progspace-and-thread.h".
3143 (restore_inferior, save_current_inferior): Delete.
3144 (add_inferior_command, clone_inferior_command): Use
3145 scoped_restore_current_pspace_and_thread.
3146 * inferior.h (scoped_restore_current_inferior): New class.
3147 * infrun.c: Include "progspace-and-thread.h" and
3148 "common/gdb_optional.h".
3149 (follow_fork_inferior): Use
3150 scoped_restore_current_pspace_and_thread.
3151 (scoped_restore_exited_inferior): New class.
3152 (handle_vfork_child_exec_or_exit): Use
3153 scoped_restore_exited_inferior,
3154 scoped_restore_current_pspace_and_thread,
3155 scoped_restore_current_thread and scoped_restore.
3156 (fetch_inferior_event): Use scoped_restore_current_thread.
3157 * linespec.c (decode_line_full, decode_line_1): Use
3158 scoped_restore_current_program_space.
3159 * mi/mi-main.c: Include "progspace-and-thread.h".
3160 (exec_continue): Use scoped_restore_current_thread.
3161 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
3162 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
3163 * proc-service.c (ps_pglobal_lookup): Use
3164 scoped_restore_current_program_space.
3165 * progspace-and-thread.c: New file.
3166 * progspace-and-thread.h: New file.
3167 * progspace.c (release_program_space, clone_program_space): Use
3168 scoped_restore_current_program_space.
3169 (restore_program_space, save_current_program_space)
3170 (save_current_space_and_thread): Delete.
3171 (switch_to_program_space_and_thread): Moved to
3172 progspace-and-thread.c.
3173 * progspace.h (save_current_program_space)
3174 (save_current_space_and_thread): Delete declarations.
3175 (scoped_restore_current_program_space): New class.
3176 * remote.c (remote_btrace_maybe_reopen): Use
3177 scoped_restore_current_thread.
3178 * symtab.c: Include "progspace-and-thread.h".
3179 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
3180 * thread.c (print_thread_info_1): Use
3181 scoped_restore_current_thread.
3182 (struct current_thread_cleanup): Delete.
3183 (do_restore_current_thread_cleanup)
3184 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
3185 (scoped_restore_current_thread::~scoped_restore_current_thread):
3186 ... this new dtor.
3187 (make_cleanup_restore_current_thread): Rename/convert to ...
3188 (scoped_restore_current_thread::scoped_restore_current_thread):
3189 ... this new ctor.
3190 (thread_apply_all_command): Use scoped_restore_current_thread.
3191 (thread_apply_command): Use scoped_restore_current_thread.
3192 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
3193 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
3194
3195 2017-05-04 Pedro Alves <palves@redhat.com>
3196
3197 * thread.c (make_cleanup_restore_current_thread): Move
3198 find_thread_ptid call before the is_stopped call. Assert that the
3199 thread is found. Replace is_stopped call by checking the thread's
3200 state directly. Remove unnecessary NULL-thread check.
3201
3202 2017-05-04 Pedro Alves <palves@redhat.com>
3203
3204 * corelow.c (thread_section_name): New class.
3205 (get_core_register_section, get_core_siginfo): Use it.
3206
3207 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
3208
3209 * corelow.c (sniff_core_bfd): Remove extra semicolon.
3210 (get_core_register_section): Remove xfree of NULL pointer.
3211
3212 2017-05-03 Alan Hayward <alan.hayward@arm.com>
3213
3214 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
3215 * regcache.c (regcache::raw_supply_zeroed): New function.
3216 * regcache.h (regcache::raw_supply_zeroed): New declaration.
3217
3218 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
3219
3220 * gdbarch.sh: Remove commented out definition of
3221 TARGET_CHAR_BIT.
3222 * gdbarch.h: Re-generate.
3223
3224 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
3225
3226 * configure: Regenerate.
3227
3228 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
3229
3230 * solib-target.c (solib_target_relocate_section_addresses):
3231 Remove num_section_bases, num_bases, segment_bases variables.
3232
3233 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3234
3235 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
3236
3237 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3238
3239 * solib-target.c: Include <vector>
3240 (struct lm_info_target) <~lm_info_target>: Remove.
3241 <segment_bases, section_bases>: Change type to
3242 std::vector<CORE_ADDR>.
3243 (library_list_start_segment, library_list_start_section,
3244 library_list_end_library,
3245 solib_target_relocate_section_addresses): Adjust.
3246
3247 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3248
3249 * gdbarch.sh (software_single_step): Change return type to
3250 std::vector<CORE_ADDR>.
3251 * gdbarch.c, gdbarch.h: Re-generate.
3252 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
3253 Adjust.
3254 (arm_deal_with_atomic_sequence_raw): Adjust.
3255 (thumb_get_next_pcs_raw): Adjust.
3256 (arm_get_next_pcs_raw): Adjust.
3257 (arm_get_next_pcs): Adjust.
3258 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
3259 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
3260 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
3261 (alpha_software_single_step): Adjust.
3262 * alpha-tdep.h (alpha_software_single_step): Adjust.
3263 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
3264 * arm-tdep.c (arm_software_single_step): Adjust.
3265 (arm_breakpoint_kind_from_current_state): Adjust.
3266 * arm-tdep.h (arm_software_single_step): Adjust.
3267 * breakpoint.c (insert_single_step_breakpoint): Adjust.
3268 * cris-tdep.c (cris_software_single_step): Adjust.
3269 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
3270 (micromips_deal_with_atomic_sequence): Adjust.
3271 (deal_with_atomic_sequence): Adjust.
3272 (mips_software_single_step): Adjust.
3273 * mips-tdep.h (mips_software_single_step): Adjust.
3274 * moxie-tdep.c (moxie_software_single_step): Adjust.
3275 * nios2-tdep.c (nios2_software_single_step): Adjust.
3276 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
3277 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
3278 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
3279 * s390-linux-tdep.c (s390_software_single_step): Adjust.
3280 * sparc-tdep.c (sparc_software_single_step): Adjust.
3281 * spu-tdep.c (spu_software_single_step): Adjust.
3282 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
3283
3284 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
3285
3286 * gdbarch.sh: Use semi-colon as field separator instead of colon.
3287 * gdbarch.h: Re-generate.
3288
3289 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3290
3291 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
3292 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
3293 * python/py-instruction.c, python/py-instruction.h: New file.
3294 * python/py-record.c: Add py-instruction.h include.
3295 (gdbpy_initialize_record): Make gdb.Instruction a super class of
3296 gdb.RecordInstruction.
3297 * python/python-internal.h: Add gdbpy_initialize_instruction
3298 declaration.
3299 * python/python.c (do_start_initialization): Add
3300 gdbpy_initialize_instruction.
3301
3302 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3303
3304 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
3305 Remove.
3306 (btrace_func_from_recpy_func): New function.
3307 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
3308 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
3309 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
3310 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
3311 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
3312 Also, use new helper functions.
3313 (btpy_list_item): Use new helper functions.
3314 (recpy_bt_function_call_history): Use new type name.
3315 (btpy_call_getset): Remove.
3316 (gdbpy_initialize_btrace): Remove code to initialize
3317 gdb.BtraceFunctionCall.
3318 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
3319 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
3320 recpy_bt_func_prev, recpy_bt_func_next): New export.
3321 * python/py-record.c (recpy_func_type): New static object.
3322 (recpy_func_new, recpy_func_level, recpy_func_symbol,
3323 recpy_func_instructions, recpy_func_up, recpy_func_prev,
3324 recpy_func_next): New function.
3325 (recpy_element_hash, recpy_element_richcompare): Updated comment.
3326 (recpy_func_getset): New static object.
3327 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
3328 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
3329
3330 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3331
3332 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
3333 (btpy_object, btpy_insn_type, btpy_new): Remove.
3334 (btpy_list_object): Use gdb.RecordInstruction type instead of
3335 gdb.BtraceInstruction type.
3336 (btrace_insn_from_recpy_insn): New function.
3337 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
3338 btpy_new.
3339 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
3340 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
3341 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
3342 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
3343 instead of btpy_object.
3344 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
3345 btpy_insn_data, btpy_insn_decode): Rename to ...
3346 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
3347 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
3348 recpy_bt_insn_decode): This. Also, use new helper functions.
3349 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
3350 recpy_insn_type.
3351 (btpy_insn_getset): Remove.
3352 (gdbpy_initialize_btrace): Remove code to initialize
3353 gdb.BtraceInstruction. Use recpy_element_object.
3354 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
3355 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
3356 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
3357 * python/py-record.c (recpy_insn_type): New static object.
3358 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
3359 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
3360 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
3361 New function.
3362 (recpy_insn_getset): New static object.
3363 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
3364 * python/py-record.h (recpy_element_object): New typedef.
3365 (recpy_insn_type, recpy_insn_new): New export.
3366
3367 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3368
3369 * py-record-btrace.c (btpy_insn_new): Removed.
3370 (btpy_insn_or_gap_new): New function.
3371 (btpy_insn_error): Removed.
3372 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
3373 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
3374 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
3375 btpy_insn_or_gap_new instead of btpy_insn_new.
3376 (btpy_insn_getset): Remove btpy_insn_error.
3377 * py-record.c (recpy_gap_type): New static object.
3378 (recpy_gap_object): New typedef.
3379 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
3380 recpy_gap_reason_string): New function.
3381 (recpy_gap_getset): New static object.
3382 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
3383 * py-record.h (recpy_gap_new): New export.
3384
3385 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3386
3387 * python/py-record.c (recpy_ptid): Remove.
3388 (recpy_record_getset): Remove recpy_ptid.
3389
3390 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3391
3392 * btrace.c (btrace_fetch): Set inferior_ptid.
3393 * python/py-record-btrace.c: Add "py-record.h" include.
3394 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
3395 recpy_bt_end, recpy_bt_instruction_history,
3396 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
3397 in gdb.Record object instead of current ptid.
3398 * python/py-record.c: Include new "py-record.h" file.
3399 (recpy_record_object): Moved to py-record.h.
3400 * python/py-record.h: New file.
3401
3402 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
3403
3404 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
3405 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
3406 indentation.
3407
3408 2017-05-01 Joel Brobecker <brobecker@adacore.com>
3409
3410 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
3411 the past maintainers section.
3412
3413 2017-04-28 Yao Qi <yao.qi@linaro.org>
3414
3415 * infcmd.c (get_return_value): Use regcache ctor, and remove
3416 cleanup.
3417
3418 2017-04-28 Yao Qi <yao.qi@linaro.org>
3419 Pedro Alves <palves@redhat.com>
3420
3421 * regcache.c (regcache::regcache): New tag dispatch ctor.
3422 (do_cooked_read): Moved above.
3423 (regcache_dup): Use the tag dispatch ctor..
3424 * regcache.h (regcache): Declare ctor, delete copy ctor and
3425 assignment operator, remove friend regcache_dup.
3426
3427 2017-04-28 Yao Qi <yao.qi@linaro.org>
3428
3429 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
3430 call method save instead of regcache_cpy.
3431 * regcache.h (struct regcache): Make regcache_dup a friend.
3432
3433 2017-04-28 Yao Qi <yao.qi@linaro.org>
3434
3435 * regcache.c (struct regcache): Move to regcache.h
3436 (regcache::arch): New method.
3437 (regcache_get_ptid): Update.
3438 (get_regcache_arch): Call arch method.
3439 (get_regcache_aspace): Call method aspace.
3440 (register_buffer): Change it to method.
3441 (regcache_save): Change it to regcache::save.
3442 (regcache_restore): Likewise.
3443 (regcache_cpy_no_passthrough): Remove the declaration.
3444 (regcache_cpy): Call methods restore and cpy_no_passthrough.
3445 (regcache_cpy_no_passthrough): Change it to method
3446 cpy_no_passthrough.
3447 (regcache_register_status): Change it to method
3448 get_register_status.
3449 (regcache_invalidate): Change it to method invalidate.
3450 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
3451 (regcache_raw_update): Change it to method raw_update.
3452 (regcache_raw_read): Likewise.
3453 (regcache_raw_read_signed): Likewise.
3454 (regcache_raw_read_unsigned): Likewise.
3455 (regcache_raw_write_signed): Likewise.
3456 (regcache_raw_write_unsigned): Likewise.
3457 (regcache_cooked_read): Likewise.
3458 (regcache_cooked_read_value): Likewise.
3459 (regcache_cooked_read_signed): Likewise.
3460 (regcache_cooked_read_unsigned): Likewise.
3461 (regcache_cooked_write_signed): Likewise.
3462 (regcache_cooked_write_unsigned): Likewise.
3463 (regcache_raw_set_cached_value): Likewise.
3464 (regcache_raw_write): Likewise.
3465 (regcache_cooked_write): Likewise.
3466 (regcache_xfer_part): Likewise.
3467 (regcache_raw_read_part): Likewise.
3468 (regcache_raw_write_part): Likewise.
3469 (regcache_cooked_read_part): Likewise.
3470 (regcache_cooked_write_part): Likewise.
3471 (regcache_raw_supply): Likewise.
3472 (regcache_raw_collect): Likewise.
3473 (regcache_transfer_regset): Likewise.
3474 (regcache_supply_regset): Likewise.
3475 (regcache_collect_regset): Likewise.
3476 (regcache_debug_print_register): Likewise.
3477 (enum regcache_dump_what): Move it to regcache.h.
3478 (regcache_dump): Change it to method dump.
3479 * regcache.h (enum regcache_dump_what): New.
3480 (class regcache): New.
3481 * target.c (target_fetch_registers): Call method
3482 debug_print_register.
3483 (target_store_registers): Likewise.
3484
3485 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3486
3487 * windows-nat.c (struct lm_info_windows): Initialize field.
3488 (windows_make_so): Allocate lm_info_windows with new.
3489 (windows_free_so): Free lm_info_windows with delete.
3490
3491 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3492
3493 * solib-darwin.c (struct lm_info_darwin): Initialize field.
3494 (darwin_current_sos): Allocate lm_info_darwin with new, remove
3495 cleanup.
3496 (darwin_free_so): Free lm_info_darwin with delete.
3497
3498 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3499
3500 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
3501 <l_addr_p>: Change type to bool.
3502 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
3503 (svr4_free_so): Free lm_info_svr4 with delete.
3504 (svr4_copy_library_list): Replace memcpy with call to copy
3505 constructor.
3506 (library_list_start_library, svr4_default_sos): Allocate
3507 lm_info_svr4 with new.
3508
3509 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3510
3511 * solib-target.c (struct lm_info_target): Add destructor,
3512 initialize fields.
3513 <name>: Change type to std::string.
3514 (library_list_start_library): Allocate lm_info_target with new.
3515 (solib_target_free_library_list): Free lm_info_target with
3516 delete.
3517 (solib_target_current_sos): Adapt to std::string.
3518 (solib_target_free_so): Free lm_info_target with delete.
3519
3520 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3521
3522 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
3523 fields.
3524 (frv_current_sos): Allocate lm_info_frv with new.
3525 (frv_relocate_main_executable): Free lm_info_frv with delete,
3526 allocate with new.
3527 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
3528
3529 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3530
3531 * solib-frv.c (struct lm_info_frv): Fix indentation.
3532
3533 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3534
3535 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
3536 map field.
3537 (dsbt_current_sos): Allocate lm_info_dsbt with new.
3538 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
3539 and allocate with new.
3540 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
3541
3542 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3543
3544 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
3545 <filename, member_name>: Change type to std::string.
3546 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
3547 (library_list_start_library): Allocate lm_info_aix with new.
3548 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
3549 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
3550 with copy constructor.
3551
3552 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3553
3554 * solist.h (struct lm_info): Remove.
3555 (struct lm_info_base): New class.
3556 (struct so_list) <lm_info>: Change type to lm_info_base *.
3557 * nto-tdep.c (struct lm_info): Remove.
3558 (lm_addr): Adjust.
3559 * solib-aix.c (struct lm_info): Rename to ...
3560 (struct lm_info_aix): ... this. Extend lm_info_base.
3561 (lm_info_p): Rename to ...
3562 (lm_info_aix_p): ... this, and adjust.
3563 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
3564 solib_aix_parse_libraries, library_list_start_library,
3565 solib_aix_free_library_list, solib_aix_parse_libraries,
3566 solib_aix_get_library_list,
3567 solib_aix_relocate_section_addresses, solib_aix_free_so,
3568 solib_aix_get_section_offsets,
3569 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
3570 Adjust.
3571 (struct solib_aix_inferior_data) <library_list>: Adjust.
3572 * solib-darwin.c (struct lm_info): Rename to ...
3573 (struct lm_info_darwin): ... this. Extend lm_info_base.
3574 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
3575 * solib-dsbt.c (struct lm_info): Rename to ...
3576 (struct lm_info_dsbt): ... this. Extend lm_info_base.
3577 (struct dsbt_info) <main_executable_lm_info): Adjust.
3578 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
3579 dsbt_relocate_section_addresses): Adjust.
3580 * solib-frv.c (struct lm_info): Rename to ...
3581 (struct lm_info_frv): ... this. Extend lm_info_base.
3582 (main_executable_lm_info): Adjust.
3583 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
3584 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
3585 find_canonical_descriptor_in_load_object,
3586 frv_fdpic_find_canonical_descriptor): Adjust.
3587 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
3588 to lm_info_svr4.
3589 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
3590 svr4_clear_so, svr4_copy_library_list,
3591 library_list_start_library, svr4_default_sos, svr4_read_so_list,
3592 svr4_current_sos, svr4_fetch_objfile_link_map,
3593 solist_update_incremental): Adjust.
3594 * solib-svr4.h (struct lm_info_svr4): Move here from
3595 solib-svr4.c.
3596 * solib-target.c (struct lm_info): Rename to ...
3597 (struct lm_info_target): ... this. Extend lm_info_base.
3598 (lm_info_p): Rename to ...
3599 (lm_info_target_p): ... this.
3600 (solib_target_parse_libraries, library_list_start_segment,
3601 library_list_start_section, library_list_start_library,
3602 library_list_end_library, solib_target_free_library_list,
3603 solib_target_current_sos, solib_target_free_so,
3604 solib_target_relocate_section_addresses): Adjust.
3605 * windows-nat.c (struct lm_info): Rename to ...
3606 (struct lm_info_windows): ... this. Extend lm_info_base.
3607 (windows_make_so, handle_load_dll, handle_unload_dll,
3608 windows_xfer_shared_libraries): Adjust.
3609
3610 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
3611
3612 * solib-darwin.c (struct darwin_so_list): Remove.
3613 (darwin_current_sos): Allocate an so_list object instead of a
3614 darwin_so_list, separately allocate an lm_info object.
3615 (darwin_free_so): Free lm_info.
3616
3617 2017-04-28 John Baldwin <jhb@FreeBSD.org>
3618
3619 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
3620 with fprintf_filtered.
3621
3622 2017-04-28 Yao Qi <yao.qi@linaro.org>
3623
3624 * regcache.c (regcache::regcache): New function.
3625 (regcache::~regcache): New function.
3626 (regcache_xmalloc_1): Remove.
3627 (regcache_xmalloc): Call new regcache.
3628 (regcache_xfree): Call delete regcache.
3629 (get_thread_arch_aspace_regcache): Call new regcache.
3630
3631 2017-04-28 Yao Qi <yao.qi@linaro.org>
3632
3633 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
3634 lwp instead of ptid_get_lwp.
3635
3636 2017-04-28 Yao Qi <yao.qi@linaro.org>
3637
3638 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
3639 lwp_info instead of getting from inferior_ptid.
3640
3641 2017-04-27 Keith Seitz <keiths@redhat.com>
3642
3643 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
3644 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
3645 (CV_CONVERSION_BADNESS): Define.
3646 (rank_one_type): Remove overly restrictive rvalue reference
3647 rank checks.
3648 Add cv-qualifier checks and subranks for type equality.
3649 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
3650 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
3651 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
3652
3653 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
3654
3655 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
3656 count when creating the object.
3657
3658 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
3659 Ulrich Weigand <uweigand@de.ibm.com>
3660
3661 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
3662 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
3663 is used in AIX.
3664 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
3665 (process_xcoff_symbol): Likewise.
3666 (scan_xcoff_symtab): Likewise.
3667
3668 2017-04-26 Alan Hayward <alan.hayward@arm.com>
3669
3670 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
3671 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
3672 (ia64_access_reg): Use get_frame_register_unsigned.
3673 (ia64_access_rse_reg): Likewise.
3674 (ia64_libunwind_frame_prev_register): Likewise.
3675
3676 2017-04-26 Jiong Wang <jiong.wang@arm.com>
3677
3678 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
3679 * gdbarch.c: Regenerated.
3680 * gdbarch.h: Regenerated.
3681 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
3682 visibility external.
3683 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
3684 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
3685 (enum cfa_how_kind): Move to ...
3686 (struct dwarf2_frame_state_reg_info): Likewise.
3687 (struct dwarf2_frame_state): Likewise.
3688 * dwarf2-frame.h: ... here.
3689 (dwarf2_frame_state_alloc_regs): New declaration.
3690 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
3691 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
3692
3693 2017-04-26 Alan Hayward <alan.hayward@arm.com>
3694
3695 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
3696 regcache_raw_read_unsigned.
3697 (xtensa_pseudo_register_write): Likewise.
3698
3699 2017-04-26 Alan Hayward <alan.hayward@arm.com>
3700
3701 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
3702 (nds32_pseudo_register_write): Likewise.
3703
3704 2017-04-25 Yao Qi <yao.qi@linaro.org>
3705
3706 * regcache.c (struct regcache) <readonly_p>: Change its type
3707 to bool.
3708 (regcache_xmalloc_1): Update parameter type and callers update.
3709
3710 2017-04-25 Yao Qi <yao.qi@linaro.org>
3711
3712 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
3713 set_gdbarch_wchar_bit.
3714 * arm-tdep.c (arm_gdbarch_init): Likewise.
3715
3716 2017-04-25 Pedro Alves <palves@redhat.com>
3717
3718 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
3719 (BothAreRelocatable, memcopy, memmove): Don't define.
3720 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
3721 macros.
3722
3723 2017-04-25 Pedro Alves <palves@redhat.com>
3724
3725 * common/common-defs.h: Include "common/poison.h".
3726 * common/function-view.h: (Not, Or, Requires): Move to traits.h
3727 and adjust.
3728 * common/poison.h: New file.
3729 * common/traits.h: Include <type_traits>.
3730 (Not, Or, Requires): New, moved from common/function-view.h.
3731
3732 2017-04-25 Pedro Alves <palves@redhat.com>
3733
3734 * breakpoint.h (struct breakpoint): In-class initialize all
3735 fields. Make boolean fields "bool".
3736 * breakpoint.c (init_raw_breakpoint_without_location): Remove
3737 memset call and initializations no longer necessary.
3738
3739 2017-04-25 Pedro Alves <palves@redhat.com>
3740
3741 * btrace.c (pt_btrace_insn_flags): Change parameter type to
3742 reference.
3743 (pt_btrace_insn): New function.
3744 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
3745
3746 2017-04-25 Pedro Alves <palves@redhat.com>
3747
3748 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
3749 "base" field and inherit from "bp_location" instead. Add
3750 non-default ctor.
3751 (allocate_location_exception): Use new non-default ctor.
3752 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
3753 (init_bp_location): Convert to ...
3754 (bp_location::bp_location): ... this new ctor, and remove memset
3755 call.
3756 (base_breakpoint_allocate_location): Use the new non-default ctor.
3757 * breakpoint.h (bp_location): Now a class. Declare default and
3758 non-default ctors. In-class initialize all members.
3759 (init_bp_location): Remove declaration.
3760
3761 2017-04-25 Pedro Alves <palves@redhat.com>
3762
3763 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
3764 assignment operator.
3765
3766 2017-04-24 Yao Qi <yao.qi@linaro.org>
3767
3768 * doublest.c (convert_doublest_to_floatformat): Call
3769 floatformat_totalsize_bytes.
3770
3771 2017-04-22 Tom Tromey <tom@tromey.com>
3772
3773 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
3774 ui_out_emit_list.
3775 * stack.c (print_frame): Use ui_out_emit_list.
3776 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
3777 ui_out_emit_list.
3778 * mi/mi-main.c (print_one_inferior)
3779 (mi_cmd_data_list_register_names)
3780 (mi_cmd_data_list_register_values, mi_cmd_list_features)
3781 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
3782 ui_out_emit_list.
3783 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
3784 (mi_output_solib_attribs): Use ui_out_emit_list,
3785 ui_out_emit_tuple.
3786 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
3787 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
3788 (mi_cmd_stack_list_args, list_args_or_locals): Use
3789 ui_out_emit_list.
3790 * disasm.c (do_assembly_only): Use ui_out_emit_list.
3791 * breakpoint.c (print_solib_event, output_thread_groups): Use
3792 ui_out_emit_list.
3793
3794 2017-04-22 Tom Tromey <tom@tromey.com>
3795
3796 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
3797 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
3798 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
3799
3800 2017-04-22 Tom Tromey <tom@tromey.com>
3801
3802 * tracepoint.c (tvariables_info_1)
3803 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
3804
3805 2017-04-22 Tom Tromey <tom@tromey.com>
3806
3807 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
3808 annotate_arg_emitter.
3809 * breakpoint.c (print_mention_watchpoint)
3810 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
3811 * annotate.h (struct annotate_arg_emitter): New.
3812
3813 2017-04-22 Tom Tromey <tom@tromey.com>
3814
3815 * record-btrace.c (record_btrace_insn_history)
3816 (record_btrace_insn_history_range, record_btrace_call_history)
3817 (record_btrace_call_history_range): Use ui_out_emit_tuple.
3818 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
3819 ui_out_emit_tuple.
3820 * stack.c (print_frame_info): Use ui_out_emit_tuple.
3821 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
3822 * skip.c (skip_info): Use ui_out_emit_tuple.
3823 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
3824 * progspace.c (print_program_space): Use ui_out_emit_tuple.
3825 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
3826 * osdata.c (info_osdata): Use ui_out_emit_tuple.
3827 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
3828 ui_out_emit_tuple.
3829 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
3830 (output_register, mi_cmd_data_read_memory)
3831 (mi_cmd_data_read_memory_bytes, mi_load_progress)
3832 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
3833 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
3834 Use ui_out_emit_tuple.
3835 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
3836 ui_out_emit_tuple.
3837 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
3838 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
3839 * linux-thread-db.c (info_auto_load_libthread_db): Use
3840 ui_out_emit_tuple.
3841 * inferior.c (print_inferior): Use ui_out_emit_tuple.
3842 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
3843 * disasm.c (do_mixed_source_and_assembly_deprecated)
3844 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
3845 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
3846 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
3847 * breakpoint.c (print_one_breakpoint_location)
3848 (print_one_breakpoint): Use ui_out_emit_tuple.
3849 * auto-load.c (print_script, info_auto_load_cmd): Use
3850 ui_out_emit_tuple.
3851 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
3852
3853 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
3854
3855 * thread.c (print_thread_info_1): Remove dead code.
3856
3857 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3858
3859 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
3860 GDB_SELF_TEST.
3861 * arm-tdep.c (selftests::arm_record_test): Likewise.
3862
3863 2017-04-21 Yao Qi <yao.qi@linaro.org>
3864
3865 * regcache.c (regcache_restore): Remove argument 2. Replace
3866 argument 3 with regcache. Get register status from
3867 src->register_status and get register contents from
3868 register_buffer (src, regnum).
3869 (regcache_cpy): Update.
3870
3871 2017-04-19 Pedro Alves <palves@redhat.com>
3872
3873 * gdbthread.h (thread): Add missing closing parenthesis in
3874 comment.
3875
3876 2017-04-19 Pedro Alves <palves@redhat.com>
3877
3878 * common/refcounted-object.h: New file.
3879 * gdbthread.h: Include "common/refcounted-object.h".
3880 (thread_info): Inherit from refcounted_object and add comments.
3881 (thread_info::incref, thread_info::decref)
3882 (thread_info::m_refcount): Delete.
3883 (thread_info::deletable): Use the refcounted_object::refcount()
3884 method.
3885 * inferior.c (current_inferior_): Add comment.
3886 (set_current_inferior): Increment/decrement refcounts.
3887 (prune_inferiors, remove_inferior_command): Skip inferiors marked
3888 not-deletable instead of comparing with the current inferior.
3889 (initialize_inferiors): Increment the initial inferior's refcount.
3890 * inferior.h (struct inferior): Forward declare.
3891 Include "common/refcounted-object.h".
3892 (current_inferior, set_current_inferior): Move declaration to
3893 before struct inferior's definition, and fix comment.
3894 (inferior): Inherit from refcounted_object. Add comments.
3895 * thread.c (switch_to_thread_no_regs): Reference the thread's
3896 inferior pointer directly instead of doing a ptid lookup.
3897 (switch_to_no_thread): New function.
3898 (switch_to_thread(thread_info *)): New function, factored out
3899 from ...
3900 (switch_to_thread(ptid_t)): ... this.
3901 (restore_current_thread): Delete.
3902 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
3903 fields, and add 'inf' field.
3904 (do_restore_current_thread_cleanup): Check whether old->inf is
3905 alive instead of looking up an inferior by ptid. Use
3906 switch_to_thread and switch_to_no_thread.
3907 (restore_current_thread_cleanup_dtor): Use old->inf directly
3908 instead of lookup up an inferior by id. Decref the inferior.
3909 Don't restore 'removable'.
3910 (make_cleanup_restore_current_thread): Same the inferior pointer
3911 in old, instead of the inferior number. Incref the inferior.
3912 Don't save/clear 'removable'.
3913
3914 2017-04-19 Pedro Alves <palves@redhat.com>
3915
3916 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3917 unittests/scoped_restore-selftests.c.
3918 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
3919 * common/scoped_restore.h (scoped_restore_base): Make "class".
3920 (scoped_restore_base::release): New public method.
3921 (scoped_restore_base::scoped_restore_base): New protected ctor.
3922 (scoped_restore_base::m_saved_var): New protected field.
3923 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
3924 scoped_restore_base base class instead of m_saved_var directly.
3925 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
3926 (scoped_restore_tmpl::scoped_restore_tmpl(const
3927 scoped_restore_tmpl<T>&)): Likewise.
3928 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
3929 method.
3930 (scoped_restore_tmpl::saved_var): New method.
3931 (scoped_restore_tmpl::m_saved_var): Delete.
3932 * inferior.h (inferior::detaching): Now a bool.
3933 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
3934 cleanup.
3935 * unittests/scoped_restore-selftests.c: New file.
3936
3937 2017-04-19 Pedro Alves <palves@redhat.com>
3938
3939 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
3940 Re-sort in alphabetic order.
3941
3942 2017-04-18 Pedro Alves <palves@redhat.com>
3943
3944 * xml-support.c (obstack_xml_printf): Delete.
3945 * xml-support.h (obstack_xml_printf): Delete.
3946
3947 2017-04-18 Pedro Alves <palves@redhat.com>
3948
3949 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
3950 vdebug, verror, body_text, start_element, end_element, name,
3951 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
3952 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
3953 is_xinclude>: Make private and add m_ prefix.
3954 (gdb_xml_parser::body_text): New method, based on ...
3955 (gdb_xml_body_text): ... this. Adjust.
3956 (gdb_xml_parser::vdebug): New method, based on ...
3957 (gdb_xml_debug): ... this. Adjust.
3958 (gdb_xml_parser::verror): New method, based on ...
3959 (gdb_xml_error): ... this. Adjust.
3960 (gdb_xml_parser::start_element): New method, based on ...
3961 (gdb_xml_start_element): ... this. Adjust.
3962 (gdb_xml_start_element_wrapper): Defer to
3963 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
3964 (gdb_xml_parser::end_element): New method, based on ...
3965 (gdb_xml_end_element_wrapper): ... this. Adjust.
3966 (gdb_xml_parser::~gdb_xml_parser): Adjust.
3967 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
3968 (gdb_xml_parser::use_dtd): New method, based on ...
3969 (gdb_xml_use_dtd): ... this. Adjust.
3970 (gdb_xml_parser::parse): New method, based on ...
3971 (gdb_xml_parse): ... this. Adjust.
3972 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
3973 (xinclude_start_include): Adjust to call the parser's name method.
3974 (xml_xinclude_default, xml_xinclude_start_doctype)
3975 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
3976 method.
3977 (xml_process_xincludes): Adjust to call parser methods.
3978 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
3979 declarations.
3980
3981 2017-04-18 Pedro Alves <palves@redhat.com>
3982
3983 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
3984 gdb::optional<std::string>.
3985 * xml-support.c: Include <string>.
3986 (scope_level::scope_level(scope_level &&))
3987 (scope_level::~scope_level): Delete.
3988 (scope_level::body): Now a std::string.
3989 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
3990 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
3991 parameter.
3992 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
3993 (xinclude_parsing_data::output): Now a std::string reference.
3994 (xinclude_start_include): Adjust.
3995 (xml_xinclude_default): Adjust.
3996 (xml_process_xincludes): Add 'output' parameter, and return bool.
3997 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
3998 and return bool.
3999 * xml-tdesc.c: Include <unordered_map> and <string>.
4000 (tdesc_xml_cache): Delete.
4001 (tdesc_xml_cache_s): Delete.
4002 (xml_cache): Now an std::unordered_map.
4003 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
4004 (target_fetch_description_xml): Change return type to
4005 gdb::optional<std::string>, and adjust.
4006 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
4007 (target_fetch_description_xml): Change return type to
4008 gdb::optional<std::string>.
4009
4010 2017-04-18 Pedro Alves <palves@redhat.com>
4011
4012 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4013 unittests/optional-selftests.c.
4014 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
4015 * unittests/optional-selftests.c: New file.
4016 * unittests/optional/assignment/1.cc: New file.
4017 * unittests/optional/assignment/2.cc: New file.
4018 * unittests/optional/assignment/3.cc: New file.
4019 * unittests/optional/assignment/4.cc: New file.
4020 * unittests/optional/assignment/5.cc: New file.
4021 * unittests/optional/assignment/6.cc: New file.
4022 * unittests/optional/assignment/7.cc: New file.
4023 * unittests/optional/cons/copy.cc: New file.
4024 * unittests/optional/cons/default.cc: New file.
4025 * unittests/optional/cons/move.cc: New file.
4026 * unittests/optional/cons/value.cc: New file.
4027 * unittests/optional/in_place.cc: New file.
4028 * unittests/optional/observers/1.cc: New file.
4029 * unittests/optional/observers/2.cc: New file.
4030
4031 2017-04-18 Pedro Alves <palves@redhat.com>
4032
4033 * common/gdb_optional.h: Include common/traits.h.
4034 (in_place_t): New type.
4035 (in_place): New constexpr variable.
4036 (optional::optional): Remove member initialization of
4037 m_instantiated.
4038 (optional::optional(in_place_t...)): New constructor.
4039 (optional::~optional): Use reset.
4040 (optional::optional(const optional&)): New.
4041 (optional::optional(const optional&&)): New.
4042 (optional::optional(T &)): New.
4043 (optional::optional(T &&)): New.
4044 (operator::operator=(const optional &)): New.
4045 (operator::operator=(optional &&)): New.
4046 (operator::operator= (const T &))
4047 (operator::operator= (T &&))
4048 (operator::emplace (Args &&... args)): Return a T&. Use reset.
4049 (operator::reset): New.
4050 (operator::m_instantiated):: Add in-class initializer.
4051 * common/traits.h: Include <type_traits>.
4052 (struct And): New types.
4053
4054 2017-04-18 Pedro Alves <palves@redhat.com>
4055
4056 * xml-support.c: Include <vector>.
4057 (scope_level::scope_level(const gdb_xml_element *))
4058 (scope_level::scope_level(scope_level&&)): New.
4059 (scope_level::~scope_level): New.
4060 (scope_level_s): Delete.
4061 (gdb_xml_parser::scopes): Now a std::vector.
4062 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
4063 Use std::vector.
4064 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
4065 scope cleanup code.
4066 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
4067 of the scopes member. Use std::vector::emplace_back.
4068
4069 2017-04-18 Pedro Alves <palves@redhat.com>
4070
4071 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
4072 a bool.
4073 (gdb_xml_end_element): Change type of first parameter.
4074 (gdb_xml_cleanup): Rename to ...
4075 (gdb_xml_parser::~gdb_xml_parser): ... this.
4076 (gdb_xml_create_parser_and_cleanup): Delete with ...
4077 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
4078 to this new ctor.
4079 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
4080 using gdb_xml_create_parser_and_cleanup.
4081 (xinclude_parsing_data): Add ctor/dtor.
4082 (xml_xinclude_cleanup): Delete.
4083 (xml_process_xincludes): Create a local xinclude_parsing_data
4084 instead of heap-allocating one. Create a local gdb_xml_parser
4085 instead of heap-allocating one with
4086 gdb_xml_create_parser_and_cleanup.
4087
4088 2017-04-18 John Baldwin <jhb@FreeBSD.org>
4089
4090 PR threads/20743
4091 * fbsd-nat.c (resume_one_thread_cb): Remove.
4092 (resume_all_threads_cb): Remove.
4093 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
4094 iterate_over_threads.
4095
4096 2017-04-17 Joel Brobecker <brobecker@adacore.com>
4097
4098 * NEWS: Create a new section for the next release branch.
4099 Rename the section of the current branch, now that it has
4100 been cut.
4101
4102 2017-04-17 Joel Brobecker <brobecker@adacore.com>
4103
4104 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
4105 * version.in: Bump version to 8.0.50.DATE-git.
4106
4107 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
4108
4109 PR gdb/21385
4110 * windows-nat.c (windows_create_inferior): Declare 'allargs'
4111 independently of the host, and fix build breakage on Cygwin.
4112
4113 2017-04-13 Pedro Alves <palves@redhat.com>
4114
4115 * inferior.c (free_inferior): Convert to ...
4116 (inferior::~inferior): ... this dtor.
4117 (inferior::inferior): New ctor, factored out from ...
4118 (add_inferior_silent): ... here. Allocate the inferior with a new
4119 expression.
4120 (delete_inferior): Call delete instead of free_inferior.
4121 * inferior.h (gdb_environ, continuation): Forward declare.
4122 (inferior): Now a class. Add in-class initialization to all
4123 members. Make boolean fields bool, except 'detaching'.
4124 (inferior::inferior): New explicit ctor.
4125 (inferior::~inferior): New.
4126
4127 2017-04-13 Pedro Alves <palves@redhat.com>
4128
4129 * inferior.c (init_inferior_list): Delete.
4130 * inferior.h (init_inferior_list): Delete.
4131
4132 2017-04-13 Pedro Alves <palves@redhat.com>
4133
4134 PR threads/13217
4135 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
4136 (top level): Call it twice, with different thread sets.
4137
4138 2017-04-13 Pedro Alves <palves@redhat.com>
4139
4140 * thread.c: Include <algorithm>.
4141 (thread_array_cleanup): Delete.
4142 (scoped_inc_dec_ref): New class.
4143 (live_threads_count): New function.
4144 (set_thread_refcount): Delete.
4145 (tp_array_compar_ascending): Now a bool.
4146 (tp_array_compar): Convert to a std::sort comparison function.
4147 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
4148 and live_threads_count.
4149
4150 2017-04-13 Pedro Alves <palves@redhat.com>
4151
4152 * infrun.c (follow_fork_inferior): Also switch the current
4153 inferior.
4154
4155 2017-04-13 Pedro Alves <palves@redhat.com>
4156
4157 * breakpoint.c (watch_command_1): Save watchpoint-frame info
4158 before calling create_internal_breakpoint.
4159
4160 2017-04-13 Pedro Alves <palves@redhat.com>
4161
4162 * fork-child.c (execv_argv): New class.
4163 (breakup_args): Refactored as ...
4164 (execv_argv::init_for_no_shell): .. this method of execv_argv.
4165 Copy arguments to storage and replace separators with NULL
4166 terminators in place.
4167 (escape_bang_in_quoted_argument): Adjust to return bool.
4168 (execv_argv::execv_argv): New ctor.
4169 (execv_argv::init_for_shell): New method, factored out from
4170 fork_inferior. Don't strdup strings into the vector.
4171 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
4172 Remove free_vector_argv call.
4173
4174 2017-04-13 Yao Qi <yao.qi@linaro.org>
4175
4176 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
4177 tdep->rx_psw_type.
4178
4179 2017-04-13 Yao Qi <yao.qi@linaro.org>
4180
4181 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
4182 * rx-tdep.c (rx_gdbarch_init): Likewise.
4183
4184 2017-04-13 Pedro Alves <palves@redhat.com>
4185
4186 * breakpoint.h (struct breakpoint): Reindent.
4187
4188 2017-04-13 Pedro Alves <palves@redhat.com>
4189
4190 * breakpoint.c (bp_location): Rename to ...
4191 (bp_locations): ... this. All references updated.
4192 (bp_location_count): Rename to ...
4193 (bp_locations_count): ... this. All references updated.
4194 (bp_location_placed_address_before_address_max): Rename to ...
4195 (bp_locations_placed_address_before_address_max): ... this. All
4196 references updated.
4197 (bp_location_shadow_len_after_address_max): Rename to ...
4198 (bp_locations_shadow_len_after_address_max): ... this. All
4199 references updated.
4200 (bp_location_compare_addrs): Rename to ...
4201 (bp_locations_compare_addrs): ... this. All references updated.
4202 (bp_location_compare):Rename to ...
4203 (bp_locations_compare): ... this. All references updated.
4204 (bp_location_target_extensions_update): Rename to ...
4205 (bp_locations_target_extensions_update): ... this. All references
4206 updated.
4207
4208 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4209
4210 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
4211 * common/common.m4: Check headers 'termios.h', 'termio.h' and
4212 'sgtty.h'.
4213 * common/gdb_termios.h: New file, with parts of "terminal.h".
4214 * inflow.c: Include "gdb_termios.h".
4215 * ser-unix.c: Include "gdb_termios.h".
4216 * terminal.h: Move terminal-related defines to
4217 "common/gdb_termios.h".
4218
4219 2017-04-12 Tom Tromey <tom@tromey.com>
4220
4221 * probe.c (parse_probes): Update.
4222 * location.h (delete_event_location): Don't declare.
4223 (event_location_deleter::operator()): Update.
4224 * location.c (event_location_deleter::operator()): Rename from
4225 delete_event_location.
4226 * linespec.h (linespec_result) <location>: Change type to
4227 event_location_up.
4228 * linespec.c (canonicalize_linespec, event_location_to_sals)
4229 (decode_objc): Update.
4230 (linespec_result): Don't call delete_event_location.
4231 * breakpoint.c (create_breakpoints_sal)
4232 (bkpt_probe_create_sals_from_location)
4233 (strace_marker_create_sals_from_location): Update.
4234
4235 2017-04-12 Tom Tromey <tom@tromey.com>
4236
4237 * linespec.h (struct linespec_result): Add constructor and
4238 destructor.
4239 (init_linespec_result, destroy_linespec_result)
4240 (make_cleanup_destroy_linespec_result): Don't declare.
4241 * linespec.c (init_linespec_result): Remove.
4242 (linespec_result::~linespec_result): Rename from
4243 destroy_linespec_result. Update.
4244 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
4245 Remove.
4246 * breakpoint.c (create_breakpoint, break_range_command)
4247 (decode_location_default): Update.
4248 * ax-gdb.c (agent_command_1): Update.
4249
4250 2017-04-12 Tom Tromey <tom@tromey.com>
4251
4252 * remote.c (remote_download_tracepoint): Update.
4253 * python/py-breakpoint.c (bppy_get_location): Update.
4254 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
4255 (gdbscm_breakpoint_location): Update.
4256 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
4257 * breakpoint.h (struct breakpoint) <location, location_range_end>:
4258 Change type to event_location_up.
4259 * breakpoint.c (create_overlay_event_breakpoint)
4260 (create_longjmp_master_breakpoint)
4261 (create_std_terminate_master_breakpoint)
4262 (create_exception_master_breakpoint)
4263 (breakpoint_event_location_empty_p, print_breakpoint_location)
4264 (print_one_breakpoint_location, create_thread_event_breakpoint)
4265 (init_breakpoint_sal, create_breakpoint)
4266 (print_recreate_ranged_breakpoint, break_range_command)
4267 (init_ada_exception_breakpoint, say_where): Update.
4268 (base_breakpoint_dtor): Don't call delete_event_location.
4269 (bkpt_print_recreate, tracepoint_print_recreate)
4270 (dprintf_print_recreate, update_static_tracepoint)
4271 (breakpoint_re_set_default): Update.
4272
4273 2017-04-12 Tom Tromey <tom@tromey.com>
4274
4275 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
4276 type of "to_do". Update.
4277 (compute_stack_depth): Use std::vector.
4278
4279 2017-04-12 Tom Tromey <tom@tromey.com>
4280
4281 * printcmd.c (find_instruction_backward): Use std::vector.
4282
4283 2017-04-12 Tom Tromey <tom@tromey.com>
4284
4285 * symfile.c (objfilep): Remove typedef.
4286 (reread_symbols): Use a std::vector.
4287
4288 2017-04-12 Tom Tromey <tom@tromey.com>
4289
4290 * mi/mi-main.c (exec_direction_forward): Remove.
4291 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
4292 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
4293 scoped_restore.
4294 * guile/guile.c (guile_repl_command, guile_command)
4295 (gdbscm_execute_gdb_command): Use scoped_restore.
4296 * go-exp.y (go_parse): Use scoped_restore.
4297 * d-exp.y (d_parse): Use scoped_restore.
4298 * cli/cli-decode.c (cmd_func): Use scoped_restore.
4299 * c-exp.y (c_parse): Use scoped_restore.
4300
4301 2017-04-12 Tom Tromey <tom@tromey.com>
4302
4303 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
4304 (mi_parse): Update return type.
4305 (mi_parse_free): Remove.
4306 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
4307 (mi_parse::~mi_parse): Rename from mi_parse_free.
4308 (mi_parse_cleanup): Remove.
4309 (mi_parse): Return a unique_ptr. Use new.
4310 * mi/mi-main.c (mi_execute_command): Update.
4311
4312 2017-04-12 Tom Tromey <tom@tromey.com>
4313
4314 * location.c (explicit_location_lex_one): Return a
4315 unique_xmalloc_ptr.
4316 (string_to_explicit_location): Update. Remove cleanups.
4317
4318 2017-04-12 Tom Tromey <tom@tromey.com>
4319
4320 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
4321 (compare_value_and_voffset): Change type. Update.
4322 (compute_vtable_size): Change type of "offset_vec".
4323 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
4324 (gnuv3_get_typeid): Remove extraneous declaration.
4325
4326 2017-04-12 Tom Tromey <tom@tromey.com>
4327
4328 * charset.h (wchar_iterator): Fix comment.
4329
4330 2017-04-12 Tom Tromey <tom@tromey.com>
4331
4332 * charset.c (iconv_wrapper): New class.
4333 (cleanup_iconv): Remove.
4334 (convert_between_encodings): Use it.
4335
4336 2017-04-12 Tom Tromey <tom@tromey.com>
4337
4338 * symfile.h (increment_reading_symtab): Update type.
4339 * symfile.c (decrement_reading_symtab): Remove.
4340 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
4341 * psymtab.c (psymtab_to_symtab): Update.
4342 * dwarf2read.c (dw2_instantiate_symtab): Update.
4343
4344 2017-04-12 Tom Tromey <tom@tromey.com>
4345
4346 * jit.c (struct jit_reader): Declare separately. Add constructor
4347 and destructor. Change type of "handle".
4348 (loaded_jit_reader): Define separately.
4349 (jit_reader_load): Update. New "new".
4350 (jit_reader_unload_command): Use "delete".
4351 * gdb-dlfcn.h (struct dlclose_deleter): New.
4352 (gdb_dlhandle_up): New typedef.
4353 (gdb_dlopen, gdb_dlsym): Update types.
4354 (gdb_dlclose): Remove.
4355 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
4356 (gdb_dlsym): Change type of "handle".
4357 (make_cleanup_dlclose): Remove.
4358 (dlclose_deleter::operator()): Rename from gdb_dlclose.
4359 * compile/compile-c-support.c (load_libcc): Update.
4360
4361 2017-04-12 Tom Tromey <tom@tromey.com>
4362
4363 * symtab.h (find_pcs_for_symtab_line): Change return type.
4364 * symtab.c (find_pcs_for_symtab_line): Change return type.
4365 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
4366 type of "vec". Update.
4367 (ltpy_get_pcs_for_line): Update.
4368 * linespec.c (decode_digits_ordinary): Update.
4369
4370 2017-04-12 Tom Tromey <tom@tromey.com>
4371
4372 * tracepoint.c (actions_command): Update.
4373 * python/python.c (python_command, python_interactive_command):
4374 Update.
4375 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
4376 * guile/guile.c (guile_command): Update.
4377 * defs.h (read_command_lines, read_command_lines_1): Return
4378 command_line_up.
4379 (command_lines_deleter): New struct.
4380 (command_line_up): New typedef.
4381 * compile/compile.c (compile_code_command)
4382 (compile_print_command): Update.
4383 * cli/cli-script.h (get_command_line, copy_command_lines): Return
4384 command_line_up.
4385 (make_cleanup_free_command_lines): Remove.
4386 * cli/cli-script.c (get_command_line, read_command_lines_1)
4387 (copy_command_lines): Return command_line_up.
4388 (while_command, if_command, read_command_lines, define_command)
4389 (document_command): Update.
4390 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
4391 Remove.
4392 * breakpoint.h (breakpoint_set_commands): Change type of
4393 "commands".
4394 * breakpoint.c (breakpoint_set_commands): Change type of
4395 "commands". Update.
4396 (do_map_commands_command, update_dprintf_command_list)
4397 (create_tracepoint_from_upload): Update.
4398
4399 2017-04-12 Tom Tromey <tom@tromey.com>
4400
4401 * tracepoint.c (scope_info): Update.
4402 * spu-tdep.c (spu_catch_start): Update.
4403 * python/python.c (gdbpy_decode_line): Update.
4404 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
4405 * python/py-breakpoint.c (bppy_init): Update.
4406 * probe.c (parse_probes): Update.
4407 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
4408 * location.h (event_location_deleter): New struct.
4409 (event_location_up): New typedef.
4410 (new_linespec_location, new_address_location, new_probe_location)
4411 (new_explicit_location, copy_event_location)
4412 (string_to_event_location, string_to_event_location_basic)
4413 (string_to_explicit_location): Update return type.
4414 (make_cleanup_delete_event_location): Remove.
4415 * location.c (new_linespec_location, new_address_location)
4416 (new_probe_location, new_explicit_location, copy_event_location):
4417 Return event_location_up.
4418 (delete_event_location_cleanup)
4419 (make_cleanup_delete_event_location): Remove.
4420 (string_to_explicit_location, string_to_event_location_basic)
4421 (string_to_event_location): Return event_location_up.
4422 * linespec.c (canonicalize_linespec, event_location_to_sals)
4423 (decode_line_with_current_source)
4424 (decode_line_with_last_displayed, decode_objc): Update.
4425 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
4426 * completer.c (location_completer): Update.
4427 * cli/cli-cmds.c (edit_command, list_command): Update.
4428 * breakpoint.c (create_overlay_event_breakpoint)
4429 (create_longjmp_master_breakpoint)
4430 (create_std_terminate_master_breakpoint)
4431 (create_exception_master_breakpoint)
4432 (create_thread_event_breakpoint): Update.
4433 (init_breakpoint_sal): Update. Remove some dead code.
4434 (create_breakpoint_sal): Change type of "location". Update.
4435 (create_breakpoints_sal, create_breakpoint, break_command_1)
4436 (dprintf_command, break_range_command, until_break_command)
4437 (init_ada_exception_breakpoint)
4438 (strace_marker_create_sals_from_location)
4439 (update_static_tracepoint, trace_command, ftrace_command)
4440 (strace_command, create_tracepoint_from_upload): Update.
4441 * break-catch-throw.c (re_set_exception_catchpoint): Update.
4442 * ax-gdb.c (agent_command_1): Update.
4443
4444 2017-04-12 Pedro Alves <palves@redhat.com>
4445
4446 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
4447 * configure.tgt: Handle i[34567]86-*-go32* and
4448 i[34567]86-*-msdosdjgpp*.
4449 * i386-tdep.c (i386_svr4_reg_to_regnum):
4450 Make extern.
4451 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
4452 i386-go32-tdep.c.
4453 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
4454 * i386-go32-tdep.c: New file.
4455 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
4456 declarations.
4457
4458 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
4459
4460 * aix-thread.c (pd_status2str): Change return type to const char *.
4461
4462 2017-04-12 Pedro Alves <palves@redhat.com>
4463
4464 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
4465 calls to set_gdbarch_gnu_triplet_regexp.
4466
4467 2017-04-12 Pedro Alves <palves@redhat.com>
4468
4469 PR gdb/21323
4470 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
4471 New enum value.
4472 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
4473 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
4474 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
4475 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
4476 * gdbarch.h, gdbarch.c: Regenerate.
4477 * aarch64-tdep.c (aarch64_gdbarch_init): Override
4478 gdbarch_wchar_bit and gdbarch_wchar_signed.
4479 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
4480 * arm-tdep.c (arm_gdbarch_init): Likewise.
4481 * avr-tdep.c (avr_gdbarch_init): Likewise.
4482 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
4483 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
4484 * i386-tdep.c (i386_go32_init_abi): Likewise.
4485 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
4486 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
4487 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
4488 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
4489 * sh-tdep.c (sh_gdbarch_init): Likewise.
4490 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
4491 * sparc64-tdep.c (sparc64_init_abi): Likewise.
4492 * windows-tdep.c (windows_init_abi): Likewise.
4493 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
4494
4495 2017-04-12 Pedro Alves <palves@redhat.com>
4496
4497 PR c++/21323
4498 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
4499 cplus_primitive_type_char32_t>: New enum values.
4500 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
4501 and cplus_primitive_type_char32_t.
4502 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
4503 32, use the archtecture's built-in type for char16_t and char32_t,
4504 respectively. Otherwise, fallback to init_integer_type as before,
4505 but make the type unsigned, and issue a complaint.
4506 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
4507
4508 2017-04-12 Alan Hayward <alan.hayward@arm.com>
4509
4510 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
4511 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
4512
4513 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4514
4515 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
4516 'const char *'.
4517
4518 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
4519
4520 * common/common-utils.c (free_vector_argv): New function.
4521 * common/common-utils.h: Include <vector>.
4522 (free_vector_argv): New prototype.
4523 * darwin-nat.c (darwin_create_inferior): Rewrite function
4524 prototype in order to constify "exec_file" and accept a
4525 "std::string" for "allargs".
4526 * fork-child.c: Include <vector>.
4527 (breakup_args): Rewrite function, using C++.
4528 (fork_inferior): Rewrite function header, constify "exec_file_arg"
4529 and accept "std::string" for "allargs". Update the code to
4530 calculate "argv" based on "allargs". Update calls to "exec_fun"
4531 and "execvp".
4532 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
4533 order to constify "exec_file" and accept a "std::string" for
4534 "allargs".
4535 * go32-nat.c (go32_create_inferior): Likewise.
4536 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
4537 * infcmd.c (run_command_1): Constify "exec_file". Use
4538 "std::string" for inferior arguments.
4539 * inferior.h (fork_inferior): Update prototype.
4540 * linux-nat.c (linux_nat_create_inferior): Rewrite function
4541 prototype in order to constify "exec_file" and accept a
4542 "std::string" for "allargs".
4543 * nto-procfs.c (procfs_create_inferior): Likewise.
4544 * procfs.c (procfs_create_inferior): Likewise.
4545 * remote-sim.c (gdbsim_create_inferior): Likewise.
4546 * remote.c (extended_remote_run): Update code to accept
4547 "std::string" as argument.
4548 (extended_remote_create_inferior): Rewrite function prototype in
4549 order to constify "exec_file" and accept a "std::string" for
4550 "allargs".
4551 * rs6000-nat.c (super_create_inferior): Likewise.
4552 (rs6000_create_inferior): Likewise.
4553 * target.h (struct target_ops) <to_create_inferior>: Likewise.
4554 * windows-nat.c (windows_create_inferior): Likewise.
4555
4556 2017-04-11 Pedro Alves <palves@redhat.com>
4557
4558 * thread.c: Fix whitespace throughout.
4559
4560 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
4561
4562 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
4563
4564 2017-04-11 Alan Hayward <alan.hayward@arm.com>
4565
4566 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
4567
4568 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
4569
4570 PR gdb/21364
4571 * osdata.c (info_osdata): Check if 'type' is an empty string
4572 instead of NULL.
4573
4574 2017-04-10 Pedro Alves <palves@redhat.com>
4575
4576 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
4577 (ptid_to_global_thread_id, in_thread_list)
4578 (do_captured_list_thread_ids, set_resumed, set_running)
4579 (set_executing, set_stop_requested, finish_thread_state)
4580 (validate_registers_access, can_access_registers_ptid)
4581 (print_thread_info_1, switch_to_thread)
4582 (do_restore_current_thread_cleanup)
4583 (make_cleanup_restore_current_thread, thread_command)
4584 (thread_name_command): Use operator== instead of ptid_equal.
4585
4586 2017-04-10 Pedro Alves <palves@redhat.com>
4587
4588 * thread.c (struct current_thread_cleanup) <next>: Delete field.
4589 (current_thread_cleanup_chain): Delete.
4590 (restore_current_thread_cleanup_dtor)
4591 (make_cleanup_restore_current_thread): Remove references to
4592 current_thread_cleanup_chain.
4593
4594 2017-04-10 Alan Hayward <alan.hayward@arm.com>
4595
4596 * msp430-tdep.c (msp430_pseudo_register_read): Never return
4597 REG_UNKNOWN.
4598
4599 2017-04-10 Yao Qi <yao.qi@linaro.org>
4600
4601 PR gdb/19942
4602 * gdbthread.h (thread_info::deletable): New method.
4603 (thread_info::incref): New method.
4604 (thread_info::decref): New method.
4605 (thread_info::refcount): Move it to private.
4606 * infrun.c (save_stop_context): Call inc_refcount.
4607 (release_stop_context_cleanup): Likewise.
4608 * thread.c (set_thread_exited): New function.
4609 (init_thread_list): Delete "tp" only it is deletable, otherwise
4610 call set_thread_exited.
4611 (delete_thread_1): Call set_thread_exited.
4612 (current_thread_cleanup) <inferior_pid>: Remove.
4613 <thread>: New field.
4614 (restore_current_thread_ptid_changed): Removed.
4615 (do_restore_current_thread_cleanup): Adjust.
4616 (restore_current_thread_cleanup_dtor): Don't call
4617 find_thread_ptid.
4618 (set_thread_refcount): Use dec_refcount.
4619 (make_cleanup_restore_current_thread): Adjust.
4620 (thread_apply_all_command): Call inc_refcount.
4621 (_initialize_thread): Don't call
4622 observer_attach_thread_ptid_changed.
4623
4624 2017-04-10 Yao Qi <yao.qi@linaro.org>
4625
4626 * thread.c (delete_thread_1): Hoist code on marking thread as
4627 exited.
4628
4629 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
4630
4631 * windows-nat.c (windows_detach): Initialize ptid with
4632 minus_one_ptid.
4633
4634 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
4635
4636 * unittests/ptid-selftests.c: Fix erroneous assert messages.
4637
4638 2017-04-07 Alan Hayward <alan.hayward@arm.com>
4639
4640 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
4641 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
4642 (bfin_pseudo_register_write): Likewise
4643
4644 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
4645
4646 * common/ptid.h (struct ptid): Change to...
4647 (class ptid_t): ... this.
4648 <ptid_t>: New constructors.
4649 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
4650 matches>: New methods.
4651 <make_null, make_minus_one>: New static methods.
4652 <pid>: Rename to...
4653 <m_pid>: ...this.
4654 <lwp>: Rename to...
4655 <m_lwp>: ...this.
4656 <tid>: Rename to...
4657 <m_tid>: ...this.
4658 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
4659 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
4660 as references, move comment to class ptid_t.
4661 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
4662 ptid_t static methods.
4663 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
4664 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
4665 Take ptid arguments as references, implement using ptid_t methods.
4666 * unittests/ptid-selftests.c: New file.
4667 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
4668 unittests/ptid-selftests.c.
4669 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
4670
4671 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
4672
4673 * python/python.c (python_run_simple_file): Cast mode literal to
4674 non-const char pointer as expected by PyFile_FromString.
4675
4676 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
4677
4678 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
4679 minus_one_ptid and null_ptid.
4680
4681 2017-04-05 Pedro Alves <palves@redhat.com>
4682
4683 * warning.m4 (build_warnings): Remove -Wno-write-strings.
4684 * configure: Regenerate.
4685
4686 2017-04-05 Pedro Alves <palves@redhat.com>
4687
4688 * ada-exp.y (yyerror): Constify.
4689 * ada-lang.c (bound_name, get_selections)
4690 (ada_variant_discrim_type)
4691 (ada_variant_discrim_name, ada_value_struct_elt)
4692 (ada_lookup_struct_elt_type, is_unchecked_variant)
4693 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
4694 (catch_ada_exception_command_split)
4695 (catch_ada_assert_command_split, catch_assert_command)
4696 (ada_op_name): Constify.
4697 * ada-lang.h (ada_yyerror, get_selections)
4698 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
4699 * arc-tdep.c (arc_print_frame_cache): Constify.
4700 * arm-tdep.c (arm_skip_stub): Constify.
4701 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
4702 (gen_aggregate_elt_ref): Constify.
4703 * bcache.c (print_bcache_statistics): Constify.
4704 * bcache.h (print_bcache_statistics): Constify.
4705 * break-catch-throw.c (catch_exception_command_1):
4706 * breakpoint.c (struct ep_type_description::description):
4707 Constify.
4708 (add_solib_catchpoint): Constify.
4709 (catch_fork_command_1): Add cast.
4710 (add_catch_command): Constify.
4711 * breakpoint.h (add_catch_command, add_solib_catchpoint):
4712 Constify.
4713 * bsd-uthread.c (bsd_uthread_state): Constify.
4714 * buildsym.c (patch_subfile_names): Constify.
4715 * buildsym.h (next_symbol_text_func, patch_subfile_names):
4716 Constify.
4717 * c-exp.y (yyerror): Constify.
4718 (token::oper): Constify.
4719 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
4720 * c-varobj.c (cplus_describe_child): Constify.
4721 * charset.c (find_charset_names): Add cast.
4722 (find_charset_names): Constify array and add const_cast.
4723 * cli/cli-cmds.c (complete_command, cd_command): Constify.
4724 (edit_command): Constify.
4725 * cli/cli-decode.c (lookup_cmd): Constify.
4726 * cli/cli-dump.c (dump_memory_command, dump_value_command):
4727 Constify.
4728 (struct dump_context): Constify.
4729 (add_dump_command, restore_command): Constify.
4730 * cli/cli-script.c (get_command_line): Constify.
4731 * cli/cli-script.h (get_command_line): Constify.
4732 * cli/cli-utils.c (check_for_argument): Constify.
4733 * cli/cli-utils.h (check_for_argument): Constify.
4734 * coff-pe-read.c (struct read_pe_section_data): Constify.
4735 * command.h (lookup_cmd): Constify.
4736 * common/print-utils.c (decimal2str): Constify.
4737 * completer.c (gdb_print_filename): Constify.
4738 * corefile.c (set_gnutarget): Constify.
4739 * cp-name-parser.y (yyerror): Constify.
4740 * cp-valprint.c (cp_print_class_member): Constify.
4741 * cris-tdep.c (cris_register_name, crisv32_register_name):
4742 Constify.
4743 * d-exp.y (yyerror): Constify.
4744 (struct token::oper): Constify.
4745 * d-lang.h (d_yyerror): Constify.
4746 * dbxread.c (struct header_file_location::name): Constify.
4747 (add_old_header_file, add_new_header_file, last_function_name)
4748 (dbx_next_symbol_text, add_bincl_to_list)
4749 (find_corresponding_bincl_psymtab, set_namestring)
4750 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
4751 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
4752 * defs.h (command_line_input, print_address_symbolic)
4753 (deprecated_readline_begin_hook): Constify.
4754 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
4755 Constify.
4756 * event-top.c (handle_line_of_input): Constify and add cast.
4757 * exceptions.c (catch_errors): Constify.
4758 * exceptions.h (catch_errors): Constify.
4759 * expprint.c (print_subexp_standard, op_string, op_name)
4760 (op_name_standard, dump_raw_expression, dump_raw_expression):
4761 * expression.h (op_name, op_string, dump_raw_expression):
4762 Constify.
4763 * f-exp.y (yyerror): Constify.
4764 (struct token::oper): Constify.
4765 (struct f77_boolean_val::name): Constify.
4766 * f-lang.c (f_word_break_characters): Constify.
4767 * f-lang.h (f_yyerror): Constify.
4768 * fork-child.c (fork_inferior): Add cast.
4769 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
4770 (new_variant): Constify.
4771 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
4772 * gdbarch.c: Regenerate.
4773 * gdbcore.h (set_gnutarget): Constify.
4774 * go-exp.y (yyerror): Constify.
4775 (token::oper): Constify.
4776 * go-lang.h (go_yyerror): Constify.
4777 * go32-nat.c (go32_sysinfo): Constify.
4778 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
4779 * guile/scm-cmd.c (cmdscm_function): Constify.
4780 * guile/scm-param.c (pascm_param_value): Constify.
4781 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
4782 (h8300sx_register_name): Constify.
4783 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
4784 Constify.
4785 * ia64-tdep.c (ia64_register_names): Constify.
4786 * infcmd.c (construct_inferior_arguments): Constify.
4787 (path_command, attach_post_wait): Constify.
4788 * language.c (show_range_command, show_case_command)
4789 (unk_lang_error): Constify.
4790 * language.h (language_defn::la_error)
4791 (language_defn::la_name_of_this): Constify.
4792 * linespec.c (decode_line_2): Constify.
4793 * linux-thread-db.c (thread_db_err_str): Constify.
4794 * lm32-tdep.c (lm32_register_name): Constify.
4795 * m2-exp.y (yyerror): Constify.
4796 * m2-lang.h (m2_yyerror): Constify.
4797 * m32r-tdep.c (m32r_register_names): Constify and make static.
4798 * m68hc11-tdep.c (m68hc11_register_names): Constify.
4799 * m88k-tdep.c (m88k_register_name): Constify.
4800 * macroexp.c (appendmem): Constify.
4801 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
4802 (upgrade_type, parse_external, parse_partial_symbols)
4803 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
4804 (new_symbol): Constify.
4805 * memattr.c (mem_info_command): Constify.
4806 * mep-tdep.c (register_name_from_keyword): Constify.
4807 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
4808 Constify.
4809 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
4810 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
4811 * mi/mi-main.c (captured_mi_execute_command): Constify and add
4812 cast.
4813 (mi_execute_async_cli_command): Constify.
4814 * mips-tdep.c (mips_register_name): Constify.
4815 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
4816 (am33_register_name, am33_2_register_name)
4817 * moxie-tdep.c (moxie_register_names): Constify.
4818 * nat/linux-osdata.c (osdata_type): Constify fields.
4819 * nto-tdep.c (nto_parse_redirection): Constify.
4820 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
4821 (lookup_child_selector): Constify.
4822 (objc_methcall::name): Constify.
4823 * objc-lang.h (lookup_objc_class, lookup_child_selector)
4824 (lookup_struct_typedef): Constify.
4825 * objfiles.c (pc_in_section): Constify.
4826 * objfiles.h (pc_in_section): Constify.
4827 * p-exp.y (struct token::oper): Constify.
4828 (yyerror): Constify.
4829 * p-lang.h (pascal_yyerror): Constify.
4830 * parser-defs.h (op_name_standard): Constify.
4831 (op_print::string): Constify.
4832 (exp_descriptor::op_name): Constify.
4833 * printcmd.c (print_address_symbolic): Constify.
4834 * psymtab.c (print_partial_symbols): Constify.
4835 * python/py-breakpoint.c (stop_func): Constify.
4836 (bppy_get_expression): Constify.
4837 * python/py-cmd.c (cmdpy_completer::name): Constify.
4838 (cmdpy_function): Constify.
4839 * python/py-event.c (evpy_add_attribute)
4840 (gdbpy_initialize_event_generic): Constify.
4841 * python/py-event.h (evpy_add_attribute)
4842 (gdbpy_initialize_event_generic): Constify.
4843 * python/py-evts.c (add_new_registry): Constify.
4844 * python/py-finishbreakpoint.c (outofscope_func): Constify.
4845 * python/py-framefilter.c (get_py_iter_from_func): Constify.
4846 * python/py-inferior.c (get_buffer): Add cast.
4847 * python/py-param.c (parm_constant::name): Constify.
4848 * python/py-unwind.c (fprint_frame_id): Constify.
4849 * python/python.c (gdbpy_parameter_value): Constify.
4850 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
4851 * remote.c (memory_packet_config::name): Constify.
4852 (show_packet_config_cmd, remote_write_bytes)
4853 (remote_buffer_add_string):
4854 * reverse.c (exec_reverse_once): Constify.
4855 * rs6000-tdep.c (variant::name, variant::description): Constify.
4856 * rust-exp.y (rustyyerror): Constify.
4857 * rust-lang.c (rust_op_name): Constify.
4858 * rust-lang.h (rustyyerror): Constify.
4859 * serial.h (serial_ops::name): Constify.
4860 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
4861 (sh_sh3e_register_name, sh_sh2e_register_name)
4862 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
4863 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
4864 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
4865 (sh_sh4al_dsp_register_name): Constify.
4866 * sh64-tdep.c (sh64_register_name): Constify.
4867 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
4868 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
4869 * stabsread.c (patch_block_stabs, read_type_number)
4870 (ref_map::stabs, ref_add, process_reference)
4871 (symbol_reference_defined, define_symbol, define_symbol)
4872 (error_type, read_type, read_member_functions, read_cpp_abbrev)
4873 (read_one_struct_field, read_struct_fields, read_baseclasses)
4874 (read_tilde_fields, read_struct_type, read_array_type)
4875 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
4876 (read_huge_number, read_range_type, read_args, common_block_start)
4877 (find_name_end): Constify.
4878 * stabsread.h (common_block_start, define_symbol)
4879 (process_one_symbol, symbol_reference_defined, ref_add):
4880 * symfile.c (get_section_index, add_symbol_file_command):
4881 * symfile.h (get_section_index): Constify.
4882 * target-descriptions.c (tdesc_type::name): Constify.
4883 (tdesc_free_type): Add cast.
4884 * target.c (find_default_run_target):
4885 (add_deprecated_target_alias, find_default_run_target)
4886 (target_announce_detach): Constify.
4887 (do_option): Constify.
4888 * target.h (add_deprecated_target_alias): Constify.
4889 * thread.c (print_thread_info_1): Constify.
4890 * top.c (deprecated_readline_begin_hook, command_line_input):
4891 Constify.
4892 (init_main): Add casts.
4893 * top.h (handle_line_of_input): Constify.
4894 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
4895 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
4896 (tfind_command): Rename to ...
4897 (tfind_command_1): ... this and constify.
4898 (tfind_command): New function.
4899 (tfind_end_command, tfind_start_command): Adjust.
4900 (encode_source_string): Constify.
4901 * tracepoint.h (encode_source_string): Constify.
4902 * tui/tui-data.c (tui_partial_win_by_name): Constify.
4903 * tui/tui-data.h (tui_partial_win_by_name): Constify.
4904 * tui/tui-source.c (tui_set_source_content_nil): Constify.
4905 * tui/tui-source.h (tui_set_source_content_nil): Constify.
4906 * tui/tui-win.c (parse_scrolling_args): Constify.
4907 * tui/tui-windata.c (tui_erase_data_content): Constify.
4908 * tui/tui-windata.h (tui_erase_data_content): Constify.
4909 * tui/tui-winsource.c (tui_erase_source_content): Constify.
4910 * tui/tui.c (tui_enable): Add cast.
4911 * utils.c (defaulted_query): Constify.
4912 (init_page_info): Add cast.
4913 (puts_debug, subset_compare): Constify.
4914 * utils.h (subset_compare): Constify.
4915 * varobj.c (varobj_format_string): Constify.
4916 * varobj.h (varobj_format_string): Constify.
4917 * vax-tdep.c (vax_register_name): Constify.
4918 * windows-nat.c (windows_detach): Constify.
4919 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
4920 * xml-support.c (gdb_xml_end_element): Constify.
4921 * xml-tdesc.c (tdesc_start_reg): Constify.
4922 * xstormy16-tdep.c (xstormy16_register_name): Constify.
4923 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
4924 * xtensa-tdep.h (xtensa_register_t::name): Constify.
4925
4926 2017-04-05 Pedro Alves <palves@redhat.com>
4927
4928 * proc-api.c (struct trans): Constify.
4929 (procfs_note): Constify.
4930 * proc-events.c (struct trans, syscall_table):
4931 * proc-flags.c (struct trans): Constify.
4932 * proc-utils.h (procfs_note): Constify.
4933 * proc-why.c (struct trans): Constify.
4934 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
4935 (procfs_detach): Constify.
4936 * sol-thread.c (struct string_map): Constify.
4937 (td_err_string, td_state_string): Constify.
4938
4939 2017-04-05 Pedro Alves <palves@redhat.com>
4940
4941 * proc-api.c (procfs_filename): Don't initialize
4942 procfs_filename.
4943 (prepare_to_trace): Assume procfs_filename is non-NULL.
4944 (_initialize_proc_api): Give procfs_filename a default value here.
4945
4946 2017-04-05 Pedro Alves <palves@redhat.com>
4947
4948 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
4949 'cond_string' parameter.
4950 (extract_exception_regexp): Constify 'string' parameter.
4951 (catch_exception_command_1): Constify.
4952 * breakpoint.c (init_catchpoint)
4953 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
4954 parameter.
4955 (ep_parse_optional_if_clause, catch_fork_command_1)
4956 (catch_exec_command_1): Constify.
4957 * breakpoint.h (init_catchpoint): Constify 'cond_string'
4958 parameter.
4959 (ep_parse_optional_if_clause): Constify.
4960 * cli/cli-utils.c (remove_trailing_whitespace)
4961 (check_for_argument): Constify.
4962 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
4963 non-const overload.
4964 (check_for_argument): Likewise.
4965
4966 2017-04-05 Pedro Alves <palves@redhat.com>
4967
4968 * event-top.c (command_line_handler): Add cast to execute_command
4969 call.
4970 * record-btrace.c (cmd_record_btrace_bts_start)
4971 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
4972 (cmd_record_btrace_start): Add cast to execute_command call.
4973 * record-full.c (record_full_goto_insn):
4974 * record.c (record_start, record_stop): Add cast to
4975 execute_command_to_string calls.
4976 (cmd_record_start): Add cast to execute_command calls.
4977
4978 2017-04-05 Pedro Alves <palves@redhat.com>
4979
4980 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
4981 static inline function.
4982 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
4983 array and use gdb_PyArg_ParseTupleAndKeywords.
4984 * python/py-cmd.c (cmdpy_init): Likewise.
4985 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
4986 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
4987 (infpy_search_memory): Likewise.
4988 * python/py-objfile.c (objfpy_add_separate_debug_file)
4989 (gdbpy_lookup_objfile): Likewise.
4990 * python/py-symbol.c (gdbpy_lookup_symbol)
4991 (gdbpy_lookup_global_symbol): Likewise.
4992 * python/py-type.c (gdbpy_lookup_type): Likewise.
4993 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
4994 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
4995 Likewise.
4996
4997 2017-04-05 Pedro Alves <palves@redhat.com>
4998
4999 * python/python-internal.h (gdb_PyGetSetDef): New type.
5000 * python/py-block.c (block_object_getset)
5001 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
5002 * python/py-event.c (event_object_getset)
5003 (finish_breakpoint_object_getset): Likewise.
5004 * python/py-inferior.c (inferior_object_getset): Likewise.
5005 * python/py-infthread.c (thread_object_getset): Likewise.
5006 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
5007 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
5008 * python/py-objfile.c (objfile_getset): Likewise.
5009 * python/py-progspace.c (pspace_getset): Likewise.
5010 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
5011 Likewise.
5012 * python/py-record.c (recpy_record_getset): Likewise.
5013 * python/py-symbol.c (symbol_object_getset): Likewise.
5014 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
5015 Likewise.
5016 * python/py-type.c (type_object_getset, field_object_getset):
5017 Likewise.
5018 * python/py-value.c (value_object_getset): Likewise.
5019
5020 2017-04-05 Pedro Alves <palves@redhat.com>
5021
5022 * python/python-internal.h (gdb_PyObject_CallMethod)
5023 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
5024 New functions.
5025 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
5026 (PySys_GetObject, PySys_SetPath): New macros.
5027
5028 2017-04-05 Pedro Alves <palves@redhat.com>
5029
5030 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
5031 info_osdata_command.
5032 * osdata.c (info_osdata_command): Rename to ...
5033 (info_osdata): ... this. Constify 'type' parameter, and remove
5034 the 'from_tty' parameter. Accept NULL TYPE.
5035 (info_osdata_command): New function.
5036 * osdata.h (info_osdata_command): Remove declaration.
5037 (info_osdata): New declaration.
5038
5039 2017-04-05 Pedro Alves <palves@redhat.com>
5040
5041 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
5042 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
5043 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
5044 parameter.
5045 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
5046 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
5047 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
5048 parameter.
5049 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
5050 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
5051 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
5052 (mi_cmd_file_list_exec_source_files)
5053 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
5054 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
5055 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
5056 parameter.
5057 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
5058 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
5059 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
5060 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
5061 (mi_cmd_stack_info_frame): Constify 'command' parameter.
5062 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
5063 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
5064 'command' parameter.
5065 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
5066 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
5067 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
5068 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
5069 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
5070 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
5071 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
5072 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
5073 (mi_cmd_var_set_update_range): Constify 'command' parameter.
5074 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
5075 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
5076 parameter.
5077 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
5078 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
5079 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
5080 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
5081 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
5082 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
5083 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
5084 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
5085 (mi_cmd_data_list_changed_registers)
5086 (mi_cmd_data_write_register_values)
5087 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
5088 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
5089 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
5090 (mi_cmd_list_features, mi_cmd_list_target_features)
5091 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
5092 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
5093 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
5094 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
5095 (mi_cmd_trace_frame_collected): Constify 'command'
5096 parameter.
5097 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
5098 'command' parameter.
5099
5100 2017-04-05 Pedro Alves <palves@redhat.com>
5101
5102 * ada-lang.c (ada_completer_word_break_characters): Now a const
5103 array.
5104 (ada_get_gdb_completer_word_break_characters): Constify.
5105 * completer.c (gdb_completer_command_word_break_characters)
5106 (gdb_completer_file_name_break_characters)
5107 (gdb_completer_quote_characters): Now const arrays.
5108 (get_gdb_completer_quote_characters): Constify.
5109 (set_rl_completer_word_break_characters): New function.
5110 (set_gdb_completion_word_break_characters)
5111 (complete_line_internal): Use it.
5112 * completer.h (get_gdb_completer_quote_characters): Constify.
5113 (set_rl_completer_word_break_characters): Declare.
5114 * f-lang.c (f_word_break_characters): Constify.
5115 * language.c (default_word_break_characters): Constify.
5116 * language.h (language_defn::la_word_break_characters): Constify.
5117 (default_word_break_characters): Constify.
5118 * top.c (init_main): Use set_rl_completer_word_break_characters.
5119
5120 2017-04-05 Pedro Alves <palves@redhat.com>
5121
5122 * aix-thread.c (aix_thread_pid_to_str)
5123 (aix_thread_extra_thread_info): Constify.
5124 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
5125 * bsd-uthread.c (bsd_uthread_extra_thread_info)
5126 (bsd_uthread_pid_to_str): Constify.
5127 * corelow.c (core_pid_to_str): Constify.
5128 * darwin-nat.c (darwin_pid_to_str): Constify.
5129 * fbsd-nat.c (fbsd_pid_to_str): Constify.
5130 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
5131 Constify.
5132 * gnu-nat.c (gnu_pid_to_str): Constify.
5133 * go32-nat.c (go32_pid_to_str): Constify.
5134 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
5135 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
5136 * inferior.c (inferior_pid_to_str): Constify.
5137 * linux-nat.c (linux_nat_pid_to_str): Constify.
5138 * linux-tdep.c (linux_core_pid_to_str): Constify.
5139 * linux-thread-db.c (thread_db_pid_to_str)
5140 (thread_db_extra_thread_info): Constify.
5141 * nto-tdep.c (nto_extra_thread_info): Constify.
5142 * nto-tdep.h (nto_extra_thread_info): Constify.
5143 * obsd-nat.c (obsd_pid_to_str): Constify.
5144 * procfs.c (procfs_pid_to_str): Constify.
5145 * ravenscar-thread.c (ravenscar_extra_thread_info)
5146 (ravenscar_pid_to_str): Constify.
5147 * remote-sim.c (gdbsim_pid_to_str): Constify.
5148 * remote.c (remote_threads_extra_info, remote_pid_to_str):
5149 Constify.
5150 * sol-thread.c (solaris_pid_to_str): Constify.
5151 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
5152 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
5153 * target.c (default_pid_to_str, target_pid_to_str)
5154 (normal_pid_to_str, default_pid_to_str): Constify.
5155 * target.h (target_ops::to_pid_to_str)
5156 (target_ops::to_extra_thread_info): Constify.
5157 (target_pid_to_str, normal_pid_to_str): Constify.
5158 * windows-nat.c (windows_pid_to_str): Constify.
5159 * gdbarch.sh (core_pid_to_str): Constify.
5160 * target-delegates.c: Regenerate.
5161 * gdbarch.h, gdbarch.c: Regenerate.
5162
5163 2017-04-05 Pedro Alves <palves@redhat.com>
5164
5165 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
5166 the memory of the temporary warning_pre_print override.
5167 * utils.c (warning_pre_print): Constify.
5168 * utils.h (warning_pre_print): Constify.
5169
5170 2017-04-05 Pedro Alves <palves@redhat.com>
5171
5172 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
5173 (shell_command): New function.
5174 (make_command): Use std::string.
5175 (init_cli_cmds): Register shell_command instead of shell_escape.
5176
5177 2017-04-05 Pedro Alves <palves@redhat.com>
5178
5179 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
5180 * tracepoint.c (default_collect): Don't initialize.
5181
5182 2017-04-05 Pedro Alves <palves@redhat.com>
5183
5184 * macroexp.c (macro_buffer::shared): Now a bool.
5185 (init_buffer): Update.
5186 (init_shared_buffer): Constify 'addr' parameter.
5187 (substitute_args, expand, macro_expand, macro_expand_next): Remove
5188 casts.
5189
5190 2017-04-05 Pedro Alves <palves@redhat.com>
5191
5192 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
5193 * disasm.c (set_disassembler_options): Constify local.
5194 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
5195
5196 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
5197
5198 PR gdb/21352
5199 * tracefile.c (tsave_command): Fix argument parsing for '-r'
5200 option.
5201
5202 2017-04-05 Yao Qi <yao.qi@linaro.org>
5203
5204 * frame.c (frame_unwind_register_unsigned): Call
5205 frame_unwind_register_value.
5206
5207 2017-04-05 Yao Qi <yao.qi@linaro.org>
5208
5209 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
5210 Use gdb_test_multiple, and don't match anchor.
5211
5212 2017-04-05 Pedro Alves <palves@redhat.com>
5213
5214 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
5215 (Write After Approval): Remove Simon Marchi.
5216
5217 2017-04-05 Pedro Alves <palves@redhat.com>
5218
5219 * common/gdb_optional.h (optional::optional): Make constexpr and
5220 initialize m_dummy.
5221
5222 2017-04-04 John Baldwin <jhb@FreeBSD.org>
5223
5224 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
5225 (amd64fbsd_jmp_buf_reg_offset): Remove.
5226 (amd64fbsd_supply_uthread): Remove function.
5227 (amd64fbsd_collect_uthread): Remove function.
5228 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
5229 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
5230 (x86_64-*-freebsd*): Remove bsd-uthread.o.
5231 (fbsd-nat.c): Update comment.
5232 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
5233 (i386fbsd_jmp_buf_reg_offset): Remove.
5234 (i386fbsd_supply_uthread): Remove function.
5235 (i386fbsd_collect_uthread): Remove function.
5236 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
5237
5238 2017-04-04 John Baldwin <jhb@FreeBSD.org>
5239
5240 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
5241 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
5242 * NEWS: Mention that support for FreeBSD/alpha was removed.
5243 * alpha-fbsd-tdep.c: Delete file.
5244 * config/alpha/fbsd.mh: Delete file.
5245 * configure.host: Delete alpha*-*-freebsd* and
5246 alpha*-*-kfreebsd*-gnu.
5247 * configure.tgt: Delete alpha*-*-freebsd* and
5248 alpha*-*-kfreebsd*-gnu.
5249
5250 2017-04-04 John Baldwin <jhb@FreeBSD.org>
5251
5252 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
5253 amd64bsd_store_inferior_registers): Use ptid from regcache.
5254
5255 2017-04-04 Pedro Alves <palves@redhat.com>
5256
5257 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
5258 data fields, make them private and add "m_" prefixes.
5259 (lnp_state_machine::lnp_state_machine): New ctor.
5260 (record_line, check_line_address, handle_set_discriminator)
5261 (handle_set_address, handle_advance_pc, handle_special_opcode)
5262 (handle_advance_line, handle_set_file, handle_negate_stmt)
5263 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
5264 (end_sequence, advance_line): New methods.
5265 (m_gdbarch, m_record_lines_p): New fields.
5266 (lnp_reader_state): Delete.
5267 (dwarf_record_line): Rename to ...
5268 (lnp_state_machine::record_line): ... adjust.
5269 (init_lnp_state_machine): Delete.
5270 (lnp_state_machine::lnp_state_machine): New.
5271 (check_line_address): Rename to ...
5272 (lnp_state_machine::check_line_address): This.
5273 (dwarf_decode_lines_1): Remove reference to "reader_state".
5274 Adjust lnp_state_machine having a non-default ctor. Use bool.
5275 State machine internal state manipulation moved to
5276 lnp_state_machine methods.
5277
5278 2017-04-04 Pedro Alves <palves@redhat.com>
5279
5280 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5281 unittests/offset-type-selftests.c.
5282 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
5283 * common/offset-type.h: New file.
5284 * common/preprocessor.h: New file.
5285 * common/traits.h: New file.
5286 * common/valid-expr.h: New file.
5287 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
5288 sect_offset and cu_offset strong typedefs throughout.
5289 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
5290 typedefs throughout.
5291 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
5292 sect_offset and cu_offset strong typedefs throughout.
5293 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
5294 typedefs throughout.
5295 * gdbtypes.h: Include "common/offset-type.h".
5296 (cu_offset): Now an offset type (strong typedef) instead of a
5297 struct.
5298 (sect_offset): Likewise.
5299 (union call_site_parameter_u): Rename "param_offset" field to
5300 "param_cu_off".
5301 * unittests/offset-type-selftests.c: New file.
5302
5303 2017-04-04 Pedro Alves <palves@redhat.com>
5304
5305 * common/underlying.h: New file.
5306 * dwarf2read.c: Include "common/gdb_optional.h" and
5307 "common/underlying.h".
5308 (dir_index, file_name_index): New types.
5309 (file_entry): Use them.
5310 (file_entry::include): Use to_underlying.
5311 (line_header::add_file_name): Use dir_index.
5312 (read_formatted_entries): Use gdb::optional. Read form before
5313 writting to file_entry.
5314 (dwarf_decode_line_header): Use dir_index.
5315 (lnp_state_machine::current_file): Use to_underlying.
5316 (lnp_state_machine::file): Change type to file_name_index.
5317 (dwarf_record_line): Use to_underlying.
5318 (init_lnp_state_machine): Use file_name_index.
5319 (dwarf_decode_lines_1): Use dir_index and file_name_index.
5320
5321 2017-04-04 Pedro Alves <palves@redhat.com>
5322
5323 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
5324 operator bool, has_value and get methods.
5325
5326 2017-04-04 Pedro Alves <palves@redhat.com>
5327
5328 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
5329 fields.
5330 (line_header): Initialize all data fields. Change type of
5331 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
5332 Change type of include_dirs to std::vector<const char *>. Remove
5333 num_include_dirs, include_dirs_size. Change type of file_names to
5334 std::vector<file_entry>. Remove num_file_names, file_names_size.
5335 (line_header::line_header): New.
5336 (line_header::add_include_dir, line_header::add_file_name): New
5337 methods.
5338 (line_header::include_dir_at): Remove NULL check.
5339 (line_header::file_name_at): Add const overload.
5340 (line_header_up): New unique_ptr typedef.
5341 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
5342 std::vector. Remove free_line_header call.
5343 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
5344 free_line_header call.
5345 (free_cu_line_header): Delete.
5346 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
5347 (setup_type_unit_groups): Use line_header_up instead of cleanups.
5348 Adjust to use std::vector.
5349 (free_line_header): Delete.
5350 (free_line_header_voidp): Use delete.
5351 (add_include_dir): Replace with ...
5352 (line_header::add_include_dir): ... this method. Use std::vector.
5353 (add_file_name): Replace with ...
5354 (line_header::add_file_name): ... this method. Use std::vector.
5355 (add_include_dir_stub): Delete.
5356 (read_formatted_entries): Remove memset.
5357 (dwarf_decode_line_header): Return a line_header_up instead of a
5358 raw pointer. Remove cleanup handling. Pass lambdas to
5359 read_formatted_entries. Adjust to use line_header methods.
5360 (dwarf_decode_lines_1): Adjust to use line_header methods.
5361 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
5362 use std::vector.
5363
5364 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
5365
5366 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
5367 instead of struct ptid.
5368
5369 2017-05-04 Alan Hayward <alan.hayward@arm.com>
5370
5371 * frame.c (get_frame_register_bytes): Unwind using value.
5372 (put_frame_register_bytes): Likewise.
5373
5374 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
5375
5376 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
5377 aggregate-like.
5378
5379 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
5380
5381 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
5382
5383 2017-03-29 Yao Qi <yao.qi@linaro.org>
5384
5385 * gdbthread.h (struct thread_info): Declare constructor and
5386 destructor. Add some in-class member initializers.
5387 * thread.c (free_thread): Remove.
5388 (init_thread_list): Call delete instead of free_thread.
5389 (new_thread): Call thread_info constructor.
5390 (thread_info::thread_info): New function.
5391 (thread_info::~thread_info): New function.
5392 (delete_thread_1): Call delete instead of free_thread.
5393 (make_cleanup_restore_current_thread): Move tp and frame to
5394 inner block.
5395
5396 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
5397
5398 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
5399 (arc_skip_prologue): Likewise.
5400 (arc_make_frame_cache): Likewise.
5401 (arc_pv_get_operand): New function.
5402 (arc_is_in_prologue): Likewise.
5403 (arc_analyze_prologue): Likewise.
5404 (arc_print_frame_cache): Likewise.
5405 (MAX_PROLOGUE_LENGTH): New constant.
5406
5407 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
5408
5409 * configure.tgt: Add arc-insn.o.
5410 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
5411 (dump_arc_instruction_command): New function.
5412 (arc_fprintf_disasm): Likewise.
5413 (arc_disassemble_info): Likewise.
5414 (arc_insn_get_operand_value): Likewise.
5415 (arc_insn_get_operand_value_signed): Likewise.
5416 (arc_insn_get_memory_base_reg): Likewise.
5417 (arc_insn_get_memory_offset): Likewise.
5418 (arc_insn_get_branch_target): Likewise.
5419 (arc_insn_dump): Likewise.
5420 (arc_insn_get_linear_next_pc): Likewise.
5421 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
5422 (arc_disassemble_info): Likewise.
5423 (arc_insn_get_branch_target): Likewise.
5424 (arc_insn_get_linear_next_pc): Likewise.
5425 * NEWS: Mention new "maint print arc arc-instruction".
5426
5427 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
5428
5429 * arc-tdep (maintenance_print_arc_list): New variable.
5430 (maintenance_print_arc_command): New function.
5431
5432 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
5433
5434 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
5435 Add "limm" and "reserved".
5436 (arc_cannot_fetch_register, arc_cannot_store_register): Add
5437 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
5438 * arc-tdep.h (arc_regnum): Likewise.
5439
5440 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5441
5442 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
5443 for THREADPTR register.
5444 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
5445 register.
5446 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
5447 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
5448 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
5449
5450 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5451
5452 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
5453 registers above gdbarch_num_regs (gdbarch) as privileged in
5454 call0 ABI.
5455
5456 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5457
5458 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
5459 for a single specified register or for all registers in
5460 a0_base..a0_base + C0_NREGS range.
5461 (supply_gregset_reg): Call regcache_raw_supply for a single
5462 specified register or for all registers in a0_base..a0_base +
5463 C0_NREGS range.
5464
5465 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5466
5467 * arch/xtensa.h (C0_NREGS): Add definition.
5468 * xtensa-tdep.c (C0_NREGS): Remove definition.
5469
5470 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
5471
5472 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
5473 Drop xtensa_default_isa initialization.
5474 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
5475
5476 2017-03-27 Pedro Alves <palves@redhat.com>
5477
5478 * dwarf2read.c (file_entry) <dir_index>: Add comment.
5479 (file_entry::include_dir): New method.
5480 (line_header::include_dir_at, line_header::file_name_at): New
5481 methods.
5482 (setup_type_unit_groups, setup_type_unit_groups)
5483 (psymtab_include_file_name): Simplify using the new methods.
5484 (lnp_state_machine) <the_line_header>: New field.
5485 <file>: Add comment.
5486 (lnp_state_machine::current_file): New method.
5487 (dwarf_record_line): Simplify using the new methods.
5488 (init_lnp_state_machine): Initialize the "the_line_header" field.
5489 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
5490 Simplify using the new methods.
5491
5492 2017-03-27 Pedro Alves <palves@redhat.com>
5493
5494 * cp-name-parser.y (make_empty): Delete.
5495 (demangler_special, nested_name, ptr_operator, array_indicator)
5496 (direct_declarator, declarator_1): Use fill_comp instead of
5497 make_empty.
5498
5499 2017-03-27 Pedro Alves <palves@redhat.com>
5500
5501 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
5502 to ATTRIBUTE_PRINTF.
5503 * solib-target.c (library_list_start_list): Print "string" not
5504 "version".
5505 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
5506 gdb_xml_error call.
5507
5508 2017-03-27 Pedro Alves <palves@redhat.com>
5509
5510 * dwarf2read.c (struct file_and_directory): New.
5511 (dwarf2_get_dwz_file): Adjust to use std::string.
5512 (dw2_get_file_names_reader): Adjust to use file_and_directory.
5513 (find_file_and_directory): Adjust to return a file_and_directory
5514 object.
5515 (read_file_scope): Adjust to use file_and_directory. Remove
5516 make_cleanup/do_cleanups calls.
5517 (open_and_init_dwp_file): Adjust to use std::string. Remove
5518 make_cleanup/do_cleanups calls.
5519 * python/python.c (do_start_initialization): Adjust to ldirname
5520 returning a std::string.
5521 * utils.c (ldirname): Now returns a std::string.
5522 * utils.h (ldirname): Change return type to std::string.
5523 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
5524 returning a std::string.
5525 * xml-tdesc.c (file_read_description_xml): Likewise.
5526
5527 2017-03-24 Alan Hayward <alan.hayward@arm.com>
5528
5529 * regcache.c (regcache_debug_print_register): New function.
5530 * regcache.h (regcache_debug_print_register): New declaration.
5531 * target.c (debug_print_register): Remove.
5532 (target_fetch_registers): Call regcache_debug_print_register.
5533 (target_store_registers): Likewise.
5534
5535 2017-03-24 Pádraig Brady <pbrady@fb.com>
5536
5537 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
5538 reference beyond the 'lh->include_dirs' array before accessing to
5539 it.
5540 (psymtab_include_file_name): Likewise.
5541 (dwarf_decode_lines_1): Likewise.
5542 (dwarf_decode_lines): Likewise.
5543 (file_file_name): Likewise.
5544
5545 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
5546
5547 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
5548 inferior_ptid.
5549 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
5550 ps_lsetfpregs): Likewise.
5551 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
5552 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
5553 ps_lsetfpregs): Likewise.
5554 * target.c (target_fetch_registers, target_store_registers):
5555 Remove asserts.
5556
5557 2017-03-23 Alan Hayward <alan.hayward@arm.com>
5558
5559 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
5560
5561 2017-03-23 Yao Qi <yao.qi@linaro.org>
5562
5563 * aarch64-tdep.c (aarch64_process_record_test): Declare.
5564 (_initialize_aarch64_tdep): Register it.
5565 (aarch64_record_load_store): Handle PRFM instruction.
5566 (aarch64_process_record_test): New function.
5567
5568 2017-03-23 Yao Qi <yao.qi@linaro.org>
5569
5570 * aarch64-tdep.c (aarch64_record_load_store): Fix code
5571 indentation.
5572
5573 2017-03-23 Yao Qi <yao.qi@linaro.org>
5574
5575 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
5576
5577 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
5578
5579 python/python.c (do_start_initialization): Fix memory leak.
5580
5581 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
5582
5583 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
5584 using get_ptrace_pid.
5585 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
5586 inferior_ptid.
5587 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
5588 inferior_ptid instead of pid.
5589
5590 2017-03-22 Yao Qi <yao.qi@linaro.org>
5591
5592 * aarch64-tdep.c: Wrap locally used classes in anonymous
5593 namespace.
5594 * arm-tdep.c: Likewise.
5595 * linespec.c: Likewise.
5596 * ui-out.c: Likewise.
5597
5598 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
5599
5600 PR gdb/19637
5601 * python/lib/gdb/printer/bound_registers.py: Import sys.
5602
5603 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
5604
5605 * windows-nat.c (do_windows_fetch_inferior_registers): Add
5606 windows_thread_info parameter and use it instead of
5607 current_thread.
5608 (windows_fetch_inferior_registers): Don't set current_thread,
5609 pass the thread to do_windows_fetch_inferior_registers. Use
5610 ptid from regcache instead of inferior_ptid.
5611 (do_windows_store_inferior_registers): Add windows_thread_info
5612 parameter and use it instead of current_thread.
5613 (windows_store_inferior_registers): Don't set current_thread,
5614 pass the thread to do_windows_store_inferior_registers. Use
5615 ptid from regcache instead of inferior_ptid.
5616
5617 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
5618
5619 * ser-mingw.c (ser_windows_raw): Remove reference to
5620 struct serial::current_timeout.
5621
5622 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
5623
5624 PR tdep/20928
5625 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
5626 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
5627 (sparc64_fsr_type): Fix %fsr decoding.
5628
5629 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
5630
5631 * python/py-record-btrace.c (btpy_insn_data): Change return type
5632 for Python 2.
5633
5634 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
5635
5636 * spu-linux-nat.c (spu_fetch_inferior_registers,
5637 spu_store_inferior_registers): Use ptid from regcache, set and
5638 restore inferior_ptid.
5639 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
5640 Likewise.
5641
5642 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
5643
5644 * i386-linux-nat.c (fetch_register, store_register,
5645 i386_linux_fetch_inferior_registers,
5646 i386_linux_store_inferior_registers): Use ptid from regcache.
5647 * ia64-linux-nat.c (ia64_linux_fetch_register,
5648 ia64_linux_store_register): Likewise.
5649 * inf-ptrace.c (inf_ptrace_fetch_register,
5650 inf_ptrace_store_register): Likewise.
5651 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
5652 m32r_linux_store_inferior_registers): Likewise.
5653 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
5654 m68kbsd_store_inferior_registers): Likewise.
5655 * m68k-linux-nat.c (fetch_register, store_register,
5656 m68k_linux_fetch_inferior_registers,
5657 m68k_linux_store_inferior_registers): Likewise.
5658 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
5659 m88kbsd_store_inferior_registers): Likewise.
5660 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
5661 mips_fbsd_store_inferior_registers): Likewise.
5662 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
5663 mips64_linux_regsets_store_registers): Likewise.
5664 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
5665 mipsnbsd_store_inferior_registers): Likewise.
5666 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
5667 mips64obsd_store_inferior_registers): Likewise.
5668 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
5669 Likewise.
5670 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
5671 ppcfbsd_store_inferior_registers): Likewise.
5672 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
5673 ppc_linux_store_inferior_registers): Likewise.
5674 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
5675 ppcnbsd_store_inferior_registers): Likewise.
5676 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
5677 ppcobsd_store_registers): Likewise.
5678 * procfs.c (procfs_fetch_registers, procfs_store_registers):
5679 Likewise.
5680 * ravenscar-thread.c (ravenscar_fetch_registers,
5681 ravenscar_store_registers, ravenscar_prepare_to_store):
5682 Likewise.
5683 * record-btrace.c (record_btrace_fetch_registers,
5684 record_btrace_store_registers, record_btrace_prepare_to_store):
5685 Likewise.
5686 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
5687 Lookup inferior using ptid from regcache, instead of
5688 current_inferior.
5689 * remote.c (remote_fetch_registers, remote_store_registers): Use
5690 ptid from regcache.
5691 * rs6000-nat.c (fetch_register, store_register): Likewise.
5692 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
5693 s390_linux_store_inferior_registers): Likewise.
5694 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
5695 shnbsd_store_inferior_registers): Likewise.
5696 * sol-thread.c (sol_thread_fetch_registers,
5697 sol_thread_store_registers): Likewise.
5698 * sparc-nat.c (sparc_fetch_inferior_registers,
5699 sparc_store_inferior_registers): Likewise.
5700 * tilegx-linux-nat.c (fetch_inferior_registers,
5701 store_inferior_registers): Likewise.
5702 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
5703 vaxbsd_store_inferior_registers): Likewise.
5704 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
5705 store_xtregs): Likewise.
5706
5707 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5708
5709 PR gdb/14441
5710 * NEWS: Mention support for rvalue references in GDB and python.
5711 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
5712 supports both lvalue and rvalue references.
5713
5714 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5715
5716 PR gdb/14441
5717 * gdbtypes.c (rank_one_type): Implement overloading
5718 resolution rules regarding rvalue references.
5719
5720 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5721
5722 PR gdb/14441
5723 * aarch64-tdep.c (aarch64_type_align)
5724 (aarch64_extract_return_value, aarch64_store_return_value): Change
5725 lvalue reference type checks to general reference type checks.
5726 * amd64-tdep.c (amd64_classify): Likewise.
5727 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
5728 Likewise.
5729 * arm-tdep.c (arm_type_align, arm_extract_return_value)
5730 (arm_store_return_value): Likewise.
5731 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
5732 * c-typeprint.c (c_print_type): Likewise.
5733 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
5734 (cplus_number_of_children, cplus_describe_child): Likewise.
5735 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
5736 * completer.c (expression_completer): Likewise.
5737 * cp-support.c (make_symbol_overload_list_adl_namespace):
5738 Likewise.
5739 * darwin-nat-info.c (info_mach_region_command): Likewise.
5740 * dwarf2loc.c (entry_data_value_coerce_ref)
5741 (value_of_dwarf_reg_entry): Likewise.
5742 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
5743 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
5744 Likewise.
5745 * findvar.c (extract_typed_address, store_typed_address):
5746 Likewise.
5747 * gdbtypes.c (rank_one_type): Likewise.
5748 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
5749 * infcall.c (value_arg_coerce): Likewise.
5750 * language.c (pointer_type): Likewise.
5751 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
5752 Likewise.
5753 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
5754 * mn10300-tdep.c (mn10300_type_align): Likewise.
5755 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
5756 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
5757 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
5758 Likewise.
5759 * printcmd.c (print_formatted, x_command): Likewise.
5760 * python/py-type.c (typy_get_composite, typy_template_argument):
5761 Likewise.
5762 * python/py-value.c (valpy_referenced_value)
5763 (valpy_get_dynamic_type, value_has_field): Likewise.
5764 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
5765 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
5766 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
5767 * spu-tdep.c (spu_scalar_value_p): Likewise.
5768 * symtab.c (lookup_symbol_aux): Likewise.
5769 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
5770 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
5771 Likewise.
5772 * valops.c (value_cast_pointers, value_cast)
5773 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
5774 (value_struct_elt, value_struct_elt_bitpos)
5775 (value_find_oload_method_list, find_overload_match)
5776 (value_rtti_indirect_type): Likewise.
5777 * valprint.c (val_print_scalar_type_p, generic_val_print):
5778 Likewise.
5779 * value.c (value_actual_type, value_as_address, unpack_long)
5780 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
5781 (coerce_ref): Likewise.
5782 * varobj.c (varobj_get_value_type): Likewise.
5783
5784 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5785
5786 PR gdb/14441
5787 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
5788 table of constants.
5789 * python/lib/gdb/command/explore.py: Support exploring values
5790 of rvalue reference types.
5791 * python/lib/gdb/types.py: Implement get_basic_type() for
5792 rvalue reference types.
5793 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
5794 constant.
5795 * python/py-value.c (valpy_getitem): Add an rvalue reference
5796 check.
5797 (valpy_reference_value): Add new parameter "refcode".
5798 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
5799 New wrappers for valpy_reference_value().
5800 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
5801 (gdbpy_invoke_xmethod): Likewise.
5802
5803 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5804
5805 PR gdb/14441
5806 * dwarf2read.c (process_die, read_type_die_1): Handle the
5807 DW_TAG_rvalue_reference_type DIE.
5808 (read_tag_reference_type): Add new parameter "refcode".
5809
5810 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5811
5812 PR gdb/14441
5813 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
5814 (c_type_print_modifier, c_type_print_varspec_suffix)
5815 (c_type_print_base): Support printing rvalue reference types.
5816 * c-valprint.c (c_val_print, c_value_print): Support printing
5817 rvalue reference values.
5818
5819 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5820
5821 PR gdb/14441
5822 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
5823 typename.
5824 * cp-support.c (replace_typedefs): Handle
5825 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
5826 * python/py-type.c (typy_lookup_type): Likewise.
5827
5828 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5829
5830 PR gdb/14441
5831 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
5832 * parse.c (insert_type): Change assert statement.
5833 (follow_types): Handle rvalue reference types.
5834 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
5835 constant.
5836
5837 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5838
5839 PR gdb/14441
5840 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
5841 value_ref() interface.
5842 * c-valprint.c (c_value_print): Likewise.
5843 * infcall.c (value_arg_coerce): Likewise.
5844 * python/py-value.c (valpy_reference_value): Likewise.
5845 * valops.c (value_cast, value_reinterpret_cast)
5846 (value_dynamic_cast, typecmp): Likewise.
5847 (value_ref): Parameterize by kind of return value reference type.
5848 * value.h (value_ref): Add new parameter "refcode".
5849
5850 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5851
5852 PR gdb/14441
5853 * dwarf2read.c (read_tag_reference_type): Use
5854 lookup_lvalue_reference_type() instead of lookup_reference_type().
5855 * eval.c (evaluate_subexp_standard): Likewise.
5856 * f-exp.y: Likewise.
5857 * gdbtypes.c (make_reference_type, lookup_reference_type):
5858 Generalize with rvalue reference types.
5859 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
5860 convenience wrappers for lookup_reference_type().
5861 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
5862 reference kind parameter.
5863 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
5864 wrappers for lookup_reference_type().
5865 * guile/scm-type.c (gdbscm_type_reference): Use
5866 lookup_lvalue_reference_type() instead of lookup_reference_type().
5867 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
5868 * parse.c (follow_types): Likewise.
5869 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
5870 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
5871 Likewise.
5872 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
5873 (gdbpy_invoke_xmethod): Likewise.
5874 * stabsread.c: Provide extra argument to make_reference_type()
5875 call.
5876 * valops.c (value_ref, value_rtti_indirect_type): Use
5877 lookup_lvalue_reference_type() instead of lookup_reference_type().
5878
5879 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
5880
5881 PR gdb/14441
5882 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
5883 (TYPE_IS_REFERENCE): New macro.
5884 (struct type): Add rvalue_reference_type field.
5885 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
5886
5887 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
5888
5889 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
5890 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
5891 New function definition.
5892 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
5893 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
5894 New function declaration.
5895 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
5896 * mi/mi-interp.h: New file.
5897 * solib.c (info_sharedlibrary_command): Replace for loop with
5898 ALL_SO_LIBS macro
5899 * solib.h (update_solib_list): New function declaration.
5900 (so_list_head): Move macro.
5901 * solist.h (ALL_SO_LIBS): New macro.
5902
5903 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
5904
5905 * infcmd.c (post_create_inferior): Remove unused argument in
5906 call to solib_add.
5907 * remote.c (remote_start_remote): Likewise.
5908 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
5909 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
5910 (enable_break): Likewise.
5911 * solib.c (update_solib_list): Remove unused target argument
5912 and its documentation.
5913 (solib_add): Remove unused target argument. Remove unused
5914 argument in call to update_solib_list.
5915 (info_sharedlibrary_command): Remove unused argument in call
5916 to update_solib_list.
5917 (sharedlibrary_command): Remove unused argument in call to
5918 solib_add.
5919 (handle_solib_event): Likewise.
5920 (reload_shared_libraries): Likewise.
5921 * solib.h (solib_add): Remove unused target argument.
5922
5923 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
5924
5925 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
5926 (s390_displaced_step_fixup): Cover relative branches with the
5927 default fixup handling. This fixes lack of support for some
5928 relative branch instructions.
5929
5930 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5931
5932 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
5933 ptid from regcache.
5934
5935 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5936
5937 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
5938 i386_darwin_store_inferior_registers): Use ptid from regcache.
5939
5940 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5941
5942 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
5943 i386bsd_store_inferior_registers): Use ptid from regcache.
5944
5945 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5946
5947 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
5948 hppaobsd_store_registers): Use ptid from regcache.
5949
5950 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5951
5952 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
5953 hppanbsd_store_registers): Use ptid from regcache.
5954
5955 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5956
5957 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
5958 from regcache. Use get_ptrace_pid.
5959
5960 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5961
5962 * corelow.c (get_core_register_section): Use ptid from regcache,
5963 update doc.
5964
5965 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5966
5967 * bsd-uthread.c (bsd_uthread_fetch_registers,
5968 bsd_uthread_store_registers): Use ptid from regcache, set and
5969 restore inferior_ptid.
5970
5971 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5972
5973 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
5974 fetch_fp_regs, store_register, store_regs, store_fp_register,
5975 store_fp_regs): Use ptid from regcache.
5976
5977 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
5978
5979 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
5980 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
5981 store_vfp_regs): Use ptid from regcache.
5982
5983 2017-03-17 Pedro Alves <palves@redhat.com>
5984
5985 PR remote/21188
5986 * ser-base.c (ser_base_wait_for): Add comment.
5987 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
5988 version.
5989 * ser-unix.c (hardwire_raw): Remove reference to
5990 scb->current_timeout.
5991 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
5992 (hardwire_ops): Install ser_base_readchar instead of
5993 hardwire_readchar.
5994 * serial.h (struct serial) <current_timeout, timeout_remaining>:
5995 Remove fields.
5996
5997 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
5998
5999 PR gdb/19637
6000 * python/lib/gdb/printer/bound_registers.py: Add support for
6001 Python 3.
6002
6003 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
6004
6005 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
6006 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
6007 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
6008 byte_offset to subobj_byte_offset. Fix the handling of
6009 DWARF_VALUE_STACK on big-endian targets when coming via an
6010 implicit pointer.
6011 (dwarf2_evaluate_loc_desc): Adjust call to
6012 dwarf2_evaluate_loc_desc_full.
6013 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
6014 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
6015
6016 2017-03-16 Yao Qi <yao.qi@linaro.org>
6017
6018 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
6019 and REVSH instructions.
6020
6021 2017-03-16 Yao Qi <yao.qi@linaro.org>
6022
6023 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
6024 (arm_record_test): Declare.
6025 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
6026 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
6027 align with the manual.
6028 (thumb_record_misc): Adjust the code order to align with the
6029 manual.
6030 (thumb2_record_decode_insn_handler): Fix instruction matching.
6031 (instruction_reader_thumb): New class.
6032 (arm_record_test): New function.
6033
6034 2017-03-16 Yao Qi <yao.qi@linaro.org>
6035
6036 * arm-tdep.c (abstract_memory_reader): New class.
6037 (instruction_reader): New class.
6038 (extract_arm_insn): Add argument 'reader'. Callers updated.
6039 (decode_insn): Likewise.
6040
6041 2017-03-16 Doug Evans <dje@google.com>
6042
6043 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
6044 member. Change type of TYPE member to SCM. All uses updated.
6045 (lsscm_make_lazy_string_smob): Add assert.
6046 (lsscm_make_lazy_string): Flag bad length values.
6047 (lsscm_elt_type): New function.
6048 (gdbscm_lazy_string_to_value): Rewrite to use
6049 lsscm_safe_lazy_string_to_value.
6050 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
6051 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
6052 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
6053 in incoming type.
6054 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
6055 * guile/scm-type.c (tyscm_scm_to_type): New function.
6056
6057 2017-03-15 Doug Evans <dje@google.com>
6058
6059 PR python/17728, python/18439, python/18779
6060 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
6061 member. Change type of TYPE member to PyObject *. All uses updated.
6062 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
6063 (gdbpy_create_lazy_string_object): Flag bad length values.
6064 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
6065 Handle typedefs in incoming type.
6066 (stpy_lazy_string_elt_type): New function.
6067 (gdbpy_extract_lazy_string): Call it.
6068 * python/py-value.c (valpy_lazy_string): Flag bad length values.
6069 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
6070 typedefs in incoming type.
6071
6072 2017-03-16 Doug Evans <dje@google.com>
6073
6074 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
6075 * guile/scm-type.c (tyscm_scm_to_type): New function.
6076
6077 2017-03-16 Jiong Wang <jiong.wang@arm.com>
6078
6079 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
6080 "ULONGEST" for "skip".
6081
6082 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
6083
6084 PR gdb/21220
6085 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
6086 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
6087 (inf_ptrace_peek_poke): ...here. New function. Now also loop
6088 over ptrace peek/poke until end of buffer or error.
6089
6090 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
6091
6092 * parse.c (length_of_subexp): Make static.
6093 * parser-defs.h (length_of_subexp): Remove.
6094
6095 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
6096
6097 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
6098 as well.
6099
6100 2017-03-14 Pedro Alves <palves@redhat.com>
6101
6102 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
6103 (main): Use std::unique_ptr. Remove calls to
6104 cp_demangled_name_parse_free.
6105
6106 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6107
6108 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
6109 alphabsd_store_inferior_registers): Use regcache->ptid instead
6110 of inferior_ptid.
6111
6112 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6113
6114 * aix-thread.c (aix_thread_fetch_registers,
6115 aix_thread_store_registers): Use regcache->ptid instead of
6116 inferior_ptid.
6117
6118 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6119
6120 * aarch64-linux-nat.c (fetch_gregs_from_thread,
6121 store_gregs_to_thread, fetch_fpregs_from_thread,
6122 store_fpregs_to_thread): Use regcache->ptid instead of
6123 inferior_ptid.
6124
6125 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6126
6127 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
6128 amd64_linux_fetch_inferior_registers): Use regcache->ptid
6129 instead of inferior_ptid.
6130
6131 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6132
6133 * target.c (target_fetch_registers, target_store_registers): Add
6134 assert.
6135
6136 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
6137
6138 * regcache.h (regcache_get_ptid): New function.
6139 * regcache.c (regcache_get_ptid): New function.
6140
6141 2017-03-13 Mark Wielaard <mark@klomp.org>
6142
6143 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
6144
6145 2017-03-10 Keith Seitz <keiths@redhat.com>
6146
6147 PR c++/8218
6148 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
6149
6150 2017-03-08 Pedro Alves <palves@redhat.com>
6151
6152 PR gdb/18360
6153 * infrun.c (start_step_over, do_target_resume, resume)
6154 (restart_threads): Assert we're not resuming a thread that is
6155 meant to be stopped.
6156 (infrun_thread_stop_requested_callback): Delete.
6157 (infrun_thread_stop_requested): If the thread is internally
6158 stopped, queue a pending stop event and clear the thread's
6159 inline-frame state.
6160 (handle_stop_requested): New function.
6161 (handle_syscall_event, handle_inferior_event_1): Use
6162 handle_stop_requested.
6163 (handle_stop_requested): New function.
6164 (handle_signal_stop): Set the thread's stop_signal here instead of
6165 at caller.
6166 (finish_step_over): Clear step over info unconditionally.
6167 (handle_signal_stop): If the user had interrupted the event
6168 thread, consider the stop a random signal.
6169 (handle_signal_stop) <signal arrived while stepping over
6170 breakpoint>: Don't restart threads here.
6171 (stop_waiting): Don't clear step-over info here.
6172
6173 2017-03-08 Pedro Alves <palves@redhat.com>
6174
6175 PR 21206
6176 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
6177 goes to argument 2, not 1.
6178
6179 2017-03-08 Pedro Alves <palves@redhat.com>
6180
6181 PR cli/21218
6182 * top.c (gdb_readline_wrapper): Avoid passing NULL to
6183 display_gdb_prompt.
6184 (command_line_input): Add comment.
6185
6186 2017-03-08 Pedro Alves <palves@redhat.com>
6187
6188 PR tui/21216
6189 * tui/tui-file.c (tui_file::write): New.
6190 * tui/tui-file.h (tui_file): Override "write".
6191 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
6192 factored out from ...
6193 (tui_puts): ... here.
6194 (tui_putc): Use them.
6195 (tui_write): New function.
6196 * tui/tui-io.h (tui_write): Declare.
6197
6198 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
6199
6200 * Makefile.in (SFILES): Replace "environ.c" with
6201 "common/environ.c".
6202 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
6203 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
6204 to...
6205 * common/environ.c: ... here.
6206 * environ.h: Moved to...
6207 * common/environ.h: ... here.
6208
6209 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
6210
6211 * gdbarch.sh (pstring_ptr): New static function.
6212 (gdbarch_disassembler_options): Use it.
6213 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
6214 not valid_disassembler_option->name.
6215 * gdbarch.c: Regenerate.
6216
6217 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
6218
6219 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
6220
6221 2017-03-07 Pedro Alves <palves@redhat.com>
6222
6223 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
6224
6225 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
6226
6227 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
6228 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
6229 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6230 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
6231
6232 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
6233
6234 * xtensa-linux-nat.c (fetch_gregs): Remove const.
6235
6236 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
6237
6238 * remote.c (remote_add_target_side_commands): Use range-based
6239 for loop.
6240
6241 2017-03-03 Yao Qi <yao.qi@linaro.org>
6242
6243 PR gdb/21165
6244 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
6245 value is lazy.
6246 * valprint.c (common_val_print): Likewise.
6247
6248 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
6249
6250 * NEWS: Mention new set/show disassembler-options commands.
6251 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
6252 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
6253 (prospective_options): New static variable.
6254 (gdb_disassembler::gdb_disassembler): Initialize
6255 m_di.disassembler_options.
6256 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
6257 (get_disassembler_options): New function.
6258 (set_disassembler_options): Likewise.
6259 (set_disassembler_options_sfunc): Likewise.
6260 (show_disassembler_options_sfunc): Likewise.
6261 (disassembler_options_completer): Likewise.
6262 (_initialize_disasm): Likewise.
6263 * disasm.h (get_disassembler_options): New prototype.
6264 (set_disassembler_options): Likewise.
6265 * gdbarch.sh (gdbarch_disassembler_options): New variable.
6266 (gdbarch_verify_disassembler_options): Likewise.
6267 * gdbarch.c: Regenerate.
6268 * gdbarch.h: Likewise.
6269 * arm-tdep.c (num_disassembly_options): Delete.
6270 (set_disassembly_style): Likewise.
6271 (arm_disassembler_options): New static variable.
6272 (set_disassembly_style_sfunc): Convert short style name into long
6273 option name. Call set_disassembler_options.
6274 (show_disassembly_style_sfunc): New function.
6275 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
6276 set_gdbarch_verify_disassembler_options.
6277 (_initialize_arm_tdep): Delete regnames variable and update callers.
6278 (arm_disassembler_options): Initialize.
6279 (disasm_options): New variable.
6280 (num_disassembly_options): Rename from this...
6281 (num_disassembly_styles): ...to this. Compute by scanning through
6282 disasm_options.
6283 (valid_disassembly_styles): Initialize using disasm_options.
6284 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
6285 set_arm_regname_option.
6286 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
6287 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
6288 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
6289 set_gdbarch_verify_disassembler_options.
6290 * s390-tdep.c (s390_disassembler_options): New static variable.
6291 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
6292 set_gdbarch_verify_disassembler_options.
6293
6294 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
6295
6296 * remote.c (remote_add_target_side_condition): Remove "struct"
6297 keyword from range-based for loop.
6298
6299 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
6300
6301 * remote.c (remote_add_target_side_condition): Use range-based
6302 for loop. Update comment.
6303
6304 2017-02-27 Yao Qi <yao.qi@linaro.org>
6305
6306 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
6307
6308 2017-02-26 Alan Hayward <alan.hayward@arm.com>
6309
6310 * regcache.c (regcache_raw_update): New function.
6311 (regcache_raw_read): Move code to regcache_raw_update.
6312 * regcache.h (regcache_raw_update): New declaration.
6313 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
6314
6315 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
6316
6317 * dwarf2read.c (create_debug_type_hash_table): Initialize
6318 header.signature and header.type_offset_in_tu.
6319
6320 2017-02-24 Pedro Alves <palves@redhat.com>
6321
6322 * symtab.c (make_file_symbol_completion_list_1): Use
6323 add_symtab_completions.
6324
6325 2017-02-24 Alan Hayward <alan.hayward@arm.com>
6326
6327 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
6328
6329 2017-02-24 Alan Hayward <alan.hayward@arm.com>
6330
6331 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
6332 I386_MAX_REGISTER_SIZE.
6333 (i386_pseudo_register_write): Likewise.
6334 (i386_process_record): Likewise.
6335 * i387-tdep.c (i387_supply_xsave): Likewise.
6336 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
6337 (store_register): Likewise.
6338
6339 2017-02-23 Pedro Alves <palves@redhat.com>
6340
6341 * ada-lang.c: Include "common/function-view.h".
6342 (ada_iterate_over_symbols): Adjust to use function_view as
6343 callback type.
6344 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
6345 (ada_make_symbol_completion_list): Use a lambda.
6346 (ada_exc_search_name_matches): Delete.
6347 (name_matches_regex): New.
6348 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
6349 * compile/compile-c-support.c: Include "common/function-view.h".
6350 (print_one_macro): Change prototype to accept a ui_file pointer.
6351 (write_macro_definitions): Use a lambda.
6352 * dwarf2read.c: Include "common/function-view.h".
6353 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
6354 (dw2_expand_symtabs_matching): Adjust to use function_view as
6355 callback type.
6356 * language.h: Include "common/function-view.h".
6357 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
6358 function_view as callback type.
6359 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
6360 * linespec.c: Include "common/function-view.h".
6361 (collect_info::add_symbol): New method.
6362 (struct symbol_and_data_callback, iterate_inline_only, struct
6363 symbol_matcher_data, iterate_name_matcher): Delete.
6364 (iterate_over_all_matching_symtabs): Adjust to use function_view
6365 as callback type and lambdas.
6366 (iterate_over_file_blocks): Adjust to use function_view as
6367 callback type.
6368 (decode_compound_collector): Now a class with private fields.
6369 (decode_compound_collector::release_symbols): New method.
6370 (collect_one_symbol): Rename to...
6371 (decode_compound_collector::operator()): ... this and adjust.
6372 (lookup_prefix_sym): decode_compound_collector construction bits
6373 move to decode_compound_collector ctor. Pass the
6374 decode_compound_collector object directly as callback. Remove
6375 cleanups and use decode_compound_collector::release_symbols
6376 instead.
6377 (symtab_collector): Now a class with private fields.
6378 (symtab_collector::release_symtabs): New method.
6379 (add_symtabs_to_list): Rename to...
6380 (symtab_collector::operator()): ... this and adjust.
6381 (collect_symtabs_from_filename): symtab_collector construction
6382 bits move to symtab_collector ctor. Pass the symtab_collector
6383 object directly as callback. Remove cleanups and use
6384 symtab_collector::release_symtabs instead.
6385 (collect_symbols): Delete.
6386 (add_matching_symbols_to_info): Use lambdas.
6387 * macrocmd.c (print_macro_callback): Delete.
6388 (info_macro_command): Use a lambda.
6389 (info_macros_command): Pass print_macro_definition as callable
6390 directly.
6391 (print_one_macro): Remove 'ignore' parameter.
6392 (macro_list_command): Adjust.
6393 * macrotab.c (macro_for_each_data::fn): Now a function_view.
6394 (macro_for_each_data::user_data): Delete field.
6395 (foreach_macro): Adjust to call the function_view.
6396 (macro_for_each): Adjust to use function_view as callback type.
6397 (foreach_macro_in_scope): Adjust to call the function_view.
6398 (macro_for_each_in_scope): Adjust to use function_view as callback
6399 type.
6400 * macrotab.h: Include "common/function-view.h".
6401 (macro_callback_fn): Declare a prototype instead of a pointer.
6402 Remove "user_data" parameter.
6403 (macro_for_each, macro_for_each_in_scope): Adjust to use
6404 function_view as callback type.
6405 * psymtab.c (partial_map_expand_apply)
6406 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
6407 Adjust to use function_view as callback type and to return bool.
6408 (psym_expand_symtabs_matching): Adjust to use function_view as
6409 callback types.
6410 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
6411 to use function_view as callback type and to return bool.
6412 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
6413 callback types.
6414 * symfile.c (expand_symtabs_matching): Adjust to use function_view
6415 as callback types.
6416 * symfile.h: Include "common/function-view.h".
6417 (expand_symtabs_file_matcher_ftype)
6418 (expand_symtabs_symbol_matcher_ftype)
6419 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
6420 return bool.
6421 (quick_symbol_functions::map_symtabs_matching_filename)
6422 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
6423 function_view as callback type and return bool.
6424 (expand_symtabs_matching): Adjust to use function_view as callback
6425 type.
6426 (maintenance_expand_name_matcher)
6427 (maintenance_expand_file_matcher): Delete.
6428 (maintenance_expand_symtabs): Use lambdas.
6429 * symtab.c (iterate_over_some_symtabs): Adjust to use
6430 function_view as callback types and return bool.
6431 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
6432 of a cleanup.
6433 (lookup_symtab_callback): Delete.
6434 (lookup_symtab): Use a lambda.
6435 (iterate_over_symbols): Adjust to use function_view as callback
6436 type.
6437 (struct search_symbols_data, search_symbols_file_matches)
6438 (search_symbols_name_matches): Delete.
6439 (search_symbols): Use a pair of lambdas.
6440 (struct add_name_data, add_macro_name, symbol_completion_matcher)
6441 (symtab_expansion_callback): Delete.
6442 (default_make_symbol_completion_list_break_on_1): Use lambdas.
6443 * symtab.h: Include "common/function-view.h".
6444 (iterate_over_some_symtabs): Adjust to use function_view as
6445 callback type and return bool.
6446 (iterate_over_symtabs): Adjust to use function_view as callback
6447 type.
6448 (symbol_found_callback_ftype): Remove 'data' parameter and return
6449 bool.
6450 (iterate_over_symbols): Adjust to use function_view as callback
6451 type.
6452
6453 2017-02-23 Pedro Alves <palves@redhat.com>
6454
6455 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
6456 (%.o) <unittests/%.c>: New pattern.
6457 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
6458 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
6459 * common/function-view.h: New file.
6460 * unittests/function-view-selftests.c: New file.
6461 * configure: Regenerate.
6462
6463 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
6464
6465 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
6466 inferior_ptid.
6467 * go32-nat.c (go32_thread_alive): Likewise.
6468
6469 2017-02-23 Yao Qi <yao.qi@linaro.org>
6470
6471 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
6472 delete.
6473
6474 2017-02-23 Yao Qi <yao.qi@linaro.org>
6475
6476 * varobj.c (varobj_clear_saved_item): Use delete instead of
6477 xfree.
6478 (update_dynamic_varobj_children): Likewise.
6479
6480 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6481
6482 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
6483
6484 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
6485
6486 * common/enum-flags.h (enum_flags::enum_flags): Initialize
6487 m_enum_value to 0 in default constructor.
6488
6489 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6490
6491 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
6492 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
6493 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
6494 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
6495 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
6496 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
6497 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
6498 IS_STORE_CONDITIONAL_INSN.
6499
6500 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6501
6502 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
6503
6504 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6505
6506 * NEWS (Changes since GDB 7.12): Add DWARF-5.
6507
6508 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6509
6510 * dwarf2read.c (skip_one_die, read_attribute_value)
6511 (dwarf2_const_value_attr, dump_die_shallow)
6512 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6513 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
6514
6515 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6516
6517 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
6518 (dwarf_parse_macro_header): Accept DWARF version 5.
6519 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
6520
6521 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6522
6523 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
6524 DW_AT_GNU_*.
6525 * common/common-exceptions.h (enum errors): Likewise.
6526 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
6527 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
6528 (dwarf_expr_context::execute_stack_op): Likewise.
6529 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
6530 Likewise.
6531 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
6532 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
6533 (show_entry_values_debug, call_site_to_target_addr)
6534 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
6535 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
6536 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
6537 (value_of_dwarf_block_entry, indirect_pieced_value)
6538 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
6539 (disassemble_dwarf_expression): Likewise.
6540 * dwarf2read.c (process_die, inherit_abstract_dies)
6541 (read_call_site_scope): Likewise.
6542 * gdbtypes.h (struct func_type, struct call_site_parameter)
6543 (struct call_site): Likewise.
6544 * stack.c (read_frame_arg): Likewise.
6545 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
6546
6547 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6548
6549 * defs.h (read_unsigned_leb128): New declaration.
6550 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
6551 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
6552 (dwarf2_find_location_expression): Call also
6553 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
6554 * dwarf2loc.h (dwarf2_version): New declaration.
6555 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
6556 rnglists.
6557 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
6558 .debug_rnglists.
6559 (struct dwop_section_names): Add loclists_dwo.
6560 (dwop_section_names): Add .debug_loclists.dwo.
6561 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
6562 (struct dwarf2_per_cu_data): Add dwarf_version.
6563 (struct dwo_sections): Add loclists.
6564 (struct attr_abbrev): Add implicit_const.
6565 (read_indirect_line_string): New declaration.
6566 (read_unsigned_leb128): Delete declaration.
6567 (rcuh_kind): New definition.
6568 (read_and_check_comp_unit_head): Change parameter
6569 is_debug_types_section to section_kind.
6570 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
6571 (read_comp_unit_head): Change parameter abfd to section, add parameter
6572 section_kind. Handle DWARF-5.
6573 (error_check_comp_unit_head): Accept also DWARF version 5.
6574 (read_and_check_comp_unit_head): Change parameter
6575 is_debug_types_section to section_kind.
6576 (read_and_check_type_unit_head): Delete function.
6577 (read_abbrev_offset): Handle DWARF-5.
6578 (create_debug_type_hash_table): Add parameter section_kind. Process
6579 only DW_UT_type. Use signature and type_offset_in_tu from struct
6580 comp_unit_head.
6581 (create_debug_types_hash_table): Update create_debug_type_hash_table
6582 caller.
6583 (create_all_type_units): Call create_debug_type_hash_table.
6584 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
6585 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
6586 caller.
6587 (skip_one_die): Handle DW_FORM_implicit_const.
6588 (dwarf2_rnglists_process): New function.
6589 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
6590 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
6591 (read_attribute_value): Handle DW_FORM_implicit_const,
6592 DW_FORM_line_strp.
6593 (read_attribute): Handle DW_FORM_implicit_const.
6594 (read_indirect_string_at_offset_from): New function from
6595 read_indirect_string_at_offset.
6596 (read_indirect_string_at_offset): Call
6597 read_indirect_string_at_offset_from.
6598 (read_indirect_line_string_at_offset): New function.
6599 (read_indirect_string): New function comment.
6600 (read_indirect_line_string): New function.
6601 (read_unsigned_leb128): Make it global.
6602 (dwarf2_string_attr): Handle DWARF-5.
6603 (add_include_dir_stub, read_formatted_entries): New functions.
6604 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
6605 Handle DWARF-5.
6606 (per_cu_header_read_in): Update read_comp_unit_head caller.
6607 (dwarf2_version): New function.
6608 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
6609 rnglists.
6610 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
6611 fields.
6612
6613 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6614
6615 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
6616
6617 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6618
6619 * dwarf2read.c (dwarf2_ranges_process): New function from
6620 dwarf2_ranges_read.
6621 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
6622 dwarf2_ranges_process.
6623
6624 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6625
6626 * dwarf2read.c (create_debug_type_hash_table): New function from
6627 create_debug_types_hash_table.
6628 (create_debug_types_hash_table): Call create_debug_type_hash_table.
6629 (create_all_type_units, open_and_init_dwo_file): Update
6630 create_debug_types_hash_table callers.
6631
6632 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
6633
6634 PR gdb/16188
6635 * fork-child.c (trace_start_error): Fix thinko. va_end should
6636 refer to 'ap', not 'args'.
6637
6638 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
6639 Pedro Alves <palves@redhat.com>
6640
6641 PR gdb/16188
6642 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
6643 calls succeeded.
6644 * fork-child.c (trace_start_error): New function.
6645 (trace_start_error_with_name): Likewise.
6646 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
6647 * inf-ptrace.c (inf_ptrace_me): Likewise.
6648 * inferior.h (trace_start_error): New prototype.
6649 (trace_start_error_with_name): Likewise.
6650
6651 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
6652
6653 PR gdb/21164
6654 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
6655 NULL before using it.
6656 * symmisc.c (maintenance_print_symbols): Likewise.
6657 (maintenance_print_msymbols): Likewise.
6658
6659 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6660
6661 * NEWS: Add record Python bindings entry.
6662
6663 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6664
6665 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
6666 py-record-full.o.
6667 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
6668 * python/py-record-btrace.c, python/py-record-btrace.h,
6669 python/py-record-full.c, python/py-record-full.h: New file.
6670 * python/py-record.c: Add include for py-record-btrace.h and
6671 py-record-full.h.
6672 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
6673 recpy_instruction_history, recpy_function_call_history, recpy_begin,
6674 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
6675 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
6676 New definition.
6677 (gdbpy_initialize_btrace): New export.
6678 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
6679
6680 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6681
6682 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
6683 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
6684 * python/py-record.c: New file.
6685 * python/python-internal.h (gdbpy_start_recording,
6686 gdbpy_current_recording, gdpy_stop_recording,
6687 gdbpy_initialize_record): New export.
6688 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
6689 (python_GdbMethods): Add gdbpy_start_recording,
6690 gdbpy_current_recording and gdbpy_stop_recording.
6691
6692 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6693
6694 * record-btrace.c (record_btrace_record_method): New function.
6695 (init_record_btrace_ops): Initialize to_record_method.
6696 * record-full.c (record_full_record_method): New function.
6697 (init_record_full_ops, init_record_full_core_ops): Add
6698 record_full_record_method.
6699 * record.h (enum record_method): New enum.
6700 * target-debug.h (target_debug_print_enum_record_method: New define.
6701 * target-delegates.c: Regenerate.
6702 * target.c (target_record_method): New function.
6703 * target.h: Include record.h.
6704 (struct target_ops) <to_record_method>: New field.
6705 (target_record_method): New export.
6706
6707 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6708
6709 * record.h (record_start, record_stop): New export.
6710 * record.c (record_start, record_stop): New function.
6711
6712 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6713
6714 * btrace.c (btrace_fetch): Copy function call segments pointer
6715 into a vector.
6716 (btrace_clear): Clear the vector.
6717 (btrace_find_insn_by_number): Use binary search to find the correct
6718 function call segment.
6719 * btrace.h (brace_fun_p): New typedef.
6720 (struct btrace_thread_info) <functions>: New field.
6721
6722 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6723
6724 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
6725 * btrace.c (btrace_decode_error): ... here. New function.
6726 * btrace.h (btrace_decode_error): New export.
6727
6728 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
6729
6730 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
6731 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
6732 btrace_find_insn_by_number): Remove special case for gaps.
6733 * btrace.h (btrace_insn_get_error): New export.
6734 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
6735 * record-btrace.c (btrace_insn_history): Print number for gaps.
6736 (record_btrace_info, record_btrace_goto): Handle gaps.
6737
6738 2017-02-14 Tom Tromey <tom@tromey.com>
6739
6740 PR python/13598:
6741 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
6742 event.
6743 * python/py-evts.c (gdbpy_initialize_py_events): Add
6744 before_prompt registry.
6745 * python/py-events.h (events_object) <before_prompt>: New field.
6746
6747 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
6748
6749 * btrace.c (ftrace_new_switch): Preserve up link and flags.
6750
6751 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
6752
6753 * symfile (_initialize_symfile): Add usage text to the load command's
6754 help text.
6755
6756 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
6757
6758 * utils.c (defaulted_query): Don't query on secondary UIs.
6759
6760 2017-02-10 Tom Tromey <tom@tromey.com>
6761
6762 * rust-lang.c (rust_get_disr_info): Remove unused variable.
6763
6764 2017-02-10 Tom Tromey <tom@tromey.com>
6765
6766 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
6767 "cleanup" local.
6768 * python/py-type.c (typy_legacy_template_argument): Remove
6769 unnecessary "cleanup" local.
6770
6771 2017-02-10 Tom Tromey <tom@tromey.com>
6772
6773 * python/python.c (do_start_initialization): New function, from
6774 _initialize_python.
6775 (_initialize_python): Call do_start_initialization.
6776 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
6777 goto.
6778
6779 2017-02-10 Tom Tromey <tom@tromey.com>
6780
6781 * python/py-prettyprint.c (pretty_print_one_value): Use
6782 gdbpy_ref.
6783
6784 2017-02-10 Tom Tromey <tom@tromey.com>
6785
6786 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
6787 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
6788 gdbpy_ref.
6789 * python/py-type.c (field_new): Use gdbpy_ref.
6790 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
6791 gdbpy_ref.
6792 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
6793 (py_free_pspace): Likewise.
6794 (pspace_to_pspace_object): Likewise.
6795 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
6796 (py_free_objfile): Likewise.
6797 (objfile_to_objfile_object): Likewise.
6798 * python/py-inferior.c (delete_thread_object): Use
6799 gdbpy_ref.
6800 (infpy_read_memory): Likewise.
6801 (py_free_inferior): Likewise.
6802 * python/py-evtregistry.c (create_eventregistry_object): Use
6803 gdbpy_ref.
6804 * python/py-event.c (create_event_object): Use gdbpy_ref.
6805
6806 2017-02-10 Tom Tromey <tom@tromey.com>
6807
6808 * python/py-ref.h (gdbpy_ref_policy): Now a template.
6809 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
6810 used.
6811 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
6812 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
6813 python/py-exitedevent.c, python/py-finishbreakpoint.c,
6814 python/py-framefilter.c, python/py-function.c,
6815 python/py-inferior.c, python/py-infevents.c,
6816 python/py-linetable.c, python/py-newobjfileevent.c,
6817 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
6818 python/py-signalevent.c, python/py-stopevent.c,
6819 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
6820 python/py-unwind.c, python/py-utils.c, python/py-value.c,
6821 python/py-varobj.c, python/py-xmethods.c, python/python.c,
6822 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
6823
6824 2017-02-10 Tom Tromey <tom@tromey.com>
6825
6826 * ui-out.h (ui_out_emit_type): New class.
6827 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
6828 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
6829 and ui_out_emit_tuple.
6830 (enumerate_locals): Likewise.
6831 (py_mi_print_variables, py_print_locals, py_print_args): Use
6832 ui_out_emit_list.
6833 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
6834 ui_out_emit_list.
6835 * common/gdb_optional.h: New file.
6836
6837 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
6838
6839 * MAINTAINERS (Write After Approval): Update my e-mail address.
6840
6841 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
6842
6843 PR gdb/21122
6844 * breakpoint.c (_initialize_breakpoint): Update the help description
6845 of the 'commands' command to indicate that it takes a list argument.
6846
6847 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
6848
6849 * interps.c (current_interp_set_logging): Remove "return".
6850
6851 2017-02-09 Gary Benson <gbenson@redhat.com>
6852
6853 * symtab.c (add_symtab_completions): Prevent NULL pointer
6854 dereference.
6855
6856 2017-02-08 Pedro Alves <palves@redhat.com>
6857
6858 * interps.c (interp::interp): Remove reference to quiet_p.
6859 (interp_set): Make static. Remove dead "Switching to" output
6860 code.
6861 (interp_quiet_p, interp_set_quiet): Delete.
6862 (interpreter_exec_cmd): Don't set the interpreter quiet.
6863 * interps.h (interp_quiet_p): Make static.
6864 (class interp) <quiet_p>: Remove field
6865
6866 2017-02-08 Jerome Guitton <guitton@adacore.com>
6867
6868 * cli/cli-decode.c (find_command_name_length): Make it extern.
6869 * cli/cli-decode.h (find_command_name_length): Declare.
6870 * cli/cli-script.c (command_name_equals, line_first_arg):
6871 New functions.
6872 (process_next_line): Use cli-decode to parse command names.
6873 (build_command_line): Make args a constant pointer.
6874
6875 2017-02-08 Jerome Guitton <guitton@adacore.com>
6876
6877 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
6878 Remove case-insensitive search.
6879
6880 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
6881
6882 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
6883 at the end of the line. Avoids an ARI warning.
6884
6885 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
6886
6887 * NEWS: Mention support for record/replay of Intel 64 rdrand and
6888 rdseed instructions.
6889 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
6890
6891 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
6892
6893 PR tdep/20936
6894 Provide and use sparc32 and sparc64 target description XML files.
6895 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
6896 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
6897 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
6898 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
6899 * features/sparc/sparc32-solaris.xml: New file.
6900 * features/sparc/sparc64-solaris.xml: New file.
6901 * features/sparc/sparc32-solaris.c: Generated.
6902 * features/sparc/sparc64-solaris.c: Generated.
6903 * sparc-tdep.h: Account for differences in target descriptions.
6904 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
6905 (sparc32_register_type): Use target provided registers.
6906 (validate_tdesc_registers): New function.
6907 (sparc32_gdbarch_init): Use tdesc_has_registers.
6908 Set pseudoregister functions.
6909 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
6910 (sparc64_register_type): Use target provided registers.
6911 (sparc64_init_abi): Set pseudoregister functions.
6912
6913 2017-02-03 Tom Tromey <tom@tromey.com>
6914
6915 PR rust/21097:
6916 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
6917 with a single member.
6918
6919 2017-02-03 Pedro Alves <palves@redhat.com>
6920
6921 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
6922 (cli_interp_base::~cli_interp_base): New.
6923 (cli_interp): New struct.
6924 (as_cli_interp): Cast the interp itself to cli_interp.
6925 (cli_interpreter_pre_command_loop): Rename to ...
6926 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
6927 parameter.
6928 (cli_interpreter_init): Rename to ...
6929 (cli_interp::init): ... this. Remove 'self' parameter. Use
6930 boolean. Make extern.
6931 (cli_interpreter_resume): Rename to ...
6932 (cli_interp::resume): ... this. Remove 'data' parameter. Make
6933 extern.
6934 (cli_interpreter_suspend): Rename to ...
6935 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
6936 extern.
6937 (cli_interpreter_exec): Rename to ...
6938 (cli_interp::exec): ... this. Remove 'data' parameter. Make
6939 extern.
6940 (cli_interpreter_supports_command_editing): Rename to ...
6941 (cli_interp_base::supports_command_editing): ... this. Remove
6942 'interp' parameter. Make extern.
6943 (cli_ui_out): Rename to ...
6944 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
6945 Make extern.
6946 (cli_set_logging): Rename to ...
6947 (cli_interp_base::set_logging): ... this. Remove 'interp'
6948 parameter. Make extern.
6949 (cli_interp_procs): Delete.
6950 (cli_interp_factory): Adjust to use "new".
6951 * cli/cli-interp.h: Include "interps.h".
6952 (struct cli_interp_base): New struct.
6953 * interps.c (struct interp): Delete. Fields moved to interps.h.
6954 (interp_new): Delete.
6955 (interp::interp, interp::~interp): New.
6956 (interp_set): Use bool, and return void. Assume the interpreter
6957 has suspend, init and resume methods, and that the all return
6958 void.
6959 (set_top_level_interpreter): interp_set returns void.
6960 (interp_ui_out): Adapt.
6961 (current_interp_set_logging): Adapt.
6962 (interp_data): Delete.
6963 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
6964 (interp_exec): Adapt.
6965 (top_level_interpreter_data): Delete.
6966 * interps.h (interp_init_ftype, interp_resume_ftype)
6967 (interp_suspend_ftype, interp_exec_ftype)
6968 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
6969 (class interp): New.
6970 (interp_new): Delete.
6971 (interp_set): Now returns void. Use bool.
6972 (interp_data, top_level_interpreter_data): Delete.
6973 * mi/mi-common.h: Include interps.h.
6974 (class mi_interp): Inherit from interp. Define a ctor. Declare
6975 init, resume, suspect, exec, interp_ui_out, set_logging and
6976 pre_command_loop methods.
6977 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
6978 (mi_interpreter_init): Rename to ...
6979 (mi_interp::init): ... this. Remove the 'interp' parameter, use
6980 bool, return void and make extern. Adjust.
6981 (mi_interpreter_resume): ... Rename to ...
6982 (mi_interp::resume): ... this. Remove the 'data' parameter,
6983 return void and make extern. Adjust.
6984 (mi_interpreter_suspend): ... Rename to ...
6985 (mi_interp::suspend): ... this. Remove the 'data' parameter,
6986 return void and make extern. Adjust.
6987 (mi_interpreter_exec): ... Rename to ...
6988 (mi_interp::exec): ... this. Remove the 'data' parameter and make
6989 extern. Adjust.
6990 (mi_interpreter_pre_command_loop): ... Rename to ...
6991 (mi_interp::pre_command_loop): ... this. Remove the 'self'
6992 parameter and make extern.
6993 (mi_on_normal_stop_1): Adjust.
6994 (mi_ui_out): Rename to ...
6995 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
6996 parameter and make extern. Adjust.
6997 (mi_set_logging): Rename to ...
6998 (mi_interp::set_logging): ... this. Remove the 'interp'
6999 parameter and make extern. Adjust.
7000 (mi_interp_procs): Delete.
7001 (mi_interp_factory): Adjust to use 'new'.
7002 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
7003 (mi_print_exception, mi_execute_command, mi_load_progress):
7004 Adjust.
7005 * tui/tui-interp.c (tui_interp): New class.
7006 (as_tui_interp): Return a tui_interp pointer.
7007 (tui_on_normal_stop, tui_on_signal_received)
7008 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
7009 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
7010 to use interp::interp_ui_out.
7011 (tui_init): Rename to ...
7012 (tui_interp::init): ... this. Remove the 'self' parameter, use
7013 bool, return void and make extern. Adjust.
7014 (tui_resume): Rename to ...
7015 (tui_interp::resume): ... this. Remove the 'data' parameter,
7016 return void and make extern. Adjust.
7017 (tui_suspend): Rename to ...
7018 (tui_interp::suspend): ... this. Remove the 'data' parameter,
7019 return void and make extern. Adjust.
7020 (tui_ui_out): Rename to ...
7021 (tui_interp::interp_ui_out): ... this. Remove the 'self'
7022 parameter, and make extern. Adjust.
7023 (tui_exec): Rename to ...
7024 (tui_interp::exec): ... this. Remove the 'data' parameter and
7025 make extern.
7026 (tui_interp_procs): Delete.
7027 (tui_interp_factory): Use "new".
7028
7029 2017-02-02 Tom Tromey <tom@tromey.com>
7030
7031 * rust-exp.y (ends_raw_string, space_then_number)
7032 (rust_identifier_start_p): Return bool.
7033 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
7034 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
7035 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
7036 (rust_chartype_p): Return bool.
7037 (val_print_struct, rust_print_struct_def, rust_print_type):
7038 Update.
7039 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
7040 Return bool.
7041
7042 2017-02-02 Tom Tromey <tom@tromey.com>
7043
7044 * rust-lang.c: Reindent.
7045
7046 2017-02-02 Tom Tromey <tom@tromey.com>
7047
7048 * rust-lang.h (rust_crate_for_block): Update.
7049 * rust-lang.c (rust_crate_for_block): Return std::string.
7050 (rust_get_disr_info): Use std:;string, not
7051 gdb::unique_xmalloc_ptr.
7052 * rust-exp.y (crate_name): Update.
7053
7054 2017-02-02 Pedro Alves <palves@redhat.com>
7055
7056 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
7057 field out of gdb_disassembler_test and make it static.
7058
7059 2017-02-02 Pedro Alves <palves@redhat.com>
7060
7061 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
7062 mi1_interp and mi_interp fields.
7063
7064 2017-02-02 Pedro Alves <palves@redhat.com>
7065
7066 * cli/cli-interp.c (struct saved_output_files, saved_output):
7067 Moved from cli/cli-logging.c.
7068 (cli_set_logging): New function.
7069 (cli_interp_procs): Install cli_set_logging.
7070 * cli/cli-interp.h (make_logging_output, cli_set_logging):
7071 Declare.
7072 * cli/cli-logging.c (struct saved_output_files, saved_output):
7073 Moved to cli/cli-interp.c.
7074 (pop_output_files): Don't save outputs here.
7075 (make_logging_output): New function.
7076 (handle_redirections): Don't build tee nor save previous outputs
7077 here.
7078 * interps.c (current_interp_set_logging): Change prototype.
7079 Assume there's always a set_logging_proc method installed.
7080 * interps.h (interp_set_logging_ftype): Change prototype.
7081 (current_interp_set_logging): Change prototype and adjust comment.
7082 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
7083 use make_logging_output.
7084 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
7085 2017-02-02 Pedro Alves <palves@redhat.com>
7086
7087 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
7088 from ...
7089 (set_logging_overwrite): ... here.
7090 (logging_no_redirect_file): Delete.
7091 (set_logging_redirect): Don't handle redirection on the fly.
7092 Instead warn that "logging off" / "logging on" is necessary.
7093 (pop_output_files): Delete references to logging_no_redirect_file.
7094 (show_logging_command): Always speak in terms of what will happen
7095 once logging is reenabled.
7096
7097 2017-02-02 Pedro Alves <palves@redhat.com>
7098
7099 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
7100
7101 2017-02-02 Pedro Alves <palves@redhat.com>
7102
7103 * disasm.c (gdb_pretty_print_insn): Rename to ...
7104 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
7105 Remove gdbarch parameter. Adapt to clear the object's buffers
7106 instead of allocating new buffers, and to print using the object's
7107 gdb_disassembler instead of calling gdb_print_insn.
7108 (dump_insns): Use gdb_pretty_print_disassembler.
7109 * disasm.h (gdb_pretty_print_insn): Delete declaration.
7110 (gdb_pretty_print_disassembler): New class.
7111 * record-btrace.c (btrace_insn_history): Use
7112 gdb_pretty_print_disassembler.
7113
7114 2017-02-02 Pedro Alves <palves@redhat.com>
7115
7116 * ada-lang.c (type_as_string): Use string_file.
7117 * ada-valprint.c (ada_print_floating): Use string_file.
7118 * ada-varobj.c (ada_varobj_scalar_image)
7119 (ada_varobj_get_value_image): Use string_file.
7120 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
7121 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
7122 * breakpoint.c (update_inserted_breakpoint_locations)
7123 (insert_breakpoint_locations, reattach_breakpoints)
7124 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
7125 (print_it_watchpoint): Use string_file.
7126 (save_breakpoints): Use stdio_file.
7127 * c-exp.y (oper): Use string_file.
7128 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
7129 tee_file.
7130 (pop_output_files): Use delete.
7131 (handle_redirections): Use stdio_file and tee_file.
7132 * cli/cli-setshow.c (do_show_command): Use string_file.
7133 * compile/compile-c-support.c (c_compute_program): Use
7134 string_file.
7135 * compile/compile-c-symbols.c (generate_vla_size): Take a
7136 'string_file &' instead of a 'ui_file *'.
7137 (generate_c_for_for_one_variable): Take a 'string_file &' instead
7138 of a 'ui_file *'. Use string_file.
7139 (generate_c_for_variable_locations): Take a 'string_file &'
7140 instead of a 'ui_file *'.
7141 * compile/compile-internal.h (generate_c_for_for_one_variable):
7142 Take a 'string_file &' instead of a 'ui_file *'.
7143 * compile/compile-loc2c.c (push, pushf, unary, binary)
7144 (print_label, pushf_register_address, pushf_register)
7145 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
7146 'ui_file *'. Adjust.
7147 * compile/compile.c (compile_to_object): Use string_file.
7148 * compile/compile.h (compile_dwarf_expr_to_c)
7149 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
7150 'ui_file *'.
7151 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
7152 (replace_typedefs_qualified_name): Use string_file and
7153 obstack_copy0.
7154 * disasm.c (gdb_pretty_print_insn): Use string_file.
7155 (gdb_disassembly): Adjust reference the null_stream global.
7156 (do_ui_file_delete): Delete.
7157 (gdb_insn_length): Use null_stream.
7158 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
7159 * dwarf2loc.c (dwarf2_compile_property_to_c)
7160 (locexpr_generate_c_location, loclist_generate_c_location): Take a
7161 'string_file &' instead of a 'ui_file *'.
7162 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
7163 * dwarf2read.c (do_ui_file_peek_last): Delete.
7164 (dwarf2_compute_name): Use string_file.
7165 * event-top.c (gdb_setup_readline): Use stdio_file.
7166 * gdbarch.sh (verify_gdbarch): Use string_file.
7167 * gdbtypes.c (safe_parse_type): Use null_stream.
7168 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
7169 string_file.
7170 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
7171 'string_file *' instead of a 'ui_file *'.
7172 (gdbscm_arch_disassemble): Use string_file.
7173 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
7174 * guile/scm-ports.c (class ioscm_file_port): Now a class that
7175 inherits from ui_file.
7176 (ioscm_file_port_delete, ioscm_file_port_rewind)
7177 (ioscm_file_port_put): Delete.
7178 (ioscm_file_port_write): Rename to ...
7179 (ioscm_file_port::write): ... this. Remove file_port_magic
7180 checks.
7181 (ioscm_file_port_new): Delete.
7182 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
7183 ui_file_up.
7184 * guile/scm-type.c (tyscm_type_name): Use string_file.
7185 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
7186 Use string_file.
7187 * infcmd.c (print_return_value_1): Use string_file.
7188 * infrun.c (print_target_wait_results): Use string_file.
7189 * language.c (add_language): Use string_file.
7190 * location.c (explicit_to_string_internal): Use string_file.
7191 * main.c (captured_main_1): Use null_file.
7192 * maint.c (maintenance_print_architecture): Use stdio_file.
7193 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
7194 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
7195 event_channel>: Change type to mi_console_file pointer.
7196 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
7197 (mi_console_file_delete): Delete.
7198 (struct mi_console_file): Delete.
7199 (mi_console_file_magic): Delete.
7200 (mi_console_file_new): Delete.
7201 (mi_console_file::mi_console_file): New.
7202 (mi_console_file_delete): Delete.
7203 (mi_console_file_fputs): Delete.
7204 (mi_console_file::write): New.
7205 (mi_console_raw_packet): Delete.
7206 (mi_console_file::flush): New.
7207 (mi_console_file_flush): Delete.
7208 (mi_console_set_raw): Rename to ...
7209 (mi_console_file::set_raw): ... this.
7210 * mi/mi-console.h (class mi_console_file): New class.
7211 (mi_console_file_new, mi_console_set_raw): Delete.
7212 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
7213 (mi_set_logging): Use delete and tee_file. Adjust.
7214 * mi/mi-main.c (output_register): Use string_file.
7215 (mi_cmd_data_evaluate_expression): Use string_file.
7216 (mi_cmd_data_read_memory): Use string_file.
7217 (mi_cmd_execute, print_variable_or_computed): Use string_file.
7218 * mi/mi-out.c (mi_ui_out::main_stream): New.
7219 (mi_ui_out::rewind): Use main_stream and
7220 string_file.
7221 (mi_ui_out::put): Use main_stream and string_file.
7222 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
7223 Allocate a 'string_file' instead.
7224 (mi_out_new): Don't allocate a mem_fileopen stream here.
7225 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
7226 (mi_ui_out::main_stream): Declare method.
7227 * printcmd.c (eval_command): Use string_file.
7228 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
7229 * python/py-arch.c (archpy_disassemble): Use string_file.
7230 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
7231 * python/py-frame.c (frapy_str): Use string_file.
7232 * python/py-framefilter.c (py_print_type, py_print_single_arg):
7233 Use string_file.
7234 * python/py-type.c (typy_str): Use string_file.
7235 * python/py-unwind.c (unwind_infopy_str): Use string_file.
7236 * python/py-value.c (valpy_str): Use string_file.
7237 * record-btrace.c (btrace_insn_history): Use string_file.
7238 * regcache.c (regcache_print): Use stdio_file.
7239 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
7240 * remote.c (escape_buffer): Use string_file.
7241 * rust-lang.c (rust_get_disr_info): Use string_file.
7242 * serial.c (serial_open_ops_1): Use stdio_file.
7243 (do_serial_close): Use delete.
7244 * stack.c (print_frame_arg): Use string_file.
7245 (print_frame_args): Remove local mem_fileopen stream, not used.
7246 (print_frame): Use string_file.
7247 * symmisc.c (maintenance_print_symbols): Use stdio_file.
7248 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
7249 Take a 'string_file *' instead of a 'ui_file *'.
7250 * top.c (new_ui): Use stdio_file and stderr_file.
7251 (free_ui): Use delete.
7252 (execute_command_to_string): Use string_file.
7253 (quit_confirm): Use string_file.
7254 * tracepoint.c (collection_list::append_exp): Use string_file.
7255 * tui/tui-disasm.c (tui_disassemble): Use string_file.
7256 * tui/tui-file.c: Don't include "ui-file.h".
7257 (enum streamtype, struct tui_stream): Delete.
7258 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
7259 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
7260 (tui_file::tui_file): New method.
7261 (tui_file_fputs): Delete.
7262 (tui_file_get_strbuf): Delete.
7263 (tui_file::puts): New method.
7264 (tui_file_adjust_strbuf): Delete.
7265 (tui_file_flush): Delete.
7266 (tui_file::flush): New method.
7267 * tui/tui-file.h: Tweak intro comment.
7268 Include ui-file.h.
7269 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
7270 (tui_file_adjust_strbuf): Delete declarations.
7271 (class tui_file): New class.
7272 * tui/tui-io.c (tui_initialize_io): Use tui_file.
7273 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
7274 (tui_register_format): Use string_stream.
7275 * tui/tui-stack.c (tui_make_status_line): Use string_file.
7276 (tui_get_function_from_frame): Use string_file.
7277 * typeprint.c (type_to_string): Use string_file.
7278 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
7279 (null_stream): New global.
7280 (ui_file_delete): Delete.
7281 (ui_file::ui_file): New.
7282 (null_file_isatty): Delete.
7283 (ui_file::~ui_file): New.
7284 (null_file_rewind): Delete.
7285 (ui_file::printf): New.
7286 (null_file_put): Delete.
7287 (null_file_flush): Delete.
7288 (ui_file::putstr): New.
7289 (null_file_write): Delete.
7290 (ui_file::putstrn): New.
7291 (null_file_read): Delete.
7292 (ui_file::putc): New.
7293 (null_file_fputs): Delete.
7294 (null_file_write_async_safe): Delete.
7295 (ui_file::vprintf): New.
7296 (null_file_delete): Delete.
7297 (null_file::write): New.
7298 (null_file_fseek): Delete.
7299 (null_file::puts): New.
7300 (ui_file_data): Delete.
7301 (null_file::write_async_safe): New.
7302 (gdb_flush, ui_file_isatty): Adjust.
7303 (ui_file_put, ui_file_rewind): Delete.
7304 (ui_file_write): Adjust.
7305 (ui_file_write_for_put): Delete.
7306 (ui_file_write_async_safe, ui_file_read): Adjust.
7307 (ui_file_fseek): Delete.
7308 (fputs_unfiltered): Adjust.
7309 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
7310 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
7311 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
7312 (set_ui_file_data): Delete.
7313 (string_file::~string_file, string_file::write)
7314 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
7315 (do_ui_file_as_string, ui_file_as_string): Delete.
7316 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
7317 (struct mem_file): Delete.
7318 (mem_file_new): Delete.
7319 (stdio_file::stdio_file): New.
7320 (mem_file_delete): Delete.
7321 (stdio_file::stdio_file): New.
7322 (mem_fileopen): Delete.
7323 (stdio_file::~stdio_file): New.
7324 (mem_file_rewind): Delete.
7325 (stdio_file::set_stream): New.
7326 (mem_file_put): Delete.
7327 (stdio_file::open): New.
7328 (mem_file_write): Delete.
7329 (stdio_file_magic, struct stdio_file): Delete.
7330 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
7331 (stdio_file::flush): New.
7332 (stdio_file_read): Rename to ...
7333 (stdio_file::read): ... this. Adjust.
7334 (stdio_file_write): Rename to ...
7335 (stdio_file::write): ... this. Adjust.
7336 (stdio_file_write_async_safe): Rename to ...
7337 (stdio_file::write_async_safe) ... this. Adjust.
7338 (stdio_file_fputs): Rename to ...
7339 (stdio_file::puts) ... this. Adjust.
7340 (stdio_file_isatty): Delete.
7341 (stdio_file_fseek): Delete.
7342 (stdio_file::isatty): New.
7343 (stderr_file_write): Rename to ...
7344 (stderr_file::write) ... this. Adjust.
7345 (stderr_file_fputs): Rename to ...
7346 (stderr_file::puts) ... this. Adjust.
7347 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
7348 (stderr_file::stderr_file): New.
7349 (tee_file_magic): Delete.
7350 (struct tee_file): Delete.
7351 (tee_file::tee_file): New.
7352 (tee_file_new): Delete.
7353 (tee_file::~tee_file): New.
7354 (tee_file_delete): Delete.
7355 (tee_file_flush): Rename to ...
7356 (tee_file::flush): ... this. Adjust.
7357 (tee_file_write): Rename to ...
7358 (tee_file::write): ... this. Adjust.
7359 (tee_file::write_async_safe): New.
7360 (tee_file_fputs): Rename to ...
7361 (tee_file::puts): ... this. Adjust.
7362 (tee_file_isatty): Rename to ...
7363 (tee_file::isatty): ... this. Adjust.
7364 * ui-file.h (struct obstack, struct ui_file): Don't
7365 forward-declare.
7366 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
7367 (ui_file_write_ftype)
7368 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
7369 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
7370 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
7371 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
7372 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
7373 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
7374 (set_ui_file_fseek): Delete.
7375 (ui_file_data, ui_file_delete, ui_file_rewind)
7376 (struct ui_file): New.
7377 (ui_file_up): New.
7378 (class null_file): New.
7379 (null_stream): Declare.
7380 (ui_file_write_for_put, ui_file_put): Delete.
7381 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
7382 Delete.
7383 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
7384 (gdb_fopen, tee_file_new): Delete.
7385 (struct string_file): New.
7386 (struct stdio_file): New.
7387 (stdio_file_up): New.
7388 (struct stderr_file): New.
7389 (class tee_file): New.
7390 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
7391 of a 'ui_file *'. Adjust.
7392 * ui-out.h (class ui_out) <field_stream>: Likewise.
7393 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
7394 (null_stream): Delete.
7395 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
7396 Adjust.
7397 * utils.h (struct ui_file): Delete forward declaration..
7398 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
7399 (error_stream): Take a 'string_file &' instead of a
7400 'ui_file *'.
7401 * varobj.c (varobj_value_get_print_value): Use string_file.
7402 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
7403 * gdbarch.c: Regenerate.
7404
7405 2017-02-02 Pedro Alves <palves@redhat.com>
7406
7407 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
7408 (gdb_pretty_print_insn): ... this. Now a free function. Add back
7409 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
7410 Adjust to call gdb_print_insn instead of
7411 gdb_disassembler::print_insn.
7412 (dump_insns, do_mixed_source_and_assembly_deprecated)
7413 (do_mixed_source_and_assembly, do_assembly_only): Add back a
7414 'gdbarch' parameter. Remove gdb_disassembler parameter.
7415 (gdb_disassembly): Don't allocate a gdb_disassembler here.
7416 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
7417 declaration.
7418 (gdb_pretty_print_insn): Re-add declaration.
7419 * record-btrace.c (btrace_insn_history): Don't allocate a
7420 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
7421
7422 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
7423
7424 * disasm.h (gdb_disassembly): Remove file_string parameter.
7425 * disasm.c (gdb_disassembly): Likewise.
7426 * cli/cli-cmds.c (print_disassembly): Adapt.
7427 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
7428 * stack.c (do_gdb_disassembly): Likewise.
7429
7430 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
7431
7432 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
7433 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
7434 targets. And if the implicit value is longer than needed, extract
7435 the first bytes instead of the "least significant" ones.
7436
7437 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
7438
7439 * btrace.c (btrace_enable): Do not call btrace_add_pc for
7440 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
7441 (btrace_fetch): Assert can_access_registers_ptid.
7442 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
7443 validate_registers_access.
7444
7445 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
7446
7447 * gdbthread.h (can_access_registers_ptid): New.
7448 * thread.c (can_access_registers_ptid): New.
7449
7450 2017-02-01 Pedro Alves <palves@redhat.com>
7451
7452 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
7453
7454 2017-01-31 Pedro Alves <palves@redhat.com>
7455
7456 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
7457 Fix typos.
7458
7459 2017-01-31 Pedro Alves <palves@redhat.com>
7460
7461 * stack.c (print_frame_args): Remove local mem_fileopen stream,
7462 not used.
7463
7464 2017-01-31 Pedro Alves <palves@redhat.com>
7465
7466 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
7467
7468 2017-01-31 Pedro Alves <palves@redhat.com>
7469
7470 * common/scoped_restore.h
7471 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
7472 change the value's parameter type to T2.
7473 (make_scoped_restore): Likewise.
7474
7475 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7476 Richard Henderson <rth@redhat.com>
7477
7478 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
7479 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
7480 GS_BASE for older kernels.
7481 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
7482 GS_BASE for older kernels.
7483 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
7484 and GS_BASE to the offset table.
7485 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
7486 system register group.
7487 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
7488 for older kernels.
7489 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
7490 amd64 ABI.
7491 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
7492 AMD64_GSBASE_REGNUM.
7493 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
7494 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
7495 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
7496 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
7497 i386/64bit-segments.xml in those rules.
7498 * features/i386/64bit-segments.xml: New file.
7499 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
7500 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
7501 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
7502 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
7503 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
7504 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
7505 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
7506 * features/i386/amd64-avx-linux.c: Regenerated.
7507 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
7508 * features/i386/amd64-avx-mpx.c: Regenerated.
7509 * features/i386/amd64-avx512-linux.c: Regenerated.
7510 * features/i386/amd64-linux.c: Regenerated.
7511 * features/i386/amd64-mpx-linux.c: Regenerated.
7512 * features/i386/i386-avx-mpx-linux.c: Regenerated.
7513 * features/i386/i386-avx-mpx.c: Regenerated.
7514 * features/i386/x32-avx-linux.c: Regenerated.
7515 * features/i386/x32-avx512-linux.c: Regenerated.
7516 * regformats/i386/amd64-avx-linux.dat: Regenerated.
7517 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
7518 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
7519 * regformats/i386/amd64-linux.dat: Regenerated.
7520 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
7521 * regformats/i386/x32-avx-linux.dat: Regenerated.
7522 * regformats/i386/x32-avx512-linux.dat: Regenerated.
7523 * regformats/i386/x32-linux.dat: Regenerated.
7524
7525 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7526
7527 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
7528 Set to AMD64_NUM_REGS.
7529
7530 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
7531
7532 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
7533 that checks validity of a register number.
7534
7535 2017-01-27 Kees Cook <keescook@google.com>
7536
7537 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
7538 fetch_fpregs if target has fpa registers.
7539 (arm_linux_store_inferior_registers): Call store_fpregs if target
7540 has fpa registers.
7541
7542 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
7543
7544 * cris-tdep.c (cris_gdbarch_init): Remove check for
7545 info.byte_order and force it to BFD_ENDIAN_LITTLE.
7546
7547 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
7548
7549 * corelow.c (get_core_register_section): Check for regset
7550 existence before checking for REGSET_VARIABLE_SIZE.
7551
7552 2017-01-26 Yao Qi <yao.qi@linaro.org>
7553 Pedro Alves <palves@redhat.com>
7554
7555 PR gdb/20939
7556 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
7557 call memory_error, save memaddr instead.
7558 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
7559 negative, cal memory_error.
7560 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
7561
7562 2017-01-26 Yao Qi <yao.qi@linaro.org>
7563
7564 * disasm-selftests.c (memory_error_test): New function.
7565 (_initialize_disasm_selftests): Register memory_error_test.
7566
7567 2017-01-26 Yao Qi <yao.qi@linaro.org>
7568
7569 * Makefile.in (SFILES): Add disasm-selftests.c and
7570 selftest-arch.c.
7571 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
7572 * disasm-selftests.c: New file.
7573 * selftest-arch.c: New file.
7574 * selftest-arch.h: New file.
7575
7576 2017-01-26 Yao Qi <yao.qi@linaro.org>
7577
7578 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
7579 to bfd_arch_mep. Don't return 0 if section is not
7580 found. Call print_insn_mep.
7581
7582 2017-01-26 Pedro Alves <palves@redhat.com>
7583 Yao Qi <yao.qi@linaro.org>
7584
7585 * arm-tdep.c: Include "disasm.h".
7586 (gdb_print_insn_arm): Update code to get gdbarch.
7587 * disasm.c (dis_asm_read_memory): Change it to
7588 gdb_disassembler::dis_asm_read_memory.
7589 (dis_asm_memory_error): Likewise.
7590 (dis_asm_print_address): Likewise.
7591 (gdb_pretty_print_insn): Change it to
7592 gdb_disassembler::pretty_print_insn.
7593 (dump_insns): Add one argument gdb_disassemlber. All
7594 callers updated.
7595 (do_mixed_source_and_assembly_deprecated): Likewise.
7596 (do_mixed_source_and_assembly): Likewise.
7597 (do_assembly_only): Likewise.
7598 (gdb_disassembler::gdb_disassembler): New.
7599 (gdb_disassembler::print_insn): New.
7600 * disasm.h (class gdb_disassembler): New.
7601 (gdb_pretty_print_insn): Remove declaration.
7602 (gdb_disassemble_info): Likewise.
7603 * guile/scm-disasm.c (class gdbscm_disassembler): New.
7604 (gdbscm_disasm_read_memory_worker): Update.
7605 (gdbscm_disasm_read_memory): Update.
7606 (gdbscm_disasm_memory_error): Remove.
7607 (gdbscm_disasm_print_address): Remove.
7608 (gdbscm_disassembler::gdbscm_disassembler): New.
7609 (gdbscm_print_insn_from_port): Update.
7610 * mips-tdep.c: Include disasm.h.
7611 (gdb_print_insn_mips): Update code to get gdbarch.
7612 * record-btrace.c (btrace_insn_history): Update.
7613 * spu-tdep.c: Include disasm.h.
7614 (struct spu_dis_asm_data): Remove.
7615 (struct spu_dis_asm_info): New.
7616 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
7617 SPU id.
7618 (gdb_print_insn_spu): Cast disassemble_info to
7619 spu_dis_asm_info.
7620
7621 2017-01-26 Yao Qi <yao.qi@linaro.org>
7622
7623 * disasm.c (do_ui_file_delete): Delete.
7624 (gdb_insn_length): Move code creating stream to ...
7625 * utils.c (null_stream): ... here. New function.
7626 * utils.h (null_stream): Declare.
7627
7628 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
7629
7630 * python/py-inferior.c (find_thread_object): Return directly
7631 from the loop. Remove "found" variable.
7632
7633 2017-01-21 Joel Brobecker <brobecker@adacore.com>
7634
7635 GDB 7.12.1 released.
7636
7637 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
7638
7639 * python/py-function.c (fnpy_call): Reorder declarations to have
7640 the gdbpy_enter object declared first.
7641 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
7642
7643 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
7644
7645 PR python/21068
7646 * python/python-internal.h (PyMem_RawMalloc): Define for
7647 Python < 3.4.
7648 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
7649 PyMem_RawMalloc instead of PyMem_Malloc.
7650
7651 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
7652 Luis Machado <lgustavo@codesourcery.com>
7653
7654 * NEWS (New commands): Mention flash-erase.
7655 (New MI commands): Mention target-flash-erase.
7656 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
7657 command.
7658 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
7659 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
7660 * target.c (flash_erase_command): New function.
7661 (initialize_targets): Add new flash-erase command.
7662 * target.h (flash_erase_command): New declaration.
7663
7664 2017-01-20 Joel Brobecker <brobecker@adacore.com>
7665
7666 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
7667 HAVE_SYS_PROCFS_H is defined.
7668
7669 2017-01-18 Alan Hayward <alan.hayward@arm.com>
7670
7671 * remote.c (struct cached_reg): Change data into a pointer.
7672 * (stop_reply_dtr): Free data pointers before deleting vector.
7673 (process_stop_reply): Likewise.
7674 (remote_parse_stop_reply): Allocate space for data
7675
7676 2017-01-18 Alan Hayward <alan.hayward@arm.com>
7677
7678 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
7679 MAX_REGISTER_SIZE.
7680 (amd64_pseudo_register_read_value): Likewise.
7681 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
7682 (store_register_using_P): Likewise.
7683 * regcache.c (regcache_xfer_part): Likewise.
7684
7685 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
7686
7687 Split real and pseudo registers.
7688 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
7689 (sparc32_pseudo_regnum): New enum.
7690 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
7691 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
7692 (SPARC32_CP0_REGISTERS): New macro.
7693 (sparc32_pseudo_register_name): New function.
7694 (sparc32_register_name): Use sparc32_pseudo_register_name.
7695 (sparc32_pseudo_register_type): New function.
7696 (sparc32_register_type): Use sparc32_pseudo_register_type.
7697 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
7698 pseudo register numbers.
7699 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
7700 (SPARC64_CP0_REGISTERS): New macro.
7701 (sparc64_pseudo_register_name): New function.
7702 (sparc64_register_name): Use sparc64_pseudo_register_name.
7703 (sparc64_pseudo_register_type): New function.
7704 (sparc64_register_type): Use sparc64_pseudo_register_type.
7705 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
7706 pseudo register numbers.
7707 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
7708 sparc64_store_arguments): Handle pseudo register numbers.
7709
7710 2017-01-13 Yao Qi <yao.qi@linaro.org>
7711
7712 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
7713 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
7714 output.
7715 (getpkt_or_notif_sane_1): Likewise.
7716
7717 2017-01-13 Yao Qi <yao.qi@linaro.org>
7718
7719 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
7720 of CC. Pass "-x c++-header" instead of "-x c".
7721
7722 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
7723
7724 * remote.c (remote_can_async_p): Update comment.
7725
7726 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
7727
7728 * linux-nat.c (linux_nat_can_async_p): Update comment.
7729
7730 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
7731
7732 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
7733
7734 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
7735
7736 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
7737
7738 2017-01-10 Tom Tromey <tom@tromey.com>
7739
7740 * python/py-type.c (typy_legacy_template_argument): Update.
7741 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
7742 ~demangle_parse_info): Declare new members.
7743 (cp_demangled_name_to_comp): Return unique_ptr.
7744 (cp_demangled_name_parse_free)
7745 (make_cleanup_cp_demangled_name_parse_free)
7746 (cp_new_demangle_parse_info): Remove.
7747 * cp-support.c (do_demangled_name_parse_free_cleanup)
7748 (make_cleanup_cp_demangled_name_parse_free): Remove.
7749 (inspect_type, cp_canonicalize_string_full)
7750 (cp_canonicalize_string): Update.
7751 (mangled_name_to_comp): Change return type.
7752 (cp_class_name_from_physname, method_name_from_physname)
7753 (cp_func_name, cp_remove_params): Update.
7754 * cp-name-parser.y (demangle_parse_info): New constructor, from
7755 cp_new_demangle_parse_info.
7756 (~demangle_parse_info): New destructor, from
7757 cp_demangled_name_parse_free.
7758 (cp_merge_demangle_parse_infos): Update.
7759 (cp_demangled_name_to_comp): Change return type.
7760
7761 2017-01-10 Tom Tromey <tom@tromey.com>
7762
7763 * top.c (prevent_dont_repeat): Change return type.
7764 * python/python.c (execute_gdb_command): Use std::string.
7765 Update.
7766 * guile/guile.c (gdbscm_execute_gdb_command): Update.
7767 * command.h (prevent_dont_repeat): Change return type.
7768 * breakpoint.c (bpstat_do_actions_1): Update.
7769
7770 2017-01-10 Tom Tromey <tom@tromey.com>
7771
7772 * value.h (scoped_value_mark::~scoped_value_mark): Call
7773 free_to_mark.
7774 (scoped_value_mark::free_to_mark): New method.
7775 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
7776 scoped_value_mark.
7777
7778 2017-01-10 Tom Tromey <tom@tromey.com>
7779
7780 * python/py-value.c (valpy_dereference, valpy_referenced_value)
7781 (valpy_reference_value, valpy_const_value, valpy_get_address)
7782 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
7783 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
7784 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
7785 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
7786 scoped_value_mark.
7787 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
7788 * value.h (scoped_value_mark): New class.
7789
7790 2017-01-10 Tom Tromey <tom@tromey.com>
7791
7792 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
7793 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
7794 * psymtab.c (discard_psymtabs_upto): Remove.
7795 (make_cleanup_discard_psymtabs): Remove.
7796 (struct psymtab_state): Remove.
7797
7798 2017-01-10 Tom Tromey <tom@tromey.com>
7799
7800 * record-full.c (record_full_save_cleanups): Remove.
7801 (record_full_save): Use gdb::unlinker.
7802 * gcore.c (do_bfd_delete_cleanup): Remove.
7803 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
7804 cleanups.
7805 * dwarf2read.c (unlink_if_set): Remove.
7806 (write_psymtabs_to_index): Use gdb::unlinker.
7807 * common/gdb_unlinker.h: New file.
7808
7809 2017-01-10 Tom Tromey <tom@tromey.com>
7810
7811 * windows-tdep.c (windows_xfer_shared_library): Update.
7812 * windows-nat.c (windows_make_so): Update.
7813 * utils.h (make_cleanup_bfd_unref): Remove.
7814 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
7815 * symfile.h (symfile_bfd_open)
7816 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
7817 * symfile.c (read_symbols, symbol_file_add)
7818 (separate_debug_file_exists): Update.
7819 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
7820 (generic_load, reread_symbols): Update.
7821 * symfile-mem.c (symbol_file_add_from_memory): Update.
7822 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
7823 (spu_symbol_file_add_from_memory): Update.
7824 * solist.h (struct target_so_ops) <bfd_open>: Return
7825 gdb_bfd_ref_ptr.
7826 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
7827 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
7828 gdb_bfd_ref_ptr.
7829 (solib_map_sections, reload_shared_libraries_1): Update.
7830 * solib-svr4.c (enable_break): Update.
7831 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
7832 * solib-frv.c (enable_break2): Update.
7833 * solib-dsbt.c (enable_break): Update.
7834 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
7835 gdb_bfd_ref_ptr.
7836 (darwin_solib_get_all_image_info_addr_at_init): Update.
7837 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
7838 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
7839 * record-full.c (record_full_save): Update.
7840 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
7841 * procfs.c (insert_dbx_link_bpt_in_file): Update.
7842 * minidebug.c (find_separate_debug_file_in_section): Return
7843 gdb_bfd_ref_ptr.
7844 * machoread.c (macho_add_oso_symfile): Change abfd to
7845 gdb_bfd_ref_ptr.
7846 (macho_symfile_read_all_oso): Update.
7847 (macho_check_dsym): Return gdb_bfd_ref_ptr.
7848 (macho_symfile_read): Update.
7849 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
7850 (jit_bfd_try_read_symtab): Update.
7851 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7852 (gdb_bfd_openw, gdb_bfd_openr_iovec)
7853 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
7854 gdb_bfd_ref_ptr.
7855 (gdb_bfd_ref_policy): New struct.
7856 (gdb_bfd_ref_ptr): New typedef.
7857 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
7858 (gdb_bfd_openw, gdb_bfd_openr_iovec)
7859 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
7860 gdb_bfd_ref_ptr.
7861 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
7862 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
7863 (gcore_command): Update.
7864 * exec.c (exec_file_attach): Update.
7865 * elfread.c (elf_symfile_read): Update.
7866 * dwarf2read.c (dwarf2_get_dwz_file): Update.
7867 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
7868 (open_and_init_dwo_file): Update.
7869 (open_dwp_file): Return gdb_bfd_ref_ptr.
7870 (open_and_init_dwp_file): Update.
7871 * corelow.c (core_open): Update.
7872 * compile/compile-object-load.c (compile_object_load): Update.
7873 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
7874 * coffread.c (coff_symfile_read): Update.
7875 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
7876 gdb_bfd_ref_ptr. Rename.
7877 (dump_bfd_file, restore_command): Update.
7878 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
7879 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
7880 (find_separate_debug_file_by_buildid): Update.
7881
7882 2017-01-10 Tom Tromey <tom@tromey.com>
7883
7884 * common/gdb_ref_ptr.h: New file.
7885 * python/py-ref.h (struct gdbpy_ref_policy): New.
7886 (gdbpy_ref): Now a typedef.
7887
7888 2017-01-10 Tom Tromey <tom@tromey.com>
7889
7890 * utils.h (make_cleanup_htab_delete): Don't declare.
7891 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
7892 Remove.
7893 * linespec.c (decode_compound_collector): Add constructor,
7894 destructor.
7895 (lookup_prefix_sym): Remove cleanup.
7896 (symtab_collector): Add constructor, destructor.
7897 (collect_symtabs_from_filename): Remove cleanup.
7898 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
7899 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
7900 Use htab_up.
7901 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
7902 * dwarf2read.c (dw2_expand_symtabs_matching)
7903 (dw2_map_symbol_filenames, dwarf_decode_macros)
7904 (write_psymtabs_to_index): Use htab_up.
7905 * dwarf2loc.c (func_verify_no_selftailcall)
7906 (call_site_find_chain_1, func_verify_no_selftailcall)
7907 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
7908 std::vector, gdb::unique_xmalloc_ptr.
7909 (call_sitep): Remove typedef.
7910 (dwarf2_locexpr_baton_eval): Remove unused variable.
7911
7912 2017-01-10 Tom Tromey <tom@tromey.com>
7913
7914 * python/python-internal.h (make_cleanup_py_decref)
7915 (make_cleanup_py_xdecref): Don't declare.
7916 * python/py-utils.c (py_decref, make_cleanup_py_decref)
7917 (py_xdecref, make_cleanup_py_xdecref): Remove.
7918
7919 2017-01-10 Tom Tromey <tom@tromey.com>
7920
7921 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
7922 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
7923
7924 2017-01-10 Tom Tromey <tom@tromey.com>
7925
7926 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
7927
7928 2017-01-10 Tom Tromey <tom@tromey.com>
7929
7930 * python/py-utils.c (unicode_to_encoded_string)
7931 (python_string_to_target_string)
7932 (python_string_to_target_python_string)
7933 (python_string_to_host_string, gdbpy_obj_to_string)
7934 (get_addr_from_python): Use gdbpy_ref.
7935
7936 2017-01-10 Tom Tromey <tom@tromey.com>
7937
7938 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
7939 gdbpy_ref.
7940
7941 2017-01-10 Tom Tromey <tom@tromey.com>
7942
7943 * python/python.c (eval_python_command, gdbpy_decode_line)
7944 (gdbpy_run_events, gdbpy_start_type_printers)
7945 (gdbpy_apply_type_printers): Use gdbpy_ref.
7946
7947 2017-01-10 Tom Tromey <tom@tromey.com>
7948
7949 * python/py-param.c (get_doc_string, compute_enum_values): Use
7950 gdbpy_ref.
7951
7952 2017-01-10 Tom Tromey <tom@tromey.com>
7953
7954 * python/py-inferior.c (find_thread_object, build_inferior_list):
7955 Use gdbpy_ref.
7956
7957 2017-01-10 Tom Tromey <tom@tromey.com>
7958
7959 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
7960
7961 2017-01-10 Tom Tromey <tom@tromey.com>
7962
7963 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
7964 gdbpy_ref.
7965
7966 2017-01-10 Tom Tromey <tom@tromey.com>
7967
7968 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
7969 extra incref.
7970 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
7971 Use gdbpy_ref.
7972
7973 2017-01-10 Tom Tromey <tom@tromey.com>
7974
7975 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
7976 gdbpy_ref.
7977
7978 2017-01-10 Tom Tromey <tom@tromey.com>
7979
7980 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
7981 decref results of PyArg_ParseTupleAndKeywords.
7982
7983 2017-01-10 Tom Tromey <tom@tromey.com>
7984
7985 * python/python.c (python_run_simple_file): Use
7986 unique_xmalloc_ptr, gdbpy_ref.
7987
7988 2017-01-10 Tom Tromey <tom@tromey.com>
7989
7990 * python/py-prettyprint.c (print_stack_unless_memory_error)
7991 (print_string_repr, print_children): Use gdbpy_ref.
7992 (dummy_python_frame): New class.
7993 (dummy_python_frame::dummy_python_frame): Rename from
7994 push_dummy_python_frame.
7995 (py_restore_tstate): Remove.
7996
7997 2017-01-10 Tom Tromey <tom@tromey.com>
7998
7999 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
8000
8001 2017-01-10 Tom Tromey <tom@tromey.com>
8002
8003 * python/python.c (ensure_python_env, restore_python_env):
8004 Remove.
8005 * python/python-internal.h (ensure_python_env): Don't declare.
8006 * varobj.h (varobj_ensure_python_env): Don't declare.
8007 * varobj.c (varobj_ensure_python_env): Remove.
8008
8009 2017-01-10 Tom Tromey <tom@tromey.com>
8010
8011 * varobj.c (varobj_value_get_print_value): Use
8012 gdbpy_enter_varobj.
8013
8014 2017-01-10 Tom Tromey <tom@tromey.com>
8015
8016 * python/py-prettyprint.c (print_string_repr, print_children):
8017 Update.
8018 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
8019 of "encoding".
8020 * varobj.c (varobj_value_get_print_value): Update.
8021 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
8022
8023 2017-01-10 Tom Tromey <tom@tromey.com>
8024
8025 * varobj.c (varobj_get_display_hint)
8026 (dynamic_varobj_has_child_method, install_new_value_visualizer)
8027 (varobj_set_visualizer, free_variable): Use
8028 gdbpy_enter_varobj.
8029
8030 2017-01-10 Tom Tromey <tom@tromey.com>
8031
8032 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
8033 (do_finish_initialization): New function. Use gdbpy_ref.
8034 (gdbpy_finish_initialization): Use gdbpy_enter. Call
8035 do_finish_initialization.
8036
8037 2017-01-10 Tom Tromey <tom@tromey.com>
8038
8039 * python/py-param.c (get_set_value, get_show_value): Use
8040 gdbpy_enter, gdbpy_ref.
8041
8042 2017-01-10 Tom Tromey <tom@tromey.com>
8043
8044 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
8045
8046 2017-01-10 Tom Tromey <tom@tromey.com>
8047
8048 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
8049
8050 2017-01-10 Tom Tromey <tom@tromey.com>
8051
8052 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
8053 Use gdbpy_enter_varobj.
8054
8055 2017-01-10 Tom Tromey <tom@tromey.com>
8056
8057 * varobj.c (gdbpy_enter_varobj): New constructor.
8058 * python/python-internal.h (gdbpy_enter_varobj): New class.
8059 * python/py-varobj.c (py_varobj_get_iterator): Use
8060 gdbpy_enter_varobj.
8061
8062 2017-01-10 Tom Tromey <tom@tromey.com>
8063
8064 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
8065 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
8066 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
8067 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
8068 unique_xmalloc_ptr.
8069 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
8070
8071 2017-01-10 Tom Tromey <tom@tromey.com>
8072
8073 * python/py-xmethods.c (invoke_match_method): Use
8074 gdbpy_ref.
8075
8076 2017-01-10 Tom Tromey <tom@tromey.com>
8077
8078 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
8079 gdbpy_enter, gdbpy_ref.
8080
8081 2017-01-10 Tom Tromey <tom@tromey.com>
8082
8083 * python/python.c (python_interactive_command): Use gdbpy_enter.
8084
8085 2017-01-10 Tom Tromey <tom@tromey.com>
8086
8087 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
8088 gdbpy_ref.
8089
8090 2017-01-10 Tom Tromey <tom@tromey.com>
8091
8092 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
8093 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
8094
8095 2017-01-10 Tom Tromey <tom@tromey.com>
8096
8097 * utils.h (htab_deleter): New struct.
8098 (htab_up): New typedef.
8099 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
8100 gdbpy_enter, gdbpy_ref, htab_up.
8101
8102 2017-01-10 Tom Tromey <tom@tromey.com>
8103
8104 * python/py-unwind.c (pending_frame_invalidate): Remove.
8105 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
8106
8107 2017-01-10 Tom Tromey <tom@tromey.com>
8108
8109 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
8110 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
8111
8112 2017-01-10 Tom Tromey <tom@tromey.com>
8113
8114 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
8115
8116 2017-01-10 Tom Tromey <tom@tromey.com>
8117
8118 * python/python.c (gdbpy_eval_from_control_command)
8119 (gdbpy_source_script, gdbpy_run_events)
8120 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
8121 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
8122 gdbpy_enter.
8123
8124 2017-01-10 Tom Tromey <tom@tromey.com>
8125
8126 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
8127
8128 2017-01-10 Tom Tromey <tom@tromey.com>
8129
8130 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
8131
8132 2017-01-10 Tom Tromey <tom@tromey.com>
8133
8134 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
8135 (python_on_inferior_call_pre, python_on_inferior_call_post)
8136 (python_on_memory_change, python_on_register_change)
8137 (python_inferior_exit, python_new_objfile, add_thread_object)
8138 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
8139
8140 2017-01-10 Tom Tromey <tom@tromey.com>
8141
8142 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
8143 (bpfinishpy_handle_exit): Use gdbpy_enter.
8144
8145 2017-01-10 Tom Tromey <tom@tromey.com>
8146
8147 * python/py-cmd.c (cmdpy_destroyer)
8148 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
8149 gdbpy_enter.
8150
8151 2017-01-10 Tom Tromey <tom@tromey.com>
8152
8153 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
8154 gdbpy_enter.
8155 (gdbpy_breakpoint_has_cond): Likewise.
8156
8157 2017-01-10 Tom Tromey <tom@tromey.com>
8158
8159 * python/python.c (gdbpy_enter): New constructor.
8160 (~gdbpy_enter): New destructor.
8161 (restore_python_env, ensure_python_env): Rewrite.
8162 * python/python-internal.h (gdbpy_enter): New class.
8163
8164 2017-01-10 Tom Tromey <tom@tromey.com>
8165
8166 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
8167
8168 2017-01-10 Tom Tromey <tom@tromey.com>
8169
8170 * python/py-value.c (value_has_field, get_field_flag)
8171 (get_field_type, valpy_getitem, convert_value_from_python): Use
8172 gdbpy_ref.
8173
8174 2017-01-10 Tom Tromey <tom@tromey.com>
8175
8176 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
8177 gdbpy_ref.
8178
8179 2017-01-10 Tom Tromey <tom@tromey.com>
8180
8181 * python/py-prettyprint.c (search_pp_list)
8182 (find_pretty_printer_from_objfiles)
8183 (find_pretty_printer_from_progspace)
8184 (find_pretty_printer_from_gdb, find_pretty_printer)
8185 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
8186 gdbpy_ref.
8187
8188 2017-01-10 Tom Tromey <tom@tromey.com>
8189
8190 * python/py-param.c (call_doc_function): Use gdbpy_ref.
8191
8192 2017-01-10 Tom Tromey <tom@tromey.com>
8193
8194 * python/py-linetable.c (build_line_table_tuple_from_pcs)
8195 (ltpy_get_all_source_lines): Use gdbpy_ref.
8196
8197 2017-01-10 Tom Tromey <tom@tromey.com>
8198
8199 * python/py-framefilter.c (extract_sym, extract_value)
8200 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
8201 gdbpy_ref.
8202
8203 2017-01-10 Tom Tromey <tom@tromey.com>
8204
8205 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
8206
8207 2017-01-10 Tom Tromey <tom@tromey.com>
8208
8209 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
8210
8211 2017-01-10 Tom Tromey <tom@tromey.com>
8212
8213 * python/py-function.c (convert_values_to_python, fnpy_init): Use
8214 gdbpy_ref.
8215
8216 2017-01-10 Tom Tromey <tom@tromey.com>
8217
8218 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
8219
8220 2017-01-10 Tom Tromey <tom@tromey.com>
8221
8222 * python/py-type.c (convert_field, make_fielditem, typy_fields)
8223 (typy_range): Use gdbpy_ref.
8224
8225 2017-01-10 Tom Tromey <tom@tromey.com>
8226
8227 * python/py-threadevent.c (create_thread_event_object): Use
8228 gdbpy_ref.
8229 * python/py-stopevent.c (create_stop_event_object): Simplify.
8230 (emit_stop_event): Use gdbpy_ref.
8231 * python/py-signalevent.c (create_signal_event_object): Use
8232 gdbpy_ref.
8233 * python/py-newobjfileevent.c (create_new_objfile_event_object)
8234 (emit_new_objfile_event, create_clear_objfiles_event_object)
8235 (emit_clear_objfiles_event): Use gdbpy_ref.
8236 * python/py-infevents.c (create_inferior_call_event_object)
8237 (create_register_changed_event_object)
8238 (create_memory_changed_event_object, emit_inferior_call_event)
8239 (emit_memory_changed_event, emit_register_changed_event): Use
8240 gdbpy_ref.
8241 * python/py-exitedevent.c (create_exited_event_object)
8242 (emit_exited_event): Use gdbpy_ref.
8243 * python/py-event.h (evpy_emit_event): Remove
8244 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
8245 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
8246 * python/py-continueevent.c (emit_continue_event): Use
8247 gdbpy_ref.
8248 * python/py-breakpoint.c (gdbpy_breakpoint_created)
8249 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
8250 gdbpy_ref.
8251 * python/py-bpevent.c (create_breakpoint_event_object): Use
8252 gdbpy_ref.
8253
8254 2017-01-10 Tom Tromey <tom@tromey.com>
8255
8256 * python/py-ref.h: New file.
8257
8258 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
8259
8260 * cli-out.c (cli_ui_out::do_redirect): Change return type to
8261 void.
8262 * cli-out.h (cli_ui_out::do_redirect): Likewise.
8263 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
8264 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
8265 * ui-out.c (ui_out::redirect): Likewise.
8266 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
8267 * cli/cli-logging.c (set_logging_redirect): Update call site of
8268 ui_out::redirect.
8269 (handle_redirections): Likewise.
8270 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
8271 * top.c (execute_command_to_string): Likewise.
8272 * utils.c (do_ui_out_redirect_pop): Likewise.
8273
8274 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
8275
8276 * stack.c (_initialize_stack): Update "frame" command help message.
8277
8278 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
8279
8280 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
8281
8282 2017-01-06 Yao Qi <yao.qi@linaro.org>
8283
8284 * x86-linux-nat.h: Include gdb_proc_service.h.
8285
8286 2017-01-06 Yao Qi <yao.qi@linaro.org>
8287
8288 * ser-base.h: Include serial.h.
8289
8290 2017-01-06 Yao Qi <yao.qi@linaro.org>
8291
8292 * ppc-linux-tdep.h: Include ppc-tdep.h.
8293
8294 2017-01-06 Yao Qi <yao.qi@linaro.org>
8295
8296 * nat/amd64-linux-siginfo.h: Include signal.h.
8297
8298 2017-01-06 Yao Qi <yao.qi@linaro.org>
8299
8300 * nat/aarch64-linux-hw-point.h: Include break-common.h.
8301
8302 2017-01-06 Yao Qi <yao.qi@linaro.org>
8303
8304 * mi/mi-parse.h: Include mi-cmds.h.
8305
8306 2017-01-06 Yao Qi <yao.qi@linaro.org>
8307
8308 * inf-loop.c: Don't include "target.h".
8309 * inf-loop.h: Include it here.
8310
8311 2017-01-06 Yao Qi <yao.qi@linaro.org>
8312
8313 * dfp.h: Include "dboulest.h" and "expression.h".
8314
8315 2017-01-06 Yao Qi <yao.qi@linaro.org>
8316
8317 * ax-gdb.h: Include "ax.h".
8318
8319 2017-01-06 Yao Qi <yao.qi@linaro.org>
8320
8321 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
8322 with nat/gdb_ptrace.h.
8323
8324 2017-01-05 Yao Qi <yao.qi@linaro.org>
8325
8326 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
8327 new line.
8328 (mips64_fbsd_sigframe_init): Likewise.
8329
8330 2017-01-04 John Baldwin <jhb@FreeBSD.org>
8331
8332 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
8333 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
8334
8335 2017-01-04 John Baldwin <jhb@FreeBSD.org>
8336
8337 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8338 * NEWS: Mention new FreeBSD/mips native configuration.
8339 * config/mips/fbsd.mh: New file.
8340 * configure.host: Add mips*-*-freebsd*.
8341 * mips-fbsd-nat.c: New file.
8342
8343 2017-01-04 John Baldwin <jhb@FreeBSD.org>
8344
8345 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
8346 (ALLDEPFILES): Add mips-fbsd-tdep.c.
8347 * NEWS: Mention new FreeBSD/mips target.
8348 * configure.tgt: Add mips*-*-freebsd*.
8349 * mips-fbsd-tdep.c: New file.
8350 * mips-fbsd-tdep.h: New file.
8351
8352 2017-01-04 Yao Qi <yao.qi@linaro.org>
8353
8354 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
8355 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
8356
8357 2017-01-01 Joel Brobecker <brobecker@adacore.com>
8358
8359 Update copyright year range in all GDB files.
8360
8361 2017-01-01 Joel Brobecker <brobecker@adacore.com>
8362
8363 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
8364
8365 For older changes see ChangeLog-2016.
8366 \f
8367 Local Variables:
8368 mode: change-log
8369 left-margin: 8
8370 fill-column: 74
8371 version-control: never
8372 coding: utf-8
8373 End:
This page took 0.231122 seconds and 4 git commands to generate.