xml-support.c: Use std::vector
[deliverable/binutils-gdb.git] / gdb / ChangeLog
CommitLineData
a7fc9b61
PA
12017-04-18 Pedro Alves <palves@redhat.com>
2
3 * xml-support.c: Include <vector>.
4 (scope_level::scope_level(const gdb_xml_element *))
5 (scope_level::scope_level(scope_level&&)): New.
6 (scope_level::~scope_level): New.
7 (scope_level_s): Delete.
8 (gdb_xml_parser::scopes): Now a std::vector.
9 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
10 Use std::vector.
11 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
12 scope cleanup code.
13 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
14 of the scopes member. Use std::vector::emplace_back.
15
010151c9
PA
162017-04-18 Pedro Alves <palves@redhat.com>
17
18 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
19 a bool.
20 (gdb_xml_end_element): Change type of first parameter.
21 (gdb_xml_cleanup): Rename to ...
22 (gdb_xml_parser::~gdb_xml_parser): ... this.
23 (gdb_xml_create_parser_and_cleanup): Delete with ...
24 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
25 to this new ctor.
26 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
27 using gdb_xml_create_parser_and_cleanup.
28 (xinclude_parsing_data): Add ctor/dtor.
29 (xml_xinclude_cleanup): Delete.
30 (xml_process_xincludes): Create a local xinclude_parsing_data
31 instead of heap-allocating one. Create a local gdb_xml_parser
32 instead of heap-allocating one with
33 gdb_xml_create_parser_and_cleanup.
34
d56060f0
JB
352017-04-18 John Baldwin <jhb@FreeBSD.org>
36
37 PR threads/20743
38 * fbsd-nat.c (resume_one_thread_cb): Remove.
39 (resume_all_threads_cb): Remove.
40 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
41 iterate_over_threads.
42
305d16a9
JB
432017-04-17 Joel Brobecker <brobecker@adacore.com>
44
45 * NEWS: Create a new section for the next release branch.
46 Rename the section of the current branch, now that it has
47 been cut.
48
8bb57231
JB
492017-04-17 Joel Brobecker <brobecker@adacore.com>
50
51 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
52 * version.in: Bump version to 8.0.50.DATE-git.
53
096c92dd
SDJ
542017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
55
56 PR gdb/21385
57 * windows-nat.c (windows_create_inferior): Declare 'allargs'
58 independently of the host, and fix build breakage on Cygwin.
59
0550c955
PA
602017-04-13 Pedro Alves <palves@redhat.com>
61
62 * inferior.c (free_inferior): Convert to ...
63 (inferior::~inferior): ... this dtor.
64 (inferior::inferior): New ctor, factored out from ...
65 (add_inferior_silent): ... here. Allocate the inferior with a new
66 expression.
67 (delete_inferior): Call delete instead of free_inferior.
68 * inferior.h (gdb_environ, continuation): Forward declare.
69 (inferior): Now a class. Add in-class initialization to all
70 members. Make boolean fields bool, except 'detaching'.
71 (inferior::inferior): New explicit ctor.
72 (inferior::~inferior): New.
73
e3d60dfc
PA
742017-04-13 Pedro Alves <palves@redhat.com>
75
76 * inferior.c (init_inferior_list): Delete.
77 * inferior.h (init_inferior_list): Delete.
78
5fd69d0a
PA
792017-04-13 Pedro Alves <palves@redhat.com>
80
81 PR threads/13217
82 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
83 (top level): Call it twice, with different thread sets.
84
c6609450
PA
852017-04-13 Pedro Alves <palves@redhat.com>
86
87 * thread.c: Include <algorithm>.
88 (thread_array_cleanup): Delete.
89 (scoped_inc_dec_ref): New class.
90 (live_threads_count): New function.
91 (set_thread_refcount): Delete.
92 (tp_array_compar_ascending): Now a bool.
93 (tp_array_compar): Convert to a std::sort comparison function.
94 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
95 and live_threads_count.
96
2a00d7ce
PA
972017-04-13 Pedro Alves <palves@redhat.com>
98
99 * infrun.c (follow_fork_inferior): Also switch the current
100 inferior.
101
441d7c93
PA
1022017-04-13 Pedro Alves <palves@redhat.com>
103
104 * breakpoint.c (watch_command_1): Save watchpoint-frame info
105 before calling create_internal_breakpoint.
106
808480f6
PA
1072017-04-13 Pedro Alves <palves@redhat.com>
108
109 * fork-child.c (execv_argv): New class.
110 (breakup_args): Refactored as ...
111 (execv_argv::init_for_no_shell): .. this method of execv_argv.
112 Copy arguments to storage and replace separators with NULL
113 terminators in place.
114 (escape_bang_in_quoted_argument): Adjust to return bool.
115 (execv_argv::execv_argv): New ctor.
116 (execv_argv::init_for_shell): New method, factored out from
117 fork_inferior. Don't strdup strings into the vector.
118 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
119 Remove free_vector_argv call.
120
ad3d022a
YQ
1212017-04-13 Yao Qi <yao.qi@linaro.org>
122
123 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
124 tdep->rx_psw_type.
125
e6ddc3bf
YQ
1262017-04-13 Yao Qi <yao.qi@linaro.org>
127
128 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
129 * rx-tdep.c (rx_gdbarch_init): Likewise.
130
bfb8cf90
PA
1312017-04-13 Pedro Alves <palves@redhat.com>
132
133 * breakpoint.h (struct breakpoint): Reindent.
134
f5336ca5
PA
1352017-04-13 Pedro Alves <palves@redhat.com>
136
137 * breakpoint.c (bp_location): Rename to ...
138 (bp_locations): ... this. All references updated.
139 (bp_location_count): Rename to ...
140 (bp_locations_count): ... this. All references updated.
141 (bp_location_placed_address_before_address_max): Rename to ...
142 (bp_locations_placed_address_before_address_max): ... this. All
143 references updated.
144 (bp_location_shadow_len_after_address_max): Rename to ...
145 (bp_locations_shadow_len_after_address_max): ... this. All
146 references updated.
147 (bp_location_compare_addrs): Rename to ...
148 (bp_locations_compare_addrs): ... this. All references updated.
149 (bp_location_compare):Rename to ...
150 (bp_locations_compare): ... this. All references updated.
151 (bp_location_target_extensions_update): Rename to ...
152 (bp_locations_target_extensions_update): ... this. All references
153 updated.
154
be628ab8
SDJ
1552017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
156
157 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
158 * common/common.m4: Check headers 'termios.h', 'termio.h' and
159 'sgtty.h'.
160 * common/gdb_termios.h: New file, with parts of "terminal.h".
161 * inflow.c: Include "gdb_termios.h".
162 * ser-unix.c: Include "gdb_termios.h".
163 * terminal.h: Move terminal-related defines to
164 "common/gdb_termios.h".
165
8e9e35b1
TT
1662017-04-12 Tom Tromey <tom@tromey.com>
167
168 * probe.c (parse_probes): Update.
169 * location.h (delete_event_location): Don't declare.
170 (event_location_deleter::operator()): Update.
171 * location.c (event_location_deleter::operator()): Rename from
172 delete_event_location.
173 * linespec.h (linespec_result) <location>: Change type to
174 event_location_up.
175 * linespec.c (canonicalize_linespec, event_location_to_sals)
176 (decode_objc): Update.
177 (linespec_result): Don't call delete_event_location.
178 * breakpoint.c (create_breakpoints_sal)
179 (bkpt_probe_create_sals_from_location)
180 (strace_marker_create_sals_from_location): Update.
181
16e802b9
TT
1822017-04-12 Tom Tromey <tom@tromey.com>
183
184 * linespec.h (struct linespec_result): Add constructor and
185 destructor.
186 (init_linespec_result, destroy_linespec_result)
187 (make_cleanup_destroy_linespec_result): Don't declare.
188 * linespec.c (init_linespec_result): Remove.
189 (linespec_result::~linespec_result): Rename from
190 destroy_linespec_result. Update.
191 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
192 Remove.
193 * breakpoint.c (create_breakpoint, break_range_command)
194 (decode_location_default): Update.
195 * ax-gdb.c (agent_command_1): Update.
196
d28cd78a
TT
1972017-04-12 Tom Tromey <tom@tromey.com>
198
199 * remote.c (remote_download_tracepoint): Update.
200 * python/py-breakpoint.c (bppy_get_location): Update.
201 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
202 (gdbscm_breakpoint_location): Update.
203 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
204 * breakpoint.h (struct breakpoint) <location, location_range_end>:
205 Change type to event_location_up.
206 * breakpoint.c (create_overlay_event_breakpoint)
207 (create_longjmp_master_breakpoint)
208 (create_std_terminate_master_breakpoint)
209 (create_exception_master_breakpoint)
210 (breakpoint_event_location_empty_p, print_breakpoint_location)
211 (print_one_breakpoint_location, create_thread_event_breakpoint)
212 (init_breakpoint_sal, create_breakpoint)
213 (print_recreate_ranged_breakpoint, break_range_command)
214 (init_ada_exception_breakpoint, say_where): Update.
215 (base_breakpoint_dtor): Don't call delete_event_location.
216 (bkpt_print_recreate, tracepoint_print_recreate)
217 (dprintf_print_recreate, update_static_tracepoint)
218 (breakpoint_re_set_default): Update.
219
711799d5
TT
2202017-04-12 Tom Tromey <tom@tromey.com>
221
222 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
223 type of "to_do". Update.
224 (compute_stack_depth): Use std::vector.
225
52d214d3
TT
2262017-04-12 Tom Tromey <tom@tromey.com>
227
228 * printcmd.c (find_instruction_backward): Use std::vector.
229
4c404b8b
TT
2302017-04-12 Tom Tromey <tom@tromey.com>
231
232 * symfile.c (objfilep): Remove typedef.
233 (reread_symbols): Use a std::vector.
234
156d9eab
TT
2352017-04-12 Tom Tromey <tom@tromey.com>
236
237 * mi/mi-main.c (exec_direction_forward): Remove.
238 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
239 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
240 scoped_restore.
241 * guile/guile.c (guile_repl_command, guile_command)
242 (gdbscm_execute_gdb_command): Use scoped_restore.
243 * go-exp.y (go_parse): Use scoped_restore.
244 * d-exp.y (d_parse): Use scoped_restore.
245 * cli/cli-decode.c (cmd_func): Use scoped_restore.
246 * c-exp.y (c_parse): Use scoped_restore.
247
4d89769a
TT
2482017-04-12 Tom Tromey <tom@tromey.com>
249
250 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
251 (mi_parse): Update return type.
252 (mi_parse_free): Remove.
253 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
254 (mi_parse::~mi_parse): Rename from mi_parse_free.
255 (mi_parse_cleanup): Remove.
256 (mi_parse): Return a unique_ptr. Use new.
257 * mi/mi-main.c (mi_execute_command): Update.
258
4b217cc7
TT
2592017-04-12 Tom Tromey <tom@tromey.com>
260
261 * location.c (explicit_location_lex_one): Return a
262 unique_xmalloc_ptr.
263 (string_to_explicit_location): Update. Remove cleanups.
264
59d3651b
TT
2652017-04-12 Tom Tromey <tom@tromey.com>
266
267 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
268 (compare_value_and_voffset): Change type. Update.
269 (compute_vtable_size): Change type of "offset_vec".
270 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
271 (gnuv3_get_typeid): Remove extraneous declaration.
272
b24b0d6c
TT
2732017-04-12 Tom Tromey <tom@tromey.com>
274
275 * charset.h (wchar_iterator): Fix comment.
276
80a3b8c5
TT
2772017-04-12 Tom Tromey <tom@tromey.com>
278
279 * charset.c (iconv_wrapper): New class.
280 (cleanup_iconv): Remove.
281 (convert_between_encodings): Use it.
282
c83dd867
TT
2832017-04-12 Tom Tromey <tom@tromey.com>
284
285 * symfile.h (increment_reading_symtab): Update type.
286 * symfile.c (decrement_reading_symtab): Remove.
287 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
288 * psymtab.c (psymtab_to_symtab): Update.
289 * dwarf2read.c (dw2_instantiate_symtab): Update.
290
0e8621a0
TT
2912017-04-12 Tom Tromey <tom@tromey.com>
292
293 * jit.c (struct jit_reader): Declare separately. Add constructor
294 and destructor. Change type of "handle".
295 (loaded_jit_reader): Define separately.
296 (jit_reader_load): Update. New "new".
297 (jit_reader_unload_command): Use "delete".
298 * gdb-dlfcn.h (struct dlclose_deleter): New.
299 (gdb_dlhandle_up): New typedef.
300 (gdb_dlopen, gdb_dlsym): Update types.
301 (gdb_dlclose): Remove.
302 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
303 (gdb_dlsym): Change type of "handle".
304 (make_cleanup_dlclose): Remove.
305 (dlclose_deleter::operator()): Rename from gdb_dlclose.
306 * compile/compile-c-support.c (load_libcc): Update.
307
67d89901
TT
3082017-04-12 Tom Tromey <tom@tromey.com>
309
310 * symtab.h (find_pcs_for_symtab_line): Change return type.
311 * symtab.c (find_pcs_for_symtab_line): Change return type.
312 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
313 type of "vec". Update.
314 (ltpy_get_pcs_for_line): Update.
315 * linespec.c (decode_digits_ordinary): Update.
316
93921405
TT
3172017-04-12 Tom Tromey <tom@tromey.com>
318
319 * tracepoint.c (actions_command): Update.
320 * python/python.c (python_command, python_interactive_command):
321 Update.
322 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
323 * guile/guile.c (guile_command): Update.
324 * defs.h (read_command_lines, read_command_lines_1): Return
325 command_line_up.
326 (command_lines_deleter): New struct.
327 (command_line_up): New typedef.
328 * compile/compile.c (compile_code_command)
329 (compile_print_command): Update.
330 * cli/cli-script.h (get_command_line, copy_command_lines): Return
331 command_line_up.
332 (make_cleanup_free_command_lines): Remove.
333 * cli/cli-script.c (get_command_line, read_command_lines_1)
334 (copy_command_lines): Return command_line_up.
335 (while_command, if_command, read_command_lines, define_command)
336 (document_command): Update.
337 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
338 Remove.
339 * breakpoint.h (breakpoint_set_commands): Change type of
340 "commands".
341 * breakpoint.c (breakpoint_set_commands): Change type of
342 "commands". Update.
343 (do_map_commands_command, update_dprintf_command_list)
344 (create_tracepoint_from_upload): Update.
345
ffc2605c
TT
3462017-04-12 Tom Tromey <tom@tromey.com>
347
348 * tracepoint.c (scope_info): Update.
349 * spu-tdep.c (spu_catch_start): Update.
350 * python/python.c (gdbpy_decode_line): Update.
351 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
352 * python/py-breakpoint.c (bppy_init): Update.
353 * probe.c (parse_probes): Update.
354 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
355 * location.h (event_location_deleter): New struct.
356 (event_location_up): New typedef.
357 (new_linespec_location, new_address_location, new_probe_location)
358 (new_explicit_location, copy_event_location)
359 (string_to_event_location, string_to_event_location_basic)
360 (string_to_explicit_location): Update return type.
361 (make_cleanup_delete_event_location): Remove.
362 * location.c (new_linespec_location, new_address_location)
363 (new_probe_location, new_explicit_location, copy_event_location):
364 Return event_location_up.
365 (delete_event_location_cleanup)
366 (make_cleanup_delete_event_location): Remove.
367 (string_to_explicit_location, string_to_event_location_basic)
368 (string_to_event_location): Return event_location_up.
369 * linespec.c (canonicalize_linespec, event_location_to_sals)
370 (decode_line_with_current_source)
371 (decode_line_with_last_displayed, decode_objc): Update.
372 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
373 * completer.c (location_completer): Update.
374 * cli/cli-cmds.c (edit_command, list_command): Update.
375 * breakpoint.c (create_overlay_event_breakpoint)
376 (create_longjmp_master_breakpoint)
377 (create_std_terminate_master_breakpoint)
378 (create_exception_master_breakpoint)
379 (create_thread_event_breakpoint): Update.
380 (init_breakpoint_sal): Update. Remove some dead code.
381 (create_breakpoint_sal): Change type of "location". Update.
382 (create_breakpoints_sal, create_breakpoint, break_command_1)
383 (dprintf_command, break_range_command, until_break_command)
384 (init_ada_exception_breakpoint)
385 (strace_marker_create_sals_from_location)
386 (update_static_tracepoint, trace_command, ftrace_command)
387 (strace_command, create_tracepoint_from_upload): Update.
388 * break-catch-throw.c (re_set_exception_catchpoint): Update.
389 * ax-gdb.c (agent_command_1): Update.
390
8f10c932
PA
3912017-04-12 Pedro Alves <palves@redhat.com>
392
393 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
394 * configure.tgt: Handle i[34567]86-*-go32* and
395 i[34567]86-*-msdosdjgpp*.
396 * i386-tdep.c (i386_svr4_reg_to_regnum):
397 Make extern.
398 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
399 i386-go32-tdep.c.
400 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
401 * i386-go32-tdep.c: New file.
402 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
403 declarations.
404
0a31ccfb
SM
4052017-04-12 Simon Marchi <simon.marchi@ericsson.com>
406
407 * aix-thread.c (pd_status2str): Change return type to const char *.
408
e9bb3fbb
PA
4092017-04-12 Pedro Alves <palves@redhat.com>
410
411 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
412 calls to set_gdbarch_gnu_triplet_regexp.
413
53375380
PA
4142017-04-12 Pedro Alves <palves@redhat.com>
415
416 PR gdb/21323
417 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
418 New enum value.
419 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
420 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
421 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
422 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
423 * gdbarch.h, gdbarch.c: Regenerate.
424 * aarch64-tdep.c (aarch64_gdbarch_init): Override
425 gdbarch_wchar_bit and gdbarch_wchar_signed.
426 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
427 * arm-tdep.c (arm_gdbarch_init): Likewise.
428 * avr-tdep.c (avr_gdbarch_init): Likewise.
429 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
430 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
431 * i386-tdep.c (i386_go32_init_abi): Likewise.
432 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
433 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
434 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
435 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
436 * sh-tdep.c (sh_gdbarch_init): Likewise.
437 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
438 * sparc64-tdep.c (sparc64_init_abi): Likewise.
439 * windows-tdep.c (windows_init_abi): Likewise.
440 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
441
53e710ac
PA
4422017-04-12 Pedro Alves <palves@redhat.com>
443
444 PR c++/21323
445 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
446 cplus_primitive_type_char32_t>: New enum values.
447 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
448 and cplus_primitive_type_char32_t.
449 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
450 32, use the archtecture's built-in type for char16_t and char32_t,
451 respectively. Otherwise, fallback to init_integer_type as before,
452 but make the type unsigned, and issue a complaint.
453 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
454
ab0538b8
AH
4552017-04-12 Alan Hayward <alan.hayward@arm.com>
456
5e0e0422 457 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
ab0538b8
AH
458 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
459
5430098f
SDJ
4602017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
461
462 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
463 'const char *'.
464
7c5ded6a
SDJ
4652017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
466
467 * common/common-utils.c (free_vector_argv): New function.
468 * common/common-utils.h: Include <vector>.
469 (free_vector_argv): New prototype.
470 * darwin-nat.c (darwin_create_inferior): Rewrite function
471 prototype in order to constify "exec_file" and accept a
472 "std::string" for "allargs".
473 * fork-child.c: Include <vector>.
474 (breakup_args): Rewrite function, using C++.
475 (fork_inferior): Rewrite function header, constify "exec_file_arg"
476 and accept "std::string" for "allargs". Update the code to
477 calculate "argv" based on "allargs". Update calls to "exec_fun"
478 and "execvp".
479 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
480 order to constify "exec_file" and accept a "std::string" for
481 "allargs".
482 * go32-nat.c (go32_create_inferior): Likewise.
483 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
484 * infcmd.c (run_command_1): Constify "exec_file". Use
485 "std::string" for inferior arguments.
486 * inferior.h (fork_inferior): Update prototype.
487 * linux-nat.c (linux_nat_create_inferior): Rewrite function
488 prototype in order to constify "exec_file" and accept a
489 "std::string" for "allargs".
490 * nto-procfs.c (procfs_create_inferior): Likewise.
491 * procfs.c (procfs_create_inferior): Likewise.
492 * remote-sim.c (gdbsim_create_inferior): Likewise.
493 * remote.c (extended_remote_run): Update code to accept
494 "std::string" as argument.
495 (extended_remote_create_inferior): Rewrite function prototype in
496 order to constify "exec_file" and accept a "std::string" for
497 "allargs".
498 * rs6000-nat.c (super_create_inferior): Likewise.
499 (rs6000_create_inferior): Likewise.
500 * target.h (struct target_ops) <to_create_inferior>: Likewise.
501 * windows-nat.c (windows_create_inferior): Likewise.
502
ae0eee42
PA
5032017-04-11 Pedro Alves <palves@redhat.com>
504
505 * thread.c: Fix whitespace throughout.
506
a6acac06
PR
5072017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
508
509 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
510
64403bd1
AH
5112017-04-11 Alan Hayward <alan.hayward@arm.com>
512
513 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
514
a5bef50f
SDJ
5152017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
516
517 PR gdb/21364
518 * osdata.c (info_osdata): Check if 'type' is an empty string
519 instead of NULL.
520
9295a5a9
PA
5212017-04-10 Pedro Alves <palves@redhat.com>
522
523 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
524 (ptid_to_global_thread_id, in_thread_list)
525 (do_captured_list_thread_ids, set_resumed, set_running)
526 (set_executing, set_stop_requested, finish_thread_state)
527 (validate_registers_access, can_access_registers_ptid)
528 (print_thread_info_1, switch_to_thread)
529 (do_restore_current_thread_cleanup)
530 (make_cleanup_restore_current_thread, thread_command)
531 (thread_name_command): Use operator== instead of ptid_equal.
532
996812e3
PA
5332017-04-10 Pedro Alves <palves@redhat.com>
534
535 * thread.c (struct current_thread_cleanup) <next>: Delete field.
536 (current_thread_cleanup_chain): Delete.
537 (restore_current_thread_cleanup_dtor)
538 (make_cleanup_restore_current_thread): Remove references to
539 current_thread_cleanup_chain.
540
845b344f
AH
5412017-04-10 Alan Hayward <alan.hayward@arm.com>
542
543 * msp430-tdep.c (msp430_pseudo_register_read): Never return
544 REG_UNKNOWN.
545
803bdfe4
YQ
5462017-04-10 Yao Qi <yao.qi@linaro.org>
547
548 PR gdb/19942
549 * gdbthread.h (thread_info::deletable): New method.
550 (thread_info::incref): New method.
551 (thread_info::decref): New method.
552 (thread_info::refcount): Move it to private.
553 * infrun.c (save_stop_context): Call inc_refcount.
554 (release_stop_context_cleanup): Likewise.
555 * thread.c (set_thread_exited): New function.
556 (init_thread_list): Delete "tp" only it is deletable, otherwise
557 call set_thread_exited.
558 (delete_thread_1): Call set_thread_exited.
559 (current_thread_cleanup) <inferior_pid>: Remove.
560 <thread>: New field.
561 (restore_current_thread_ptid_changed): Removed.
562 (do_restore_current_thread_cleanup): Adjust.
563 (restore_current_thread_cleanup_dtor): Don't call
564 find_thread_ptid.
565 (set_thread_refcount): Use dec_refcount.
566 (make_cleanup_restore_current_thread): Adjust.
567 (thread_apply_all_command): Call inc_refcount.
568 (_initialize_thread): Don't call
569 observer_attach_thread_ptid_changed.
570
8c25b497
YQ
5712017-04-10 Yao Qi <yao.qi@linaro.org>
572
573 * thread.c (delete_thread_1): Hoist code on marking thread as
574 exited.
575
8473b447
SM
5762017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
577
578 * windows-nat.c (windows_detach): Initialize ptid with
579 minus_one_ptid.
580
6670ec13
SM
5812017-04-07 Simon Marchi <simon.marchi@ericsson.com>
582
583 * unittests/ptid-selftests.c: Fix erroneous assert messages.
584
ba2f91bb
AH
5852017-04-07 Alan Hayward <alan.hayward@arm.com>
586
587 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
588 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
589 (bfin_pseudo_register_write): Likewise
590
436252de
SM
5912017-04-06 Simon Marchi <simon.marchi@ericsson.com>
592
593 * common/ptid.h (struct ptid): Change to...
594 (class ptid_t): ... this.
595 <ptid_t>: New constructors.
596 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
597 matches>: New methods.
598 <make_null, make_minus_one>: New static methods.
599 <pid>: Rename to...
600 <m_pid>: ...this.
601 <lwp>: Rename to...
602 <m_lwp>: ...this.
603 <tid>: Rename to...
604 <m_tid>: ...this.
605 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
606 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
607 as references, move comment to class ptid_t.
608 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
609 ptid_t static methods.
610 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
611 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
612 Take ptid arguments as references, implement using ptid_t methods.
613 * unittests/ptid-selftests.c: New file.
614 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
615 unittests/ptid-selftests.c.
616 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
617
0dedf377
TP
6182017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
619
620 * python/python.c (python_run_simple_file): Cast mode literal to
621 non-const char pointer as expected by PyFile_FromString.
622
4e9868d4
SM
6232017-04-05 Simon Marchi <simon.marchi@ericsson.com>
624
625 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
626 minus_one_ptid and null_ptid.
627
9bf2a700
PA
6282017-04-05 Pedro Alves <palves@redhat.com>
629
630 * warning.m4 (build_warnings): Remove -Wno-write-strings.
631 * configure: Regenerate.
632
a121b7c1
PA
6332017-04-05 Pedro Alves <palves@redhat.com>
634
635 * ada-exp.y (yyerror): Constify.
636 * ada-lang.c (bound_name, get_selections)
637 (ada_variant_discrim_type)
638 (ada_variant_discrim_name, ada_value_struct_elt)
639 (ada_lookup_struct_elt_type, is_unchecked_variant)
640 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
641 (catch_ada_exception_command_split)
642 (catch_ada_assert_command_split, catch_assert_command)
643 (ada_op_name): Constify.
644 * ada-lang.h (ada_yyerror, get_selections)
645 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
646 * arc-tdep.c (arc_print_frame_cache): Constify.
647 * arm-tdep.c (arm_skip_stub): Constify.
648 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
649 (gen_aggregate_elt_ref): Constify.
650 * bcache.c (print_bcache_statistics): Constify.
651 * bcache.h (print_bcache_statistics): Constify.
652 * break-catch-throw.c (catch_exception_command_1):
653 * breakpoint.c (struct ep_type_description::description):
654 Constify.
655 (add_solib_catchpoint): Constify.
656 (catch_fork_command_1): Add cast.
657 (add_catch_command): Constify.
658 * breakpoint.h (add_catch_command, add_solib_catchpoint):
659 Constify.
660 * bsd-uthread.c (bsd_uthread_state): Constify.
661 * buildsym.c (patch_subfile_names): Constify.
662 * buildsym.h (next_symbol_text_func, patch_subfile_names):
663 Constify.
664 * c-exp.y (yyerror): Constify.
665 (token::oper): Constify.
666 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
667 * c-varobj.c (cplus_describe_child): Constify.
668 * charset.c (find_charset_names): Add cast.
669 (find_charset_names): Constify array and add const_cast.
670 * cli/cli-cmds.c (complete_command, cd_command): Constify.
671 (edit_command): Constify.
672 * cli/cli-decode.c (lookup_cmd): Constify.
673 * cli/cli-dump.c (dump_memory_command, dump_value_command):
674 Constify.
675 (struct dump_context): Constify.
676 (add_dump_command, restore_command): Constify.
677 * cli/cli-script.c (get_command_line): Constify.
678 * cli/cli-script.h (get_command_line): Constify.
679 * cli/cli-utils.c (check_for_argument): Constify.
680 * cli/cli-utils.h (check_for_argument): Constify.
681 * coff-pe-read.c (struct read_pe_section_data): Constify.
682 * command.h (lookup_cmd): Constify.
683 * common/print-utils.c (decimal2str): Constify.
684 * completer.c (gdb_print_filename): Constify.
685 * corefile.c (set_gnutarget): Constify.
686 * cp-name-parser.y (yyerror): Constify.
687 * cp-valprint.c (cp_print_class_member): Constify.
688 * cris-tdep.c (cris_register_name, crisv32_register_name):
689 Constify.
690 * d-exp.y (yyerror): Constify.
691 (struct token::oper): Constify.
692 * d-lang.h (d_yyerror): Constify.
693 * dbxread.c (struct header_file_location::name): Constify.
694 (add_old_header_file, add_new_header_file, last_function_name)
695 (dbx_next_symbol_text, add_bincl_to_list)
696 (find_corresponding_bincl_psymtab, set_namestring)
697 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
698 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
699 * defs.h (command_line_input, print_address_symbolic)
700 (deprecated_readline_begin_hook): Constify.
701 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
702 Constify.
703 * event-top.c (handle_line_of_input): Constify and add cast.
704 * exceptions.c (catch_errors): Constify.
705 * exceptions.h (catch_errors): Constify.
706 * expprint.c (print_subexp_standard, op_string, op_name)
707 (op_name_standard, dump_raw_expression, dump_raw_expression):
708 * expression.h (op_name, op_string, dump_raw_expression):
709 Constify.
710 * f-exp.y (yyerror): Constify.
711 (struct token::oper): Constify.
712 (struct f77_boolean_val::name): Constify.
713 * f-lang.c (f_word_break_characters): Constify.
714 * f-lang.h (f_yyerror): Constify.
715 * fork-child.c (fork_inferior): Add cast.
716 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
717 (new_variant): Constify.
718 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
719 * gdbarch.c: Regenerate.
720 * gdbcore.h (set_gnutarget): Constify.
721 * go-exp.y (yyerror): Constify.
722 (token::oper): Constify.
723 * go-lang.h (go_yyerror): Constify.
724 * go32-nat.c (go32_sysinfo): Constify.
725 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
726 * guile/scm-cmd.c (cmdscm_function): Constify.
727 * guile/scm-param.c (pascm_param_value): Constify.
728 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
729 (h8300sx_register_name): Constify.
730 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
731 Constify.
732 * ia64-tdep.c (ia64_register_names): Constify.
733 * infcmd.c (construct_inferior_arguments): Constify.
734 (path_command, attach_post_wait): Constify.
735 * language.c (show_range_command, show_case_command)
736 (unk_lang_error): Constify.
737 * language.h (language_defn::la_error)
738 (language_defn::la_name_of_this): Constify.
739 * linespec.c (decode_line_2): Constify.
740 * linux-thread-db.c (thread_db_err_str): Constify.
741 * lm32-tdep.c (lm32_register_name): Constify.
742 * m2-exp.y (yyerror): Constify.
743 * m2-lang.h (m2_yyerror): Constify.
744 * m32r-tdep.c (m32r_register_names): Constify and make static.
745 * m68hc11-tdep.c (m68hc11_register_names): Constify.
746 * m88k-tdep.c (m88k_register_name): Constify.
747 * macroexp.c (appendmem): Constify.
748 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
749 (upgrade_type, parse_external, parse_partial_symbols)
750 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
751 (new_symbol): Constify.
752 * memattr.c (mem_info_command): Constify.
753 * mep-tdep.c (register_name_from_keyword): Constify.
754 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
755 Constify.
756 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
757 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
758 * mi/mi-main.c (captured_mi_execute_command): Constify and add
759 cast.
760 (mi_execute_async_cli_command): Constify.
761 * mips-tdep.c (mips_register_name): Constify.
762 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
763 (am33_register_name, am33_2_register_name)
764 * moxie-tdep.c (moxie_register_names): Constify.
765 * nat/linux-osdata.c (osdata_type): Constify fields.
766 * nto-tdep.c (nto_parse_redirection): Constify.
767 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
768 (lookup_child_selector): Constify.
769 (objc_methcall::name): Constify.
770 * objc-lang.h (lookup_objc_class, lookup_child_selector)
771 (lookup_struct_typedef): Constify.
772 * objfiles.c (pc_in_section): Constify.
773 * objfiles.h (pc_in_section): Constify.
774 * p-exp.y (struct token::oper): Constify.
775 (yyerror): Constify.
776 * p-lang.h (pascal_yyerror): Constify.
777 * parser-defs.h (op_name_standard): Constify.
778 (op_print::string): Constify.
779 (exp_descriptor::op_name): Constify.
780 * printcmd.c (print_address_symbolic): Constify.
781 * psymtab.c (print_partial_symbols): Constify.
782 * python/py-breakpoint.c (stop_func): Constify.
783 (bppy_get_expression): Constify.
784 * python/py-cmd.c (cmdpy_completer::name): Constify.
785 (cmdpy_function): Constify.
786 * python/py-event.c (evpy_add_attribute)
787 (gdbpy_initialize_event_generic): Constify.
788 * python/py-event.h (evpy_add_attribute)
789 (gdbpy_initialize_event_generic): Constify.
790 * python/py-evts.c (add_new_registry): Constify.
791 * python/py-finishbreakpoint.c (outofscope_func): Constify.
792 * python/py-framefilter.c (get_py_iter_from_func): Constify.
793 * python/py-inferior.c (get_buffer): Add cast.
794 * python/py-param.c (parm_constant::name): Constify.
795 * python/py-unwind.c (fprint_frame_id): Constify.
796 * python/python.c (gdbpy_parameter_value): Constify.
797 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
798 * remote.c (memory_packet_config::name): Constify.
799 (show_packet_config_cmd, remote_write_bytes)
800 (remote_buffer_add_string):
801 * reverse.c (exec_reverse_once): Constify.
802 * rs6000-tdep.c (variant::name, variant::description): Constify.
803 * rust-exp.y (rustyyerror): Constify.
804 * rust-lang.c (rust_op_name): Constify.
805 * rust-lang.h (rustyyerror): Constify.
806 * serial.h (serial_ops::name): Constify.
807 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
808 (sh_sh3e_register_name, sh_sh2e_register_name)
809 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
810 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
811 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
812 (sh_sh4al_dsp_register_name): Constify.
813 * sh64-tdep.c (sh64_register_name): Constify.
814 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
815 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
816 * stabsread.c (patch_block_stabs, read_type_number)
817 (ref_map::stabs, ref_add, process_reference)
818 (symbol_reference_defined, define_symbol, define_symbol)
819 (error_type, read_type, read_member_functions, read_cpp_abbrev)
820 (read_one_struct_field, read_struct_fields, read_baseclasses)
821 (read_tilde_fields, read_struct_type, read_array_type)
822 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
823 (read_huge_number, read_range_type, read_args, common_block_start)
824 (find_name_end): Constify.
825 * stabsread.h (common_block_start, define_symbol)
826 (process_one_symbol, symbol_reference_defined, ref_add):
827 * symfile.c (get_section_index, add_symbol_file_command):
828 * symfile.h (get_section_index): Constify.
829 * target-descriptions.c (tdesc_type::name): Constify.
830 (tdesc_free_type): Add cast.
831 * target.c (find_default_run_target):
832 (add_deprecated_target_alias, find_default_run_target)
833 (target_announce_detach): Constify.
834 (do_option): Constify.
835 * target.h (add_deprecated_target_alias): Constify.
836 * thread.c (print_thread_info_1): Constify.
837 * top.c (deprecated_readline_begin_hook, command_line_input):
838 Constify.
839 (init_main): Add casts.
840 * top.h (handle_line_of_input): Constify.
841 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
842 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
843 (tfind_command): Rename to ...
844 (tfind_command_1): ... this and constify.
845 (tfind_command): New function.
846 (tfind_end_command, tfind_start_command): Adjust.
847 (encode_source_string): Constify.
848 * tracepoint.h (encode_source_string): Constify.
849 * tui/tui-data.c (tui_partial_win_by_name): Constify.
850 * tui/tui-data.h (tui_partial_win_by_name): Constify.
851 * tui/tui-source.c (tui_set_source_content_nil): Constify.
852 * tui/tui-source.h (tui_set_source_content_nil): Constify.
853 * tui/tui-win.c (parse_scrolling_args): Constify.
854 * tui/tui-windata.c (tui_erase_data_content): Constify.
855 * tui/tui-windata.h (tui_erase_data_content): Constify.
856 * tui/tui-winsource.c (tui_erase_source_content): Constify.
857 * tui/tui.c (tui_enable): Add cast.
858 * utils.c (defaulted_query): Constify.
859 (init_page_info): Add cast.
860 (puts_debug, subset_compare): Constify.
861 * utils.h (subset_compare): Constify.
862 * varobj.c (varobj_format_string): Constify.
863 * varobj.h (varobj_format_string): Constify.
864 * vax-tdep.c (vax_register_name): Constify.
865 * windows-nat.c (windows_detach): Constify.
866 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
867 * xml-support.c (gdb_xml_end_element): Constify.
868 * xml-tdesc.c (tdesc_start_reg): Constify.
869 * xstormy16-tdep.c (xstormy16_register_name): Constify.
870 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
871 * xtensa-tdep.h (xtensa_register_t::name): Constify.
872
995816ba
PA
8732017-04-05 Pedro Alves <palves@redhat.com>
874
875 * proc-api.c (struct trans): Constify.
876 (procfs_note): Constify.
877 * proc-events.c (struct trans, syscall_table):
878 * proc-flags.c (struct trans): Constify.
879 * proc-utils.h (procfs_note): Constify.
880 * proc-why.c (struct trans): Constify.
881 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
882 (procfs_detach): Constify.
883 * sol-thread.c (struct string_map): Constify.
884 (td_err_string, td_state_string): Constify.
885
3e83a920
PA
8862017-04-05 Pedro Alves <palves@redhat.com>
887
888 * proc-api.c (procfs_filename): Don't initialize
889 procfs_filename.
890 (prepare_to_trace): Assume procfs_filename is non-NULL.
891 (_initialize_proc_api): Give procfs_filename a default value here.
892
63160a43
PA
8932017-04-05 Pedro Alves <palves@redhat.com>
894
895 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
896 'cond_string' parameter.
897 (extract_exception_regexp): Constify 'string' parameter.
898 (catch_exception_command_1): Constify.
899 * breakpoint.c (init_catchpoint)
900 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
901 parameter.
902 (ep_parse_optional_if_clause, catch_fork_command_1)
903 (catch_exec_command_1): Constify.
904 * breakpoint.h (init_catchpoint): Constify 'cond_string'
905 parameter.
906 (ep_parse_optional_if_clause): Constify.
907 * cli/cli-utils.c (remove_trailing_whitespace)
908 (check_for_argument): Constify.
909 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
910 non-const overload.
911 (check_for_argument): Likewise.
912
9b2eba3d
PA
9132017-04-05 Pedro Alves <palves@redhat.com>
914
915 * event-top.c (command_line_handler): Add cast to execute_command
916 call.
917 * record-btrace.c (cmd_record_btrace_bts_start)
918 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
919 (cmd_record_btrace_start): Add cast to execute_command call.
920 * record-full.c (record_full_goto_insn):
921 * record.c (record_start, record_stop): Add cast to
922 execute_command_to_string calls.
923 (cmd_record_start): Add cast to execute_command calls.
924
2adadf51
PA
9252017-04-05 Pedro Alves <palves@redhat.com>
926
927 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
928 static inline function.
929 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
930 array and use gdb_PyArg_ParseTupleAndKeywords.
931 * python/py-cmd.c (cmdpy_init): Likewise.
932 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
933 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
934 (infpy_search_memory): Likewise.
935 * python/py-objfile.c (objfpy_add_separate_debug_file)
936 (gdbpy_lookup_objfile): Likewise.
937 * python/py-symbol.c (gdbpy_lookup_symbol)
938 (gdbpy_lookup_global_symbol): Likewise.
939 * python/py-type.c (gdbpy_lookup_type): Likewise.
940 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
941 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
942 Likewise.
943
0d1f4ceb
PA
9442017-04-05 Pedro Alves <palves@redhat.com>
945
946 * python/python-internal.h (gdb_PyGetSetDef): New type.
947 * python/py-block.c (block_object_getset)
948 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
949 * python/py-event.c (event_object_getset)
950 (finish_breakpoint_object_getset): Likewise.
951 * python/py-inferior.c (inferior_object_getset): Likewise.
952 * python/py-infthread.c (thread_object_getset): Likewise.
953 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
954 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
955 * python/py-objfile.c (objfile_getset): Likewise.
956 * python/py-progspace.c (pspace_getset): Likewise.
957 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
958 Likewise.
959 * python/py-record.c (recpy_record_getset): Likewise.
960 * python/py-symbol.c (symbol_object_getset): Likewise.
961 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
962 Likewise.
963 * python/py-type.c (type_object_getset, field_object_getset):
964 Likewise.
965 * python/py-value.c (value_object_getset): Likewise.
966
4d759979
PA
9672017-04-05 Pedro Alves <palves@redhat.com>
968
969 * python/python-internal.h (gdb_PyObject_CallMethod)
970 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
971 New functions.
972 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
973 (PySys_GetObject, PySys_SetPath): New macros.
974
fdf9e36f
PA
9752017-04-05 Pedro Alves <palves@redhat.com>
976
977 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
978 info_osdata_command.
979 * osdata.c (info_osdata_command): Rename to ...
980 (info_osdata): ... this. Constify 'type' parameter, and remove
981 the 'from_tty' parameter. Accept NULL TYPE.
982 (info_osdata_command): New function.
983 * osdata.h (info_osdata_command): Remove declaration.
984 (info_osdata): New declaration.
985
9f33b8b7
PA
9862017-04-05 Pedro Alves <palves@redhat.com>
987
988 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
989 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
990 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
991 parameter.
992 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
993 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
994 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
995 parameter.
996 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
997 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
998 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
999 (mi_cmd_file_list_exec_source_files)
1000 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
1001 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
1002 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
1003 parameter.
1004 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
1005 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
1006 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
1007 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
1008 (mi_cmd_stack_info_frame): Constify 'command' parameter.
1009 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
1010 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
1011 'command' parameter.
1012 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
1013 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
1014 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
1015 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
1016 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
1017 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
1018 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
1019 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
1020 (mi_cmd_var_set_update_range): Constify 'command' parameter.
1021 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
1022 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
1023 parameter.
1024 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
1025 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
1026 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
1027 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
1028 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
1029 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
1030 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
1031 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
1032 (mi_cmd_data_list_changed_registers)
1033 (mi_cmd_data_write_register_values)
1034 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
1035 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
1036 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
1037 (mi_cmd_list_features, mi_cmd_list_target_features)
1038 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
1039 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
1040 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
1041 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
1042 (mi_cmd_trace_frame_collected): Constify 'command'
1043 parameter.
1044 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
1045 'command' parameter.
1046
67cb5b2d
PA
10472017-04-05 Pedro Alves <palves@redhat.com>
1048
1049 * ada-lang.c (ada_completer_word_break_characters): Now a const
1050 array.
1051 (ada_get_gdb_completer_word_break_characters): Constify.
1052 * completer.c (gdb_completer_command_word_break_characters)
1053 (gdb_completer_file_name_break_characters)
1054 (gdb_completer_quote_characters): Now const arrays.
1055 (get_gdb_completer_quote_characters): Constify.
1056 (set_rl_completer_word_break_characters): New function.
1057 (set_gdb_completion_word_break_characters)
1058 (complete_line_internal): Use it.
1059 * completer.h (get_gdb_completer_quote_characters): Constify.
1060 (set_rl_completer_word_break_characters): Declare.
1061 * f-lang.c (f_word_break_characters): Constify.
1062 * language.c (default_word_break_characters): Constify.
1063 * language.h (language_defn::la_word_break_characters): Constify.
1064 (default_word_break_characters): Constify.
1065 * top.c (init_main): Use set_rl_completer_word_break_characters.
1066
7a114964
PA
10672017-04-05 Pedro Alves <palves@redhat.com>
1068
1069 * aix-thread.c (aix_thread_pid_to_str)
1070 (aix_thread_extra_thread_info): Constify.
1071 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
1072 * bsd-uthread.c (bsd_uthread_extra_thread_info)
1073 (bsd_uthread_pid_to_str): Constify.
1074 * corelow.c (core_pid_to_str): Constify.
1075 * darwin-nat.c (darwin_pid_to_str): Constify.
1076 * fbsd-nat.c (fbsd_pid_to_str): Constify.
1077 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
1078 Constify.
1079 * gnu-nat.c (gnu_pid_to_str): Constify.
1080 * go32-nat.c (go32_pid_to_str): Constify.
1081 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
1082 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
1083 * inferior.c (inferior_pid_to_str): Constify.
1084 * linux-nat.c (linux_nat_pid_to_str): Constify.
1085 * linux-tdep.c (linux_core_pid_to_str): Constify.
1086 * linux-thread-db.c (thread_db_pid_to_str)
1087 (thread_db_extra_thread_info): Constify.
1088 * nto-tdep.c (nto_extra_thread_info): Constify.
1089 * nto-tdep.h (nto_extra_thread_info): Constify.
1090 * obsd-nat.c (obsd_pid_to_str): Constify.
1091 * procfs.c (procfs_pid_to_str): Constify.
1092 * ravenscar-thread.c (ravenscar_extra_thread_info)
1093 (ravenscar_pid_to_str): Constify.
1094 * remote-sim.c (gdbsim_pid_to_str): Constify.
1095 * remote.c (remote_threads_extra_info, remote_pid_to_str):
1096 Constify.
1097 * sol-thread.c (solaris_pid_to_str): Constify.
1098 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
1099 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
1100 * target.c (default_pid_to_str, target_pid_to_str)
1101 (normal_pid_to_str, default_pid_to_str): Constify.
1102 * target.h (target_ops::to_pid_to_str)
1103 (target_ops::to_extra_thread_info): Constify.
1104 (target_pid_to_str, normal_pid_to_str): Constify.
1105 * windows-nat.c (windows_pid_to_str): Constify.
1106 * gdbarch.sh (core_pid_to_str): Constify.
1107 * target-delegates.c: Regenerate.
1108 * gdbarch.h, gdbarch.c: Regenerate.
1109
69bbf465
PA
11102017-04-05 Pedro Alves <palves@redhat.com>
1111
1112 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
1113 the memory of the temporary warning_pre_print override.
1114 * utils.c (warning_pre_print): Constify.
1115 * utils.h (warning_pre_print): Constify.
1116
be47f9e8
PA
11172017-04-05 Pedro Alves <palves@redhat.com>
1118
1119 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
1120 (shell_command): New function.
1121 (make_command): Use std::string.
1122 (init_cli_cmds): Register shell_command instead of shell_escape.
1123
bde6261a
PA
11242017-04-05 Pedro Alves <palves@redhat.com>
1125
1126 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
1127 * tracepoint.c (default_collect): Don't initialize.
1128
b38ef47f
PA
11292017-04-05 Pedro Alves <palves@redhat.com>
1130
1131 * macroexp.c (macro_buffer::shared): Now a bool.
1132 (init_buffer): Update.
1133 (init_shared_buffer): Constify 'addr' parameter.
1134 (substitute_args, expand, macro_expand, macro_expand_next): Remove
1135 casts.
1136
f995bbe8
PA
11372017-04-05 Pedro Alves <palves@redhat.com>
1138
1139 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
1140 * disasm.c (set_disassembler_options): Constify local.
1141 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
1142
4a596fe2
SDJ
11432017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
1144
1145 PR gdb/21352
1146 * tracefile.c (tsave_command): Fix argument parsing for '-r'
1147 option.
1148
2cad08ea
YQ
11492017-04-05 Yao Qi <yao.qi@linaro.org>
1150
1151 * frame.c (frame_unwind_register_unsigned): Call
1152 frame_unwind_register_value.
1153
55a98976
YQ
11542017-04-05 Yao Qi <yao.qi@linaro.org>
1155
1156 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
1157 Use gdb_test_multiple, and don't match anchor.
1158
4ac40124
PA
11592017-04-05 Pedro Alves <palves@redhat.com>
1160
1161 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
1162 (Write After Approval): Remove Simon Marchi.
1163
c053b654
PA
11642017-04-05 Pedro Alves <palves@redhat.com>
1165
1166 * common/gdb_optional.h (optional::optional): Make constexpr and
1167 initialize m_dummy.
1168
4c7bf4f9
JB
11692017-04-04 John Baldwin <jhb@FreeBSD.org>
1170
1171 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
1172 (amd64fbsd_jmp_buf_reg_offset): Remove.
1173 (amd64fbsd_supply_uthread): Remove function.
1174 (amd64fbsd_collect_uthread): Remove function.
1175 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
1176 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
1177 (x86_64-*-freebsd*): Remove bsd-uthread.o.
1178 (fbsd-nat.c): Update comment.
1179 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
1180 (i386fbsd_jmp_buf_reg_offset): Remove.
1181 (i386fbsd_supply_uthread): Remove function.
1182 (i386fbsd_collect_uthread): Remove function.
1183 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
1184
1e1a8bef
JB
11852017-04-04 John Baldwin <jhb@FreeBSD.org>
1186
1187 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
1188 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
1189 * NEWS: Mention that support for FreeBSD/alpha was removed.
1190 * alpha-fbsd-tdep.c: Delete file.
1191 * config/alpha/fbsd.mh: Delete file.
1192 * configure.host: Delete alpha*-*-freebsd* and
1193 alpha*-*-kfreebsd*-gnu.
1194 * configure.tgt: Delete alpha*-*-freebsd* and
1195 alpha*-*-kfreebsd*-gnu.
1196
49907934
JB
11972017-04-04 John Baldwin <jhb@FreeBSD.org>
1198
1199 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
1200 amd64bsd_store_inferior_registers): Use ptid from regcache.
1201
6f77053d
PA
12022017-04-04 Pedro Alves <palves@redhat.com>
1203
1204 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
1205 data fields, make them private and add "m_" prefixes.
1206 (lnp_state_machine::lnp_state_machine): New ctor.
1207 (record_line, check_line_address, handle_set_discriminator)
1208 (handle_set_address, handle_advance_pc, handle_special_opcode)
1209 (handle_advance_line, handle_set_file, handle_negate_stmt)
1210 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
1211 (end_sequence, advance_line): New methods.
1212 (m_gdbarch, m_record_lines_p): New fields.
1213 (lnp_reader_state): Delete.
1214 (dwarf_record_line): Rename to ...
1215 (lnp_state_machine::record_line): ... adjust.
1216 (init_lnp_state_machine): Delete.
1217 (lnp_state_machine::lnp_state_machine): New.
1218 (check_line_address): Rename to ...
1219 (lnp_state_machine::check_line_address): This.
1220 (dwarf_decode_lines_1): Remove reference to "reader_state".
1221 Adjust lnp_state_machine having a non-default ctor. Use bool.
1222 State machine internal state manipulation moved to
1223 lnp_state_machine methods.
1224
9c541725
PA
12252017-04-04 Pedro Alves <palves@redhat.com>
1226
1227 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
1228 unittests/offset-type-selftests.c.
1229 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
1230 * common/offset-type.h: New file.
1231 * common/preprocessor.h: New file.
1232 * common/traits.h: New file.
1233 * common/valid-expr.h: New file.
1234 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
1235 sect_offset and cu_offset strong typedefs throughout.
1236 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
1237 typedefs throughout.
1238 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
1239 sect_offset and cu_offset strong typedefs throughout.
1240 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
1241 typedefs throughout.
1242 * gdbtypes.h: Include "common/offset-type.h".
1243 (cu_offset): Now an offset type (strong typedef) instead of a
1244 struct.
1245 (sect_offset): Likewise.
1246 (union call_site_parameter_u): Rename "param_offset" field to
1247 "param_cu_off".
1248 * unittests/offset-type-selftests.c: New file.
1249
ecfb656c
PA
12502017-04-04 Pedro Alves <palves@redhat.com>
1251
1252 * common/underlying.h: New file.
1253 * dwarf2read.c: Include "common/gdb_optional.h" and
1254 "common/underlying.h".
1255 (dir_index, file_name_index): New types.
1256 (file_entry): Use them.
1257 (file_entry::include): Use to_underlying.
1258 (line_header::add_file_name): Use dir_index.
1259 (read_formatted_entries): Use gdb::optional. Read form before
1260 writting to file_entry.
1261 (dwarf_decode_line_header): Use dir_index.
1262 (lnp_state_machine::current_file): Use to_underlying.
1263 (lnp_state_machine::file): Change type to file_name_index.
1264 (dwarf_record_line): Use to_underlying.
1265 (init_lnp_state_machine): Use file_name_index.
1266 (dwarf_decode_lines_1): Use dir_index and file_name_index.
1267
d194f1fe
PA
12682017-04-04 Pedro Alves <palves@redhat.com>
1269
1270 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
1271 operator bool, has_value and get methods.
1272
fff8551c
PA
12732017-04-04 Pedro Alves <palves@redhat.com>
1274
1275 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
1276 fields.
1277 (line_header): Initialize all data fields. Change type of
1278 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
1279 Change type of include_dirs to std::vector<const char *>. Remove
1280 num_include_dirs, include_dirs_size. Change type of file_names to
1281 std::vector<file_entry>. Remove num_file_names, file_names_size.
1282 (line_header::line_header): New.
1283 (line_header::add_include_dir, line_header::add_file_name): New
1284 methods.
1285 (line_header::include_dir_at): Remove NULL check.
1286 (line_header::file_name_at): Add const overload.
1287 (line_header_up): New unique_ptr typedef.
1288 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
1289 std::vector. Remove free_line_header call.
1290 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
1291 free_line_header call.
1292 (free_cu_line_header): Delete.
1293 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
1294 (setup_type_unit_groups): Use line_header_up instead of cleanups.
1295 Adjust to use std::vector.
1296 (free_line_header): Delete.
1297 (free_line_header_voidp): Use delete.
1298 (add_include_dir): Replace with ...
1299 (line_header::add_include_dir): ... this method. Use std::vector.
1300 (add_file_name): Replace with ...
1301 (line_header::add_file_name): ... this method. Use std::vector.
1302 (add_include_dir_stub): Delete.
1303 (read_formatted_entries): Remove memset.
1304 (dwarf_decode_line_header): Return a line_header_up instead of a
1305 raw pointer. Remove cleanup handling. Pass lambdas to
1306 read_formatted_entries. Adjust to use line_header methods.
1307 (dwarf_decode_lines_1): Adjust to use line_header methods.
1308 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
1309 use std::vector.
1310
d62a8ae2
SM
13112017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
1312
1313 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
1314 instead of struct ptid.
1315
db3a1dc7
AH
13162017-05-04 Alan Hayward <alan.hayward@arm.com>
1317
1318 * frame.c (get_frame_register_bytes): Unwind using value.
1319 (put_frame_register_bytes): Likewise.
1320
b1b45502
IB
13212017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
1322
1323 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
1324 aggregate-like.
1325
ec13808e
JK
13262017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
1327
1328 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
1329
12316564
YQ
13302017-03-29 Yao Qi <yao.qi@linaro.org>
1331
1332 * gdbthread.h (struct thread_info): Declare constructor and
1333 destructor. Add some in-class member initializers.
1334 * thread.c (free_thread): Remove.
1335 (init_thread_list): Call delete instead of free_thread.
1336 (new_thread): Call thread_info constructor.
1337 (thread_info::thread_info): New function.
1338 (thread_info::~thread_info): New function.
1339 (delete_thread_1): Call delete instead of free_thread.
1340 (make_cleanup_restore_current_thread): Move tp and frame to
1341 inner block.
1342
fe5f7374
AK
13432017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
1344
1345 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
1346 (arc_skip_prologue): Likewise.
1347 (arc_make_frame_cache): Likewise.
1348 (arc_pv_get_operand): New function.
1349 (arc_is_in_prologue): Likewise.
1350 (arc_analyze_prologue): Likewise.
1351 (arc_print_frame_cache): Likewise.
1352 (MAX_PROLOGUE_LENGTH): New constant.
1353
eea78757
AK
13542017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
1355
1356 * configure.tgt: Add arc-insn.o.
1357 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
1358 (dump_arc_instruction_command): New function.
1359 (arc_fprintf_disasm): Likewise.
1360 (arc_disassemble_info): Likewise.
1361 (arc_insn_get_operand_value): Likewise.
1362 (arc_insn_get_operand_value_signed): Likewise.
1363 (arc_insn_get_memory_base_reg): Likewise.
1364 (arc_insn_get_memory_offset): Likewise.
1365 (arc_insn_get_branch_target): Likewise.
1366 (arc_insn_dump): Likewise.
1367 (arc_insn_get_linear_next_pc): Likewise.
1368 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
1369 (arc_disassemble_info): Likewise.
1370 (arc_insn_get_branch_target): Likewise.
1371 (arc_insn_get_linear_next_pc): Likewise.
1372 * NEWS: Mention new "maint print arc arc-instruction".
1373
3be78afd
AK
13742017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
1375
1376 * arc-tdep (maintenance_print_arc_list): New variable.
1377 (maintenance_print_arc_command): New function.
1378
296ec4fa
AK
13792017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
1380
1381 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
1382 Add "limm" and "reserved".
1383 (arc_cannot_fetch_register, arc_cannot_store_register): Add
1384 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
1385 * arc-tdep.h (arc_regnum): Likewise.
1386
f74f865e
MF
13872017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1388
1389 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
1390 for THREADPTR register.
1391 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
1392 register.
1393 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
1394 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
1395 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
1396
0d0bf81a
MF
13972017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1398
1399 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
1400 registers above gdbarch_num_regs (gdbarch) as privileged in
1401 call0 ABI.
1402
0ce4291e
MF
14032017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1404
1405 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
1406 for a single specified register or for all registers in
1407 a0_base..a0_base + C0_NREGS range.
1408 (supply_gregset_reg): Call regcache_raw_supply for a single
1409 specified register or for all registers in a0_base..a0_base +
1410 C0_NREGS range.
1411
c56054f9
MF
14122017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1413
1414 * arch/xtensa.h (C0_NREGS): Add definition.
1415 * xtensa-tdep.c (C0_NREGS): Remove definition.
1416
a4398628
MF
14172017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1418
1419 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
1420 Drop xtensa_default_isa initialization.
1421 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
1422
8c43009f
PA
14232017-03-27 Pedro Alves <palves@redhat.com>
1424
1425 * dwarf2read.c (file_entry) <dir_index>: Add comment.
1426 (file_entry::include_dir): New method.
1427 (line_header::include_dir_at, line_header::file_name_at): New
1428 methods.
1429 (setup_type_unit_groups, setup_type_unit_groups)
1430 (psymtab_include_file_name): Simplify using the new methods.
1431 (lnp_state_machine) <the_line_header>: New field.
1432 <file>: Add comment.
1433 (lnp_state_machine::current_file): New method.
1434 (dwarf_record_line): Simplify using the new methods.
1435 (init_lnp_state_machine): Initialize the "the_line_header" field.
1436 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
1437 Simplify using the new methods.
1438
a7e80b9e
PA
14392017-03-27 Pedro Alves <palves@redhat.com>
1440
1441 * cp-name-parser.y (make_empty): Delete.
1442 (demangler_special, nested_name, ptr_operator, array_indicator)
1443 (direct_declarator, declarator_1): Use fill_comp instead of
1444 make_empty.
1445
21047726
PA
14462017-03-27 Pedro Alves <palves@redhat.com>
1447
1448 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
1449 to ATTRIBUTE_PRINTF.
1450 * solib-target.c (library_list_start_list): Print "string" not
1451 "version".
1452 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
1453 gdb_xml_error call.
1454
d721ba37
PA
14552017-03-27 Pedro Alves <palves@redhat.com>
1456
1457 * dwarf2read.c (struct file_and_directory): New.
1458 (dwarf2_get_dwz_file): Adjust to use std::string.
1459 (dw2_get_file_names_reader): Adjust to use file_and_directory.
1460 (find_file_and_directory): Adjust to return a file_and_directory
1461 object.
1462 (read_file_scope): Adjust to use file_and_directory. Remove
1463 make_cleanup/do_cleanups calls.
1464 (open_and_init_dwp_file): Adjust to use std::string. Remove
1465 make_cleanup/do_cleanups calls.
1466 * python/python.c (do_start_initialization): Adjust to ldirname
1467 returning a std::string.
1468 * utils.c (ldirname): Now returns a std::string.
1469 * utils.h (ldirname): Change return type to std::string.
1470 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
1471 returning a std::string.
1472 * xml-tdesc.c (file_read_description_xml): Likewise.
1473
ed771251
AH
14742017-03-24 Alan Hayward <alan.hayward@arm.com>
1475
1476 * regcache.c (regcache_debug_print_register): New function.
1477 * regcache.h (regcache_debug_print_register): New declaration.
1478 * target.c (debug_print_register): Remove.
1479 (target_fetch_registers): Call regcache_debug_print_register.
1480 (target_store_registers): Likewise.
1481
568c1b9f
PB
14822017-03-24 Pádraig Brady <pbrady@fb.com>
1483
1484 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
1485 reference beyond the 'lh->include_dirs' array before accessing to
1486 it.
1487 (psymtab_include_file_name): Likewise.
1488 (dwarf_decode_lines_1): Likewise.
1489 (dwarf_decode_lines): Likewise.
1490 (file_file_name): Likewise.
1491
3e00d44f
SM
14922017-03-23 Simon Marchi <simon.marchi@ericsson.com>
1493
1494 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
1495 inferior_ptid.
1496 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
1497 ps_lsetfpregs): Likewise.
1498 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
1499 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
1500 ps_lsetfpregs): Likewise.
1501 * target.c (target_fetch_registers, target_store_registers):
1502 Remove asserts.
1503
077ae656
AH
15042017-03-23 Alan Hayward <alan.hayward@arm.com>
1505
1506 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
1507
1e2b521d
YQ
15082017-03-23 Yao Qi <yao.qi@linaro.org>
1509
1510 * aarch64-tdep.c (aarch64_process_record_test): Declare.
1511 (_initialize_aarch64_tdep): Register it.
1512 (aarch64_record_load_store): Handle PRFM instruction.
1513 (aarch64_process_record_test): New function.
1514
33877125
YQ
15152017-03-23 Yao Qi <yao.qi@linaro.org>
1516
1517 * aarch64-tdep.c (aarch64_record_load_store): Fix code
1518 indentation.
1519
a0eef940
YQ
15202017-03-23 Yao Qi <yao.qi@linaro.org>
1521
1522 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
1523
3f2a3564
PR
15242017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
1525
1526 python/python.c (do_start_initialization): Fix memory leak.
1527
b67aeab0
SM
15282017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
1529
1530 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
1531 using get_ptrace_pid.
1532 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
1533 inferior_ptid.
1534 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
1535 inferior_ptid instead of pid.
1536
ffdbe864
YQ
15372017-03-22 Yao Qi <yao.qi@linaro.org>
1538
1539 * aarch64-tdep.c: Wrap locally used classes in anonymous
1540 namespace.
1541 * arm-tdep.c: Likewise.
1542 * linespec.c: Likewise.
1543 * ui-out.c: Likewise.
1544
9d736fbf
JG
15452017-03-22 Jonah Graham <jonah@kichwacoders.com>
1546
1547 PR gdb/19637
1548 * python/lib/gdb/printer/bound_registers.py: Import sys.
1549
3de88e9a
SM
15502017-03-21 Simon Marchi <simon.marchi@ericsson.com>
1551
1552 * windows-nat.c (do_windows_fetch_inferior_registers): Add
1553 windows_thread_info parameter and use it instead of
1554 current_thread.
1555 (windows_fetch_inferior_registers): Don't set current_thread,
1556 pass the thread to do_windows_fetch_inferior_registers. Use
1557 ptid from regcache instead of inferior_ptid.
1558 (do_windows_store_inferior_registers): Add windows_thread_info
1559 parameter and use it instead of current_thread.
1560 (windows_store_inferior_registers): Don't set current_thread,
1561 pass the thread to do_windows_store_inferior_registers. Use
1562 ptid from regcache instead of inferior_ptid.
1563
0e7b8f61
SM
15642017-03-21 Simon Marchi <simon.marchi@ericsson.com>
1565
1566 * ser-mingw.c (ser_windows_raw): Remove reference to
1567 struct serial::current_timeout.
1568
5badf10a
IR
15692017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
1570
1571 PR tdep/20928
1572 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
1573 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
1574 (sparc64_fsr_type): Fix %fsr decoding.
1575
cee59b3f
TW
15762017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
1577
1578 * python/py-record-btrace.c (btpy_insn_data): Change return type
1579 for Python 2.
1580
639a9038
SM
15812017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
1582
1583 * spu-linux-nat.c (spu_fetch_inferior_registers,
1584 spu_store_inferior_registers): Use ptid from regcache, set and
1585 restore inferior_ptid.
1586 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
1587 Likewise.
1588
bcc0c096
SM
15892017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
1590
1591 * i386-linux-nat.c (fetch_register, store_register,
1592 i386_linux_fetch_inferior_registers,
1593 i386_linux_store_inferior_registers): Use ptid from regcache.
1594 * ia64-linux-nat.c (ia64_linux_fetch_register,
1595 ia64_linux_store_register): Likewise.
1596 * inf-ptrace.c (inf_ptrace_fetch_register,
1597 inf_ptrace_store_register): Likewise.
1598 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
1599 m32r_linux_store_inferior_registers): Likewise.
1600 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
1601 m68kbsd_store_inferior_registers): Likewise.
1602 * m68k-linux-nat.c (fetch_register, store_register,
1603 m68k_linux_fetch_inferior_registers,
1604 m68k_linux_store_inferior_registers): Likewise.
1605 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
1606 m88kbsd_store_inferior_registers): Likewise.
1607 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
1608 mips_fbsd_store_inferior_registers): Likewise.
1609 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
1610 mips64_linux_regsets_store_registers): Likewise.
1611 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
1612 mipsnbsd_store_inferior_registers): Likewise.
1613 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
1614 mips64obsd_store_inferior_registers): Likewise.
1615 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
1616 Likewise.
1617 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
1618 ppcfbsd_store_inferior_registers): Likewise.
1619 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
1620 ppc_linux_store_inferior_registers): Likewise.
1621 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
1622 ppcnbsd_store_inferior_registers): Likewise.
1623 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
1624 ppcobsd_store_registers): Likewise.
1625 * procfs.c (procfs_fetch_registers, procfs_store_registers):
1626 Likewise.
1627 * ravenscar-thread.c (ravenscar_fetch_registers,
1628 ravenscar_store_registers, ravenscar_prepare_to_store):
1629 Likewise.
1630 * record-btrace.c (record_btrace_fetch_registers,
1631 record_btrace_store_registers, record_btrace_prepare_to_store):
1632 Likewise.
1633 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
1634 Lookup inferior using ptid from regcache, instead of
1635 current_inferior.
1636 * remote.c (remote_fetch_registers, remote_store_registers): Use
1637 ptid from regcache.
1638 * rs6000-nat.c (fetch_register, store_register): Likewise.
1639 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
1640 s390_linux_store_inferior_registers): Likewise.
1641 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
1642 shnbsd_store_inferior_registers): Likewise.
1643 * sol-thread.c (sol_thread_fetch_registers,
1644 sol_thread_store_registers): Likewise.
1645 * sparc-nat.c (sparc_fetch_inferior_registers,
1646 sparc_store_inferior_registers): Likewise.
1647 * tilegx-linux-nat.c (fetch_inferior_registers,
1648 store_inferior_registers): Likewise.
1649 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
1650 vaxbsd_store_inferior_registers): Likewise.
1651 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
1652 store_xtregs): Likewise.
1653
c0f55cc6
AV
16542017-03-20 Artemiy Volkov <artemiyv@acm.org>
1655
1656 PR gdb/14441
1657 * NEWS: Mention support for rvalue references in GDB and python.
1658 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
1659 supports both lvalue and rvalue references.
1660
15c0a2a9
AV
16612017-03-20 Artemiy Volkov <artemiyv@acm.org>
1662
1663 PR gdb/14441
1664 * gdbtypes.c (rank_one_type): Implement overloading
1665 resolution rules regarding rvalue references.
1666
aa006118
AV
16672017-03-20 Artemiy Volkov <artemiyv@acm.org>
1668
1669 PR gdb/14441
1670 * aarch64-tdep.c (aarch64_type_align)
1671 (aarch64_extract_return_value, aarch64_store_return_value): Change
1672 lvalue reference type checks to general reference type checks.
1673 * amd64-tdep.c (amd64_classify): Likewise.
1674 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
1675 Likewise.
1676 * arm-tdep.c (arm_type_align, arm_extract_return_value)
1677 (arm_store_return_value): Likewise.
1678 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
1679 * c-typeprint.c (c_print_type): Likewise.
1680 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
1681 (cplus_number_of_children, cplus_describe_child): Likewise.
1682 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
1683 * completer.c (expression_completer): Likewise.
1684 * cp-support.c (make_symbol_overload_list_adl_namespace):
1685 Likewise.
1686 * darwin-nat-info.c (info_mach_region_command): Likewise.
1687 * dwarf2loc.c (entry_data_value_coerce_ref)
1688 (value_of_dwarf_reg_entry): Likewise.
1689 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
1690 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
1691 Likewise.
1692 * findvar.c (extract_typed_address, store_typed_address):
1693 Likewise.
1694 * gdbtypes.c (rank_one_type): Likewise.
1695 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
1696 * infcall.c (value_arg_coerce): Likewise.
1697 * language.c (pointer_type): Likewise.
1698 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
1699 Likewise.
1700 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
1701 * mn10300-tdep.c (mn10300_type_align): Likewise.
1702 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
1703 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
1704 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
1705 Likewise.
1706 * printcmd.c (print_formatted, x_command): Likewise.
1707 * python/py-type.c (typy_get_composite, typy_template_argument):
1708 Likewise.
1709 * python/py-value.c (valpy_referenced_value)
1710 (valpy_get_dynamic_type, value_has_field): Likewise.
1711 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
1712 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
1713 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
1714 * spu-tdep.c (spu_scalar_value_p): Likewise.
1715 * symtab.c (lookup_symbol_aux): Likewise.
1716 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
1717 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
1718 Likewise.
1719 * valops.c (value_cast_pointers, value_cast)
1720 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
1721 (value_struct_elt, value_struct_elt_bitpos)
1722 (value_find_oload_method_list, find_overload_match)
1723 (value_rtti_indirect_type): Likewise.
1724 * valprint.c (val_print_scalar_type_p, generic_val_print):
1725 Likewise.
1726 * value.c (value_actual_type, value_as_address, unpack_long)
1727 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
1728 (coerce_ref): Likewise.
1729 * varobj.c (varobj_get_value_type): Likewise.
1730
3fcf899d
AV
17312017-03-20 Artemiy Volkov <artemiyv@acm.org>
1732
1733 PR gdb/14441
1734 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
1735 table of constants.
1736 * python/lib/gdb/command/explore.py: Support exploring values
1737 of rvalue reference types.
1738 * python/lib/gdb/types.py: Implement get_basic_type() for
1739 rvalue reference types.
1740 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
1741 constant.
1742 * python/py-value.c (valpy_getitem): Add an rvalue reference
1743 check.
1744 (valpy_reference_value): Add new parameter "refcode".
1745 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
1746 New wrappers for valpy_reference_value().
1747 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
1748 (gdbpy_invoke_xmethod): Likewise.
1749
4297a3f0
AV
17502017-03-20 Artemiy Volkov <artemiyv@acm.org>
1751
1752 PR gdb/14441
1753 * dwarf2read.c (process_die, read_type_die_1): Handle the
1754 DW_TAG_rvalue_reference_type DIE.
1755 (read_tag_reference_type): Add new parameter "refcode".
1756
e1cb3213
AV
17572017-03-20 Artemiy Volkov <artemiyv@acm.org>
1758
1759 PR gdb/14441
1760 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
1761 (c_type_print_modifier, c_type_print_varspec_suffix)
1762 (c_type_print_base): Support printing rvalue reference types.
1763 * c-valprint.c (c_val_print, c_value_print): Support printing
1764 rvalue reference values.
1765
e4347c89
AV
17662017-03-20 Artemiy Volkov <artemiyv@acm.org>
1767
1768 PR gdb/14441
1769 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
1770 typename.
1771 * cp-support.c (replace_typedefs): Handle
1772 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
1773 * python/py-type.c (typy_lookup_type): Likewise.
1774
53cc15f5
AV
17752017-03-20 Artemiy Volkov <artemiyv@acm.org>
1776
1777 PR gdb/14441
1778 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
1779 * parse.c (insert_type): Change assert statement.
1780 (follow_types): Handle rvalue reference types.
1781 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
1782 constant.
1783
a65cfae5
AV
17842017-03-20 Artemiy Volkov <artemiyv@acm.org>
1785
1786 PR gdb/14441
1787 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
1788 value_ref() interface.
1789 * c-valprint.c (c_value_print): Likewise.
1790 * infcall.c (value_arg_coerce): Likewise.
1791 * python/py-value.c (valpy_reference_value): Likewise.
1792 * valops.c (value_cast, value_reinterpret_cast)
1793 (value_dynamic_cast, typecmp): Likewise.
1794 (value_ref): Parameterize by kind of return value reference type.
1795 * value.h (value_ref): Add new parameter "refcode".
1796
3b224330
AV
17972017-03-20 Artemiy Volkov <artemiyv@acm.org>
1798
1799 PR gdb/14441
1800 * dwarf2read.c (read_tag_reference_type): Use
1801 lookup_lvalue_reference_type() instead of lookup_reference_type().
1802 * eval.c (evaluate_subexp_standard): Likewise.
1803 * f-exp.y: Likewise.
1804 * gdbtypes.c (make_reference_type, lookup_reference_type):
1805 Generalize with rvalue reference types.
1806 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
1807 convenience wrappers for lookup_reference_type().
1808 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
1809 reference kind parameter.
1810 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
1811 wrappers for lookup_reference_type().
1812 * guile/scm-type.c (gdbscm_type_reference): Use
1813 lookup_lvalue_reference_type() instead of lookup_reference_type().
1814 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
1815 * parse.c (follow_types): Likewise.
1816 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
1817 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
1818 Likewise.
1819 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
1820 (gdbpy_invoke_xmethod): Likewise.
1821 * stabsread.c: Provide extra argument to make_reference_type()
1822 call.
1823 * valops.c (value_ref, value_rtti_indirect_type): Use
1824 lookup_lvalue_reference_type() instead of lookup_reference_type().
1825
f9aeb8d4
AV
18262017-03-20 Artemiy Volkov <artemiyv@acm.org>
1827
1828 PR gdb/14441
1829 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
1830 (TYPE_IS_REFERENCE): New macro.
1831 (struct type): Add rvalue_reference_type field.
1832 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
1833
51457a05
MAL
18342017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
1835
1836 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
1837 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
1838 New function definition.
1839 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
1840 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
1841 New function declaration.
1842 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
1843 * mi/mi-interp.h: New file.
1844 * solib.c (info_sharedlibrary_command): Replace for loop with
1845 ALL_SO_LIBS macro
1846 * solib.h (update_solib_list): New function declaration.
1847 (so_list_head): Move macro.
1848 * solist.h (ALL_SO_LIBS): New macro.
1849
e696b3ad
MAL
18502017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
1851
1852 * infcmd.c (post_create_inferior): Remove unused argument in
1853 call to solib_add.
1854 * remote.c (remote_start_remote): Likewise.
1855 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
1856 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
1857 (enable_break): Likewise.
1858 * solib.c (update_solib_list): Remove unused target argument
1859 and its documentation.
1860 (solib_add): Remove unused target argument. Remove unused
1861 argument in call to update_solib_list.
1862 (info_sharedlibrary_command): Remove unused argument in call
1863 to update_solib_list.
1864 (sharedlibrary_command): Remove unused argument in call to
1865 solib_add.
1866 (handle_solib_event): Likewise.
1867 (reload_shared_libraries): Likewise.
1868 * solib.h (solib_add): Remove unused target argument.
1869
dcb84eda
AA
18702017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
1871
1872 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
1873 (s390_displaced_step_fixup): Cover relative branches with the
1874 default fixup handling. This fixes lack of support for some
1875 relative branch instructions.
1876
d9cb6cdc
SM
18772017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
1878
1879 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
1880 ptid from regcache.
1881
1afaf9f4
SM
18822017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
1883
1884 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
1885 i386_darwin_store_inferior_registers): Use ptid from regcache.
1886
aac12e24
SM
18872017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
1888
1889 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
1890 i386bsd_store_inferior_registers): Use ptid from regcache.
1891
bbe1eef1
SM
18922017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
1893
1894 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
1895 hppaobsd_store_registers): Use ptid from regcache.
1896
10799020
SM
18972017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
1898
1899 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
1900 hppanbsd_store_registers): Use ptid from regcache.
1901
00204cf7
SM
19022017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
1903
1904 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
1905 from regcache. Use get_ptrace_pid.
1906
11a33714
SM
19072017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
1908
1909 * corelow.c (get_core_register_section): Use ptid from regcache,
1910 update doc.
1911
317cd492
SM
19122017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
1913
1914 * bsd-uthread.c (bsd_uthread_fetch_registers,
1915 bsd_uthread_store_registers): Use ptid from regcache, set and
1916 restore inferior_ptid.
1917
9ac8a7c2
SM
19182017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
1919
1920 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
1921 fetch_fp_regs, store_register, store_regs, store_fp_register,
1922 store_fp_regs): Use ptid from regcache.
1923
4ac4bb6a
SM
19242017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
1925
1926 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
1927 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
1928 store_vfp_regs): Use ptid from regcache.
1929
9bcbdca8
PA
19302017-03-17 Pedro Alves <palves@redhat.com>
1931
1932 PR remote/21188
1933 * ser-base.c (ser_base_wait_for): Add comment.
1934 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
1935 version.
1936 * ser-unix.c (hardwire_raw): Remove reference to
1937 scb->current_timeout.
1938 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
1939 (hardwire_ops): Install ser_base_readchar instead of
1940 hardwire_readchar.
1941 * serial.h (struct serial) <current_timeout, timeout_remaining>:
1942 Remove fields.
1943
7503099f
JG
19442017-03-17 Jonah Graham <jonah@kichwacoders.com>
1945
1946 PR gdb/19637
1947 * python/lib/gdb/printer/bound_registers.py: Add support for
1948 Python 3.
1949
7942e96e
AA
19502017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1951
1952 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
1953 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
1954 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
1955 byte_offset to subobj_byte_offset. Fix the handling of
1956 DWARF_VALUE_STACK on big-endian targets when coming via an
1957 implicit pointer.
1958 (dwarf2_evaluate_loc_desc): Adjust call to
1959 dwarf2_evaluate_loc_desc_full.
1960 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
1961 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
1962
ba14f379
YQ
19632017-03-16 Yao Qi <yao.qi@linaro.org>
1964
1965 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
1966 and REVSH instructions.
1967
b121eeb9
YQ
19682017-03-16 Yao Qi <yao.qi@linaro.org>
1969
1970 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
1971 (arm_record_test): Declare.
1972 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
1973 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
1974 align with the manual.
1975 (thumb_record_misc): Adjust the code order to align with the
1976 manual.
1977 (thumb2_record_decode_insn_handler): Fix instruction matching.
1978 (instruction_reader_thumb): New class.
1979 (arm_record_test): New function.
1980
728a7913
YQ
19812017-03-16 Yao Qi <yao.qi@linaro.org>
1982
1983 * arm-tdep.c (abstract_memory_reader): New class.
1984 (instruction_reader): New class.
1985 (extract_arm_insn): Add argument 'reader'. Callers updated.
1986 (decode_insn): Likewise.
1987
34b43320
DE
19882017-03-16 Doug Evans <dje@google.com>
1989
a7c0469f
DE
1990 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
1991 member. Change type of TYPE member to SCM. All uses updated.
1992 (lsscm_make_lazy_string_smob): Add assert.
1993 (lsscm_make_lazy_string): Flag bad length values.
1994 (lsscm_elt_type): New function.
1995 (gdbscm_lazy_string_to_value): Rewrite to use
1996 lsscm_safe_lazy_string_to_value.
1997 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
1998 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
1999 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
2000 in incoming type.
2001 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
2002 * guile/scm-type.c (tyscm_scm_to_type): New function.
2003
20042017-03-15 Doug Evans <dje@google.com>
2005
34b43320
DE
2006 PR python/17728, python/18439, python/18779
2007 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
2008 member. Change type of TYPE member to PyObject *. All uses updated.
2009 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
2010 (gdbpy_create_lazy_string_object): Flag bad length values.
2011 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
2012 Handle typedefs in incoming type.
2013 (stpy_lazy_string_elt_type): New function.
2014 (gdbpy_extract_lazy_string): Call it.
2015 * python/py-value.c (valpy_lazy_string): Flag bad length values.
2016 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
2017 typedefs in incoming type.
2018
a3a5fecc
DE
20192017-03-16 Doug Evans <dje@google.com>
2020
2021 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
2022 * guile/scm-type.c (tyscm_scm_to_type): New function.
2023
28f1c605
JW
20242017-03-16 Jiong Wang <jiong.wang@arm.com>
2025
2026 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
2027 "ULONGEST" for "skip".
2028
87c336f6
AA
20292017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
2030
2031 PR gdb/21220
2032 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
2033 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
2034 (inf_ptrace_peek_poke): ...here. New function. Now also loop
2035 over ptrace peek/poke until end of buffer or error.
2036
cf81cf60
SM
20372017-03-14 Simon Marchi <simon.marchi@ericsson.com>
2038
2039 * parse.c (length_of_subexp): Make static.
2040 * parser-defs.h (length_of_subexp): Remove.
2041
a379284a
AA
20422017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
2043
2044 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
2045 as well.
2046
8a6200ba
PA
20472017-03-14 Pedro Alves <palves@redhat.com>
2048
2049 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
2050 (main): Use std::unique_ptr. Remove calls to
2051 cp_demangled_name_parse_free.
2052
f79ec206
SM
20532017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2054
2055 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
2056 alphabsd_store_inferior_registers): Use regcache->ptid instead
2057 of inferior_ptid.
2058
edb5fb00
SM
20592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2060
2061 * aix-thread.c (aix_thread_fetch_registers,
2062 aix_thread_store_registers): Use regcache->ptid instead of
2063 inferior_ptid.
2064
55119686
SM
20652017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2066
2067 * aarch64-linux-nat.c (fetch_gregs_from_thread,
2068 store_gregs_to_thread, fetch_fpregs_from_thread,
2069 store_fpregs_to_thread): Use regcache->ptid instead of
2070 inferior_ptid.
2071
6a06fbb7
SM
20722017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2073
2074 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
2075 amd64_linux_fetch_inferior_registers): Use regcache->ptid
2076 instead of inferior_ptid.
2077
c6386875
SM
20782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2079
2080 * target.c (target_fetch_registers, target_store_registers): Add
2081 assert.
2082
ddaaf0fb
SM
20832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2084
2085 * regcache.h (regcache_get_ptid): New function.
2086 * regcache.c (regcache_get_ptid): New function.
2087
b9da89d1 20882017-03-13 Mark Wielaard <mark@klomp.org>
2089
2090 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
2091
5f4d1085
KS
20922017-03-10 Keith Seitz <keiths@redhat.com>
2093
2094 PR c++/8218
2095 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
2096
c65d6b55
PA
20972017-03-08 Pedro Alves <palves@redhat.com>
2098
2099 PR gdb/18360
2100 * infrun.c (start_step_over, do_target_resume, resume)
2101 (restart_threads): Assert we're not resuming a thread that is
2102 meant to be stopped.
2103 (infrun_thread_stop_requested_callback): Delete.
2104 (infrun_thread_stop_requested): If the thread is internally
2105 stopped, queue a pending stop event and clear the thread's
2106 inline-frame state.
2107 (handle_stop_requested): New function.
2108 (handle_syscall_event, handle_inferior_event_1): Use
2109 handle_stop_requested.
2110 (handle_stop_requested): New function.
2111 (handle_signal_stop): Set the thread's stop_signal here instead of
2112 at caller.
2113 (finish_step_over): Clear step over info unconditionally.
2114 (handle_signal_stop): If the user had interrupted the event
2115 thread, consider the stop a random signal.
2116 (handle_signal_stop) <signal arrived while stepping over
2117 breakpoint>: Don't restart threads here.
2118 (stop_waiting): Don't clear step-over info here.
2119
15c22686
PA
21202017-03-08 Pedro Alves <palves@redhat.com>
2121
2122 PR 21206
2123 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
2124 goes to argument 2, not 1.
2125
6e5d74e7
PA
21262017-03-08 Pedro Alves <palves@redhat.com>
2127
2128 PR cli/21218
2129 * top.c (gdb_readline_wrapper): Avoid passing NULL to
2130 display_gdb_prompt.
2131 (command_line_input): Add comment.
2132
9753a2f6
PA
21332017-03-08 Pedro Alves <palves@redhat.com>
2134
2135 PR tui/21216
2136 * tui/tui-file.c (tui_file::write): New.
2137 * tui/tui-file.h (tui_file): Override "write".
2138 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
2139 factored out from ...
2140 (tui_puts): ... here.
2141 (tui_putc): Use them.
2142 (tui_write): New function.
2143 * tui/tui-io.h (tui_write): Declare.
2144
1672e0d9
SDJ
21452017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2146
2147 * Makefile.in (SFILES): Replace "environ.c" with
2148 "common/environ.c".
2149 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
2150 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
2151 to...
2152 * common/environ.c: ... here.
2153 * environ.h: Moved to...
2154 * common/environ.h: ... here.
2155
f7bb4e3a
PB
21562017-03-07 Peter Bergner <bergner@vnet.ibm.com>
2157
2158 * gdbarch.sh (pstring_ptr): New static function.
2159 (gdbarch_disassembler_options): Use it.
2160 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
2161 not valid_disassembler_option->name.
2162 * gdbarch.c: Regenerate.
2163
e45ced6c
PB
21642017-03-07 Peter Bergner <bergner@vnet.ibm.com>
2165
2166 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
2167
5f6fd321
PA
21682017-03-07 Pedro Alves <palves@redhat.com>
2169
2170 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
2171
6dbb839a 21722017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
4a612d6f
WT
2173
2174 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
2175 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
2176 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
6dbb839a 2177 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
4a612d6f 2178
d274ecf4
SM
21792017-03-06 Simon Marchi <simon.marchi@ericsson.com>
2180
2181 * xtensa-linux-nat.c (fetch_gregs): Remove const.
2182
df97be55
SM
21832017-03-03 Simon Marchi <simon.marchi@ericsson.com>
2184
2185 * remote.c (remote_add_target_side_commands): Use range-based
2186 for loop.
2187
7d45f3df
YQ
21882017-03-03 Yao Qi <yao.qi@linaro.org>
2189
2190 PR gdb/21165
2191 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
2192 value is lazy.
2193 * valprint.c (common_val_print): Likewise.
2194
65b48a81
PB
21952017-02-28 Peter Bergner <bergner@vnet.ibm.com>
2196
2197 * NEWS: Mention new set/show disassembler-options commands.
2198 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
2199 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
2200 (prospective_options): New static variable.
2201 (gdb_disassembler::gdb_disassembler): Initialize
2202 m_di.disassembler_options.
2203 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
2204 (get_disassembler_options): New function.
2205 (set_disassembler_options): Likewise.
2206 (set_disassembler_options_sfunc): Likewise.
2207 (show_disassembler_options_sfunc): Likewise.
2208 (disassembler_options_completer): Likewise.
2209 (_initialize_disasm): Likewise.
2210 * disasm.h (get_disassembler_options): New prototype.
2211 (set_disassembler_options): Likewise.
2212 * gdbarch.sh (gdbarch_disassembler_options): New variable.
2213 (gdbarch_verify_disassembler_options): Likewise.
2214 * gdbarch.c: Regenerate.
2215 * gdbarch.h: Likewise.
2216 * arm-tdep.c (num_disassembly_options): Delete.
2217 (set_disassembly_style): Likewise.
2218 (arm_disassembler_options): New static variable.
2219 (set_disassembly_style_sfunc): Convert short style name into long
2220 option name. Call set_disassembler_options.
2221 (show_disassembly_style_sfunc): New function.
2222 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
2223 set_gdbarch_verify_disassembler_options.
2224 (_initialize_arm_tdep): Delete regnames variable and update callers.
2225 (arm_disassembler_options): Initialize.
2226 (disasm_options): New variable.
2227 (num_disassembly_options): Rename from this...
2228 (num_disassembly_styles): ...to this. Compute by scanning through
2229 disasm_options.
2230 (valid_disassembly_styles): Initialize using disasm_options.
2231 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
2232 set_arm_regname_option.
2233 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
2234 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
2235 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
2236 set_gdbarch_verify_disassembler_options.
2237 * s390-tdep.c (s390_disassembler_options): New static variable.
2238 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
2239 set_gdbarch_verify_disassembler_options.
2240
d538e36d
SM
22412017-02-27 Simon Marchi <simon.marchi@ericsson.com>
2242
2243 * remote.c (remote_add_target_side_condition): Remove "struct"
2244 keyword from range-based for loop.
2245
83621223
SM
22462017-02-27 Simon Marchi <simon.marchi@ericsson.com>
2247
2248 * remote.c (remote_add_target_side_condition): Use range-based
2249 for loop. Update comment.
2250
2123df0e
YQ
22512017-02-27 Yao Qi <yao.qi@linaro.org>
2252
2253 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
2254
8e368124
AH
22552017-02-26 Alan Hayward <alan.hayward@arm.com>
2256
2257 * regcache.c (regcache_raw_update): New function.
2258 (regcache_raw_read): Move code to regcache_raw_update.
2259 * regcache.h (regcache_raw_update): New declaration.
2260 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
2261
a49dd8dd
JK
22622017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
2263
2264 * dwarf2read.c (create_debug_type_hash_table): Initialize
2265 header.signature and header.type_offset_in_tu.
2266
34e4bae9
PA
22672017-02-24 Pedro Alves <palves@redhat.com>
2268
2269 * symtab.c (make_file_symbol_completion_list_1): Use
2270 add_symtab_completions.
2271
b0e4b369
AH
22722017-02-24 Alan Hayward <alan.hayward@arm.com>
2273
2274 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
2275
975c21ab
AH
22762017-02-24 Alan Hayward <alan.hayward@arm.com>
2277
2278 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
2279 I386_MAX_REGISTER_SIZE.
2280 (i386_pseudo_register_write): Likewise.
2281 (i386_process_record): Likewise.
2282 * i387-tdep.c (i387_supply_xsave): Likewise.
2283 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
2284 (store_register): Likewise.
2285
14bc53a8
PA
22862017-02-23 Pedro Alves <palves@redhat.com>
2287
2288 * ada-lang.c: Include "common/function-view.h".
2289 (ada_iterate_over_symbols): Adjust to use function_view as
2290 callback type.
2291 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
2292 (ada_make_symbol_completion_list): Use a lambda.
2293 (ada_exc_search_name_matches): Delete.
2294 (name_matches_regex): New.
2295 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
2296 * compile/compile-c-support.c: Include "common/function-view.h".
2297 (print_one_macro): Change prototype to accept a ui_file pointer.
2298 (write_macro_definitions): Use a lambda.
2299 * dwarf2read.c: Include "common/function-view.h".
2300 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
2301 (dw2_expand_symtabs_matching): Adjust to use function_view as
2302 callback type.
2303 * language.h: Include "common/function-view.h".
2304 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
2305 function_view as callback type.
2306 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
2307 * linespec.c: Include "common/function-view.h".
2308 (collect_info::add_symbol): New method.
2309 (struct symbol_and_data_callback, iterate_inline_only, struct
2310 symbol_matcher_data, iterate_name_matcher): Delete.
2311 (iterate_over_all_matching_symtabs): Adjust to use function_view
2312 as callback type and lambdas.
2313 (iterate_over_file_blocks): Adjust to use function_view as
2314 callback type.
2315 (decode_compound_collector): Now a class with private fields.
2316 (decode_compound_collector::release_symbols): New method.
2317 (collect_one_symbol): Rename to...
2318 (decode_compound_collector::operator()): ... this and adjust.
2319 (lookup_prefix_sym): decode_compound_collector construction bits
2320 move to decode_compound_collector ctor. Pass the
2321 decode_compound_collector object directly as callback. Remove
2322 cleanups and use decode_compound_collector::release_symbols
2323 instead.
2324 (symtab_collector): Now a class with private fields.
2325 (symtab_collector::release_symtabs): New method.
2326 (add_symtabs_to_list): Rename to...
2327 (symtab_collector::operator()): ... this and adjust.
2328 (collect_symtabs_from_filename): symtab_collector construction
2329 bits move to symtab_collector ctor. Pass the symtab_collector
2330 object directly as callback. Remove cleanups and use
2331 symtab_collector::release_symtabs instead.
2332 (collect_symbols): Delete.
2333 (add_matching_symbols_to_info): Use lambdas.
2334 * macrocmd.c (print_macro_callback): Delete.
2335 (info_macro_command): Use a lambda.
2336 (info_macros_command): Pass print_macro_definition as callable
2337 directly.
2338 (print_one_macro): Remove 'ignore' parameter.
2339 (macro_list_command): Adjust.
2340 * macrotab.c (macro_for_each_data::fn): Now a function_view.
2341 (macro_for_each_data::user_data): Delete field.
2342 (foreach_macro): Adjust to call the function_view.
2343 (macro_for_each): Adjust to use function_view as callback type.
2344 (foreach_macro_in_scope): Adjust to call the function_view.
2345 (macro_for_each_in_scope): Adjust to use function_view as callback
2346 type.
2347 * macrotab.h: Include "common/function-view.h".
2348 (macro_callback_fn): Declare a prototype instead of a pointer.
2349 Remove "user_data" parameter.
2350 (macro_for_each, macro_for_each_in_scope): Adjust to use
2351 function_view as callback type.
2352 * psymtab.c (partial_map_expand_apply)
2353 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
2354 Adjust to use function_view as callback type and to return bool.
2355 (psym_expand_symtabs_matching): Adjust to use function_view as
2356 callback types.
2357 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
2358 to use function_view as callback type and to return bool.
2359 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
2360 callback types.
2361 * symfile.c (expand_symtabs_matching): Adjust to use function_view
2362 as callback types.
2363 * symfile.h: Include "common/function-view.h".
2364 (expand_symtabs_file_matcher_ftype)
2365 (expand_symtabs_symbol_matcher_ftype)
2366 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
2367 return bool.
2368 (quick_symbol_functions::map_symtabs_matching_filename)
2369 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
2370 function_view as callback type and return bool.
2371 (expand_symtabs_matching): Adjust to use function_view as callback
2372 type.
2373 (maintenance_expand_name_matcher)
2374 (maintenance_expand_file_matcher): Delete.
2375 (maintenance_expand_symtabs): Use lambdas.
2376 * symtab.c (iterate_over_some_symtabs): Adjust to use
2377 function_view as callback types and return bool.
2378 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
2379 of a cleanup.
2380 (lookup_symtab_callback): Delete.
2381 (lookup_symtab): Use a lambda.
2382 (iterate_over_symbols): Adjust to use function_view as callback
2383 type.
2384 (struct search_symbols_data, search_symbols_file_matches)
2385 (search_symbols_name_matches): Delete.
2386 (search_symbols): Use a pair of lambdas.
2387 (struct add_name_data, add_macro_name, symbol_completion_matcher)
2388 (symtab_expansion_callback): Delete.
2389 (default_make_symbol_completion_list_break_on_1): Use lambdas.
2390 * symtab.h: Include "common/function-view.h".
2391 (iterate_over_some_symtabs): Adjust to use function_view as
2392 callback type and return bool.
2393 (iterate_over_symtabs): Adjust to use function_view as callback
2394 type.
2395 (symbol_found_callback_ftype): Remove 'data' parameter and return
2396 bool.
2397 (iterate_over_symbols): Adjust to use function_view as callback
2398 type.
2399
07e253aa
PA
24002017-02-23 Pedro Alves <palves@redhat.com>
2401
2402 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
2403 (%.o) <unittests/%.c>: New pattern.
2404 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
2405 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
2406 * common/function-view.h: New file.
2407 * unittests/function-view-selftests.c: New file.
2408 * configure: Regenerate.
2409
8eaf5320
SM
24102017-02-23 Simon Marchi <simon.marchi@ericsson.com>
2411
2412 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
2413 inferior_ptid.
2414 * go32-nat.c (go32_thread_alive): Likewise.
2415
38768751
YQ
24162017-02-23 Yao Qi <yao.qi@linaro.org>
2417
2418 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
2419 delete.
2420
0a8beaba
YQ
24212017-02-23 Yao Qi <yao.qi@linaro.org>
2422
2423 * varobj.c (varobj_clear_saved_item): Use delete instead of
2424 xfree.
2425 (update_dynamic_varobj_children): Likewise.
2426
58fdfd2c
JK
24272017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2428
2429 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
2430
1b90b139
SM
24312017-02-21 Simon Marchi <simon.marchi@ericsson.com>
2432
2433 * common/enum-flags.h (enum_flags::enum_flags): Initialize
2434 m_enum_value to 0 in default constructor.
2435
2039d74e
EBM
24362017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2437
2438 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
2439 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
2440 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
2441 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
2442 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
2443 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
2444 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
2445 IS_STORE_CONDITIONAL_INSN.
2446
7814882a
JK
24472017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2448
2449 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
2450
0ae60b63
JK
24512017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2452
2453 * NEWS (Changes since GDB 7.12): Add DWARF-5.
2454
0224619f
JK
24552017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2456
2457 * dwarf2read.c (skip_one_die, read_attribute_value)
2458 (dwarf2_const_value_attr, dump_die_shallow)
2459 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
2460 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
2461
0af92d60
JK
24622017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2463
2464 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
2465 (dwarf_parse_macro_header): Accept DWARF version 5.
2466 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
2467
216f72a1
JK
24682017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2469
2470 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
2471 DW_AT_GNU_*.
2472 * common/common-exceptions.h (enum errors): Likewise.
2473 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
2474 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
2475 (dwarf_expr_context::execute_stack_op): Likewise.
2476 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
2477 Likewise.
2478 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
2479 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
2480 (show_entry_values_debug, call_site_to_target_addr)
2481 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
2482 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
2483 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
2484 (value_of_dwarf_block_entry, indirect_pieced_value)
2485 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
2486 (disassemble_dwarf_expression): Likewise.
2487 * dwarf2read.c (process_die, inherit_abstract_dies)
2488 (read_call_site_scope): Likewise.
2489 * gdbtypes.h (struct func_type, struct call_site_parameter)
2490 (struct call_site): Likewise.
2491 * stack.c (read_frame_arg): Likewise.
2492 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
2493
43988095
JK
24942017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2495
2496 * defs.h (read_unsigned_leb128): New declaration.
2497 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
2498 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
2499 (dwarf2_find_location_expression): Call also
2500 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
2501 * dwarf2loc.h (dwarf2_version): New declaration.
2502 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
2503 rnglists.
2504 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
2505 .debug_rnglists.
2506 (struct dwop_section_names): Add loclists_dwo.
2507 (dwop_section_names): Add .debug_loclists.dwo.
2508 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
2509 (struct dwarf2_per_cu_data): Add dwarf_version.
2510 (struct dwo_sections): Add loclists.
2511 (struct attr_abbrev): Add implicit_const.
2512 (read_indirect_line_string): New declaration.
2513 (read_unsigned_leb128): Delete declaration.
2514 (rcuh_kind): New definition.
2515 (read_and_check_comp_unit_head): Change parameter
2516 is_debug_types_section to section_kind.
2517 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
2518 (read_comp_unit_head): Change parameter abfd to section, add parameter
2519 section_kind. Handle DWARF-5.
2520 (error_check_comp_unit_head): Accept also DWARF version 5.
2521 (read_and_check_comp_unit_head): Change parameter
2522 is_debug_types_section to section_kind.
2523 (read_and_check_type_unit_head): Delete function.
2524 (read_abbrev_offset): Handle DWARF-5.
2525 (create_debug_type_hash_table): Add parameter section_kind. Process
2526 only DW_UT_type. Use signature and type_offset_in_tu from struct
2527 comp_unit_head.
2528 (create_debug_types_hash_table): Update create_debug_type_hash_table
2529 caller.
2530 (create_all_type_units): Call create_debug_type_hash_table.
2531 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
2532 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
2533 caller.
2534 (skip_one_die): Handle DW_FORM_implicit_const.
2535 (dwarf2_rnglists_process): New function.
2536 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
2537 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
2538 (read_attribute_value): Handle DW_FORM_implicit_const,
2539 DW_FORM_line_strp.
2540 (read_attribute): Handle DW_FORM_implicit_const.
2541 (read_indirect_string_at_offset_from): New function from
2542 read_indirect_string_at_offset.
2543 (read_indirect_string_at_offset): Call
2544 read_indirect_string_at_offset_from.
2545 (read_indirect_line_string_at_offset): New function.
2546 (read_indirect_string): New function comment.
2547 (read_indirect_line_string): New function.
2548 (read_unsigned_leb128): Make it global.
2549 (dwarf2_string_attr): Handle DWARF-5.
2550 (add_include_dir_stub, read_formatted_entries): New functions.
2551 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
2552 Handle DWARF-5.
2553 (per_cu_header_read_in): Update read_comp_unit_head caller.
2554 (dwarf2_version): New function.
2555 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
2556 rnglists.
2557 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
2558 fields.
2559
22d2f3ab
JK
25602017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2561
2562 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
2563
5f46c5a5
JK
25642017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2565
2566 * dwarf2read.c (dwarf2_ranges_process): New function from
2567 dwarf2_ranges_read.
2568 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
2569 dwarf2_ranges_process.
2570
78d4d2c5
JK
25712017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
2572
2573 * dwarf2read.c (create_debug_type_hash_table): New function from
2574 create_debug_types_hash_table.
2575 (create_debug_types_hash_table): Call create_debug_type_hash_table.
2576 (create_all_type_units, open_and_init_dwo_file): Update
2577 create_debug_types_hash_table callers.
2578
1b076f25
SDJ
25792017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
2580
2581 PR gdb/16188
2582 * fork-child.c (trace_start_error): Fix thinko. va_end should
2583 refer to 'ap', not 'args'.
2584
0db8980c
SDJ
25852017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
2586 Pedro Alves <palves@redhat.com>
2587
2588 PR gdb/16188
2589 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
2590 calls succeeded.
2591 * fork-child.c (trace_start_error): New function.
2592 (trace_start_error_with_name): Likewise.
2593 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
2594 * inf-ptrace.c (inf_ptrace_me): Likewise.
2595 * inferior.h (trace_start_error): New prototype.
2596 (trace_start_error_with_name): Likewise.
2597
99e8a4f9
SDJ
25982017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
2599
2600 PR gdb/21164
2601 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
2602 NULL before using it.
2603 * symmisc.c (maintenance_print_symbols): Likewise.
2604 (maintenance_print_msymbols): Likewise.
2605
4e746bb6
TW
26062017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2607
2608 * NEWS: Add record Python bindings entry.
2609
26102017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2611
2612 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
2613 py-record-full.o.
2614 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
2615 * python/py-record-btrace.c, python/py-record-btrace.h,
2616 python/py-record-full.c, python/py-record-full.h: New file.
2617 * python/py-record.c: Add include for py-record-btrace.h and
2618 py-record-full.h.
2619 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
2620 recpy_instruction_history, recpy_function_call_history, recpy_begin,
2621 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
2622 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
2623 New definition.
2624 (gdbpy_initialize_btrace): New export.
2625 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
2626
26272017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2628
2629 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
2630 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
2631 * python/py-record.c: New file.
2632 * python/python-internal.h (gdbpy_start_recording,
2633 gdbpy_current_recording, gdpy_stop_recording,
2634 gdbpy_initialize_record): New export.
2635 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
2636 (python_GdbMethods): Add gdbpy_start_recording,
2637 gdbpy_current_recording and gdbpy_stop_recording.
2638
26392017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2640
2641 * record-btrace.c (record_btrace_record_method): New function.
2642 (init_record_btrace_ops): Initialize to_record_method.
2643 * record-full.c (record_full_record_method): New function.
2644 (init_record_full_ops, init_record_full_core_ops): Add
2645 record_full_record_method.
2646 * record.h (enum record_method): New enum.
2647 * target-debug.h (target_debug_print_enum_record_method: New define.
2648 * target-delegates.c: Regenerate.
2649 * target.c (target_record_method): New function.
2650 * target.h: Include record.h.
2651 (struct target_ops) <to_record_method>: New field.
2652 (target_record_method): New export.
2653
26542017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2655
2656 * record.h (record_start, record_stop): New export.
2657 * record.c (record_start, record_stop): New function.
2658
26592017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2660
2661 * btrace.c (btrace_fetch): Copy function call segments pointer
2662 into a vector.
2663 (btrace_clear): Clear the vector.
2664 (btrace_find_insn_by_number): Use binary search to find the correct
2665 function call segment.
2666 * btrace.h (brace_fun_p): New typedef.
2667 (struct btrace_thread_info) <functions>: New field.
2668
26692017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2670
2671 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
2672 * btrace.c (btrace_decode_error): ... here. New function.
2673 * btrace.h (btrace_decode_error): New export.
2674
26752017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
2676
2677 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
2678 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
2679 btrace_find_insn_by_number): Remove special case for gaps.
2680 * btrace.h (btrace_insn_get_error): New export.
2681 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
2682 * record-btrace.c (btrace_insn_history): Print number for gaps.
2683 (record_btrace_info, record_btrace_goto): Handle gaps.
2684
3f77c769
TT
26852017-02-14 Tom Tromey <tom@tromey.com>
2686
2687 PR python/13598:
2688 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
2689 event.
2690 * python/py-evts.c (gdbpy_initialize_py_events): Add
2691 before_prompt registry.
2692 * python/py-events.h (events_object) <before_prompt>: New field.
2693
4c2c7ac6
MM
26942017-02-14 Markus Metzger <markus.t.metzger@intel.com>
2695
2696 * btrace.c (ftrace_new_switch): Preserve up link and flags.
2697
5cf30ebf
LM
26982017-02-13 Luis Machado <lgustavo@codesourcery.com>
2699
2700 * symfile (_initialize_symfile): Add usage text to the load command's
2701 help text.
2702
26a06916
SM
27032017-02-10 Simon Marchi <simon.marchi@ericsson.com>
2704
2705 * utils.c (defaulted_query): Don't query on secondary UIs.
2706
0b145e37
TT
27072017-02-10 Tom Tromey <tom@tromey.com>
2708
2709 * rust-lang.c (rust_get_disr_info): Remove unused variable.
2710
2d8365c4
TT
27112017-02-10 Tom Tromey <tom@tromey.com>
2712
2713 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
2714 "cleanup" local.
2715 * python/py-type.c (typy_legacy_template_argument): Remove
2716 unnecessary "cleanup" local.
2717
2bb8f231
TT
27182017-02-10 Tom Tromey <tom@tromey.com>
2719
2720 * python/python.c (do_start_initialization): New function, from
2721 _initialize_python.
2722 (_initialize_python): Call do_start_initialization.
2723 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
2724 goto.
2725
1bdfaf42
TT
27262017-02-10 Tom Tromey <tom@tromey.com>
2727
2728 * python/py-prettyprint.c (pretty_print_one_value): Use
2729 gdbpy_ref.
2730
88b6faea
TT
27312017-02-10 Tom Tromey <tom@tromey.com>
2732
2733 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
2734 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
2735 gdbpy_ref.
2736 * python/py-type.c (field_new): Use gdbpy_ref.
2737 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
2738 gdbpy_ref.
2739 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
2740 (py_free_pspace): Likewise.
2741 (pspace_to_pspace_object): Likewise.
2742 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
2743 (py_free_objfile): Likewise.
2744 (objfile_to_objfile_object): Likewise.
2745 * python/py-inferior.c (delete_thread_object): Use
2746 gdbpy_ref.
2747 (infpy_read_memory): Likewise.
2748 (py_free_inferior): Likewise.
2749 * python/py-evtregistry.c (create_eventregistry_object): Use
2750 gdbpy_ref.
2751 * python/py-event.c (create_event_object): Use gdbpy_ref.
2752
7780f186
TT
27532017-02-10 Tom Tromey <tom@tromey.com>
2754
2755 * python/py-ref.h (gdbpy_ref_policy): Now a template.
2756 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
2757 used.
2758 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
2759 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
2760 python/py-exitedevent.c, python/py-finishbreakpoint.c,
2761 python/py-framefilter.c, python/py-function.c,
2762 python/py-inferior.c, python/py-infevents.c,
2763 python/py-linetable.c, python/py-newobjfileevent.c,
2764 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
2765 python/py-signalevent.c, python/py-stopevent.c,
2766 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
2767 python/py-unwind.c, python/py-utils.c, python/py-value.c,
2768 python/py-varobj.c, python/py-xmethods.c, python/python.c,
2769 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
2770
d4b0bb18
TT
27712017-02-10 Tom Tromey <tom@tromey.com>
2772
2773 * ui-out.h (ui_out_emit_type): New class.
2774 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
2775 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
2776 and ui_out_emit_tuple.
2777 (enumerate_locals): Likewise.
2778 (py_mi_print_variables, py_print_locals, py_print_args): Use
2779 ui_out_emit_list.
2780 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
2781 ui_out_emit_list.
2782 * common/gdb_optional.h: New file.
2783
f67f945c
MG
27842017-02-10 Martin Galvan <martingalvan@sourceware.org>
2785
2786 * MAINTAINERS (Write After Approval): Update my e-mail address.
2787
18da0c51
MG
27882017-02-10 Martin Galvan <martingalvan@sourceware.org>
2789
2790 PR gdb/21122
2791 * breakpoint.c (_initialize_breakpoint): Update the help description
2792 of the 'commands' command to indicate that it takes a list argument.
2793
62c14536
SM
27942017-02-09 Simon Marchi <simon.marchi@ericsson.com>
2795
2796 * interps.c (current_interp_set_logging): Remove "return".
2797
ff6fa247
GB
27982017-02-09 Gary Benson <gbenson@redhat.com>
2799
2800 * symtab.c (add_symtab_completions): Prevent NULL pointer
2801 dereference.
2802
a474bd8e
PA
28032017-02-08 Pedro Alves <palves@redhat.com>
2804
2805 * interps.c (interp::interp): Remove reference to quiet_p.
2806 (interp_set): Make static. Remove dead "Switching to" output
2807 code.
2808 (interp_quiet_p, interp_set_quiet): Delete.
2809 (interpreter_exec_cmd): Don't set the interpreter quiet.
2810 * interps.h (interp_quiet_p): Make static.
2811 (class interp) <quiet_p>: Remove field
2812
3d7b173c
JG
28132017-02-08 Jerome Guitton <guitton@adacore.com>
2814
604c4576
JG
2815 * cli/cli-decode.c (find_command_name_length): Make it extern.
2816 * cli/cli-decode.h (find_command_name_length): Declare.
2817 * cli/cli-script.c (command_name_equals, line_first_arg):
2818 New functions.
2819 (process_next_line): Use cli-decode to parse command names.
2820 (build_command_line): Make args a constant pointer.
2821
28222017-02-08 Jerome Guitton <guitton@adacore.com>
6dbb839a 2823
3d7b173c
JG
2824 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
2825 Remove case-insensitive search.
2826
1291063d
JM
28272017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
2828
2829 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
2830 at the end of the line. Avoids an ARI warning.
2831
20b477a7
LM
28322017-02-06 Luis Machado <lgustavo@codesourcery.com>
2833
2834 * NEWS: Mention support for record/replay of Intel 64 rdrand and
2835 rdseed instructions.
2836 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
2837
3f7b46f2
IR
28382017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
2839
2840 PR tdep/20936
2841 Provide and use sparc32 and sparc64 target description XML files.
2842 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
2843 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
2844 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
2845 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
2846 * features/sparc/sparc32-solaris.xml: New file.
2847 * features/sparc/sparc64-solaris.xml: New file.
2848 * features/sparc/sparc32-solaris.c: Generated.
2849 * features/sparc/sparc64-solaris.c: Generated.
2850 * sparc-tdep.h: Account for differences in target descriptions.
2851 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
2852 (sparc32_register_type): Use target provided registers.
2853 (validate_tdesc_registers): New function.
2854 (sparc32_gdbarch_init): Use tdesc_has_registers.
2855 Set pseudoregister functions.
2856 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
2857 (sparc64_register_type): Use target provided registers.
2858 (sparc64_init_abi): Set pseudoregister functions.
2859
f0fd41c1
TT
28602017-02-03 Tom Tromey <tom@tromey.com>
2861
2862 PR rust/21097:
2863 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
2864 with a single member.
2865
d6f9b0fb
PA
28662017-02-03 Pedro Alves <palves@redhat.com>
2867
2868 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
2869 (cli_interp_base::~cli_interp_base): New.
2870 (cli_interp): New struct.
2871 (as_cli_interp): Cast the interp itself to cli_interp.
2872 (cli_interpreter_pre_command_loop): Rename to ...
2873 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
2874 parameter.
2875 (cli_interpreter_init): Rename to ...
2876 (cli_interp::init): ... this. Remove 'self' parameter. Use
2877 boolean. Make extern.
2878 (cli_interpreter_resume): Rename to ...
2879 (cli_interp::resume): ... this. Remove 'data' parameter. Make
2880 extern.
2881 (cli_interpreter_suspend): Rename to ...
2882 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
2883 extern.
2884 (cli_interpreter_exec): Rename to ...
2885 (cli_interp::exec): ... this. Remove 'data' parameter. Make
2886 extern.
2887 (cli_interpreter_supports_command_editing): Rename to ...
2888 (cli_interp_base::supports_command_editing): ... this. Remove
2889 'interp' parameter. Make extern.
2890 (cli_ui_out): Rename to ...
2891 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
2892 Make extern.
2893 (cli_set_logging): Rename to ...
2894 (cli_interp_base::set_logging): ... this. Remove 'interp'
2895 parameter. Make extern.
2896 (cli_interp_procs): Delete.
2897 (cli_interp_factory): Adjust to use "new".
2898 * cli/cli-interp.h: Include "interps.h".
2899 (struct cli_interp_base): New struct.
2900 * interps.c (struct interp): Delete. Fields moved to interps.h.
2901 (interp_new): Delete.
2902 (interp::interp, interp::~interp): New.
2903 (interp_set): Use bool, and return void. Assume the interpreter
2904 has suspend, init and resume methods, and that the all return
2905 void.
2906 (set_top_level_interpreter): interp_set returns void.
2907 (interp_ui_out): Adapt.
2908 (current_interp_set_logging): Adapt.
2909 (interp_data): Delete.
2910 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
2911 (interp_exec): Adapt.
2912 (top_level_interpreter_data): Delete.
2913 * interps.h (interp_init_ftype, interp_resume_ftype)
2914 (interp_suspend_ftype, interp_exec_ftype)
2915 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
2916 (class interp): New.
2917 (interp_new): Delete.
2918 (interp_set): Now returns void. Use bool.
2919 (interp_data, top_level_interpreter_data): Delete.
2920 * mi/mi-common.h: Include interps.h.
2921 (class mi_interp): Inherit from interp. Define a ctor. Declare
2922 init, resume, suspect, exec, interp_ui_out, set_logging and
2923 pre_command_loop methods.
2924 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
2925 (mi_interpreter_init): Rename to ...
2926 (mi_interp::init): ... this. Remove the 'interp' parameter, use
2927 bool, return void and make extern. Adjust.
2928 (mi_interpreter_resume): ... Rename to ...
2929 (mi_interp::resume): ... this. Remove the 'data' parameter,
2930 return void and make extern. Adjust.
2931 (mi_interpreter_suspend): ... Rename to ...
2932 (mi_interp::suspend): ... this. Remove the 'data' parameter,
2933 return void and make extern. Adjust.
2934 (mi_interpreter_exec): ... Rename to ...
2935 (mi_interp::exec): ... this. Remove the 'data' parameter and make
2936 extern. Adjust.
2937 (mi_interpreter_pre_command_loop): ... Rename to ...
2938 (mi_interp::pre_command_loop): ... this. Remove the 'self'
2939 parameter and make extern.
2940 (mi_on_normal_stop_1): Adjust.
2941 (mi_ui_out): Rename to ...
2942 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
2943 parameter and make extern. Adjust.
2944 (mi_set_logging): Rename to ...
2945 (mi_interp::set_logging): ... this. Remove the 'interp'
2946 parameter and make extern. Adjust.
2947 (mi_interp_procs): Delete.
2948 (mi_interp_factory): Adjust to use 'new'.
2949 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
2950 (mi_print_exception, mi_execute_command, mi_load_progress):
2951 Adjust.
2952 * tui/tui-interp.c (tui_interp): New class.
2953 (as_tui_interp): Return a tui_interp pointer.
2954 (tui_on_normal_stop, tui_on_signal_received)
2955 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
2956 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
2957 to use interp::interp_ui_out.
2958 (tui_init): Rename to ...
2959 (tui_interp::init): ... this. Remove the 'self' parameter, use
2960 bool, return void and make extern. Adjust.
2961 (tui_resume): Rename to ...
2962 (tui_interp::resume): ... this. Remove the 'data' parameter,
2963 return void and make extern. Adjust.
2964 (tui_suspend): Rename to ...
2965 (tui_interp::suspend): ... this. Remove the 'data' parameter,
2966 return void and make extern. Adjust.
2967 (tui_ui_out): Rename to ...
2968 (tui_interp::interp_ui_out): ... this. Remove the 'self'
2969 parameter, and make extern. Adjust.
2970 (tui_exec): Rename to ...
2971 (tui_interp::exec): ... this. Remove the 'data' parameter and
2972 make extern.
2973 (tui_interp_procs): Delete.
2974 (tui_interp_factory): Use "new".
2975
65c40c95
TT
29762017-02-02 Tom Tromey <tom@tromey.com>
2977
2978 * rust-exp.y (ends_raw_string, space_then_number)
2979 (rust_identifier_start_p): Return bool.
2980 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
2981 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
2982 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
2983 (rust_chartype_p): Return bool.
2984 (val_print_struct, rust_print_struct_def, rust_print_type):
2985 Update.
2986 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
2987 Return bool.
2988
b50f188d
TT
29892017-02-02 Tom Tromey <tom@tromey.com>
2990
2991 * rust-lang.c: Reindent.
2992
03c85b11
TT
29932017-02-02 Tom Tromey <tom@tromey.com>
2994
2995 * rust-lang.h (rust_crate_for_block): Update.
2996 * rust-lang.c (rust_crate_for_block): Return std::string.
2997 (rust_get_disr_info): Use std:;string, not
2998 gdb::unique_xmalloc_ptr.
2999 * rust-exp.y (crate_name): Update.
3000
9b6da501
PA
30012017-02-02 Pedro Alves <palves@redhat.com>
3002
3003 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
3004 field out of gdb_disassembler_test and make it static.
3005
ec4cb20b
PA
30062017-02-02 Pedro Alves <palves@redhat.com>
3007
3008 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
3009 mi1_interp and mi_interp fields.
3010
5be5dbf0
PA
30112017-02-02 Pedro Alves <palves@redhat.com>
3012
616268b6
PA
3013 * cli/cli-interp.c (struct saved_output_files, saved_output):
3014 Moved from cli/cli-logging.c.
3015 (cli_set_logging): New function.
3016 (cli_interp_procs): Install cli_set_logging.
3017 * cli/cli-interp.h (make_logging_output, cli_set_logging):
3018 Declare.
3019 * cli/cli-logging.c (struct saved_output_files, saved_output):
3020 Moved to cli/cli-interp.c.
3021 (pop_output_files): Don't save outputs here.
3022 (make_logging_output): New function.
3023 (handle_redirections): Don't build tee nor save previous outputs
3024 here.
3025 * interps.c (current_interp_set_logging): Change prototype.
3026 Assume there's always a set_logging_proc method installed.
3027 * interps.h (interp_set_logging_ftype): Change prototype.
3028 (current_interp_set_logging): Change prototype and adjust comment.
3029 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
3030 use make_logging_output.
3031 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
30322017-02-02 Pedro Alves <palves@redhat.com>
3033
5be5dbf0
PA
3034 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
3035 from ...
3036 (set_logging_overwrite): ... here.
3037 (logging_no_redirect_file): Delete.
3038 (set_logging_redirect): Don't handle redirection on the fly.
3039 Instead warn that "logging off" / "logging on" is necessary.
3040 (pop_output_files): Delete references to logging_no_redirect_file.
3041 (show_logging_command): Always speak in terms of what will happen
3042 once logging is reenabled.
3043
c99cc448
PA
30442017-02-02 Pedro Alves <palves@redhat.com>
3045
3046 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
3047
8b172ce7
PA
30482017-02-02 Pedro Alves <palves@redhat.com>
3049
3050 * disasm.c (gdb_pretty_print_insn): Rename to ...
3051 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
3052 Remove gdbarch parameter. Adapt to clear the object's buffers
3053 instead of allocating new buffers, and to print using the object's
3054 gdb_disassembler instead of calling gdb_print_insn.
3055 (dump_insns): Use gdb_pretty_print_disassembler.
3056 * disasm.h (gdb_pretty_print_insn): Delete declaration.
3057 (gdb_pretty_print_disassembler): New class.
3058 * record-btrace.c (btrace_insn_history): Use
3059 gdb_pretty_print_disassembler.
3060
d7e74731
PA
30612017-02-02 Pedro Alves <palves@redhat.com>
3062
3063 * ada-lang.c (type_as_string): Use string_file.
3064 * ada-valprint.c (ada_print_floating): Use string_file.
3065 * ada-varobj.c (ada_varobj_scalar_image)
3066 (ada_varobj_get_value_image): Use string_file.
3067 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
3068 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
3069 * breakpoint.c (update_inserted_breakpoint_locations)
3070 (insert_breakpoint_locations, reattach_breakpoints)
3071 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
3072 (print_it_watchpoint): Use string_file.
3073 (save_breakpoints): Use stdio_file.
3074 * c-exp.y (oper): Use string_file.
3075 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
3076 tee_file.
3077 (pop_output_files): Use delete.
3078 (handle_redirections): Use stdio_file and tee_file.
3079 * cli/cli-setshow.c (do_show_command): Use string_file.
3080 * compile/compile-c-support.c (c_compute_program): Use
3081 string_file.
3082 * compile/compile-c-symbols.c (generate_vla_size): Take a
3083 'string_file &' instead of a 'ui_file *'.
3084 (generate_c_for_for_one_variable): Take a 'string_file &' instead
3085 of a 'ui_file *'. Use string_file.
3086 (generate_c_for_variable_locations): Take a 'string_file &'
3087 instead of a 'ui_file *'.
3088 * compile/compile-internal.h (generate_c_for_for_one_variable):
3089 Take a 'string_file &' instead of a 'ui_file *'.
3090 * compile/compile-loc2c.c (push, pushf, unary, binary)
3091 (print_label, pushf_register_address, pushf_register)
3092 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
3093 'ui_file *'. Adjust.
3094 * compile/compile.c (compile_to_object): Use string_file.
3095 * compile/compile.h (compile_dwarf_expr_to_c)
3096 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
3097 'ui_file *'.
3098 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
3099 (replace_typedefs_qualified_name): Use string_file and
3100 obstack_copy0.
3101 * disasm.c (gdb_pretty_print_insn): Use string_file.
3102 (gdb_disassembly): Adjust reference the null_stream global.
3103 (do_ui_file_delete): Delete.
3104 (gdb_insn_length): Use null_stream.
3105 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
3106 * dwarf2loc.c (dwarf2_compile_property_to_c)
3107 (locexpr_generate_c_location, loclist_generate_c_location): Take a
3108 'string_file &' instead of a 'ui_file *'.
3109 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
3110 * dwarf2read.c (do_ui_file_peek_last): Delete.
3111 (dwarf2_compute_name): Use string_file.
3112 * event-top.c (gdb_setup_readline): Use stdio_file.
3113 * gdbarch.sh (verify_gdbarch): Use string_file.
3114 * gdbtypes.c (safe_parse_type): Use null_stream.
3115 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
3116 string_file.
3117 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
3118 'string_file *' instead of a 'ui_file *'.
3119 (gdbscm_arch_disassemble): Use string_file.
3120 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
3121 * guile/scm-ports.c (class ioscm_file_port): Now a class that
3122 inherits from ui_file.
3123 (ioscm_file_port_delete, ioscm_file_port_rewind)
3124 (ioscm_file_port_put): Delete.
3125 (ioscm_file_port_write): Rename to ...
3126 (ioscm_file_port::write): ... this. Remove file_port_magic
3127 checks.
3128 (ioscm_file_port_new): Delete.
3129 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
3130 ui_file_up.
3131 * guile/scm-type.c (tyscm_type_name): Use string_file.
3132 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
3133 Use string_file.
3134 * infcmd.c (print_return_value_1): Use string_file.
3135 * infrun.c (print_target_wait_results): Use string_file.
3136 * language.c (add_language): Use string_file.
3137 * location.c (explicit_to_string_internal): Use string_file.
3138 * main.c (captured_main_1): Use null_file.
3139 * maint.c (maintenance_print_architecture): Use stdio_file.
3140 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
3141 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
3142 event_channel>: Change type to mi_console_file pointer.
3143 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
3144 (mi_console_file_delete): Delete.
3145 (struct mi_console_file): Delete.
3146 (mi_console_file_magic): Delete.
3147 (mi_console_file_new): Delete.
3148 (mi_console_file::mi_console_file): New.
3149 (mi_console_file_delete): Delete.
3150 (mi_console_file_fputs): Delete.
3151 (mi_console_file::write): New.
3152 (mi_console_raw_packet): Delete.
3153 (mi_console_file::flush): New.
3154 (mi_console_file_flush): Delete.
3155 (mi_console_set_raw): Rename to ...
3156 (mi_console_file::set_raw): ... this.
3157 * mi/mi-console.h (class mi_console_file): New class.
3158 (mi_console_file_new, mi_console_set_raw): Delete.
3159 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
3160 (mi_set_logging): Use delete and tee_file. Adjust.
3161 * mi/mi-main.c (output_register): Use string_file.
3162 (mi_cmd_data_evaluate_expression): Use string_file.
3163 (mi_cmd_data_read_memory): Use string_file.
3164 (mi_cmd_execute, print_variable_or_computed): Use string_file.
3165 * mi/mi-out.c (mi_ui_out::main_stream): New.
3166 (mi_ui_out::rewind): Use main_stream and
3167 string_file.
3168 (mi_ui_out::put): Use main_stream and string_file.
3169 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
3170 Allocate a 'string_file' instead.
3171 (mi_out_new): Don't allocate a mem_fileopen stream here.
3172 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
3173 (mi_ui_out::main_stream): Declare method.
3174 * printcmd.c (eval_command): Use string_file.
3175 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
3176 * python/py-arch.c (archpy_disassemble): Use string_file.
3177 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
3178 * python/py-frame.c (frapy_str): Use string_file.
3179 * python/py-framefilter.c (py_print_type, py_print_single_arg):
3180 Use string_file.
3181 * python/py-type.c (typy_str): Use string_file.
3182 * python/py-unwind.c (unwind_infopy_str): Use string_file.
3183 * python/py-value.c (valpy_str): Use string_file.
3184 * record-btrace.c (btrace_insn_history): Use string_file.
3185 * regcache.c (regcache_print): Use stdio_file.
3186 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
3187 * remote.c (escape_buffer): Use string_file.
3188 * rust-lang.c (rust_get_disr_info): Use string_file.
3189 * serial.c (serial_open_ops_1): Use stdio_file.
3190 (do_serial_close): Use delete.
3191 * stack.c (print_frame_arg): Use string_file.
3192 (print_frame_args): Remove local mem_fileopen stream, not used.
3193 (print_frame): Use string_file.
3194 * symmisc.c (maintenance_print_symbols): Use stdio_file.
3195 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
3196 Take a 'string_file *' instead of a 'ui_file *'.
3197 * top.c (new_ui): Use stdio_file and stderr_file.
3198 (free_ui): Use delete.
3199 (execute_command_to_string): Use string_file.
3200 (quit_confirm): Use string_file.
3201 * tracepoint.c (collection_list::append_exp): Use string_file.
3202 * tui/tui-disasm.c (tui_disassemble): Use string_file.
3203 * tui/tui-file.c: Don't include "ui-file.h".
3204 (enum streamtype, struct tui_stream): Delete.
3205 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
3206 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
3207 (tui_file::tui_file): New method.
3208 (tui_file_fputs): Delete.
3209 (tui_file_get_strbuf): Delete.
3210 (tui_file::puts): New method.
3211 (tui_file_adjust_strbuf): Delete.
3212 (tui_file_flush): Delete.
3213 (tui_file::flush): New method.
3214 * tui/tui-file.h: Tweak intro comment.
3215 Include ui-file.h.
3216 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
3217 (tui_file_adjust_strbuf): Delete declarations.
3218 (class tui_file): New class.
3219 * tui/tui-io.c (tui_initialize_io): Use tui_file.
3220 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
3221 (tui_register_format): Use string_stream.
3222 * tui/tui-stack.c (tui_make_status_line): Use string_file.
3223 (tui_get_function_from_frame): Use string_file.
3224 * typeprint.c (type_to_string): Use string_file.
3225 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
3226 (null_stream): New global.
3227 (ui_file_delete): Delete.
3228 (ui_file::ui_file): New.
3229 (null_file_isatty): Delete.
3230 (ui_file::~ui_file): New.
3231 (null_file_rewind): Delete.
3232 (ui_file::printf): New.
3233 (null_file_put): Delete.
3234 (null_file_flush): Delete.
3235 (ui_file::putstr): New.
3236 (null_file_write): Delete.
3237 (ui_file::putstrn): New.
3238 (null_file_read): Delete.
3239 (ui_file::putc): New.
3240 (null_file_fputs): Delete.
3241 (null_file_write_async_safe): Delete.
3242 (ui_file::vprintf): New.
3243 (null_file_delete): Delete.
3244 (null_file::write): New.
3245 (null_file_fseek): Delete.
3246 (null_file::puts): New.
3247 (ui_file_data): Delete.
3248 (null_file::write_async_safe): New.
3249 (gdb_flush, ui_file_isatty): Adjust.
3250 (ui_file_put, ui_file_rewind): Delete.
3251 (ui_file_write): Adjust.
3252 (ui_file_write_for_put): Delete.
3253 (ui_file_write_async_safe, ui_file_read): Adjust.
3254 (ui_file_fseek): Delete.
3255 (fputs_unfiltered): Adjust.
3256 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
3257 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
3258 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
3259 (set_ui_file_data): Delete.
3260 (string_file::~string_file, string_file::write)
3261 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
3262 (do_ui_file_as_string, ui_file_as_string): Delete.
3263 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
3264 (struct mem_file): Delete.
3265 (mem_file_new): Delete.
3266 (stdio_file::stdio_file): New.
3267 (mem_file_delete): Delete.
3268 (stdio_file::stdio_file): New.
3269 (mem_fileopen): Delete.
3270 (stdio_file::~stdio_file): New.
3271 (mem_file_rewind): Delete.
3272 (stdio_file::set_stream): New.
3273 (mem_file_put): Delete.
3274 (stdio_file::open): New.
3275 (mem_file_write): Delete.
3276 (stdio_file_magic, struct stdio_file): Delete.
3277 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
3278 (stdio_file::flush): New.
3279 (stdio_file_read): Rename to ...
3280 (stdio_file::read): ... this. Adjust.
3281 (stdio_file_write): Rename to ...
3282 (stdio_file::write): ... this. Adjust.
3283 (stdio_file_write_async_safe): Rename to ...
3284 (stdio_file::write_async_safe) ... this. Adjust.
3285 (stdio_file_fputs): Rename to ...
3286 (stdio_file::puts) ... this. Adjust.
3287 (stdio_file_isatty): Delete.
3288 (stdio_file_fseek): Delete.
3289 (stdio_file::isatty): New.
3290 (stderr_file_write): Rename to ...
3291 (stderr_file::write) ... this. Adjust.
3292 (stderr_file_fputs): Rename to ...
3293 (stderr_file::puts) ... this. Adjust.
3294 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
3295 (stderr_file::stderr_file): New.
3296 (tee_file_magic): Delete.
3297 (struct tee_file): Delete.
3298 (tee_file::tee_file): New.
3299 (tee_file_new): Delete.
3300 (tee_file::~tee_file): New.
3301 (tee_file_delete): Delete.
3302 (tee_file_flush): Rename to ...
3303 (tee_file::flush): ... this. Adjust.
3304 (tee_file_write): Rename to ...
3305 (tee_file::write): ... this. Adjust.
3306 (tee_file::write_async_safe): New.
3307 (tee_file_fputs): Rename to ...
3308 (tee_file::puts): ... this. Adjust.
3309 (tee_file_isatty): Rename to ...
3310 (tee_file::isatty): ... this. Adjust.
3311 * ui-file.h (struct obstack, struct ui_file): Don't
3312 forward-declare.
3313 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
3314 (ui_file_write_ftype)
3315 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
3316 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
3317 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
3318 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
3319 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
3320 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
3321 (set_ui_file_fseek): Delete.
3322 (ui_file_data, ui_file_delete, ui_file_rewind)
3323 (struct ui_file): New.
3324 (ui_file_up): New.
3325 (class null_file): New.
3326 (null_stream): Declare.
3327 (ui_file_write_for_put, ui_file_put): Delete.
3328 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
3329 Delete.
3330 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
3331 (gdb_fopen, tee_file_new): Delete.
3332 (struct string_file): New.
3333 (struct stdio_file): New.
3334 (stdio_file_up): New.
3335 (struct stderr_file): New.
3336 (class tee_file): New.
3337 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
3338 of a 'ui_file *'. Adjust.
3339 * ui-out.h (class ui_out) <field_stream>: Likewise.
3340 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
3341 (null_stream): Delete.
3342 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
3343 Adjust.
3344 * utils.h (struct ui_file): Delete forward declaration..
3345 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
3346 (error_stream): Take a 'string_file &' instead of a
3347 'ui_file *'.
3348 * varobj.c (varobj_value_get_print_value): Use string_file.
3349 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
3350 * gdbarch.c: Regenerate.
3351
187808b0
PA
33522017-02-02 Pedro Alves <palves@redhat.com>
3353
3354 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
3355 (gdb_pretty_print_insn): ... this. Now a free function. Add back
3356 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
3357 Adjust to call gdb_print_insn instead of
3358 gdb_disassembler::print_insn.
3359 (dump_insns, do_mixed_source_and_assembly_deprecated)
3360 (do_mixed_source_and_assembly, do_assembly_only): Add back a
3361 'gdbarch' parameter. Remove gdb_disassembler parameter.
3362 (gdb_disassembly): Don't allocate a gdb_disassembler here.
3363 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
3364 declaration.
3365 (gdb_pretty_print_insn): Re-add declaration.
3366 * record-btrace.c (btrace_insn_history): Don't allocate a
3367 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
3368
7a8eb317
SM
33692017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
3370
3371 * disasm.h (gdb_disassembly): Remove file_string parameter.
3372 * disasm.c (gdb_disassembly): Likewise.
3373 * cli/cli-cmds.c (print_disassembly): Adapt.
3374 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
3375 * stack.c (do_gdb_disassembly): Likewise.
3376
7346ef59
AA
33772017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
3378
3379 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
3380 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
3381 targets. And if the implicit value is longer than needed, extract
3382 the first bytes instead of the "least significant" ones.
3383
cd4007e4
MM
33842017-02-01 Markus Metzger <markus.t.metzger@intel.com>
3385
3386 * btrace.c (btrace_enable): Do not call btrace_add_pc for
3387 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
3388 (btrace_fetch): Assert can_access_registers_ptid.
3389 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
3390 validate_registers_access.
3391
cf77c34e
MM
33922017-02-01 Markus Metzger <markus.t.metzger@intel.com>
3393
3394 * gdbthread.h (can_access_registers_ptid): New.
3395 * thread.c (can_access_registers_ptid): New.
3396
be85ce7d
PA
33972017-02-01 Pedro Alves <palves@redhat.com>
3398
3399 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
3400
29b0b251
PA
34012017-01-31 Pedro Alves <palves@redhat.com>
3402
3403 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
3404 Fix typos.
3405
289b5b24
PA
34062017-01-31 Pedro Alves <palves@redhat.com>
3407
3408 * stack.c (print_frame_args): Remove local mem_fileopen stream,
3409 not used.
3410
b47413b4
PA
34112017-01-31 Pedro Alves <palves@redhat.com>
3412
3413 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
3414
60adb36c
PA
34152017-01-31 Pedro Alves <palves@redhat.com>
3416
3417 * common/scoped_restore.h
3418 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
3419 change the value's parameter type to T2.
3420 (make_scoped_restore): Likewise.
3421
2735833d
WT
34222017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3423 Richard Henderson <rth@redhat.com>
3424
3425 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
3426 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
3427 GS_BASE for older kernels.
3428 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
3429 GS_BASE for older kernels.
3430 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
3431 and GS_BASE to the offset table.
3432 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
3433 system register group.
3434 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
3435 for older kernels.
3436 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
3437 amd64 ABI.
3438 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
3439 AMD64_GSBASE_REGNUM.
3440 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
3441 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
3442 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
3443 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
3444 i386/64bit-segments.xml in those rules.
3445 * features/i386/64bit-segments.xml: New file.
3446 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
3447 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
3448 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
3449 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
3450 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
3451 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
3452 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
3453 * features/i386/amd64-avx-linux.c: Regenerated.
3454 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
3455 * features/i386/amd64-avx-mpx.c: Regenerated.
3456 * features/i386/amd64-avx512-linux.c: Regenerated.
3457 * features/i386/amd64-linux.c: Regenerated.
3458 * features/i386/amd64-mpx-linux.c: Regenerated.
3459 * features/i386/i386-avx-mpx-linux.c: Regenerated.
3460 * features/i386/i386-avx-mpx.c: Regenerated.
3461 * features/i386/x32-avx-linux.c: Regenerated.
3462 * features/i386/x32-avx512-linux.c: Regenerated.
3463 * regformats/i386/amd64-avx-linux.dat: Regenerated.
3464 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
3465 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
3466 * regformats/i386/amd64-linux.dat: Regenerated.
3467 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
3468 * regformats/i386/x32-avx-linux.dat: Regenerated.
3469 * regformats/i386/x32-avx512-linux.dat: Regenerated.
3470 * regformats/i386/x32-linux.dat: Regenerated.
3471
8884e97e
WT
34722017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3473
3474 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
3475 Set to AMD64_NUM_REGS.
3476
7005d26a
WT
34772017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
3478
3479 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
3480 that checks validity of a register number.
3481
4bd2e1b2
KC
34822017-01-27 Kees Cook <keescook@google.com>
3483
3484 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
3485 fetch_fpregs if target has fpa registers.
3486 (arm_linux_store_inferior_registers): Call store_fpregs if target
3487 has fpa registers.
3488
7cf1de6c
AA
34892017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
3490
3491 * cris-tdep.c (cris_gdbarch_init): Remove check for
3492 info.byte_order and force it to BFD_ENDIAN_LITTLE.
3493
874a1c8c
AT
34942017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
3495
3496 * corelow.c (get_core_register_section): Check for regset
3497 existence before checking for REGSET_VARIABLE_SIZE.
3498
d8b49cf0
YQ
34992017-01-26 Yao Qi <yao.qi@linaro.org>
3500 Pedro Alves <palves@redhat.com>
3501
3502 PR gdb/20939
3503 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
3504 call memory_error, save memaddr instead.
3505 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
3506 negative, cal memory_error.
3507 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
3508
658ca58c
YQ
35092017-01-26 Yao Qi <yao.qi@linaro.org>
3510
3511 * disasm-selftests.c (memory_error_test): New function.
3512 (_initialize_disasm_selftests): Register memory_error_test.
3513
79843d45
YQ
35142017-01-26 Yao Qi <yao.qi@linaro.org>
3515
3516 * Makefile.in (SFILES): Add disasm-selftests.c and
3517 selftest-arch.c.
3518 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
3519 * disasm-selftests.c: New file.
3520 * selftest-arch.c: New file.
3521 * selftest-arch.h: New file.
3522
8cafda32
YQ
35232017-01-26 Yao Qi <yao.qi@linaro.org>
3524
3525 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
3526 to bfd_arch_mep. Don't return 0 if section is not
3527 found. Call print_insn_mep.
3528
e47ad6c0
YQ
35292017-01-26 Pedro Alves <palves@redhat.com>
3530 Yao Qi <yao.qi@linaro.org>
3531
3532 * arm-tdep.c: Include "disasm.h".
3533 (gdb_print_insn_arm): Update code to get gdbarch.
3534 * disasm.c (dis_asm_read_memory): Change it to
3535 gdb_disassembler::dis_asm_read_memory.
3536 (dis_asm_memory_error): Likewise.
3537 (dis_asm_print_address): Likewise.
3538 (gdb_pretty_print_insn): Change it to
3539 gdb_disassembler::pretty_print_insn.
3540 (dump_insns): Add one argument gdb_disassemlber. All
3541 callers updated.
3542 (do_mixed_source_and_assembly_deprecated): Likewise.
3543 (do_mixed_source_and_assembly): Likewise.
3544 (do_assembly_only): Likewise.
3545 (gdb_disassembler::gdb_disassembler): New.
3546 (gdb_disassembler::print_insn): New.
3547 * disasm.h (class gdb_disassembler): New.
3548 (gdb_pretty_print_insn): Remove declaration.
3549 (gdb_disassemble_info): Likewise.
3550 * guile/scm-disasm.c (class gdbscm_disassembler): New.
3551 (gdbscm_disasm_read_memory_worker): Update.
3552 (gdbscm_disasm_read_memory): Update.
3553 (gdbscm_disasm_memory_error): Remove.
3554 (gdbscm_disasm_print_address): Remove.
3555 (gdbscm_disassembler::gdbscm_disassembler): New.
3556 (gdbscm_print_insn_from_port): Update.
3557 * mips-tdep.c: Include disasm.h.
3558 (gdb_print_insn_mips): Update code to get gdbarch.
3559 * record-btrace.c (btrace_insn_history): Update.
3560 * spu-tdep.c: Include disasm.h.
3561 (struct spu_dis_asm_data): Remove.
3562 (struct spu_dis_asm_info): New.
3563 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
3564 SPU id.
3565 (gdb_print_insn_spu): Cast disassemble_info to
3566 spu_dis_asm_info.
3567
80d75874
YQ
35682017-01-26 Yao Qi <yao.qi@linaro.org>
3569
3570 * disasm.c (do_ui_file_delete): Delete.
3571 (gdb_insn_length): Move code creating stream to ...
3572 * utils.c (null_stream): ... here. New function.
3573 * utils.h (null_stream): Declare.
3574
60685cd0
SM
35752017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
3576
3577 * python/py-inferior.c (find_thread_object): Return directly
3578 from the loop. Remove "found" variable.
3579
eb1cdb62
JB
35802017-01-21 Joel Brobecker <brobecker@adacore.com>
3581
3582 GDB 7.12.1 released.
3583
b1ce6568
SM
35842017-01-20 Simon Marchi <simon.marchi@ericsson.com>
3585
3586 * python/py-function.c (fnpy_call): Reorder declarations to have
3587 the gdbpy_enter object declared first.
3588 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
3589
6f8b0407
SM
35902017-01-20 Simon Marchi <simon.marchi@ericsson.com>
3591
fec93fb1 3592 PR python/21068
6f8b0407
SM
3593 * python/python-internal.h (PyMem_RawMalloc): Define for
3594 Python < 3.4.
3595 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
3596 PyMem_RawMalloc instead of PyMem_Malloc.
3597
78cbbba8
LM
35982017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
3599 Luis Machado <lgustavo@codesourcery.com>
3600
3601 * NEWS (New commands): Mention flash-erase.
3602 (New MI commands): Mention target-flash-erase.
3603 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
3604 command.
3605 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
3606 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
3607 * target.c (flash_erase_command): New function.
3608 (initialize_targets): Add new flash-erase command.
3609 * target.h (flash_erase_command): New declaration.
3610
2132fe85
JB
36112017-01-20 Joel Brobecker <brobecker@adacore.com>
3612
3613 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
3614 HAVE_SYS_PROCFS_H is defined.
3615
d1dff226
AH
36162017-01-18 Alan Hayward <alan.hayward@arm.com>
3617
3618 * remote.c (struct cached_reg): Change data into a pointer.
3619 * (stop_reply_dtr): Free data pointers before deleting vector.
3620 (process_stop_reply): Likewise.
3621 (remote_parse_stop_reply): Allocate space for data
3622
9890e433
AH
36232017-01-18 Alan Hayward <alan.hayward@arm.com>
3624
3625 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
3626 MAX_REGISTER_SIZE.
3627 (amd64_pseudo_register_read_value): Likewise.
3628 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
3629 (store_register_using_P): Likewise.
3630 * regcache.c (regcache_xfer_part): Likewise.
3631
7a36499a
IR
36322017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
3633
3634 Split real and pseudo registers.
3635 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
3636 (sparc32_pseudo_regnum): New enum.
3637 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
3638 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
3639 (SPARC32_CP0_REGISTERS): New macro.
3640 (sparc32_pseudo_register_name): New function.
3641 (sparc32_register_name): Use sparc32_pseudo_register_name.
3642 (sparc32_pseudo_register_type): New function.
3643 (sparc32_register_type): Use sparc32_pseudo_register_type.
3644 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
3645 pseudo register numbers.
3646 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
3647 (SPARC64_CP0_REGISTERS): New macro.
3648 (sparc64_pseudo_register_name): New function.
3649 (sparc64_register_name): Use sparc64_pseudo_register_name.
3650 (sparc64_pseudo_register_type): New function.
3651 (sparc64_register_type): Use sparc64_pseudo_register_type.
3652 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
3653 pseudo register numbers.
3654 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
3655 sparc64_store_arguments): Handle pseudo register numbers.
3656
6f8976bf
YQ
36572017-01-13 Yao Qi <yao.qi@linaro.org>
3658
3659 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
3660 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
3661 output.
3662 (getpkt_or_notif_sane_1): Likewise.
3663
e4241ace
YQ
36642017-01-13 Yao Qi <yao.qi@linaro.org>
3665
3666 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
3667 of CC. Pass "-x c++-header" instead of "-x c".
3668
3015c064
SM
36692017-01-12 Simon Marchi <simon.marchi@ericsson.com>
3670
3671 * remote.c (remote_can_async_p): Update comment.
3672
fde1b17d
SM
36732017-01-12 Simon Marchi <simon.marchi@ericsson.com>
3674
3675 * linux-nat.c (linux_nat_can_async_p): Update comment.
3676
ca1ca08b
SM
36772017-01-12 Simon Marchi <simon.marchi@ericsson.com>
3678
3679 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
3680
4ad2da73
SM
36812017-01-11 Simon Marchi <simon.marchi@ericsson.com>
3682
3683 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
3684
c8b23b3f
TT
36852017-01-10 Tom Tromey <tom@tromey.com>
3686
3687 * python/py-type.c (typy_legacy_template_argument): Update.
3688 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
3689 ~demangle_parse_info): Declare new members.
3690 (cp_demangled_name_to_comp): Return unique_ptr.
3691 (cp_demangled_name_parse_free)
3692 (make_cleanup_cp_demangled_name_parse_free)
3693 (cp_new_demangle_parse_info): Remove.
3694 * cp-support.c (do_demangled_name_parse_free_cleanup)
3695 (make_cleanup_cp_demangled_name_parse_free): Remove.
3696 (inspect_type, cp_canonicalize_string_full)
3697 (cp_canonicalize_string): Update.
3698 (mangled_name_to_comp): Change return type.
3699 (cp_class_name_from_physname, method_name_from_physname)
3700 (cp_func_name, cp_remove_params): Update.
3701 * cp-name-parser.y (demangle_parse_info): New constructor, from
3702 cp_new_demangle_parse_info.
3703 (~demangle_parse_info): New destructor, from
3704 cp_demangled_name_parse_free.
3705 (cp_merge_demangle_parse_infos): Update.
3706 (cp_demangled_name_to_comp): Change return type.
3707
1ac32117
TT
37082017-01-10 Tom Tromey <tom@tromey.com>
3709
3710 * top.c (prevent_dont_repeat): Change return type.
3711 * python/python.c (execute_gdb_command): Use std::string.
3712 Update.
3713 * guile/guile.c (gdbscm_execute_gdb_command): Update.
3714 * command.h (prevent_dont_repeat): Change return type.
3715 * breakpoint.c (bpstat_do_actions_1): Update.
3716
0cf08227
TT
37172017-01-10 Tom Tromey <tom@tromey.com>
3718
3719 * value.h (scoped_value_mark::~scoped_value_mark): Call
3720 free_to_mark.
3721 (scoped_value_mark::free_to_mark): New method.
3722 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
3723 scoped_value_mark.
3724
eb115069
TT
37252017-01-10 Tom Tromey <tom@tromey.com>
3726
3727 * python/py-value.c (valpy_dereference, valpy_referenced_value)
3728 (valpy_reference_value, valpy_const_value, valpy_get_address)
3729 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
3730 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
3731 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
3732 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
3733 scoped_value_mark.
3734 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
3735 * value.h (scoped_value_mark): New class.
3736
906768f9
TT
37372017-01-10 Tom Tromey <tom@tromey.com>
3738
3739 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
3740 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
3741 * psymtab.c (discard_psymtabs_upto): Remove.
3742 (make_cleanup_discard_psymtabs): Remove.
3743 (struct psymtab_state): Remove.
3744
bef155c3
TT
37452017-01-10 Tom Tromey <tom@tromey.com>
3746
3747 * record-full.c (record_full_save_cleanups): Remove.
3748 (record_full_save): Use gdb::unlinker.
3749 * gcore.c (do_bfd_delete_cleanup): Remove.
3750 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
3751 cleanups.
3752 * dwarf2read.c (unlink_if_set): Remove.
3753 (write_psymtabs_to_index): Use gdb::unlinker.
3754 * common/gdb_unlinker.h: New file.
3755
192b62ce
TT
37562017-01-10 Tom Tromey <tom@tromey.com>
3757
3758 * windows-tdep.c (windows_xfer_shared_library): Update.
3759 * windows-nat.c (windows_make_so): Update.
3760 * utils.h (make_cleanup_bfd_unref): Remove.
3761 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
3762 * symfile.h (symfile_bfd_open)
3763 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
3764 * symfile.c (read_symbols, symbol_file_add)
3765 (separate_debug_file_exists): Update.
3766 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
3767 (generic_load, reread_symbols): Update.
3768 * symfile-mem.c (symbol_file_add_from_memory): Update.
3769 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
3770 (spu_symbol_file_add_from_memory): Update.
3771 * solist.h (struct target_so_ops) <bfd_open>: Return
3772 gdb_bfd_ref_ptr.
3773 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
3774 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
3775 gdb_bfd_ref_ptr.
3776 (solib_map_sections, reload_shared_libraries_1): Update.
3777 * solib-svr4.c (enable_break): Update.
3778 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
3779 * solib-frv.c (enable_break2): Update.
3780 * solib-dsbt.c (enable_break): Update.
3781 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
3782 gdb_bfd_ref_ptr.
3783 (darwin_solib_get_all_image_info_addr_at_init): Update.
3784 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
3785 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
3786 * record-full.c (record_full_save): Update.
3787 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
3788 * procfs.c (insert_dbx_link_bpt_in_file): Update.
3789 * minidebug.c (find_separate_debug_file_in_section): Return
3790 gdb_bfd_ref_ptr.
3791 * machoread.c (macho_add_oso_symfile): Change abfd to
3792 gdb_bfd_ref_ptr.
3793 (macho_symfile_read_all_oso): Update.
3794 (macho_check_dsym): Return gdb_bfd_ref_ptr.
3795 (macho_symfile_read): Update.
3796 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
3797 (jit_bfd_try_read_symtab): Update.
3798 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3799 (gdb_bfd_openw, gdb_bfd_openr_iovec)
3800 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
3801 gdb_bfd_ref_ptr.
3802 (gdb_bfd_ref_policy): New struct.
3803 (gdb_bfd_ref_ptr): New typedef.
3804 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
3805 (gdb_bfd_openw, gdb_bfd_openr_iovec)
3806 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
3807 gdb_bfd_ref_ptr.
3808 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
3809 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
3810 (gcore_command): Update.
3811 * exec.c (exec_file_attach): Update.
3812 * elfread.c (elf_symfile_read): Update.
3813 * dwarf2read.c (dwarf2_get_dwz_file): Update.
3814 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
3815 (open_and_init_dwo_file): Update.
3816 (open_dwp_file): Return gdb_bfd_ref_ptr.
3817 (open_and_init_dwp_file): Update.
3818 * corelow.c (core_open): Update.
3819 * compile/compile-object-load.c (compile_object_load): Update.
3820 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
3821 * coffread.c (coff_symfile_read): Update.
3822 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
3823 gdb_bfd_ref_ptr. Rename.
3824 (dump_bfd_file, restore_command): Update.
3825 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
3826 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
3827 (find_separate_debug_file_by_buildid): Update.
3828
50315b21
TT
38292017-01-10 Tom Tromey <tom@tromey.com>
3830
3831 * common/gdb_ref_ptr.h: New file.
3832 * python/py-ref.h (struct gdbpy_ref_policy): New.
3833 (gdbpy_ref): Now a typedef.
3834
fc4007c9
TT
38352017-01-10 Tom Tromey <tom@tromey.com>
3836
3837 * utils.h (make_cleanup_htab_delete): Don't declare.
3838 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
3839 Remove.
3840 * linespec.c (decode_compound_collector): Add constructor,
3841 destructor.
3842 (lookup_prefix_sym): Remove cleanup.
3843 (symtab_collector): Add constructor, destructor.
3844 (collect_symtabs_from_filename): Remove cleanup.
3845 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
3846 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
3847 Use htab_up.
3848 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
3849 * dwarf2read.c (dw2_expand_symtabs_matching)
3850 (dw2_map_symbol_filenames, dwarf_decode_macros)
3851 (write_psymtabs_to_index): Use htab_up.
3852 * dwarf2loc.c (func_verify_no_selftailcall)
3853 (call_site_find_chain_1, func_verify_no_selftailcall)
3854 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
3855 std::vector, gdb::unique_xmalloc_ptr.
3856 (call_sitep): Remove typedef.
3857 (dwarf2_locexpr_baton_eval): Remove unused variable.
3858
8dbcee67
TT
38592017-01-10 Tom Tromey <tom@tromey.com>
3860
3861 * python/python-internal.h (make_cleanup_py_decref)
3862 (make_cleanup_py_xdecref): Don't declare.
3863 * python/py-utils.c (py_decref, make_cleanup_py_decref)
3864 (py_xdecref, make_cleanup_py_xdecref): Remove.
3865
13df46cc
TT
38662017-01-10 Tom Tromey <tom@tromey.com>
3867
3868 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
3869 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
3870
06fc9bf7
TT
38712017-01-10 Tom Tromey <tom@tromey.com>
3872
3873 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
3874
830a4934
TT
38752017-01-10 Tom Tromey <tom@tromey.com>
3876
3877 * python/py-utils.c (unicode_to_encoded_string)
3878 (python_string_to_target_string)
3879 (python_string_to_target_python_string)
3880 (python_string_to_host_string, gdbpy_obj_to_string)
3881 (get_addr_from_python): Use gdbpy_ref.
3882
4586d543
TT
38832017-01-10 Tom Tromey <tom@tromey.com>
3884
3885 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
3886 gdbpy_ref.
3887
59876f8f
TT
38882017-01-10 Tom Tromey <tom@tromey.com>
3889
3890 * python/python.c (eval_python_command, gdbpy_decode_line)
3891 (gdbpy_run_events, gdbpy_start_type_printers)
3892 (gdbpy_apply_type_printers): Use gdbpy_ref.
3893
97d83487
TT
38942017-01-10 Tom Tromey <tom@tromey.com>
3895
3896 * python/py-param.c (get_doc_string, compute_enum_values): Use
3897 gdbpy_ref.
3898
9205649a
TT
38992017-01-10 Tom Tromey <tom@tromey.com>
3900
3901 * python/py-inferior.c (find_thread_object, build_inferior_list):
3902 Use gdbpy_ref.
3903
74c49d45
TT
39042017-01-10 Tom Tromey <tom@tromey.com>
3905
3906 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
3907
16361ffb
TT
39082017-01-10 Tom Tromey <tom@tromey.com>
3909
3910 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
3911 gdbpy_ref.
3912
905f2cca
TT
39132017-01-10 Tom Tromey <tom@tromey.com>
3914
3915 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
3916 extra incref.
3917 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
3918 Use gdbpy_ref.
3919
64081434
TT
39202017-01-10 Tom Tromey <tom@tromey.com>
3921
3922 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
3923 gdbpy_ref.
3924
59e9e831
TT
39252017-01-10 Tom Tromey <tom@tromey.com>
3926
3927 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
3928 decref results of PyArg_ParseTupleAndKeywords.
3929
9de10f6d
TT
39302017-01-10 Tom Tromey <tom@tromey.com>
3931
3932 * python/python.c (python_run_simple_file): Use
3933 unique_xmalloc_ptr, gdbpy_ref.
3934
2bd5759d
TT
39352017-01-10 Tom Tromey <tom@tromey.com>
3936
3937 * python/py-prettyprint.c (print_stack_unless_memory_error)
3938 (print_string_repr, print_children): Use gdbpy_ref.
3939 (dummy_python_frame): New class.
3940 (dummy_python_frame::dummy_python_frame): Rename from
3941 push_dummy_python_frame.
3942 (py_restore_tstate): Remove.
3943
3b4e0e01
TT
39442017-01-10 Tom Tromey <tom@tromey.com>
3945
3946 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
3947
17a22718
TT
39482017-01-10 Tom Tromey <tom@tromey.com>
3949
3950 * python/python.c (ensure_python_env, restore_python_env):
3951 Remove.
3952 * python/python-internal.h (ensure_python_env): Don't declare.
3953 * varobj.h (varobj_ensure_python_env): Don't declare.
3954 * varobj.c (varobj_ensure_python_env): Remove.
3955
68cdc557
TT
39562017-01-10 Tom Tromey <tom@tromey.com>
3957
3958 * varobj.c (varobj_value_get_print_value): Use
3959 gdbpy_enter_varobj.
3960
1eba6383
TT
39612017-01-10 Tom Tromey <tom@tromey.com>
3962
3963 * python/py-prettyprint.c (print_string_repr, print_children):
3964 Update.
3965 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
3966 of "encoding".
3967 * varobj.c (varobj_value_get_print_value): Update.
3968 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
3969
bde7b3e3
TT
39702017-01-10 Tom Tromey <tom@tromey.com>
3971
3972 * varobj.c (varobj_get_display_hint)
3973 (dynamic_varobj_has_child_method, install_new_value_visualizer)
3974 (varobj_set_visualizer, free_variable): Use
3975 gdbpy_enter_varobj.
3976
a7785f8c
TT
39772017-01-10 Tom Tromey <tom@tromey.com>
3978
3979 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
3980 (do_finish_initialization): New function. Use gdbpy_ref.
3981 (gdbpy_finish_initialization): Use gdbpy_enter. Call
3982 do_finish_initialization.
3983
2865bfce
TT
39842017-01-10 Tom Tromey <tom@tromey.com>
3985
3986 * python/py-param.c (get_set_value, get_show_value): Use
3987 gdbpy_enter, gdbpy_ref.
3988
0e9dcc75
TT
39892017-01-10 Tom Tromey <tom@tromey.com>
3990
3991 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
3992
12a5cedd
TT
39932017-01-10 Tom Tromey <tom@tromey.com>
3994
3995 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
3996
788f2586
TT
39972017-01-10 Tom Tromey <tom@tromey.com>
3998
3999 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
4000 Use gdbpy_enter_varobj.
4001
6cd67bea
TT
40022017-01-10 Tom Tromey <tom@tromey.com>
4003
4004 * varobj.c (gdbpy_enter_varobj): New constructor.
4005 * python/python-internal.h (gdbpy_enter_varobj): New class.
4006 * python/py-varobj.c (py_varobj_get_iterator): Use
4007 gdbpy_enter_varobj.
4008
14b122bf
TT
40092017-01-10 Tom Tromey <tom@tromey.com>
4010
4011 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
4012 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
4013 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
4014 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
4015 unique_xmalloc_ptr.
4016 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
4017
bf1ca3b9
TT
40182017-01-10 Tom Tromey <tom@tromey.com>
4019
4020 * python/py-xmethods.c (invoke_match_method): Use
4021 gdbpy_ref.
4022
572a5524
TT
40232017-01-10 Tom Tromey <tom@tromey.com>
4024
4025 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
4026 gdbpy_enter, gdbpy_ref.
4027
396a78b6
TT
40282017-01-10 Tom Tromey <tom@tromey.com>
4029
4030 * python/python.c (python_interactive_command): Use gdbpy_enter.
4031
a88b13c7
TT
40322017-01-10 Tom Tromey <tom@tromey.com>
4033
4034 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
4035 gdbpy_ref.
4036
e9f0c363
TT
40372017-01-10 Tom Tromey <tom@tromey.com>
4038
4039 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
4040 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
4041
6349f452
TT
40422017-01-10 Tom Tromey <tom@tromey.com>
4043
4044 * utils.h (htab_deleter): New struct.
4045 (htab_up): New typedef.
4046 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
4047 gdbpy_enter, gdbpy_ref, htab_up.
4048
c0171de6
TT
40492017-01-10 Tom Tromey <tom@tromey.com>
4050
4051 * python/py-unwind.c (pending_frame_invalidate): Remove.
4052 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
4053
f18e226f
TT
40542017-01-10 Tom Tromey <tom@tromey.com>
4055
4056 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
4057 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
4058
c57af3f1
TT
40592017-01-10 Tom Tromey <tom@tromey.com>
4060
4061 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
4062
60e600ec
TT
40632017-01-10 Tom Tromey <tom@tromey.com>
4064
4065 * python/python.c (gdbpy_eval_from_control_command)
4066 (gdbpy_source_script, gdbpy_run_events)
4067 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
4068 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
4069 gdbpy_enter.
4070
bf7da5b0
TT
40712017-01-10 Tom Tromey <tom@tromey.com>
4072
4073 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
4074
2d38bced
TT
40752017-01-10 Tom Tromey <tom@tromey.com>
4076
4077 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
4078
07bc7329
TT
40792017-01-10 Tom Tromey <tom@tromey.com>
4080
4081 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
4082 (python_on_inferior_call_pre, python_on_inferior_call_post)
4083 (python_on_memory_change, python_on_register_change)
4084 (python_inferior_exit, python_new_objfile, add_thread_object)
4085 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
4086
6e7c365e
TT
40872017-01-10 Tom Tromey <tom@tromey.com>
4088
4089 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
4090 (bpfinishpy_handle_exit): Use gdbpy_enter.
4091
6ba0cd40
TT
40922017-01-10 Tom Tromey <tom@tromey.com>
4093
4094 * python/py-cmd.c (cmdpy_destroyer)
4095 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
4096 gdbpy_enter.
4097
de2dc875
TT
40982017-01-10 Tom Tromey <tom@tromey.com>
4099
4100 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
4101 gdbpy_enter.
4102 (gdbpy_breakpoint_has_cond): Likewise.
4103
4ecee2c4
TT
41042017-01-10 Tom Tromey <tom@tromey.com>
4105
4106 * python/python.c (gdbpy_enter): New constructor.
4107 (~gdbpy_enter): New destructor.
4108 (restore_python_env, ensure_python_env): Rewrite.
4109 * python/python-internal.h (gdbpy_enter): New class.
4110
37fce74f
TT
41112017-01-10 Tom Tromey <tom@tromey.com>
4112
4113 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
4114
53a0cca3
TT
41152017-01-10 Tom Tromey <tom@tromey.com>
4116
4117 * python/py-value.c (value_has_field, get_field_flag)
4118 (get_field_type, valpy_getitem, convert_value_from_python): Use
4119 gdbpy_ref.
4120
ff3724f5
TT
41212017-01-10 Tom Tromey <tom@tromey.com>
4122
4123 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
4124 gdbpy_ref.
4125
0700aea5
TT
41262017-01-10 Tom Tromey <tom@tromey.com>
4127
4128 * python/py-prettyprint.c (search_pp_list)
4129 (find_pretty_printer_from_objfiles)
4130 (find_pretty_printer_from_progspace)
4131 (find_pretty_printer_from_gdb, find_pretty_printer)
4132 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
4133 gdbpy_ref.
4134
1bb44c9f
TT
41352017-01-10 Tom Tromey <tom@tromey.com>
4136
4137 * python/py-param.c (call_doc_function): Use gdbpy_ref.
4138
87ce03fd
TT
41392017-01-10 Tom Tromey <tom@tromey.com>
4140
4141 * python/py-linetable.c (build_line_table_tuple_from_pcs)
4142 (ltpy_get_all_source_lines): Use gdbpy_ref.
4143
ee0a3fb8
TT
41442017-01-10 Tom Tromey <tom@tromey.com>
4145
4146 * python/py-framefilter.c (extract_sym, extract_value)
4147 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
4148 gdbpy_ref.
4149
bf2a52fa
TT
41502017-01-10 Tom Tromey <tom@tromey.com>
4151
4152 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
4153
f59fe7f8
TT
41542017-01-10 Tom Tromey <tom@tromey.com>
4155
4156 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
4157
80bd970a
TT
41582017-01-10 Tom Tromey <tom@tromey.com>
4159
4160 * python/py-function.c (convert_values_to_python, fnpy_init): Use
4161 gdbpy_ref.
4162
d1b3de2e
TT
41632017-01-10 Tom Tromey <tom@tromey.com>
4164
4165 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
4166
3bb43384
TT
41672017-01-10 Tom Tromey <tom@tromey.com>
4168
4169 * python/py-type.c (convert_field, make_fielditem, typy_fields)
4170 (typy_range): Use gdbpy_ref.
4171
abf5651e
TT
41722017-01-10 Tom Tromey <tom@tromey.com>
4173
4174 * python/py-threadevent.c (create_thread_event_object): Use
4175 gdbpy_ref.
4176 * python/py-stopevent.c (create_stop_event_object): Simplify.
4177 (emit_stop_event): Use gdbpy_ref.
4178 * python/py-signalevent.c (create_signal_event_object): Use
4179 gdbpy_ref.
4180 * python/py-newobjfileevent.c (create_new_objfile_event_object)
4181 (emit_new_objfile_event, create_clear_objfiles_event_object)
4182 (emit_clear_objfiles_event): Use gdbpy_ref.
4183 * python/py-infevents.c (create_inferior_call_event_object)
4184 (create_register_changed_event_object)
4185 (create_memory_changed_event_object, emit_inferior_call_event)
4186 (emit_memory_changed_event, emit_register_changed_event): Use
4187 gdbpy_ref.
4188 * python/py-exitedevent.c (create_exited_event_object)
4189 (emit_exited_event): Use gdbpy_ref.
4190 * python/py-event.h (evpy_emit_event): Remove
4191 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
4192 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
4193 * python/py-continueevent.c (emit_continue_event): Use
4194 gdbpy_ref.
4195 * python/py-breakpoint.c (gdbpy_breakpoint_created)
4196 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
4197 gdbpy_ref.
4198 * python/py-bpevent.c (create_breakpoint_event_object): Use
4199 gdbpy_ref.
4200
a68ff33e
TT
42012017-01-10 Tom Tromey <tom@tromey.com>
4202
4203 * python/py-ref.h: New file.
4204
7becfd03
SM
42052017-01-10 Simon Marchi <simon.marchi@ericsson.com>
4206
4207 * cli-out.c (cli_ui_out::do_redirect): Change return type to
4208 void.
4209 * cli-out.h (cli_ui_out::do_redirect): Likewise.
4210 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
4211 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
4212 * ui-out.c (ui_out::redirect): Likewise.
4213 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
4214 * cli/cli-logging.c (set_logging_redirect): Update call site of
4215 ui_out::redirect.
4216 (handle_redirections): Likewise.
4217 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
4218 * top.c (execute_command_to_string): Likewise.
4219 * utils.c (do_ui_out_redirect_pop): Likewise.
4220
df294654
SM
42212017-01-10 Simon Marchi <simon.marchi@ericsson.com>
4222
4223 * stack.c (_initialize_stack): Update "frame" command help message.
4224
f5e6296e
IB
42252017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
4226
4227 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
4228
0e2d6fa6
YQ
42292017-01-06 Yao Qi <yao.qi@linaro.org>
4230
4231 * x86-linux-nat.h: Include gdb_proc_service.h.
4232
44d6d3f9
YQ
42332017-01-06 Yao Qi <yao.qi@linaro.org>
4234
4235 * ser-base.h: Include serial.h.
4236
656731fe
YQ
42372017-01-06 Yao Qi <yao.qi@linaro.org>
4238
4239 * ppc-linux-tdep.h: Include ppc-tdep.h.
4240
1ca8f924
YQ
42412017-01-06 Yao Qi <yao.qi@linaro.org>
4242
4243 * nat/amd64-linux-siginfo.h: Include signal.h.
4244
bc3008c4
YQ
42452017-01-06 Yao Qi <yao.qi@linaro.org>
4246
4247 * nat/aarch64-linux-hw-point.h: Include break-common.h.
4248
66c80d03
YQ
42492017-01-06 Yao Qi <yao.qi@linaro.org>
4250
4251 * mi/mi-parse.h: Include mi-cmds.h.
4252
051d2dda
YQ
42532017-01-06 Yao Qi <yao.qi@linaro.org>
4254
4255 * inf-loop.c: Don't include "target.h".
4256 * inf-loop.h: Include it here.
4257
8018d34f
YQ
42582017-01-06 Yao Qi <yao.qi@linaro.org>
4259
4260 * dfp.h: Include "dboulest.h" and "expression.h".
4261
c0b8369c
YQ
42622017-01-06 Yao Qi <yao.qi@linaro.org>
4263
4264 * ax-gdb.h: Include "ax.h".
4265
ad5cba2a
YQ
42662017-01-06 Yao Qi <yao.qi@linaro.org>
4267
4268 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
4269 with nat/gdb_ptrace.h.
4270
1c33cd7f
YQ
42712017-01-05 Yao Qi <yao.qi@linaro.org>
4272
4273 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
4274 new line.
4275 (mips64_fbsd_sigframe_init): Likewise.
4276
c988ac1d
JB
42772017-01-04 John Baldwin <jhb@FreeBSD.org>
4278
4279 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
4280 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
4281
b268007c
JB
42822017-01-04 John Baldwin <jhb@FreeBSD.org>
4283
4284 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
4285 * NEWS: Mention new FreeBSD/mips native configuration.
4286 * config/mips/fbsd.mh: New file.
4287 * configure.host: Add mips*-*-freebsd*.
4288 * mips-fbsd-nat.c: New file.
4289
387360da
JB
42902017-01-04 John Baldwin <jhb@FreeBSD.org>
4291
4292 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
4293 (ALLDEPFILES): Add mips-fbsd-tdep.c.
4294 * NEWS: Mention new FreeBSD/mips target.
4295 * configure.tgt: Add mips*-*-freebsd*.
4296 * mips-fbsd-tdep.c: New file.
4297 * mips-fbsd-tdep.h: New file.
4298
2aaaf250
YQ
42992017-01-04 Yao Qi <yao.qi@linaro.org>
4300
4301 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
4302 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
4303
61baf725
JB
43042017-01-01 Joel Brobecker <brobecker@adacore.com>
4305
6dbb839a 4306 Update copyright year range in all GDB files.
61baf725 4307
c113e7ff 43082017-01-01 Joel Brobecker <brobecker@adacore.com>
ce0db137 4309
c113e7ff 4310 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
ce0db137 4311
c113e7ff 4312For older changes see ChangeLog-2016.
c906108c
SS
4313\f
4314Local Variables:
4315mode: change-log
4316left-margin: 8
4317fill-column: 74
4318version-control: never
57da7796 4319coding: utf-8
c906108c 4320End:
This page took 2.828924 seconds and 4 git commands to generate.