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