Fix GDB crash in dprintf.exp
[external/binutils.git] / gdb / ChangeLog
1 2016-01-28  Yao Qi  <yao.qi@linaro.org>
2
3         * breakpoint.c (build_target_command_list): Don't call continue
4         if aexpr is NULL.
5         (build_target_condition_list): Likewise.
6
7 2016-01-27  Kevin Buettner  <kevinb@redhat.com>
8
9         * rx-tdep.c (rx_push_dummy_call): Treat scalars larger than 8
10         bytes as aggregates.
11
12 2016-01-27  Joel Brobecker  <brobecker@adacore.com>
13
14         * MAINTAINERS (Responsible Maintainers): Add Keith Seitz as
15         Linespec Maintainers.
16
17 2016-01-26  Simon Marchi  <simon.marchi@ericsson.com>
18
19         * common/common-utils.c (skip_spaces): Fix comment.
20         (skip_to_space_const): Likewise.
21
22 2016-01-25  Yao Qi  <yao.qi@linaro.org>
23
24         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
25         Remove argument pc.  Get pc by regcache_read_pc.  Callers updated.
26         (arm_deal_with_atomic_sequence_raw): Likewise.
27         (thumb_get_next_pcs_raw): Likewise.
28         (arm_get_next_pcs_raw): Likewise.
29         (arm_get_next_pcs): Remove argument pc.  Callers updated.
30         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Update declaration.
31
32 2016-01-25  Mark Wielaard  <mjw@redhat.com>
33
34         * ada-lang.c (ada_evaluate_subexp): Add proper else block.
35         * c-typeprint.c (c_type_print_base): Fix misleading indentation of
36         if statement.
37         * inflow.c (child_terminal_ours_1): Fix misleading indentation of
38         statement block by introducing an else.
39         * linux-record.c (record_linux_sockaddr): Fix misleading indentation
40         of return statements.
41         (record_linux_msghdr): Likewise.
42
43 2016-01-25  Pedro Alves  <palves@redhat.com>
44
45         PR threads/19461
46         * infrun.c (handle_inferior_event_1) <fork/vfork>: Update
47         parent/child running states.
48
49 2016-01-25  Pedro Alves  <palves@redhat.com>
50
51         PR gdb/19494
52         * linux-nat.c (kill_one_lwp): New, factored out from ...
53         (kill_callback): ... this.
54         (kill_wait_callback): New, factored out from ...
55         (kill_wait_one_lwp): ... this.
56         (kill_unfollowed_fork_children): New function.
57         (linux_nat_kill): Use it.
58
59 2016-01-22  John Baldwin  <jhb@FreeBSD.org>
60
61         * fbsd-nat.c (fbsd_pid_to_str): Adjust string format.
62
63 2016-01-22  Yao Qi  <yao.qi@linaro.org>
64
65         * arm-linux-nat.c (fetch_fpregs): Call perror_with_name
66         instead of warning.
67         (store_fpregs, fetch_regs, store_regs): Likewise.
68         (fetch_wmmx_regs, store_wmmx_regs): Likewise.
69         (fetch_vfp_regs, store_vfp_regs): Likewise.
70
71 2016-01-21  Doug Evans  <dje@google.com>
72
73         * breakpoint.c (init_breakpoint_sal): Add comment.
74
75 2016-01-21  Marcin Koƛcielnicki  <koriakin@0x04.net>
76
77         * ax-gdb.c (gen_traced_pop): Use gen_fetch for string collection.
78
79 2016-01-21  Andrew Burgess  <andrew.burgess@embecosm.com>
80
81         * disasm.c (maybe_add_dis_line_entry): Rename to...
82         (add_dis_line_entry): ...this, and update header comment.
83         (do_mixed_source_and_assembly): Now use add_dis_line_entry.
84
85 2016-01-21  Pedro Alves  <palves@redhat.com>
86
87         * Makefile.in (COMPILER_CFLAGS): New.
88         (CXXFLAGS): Get it from configure.
89         (INTERNAL_CFLAGS_BASE, INTERNAL_LDFLAGS): Use COMPILER_CFLAGS
90         instead of CFLAGS.
91         * build-with-cxx.m4 (GDB_AC_BUILD_WITH_CXX): Set and AC_SUBST
92         COMPILER_CFLAGS.
93         * configure: Regenerate.
94
95 2016-01-21  Joel Brobecker  <brobecker@adacore.com>
96
97         * location.h (new_address_location): Add new parameters
98         "addr_string" and "addr_string_len".
99         (get_address_string_location): Add declaration.
100         * location.c (new_address_location): Add new parameters
101         "addr_string" and "addr_string_len".  If not NULL, store
102         a copy of the addr_string in the new location as well.
103         (get_address_string_location): New function.
104         (string_to_event_location): Update call to new_address_location.
105         * linespec.c (event_location_to_sals) <ADDRESS_LOCATION>:
106         Save the event location in the parser's state before
107         passing it to convert_address_location_to_sals.
108         * breakpoint.c (create_thread_event_breakpoint): Update call
109         to new_address_location.
110         (init_breakpoint_sal): Get the event location's string, if any,
111         and use it to update call to new_address_location.
112         * python/py-finishbreakpoint.c (bpfinishpy_init):
113         Update call to new_address_location.
114         * spu-tdep.c (spu_catch_start): Likewise.
115
116         * config/djgpp/fnchange.lst: Add entries for
117         gdb/testsuite/gdb.base/break-fun-addr1.c and
118         gdb/testsuite/gdb.base/break-fun-addr2.c.
119
120 2016-01-21  Yao Qi  <yao.qi@linaro.org>
121
122         * arm-linux-tdep.c (arm_linux_sigreturn_next_pc): Add parameter
123         is_thumb and set it according to CPSR saved on the stack.
124         (arm_linux_get_next_pcs_syscall_next_pc): Pass is_thumb to
125         arm_linux_sigreturn_next_pc.
126
127 2016-01-20  Simon Marchi  <simon.marchi@polymtl.ca>
128
129         * python/lib/gdb/printing.py (FlagEnumerationPrinter.__call__):
130         Fix enumerators sort key function.
131
132 2016-01-20  Joel Brobecker  <brobecker@adacore.com>
133
134         * printcmd.c (print_scalar_formatted): Move binary operator from
135         end of line to beginning of next line.  Adjust formatting
136         accordingly.
137
138 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
139
140         * fbsd-nat.c (fbsd_pid_to_exec_file): Use new "buflen" instead of
141         "len" with sysctl.
142
143 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
144
145         * fbsd-tdep.c (find_stop_signal): Remove.
146         (struct fbsd_collect_regset_section_cb) <lwp>: New field.
147         <stop_signal>: New field.
148         <abort_iteration>: New field.
149         (fbsd_collect_regset_section_cb): Use new fields.
150         (fbsd_collect_thread_registers): New function.
151         (struct fbsd_corefile_thread_data): New structure.
152         (fbsd_corefile_thread): New function.
153         (fbsd_make_corefile_notes): Use new function to dump notes for each
154         non-exited thread in a process.
155
156 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
157
158         * configure.ac: Check for support for LWP names on FreeBSD.
159         * fbsd-nat.c [PT_LWPINFO] New variable debug_fbsd_lwp.
160         [TDP_RFPPWAIT || HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME]
161         (fbsd_fetch_kinfo_proc): Move function earlier.
162         [PT_LWPINFO] (fbsd_thread_alive): New function.
163         [PT_LWPINFO] (fbsd_pid_to_str): New function.
164         [HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME] (fbsd_thread_name): New function.
165         [PT_LWP_EVENTS] (fbsd_enable_lwp_events): New function.
166         [PT_LWPINFO] (fbsd_add_threads): New function.
167         [PT_LWPINFO] (fbsd_update_thread_list): New function.
168         [PT_LWPINFO] New variable super_resume.
169         [PT_LWPINFO] (resume_one_thread_cb): New function.
170         [PT_LWPINFO] (resume_all_threads_cb): New function.
171         [PT_LWPINFO] (fbsd_resume): New function.
172         (fbsd_remember_child): Save full ptid instead of plain pid.
173         (fbsd_is_child_pending): Return ptid of saved child process.
174         (fbsd_wait): Include lwp in returned ptid and switch to LWP ptid on
175         first stop.
176         [PT_LWP_EVENTS] Handle LWP events.
177         [TDP_RFPPWAIT] Include LWP in child ptid.
178         (fbsd_post_startup_inferior) [PT_LWP_EVENTS]: Enable LWP events.
179         (fbsd_post_attach) [PT_LWP_EVENTS]: Enable LWP events.
180         Add threads for existing processes.
181         (fbsd_nat_add_target) [PT_LWPINFO]: Set "to_thread_alive" to
182         "fbsd_thread_alive".
183         Set "to_pid_to_str" to "fbsd_pid_to_str".
184         [HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME]: Set "to_thread_name" to
185         "fbsd_thread_name".
186         [PT_LWPINFO]: Set "to_update_thread_list" to "fbsd_update_thread_list".
187         Set "to_has_thread_control" to "tc_schedlock".
188         Set "to_resume" to "fbsd_resume".
189         (_initialize_fbsd_nat): New function.
190         * configure: Regenerate.
191         * config.in: Regenerate.
192
193 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
194
195         * amd64bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
196         get_ptrace_pid.
197         (amd64bsd_store_inferior_registers): Use get_ptrace_pid.
198         (amd64bsd_dr_get): Use get_ptrace_pid.
199         (amd64bsd_dr_set): Use get_ptrace_pid.
200         * i386bsd-nat.c (i386bsd_fetch_inferior_registers): Use get_ptrace_pid.
201         (i386bsd_store_inferior_registers): Use get_ptrace_pid.
202         (i386bsd_dr_get): Use get_ptrace_pid.
203         (i386bsd_dr_set): Use get_ptrace_pid.
204         * inf-ptrace.c (get_ptrace_pid): Export.
205         * inf-ptrace.h (get_ptrace_pid): Declare.
206         * ppcfbsd-nat.c (ppcfbsd_fetch_inferior_registers): Use lwp id.
207         (ppcfbsd_store_inferior_registers): Use lwp id.
208
209 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
210
211         * fbsd_tdep.c (fbsd_core_pid_to_str): New function.
212         (fbsd_core_thread_name): New function.
213         (fbsd_init_abi): Add "core_pid_to_str" gdbarch method.
214         Add "core_thread_name" gdbarch method.
215
216 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
217
218         * corelow.c (core_thread_name): New function.
219         (init_core_ops): Use "core_thread_name" for the "to_thread_name"
220         target op.
221         * gdbarch.sh (core_thread_name): New gdbarch callback.
222         * gdbarch.h: Re-generate.
223         * gdbarch.c: Re-generate.
224
225 2016-01-19  Simon Marchi  <simon.marchi@polymtl.ca>
226
227         * python/lib/gdb/printing.py (_EnumInstance.to_string): Explicitly
228         convert gdb.Value to integer type using int().
229
230 2016-01-19  John Baldwin  <jhb@FreeBSD.org>
231
232         * configure.ac: Include <sys/types.h when checking for "r_fs" in
233         "struct reg".
234         * configure: Regenerate.
235
236 2016-01-19  Pedro Alves  <palves@redhat.com>
237
238         * ax-gdb.c (agent_command_1): Adjust call to decode_line_full.
239         * break-catch-throw.c (re_set_exception_catchpoint): Pass the
240         current program space down to linespec decoding and breakpoint
241         location updating.
242         * breakpoint.c (parse_breakpoint_sals): Adjust calls to
243         decode_line_full.
244         (until_break_command): Adjust calls to decode_line_1.
245         (base_breakpoint_decode_location, bkpt_decode_location): Add
246         'search_pspace' parameter.  Pass it along.
247         (bkpt_probe_create_sals_from_location): Adjust calls to
248         parse_probes.
249         (tracepoint_decode_location, tracepoint_probe_decode_location)
250         (strace_marker_decode_location): Add 'search_pspace' parameter.
251         Pass it along.
252         (all_locations_are_pending): Rewrite to take a breakpoint and
253         program space as arguments instead.
254         (hoist_existing_locations): New function.
255         (update_breakpoint_locations): Add 'filter_pspace' parameter.  Use
256         hoist_existing_locations instead of always removing all locations,
257         and adjust to all_locations_are_pending change.
258         (location_to_sals): Add 'search_pspace' parameter.  Pass it along.
259         Don't disable the breakpoint if there are other locations in
260         another program space.
261         (breakpoint_re_set_default): Adjust to pass down the current
262         program space as filter program space.
263         (decode_location_default): Add 'search_pspace' parameter and pass
264         it along.
265         (prepare_re_set_context): Don't switch program space here.
266         (breakpoint_re_set): Use save_current_space_and_thread instead of
267         save_current_program_space.
268         * breakpoint.h (struct breakpoint_ops) <decode_location>: Add
269         'search_pspace' parameter.
270         (update_breakpoint_locations): Add 'filter_pspace' parameter.
271         * cli/cli-cmds.c (edit_command, list_command): Adjust calls to
272         decode_line_1.
273         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Pass the current
274         program space as filter program space.
275         * linespec.c (struct linespec_state) <search_pspace>: New field.
276         (create_sals_line_offset, convert_explicit_location_to_sals)
277         (parse_linespec): Pass the search program space down.
278         (linespec_state_constructor): Add 'search_pspace' parameter.
279         Store it.
280         (linespec_parser_new): Add 'search_pspace' parameter and pass it
281         along.
282         (linespec_lex_to_end): Adjust.
283         (decode_line_full, decode_line_1): Add 'search_pspace' parameter
284         and pass it along.
285         (decode_line_with_last_displayed): Adjust.
286         (collect_symtabs_from_filename, symtabs_from_filename): New
287         'search_pspace' parameter.  Use it.
288         (find_function_symbols): Pass the search program space down.
289         * linespec.h (decode_line_1, decode_line_full): Add
290         'search_pspace' parameter.
291         * probe.c (parse_probes_in_pspace): New function, factored out
292         from ...
293         (parse_probes): ... this.  Add 'search_pspace' parameter and use
294         it.
295         * probe.h (parse_probes): Add pspace' parameter.
296         * python/python.c (gdbpy_decode_line): Adjust.
297         * tracepoint.c (scope_info): Adjust.
298
299 2016-01-18  Maciej W. Rozycki  <macro@imgtec.com>
300
301         * mips-tdep.c (mips_insn_size): Remove 48-bit microMIPS
302         instruction support.
303         (micromips_next_pc): Likewise.
304         (micromips_scan_prologue): Likewise.
305         (micromips_deal_with_atomic_sequence): Likewise.
306         (micromips_stack_frame_destroyed_p): Likewise.
307         (mips_breakpoint_from_pc): Likewise.
308
309 2016-01-18  Maciej W. Rozycki  <macro@imgtec.com>
310
311         * mips-tdep.c (micromips_insn_at_pc_has_delay_slot): Pass
312         unshifted 16-bit microMIPS instruction word to `mips_insn_size'.
313
314 2016-01-18  Pedro Alves  <palves@redhat.com>
315
316         * NEWS: Mention that GDB now displays the ID and name of the
317         thread that hit a breakpoint or received a signal.
318         * break-catch-sig.c (signal_catchpoint_print_it): Use
319         maybe_print_thread_hit_breakpoint.
320         * break-catch-syscall.c (print_it_catch_syscall): Likewise.
321         * break-catch-throw.c (print_it_exception_catchpoint): Likewise.
322         * breakpoint.c (maybe_print_thread_hit_breakpoint): New function.
323         (print_it_catch_fork, print_it_catch_vfork, print_it_catch_solib)
324         (print_it_catch_exec, print_it_ranged_breakpoint)
325         (print_it_watchpoint, print_it_masked_watchpoint, bkpt_print_it):
326         Use maybe_print_thread_hit_breakpoint.
327         * breakpoint.h (maybe_print_thread_hit_breakpoint): Declare.
328         * gdbthread.h (show_thread_that_caused_stop): Declare.
329         * infrun.c (print_signal_received_reason): Print which thread
330         received signal.
331         * thread.c (show_thread_that_caused_stop): New function.
332
333 2016-01-18  Gary Benson  <gbenson@redhat.com>
334
335         * nat/linux-namespaces.c (do_fork): New function.
336         (linux_mntns_get_helper): Use the above.
337
338 2016-01-17  Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de>  (tiny change)
339
340         Pushed by Joel Brobecker  <brobecker@adacore.com>.
341         PR gdb/19208
342         * dwarf2read.c (read_partial_die): Do not call set_objfile_main_name
343         if the function has no name.
344
345 2016-01-15  Sandra Loosemore  <sandra@codesourcery.com>
346
347         * charset.c [PHONY_ICONV] (GDB_DEFAULT_HOST_CHARSET):
348         Conditionalize for Windows host.
349         (GDB_DEFAULT_TARGET_CHARSET): Match GDB_DEFAULT_HOST_CHARSET.
350         (GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32.
351         (phony_iconv_open): Handle both UTF-32 endiannesses.
352         (phony_iconv): Likewise.  Check for output overflow and clean up
353         out-of-input cases.  Correct adjustment to input buffer pointer.
354         (set_be_le_names) [PHONY_ICONV]: Use hard-wired names to match
355         phony_iconv_open.
356
357 2016-01-15  Pedro Alves  <palves@redhat.com>
358
359         * NEWS: Mention star wildcard ranges.
360         * cli/cli-utils.c (get_number_or_range): Check state->in_range first.
361         (number_range_setup_range): New function.
362         * cli/cli-utils.h (number_range_setup_range): New declaration.
363         * thread.c (thread_apply_command): Support star TID ranges.
364         * tid-parse.c (tid_range_parser_finished)
365         (tid_range_parser_string, tid_range_parser_skip)
366         (get_tid_or_range, get_tid_or_range): Handle
367         TID_RANGE_STATE_STAR_RANGE.
368         (tid_range_parser_star_range): New function.
369         * tid-parse.h (enum tid_range_state) <TID_RANGE_STATE_STAR_RANGE>:
370         New value.
371         (tid_range_parser_star_range): New declaration.
372
373 2016-01-15  Pedro Alves  <palves@redhat.com>
374
375         * thread.c (thread_apply_command): Use the tid range parser to
376         advance past the thread ID list.
377         * tid-parse.c (get_positive_number_trailer): New function.
378         (parse_thread_id): Use it.
379         (get_tid_or_range): Use it.  Return 0 instead of throwing invalid
380         thread ID error.
381         (get_tid_or_range): Detect negative values.  Return 0 instead of
382         throwing invalid thread ID error.
383
384 2016-01-14  Yao Qi  <yao.qi@linaro.org>
385
386         * arm-linux-tdep.c (arm_linux_get_next_pcs_syscall_next_pc):
387         Declare.
388         (arm_linux_get_next_pcs_ops): Install
389         arm_linux_get_next_pcs_syscall_next_pc.
390         (arm_linux_syscall_next_pc): Change to ...
391         (arm_linux_get_next_pcs_syscall_next_pc): ... it.
392         (arm_linux_init_abi): Don't set tdep->syscall_next_pc.
393         * arm-tdep.c (arm_get_next_pcs_syscall_next_pc): Declare.
394         (arm_get_next_pcs_syscall_next_pc): Make it static.  Don't
395         call tdep->syscall_next_pc.
396         * arm-tdep.h (struct gdbarch_tdep) <syscall_next_pc>: Remove.
397         (arm_get_next_pcs_syscall_next_pc): Remove.
398
399 2016-01-14  Yao Qi  <yao.qi@linaro.org>
400
401         * remote.c (remote_set_syscall_catchpoint): Cast to char *.
402         * thread.c (do_captured_thread_select): Cast to const char *.
403
404 2016-01-14  Yao Qi  <yao.qi@linaro.org>
405
406         * arch/arm-get-next-pcs.c (arm_get_next_pcs_ctor): Change
407         argument arm_thumb2_breakpoint to has_thumb2_breakpoint.
408         (thumb_get_next_pcs_raw): Check has_thumb2_breakpoint
409         instead.
410         * arch/arm-get-next-pcs.h (struct arm_get_next_pcs)
411         <arm_thumb2_breakpoint>: Remove.
412         <has_thumb2_breakpoint>: New field.
413         (arm_get_next_pcs_ctor): Update declaration.
414         * arm-linux-tdep.c (arm_linux_software_single_step): Pass
415         1 to arm_get_next_pcs_ctor.
416         * arm-tdep.c (arm_software_single_step): Pass 0 to
417         arm_get_next_pcs_ctor.
418
419 2016-01-13  Ulrich Weigand  <uweigand@de.ibm.com>
420
421         * MAINTAINERS: Add Andreas Arnez as s390 target maintainer.
422
423 2016-01-13  Yao Qi  <yao.qi@linaro.org>
424
425         * arch/arm-get-next-pcs.c (arm_get_next_pcs_raw): Use
426         byte_order_for_code to read instruction.
427
428 2016-01-13  Pedro Alves  <palves@redhat.com>
429
430         * NEWS: Mention $_gthread.
431         * gdbthread.h (struct thread_info) <global_num>: Mention
432         $_gthread.
433         * thread.c (thread_num_make_value_helper): New function.
434         (thread_id_make_value): Delete.
435         (thread_id_per_inf_num_make_value, global_thread_id_make_value):
436         New.
437         (thread_funcs): Adjust.
438         (gthread_funcs): New.
439         (_initialize_thread): Register $_gthread variable.
440
441 2016-01-13  Pedro Alves  <palves@redhat.com>
442
443         * NEWS: Mention "info threads -gid".
444         * gdbthread.h (struct thread_info) <global_num>: Mention "info
445         threads -gid".
446         * thread.c (info_threads_command): Handle "-gid".
447         (_initialize_thread): Adjust "info threads" help string to mention
448         -gid.
449
450 2016-01-13  Pedro Alves  <palves@redhat.com>
451
452         * NEWS: Mention InferiorThread.global_num.
453         * python/py-infthread.c (thpy_get_global_num): New function.
454         (thread_object_getset): Register "global_num".
455
456 2016-01-13  Pedro Alves  <palves@redhat.com>
457
458         * NEWS: Mention that thread IDs are now per inferior and global
459         thread IDs.
460         * Makefile.in (SFILES): Add tid-parse.c.
461         (COMMON_OBS): Add tid-parse.o.
462         (HFILES_NO_SRCDIR): Add tid-parse.h.
463         * ada-tasks.c: Adjust to use ptid_to_global_thread_id.
464         * breakpoint.c (insert_breakpoint_locations)
465         (remove_threaded_breakpoints, bpstat_check_breakpoint_conditions)
466         (print_one_breakpoint_location, set_longjmp_breakpoint)
467         (check_longjmp_breakpoint_for_call_dummy)
468         (set_momentary_breakpoint): Adjust to use global IDs.
469         (find_condition_and_thread, watch_command_1): Use parse_thread_id.
470         (until_break_command, longjmp_bkpt_dtor)
471         (breakpoint_re_set_thread, insert_single_step_breakpoint): Adjust
472         to use global IDs.
473         * dummy-frame.c (pop_dummy_frame_bpt): Adjust to use
474         ptid_to_global_thread_id.
475         * elfread.c (elf_gnu_ifunc_resolver_stop): Likewise.
476         * gdbthread.h (struct thread_info): Rename field 'num' to
477         'global_num.  Add new fields 'per_inf_num' and 'inf'.
478         (thread_id_to_pid): Rename thread_id_to_pid to
479         global_thread_id_to_ptid.
480         (pid_to_thread_id): Rename to ...
481         (ptid_to_global_thread_id): ... this.
482         (valid_thread_id): Rename to ...
483         (valid_global_thread_id): ... this.
484         (find_thread_id): Rename to ...
485         (find_thread_global_id): ... this.
486         (ALL_THREADS, ALL_THREADS_BY_INFERIOR): Declare.
487         (print_thread_info): Add comment.
488         * tid-parse.h: New file.
489         * tid-parse.c: New file.
490         * infcmd.c (step_command_fsm_prepare)
491         (step_command_fsm_should_stop): Adjust to use the global thread
492         ID.
493         (until_next_command, until_next_command)
494         (finish_command_fsm_should_stop): Adjust to use the global thread
495         ID.
496         (attach_post_wait): Adjust to check the inferior number too.
497         * inferior.h (struct inferior) <highest_thread_num>: New field.
498         * infrun.c (handle_signal_stop)
499         (insert_exception_resume_breakpoint)
500         (insert_exception_resume_from_probe): Adjust to use the global
501         thread ID.
502         * record-btrace.c (record_btrace_open): Use global thread IDs.
503         * remote.c (process_initial_stop_replies): Also consider the
504         inferior number.
505         * target.c (target_pre_inferior): Clear the inferior's highest
506         thread num.
507         * thread.c (clear_thread_inferior_resources): Adjust to use the
508         global thread ID.
509         (new_thread): New inferior parameter.  Adjust to use it.  Set both
510         the thread's global ID and the thread's per-inferior ID.
511         (add_thread_silent): Adjust.
512         (find_thread_global_id): New.
513         (find_thread_id): Make static.  Adjust to rename.
514         (valid_thread_id): Rename to ...
515         (valid_global_thread_id): ... this.
516         (pid_to_thread_id): Rename to ...
517         (ptid_to_global_thread_id): ... this.
518         (thread_id_to_pid): Rename to ...
519         (global_thread_id_to_ptid): ... this.  Adjust.
520         (first_thread_of_process): Adjust.
521         (do_captured_list_thread_ids): Adjust to use global thread IDs.
522         (should_print_thread): New function.
523         (print_thread_info): Rename to ...
524         (print_thread_info_1): ... this, and add new show_global_ids
525         parameter.  Handle it.  Iterate over inferiors.
526         (print_thread_info): Reimplement as wrapper around
527         print_thread_info_1.
528         (show_inferior_qualified_tids): New function.
529         (print_thread_id): Use it.
530         (tp_array_compar): Compare inferior numbers too.
531         (thread_apply_command): Use tid_range_parser.
532         (do_captured_thread_select): Use parse_thread_id.
533         (thread_id_make_value): Adjust.
534         (_initialize_thread): Adjust "info threads" help string.
535         * varobj.c (struct varobj_root): Update comment.
536         (varobj_create): Adjust to use global thread IDs.
537         (value_of_root_1): Adjust to use global_thread_id_to_ptid.
538         * windows-tdep.c (display_tib): No longer accept an argument.
539         * cli/cli-utils.c (get_number_trailer): Make extern.
540         * cli/cli-utils.h (get_number_trailer): Declare.
541         (get_number_const): Adjust documentation.
542         * mi/mi-cmd-var.c (mi_cmd_var_update_iter): Adjust to use global
543         thread IDs.
544         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
545         (mi_on_normal_stop, mi_output_running_pid, mi_on_resume):
546         * mi/mi-main.c (mi_execute_command, mi_cmd_execute): Likewise.
547         * guile/scm-breakpoint.c (gdbscm_set_breakpoint_thread_x):
548         Likewise.
549         * python/py-breakpoint.c (bppy_set_thread): Likewise.
550         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
551         * python/py-infthread.c (thpy_get_num): Add comment and return the
552         per-inferior thread ID.
553         (thread_object_getset): Update comment of "num".
554
555 2016-01-13  Pedro Alves  <palves@redhat.com>
556
557         * breakpoint.c (remove_threaded_breakpoints)
558         (print_one_breakpoint_location): Use print_thread_id.
559         * btrace.c (btrace_enable, btrace_disable, btrace_teardown)
560         (btrace_fetch, btrace_clear): Use print_thread_id.
561         * common/print-utils.c (CELLSIZE): Delete.
562         (get_cell): Rename to ...
563         (get_print_cell): ... this and made extern.  Adjust call callers.
564         Adjust to use PRINT_CELL_SIZE.
565         * common/print-utils.h (get_print_cell): Declare.
566         (PRINT_CELL_SIZE): New.
567         * gdbthread.h (print_thread_id): Declare.
568         * infcmd.c (signal_command): Use print_thread_id.
569         * inferior.c (print_inferior): Use print_thread_id.
570         * infrun.c (handle_signal_stop)
571         (insert_exception_resume_breakpoint)
572         (insert_exception_resume_from_probe)
573         (print_signal_received_reason): Use print_thread_id.
574         * record-btrace.c (record_btrace_info)
575         (record_btrace_resume_thread, record_btrace_cancel_resume)
576         (record_btrace_step_thread, record_btrace_wait): Use
577         print_thread_id.
578         * thread.c (thread_apply_all_command): Use print_thread_id.
579         (print_thread_id): New function.
580         (thread_apply_command): Use print_thread_id.
581         (thread_command, thread_find_command, do_captured_thread_select):
582         Use print_thread_id.
583
584 2016-01-13  Pedro Alves  <palves@redhat.com>
585
586         * NEWS: Mention InferiorThread.inferior.
587         * python/py-infthread.c (thpy_get_inferior): New.
588         (thread_object_getset): Register "inferior".
589
590 2016-01-13  Pedro Alves  <palves@redhat.com>
591
592         * NEWS: Mention $_inferior.
593         * inferior.c (inferior_id_make_value): New.
594         (inferior_funcs): New.
595         (_initialize_inferior): Create $_inferior variable.
596
597 2016-01-13  Pedro Alves  <palves@redhat.com>
598
599         PR breakpoints/19388
600         * frame.c (get_current_frame): Use validate_registers_access.
601         * gdbthread.h (validate_registers_access): Declare.
602         * infrun.c (validate_siginfo_access): Delete.
603         (siginfo_value_read, siginfo_value_write): Use
604         validate_registers_access.
605         * thread.c (validate_registers_access): New function.
606
607 2016-01-12  Josh Stone  <jistone@redhat.com>
608             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
609
610         * NEWS (Changes since GDB 7.10): Mention QCatchSyscalls and the
611         syscall_entry and syscall_return stop reasons.  Mention GDB
612         support for remote catch syscall.
613         * remote.c (PACKET_QCatchSyscalls): New enum.
614         (remote_set_syscall_catchpoint): New function.
615         (remote_protocol_features): New element for QCatchSyscalls.
616         (remote_parse_stop_reply): Parse syscall_entry/return stops.
617         (init_remote_ops): Install remote_set_syscall_catchpoint.
618         (_initialize_remote): Config QCatchSyscalls.
619         * linux-nat.h (struct lwp_info) <syscall_state>: Comment typo.
620
621 2016-01-12  Yao Qi  <yao.qi@linaro.org>
622
623         * nat/linux-ptrace.c (linux_child_function): Cast child_stack
624         to gdb_byte * and pass to linux_fork_to_function.
625
626 2016-01-12  Yao Qi  <yao.qi@linaro.org>
627
628         * nat/linux-ptrace.c (linux_fork_to_function): Change type
629         of argument 'function'.
630         (linux_grandchild_function): Change return type to 'int'.
631         Change child_stack's type to 'void *'.
632         (linux_child_function): Likewise.
633
634 2016-01-12  Pedro Alves  <palves@redhat.com>
635
636         Remove use of the registered trademark symbol throughout.
637
638 2016-01-12  Thomas Schwinge  <thomas@codesourcery.com>
639
640         * reply_mig_hack.awk: Rewrite one regular expression.
641
642 2016-01-11  Mike Frysinger  <vapier@gentoo.org>
643
644         * acinclude.m4: Include new warning.m4 file.
645         * configure: Regenerated.
646         * configure.ac: Move all warning logic ...
647         * warning.m4: ... here.
648
649 2016-01-08  Yao Qi  <yao.qi@linaro.org>
650
651         * extension.c: Include target.h.
652         (set_active_ext_lang): Only call install_gdb_sigint_handler,
653         check_quit_flag, and set_quit_flag if target_terminal_is_ours
654         returns false.
655         (restore_active_ext_lang): Likewise.
656         * target.c (target_terminal_is_ours): New function.
657         * target.h (target_terminal_is_ours): Declare.
658
659 2016-01-07  Maciej W. Rozycki  <macro@imgtec.com>
660
661         * mips-tdep.c (mips_breakpoint_from_pc): Rename local `status'
662         to `err' in the little-endian leg.
663
664 2016-01-06  Yao Qi  <yao.qi@linaro.org>
665
666         * arch/arm-get-next-pcs.c (arm_get_next_pcs): Move it to some
667         lines below.
668         (thumb_get_next_pcs_raw): Make it static.
669         (arm_get_next_pcs_raw): Likewise.
670         * arch/arm-get-next-pcs.h (thumb_get_next_pcs_raw): Remove the
671         declaration.
672         (arm_get_next_pcs_raw): Likewise.
673
674 2016-01-05  Mike Frysinger  <vapier@gentoo.org>
675
676         * version.in: Change cvs to git.
677
678 2016-01-05  Mike Frysinger  <vapier@gentoo.org>
679
680         * configure.tgt (score-*-*): Delete gdb_sim assignment.
681
682 2016-01-05  Pedro Alves  <palves@redhat.com>
683
684         PR sim/13418
685         * configure.ac: Define WITH_PPC_SIM when linking in the sim and
686         the target is powerpc*.
687         * rs6000-tdep.c (init_sim_regno_table): Check WITH_PPC_SIM instead
688         of WITH_SIM.
689         * configure: Regenerate.
690         * config.in: Regenerate.
691
692 2016-01-04  Markus Metzger  <markus.t.metzger@intel.com>
693
694         * btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.
695
696 2016-01-02  Mike Frysinger  <vapier@gentoo.org>
697
698         * configure.tgt (powerpc*-*-*): Delete test call and
699         always assign gdb_sim.
700
701 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
702
703         Update year range in copyright notice of all files.
704
705 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
706
707         * top.c (print_gdb_version): Change copyright year in version
708         message.
709
710 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
711
712         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2015.
713
714 For older changes see ChangeLog-2015.
715 \f
716 Local Variables:
717 mode: change-log
718 left-margin: 8
719 fill-column: 74
720 version-control: never
721 coding: utf-8
722 End: