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