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