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