Fix PR threads/19422 - show which thread caused stop
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2016-01-18 Pedro Alves <palves@redhat.com>
2
3 * NEWS: Mention that GDB now displays the ID and name of the
4 thread that hit a breakpoint or received a signal.
5 * break-catch-sig.c (signal_catchpoint_print_it): Use
6 maybe_print_thread_hit_breakpoint.
7 * break-catch-syscall.c (print_it_catch_syscall): Likewise.
8 * break-catch-throw.c (print_it_exception_catchpoint): Likewise.
9 * breakpoint.c (maybe_print_thread_hit_breakpoint): New function.
10 (print_it_catch_fork, print_it_catch_vfork, print_it_catch_solib)
11 (print_it_catch_exec, print_it_ranged_breakpoint)
12 (print_it_watchpoint, print_it_masked_watchpoint, bkpt_print_it):
13 Use maybe_print_thread_hit_breakpoint.
14 * breakpoint.h (maybe_print_thread_hit_breakpoint): Declare.
15 * gdbthread.h (show_thread_that_caused_stop): Declare.
16 * infrun.c (print_signal_received_reason): Print which thread
17 received signal.
18 * thread.c (show_thread_that_caused_stop): New function.
19
20 2016-01-18 Gary Benson <gbenson@redhat.com>
21
22 * nat/linux-namespaces.c (do_fork): New function.
23 (linux_mntns_get_helper): Use the above.
24
25 2016-01-17 Jonas Hahnfeld <Hahnfeld@itc.rwth-aachen.de> (tiny change)
26
27 Pushed by Joel Brobecker <brobecker@adacore.com>.
28 PR gdb/19208
29 * dwarf2read.c (read_partial_die): Do not call set_objfile_main_name
30 if the function has no name.
31
32 2016-01-15 Sandra Loosemore <sandra@codesourcery.com>
33
34 * charset.c [PHONY_ICONV] (GDB_DEFAULT_HOST_CHARSET):
35 Conditionalize for Windows host.
36 (GDB_DEFAULT_TARGET_CHARSET): Match GDB_DEFAULT_HOST_CHARSET.
37 (GDB_DEFAULT_TARGET_WIDE_CHARSET): Use UTF-32.
38 (phony_iconv_open): Handle both UTF-32 endiannesses.
39 (phony_iconv): Likewise. Check for output overflow and clean up
40 out-of-input cases. Correct adjustment to input buffer pointer.
41 (set_be_le_names) [PHONY_ICONV]: Use hard-wired names to match
42 phony_iconv_open.
43
44 2016-01-15 Pedro Alves <palves@redhat.com>
45
46 * NEWS: Mention star wildcard ranges.
47 * cli/cli-utils.c (get_number_or_range): Check state->in_range first.
48 (number_range_setup_range): New function.
49 * cli/cli-utils.h (number_range_setup_range): New declaration.
50 * thread.c (thread_apply_command): Support star TID ranges.
51 * tid-parse.c (tid_range_parser_finished)
52 (tid_range_parser_string, tid_range_parser_skip)
53 (get_tid_or_range, get_tid_or_range): Handle
54 TID_RANGE_STATE_STAR_RANGE.
55 (tid_range_parser_star_range): New function.
56 * tid-parse.h (enum tid_range_state) <TID_RANGE_STATE_STAR_RANGE>:
57 New value.
58 (tid_range_parser_star_range): New declaration.
59
60 2016-01-15 Pedro Alves <palves@redhat.com>
61
62 * thread.c (thread_apply_command): Use the tid range parser to
63 advance past the thread ID list.
64 * tid-parse.c (get_positive_number_trailer): New function.
65 (parse_thread_id): Use it.
66 (get_tid_or_range): Use it. Return 0 instead of throwing invalid
67 thread ID error.
68 (get_tid_or_range): Detect negative values. Return 0 instead of
69 throwing invalid thread ID error.
70
71 2016-01-14 Yao Qi <yao.qi@linaro.org>
72
73 * arm-linux-tdep.c (arm_linux_get_next_pcs_syscall_next_pc):
74 Declare.
75 (arm_linux_get_next_pcs_ops): Install
76 arm_linux_get_next_pcs_syscall_next_pc.
77 (arm_linux_syscall_next_pc): Change to ...
78 (arm_linux_get_next_pcs_syscall_next_pc): ... it.
79 (arm_linux_init_abi): Don't set tdep->syscall_next_pc.
80 * arm-tdep.c (arm_get_next_pcs_syscall_next_pc): Declare.
81 (arm_get_next_pcs_syscall_next_pc): Make it static. Don't
82 call tdep->syscall_next_pc.
83 * arm-tdep.h (struct gdbarch_tdep) <syscall_next_pc>: Remove.
84 (arm_get_next_pcs_syscall_next_pc): Remove.
85
86 2016-01-14 Yao Qi <yao.qi@linaro.org>
87
88 * remote.c (remote_set_syscall_catchpoint): Cast to char *.
89 * thread.c (do_captured_thread_select): Cast to const char *.
90
91 2016-01-14 Yao Qi <yao.qi@linaro.org>
92
93 * arch/arm-get-next-pcs.c (arm_get_next_pcs_ctor): Change
94 argument arm_thumb2_breakpoint to has_thumb2_breakpoint.
95 (thumb_get_next_pcs_raw): Check has_thumb2_breakpoint
96 instead.
97 * arch/arm-get-next-pcs.h (struct arm_get_next_pcs)
98 <arm_thumb2_breakpoint>: Remove.
99 <has_thumb2_breakpoint>: New field.
100 (arm_get_next_pcs_ctor): Update declaration.
101 * arm-linux-tdep.c (arm_linux_software_single_step): Pass
102 1 to arm_get_next_pcs_ctor.
103 * arm-tdep.c (arm_software_single_step): Pass 0 to
104 arm_get_next_pcs_ctor.
105
106 2016-01-13 Ulrich Weigand <uweigand@de.ibm.com>
107
108 * MAINTAINERS: Add Andreas Arnez as s390 target maintainer.
109
110 2016-01-13 Yao Qi <yao.qi@linaro.org>
111
112 * arch/arm-get-next-pcs.c (arm_get_next_pcs_raw): Use
113 byte_order_for_code to read instruction.
114
115 2016-01-13 Pedro Alves <palves@redhat.com>
116
117 * NEWS: Mention $_gthread.
118 * gdbthread.h (struct thread_info) <global_num>: Mention
119 $_gthread.
120 * thread.c (thread_num_make_value_helper): New function.
121 (thread_id_make_value): Delete.
122 (thread_id_per_inf_num_make_value, global_thread_id_make_value):
123 New.
124 (thread_funcs): Adjust.
125 (gthread_funcs): New.
126 (_initialize_thread): Register $_gthread variable.
127
128 2016-01-13 Pedro Alves <palves@redhat.com>
129
130 * NEWS: Mention "info threads -gid".
131 * gdbthread.h (struct thread_info) <global_num>: Mention "info
132 threads -gid".
133 * thread.c (info_threads_command): Handle "-gid".
134 (_initialize_thread): Adjust "info threads" help string to mention
135 -gid.
136
137 2016-01-13 Pedro Alves <palves@redhat.com>
138
139 * NEWS: Mention InferiorThread.global_num.
140 * python/py-infthread.c (thpy_get_global_num): New function.
141 (thread_object_getset): Register "global_num".
142
143 2016-01-13 Pedro Alves <palves@redhat.com>
144
145 * NEWS: Mention that thread IDs are now per inferior and global
146 thread IDs.
147 * Makefile.in (SFILES): Add tid-parse.c.
148 (COMMON_OBS): Add tid-parse.o.
149 (HFILES_NO_SRCDIR): Add tid-parse.h.
150 * ada-tasks.c: Adjust to use ptid_to_global_thread_id.
151 * breakpoint.c (insert_breakpoint_locations)
152 (remove_threaded_breakpoints, bpstat_check_breakpoint_conditions)
153 (print_one_breakpoint_location, set_longjmp_breakpoint)
154 (check_longjmp_breakpoint_for_call_dummy)
155 (set_momentary_breakpoint): Adjust to use global IDs.
156 (find_condition_and_thread, watch_command_1): Use parse_thread_id.
157 (until_break_command, longjmp_bkpt_dtor)
158 (breakpoint_re_set_thread, insert_single_step_breakpoint): Adjust
159 to use global IDs.
160 * dummy-frame.c (pop_dummy_frame_bpt): Adjust to use
161 ptid_to_global_thread_id.
162 * elfread.c (elf_gnu_ifunc_resolver_stop): Likewise.
163 * gdbthread.h (struct thread_info): Rename field 'num' to
164 'global_num. Add new fields 'per_inf_num' and 'inf'.
165 (thread_id_to_pid): Rename thread_id_to_pid to
166 global_thread_id_to_ptid.
167 (pid_to_thread_id): Rename to ...
168 (ptid_to_global_thread_id): ... this.
169 (valid_thread_id): Rename to ...
170 (valid_global_thread_id): ... this.
171 (find_thread_id): Rename to ...
172 (find_thread_global_id): ... this.
173 (ALL_THREADS, ALL_THREADS_BY_INFERIOR): Declare.
174 (print_thread_info): Add comment.
175 * tid-parse.h: New file.
176 * tid-parse.c: New file.
177 * infcmd.c (step_command_fsm_prepare)
178 (step_command_fsm_should_stop): Adjust to use the global thread
179 ID.
180 (until_next_command, until_next_command)
181 (finish_command_fsm_should_stop): Adjust to use the global thread
182 ID.
183 (attach_post_wait): Adjust to check the inferior number too.
184 * inferior.h (struct inferior) <highest_thread_num>: New field.
185 * infrun.c (handle_signal_stop)
186 (insert_exception_resume_breakpoint)
187 (insert_exception_resume_from_probe): Adjust to use the global
188 thread ID.
189 * record-btrace.c (record_btrace_open): Use global thread IDs.
190 * remote.c (process_initial_stop_replies): Also consider the
191 inferior number.
192 * target.c (target_pre_inferior): Clear the inferior's highest
193 thread num.
194 * thread.c (clear_thread_inferior_resources): Adjust to use the
195 global thread ID.
196 (new_thread): New inferior parameter. Adjust to use it. Set both
197 the thread's global ID and the thread's per-inferior ID.
198 (add_thread_silent): Adjust.
199 (find_thread_global_id): New.
200 (find_thread_id): Make static. Adjust to rename.
201 (valid_thread_id): Rename to ...
202 (valid_global_thread_id): ... this.
203 (pid_to_thread_id): Rename to ...
204 (ptid_to_global_thread_id): ... this.
205 (thread_id_to_pid): Rename to ...
206 (global_thread_id_to_ptid): ... this. Adjust.
207 (first_thread_of_process): Adjust.
208 (do_captured_list_thread_ids): Adjust to use global thread IDs.
209 (should_print_thread): New function.
210 (print_thread_info): Rename to ...
211 (print_thread_info_1): ... this, and add new show_global_ids
212 parameter. Handle it. Iterate over inferiors.
213 (print_thread_info): Reimplement as wrapper around
214 print_thread_info_1.
215 (show_inferior_qualified_tids): New function.
216 (print_thread_id): Use it.
217 (tp_array_compar): Compare inferior numbers too.
218 (thread_apply_command): Use tid_range_parser.
219 (do_captured_thread_select): Use parse_thread_id.
220 (thread_id_make_value): Adjust.
221 (_initialize_thread): Adjust "info threads" help string.
222 * varobj.c (struct varobj_root): Update comment.
223 (varobj_create): Adjust to use global thread IDs.
224 (value_of_root_1): Adjust to use global_thread_id_to_ptid.
225 * windows-tdep.c (display_tib): No longer accept an argument.
226 * cli/cli-utils.c (get_number_trailer): Make extern.
227 * cli/cli-utils.h (get_number_trailer): Declare.
228 (get_number_const): Adjust documentation.
229 * mi/mi-cmd-var.c (mi_cmd_var_update_iter): Adjust to use global
230 thread IDs.
231 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
232 (mi_on_normal_stop, mi_output_running_pid, mi_on_resume):
233 * mi/mi-main.c (mi_execute_command, mi_cmd_execute): Likewise.
234 * guile/scm-breakpoint.c (gdbscm_set_breakpoint_thread_x):
235 Likewise.
236 * python/py-breakpoint.c (bppy_set_thread): Likewise.
237 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
238 * python/py-infthread.c (thpy_get_num): Add comment and return the
239 per-inferior thread ID.
240 (thread_object_getset): Update comment of "num".
241
242 2016-01-13 Pedro Alves <palves@redhat.com>
243
244 * breakpoint.c (remove_threaded_breakpoints)
245 (print_one_breakpoint_location): Use print_thread_id.
246 * btrace.c (btrace_enable, btrace_disable, btrace_teardown)
247 (btrace_fetch, btrace_clear): Use print_thread_id.
248 * common/print-utils.c (CELLSIZE): Delete.
249 (get_cell): Rename to ...
250 (get_print_cell): ... this and made extern. Adjust call callers.
251 Adjust to use PRINT_CELL_SIZE.
252 * common/print-utils.h (get_print_cell): Declare.
253 (PRINT_CELL_SIZE): New.
254 * gdbthread.h (print_thread_id): Declare.
255 * infcmd.c (signal_command): Use print_thread_id.
256 * inferior.c (print_inferior): Use print_thread_id.
257 * infrun.c (handle_signal_stop)
258 (insert_exception_resume_breakpoint)
259 (insert_exception_resume_from_probe)
260 (print_signal_received_reason): Use print_thread_id.
261 * record-btrace.c (record_btrace_info)
262 (record_btrace_resume_thread, record_btrace_cancel_resume)
263 (record_btrace_step_thread, record_btrace_wait): Use
264 print_thread_id.
265 * thread.c (thread_apply_all_command): Use print_thread_id.
266 (print_thread_id): New function.
267 (thread_apply_command): Use print_thread_id.
268 (thread_command, thread_find_command, do_captured_thread_select):
269 Use print_thread_id.
270
271 2016-01-13 Pedro Alves <palves@redhat.com>
272
273 * NEWS: Mention InferiorThread.inferior.
274 * python/py-infthread.c (thpy_get_inferior): New.
275 (thread_object_getset): Register "inferior".
276
277 2016-01-13 Pedro Alves <palves@redhat.com>
278
279 * NEWS: Mention $_inferior.
280 * inferior.c (inferior_id_make_value): New.
281 (inferior_funcs): New.
282 (_initialize_inferior): Create $_inferior variable.
283
284 2016-01-13 Pedro Alves <palves@redhat.com>
285
286 PR breakpoints/19388
287 * frame.c (get_current_frame): Use validate_registers_access.
288 * gdbthread.h (validate_registers_access): Declare.
289 * infrun.c (validate_siginfo_access): Delete.
290 (siginfo_value_read, siginfo_value_write): Use
291 validate_registers_access.
292 * thread.c (validate_registers_access): New function.
293
294 2016-01-12 Josh Stone <jistone@redhat.com>
295 Philippe Waroquiers <philippe.waroquiers@skynet.be>
296
297 * NEWS (Changes since GDB 7.10): Mention QCatchSyscalls and the
298 syscall_entry and syscall_return stop reasons. Mention GDB
299 support for remote catch syscall.
300 * remote.c (PACKET_QCatchSyscalls): New enum.
301 (remote_set_syscall_catchpoint): New function.
302 (remote_protocol_features): New element for QCatchSyscalls.
303 (remote_parse_stop_reply): Parse syscall_entry/return stops.
304 (init_remote_ops): Install remote_set_syscall_catchpoint.
305 (_initialize_remote): Config QCatchSyscalls.
306 * linux-nat.h (struct lwp_info) <syscall_state>: Comment typo.
307
308 2016-01-12 Yao Qi <yao.qi@linaro.org>
309
310 * nat/linux-ptrace.c (linux_child_function): Cast child_stack
311 to gdb_byte * and pass to linux_fork_to_function.
312
313 2016-01-12 Yao Qi <yao.qi@linaro.org>
314
315 * nat/linux-ptrace.c (linux_fork_to_function): Change type
316 of argument 'function'.
317 (linux_grandchild_function): Change return type to 'int'.
318 Change child_stack's type to 'void *'.
319 (linux_child_function): Likewise.
320
321 2016-01-12 Pedro Alves <palves@redhat.com>
322
323 Remove use of the registered trademark symbol throughout.
324
325 2016-01-12 Thomas Schwinge <thomas@codesourcery.com>
326
327 * reply_mig_hack.awk: Rewrite one regular expression.
328
329 2016-01-11 Mike Frysinger <vapier@gentoo.org>
330
331 * acinclude.m4: Include new warning.m4 file.
332 * configure: Regenerated.
333 * configure.ac: Move all warning logic ...
334 * warning.m4: ... here.
335
336 2016-01-08 Yao Qi <yao.qi@linaro.org>
337
338 * extension.c: Include target.h.
339 (set_active_ext_lang): Only call install_gdb_sigint_handler,
340 check_quit_flag, and set_quit_flag if target_terminal_is_ours
341 returns false.
342 (restore_active_ext_lang): Likewise.
343 * target.c (target_terminal_is_ours): New function.
344 * target.h (target_terminal_is_ours): Declare.
345
346 2016-01-07 Maciej W. Rozycki <macro@imgtec.com>
347
348 * mips-tdep.c (mips_breakpoint_from_pc): Rename local `status'
349 to `err' in the little-endian leg.
350
351 2016-01-06 Yao Qi <yao.qi@linaro.org>
352
353 * arch/arm-get-next-pcs.c (arm_get_next_pcs): Move it to some
354 lines below.
355 (thumb_get_next_pcs_raw): Make it static.
356 (arm_get_next_pcs_raw): Likewise.
357 * arch/arm-get-next-pcs.h (thumb_get_next_pcs_raw): Remove the
358 declaration.
359 (arm_get_next_pcs_raw): Likewise.
360
361 2016-01-05 Mike Frysinger <vapier@gentoo.org>
362
363 * version.in: Change cvs to git.
364
365 2016-01-05 Mike Frysinger <vapier@gentoo.org>
366
367 * configure.tgt (score-*-*): Delete gdb_sim assignment.
368
369 2016-01-05 Pedro Alves <palves@redhat.com>
370
371 PR sim/13418
372 * configure.ac: Define WITH_PPC_SIM when linking in the sim and
373 the target is powerpc*.
374 * rs6000-tdep.c (init_sim_regno_table): Check WITH_PPC_SIM instead
375 of WITH_SIM.
376 * configure: Regenerate.
377 * config.in: Regenerate.
378
379 2016-01-04 Markus Metzger <markus.t.metzger@intel.com>
380
381 * btrace.c (btrace_pt_readmem_callback): Do not return in TRY/CATCH.
382
383 2016-01-02 Mike Frysinger <vapier@gentoo.org>
384
385 * configure.tgt (powerpc*-*-*): Delete test call and
386 always assign gdb_sim.
387
388 2016-01-01 Joel Brobecker <brobecker@adacore.com>
389
390 Update year range in copyright notice of all files.
391
392 2016-01-01 Joel Brobecker <brobecker@adacore.com>
393
394 * top.c (print_gdb_version): Change copyright year in version
395 message.
396
397 2016-01-01 Joel Brobecker <brobecker@adacore.com>
398
399 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2015.
400
401 For older changes see ChangeLog-2015.
402 \f
403 Local Variables:
404 mode: change-log
405 left-margin: 8
406 fill-column: 74
407 version-control: never
408 coding: utf-8
409 End:
This page took 0.044795 seconds and 4 git commands to generate.