]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
[spu] Fix spu-linux native build
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
6654d750
AH
12017-11-24 Alan Hayward <alan.hayward@arm.com>
2
3 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
4 * linux-aarch64-low.c (initialize_low_arch): Call init func.
5 * linux-aarch64-tdesc-selftest.c: New file.
6 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
7
82017-11-24 Alan Hayward <alan.hayward@arm.com>
9
10 * configure.srv: Add new file.
11 * linux-aarch64-low.c (initialize_low_arch): Call init func.
12 * linux-aarch64-tdesc-selftest.c: New file.
13 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
14
49bdb7ee
AH
152017-11-24 Alan Hayward <alan.hayward@arm.com>
16
17 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
18 * linux-aarch64-low.c (initialize_low_arch): Remove init.
19 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
20
d6d7ce56
AH
212017-11-24 Alan Hayward <alan.hayward@arm.com>
22
23 * configure.srv: Add new files.
24 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
25 aarch64_linux_read_description.
26 * linux-aarch64-low.c (aarch64_linux_read_description):
27 Merge with aarch64_arch_setup.
28 (aarch64_arch_setup): Call aarch64_linux_read_description.
29 * linux-aarch64-tdesc.c: New file.
30 * linux-aarch64-tdesc.h: New file.
31
506fe5f4
YQ
322017-11-24 Yao Qi <yao.qi@linaro.org>
33
34 * configure.srv: Set $srv_regobj for tic6x-linux.
35 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
36 (tic6x_read_description): Move some code to tic6x_arch_setup.
37 (tic6x_tdesc_test): New function.
38 (initialize_low_arch): Call selftests::register_test.
39
29f9a567
YQ
402017-11-22 Yao Qi <yao.qi@linaro.org>
41
42 * remote-utils.c (prepare_resume_reply): Use memcpy.
43
578290ec
SM
442017-11-19 Simon Marchi <simon.marchi@ericsson.com>
45
46 * linux-low.c (kill_one_lwp_callback): Return void, take
47 argument directly, don't filter on pid.
48 (linux_kill): Use for_each_thread.
49
eca55aec
SM
502017-11-19 Simon Marchi <simon.marchi@ericsson.com>
51
52 * linux-low.c (need_step_over_p): Return bool, remove dummy
53 argument.
54 (linux_resume, proceed_all_lwps): Use find_thread.
55
25c28b4d
SM
562017-11-19 Simon Marchi <simon.marchi@ericsson.com>
57
58 * linux-low.c (resume_status_pending_p): Return bool, remove
59 flag_p argument.
60 (linux_resume): Use find_thread.
61
5fdda392
SM
622017-11-19 Simon Marchi <simon.marchi@ericsson.com>
63
64 * linux-low.c (struct thread_resume_array): Remove.
65 (linux_set_resume_request): Return void, take arguments
66 directly.
67 (linux_resume): Use for_each_thread.
68
fcb056a5
SM
692017-11-19 Simon Marchi <simon.marchi@ericsson.com>
70
71 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
72 return bool, remove data argument.
73 (linux_stabilize_threads): Use find_thread.
74
139720c5
SM
752017-11-19 Simon Marchi <simon.marchi@ericsson.com>
76
77 * linux-low.c (unsuspend_one_lwp): Remove.
78 (unsuspend_all_lwps): Use for_each_thread, inline code from
79 unsuspend_one_lwp.
80
6d1e5673
SM
812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
82
83 * gdbthread.h (find_thread): Add overload with ptid_t filter.
84 * linux-low.c (struct iterate_over_lwps_args): Remove.
85 (iterate_over_lwps_filter): Remove.
86 (iterate_over_lwps): Use find_thread.
87
bbf550d5
SM
882017-11-19 Simon Marchi <simon.marchi@ericsson.com>
89
90 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
91 (linux_handle_new_gdb_connection): Use for_each_thread, inline
92 code from reset_lwp_ptrace_options_callback.
93
00192f77
SM
942017-11-19 Simon Marchi <simon.marchi@ericsson.com>
95
96 * linux-arm-low.c (struct update_registers_data): Remove.
97 (update_registers_callback): Return void, take arguments
98 directly, don't check thread's pid.
99 (arm_insert_point, arm_remove_point): Use for_each_thread.
100
2bee2b6c
SM
1012017-11-19 Simon Marchi <simon.marchi@ericsson.com>
102
103 * win32-low.c (continue_one_thread): Return void, take argument
104 directly.
105 (child_continue): Use for_each_thread.
106
0b360f19
SM
1072017-11-19 Simon Marchi <simon.marchi@ericsson.com>
108
109 * win32-i386-low.c (update_debug_registers_callback): Rename
110 to ...
111 (update_debug_registers): ... this, return void, remove pid_p arg.
112 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
113
f27866ba
SM
1142017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
115
116 * inferiors.h (struct process_info): Add constructor, initialize
117 fields..
118 <syscalls_to_catch>: Change type to std::vector<int>.
119 * inferiors.c (add_process): Allocate process_info with new.
120 (remove_process): Free process_info with delete.
121 * linux-low.c (handle_extended_wait): Adjust.
122 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
123 * server.c (handle_general_set): Adjust.
124
e849ea89
PA
1252017-11-16 Pedro Alves <palves@redhat.com>
126
127 * remote-utils.c (remote_close): Block SIGIO signals instead of
128 uninstalling the SIGIO handler.
129
1d0aa65c
AH
1302017-11-16 Alan Hayward <alan.hayward@arm.com>
131
132 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
133
3491a34c
YQ
1342017-11-16 Yao Qi <yao.qi@linaro.org>
135
136 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
137 (tic6x_store_gregset): Likewise.
138 (tic6x_usrregs_info): Move it up.
139
a602f924
AH
1402017-11-15 Alan Hayward <alan.hayward@arm.com>
141
142 * Makefile.in: Update arch rules.
143 * configure.srv: Explicitly mark arch/ files.
144
5616b6c3
AS
1452017-11-13 Andreas Schwab <schwab@suse.de>
146
147 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
148 function.
149 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
150
d1928160
PA
1512017-11-06 Pedro Alves <palves@redhat.com>
152
153 * config.in, configure: Regenerate.
154
bac608e7
SM
1552017-10-27 Simon Marchi <simon.marchi@ericsson.com>
156
157 * target.c (struct thread_search): Remove.
158 (thread_search_callback): Remove.
159 (prepare_to_access_memory): Use for_each_thread instead of
160 find_inferior. Inline code from thread_search_callback.
161
eaddb425
SM
1622017-10-27 Simon Marchi <simon.marchi@ericsson.com>
163
164 * server.c (struct visit_actioned_threads_data): Remove.
165 (visit_actioned_threads): Change prototype to take arguments
166 directly.
167 (resume): Use find_thread instead of find_inferior.
168
99078d34
SM
1692017-10-27 Simon Marchi <simon.marchi@ericsson.com>
170
171 * server.c (queue_stop_reply_callback): Change prototype, return
172 void.
173 (find_status_pending_thread_callback): Remove.
174 (handle_status): Replace find_inferior with find_thread and
175 for_each_thread.
176
cc628f3d
AH
1772017-10-25 Alan Hayward <alan.hayward@arm.com>
178
179 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
180 with REGNO.
181 (aarch64_store_gregset): Likewise.
182 (aarch64_fill_fpregset): Likewise.
183 (aarch64_store_fpregset): Likewise.
184
4d3bb80e
SM
1852017-10-21 Simon Marchi <simon.marchi@ericsson.com>
186
187 * gdbthread.h (find_thread, for_each_thread): New functions.
188 * inferiors.c (thread_of_pid): Remove.
189 (find_any_thread_of_pid): Use find_thread.
190 * linux-low.c (num_lwps): Use for_each_thread.
191
7a7cdfa0
YQ
1922017-10-17 Yao Qi <yao.qi@linaro.org>
193
194 * Makefile.in: Remove one rule.
195 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
196
e675d170
YQ
1972017-10-17 Yao Qi <yao.qi@linaro.org>
198
199 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
200 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
201
7eb4e0f9
YQ
2022017-10-17 Yao Qi <yao.qi@linaro.org>
203
204 * configure.srv: Rename arm.o with arch/arm.o.
205
60d6cfc9
YQ
2062017-10-17 Yao Qi <yao.qi@linaro.org>
207
208 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
209 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
210 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
211 (arch-i386.o, arch-amd64.o): Remove rules.
212 (arch/%.o): New rule.
213 Update POSTCOMPILE and COMPILE.pre.
214 * configure.ac: Invoke AC_CONFIG_COMMANDS.
215 * configure: Re-generated.
216 * configure.srv: Replace arch-i386.o with arch/i386.o.
217 Replace arch-amd64.o with arch/amd64.o.
218
5bfda255
YQ
2192017-10-16 Yao Qi <yao.qi@linaro.org>
220
221 * configure: Regenerated.
222
9c80ecd6
SM
2232017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
224
225 * inferiors.h: (struct inferior_list): Remove.
226 (struct inferior_list_entry); Remove.
227 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
228 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
229 get_first_inferior): Remove.
230 (for_each_inferior, for_each_inferior_with_data, find_inferior,
231 find_inferior_id, find_inferior_in_random): Change signature.
232 * inferiors.c (all_threads): Change type to
233 std::list<thread_info *>.
234 (get_thread): Remove macro.
235 (find_inferior, find_inferior_id): Change signature, implement
236 using find_thread.
237 (find_inferior_in_random): Change signature, implement using
238 find_thread_in_random.
239 (for_each_inferior, for_each_inferior_with_data): Change
240 signature, implement using for_each_thread.
241 (add_inferior_to_list, remove_inferior): Remove.
242 (add_thread, get_first_thread, thread_of_pid,
243 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
244 (get_first_inferior, one_inferior_p, clear_inferior_list):
245 Remove.
246 (clear_inferiors, get_thread_process): Update.
247 * gdbthread.h: Include <list>.
248 (struct thread_info) <entry>: Remove field.
249 <id>: New field.
250 (all_threads): Change type to std::list<thread_info *>.
251 (get_first_inferior): Add doc.
252 (find_thread, for_each_thread, find_thread_in_random): New
253 functions.
254 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
255 * linux-arm-low.c (update_registers_callback): Update.
256 * linux-low.c (second_thread_of_pid_p): Update.
257 (kill_one_lwp_callback, linux_detach_lwp_callback,
258 delete_lwp_callback, status_pending_p_callback, same_lwp,
259 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
260 iterate_over_lwps, not_stopped_callback,
261 resume_stopped_resumed_lwps, count_events_callback,
262 select_singlestep_lwp_callback, select_event_lwp_callback,
263 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
264 suspend_and_send_sigstop_callback, wait_for_sigstop,
265 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
266 lwp_running, linux_set_resume_request, resume_status_pending_p,
267 need_step_over_p, start_step_over, linux_resume_one_thread,
268 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
269 reset_lwp_ptrace_options_callback): Update.
270 * linux-mips-low.c (update_watch_registers_callback): Update.
271 * regcache.c (regcache_invalidate_one, regcache_invalidate):
272 Update.
273 (free_register_cache_thread_one): Remove.
274 (regcache_release): Update.
275 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
276 handle_qxfer_threads_worker): Update.
277 (handle_query): Update, use list iterator.
278 (visit_actioned_threads, handle_pending_status,
279 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
280 clear_pending_status_callback, set_pending_status_callback,
281 find_status_pending_thread_callback, handle_status,
282 process_serial_event): Update.
283 * target.c (thread_search_callback): Update.
284 * thread-db.c (thread_db_get_tls_address): Update.
285 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
286 Update.
287 * win32-i386-low.c (update_debug_registers_callback): Update.
288 * win32-low.c (delete_thread_info, child_delete_thread,
289 continue_one_thread, suspend_one_thread,
290 get_child_debug_event): Adjust.
291
9179355e
SM
2922017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
293
294 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
295 * inferiors.h: Include <list>.
296 (struct process_info) <entry>: Remove field.
297 <pid>: New field.
298 (pid_of): Change macro to function.
299 (ptid_of, lwpid_of): Remove macro.
300 (all_processes): Change type to std::list<process_info *>.
301 (ALL_PROCESSES): Remove macro.
302 (for_each_process, find_process): New function.
303 * inferiors.c (all_processes): Change type to
304 std::list<process_info *>.
305 (find_thread_process): Adjust.
306 (add_process): Likewise.
307 (remove_process): Likewise.
308 (find_process_pid): Likewise.
309 (get_first_process): Likewise.
310 (started_inferior_callback): Remove.
311 (have_started_inferiors_p): Adjust.
312 (attached_inferior_callback): Remove.
313 (have_attached_inferiors_p): Adjust.
314 * linux-low.c (check_zombie_leaders): Likewise.
315 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
316 (x86_linux_update_xmltarget): Adjust.
317 * server.c (handle_query): Likewise.
318 (gdb_reattached_process): Remove.
319 (handle_status): Adjust.
320 (kill_inferior_callback): Likewise.
321 (detach_or_kill_inferior): Remove.
322 (print_started_pid): Likewise.
323 (print_attached_pid): Likewise.
324 (detach_or_kill_for_exit): Update.
325 (process_serial_event): Likewise.
326 * linux-arm-low.c (arm_new_fork): Likewise.
327
c9cb8905
SM
3282017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
329
330 * dll.h: Include <list>.
331 (struct dll_info): Add constructor.
332 <entry>: Remove field.
333 (all_dlls): Change type to std::list<dll_info>.
334 * dll.c: Include <algorithm>.
335 (get_dll): Remove macro.
336 (all_dlls): Change type to std::list<dll_info *>.
337 (free_one_dll): Remove.
338 (match_dll): Likewise.
339 (loaded_dll): Adjust.
340 (unloaded_dll): Adjust to all_dlls type change, use
341 std::find_if. Inline code from match_dll.
342 (clear_dlls): Adjust to all_dlls type change.
343 * server.c (emit_dll_description): Remove.
344 (handle_qxfer_libraries): Adjust to all_dlls type change,
345 integrate emit_dll_description's functionality.
346
04ec7890
SM
3472017-10-12 Simon Marchi <simon.marchi@ericsson.com>
348
349 * linux-low.h (struct linux_target_ops) <delete_process>: New
350 field.
351 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
352 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
353 (struct linux_target_ops): Add delete_process callback.
354 * linux-arm-low.c (arm_delete_process): New.
355 (struct linux_target_ops): Add delete_process callback.
356 * linux-bfin-low.c (struct linux_target_ops): Likewise.
357 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
358 * linux-m32r-low.c (struct linux_target_ops): Likewise.
359 * linux-mips-low.c (mips_linux_delete_process): New.
360 (struct linux_target_ops): Add delete_process callback.
361 * linux-ppc-low.c (struct linux_target_ops): Likewise.
362 * linux-s390-low.c (struct linux_target_ops): Likewise.
363 * linux-sh-low.c (struct linux_target_ops): Likewise.
364 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
365 * linux-tile-low.c (struct linux_target_ops): Likewise.
366 * linux-x86-low.c (x86_linux_delete_process): New.
367 (struct linux_target_ops): Add delete_process callback.
368 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
369
466eecee
SM
3702017-10-12 Simon Marchi <simon.marchi@ericsson.com>
371
372 * linux-aarch64-low.c (the_low_target): Add thread delete
373 callback.
374 * linux-arm-low.c (arm_delete_thread): New function.
375 (the_low_target): Add thread delete callback.
376 * linux-bfin-low.c (the_low_target): Likewise.
377 * linux-crisv32-low.c (the_low_target): Likewise.
378 * linux-low.c (delete_lwp): Invoke delete_thread callback if
379 set.
380 * linux-low.h (struct linux_target_ops) <delete_thread>: New
381 field.
382 * linux-m32r-low.c (the_low_target): Add thread delete callback.
383 * linux-mips-low.c (mips_linux_delete_thread): New function.
384 (the_low_target): Add thread delete callback.
385 * linux-ppc-low.c (the_low_target): Likewise.
386 * linux-s390-low.c (the_low_target): Likewise.
387 * linux-sh-low.c (the_low_target): Likewise.
388 * linux-tic6x-low.c (the_low_target): Likewise.
389 * linux-tile-low.c (the_low_target): Likewise.
390 * linux-x86-low.c (the_low_target): Likewise.
391 * linux-xtensa-low.c (the_low_target): Likewise.
392
b79f7801
YZ
3932017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
394
395 * win32-low.c: Include "common-inferior.h".
396
bc3b087d
SDJ
3972017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
398
399 * inferiors.c (set_inferior_cwd): New function.
400 * server.c (handle_general_set): Handle QSetWorkingDir packet.
401 (handle_query): Inform that QSetWorkingDir is supported.
402 * win32-low.c (create_process): Pass the inferior's cwd to
403 CreateProcess.
404
d092c5a2
SDJ
4052017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
406
407 * inferiors.c (current_inferior_cwd): New global variable.
408 (get_inferior_cwd): New function.
409 * inferiors.h (struct process_info) <cwd>: New field.
410
7da0a886
SDJ
4112017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
412
413 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
414 (OBS): Add gdb_tilde_expand.o.
415
289a6840
SM
4162017-10-02 Simon Marchi <simon.marchi@ericsson.com>
417
418 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
419 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
420
256642e8
PA
4212017-09-29 Pedro Alves <palves@redhat.com>
422
423 * ax.c (gdb_parse_agent_expr): Constify.
424 * ax.h (gdb_parse_agent_expr): Constify.
425 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
426 Constify.
427 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
428 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
429 * remote-utils.h (read_ptid): Constify.
430 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
431 (process_point_options, process_serial_event): Constify.
432 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
433 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
434 (cmd_qtbuffer): Constify.
435
5b9ca4d4
PA
4362017-09-29 Pedro Alves <palves@redhat.com>
437
438 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
439 fails.
440
94c207e0
PA
4412017-09-29 Pedro Alves <palves@redhat.com>
442
443 * linux-low.c (handle_extended_wait): Pass parent thread instead
444 of process to thread_db_notice_clone.
445 * linux-low.h (thread_db_notice_clone): Replace parent process
446 parameter with parent thread parameter.
447 * thread-db.c (find_one_thread): Add comment.
448 (thread_db_notice_clone): Replace parent process parameter with
449 parent thread parameter. Temporarily switch to the parent thread.
450
75352e28
SDJ
4512017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
452
453 * gdbthread.h: Include "common-gdbthread.h".
454 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
455 "if" when validating the ptid.
456 * remote-utils.c: Include "gdbthread.h".
457 (prepare_resume_reply): Use "switch_to_thread".
458 * target.c (done_accessing_memory): Likewise.
459
ad339634
AA
4602017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
461
462 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
463 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
464 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
465 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
466 s390x-gs-linux64-ipa.o to ipa_obj.
467 * linux-s390-low.c (HWCAP_S390_GS): New define.
468 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
469 New functions.
470 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
471 (s390_arch_setup): Check for guarded-storage support and choose
472 appropriate tdesc.
473 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
474 init_registers_s390x_gs_linux64.
475 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
476 enum value.
477 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
478 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
479
cc4d742f
SM
4802017-09-22 Simon Marchi <simon.marchi@ericsson.com>
481
482 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
483
f6327dcb
KB
4842017-09-21 Kevin Buettner <kevinb@redhat.com>
485
486 * linux-low.h (struct lwp_info): Add new field, thread_handle.
487 (thread_db_thread_handle): Declare.
488 * linux-low.c (linux_target_ops): Initialize thread_handle.
489 * server.c (handle_qxfer_threads_worker): Add support for
490 "handle" attribute.
491 * target.h (struct target_ops): Add new function pointer,
492 thread_handle.
493 (target_thread_handle): Define.
494 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
495 field in lwp.
496 (thread_db_thread_handle): New function.
497
86299109
KB
4982017-09-21 Kevin Buettner <kevinb@redhat.com>
499
500 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
501 * linux-low.h (thread_db_notice_clone): Declare.
502 * thread-db.c (thread_db_notice_clone): New function.
503
f557a88a
PA
5042017-09-21 Pedro Alves <palves@redhat.com>
505
506 * server.c (gdb_read_memory, handle_status, process_serial_event)
507 (handle_serial_event, handle_target_event): Adjust to
508 set_desired_thread prototype change.
509 * target.c (set_desired_thread): Remove 'use_general' parameter
510 and adjust.
511 * target.h (set_desired_thread): Remove 'use_general' parameter.
512
223ffa71
TT
5132017-09-20 Tom Tromey <tom@tromey.com>
514
515 * target.c (target_terminal::terminal_state): Define.
516 (target_terminal::init): Rename from target_terminal_init.
517 (target_terminal::inferior): Rename from
518 target_terminal_inferior.
519 (target_terminal::ours): Rename from target_terminal_ours.
520 (target_terminal::ours_for_output, target_terminal::info): New.
521
04fd3ba9
SM
5222017-09-16 Simon Marchi <simon.marchi@ericsson.com>
523
524 * server.c (accumulate_file_name_length): Remove.
525 (emit_dll_description): Adjust to std::string change.
526 (handle_qxfer_libraries): Use std::string to hold document.
527
5e187554
SM
5282017-09-16 Simon Marchi <simon.marchi@ericsson.com>
529
530 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
531 return type of xml_escape_text.
532 * server.c (emit_dll_description): Likewise.
533
1526853e
SM
5342017-09-16 Simon Marchi <simon.marchi@ericsson.com>
535
536 * server.c (captured_main): Accept argument for --selftest.
537 Update run_tests call.
538 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
539 when registering selftests.
540
c4dfafab
SDJ
5412017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
542
543 * regcache.c (get_thread_regcache): Update code to use "std::vector"
544 instead of "VEC" for "target_desc.reg_defs".
545 (regcache_cpy): Likewise.
546 (registers_to_string): Likewise.
547 (registers_from_string): Likewise.
548 (find_regno): Likewise.
549 (supply_regblock): Likewise.
550 (regcache_raw_read_unsigned): Likewise.
551 * tdesc.c (init_target_desc): Likewise.
552 (tdesc_create_reg): Likewise.
553 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
554 (struct target_desc) <reg_defs>: Convert to "std::vector".
555 (target_desc): Do not initialize "reg_defs".
556 (~target_desc): Update code to use "std::vector" instead of "VEC"
557 for "target_desc.reg_defs".
558 (operator==): Likewise.
559
124aceb4
SM
5602017-09-15 Simon Marchi <simon.marchi@ericsson.com>
561
562 * inferiors.h (thread_to_gdb_id): Remove.
563 * inferiors.c (thread_to_gdb_id): Remove.
564 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
565 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
566 lynx_store_registers, lynx_read_memory, lynx_write_memory):
567 Likewise.
568 * nto-low.c (nto_fetch_registers, nto_store_registers,
569 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
570
96cde54f
SM
5712017-09-15 Simon Marchi <simon.marchi@ericsson.com>
572
573 * inferiors.h (gdb_id_to_thread_id): Remove.
574 * inferiors.c (gdb_id_to_thread_id): Remove.
575 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
576 removal. Move pid declaration closer to where it's used.
577
e8ca139e
SM
5782017-09-15 Simon Marchi <simon.marchi@ericsson.com>
579
580 * server.c (handle_detach): New function.
581 (process_serial_event): Move code out, call handle_detach.
582
f8a4e119
SM
5832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
584
585 * server.c (require_running): Rename to ...
586 (require_running_or_return): ... this ...
587 (require_running_or_break): ... and this.
588 (handle_query, process_serial_event): Adjust.
589
0eb0a407
SM
5902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
591
592 * linux-low.c (linux_set_resume_request): Remove unused
593 variables.
594
785922a5
SM
5952017-09-15 Simon Marchi <simon.marchi@ericsson.com>
596
597 * server.c (first_thread_of): Remove.
598 (process_serial_event): Replace usage of first_thread_of with
599 find_any_thread_of_pid.
600 * tracepoint.c (same_process_p): Remove.
601 (gdb_agent_about_to_close): Replace usage of same_process_p with
602 find_any_thread_of_pid.
603 * linux-x86-low.c (same_process_callback): Remove.
604 (x86_arch_setup_process_callback): Replace usage of
605 same_process_callback with find_any_thread_of_pid.
606 * thread-db.c (any_thread_of): Remove.
607 (switch_to_process): Replace usage of any_thread_of with
608 find_any_thread_of_pid.
609 * inferiors.c (thread_pid_matches_callback): Remove.
610 (find_thread_process): Adjust to use find_any_thread_of_pid.
611
a059f00c
SDJ
6122017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
613
614 * regcache.c (get_thread_regcache): Guard calls to "memset"
615 with "!VEC_empty".
616
cc397f3a
SDJ
6172017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
618
619 * linux-low.c (handle_extended_wait): Use
620 "allocate_target_description" instead of "XNEW".
621 * linux-x86-low.c (initialize_low_arch): Likewise.
622
22916b07
YQ
6232017-09-05 Yao Qi <yao.qi@linaro.org>
624
625 * configure.srv (srv_i386_regobj): Remove.
626 (srv_amd64_regobj): Remove.
627 (srv_regobj): Set it to "" for x86 non-linux targets.
628 * linux-x86-tdesc.c (i386_linux_read_description):
629 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
630 (init_registers_i386): Remove the declaration.
631 (tdesc_i386): Remove the declaration.
632 (lynx_i386_arch_setup): Call i386_create_target_description.
633 * nto-x86-low.c: Likewise.
634 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
635 [!__x86_64__]: include arch/i386.h.
636 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
637
38602d55
YQ
6382017-09-05 Yao Qi <yao.qi@linaro.org>
639
640 * configure.srv (srv_amd64_linux_xmlfiles): Remove
641 i386/amd64-XXX-linux from it.
642
44b886ff
YQ
6432017-09-05 Yao Qi <yao.qi@linaro.org>
644
645 * configure.srv: Empty srv_amd64_linux_regobj if $development is
646 false.
647 (ipa_amd64_linux_regobj): Remove.
648 (ipa_x32_linux_regobj): Remove.
649
b4570e4b
YQ
6502017-09-05 Yao Qi <yao.qi@linaro.org>
651
652 * Makefile.in (arch-amd64.o): New rule.
653 * configure.srv: Append arch-amd64.o.
654 * linux-amd64-ipa.c: Include common/x86-xstate.h.
655 (get_ipa_tdesc): Call amd64_linux_read_description.
656 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
657 and init_registers_amd64_XXX.
658 * linux-x86-low.c (x86_linux_read_description): Call
659 amd64_linux_read_description.
660 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
661 (initialize_low_arch): Don't call init_registers_x32_XXX and
662 init_registers_amd64_XXX.
663 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
664 and tdesc_amd64_XXX.
665 [__x86_64__] (amd64_tdesc_test): New function.
666 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
667 and init_registers_amd64_XXX.
668 * linux-x86-tdesc.c: Include arch/amd64.h.
669 (xcr0_to_tdesc_idx): New function.
670 (i386_linux_read_description): New function.
671 (amd64_get_ipa_tdesc_idx): New function.
672 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
673 (amd64_get_ipa_tdesc): Declare.
674
d1f28ea2
YQ
6752017-09-05 Yao Qi <yao.qi@linaro.org>
676
677 * configure.srv (srv_i386_linux_xmlfiles): Remove
678 i386/i386-XXX-linux.xml from it.
679
25a93583
YQ
6802017-09-05 Yao Qi <yao.qi@linaro.org>
681
682 * configure.srv: Set srv_i386_linux_regobj empty if $development
683 is false.
684 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
685 initialize_low_tdesc.
686 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
687 with #if initialize_low_tdesc.
688 * linux-x86-tdesc-selftest.c: New file.
689 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
690
5f035c07
YQ
6912017-09-05 Yao Qi <yao.qi@linaro.org>
692
693 * Makefile.in (arch-i386.o): New rule.
694 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
695 (x86_64-*-linux*): Likewise.
696 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
697 include arch/i386.h.
698 (i386_linux_read_description): Remove code and call
699 i386_create_target_description.
700 * tdesc.c (allocate_target_description): New function.
701 * tdesc.h (set_tdesc_architecture): Remove declaration.
702 (set_tdesc_osabi): Likewise.
703
0abe8a89
YQ
7042017-09-05 Yao Qi <yao.qi@linaro.org>
705
706 * linux-x86-tdesc.c: Don't include <inttypes.h>.
707 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
708 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
709 .xmltarget.
710 * server.c (get_features_xml): Call tdesc_get_features_xml.
711 * tdesc.c (set_tdesc_architecture): New function.
712 (set_tdesc_osabi): New function.
713 (tdesc_get_features_xml): New function.
714 (tdesc_create_feature): Add an argument.
715 * tdesc.h (struct target_desc) <features>: New field.
716 <arch, osabi>: New field.
717 (~target_desc): xfree features, arch, and osabi.
718 (target_desc::oerator==): Don't compare .xmltarget.
719 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
720 (set_tdesc_osabi): Likewise.
721 (tdesc_get_features_xml): Likewise.
722
0a188386
YQ
7232017-09-05 Yao Qi <yao.qi@linaro.org>
724
725 * linux-x86-tdesc.c: Include selftest.h.
726 (i386_tdesc_test): New function.
727 (initialize_low_tdesc): Call selftests::register_test.
728 * tdesc.h: Include regdef.h.
729 (target_desc): Override operator == and !=.
730
f49ff000
YQ
7312017-09-05 Yao Qi <yao.qi@linaro.org>
732
733 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
734 (ipa_obj): Likewise.
735 * linux-i386-ipa.c: Include common/x86-xstate.h
736 (get_ipa_tdesc): Call i386_linux_read_description.
737 (initialize_low_tracepoint): Don't call init_registers_XXX
738 functions, call initialize_low_tdesc instead.
739 * linux-x86-low.c (x86_linux_read_description): Call
740 i386_linux_read_description.
741 (initialize_low_arch): Don't call init_registers_i386_XXX
742 functions, call initialize_low_tdesc.
743 * linux-x86-tdesc.c: New file.
744 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
745 (i386_get_ipa_tdesc_idx): Declare.
746 (i386_get_ipa_tdesc): Declare.
747 (initialize_low_tdesc): Declare.
748
2b68ef2f
YQ
7492017-09-05 Yao Qi <yao.qi@linaro.org>
750
751 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
752 instead of 0.
753
f7000548
YQ
7542017-09-05 Yao Qi <yao.qi@linaro.org>
755
756 * Makefile.in (IPA_OBJS): Add vec-ipa.o
757 * regcache.c (get_thread_regcache): Use VEC_length.
758 (init_register_cache): Likewise.
759 (regcache_cpy): Likewise.
760 (registers_to_string): Iterate reg_defs via VEC_iterate.
761 (find_regno): Likewise.
762 (find_register_by_number): Use VEC_index.
763 (register_size): Call find_register_by_number.
764 (register_data): Call find_register_by_number.
765 (supply_regblock): Use VEC_length.
766 (regcache_raw_read_unsigned): Likewise.
767 * tdesc.c (init_target_desc): Iterate reg_defs via
768 VEC_iterate.
769 (default_description): Update initializer.
770 (copy_target_description): Don't update field num_registers.
771 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
772 <num_registers>: Remove.
773
50a421ac
SM
7742017-09-04 Simon Marchi <simon.marchi@ericsson.com>
775
776 * Makefile.in (.SECONDARY): Define target.
777
23fdd69e
SM
7782017-09-03 Simon Marchi <simon.marchi@ericsson.com>
779
780 * linux-low.c (linux_wait_1): Adjust.
781 * server.c (queue_stop_reply_callback): Adjust.
782
0a2dde4a
SDJ
7832017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
784
785 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
786 QEnvironmentUnset and QEnvironmentReset packets.
787 (handle_query): Inform remote that QEnvironmentHexEncoded,
788 QEnvironmentUnset and QEnvironmentReset are supported.
789
6afd337d
SM
7902017-08-25 Simon Marchi <simon.marchi@ericsson.com>
791
792 * inferiors.h (inferior_target_data): Rename to ...
793 (thread_target_data): ... this.
794 (inferior_regcache_data): Rename to ...
795 (thread_regcache_data): ... this.
796 (set_inferior_regcache_data): Rename to ...
797 (set_thread_regcache_data): ... this.
798 * inferiors.c (inferior_target_data): Rename to ...
799 (thread_target_data): ... this.
800 (inferior_regcache_data): Rename to ...
801 (thread_regcache_data): ... this.
802 (set_inferior_regcache_data): Rename to ...
803 (set_thread_regcache_data): ... this.
804 (free_one_thread): Update.
805 * linux-low.h (get_thread_lwp): Update.
806 * regcache.c (get_thread_regcache): Update.
807 (regcache_invalidate_thread): Update.
808 (free_register_cache_thread): Update.
809 * win32-i386-low.c (update_debug_registers_callback): Update.
810 (win32_get_current_dr): Update.
811 * win32-low.c (thread_rec): Update.
812 (delete_thread_info): Update.
813 (continue_one_thread): Update.
814 (suspend_one_thread): Update.
815
a160cc46
SM
8162017-08-24 Simon Marchi <simon.marchi@ericsson.com>
817
818 * inferiors.c (set_inferior_target_data): Remove.
819 * inferiors.h (set_inferior_target_data): Remove.
820
6d580b63
YQ
8212017-08-18 Yao Qi <yao.qi@linaro.org>
822
823 * Makefile.in (OBS): Add selftest.o.
824 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
825 * configure, config.in: Re-generated.
826 * server.c: Include common/sefltest.h.
827 (captured_main): Handle option --selftest.
828
f5a29eb0
YQ
8292017-08-09 Yao Qi <yao.qi@linaro.org>
830
831 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
832 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
833 i386-avx-mpx.o and i386-mmx.o.
834 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
835 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
836 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
837 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
838 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
839 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
840 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
841 i386/amd64-avx-mpx.xml.
842
57757c2f
YQ
8432017-08-09 Yao Qi <yao.qi@linaro.org>
844
845 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
846 and x32-avx-avx512.o.
847 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
848 i386/x32-avx-avx512.xml.
849
229d26fc
SM
8502017-07-26 Simon Marchi <simon.marchi@ericsson.com>
851
852 * tracepoint.h (enum class fast_tpoint_collect_result): New
853 enumeration.
854 (fast_tracepoint_collecting): Change return type to
855 fast_tpoint_collect_result.
856 * tracepoint.c (fast_tracepoint_collecting): Likewise.
857 * linux-low.h: Include tracepoint.h.
858 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
859 fast_tpoint_collect_result.
860 * linux-low.c (handle_tracepoints): Adjust.
861 (linux_fast_tracepoint_collecting): Change return type to
862 fast_tpoint_collect_result.
863 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
864 linux_wait_1, stuck_in_jump_pad_callback,
865 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
866 proceed_one_lwp): Adjust to type change.
867
2e1e43e1
YQ
8682017-07-10 Yao Qi <yao.qi@linaro.org>
869
870 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
871
adc764e7
YQ
8722017-06-29 Yao Qi <yao.qi@linaro.org>
873
874 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
875 Remove.
876 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
877
a206891a
SM
8782017-06-20 Simon Marchi <simon.marchi@ericsson.com>
879
880 * Makefile.in (IPA_OBJS): Sort and format one item per line.
881
9a6c7d9c
SDJ
8822017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
883
884 * linux-low.c (linux_create_inferior): Adjust code to access the
885 environment information via 'gdb_environ' class.
886 * lynx-low.c (lynx_create_inferior): Likewise.
887 * server.c (our_environ): Make it an instance of 'gdb_environ'.
888 (get_environ): Return a pointer to 'our_environ'.
889 (captured_main): Initialize 'our_environ'.
890 * server.h (get_environ): Adjust prototype.
891 * spu-low.c (spu_create_inferior): Adjust code to access the
892 environment information via 'gdb_environ' class.
893
ae3e2ccf
SM
8942017-06-17 Simon Marchi <simon.marchi@ericsson.com>
895
896 * linux-low.c (linux_read_memory, linux_write_memory): Remove
897 usage of "register" keyword.
898
3e019bdc
SM
8992017-06-17 Simon Marchi <simon.marchi@ericsson.com>
900
901 * configure: Re-generate.
902
8465943a
SM
9032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
904
905 * configure: Re-generate.
906
cf0dd6f0
SM
9072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
908
909 * Makefile.in (COMPILE.pre): Add "-x c++".
910
9845682b
SDJ
9112017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
912
913 * fork-child.c: Conditionally include <signal.h>.
914
aefd8b33
SDJ
9152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
916
917 * server.c (handle_general_set): Handle new packet
918 "QStartupWithShell".
919 (handle_query): Add "QStartupWithShell" to the list of supported
920 packets.
921 (gdbserver_usage): Add help text explaining the
922 new "--startup-with-shell" and "--no-startup-with-shell" CLI
923 options.
924 (captured_main): Recognize and act upon the presence of the new
925 CLI options.
926
2090129c
SDJ
9272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
928 Pedro Alves <palves@redhat.com>
929
930 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
931 * configure: Regenerate.
932 * configure.srv (srv_linux_obj): Add "fork-child.o" and
933 "fork-inferior.o".
934 (i[34567]86-*-lynxos*): Likewise.
935 (spu*-*-*): Likewise.
936 * fork-child.c: New file.
937 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
938 and "environ.h".
939 (linux_ptrace_fun): New function.
940 (linux_create_inferior): Adjust function prototype to reflect
941 change on "target.h". Adjust function code to use
942 "fork_inferior".
943 (linux_request_interrupt): Delete "signal_pid".
944 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
945 (lynx_ptrace_fun): New function.
946 (lynx_create_inferior): Adjust function prototype to reflect
947 change on "target.h". Adjust function code to use
948 "fork_inferior".
949 * nto-low.c (nto_create_inferior): Adjust function prototype and
950 code to reflect change on "target.h". Update comments.
951 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
952 "common-terminal.h" and "environ.h".
953 (terminal_fd): Moved to fork-child.c.
954 (old_foreground_pgrp): Likewise.
955 (restore_old_foreground_pgrp): Likewise.
956 (last_status): Make it global.
957 (last_ptid): Likewise.
958 (our_environ): New variable.
959 (startup_with_shell): Likewise.
960 (program_name): Likewise.
961 (program_argv): Rename to...
962 (program_args): ...this.
963 (wrapper_argv): New variable.
964 (start_inferior): Delete function.
965 (get_exec_wrapper): New function.
966 (get_exec_file): Likewise.
967 (get_environ): Likewise.
968 (prefork_hook): Likewise.
969 (post_fork_inferior): Likewise.
970 (postfork_hook): Likewise.
971 (postfork_child_hook): Likewise.
972 (handle_v_run): Update code to deal with arguments coming from the
973 remote host. Update calls from "start_inferior" to
974 "create_inferior".
975 (captured_main): Likewise. Initialize environment variable. Call
976 "have_job_control".
977 * server.h (post_fork_inferior): New prototype.
978 (get_environ): Likewise.
979 (last_status): Declare.
980 (last_ptid): Likewise.
981 (signal_pid): Likewise.
982 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
983 (spu_ptrace_fun): New function.
984 (spu_create_inferior): Adjust function prototype to reflect change
985 on "target.h". Adjust function code to use "fork_inferior".
986 * target.c (target_terminal_init): New function.
987 (target_terminal_inferior): Likewise.
988 (target_terminal_ours): Likewise.
989 * target.h: Include <vector>.
990 (struct target_ops) <create_inferior>: Update prototype.
991 (create_inferior): Update macro.
992 * utils.c (gdb_flush_out_err): New function.
993 * win32-low.c (win32_create_inferior): Adjust function prototype
994 and code to reflect change on "target.h".
995
043a4934
SDJ
9962017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
997
998 * inferiors.c (switch_to_thread): New function.
999
15652511
SDJ
10002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1001
1002 * Makefile.in (SFILE): Add "common/job-control.c".
1003 (OBS): Add "job-control.o".
1004
21ea5acd
SDJ
10052017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1006
1007 * Makefile: Remove "@host_makefile_frag@".
1008
e13cb306
PA
10092017-05-05 Pedro Alves <palves@redhat.com>
1010
1011 * configure: Regenerate.
1012
c94fee56
SDJ
10132017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1014
1015 * configure: Regenerate.
1016
a0ff9e1a
SM
10172017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1018
1019 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1020 software_single_step change of return type to
1021 std::vector<CORE_ADDR>.
1022 * linux-low.c (install_software_single_step_breakpoints):
1023 Likewise.
1024 * linux-low.h (install_software_single_step_breakpoints):
1025 Likewise.
1026
be628ab8
SDJ
10272017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1028
1029 * remote-utils.c: Include "gdb_termios.h" instead of
1030 "terminal.h".
1031 * terminal.h: Delete file.
1032
7c5ded6a
SDJ
10332017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1034
1035 * server.c: Include <vector>.
1036 <program_argv, wrapper_argv>: Convert to std::vector.
1037 (start_inferior): Rewrite function to use C++.
1038 (handle_v_run): Likewise. Update code that calculates the argv
1039 based on the vRun packet; use C++.
1040 (captured_main): Likewise.
1041
436252de
SM
10422017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1043
1044 * server.c (handle_v_cont): Initialize thread_resume::thread
1045 with null_ptid.
1046
9bf2a700
PA
10472017-04-05 Pedro Alves <palves@redhat.com>
1048
1049 * configure: Regenerate.
1050
a121b7c1
PA
10512017-04-05 Pedro Alves <palves@redhat.com>
1052
1053 * gdbreplay.c (sync_error): Constify.
1054 * linux-x86-low.c (push_opcode): Constify.
1055
21c8a587
PA
10562017-04-05 Pedro Alves <palves@redhat.com>
1057
1058 * win32-low.c (get_child_debug_event)
1059 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1060 Report TARGET_WAITKIND_SPURIOUS instead.
1061
fb32b4f7
PA
10622017-04-05 Pedro Alves <palves@redhat.com>
1063
1064 * remote-utils.c (remote_prepare, remote_open): Constify.
1065 * remote-utils.h (remote_prepare, remote_open): Constify.
1066 * server.c (captured_main): Constify 'port' handling.
1067
65dd1e59
SM
10682017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1069
1070 * Makefile.in (clean): Clear .deps.
1071
8fa5b777
SM
10722017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1073
1074 * .gitignore: Remove generated files, replace with wildcard.
1075 * (clean): Replace removal of generated files with wildcard.
1076 (version.c): Replace with...
1077 (version-generated.c): ...this.
1078 (xml-builtin.c): Replace with...
1079 (xml-builtin-generated.c): ...this.
1080 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1081 (%.c: *regformats*): Replace with...
1082 (%-generated.c: *regformats*): ...this.
1083
a12e714b
MF
10842017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1085
1086 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1087 (xtensa_fill_gregset): Call collect_register_by_name for
1088 threadptr register.
1089 (xtensa_store_gregset): Call supply_register_by_name for
1090 threadptr register.
1091
1a09b50a
MF
10922017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1093
1094 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1095 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1096 (xtensa_store_gregset): Call supply_register for all registers in
1097 a0_regnum..a0_regnum + C0_NREGS range.
1098
1a01e7c6
SM
10992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1100
1101 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1102 (ax-ipa.o: ax.c): Remove.
1103 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1104 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1105 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1106 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1107 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1108
36bc18a8
SM
11092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1110
1111 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1112 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1113 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1114 (errors-ipa.o: ../common/errors.c): Remove.
1115 (format-ipa.o: ../common/format.c): Remove.
1116 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1117
a8ebe3d5
SM
11182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1119
1120 * Makefile.in (%-ipa.o: %.c): New rule.
1121 (tracepoint-ipa.o: tracepoint.c): Remove.
1122 (utils-ipa.o: utils.c): Remove.
1123 (remote-utils-ipa.o: remote-utils.c): Remove.
1124 (regcache-ipa.o: regcache.c): Remove.
1125 (i386-linux-ipa.o: i386-linux.c): Remove.
1126 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1127 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1128 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1129 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1130 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1131 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1132 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1133 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1134 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1135 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1136 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1137 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1138 (aarch64-ipa.o: aarch64.c): Remove.
1139 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1140 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1141 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1142 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1143 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1144 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1145 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1146 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1147 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1148 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1149 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1150 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1151 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1152 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1153 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1154 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1155 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1156 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1157 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1158 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1159 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1160 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1161 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1162 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1163 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1164 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1165 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1166 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1167 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1168 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1169 (tdesc-ipa.o: tdesc.c): Remove.
1170 (x32-linux-ipa.o: x32-linux.c): Remove.
1171 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1172 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1173
50cfacb7
SM
11742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1175
1176 * Makefile.in (%.o: ../arch/%.c): New rule.
1177 (arm.o: ../arch/arm.c): Remove.
1178 (arm-linux.o: ../arch/arm-linux.c): Remove.
1179 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1180 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1181
c5a22423
SM
11822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1183
1184 * Makefile.in (%.o: ../nat/%.c): New rule.
1185 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1186 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1187 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1188 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1189 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1190 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1191 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1192 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1193 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1194 (linux-personality.o: ../nat/linux-personality.c): Remove.
1195 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1196 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1197 (x86-linux.o: ../nat/x86-linux.c): Remove.
1198 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1199 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1200
6bda016b
SM
12012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1202
1203 * Makefile.in (%.o: ../common/%.c): New rule.
1204 (signals.o: ../common/signals.c): Remove.
1205 (print-utils.o: ../common/print-utils.c): Remove.
1206 (rsp-low.o: ../common/rsp-low.c): Remove.
1207 (common-utils.o: ../common/common-utils.c): Remove.
1208 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1209 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1210 (vec.o: ../common/vec.c): Remove.
1211 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1212 (xml-utils.o: ../common/xml-utils.c): Remove.
1213 (ptid.o: ../common/ptid.c): Remove.
1214 (buffer.o: ../common/buffer.c): Remove.
1215 (format.o: ../common/format.c): Remove.
1216 (filestuff.o: ../common/filestuff.c): Remove.
1217 (agent.o: ../common/agent.c): Remove.
1218 (errors.o: ../common/errors.c): Remove.
1219 (environ.o: ../common/environ.c): Remove.
1220 (common-debug.o: ../common/common-debug.c): Remove.
1221 (cleanups.o: ../common/cleanups.c): Remove.
1222 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1223 (fileio.o: ../common/fileio.c): Remove.
1224 (common-regcache.o: ../common/common-regcache.c): Remove.
1225 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1226 (new-op.o: ../common/new-op.c): Remove.
1227 (btrace-common.o: ../common/btrace-common.c): Remove.
1228
21122961
SM
12292017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1230
1231 * Makefile.in (%.o: ../target/%.c): New rule.
1232 (waitstatus.o: ../target/waitstatus.c): Remove.
1233
c362e621
SM
12342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1235
1236 * Makefile.in
1237 (%.c: ../regformats/%.dat,
1238 (%.c: ../regformats/arm/%.dat,
1239 (%.c: ../regformats/i386/%.dat,
1240 (%.c: ../regformats/rs6000/%.dat): New rules.
1241 (aarch64.c): Remove.
1242 (reg-arm.c): Remove.
1243 (arm-with-iwmmxt.c): Remove.
1244 (arm-with-vfpv2.c): Remove.
1245 (arm-with-vfpv3.c): Remove.
1246 (arm-with-neon.c): Remove.
1247 (reg-bfin.c): Remove.
1248 (reg-cris.c): Remove.
1249 (reg-crisv32.c): Remove.
1250 (i386.c): Remove.
1251 (i386-linux.c): Remove.
1252 (i386-avx.c): Remove.
1253 (i386-avx-linux.c): Remove.
1254 (i386-avx-avx512.c): Remove.
1255 (i386-avx-avx512-linux.c): Remove.
1256 (i386-mpx.c): Remove.
1257 (i386-mpx-linux.c): Remove.
1258 (i386-avx-mpx-avx512-pku.c): Remove.
1259 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1260 (i386-avx-mpx.c): Remove.
1261 (i386-avx-mpx-linux.c): Remove.
1262 (i386-mmx.c): Remove.
1263 (i386-mmx-linux.c): Remove.
1264 (reg-ia64.c): Remove.
1265 (reg-m32r.c): Remove.
1266 (reg-m68k.c): Remove.
1267 (reg-cf.c): Remove.
1268 (mips-linux.c): Remove.
1269 (mips-dsp-linux.c): Remove.
1270 (mips64-linux.c): Remove.
1271 (mips64-dsp-linux.c): Remove.
1272 (nios2-linux.c): Remove.
1273 (powerpc-32.c): Remove.
1274 (powerpc-32l.c): Remove.
1275 (powerpc-altivec32l.c): Remove.
1276 (powerpc-cell32l.c): Remove.
1277 (powerpc-vsx32l.c): Remove.
1278 (powerpc-isa205-32l.c): Remove.
1279 (powerpc-isa205-altivec32l.c): Remove.
1280 (powerpc-isa205-vsx32l.c): Remove.
1281 (powerpc-e500l.c): Remove.
1282 (powerpc-64l.c): Remove.
1283 (powerpc-altivec64l.c): Remove.
1284 (powerpc-cell64l.c): Remove.
1285 (powerpc-vsx64l.c): Remove.
1286 (powerpc-isa205-64l.c): Remove.
1287 (powerpc-isa205-altivec64l.c): Remove.
1288 (powerpc-isa205-vsx64l.c): Remove.
1289 (s390-linux32.c): Remove.
1290 (s390-linux32v1.c): Remove.
1291 (s390-linux32v2.c): Remove.
1292 (s390-linux64.c): Remove.
1293 (s390-linux64v1.c): Remove.
1294 (s390-linux64v2.c): Remove.
1295 (s390-te-linux64.c): Remove.
1296 (s390-vx-linux64.c): Remove.
1297 (s390-tevx-linux64.c): Remove.
1298 (s390x-linux64.c): Remove.
1299 (s390x-linux64v1.c): Remove.
1300 (s390x-linux64v2.c): Remove.
1301 (s390x-te-linux64.c): Remove.
1302 (s390x-vx-linux64.c): Remove.
1303 (s390x-tevx-linux64.c): Remove.
1304 (tic6x-c64xp-linux.c): Remove.
1305 (tic6x-c64x-linux.c): Remove.
1306 (tic6x-c62x-linux.c): Remove.
1307 (reg-sh.c): Remove.
1308 (reg-sparc64.c): Remove.
1309 (reg-spu.c): Remove.
1310 (amd64.c): Remove.
1311 (amd64-linux.c): Remove.
1312 (amd64-avx.c): Remove.
1313 (amd64-avx-linux.c): Remove.
1314 (amd64-avx-avx512.c): Remove.
1315 (amd64-avx-avx512-linux.c): Remove.
1316 (amd64-mpx.c): Remove.
1317 (amd64-mpx-linux.c): Remove.
1318 (amd64-avx-mpx-avx512-pku.c): Remove.
1319 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1320 (amd64-avx-mpx.c): Remove.
1321 (amd64-avx-mpx-linux.c): Remove.
1322 (x32.c): Remove.
1323 (x32-linux.c): Remove.
1324 (x32-avx.c): Remove.
1325 (x32-avx-linux.c): Remove.
1326 (x32-avx-avx512.c): Remove.
1327 (x32-avx-avx512-linux.c): Remove.
1328 (reg-xtensa.c): Remove.
1329 (reg-tilegx.c): Remove.
1330 (reg-tilegx32.c): Remove.
1331
1672e0d9
SDJ
13322017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1333
1334 * Makefile.in (SFILES): Add "common/environ.c".
1335 (OBJS): Add "common/environ.h".
1336
239b6d10
WT
13372017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1338
1339 * configure.ac: Check if the fs_base and gs_base members of
1340 `struct user_regs_struct' exist.
1341 * config.in: Regenerated.
1342 * configure: Likewise.
1343
694b382c
AT
13442017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1345
1346 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1347 target_read_memory.
1348 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1349 (get_next_pcs_syscall_next_pc): Likewise.
1350
7dc53023
LM
13512016-12-23 Luis Machado <lgustavo@codesourcery.com>
1352
1353 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1354 * nto-x86-low.c: Likewise.
1355
ad02e4fe
SM
13562016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1357
1358 * Makefile.in: Include disable-implicit-rules.mk.
1359
dcb07cfa
PA
13602016-11-23 Pedro Alves <palves@redhat.com>
1361
1362 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1363 (debug_vprintf): Use std::chrono::steady_clock instead of
1364 gettimeofday. Use '.' instead of ':'.
1365 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1366 (get_timestamp): Use std::chrono::steady_clock instead of
1367 gettimeofday.
1368
8629c02c
SM
13692016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1370
1371 * Makefile.in: Fix whitespace formatting.
1372
b593ecca
SM
13732016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1374
1375 * Makefile.in (SFILES, OBS): Flatten list and order
1376 alphabetically.
1377
9986ba08
PA
13782016-11-23 Pedro Alves <palves@redhat.com>
1379
1380 * event-loop.c (handle_file_event): Use warning.
1381 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1382 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1383 Use warning.
1384
4eefa7bc
PA
13852016-11-23 Pedro Alves <palves@redhat.com>
1386
1387 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1388 output.
1389 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1390 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1391 debug_printf and debug_flush for debug output.
1392 * server.c (handle_general_set): Likewise.
1393 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1394 output.
1395
5443506e
SM
13962016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1397
1398 * Makefile.in (.c.o): Replace rule with ...
1399 (%.o: %.c): ... this one.
1400
3b165252
SM
14012016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1402
1403 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1404 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1405 make.
1406 * configure.ac: Remove checks for the make program.
1407 * configure: Re-generate.
1408
0bcda685
PA
14092016-10-28 Pedro Alves <palves@redhat.com>
1410
1411 * Makefile.in (CXX_DIALECT): Get from configure.
1412 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1413 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1414 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1415 * config.in: Regenerate.
1416 * configure: Regenerate.
1417
c3805894
YQ
14182016-10-27 Yao Qi <yao.qi@linaro.org>
1419
1420 * linux-low.c (linux_supports_range_stepping): Return true if
1421 can_software_single_step return true.
1422
89342618
YQ
14232016-10-27 Yao Qi <yao.qi@linaro.org>
1424
1425 * inferiors.c (find_inferior_in_random): New function.
1426 * inferiors.h (find_inferior_in_random): Declare.
1427 * linux-low.c (linux_wait_for_event_filtered): Call
1428 find_inferior_in_random instead of find_inferior.
1429
e3652c84
YQ
14302016-10-27 Yao Qi <yao.qi@linaro.org>
1431
1432 * linux-low.c (linux_wait_1): If single-step breakpoints are
1433 inserted, remove them.
1434
5a04c4cf
PA
14352016-10-26 Pedro Alves <palves@redhat.com>
1436
1437 * linux-low.c (handle_extended_wait): Link parent/child fork
1438 threads.
1439 (linux_wait_1): Unlink them.
1440 (linux_set_resume_request): Ignore resume requests for
1441 already-resumed and unhandled fork child threads.
1442 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1443 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1444 New functions.
1445 (handle_v_requests) <vCont>: Don't call require_running.
1446 * server.h (in_queued_stop_replies): New declaration.
1447
cb93dc7f
YQ
14482016-10-24 Yao Qi <yao.qi@linaro.org>
1449
1450 PR server/20733
1451 * linux-aarch64-low.c (append_insns): Cast the return value to
1452 'uint32_t *'.
1453
a1078bea
YQ
14542016-10-10 Yao Qi <yao.qi@linaro.org>
1455
1456 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1457
1fb77080
SDJ
14582016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1459
1460 * target.c (target_supports_multi_process): New function, moved
1461 from...
1462 * target.h (target_supports_multi_process): ... here. Remove
1463 macro.
1464
39b5a3b9
TT
14652016-10-05 Tom Tromey <tom@tromey.com>
1466
1467 PR remote/20655:
1468 * tracepoint.c (handle_tracepoint_bkpts): Check
1469 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1470
c1d0b70a
YQ
14712016-10-05 Yao Qi <yao.qi@linaro.org>
1472
1473 * configure.srv: Update the path of arm-*.xml files.
1474
0a69eedb
YQ
14752016-10-05 Terry Guo <terry.guo@arm.com>
1476 Yao Qi <yao.qi@linaro.org>
1477
1478 * Makefile.in: Adjust the path of rules.
1479 * configure.srv: Update the path of xml files.
1480 * regformats/arm-with-iwmmxt.dat: Regenerated.
1481 * regformats/arm-with-neon.dat: Likewise.
1482 * regformats/arm-with-vfpv2.dat: Likewise.
1483 * regformats/arm-with-vfpv3.dat Likewise.
1484
17e16485
YQ
14852016-09-30 Yao Qi <yao.qi@linaro.org>
1486
1487 PR gdbserver/20627
1488 * target.c (target_stop_and_wait): Don't call
1489 target_continue_no_signal, use resume_stop instead.
1490
edeeb602
YQ
14912016-09-26 Yao Qi <yao.qi@linaro.org>
1492
1493 * linux-low.c (linux_wait_1): Call debug_exit.
1494
503b1c39
PA
14952016-09-23 Pedro Alves <palves@redhat.com>
1496
1497 * Makefile.in (SFILES): Add common/new-op.c.
1498 (OBS): Add common/new-op.o.
1499 (new-op.o): New rule.
1500
74172ecf
SM
15012016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1502
1503 * .gitinore: Ignore more files.
1504
fc6cda2e
YQ
15052016-09-21 Yao Qi <yao.qi@linaro.org>
1506
1507 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1508 23.
1509
bc1e6c81
SDJ
15102016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1511
1512 * server.c (start_inferior): Call target_mourn_inferior instead of
1513 mourn_inferior; pass ptid_t argument to it.
1514 (resume): Likewise.
1515 (handle_target_event): Likewise.
1516 * target.c (target_mourn_inferior): New function.
1517 * target.h (mourn_inferior): Delete macro.
1518
0e00e962
AA
15192016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1520
1521 * linux-low.c (lwp_is_stepping): New function.
1522
1d8cb77d
CL
15232016-09-06 Carl Love <cel@us.ibm.com>
1524
1525 * server.c (start_inferior): Fixed comment, requested comment change
1526 didn't get updated correctly. Removed reference to ptrace () call as
1527 it is only true on Linux systems.
1528
7313bced
CL
15292016-09-06 Carl Love <cel@us.ibm.com>
1530
1531 * server.c (start_inferior): Do not call
1532 function target_post_create_inferior () if the
1533 inferior process has already exited.
1534
cf6de44d
PA
15352016-09-05 Pedro Alves <palves@redhat.com>
1536
1537 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1538 (COMPILE.pre, CC_LD): Use CXX directly.
1539 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1540 * acinclude.m4: Don't include build-with-cxx.m4.
1541 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1542 * configure: Regenerate.
1543
c1da6748
AT
15442016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1545
1546 PR gdb/19495
1547 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1548 call writing data to own_buf.
1549
f2b9e3df
SDJ
15502016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1551
1552 * target.c (mywait): Call target_wait instead of
1553 the_target->wait.
1554 (target_wait): New function.
1555
049a8570
SDJ
15562016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1557
1558 * server.c (start_inferior): New variable 'ptid'. Replace calls
1559 to the_target->resume by target_continue{,_no_signal}, depending
1560 on the case.
1561 * target.c (target_stop_and_wait): Call target_continue_no_signal
1562 instead of the_target->resume.
1563 (target_continue): New function.
1564
3aa5cfa0
AT
15652016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1566
1567 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1568
754653a7
AZ
15692016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1570
1571 PR server/20491
1572 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1573 ps_prochandle.
1574 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1575 * linux-arm-low.c (ps_get_thread_area): Likewise.
1576 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1577 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1578 * linux-mips-low.c (ps_get_thread_area): Likewise.
1579 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1580 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1581 * linux-x86-low.c (ps_get_thread_area): Likewise.
1582 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1583
ed036b40
PA
15842016-08-19 Pedro Alves <palves@redhat.com>
1585
1586 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1587
c8ef42ee
PA
15882016-08-19 Pedro Alves <palves@redhat.com>
1589
1590 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1591 comment. Use memcpy instead of casting through unsigned long.
1592
9c235a72
PA
15932016-08-19 Pedro Alves <palves@redhat.com>
1594
1595 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1596 allocating around 0x80000000.
1597
201506da
PA
15982016-08-19 Pedro Alves <palves@redhat.com>
1599
1600 PR gdb/20415
1601 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1602 (x32-avx512-linux-ipa.o): New rules.
1603 * configure.ac (x86_64-*-linux*): New x32 check.
1604 * configure.srv (ipa_x32_linux_regobj): New.
1605 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1606 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1607 descriptions.
1608 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1609 descriptions.
1610 * configure: Regenerate.
1611
f348d89a
PA
16122016-08-09 Pedro Alves <palves@redhat.com>
1613
1614 PR gdb/18653
1615 * Makefile.in (OBS): Add signals-state-save-restore.o.
1616 (signals-state-save-restore.o): New rule.
1617 * config.in: Regenerate.
1618 * configure: Regenerate.
1619 * linux-low.c: Include "signals-state-save-restore.h".
1620 (linux_create_inferior): Call
1621 restore_original_signals_state.
1622 * server.c: Include "dispositions-save-restore.h".
1623 (captured_main): Call save_original_signals_state.
1624
1baf5149
PA
16252016-08-05 Pedro Alves <palves@redhat.com>
1626
1627 * configure: Regenerate.
1628
fcd4a73d
YQ
16292016-08-04 Yao Qi <yao.qi@linaro.org>
1630
1631 * linux-low.c (regsets_fetch_inferior_registers): Check
1632 errno is ESRCH or not.
1633
979659d0
YQ
16342016-08-02 Yao Qi <yao.qi@linaro.org>
1635
1636 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1637 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1638 (thread_db_load_search): Update.
1639 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1640 td_ta_set_event and td_ta_event_getmsg.
1641
6598661d
PA
16422016-07-26 Pedro Alves <palves@redhat.com>
1643
1644 PR server/20414
1645 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1646 of unsigned long for 64-bit registers and use uint32_t instead of
1647 unsigned int for 32-bit registers.
1648
9cf12d57
PA
16492016-07-26 Pedro Alves <palves@redhat.com>
1650
1651 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1652 to 'ptrace'.
1653
305450ed
TT
16542016-07-21 Tom Tromey <tom@tromey.com>
1655
1656 * configure: Rebuild.
1657
2583da7c
YQ
16582016-07-21 Yao Qi <yao.qi@linaro.org>
1659
1660 * mem-break.c (find_gdb_breakpoint): Cast bp to
1661 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1662
21536b36
YQ
16632016-07-21 Yao Qi <yao.qi@linaro.org>
1664
1665 * server.c (handle_v_requests): Support s and S actions
1666 if target_supports_software_single_step return true.
1667
8901d193
YQ
16682016-07-21 Yao Qi <yao.qi@linaro.org>
1669
1670 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1671 is resume_step, call maybe_hw_step.
1672 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1673 and unstop them.
1674 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1675 breakpoints or not.
1676 (proceed_one_lwp): If resume request is resume_step, install
1677 reinsert breakpoints and call maybe_hw_step.
1678
0e9a339e
YQ
16792016-07-21 Yao Qi <yao.qi@linaro.org>
1680
1681 * linux-low.c (proceed_one_lwp): Declare.
1682 (linux_resume_one_thread): Remove local variable 'step'.
1683 Lift code enqueue signal. Call proceed_one_lwp instead of
1684 linux_resume_one_lwp.
1685
4281b351
YQ
16862016-07-21 Yao Qi <yao.qi@linaro.org>
1687
1688 * linux-low.c (linux_resume_one_thread): Call
1689 enqueue_pending_signal.
1690
984a2c04
YQ
16912016-07-21 Yao Qi <yao.qi@linaro.org>
1692
1693 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1694 * inferiors.c (do_restore_current_thread_cleanup): New function.
1695 (make_cleanup_restore_current_thread): Likewise.
1696 * linux-low.c (install_software_single_step_breakpoints): Call
1697 make_cleanup_restore_current_thread. Switch current_thread to
1698 thread.
1699
bec903c9
YQ
17002016-07-21 Yao Qi <yao.qi@linaro.org>
1701
1702 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1703 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1704 (clone_one_breakpoint): Likewise.
1705 (delete_reinsert_breakpoints): Change parameter to thread.
1706 Callers updated.
1707 (has_reinsert_breakpoints): Likewise.
1708 (uninsert_reinsert_breakpoints): Likewise.
1709 (reinsert_reinsert_breakpoints): Likewise.
1710 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1711 (delete_reinsert_breakpoints): Likewise.
1712 (reinsert_reinsert_breakpoints): Likewise.
1713 (uninsert_reinsert_breakpoints): Likewise.
1714 (has_reinsert_breakpoints): Likewise.
1715
63c40ec7
YQ
17162016-07-21 Yao Qi <yao.qi@linaro.org>
1717
1718 * inferiors.c (get_thread_process): Make parameter const.
1719 * inferiors.h (get_thread_process): Update declaration.
1720 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1721 Add new parameters child_thread and parent_thread. Callers
1722 updated.
1723 * mem-break.h (clone_all_breakpoints): Update declaration.
1724
9aa76cd0
YQ
17252016-07-21 Yao Qi <yao.qi@linaro.org>
1726
1727 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1728 <command_list, handler>: Remove.
1729 (struct gdb_breakpoint): New.
1730 (struct other_breakpoint): New.
1731 (struct reinsert_breakpoint): New.
1732 (is_gdb_breakpoint): New function.
1733 (any_persistent_commands): Update command_list if
1734 is_gdb_breakpoint returns true.
1735 (set_breakpoint): Create breakpoints according to their types.
1736 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1737 (set_gdb_breakpoint_1): Likewise.
1738 (set_gdb_breakpoint): Likewise.
1739 (clear_breakpoint_conditions): Change parameter type to
1740 'struct gdb_breakpoint *'.
1741 (clear_breakpoint_commands): Likewise.
1742 (clear_breakpoint_conditions_and_commands): Likewise.
1743 (add_condition_to_breakpoint): Likewise.
1744 (add_breakpoint_condition): Likewise.
1745 (add_commands_to_breakpoint): Likewise.
1746 (check_breakpoints): Check other_breakpoint.
1747 (clone_one_breakpoint): Clone breakpopint according to its type.
1748 * mem-break.h (struct gdb_breakpoint): Declare.
1749 (set_gdb_breakpoint): Update declaration.
1750 (clear_breakpoint_conditions_and_commands): Likewise.
1751 (add_breakpoint_condition): Likewise.
1752 (add_breakpoint_commands): Likewise.
1753 * server.c (process_point_options): Change parameter type to
1754 'struct gdb_breakpoint *'.
1755
811f8301
YQ
17562016-07-21 Yao Qi <yao.qi@linaro.org>
1757
1758 * mem-break.c (set_breakpoint_at): Rename it to ...
1759 (set_breakpoint_type_at): ... it.
1760 (set_breakpoint_at): Call set_breakpoint_type_at.
1761 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1762 * mem-break.h (set_breakpoint_at): Update comments.
1763
b1c51e36
CLT
17642016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1765
1766 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1767 to buf parameter.
1768 (nios2_store_gregset): Likewise.
1769
ced2dffb
PA
17702016-07-01 Pedro Alves <palves@redhat.com>
1771 Antoine Tremblay <antoine.tremblay@ericsson.com>
1772
1773 * linux-low.c: Change interface to take the target lwp_info
1774 pointer directly and return void. Handle detaching from a zombie
1775 thread.
1776 (linux_detach_lwp_callback): New function.
1777 (linux_detach): Detach from the leader thread after detaching from
1778 the clone threads.
1779
2ac09a5b
YQ
17802016-06-28 Yao Qi <yao.qi@linaro.org>
1781
1782 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1783 for variable new_offset.
1784 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1785 (aarch64_ftrace_insn_reloc_cb): Likewise.
1786 (aarch64_ftrace_insn_reloc_tb): Likewise.
1787 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1788 PRIx64 instead of PRIx32.
1789
79e7fd4f
YQ
17902016-06-28 Yao Qi <yao.qi@linaro.org>
1791
1792 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1793 (the_low_target): Install arm_get_syscall_trapinfo.
1794
061fc021
YQ
17952016-06-28 Yao Qi <yao.qi@linaro.org>
1796
1797 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1798 function.
1799 (the_low_target): Install aarch64_get_syscall_trapinfo.
1800
4cc32bec
YQ
18012016-06-28 Yao Qi <yao.qi@linaro.org>
1802
1803 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1804 Callers updated.
1805 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1806 Remove parameter sysno.
1807 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1808 sysret.
1809
782c1122
AA
18102016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1811
1812 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1813 (s390_emit_ne_goto): Likewise.
1814 (s390_emit_lt_goto): Likewise.
1815 (s390_emit_le_goto): Likewise.
1816 (s390_emit_gt_goto): Likewise.
1817 (s390_emit_ge_goto): Likewise.
1818 (s390x_emit_eq_goto): Likewise.
1819 (s390x_emit_ne_goto): Likewise.
1820 (s390x_emit_lt_goto): Likewise.
1821 (s390x_emit_le_goto): Likewise.
1822 (s390x_emit_gt_goto): Likewise.
1823 (s390x_emit_ge_goto): Likewise.
1824 (s390_emit_ops_impl): Mark variable static.
1825 (s390x_emit_ops): Likewise.
1826
2e7b624b
YQ
18272016-06-17 Yao Qi <yao.qi@linaro.org>
1828
1829 * linux-low.c (handle_extended_wait): Call
1830 uninsert_reinsert_breakpoints for the parent process. Remove
1831 reinsert breakpoints from the child process. Reinsert them to
1832 the parent process when vfork is done.
1833 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1834 (reinsert_reinsert_breakpoints): New function.
1835 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1836 (reinsert_reinsert_breakpoints): Declare.
1837
8a81c5d7
YQ
18382016-06-17 Yao Qi <yao.qi@linaro.org>
1839
1840 * linux-low.c (handle_extended_wait): If the parent is doing
1841 step-over, remove the reinsert breakpoints from the forked child.
1842
f50bf8e5
YQ
18432016-06-17 Yao Qi <yao.qi@linaro.org>
1844
1845 * linux-low.c (unsuspend_all_lwps): Declare.
1846 (linux_low_filter_event): If thread exited, call finish_step_over.
1847 If step-over is finished, unsuspend other threads.
1848
8376a3cb
YQ
18492016-06-17 Yao Qi <yao.qi@linaro.org>
1850
1851 * linux-low.c (linux_resume_one_lwp_throw): Assert
1852 has_reinsert_breakpoints returns false.
1853 * mem-break.c (delete_disabled_breakpoints): Assert
1854 bp type isn't reinsert_breakpoint.
1855
f79b145d
YQ
18562016-06-17 Yao Qi <yao.qi@linaro.org>
1857
1858 * linux-low.c (maybe_hw_step): New function.
1859 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1860 (finish_step_over): Switch current_thread to lwp temporarily,
1861 and assert has_reinsert_breakpoints returns true.
1862 (proceed_one_lwp): Call maybe_hw_step.
1863 * mem-break.c (has_reinsert_breakpoints): New function.
1864 * mem-break.h (has_reinsert_breakpoints): Declare.
1865
0ae534d2
JT
18662016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1867
1868 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1869
fcdad592
YQ
18702016-05-17 Yao Qi <yao.qi@linaro.org>
1871
1872 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1873 instead of find_inferior.
1874
9e784964
YQ
18752016-05-05 Yao Qi <yao.qi@linaro.org>
1876
1877 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1878 Initialize res to zero.
1879
cf2ebb6e
YQ
18802016-05-05 Yao Qi <yao.qi@linaro.org>
1881
1882 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1883 to uint32_t.
1884
c1aebf87
UW
18852016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1886
1887 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1888 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1889 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1890
35fd2deb 18912016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1892 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1893
1894 * tracepoint.c (write_inferior_int8): New function.
1895 (cmd_qtenable_disable): Write enable flag using
1896 write_inferior_int8.
1897
484b3c32
YQ
18982016-04-25 Yao Qi <yao.qi@linaro.org>
1899
1900 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1901 (need_step_over_p): Return zero if the LWP has pending signals
1902 can be delivered on software single step target.
1903
85ba7d86
YQ
19042016-04-25 Yao Qi <yao.qi@linaro.org>
1905
1906 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1907 return instead of error.
1908
3539aa13
YQ
19092016-04-22 Yao Qi <yao.qi@linaro.org>
1910
1911 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1912 to 23.
1913
5b061e98
YQ
19142016-04-22 Yao Qi <yao.qi@linaro.org>
1915
1916 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1917 signal when stepping over breakpoint with software single
1918 step.
1919
3451269c
PA
19202016-04-21 Pedro Alves <palves@redhat.com>
1921
1922 * linux-s390-low.c (s390_collect_ptrace_register)
1923 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1924 add casts.
1925 (s390_check_regset): Use void * instead of gdb_byte *.
1926
a2358508
PA
19272016-04-20 Pedro Alves <palves@redhat.com>
1928
1929 * configure: Renegerate.
1930
6885166d
YQ
19312016-04-20 Yao Qi <yao.qi@linaro.org>
1932
1933 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1934 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1935 number 16.
1936 (arm_store_gregset): Likewise.
1937
2b863f51
WT
19382016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1939
1940 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1941 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1942 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1943 (amd64-avx-mpx-linux.c): New rules.
1944 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1945 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1946 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1947 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1948 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1949 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1950 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1951 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1952 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1953 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1954 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1955 * linux-x86-low.c (x86_linux_read_description): Add case for
1956 X86_XSTATE_AVX_MPX_MASK.
1957 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1958 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1959 init_registers_i386_avx_mpx_linux.
1960 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1961 (initialize_low_tracepoint): Call
1962 init_registers_i386_avx_mpx_linux.
1963 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1964 (initialize_low_tracepoint): Call
1965 init_registers_amd64_avx_mpx_linux.
1966 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1967 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1968 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1969 declarations.
1970
9b30624b
PA
19712016-04-18 Pedro Alves <palves@redhat.com>
1972
1973 * configure: Regenerate.
1974
45e3745e
AT
19752016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1976
1977 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1978 (aarch64_emit_sub): Likewise.
1979
2afc13ff
PA
19802016-04-12 Pedro Alves <palves@redhat.com>
1981
1982 * utils.c (prepare_to_throw_exception): Delete.
1983
6e774b13
SM
19842016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1985
1986 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1987
4dca19f8
MK
19882016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1989
1990 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1991
d0a9981f
MK
19922016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1993
1994 * linux-aarch64-ipa.c: Add <elf.h> include.
1995 * linux-ppc-ipa.c: Add <elf.h> include.
1996 * linux-s390-ipa.c: Add <elf.h> include.
1997
252db07e
MK
19982016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1999
2000 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2001 (get_raw_reg_ptr): Likewise.
2002 (get_trace_state_variable_value_ptr): Likewise.
2003 (set_trace_state_variable_value_ptr): Likewise.
2004 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2005 char *.
2006
14e2b6d9
MK
20072016-03-31 Wei-cheng Wang <cole945@gmail.com>
2008 Marcin Kościelnicki <koriakin@0x04.net>
2009
2010 PR/17221
2011 * linux-ppc-low.c (emit_insns): New function.
2012 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2013 (ppc_emit_prologue): New function.
2014 (ppc_emit_epilogue): New function.
2015 (ppc_emit_add): New function.
2016 (ppc_emit_sub): New function.
2017 (ppc_emit_mul): New function.
2018 (ppc_emit_lsh): New function.
2019 (ppc_emit_rsh_signed): New function.
2020 (ppc_emit_rsh_unsigned): New function.
2021 (ppc_emit_ext): New function.
2022 (ppc_emit_zero_ext): New function.
2023 (ppc_emit_log_not): New function.
2024 (ppc_emit_bit_and): New function.
2025 (ppc_emit_bit_or): New function.
2026 (ppc_emit_bit_xor): New function.
2027 (ppc_emit_bit_not): New function.
2028 (ppc_emit_equal): New function.
2029 (ppc_emit_less_signed): New function.
2030 (ppc_emit_less_unsigned): New function.
2031 (ppc_emit_ref): New function.
2032 (ppc_emit_const): New function.
2033 (ppc_emit_reg): New function.
2034 (ppc_emit_pop): New function.
2035 (ppc_emit_stack_flush): New function.
2036 (ppc_emit_swap): New function.
2037 (ppc_emit_stack_adjust): New function.
2038 (ppc_emit_call): New function.
2039 (ppc_emit_int_call_1): New function.
2040 (ppc_emit_void_call_2): New function.
2041 (ppc_emit_if_goto): New function.
2042 (ppc_emit_goto): New function.
2043 (ppc_emit_eq_goto): New function.
2044 (ppc_emit_ne_goto): New function.
2045 (ppc_emit_lt_goto): New function.
2046 (ppc_emit_le_goto): New function.
2047 (ppc_emit_gt_goto): New function.
2048 (ppc_emit_ge_goto): New function.
2049 (ppc_write_goto_address): New function.
2050 (ppc_emit_ops_impl): New static variable.
2051 (ppc64v1_emit_prologue): New function.
2052 (ppc64v2_emit_prologue): New function.
2053 (ppc64_emit_epilogue): New function.
2054 (ppc64_emit_add): New function.
2055 (ppc64_emit_sub): New function.
2056 (ppc64_emit_mul): New function.
2057 (ppc64_emit_lsh): New function.
2058 (ppc64_emit_rsh_signed): New function.
2059 (ppc64_emit_rsh_unsigned): New function.
2060 (ppc64_emit_ext): New function.
2061 (ppc64_emit_zero_ext): New function.
2062 (ppc64_emit_log_not): New function.
2063 (ppc64_emit_bit_and): New function.
2064 (ppc64_emit_bit_or): New function.
2065 (ppc64_emit_bit_xor): New function.
2066 (ppc64_emit_bit_not): New function.
2067 (ppc64_emit_equal): New function.
2068 (ppc64_emit_less_signed): New function.
2069 (ppc64_emit_less_unsigned): New function.
2070 (ppc64_emit_ref): New function.
2071 (ppc64_emit_const): New function.
2072 (ppc64v1_emit_reg): New function.
2073 (ppc64v2_emit_reg): New function.
2074 (ppc64_emit_pop): New function.
2075 (ppc64_emit_stack_flush): New function.
2076 (ppc64_emit_swap): New function.
2077 (ppc64v1_emit_call): New function.
2078 (ppc64v2_emit_call): New function.
2079 (ppc64v1_emit_int_call_1): New function.
2080 (ppc64v2_emit_int_call_1): New function.
2081 (ppc64v1_emit_void_call_2): New function.
2082 (ppc64v2_emit_void_call_2): New function.
2083 (ppc64_emit_if_goto): New function.
2084 (ppc64_emit_eq_goto): New function.
2085 (ppc64_emit_ne_goto): New function.
2086 (ppc64_emit_lt_goto): New function.
2087 (ppc64_emit_le_goto): New function.
2088 (ppc64_emit_gt_goto): New function.
2089 (ppc64_emit_ge_goto): New function.
2090 (ppc64v1_emit_ops_impl): New static variable.
2091 (ppc64v2_emit_ops_impl): New static variable.
2092 (ppc_emit_ops): New function.
2093 (linux_low_target): Wire in ppc_emit_ops.
2094
a2174ba4
MK
20952016-03-31 Wei-cheng Wang <cole945@gmail.com>
2096 Marcin Kościelnicki <koriakin@0x04.net>
2097
2098 PR/17221
2099 * Makefile.in: Add powerpc-*-ipa.o
2100 * configure.srv: Add ipa_obj for powerpc*-linux.
2101 * linux-ppc-ipa.c: New file.
2102 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2103 includes.
2104 (PPC_FIELD): New macro.
2105 (PPC_SEXT): New macro.
2106 (PPC_OP6): New macro.
2107 (PPC_BO): New macro.
2108 (PPC_LI): New macro.
2109 (PPC_BD): New macro.
2110 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2111 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2112 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2113 (ppc_get_thread_area): New function.
2114 (is_elfv2_inferior): New function.
2115 (gen_ds_form): New function.
2116 (GEN_STD): New macro.
2117 (GEN_STDU): New macro.
2118 (GEN_LD): New macro.
2119 (GEN_LDU): New macro.
2120 (gen_d_form): New function.
2121 (GEN_ADDI): New macro.
2122 (GEN_ADDIS): New macro.
2123 (GEN_LI): New macro.
2124 (GEN_LIS): New macro.
2125 (GEN_ORI): New macro.
2126 (GEN_ORIS): New macro.
2127 (GEN_LWZ): New macro.
2128 (GEN_STW): New macro.
2129 (GEN_STWU): New macro.
2130 (gen_xfx_form): New function.
2131 (GEN_MFSPR): New macro.
2132 (GEN_MTSPR): New macro.
2133 (GEN_MFCR): New macro.
2134 (GEN_MTCR): New macro.
2135 (GEN_SYNC): New macro.
2136 (GEN_LWSYNC): New macro.
2137 (gen_x_form): New function.
2138 (GEN_OR): New macro.
2139 (GEN_MR): New macro.
2140 (GEN_LWARX): New macro.
2141 (GEN_STWCX): New macro.
2142 (GEN_CMPW): New macro.
2143 (gen_md_form): New function.
2144 (GEN_RLDICL): New macro.
2145 (GEN_RLDICR): New macro.
2146 (gen_i_form): New function.
2147 (GEN_B): New macro.
2148 (GEN_BL): New macro.
2149 (gen_b_form): New function.
2150 (GEN_BNE): New macro.
2151 (GEN_LOAD): New macro.
2152 (GEN_STORE): New macro.
2153 (gen_limm): New function.
2154 (gen_atomic_xchg): New function.
2155 (gen_call): New function.
2156 (ppc_relocate_instruction): New function.
2157 (ppc_install_fast_tracepoint_jump_pad): New function.
2158 (ppc_get_min_fast_tracepoint_insn_len): New function.
2159 (ppc_get_ipa_tdesc_idx): New function.
2160 (the_low_target): Wire in the new functions.
2161 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2162 tdescs.
2163 * linux-ppc-tdesc.h: New file.
2164
a13c4696
MK
21652016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2166
2167 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2168 (alloc_jump_pad_buffer): New function.
2169 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2170 (alloc_jump_pad_buffer): New function.
2171 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2172 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2173 (alloc_jump_pad_buffer): New function.
2174 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2175 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2176 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2177 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2178
1cda1512
MK
21792016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2180
2181 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2182 * linux-amd64-ipa.c: Likewise.
2183 * linux-i386-ipa.c: Likewise.
2184 * linux-s390-ipa.c: Likewise.
2185 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2186 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2187 set_trace_state_variable_value_ptr.
2188 (struct ipa_sym_addresses): Likewise.
2189 (symbol_list): Likewise.
2190 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2191 accessing gdb_collect directly.
2192 (gdb_collect_ptr_type): New typedef.
2193 (get_raw_reg_ptr_type): New typedef.
2194 (get_trace_state_variable_value_ptr_type): New typedef.
2195 (set_trace_state_variable_value_ptr_type): New typedef.
2196 (gdb_collect_ptr): New global.
2197 (get_raw_reg_ptr): New global.
2198 (get_trace_state_variable_value_ptr): New global.
2199 (set_trace_state_variable_value_ptr): New global.
2200 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2201 accessing get_raw_reg directly.
2202 (get_get_tsv_func_addr): Likewise for
2203 get_trace_state_variable_value_ptr.
2204 (get_set_tsv_func_addr): Likewise for
2205 set_trace_state_variable_value_ptr.
2206 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2207
72fb5488
SM
22082016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2209
2210 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2211
28170b88
MK
22122016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2213
2214 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2215 packets.
2216 (relocate_instruction): Remove own_buf.
2217 * server.c (own_buf): Make global.
2218 (handle_v_requests): Make global.
2219 * server.h (own_buf): New declaration.
2220 (handle_v_requests): New prototype.
2221
f39e8743
MK
22222016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2223
2224 PR 18377
2225 * linux-s390-low.c (add_insns): New function.
2226 (s390_emit_prologue): New function.
2227 (s390_emit_epilogue): New function.
2228 (s390_emit_add): New function.
2229 (s390_emit_sub): New function.
2230 (s390_emit_mul): New function.
2231 (s390_emit_lsh): New function.
2232 (s390_emit_rsh_signed): New function.
2233 (s390_emit_rsh_unsigned): New function.
2234 (s390_emit_ext): New function.
2235 (s390_emit_log_not): New function.
2236 (s390_emit_bit_and): New function.
2237 (s390_emit_bit_or): New function.
2238 (s390_emit_bit_xor): New function.
2239 (s390_emit_bit_not): New function.
2240 (s390_emit_equal): New function.
2241 (s390_emit_less_signed): New function.
2242 (s390_emit_less_unsigned): New function.
2243 (s390_emit_ref): New function.
2244 (s390_emit_if_goto): New function.
2245 (s390_emit_goto): New function.
2246 (s390_write_goto_address): New function.
2247 (s390_emit_litpool): New function.
2248 (s390_emit_const): New function.
2249 (s390_emit_call): New function.
2250 (s390_emit_reg): New function.
2251 (s390_emit_pop): New function.
2252 (s390_emit_stack_flush): New function.
2253 (s390_emit_zero_ext): New function.
2254 (s390_emit_swap): New function.
2255 (s390_emit_stack_adjust): New function.
2256 (s390_emit_set_r2): New function.
2257 (s390_emit_int_call_1): New function.
2258 (s390_emit_void_call_2): New function.
2259 (s390_emit_eq_goto): New function.
2260 (s390_emit_ne_goto): New function.
2261 (s390_emit_lt_goto): New function.
2262 (s390_emit_le_goto): New function.
2263 (s390_emit_gt_goto): New function.
2264 (s390_emit_ge_goto): New function.
2265 (s390x_emit_prologue): New function.
2266 (s390x_emit_epilogue): New function.
2267 (s390x_emit_add): New function.
2268 (s390x_emit_sub): New function.
2269 (s390x_emit_mul): New function.
2270 (s390x_emit_lsh): New function.
2271 (s390x_emit_rsh_signed): New function.
2272 (s390x_emit_rsh_unsigned): New function.
2273 (s390x_emit_ext): New function.
2274 (s390x_emit_log_not): New function.
2275 (s390x_emit_bit_and): New function.
2276 (s390x_emit_bit_or): New function.
2277 (s390x_emit_bit_xor): New function.
2278 (s390x_emit_bit_not): New function.
2279 (s390x_emit_equal): New function.
2280 (s390x_emit_less_signed): New function.
2281 (s390x_emit_less_unsigned): New function.
2282 (s390x_emit_ref): New function.
2283 (s390x_emit_if_goto): New function.
2284 (s390x_emit_const): New function.
2285 (s390x_emit_call): New function.
2286 (s390x_emit_reg): New function.
2287 (s390x_emit_pop): New function.
2288 (s390x_emit_stack_flush): New function.
2289 (s390x_emit_zero_ext): New function.
2290 (s390x_emit_swap): New function.
2291 (s390x_emit_stack_adjust): New function.
2292 (s390x_emit_int_call_1): New function.
2293 (s390x_emit_void_call_2): New function.
2294 (s390x_emit_eq_goto): New function.
2295 (s390x_emit_ne_goto): New function.
2296 (s390x_emit_lt_goto): New function.
2297 (s390x_emit_le_goto): New function.
2298 (s390x_emit_gt_goto): New function.
2299 (s390x_emit_ge_goto): New function.
2300 (s390_emit_ops): New function.
2301 (struct linux_target_ops): Fill in emit_ops hook.
2302
abd9baf9
MK
23032016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2304
2305 PR 18377
2306 * Makefile.in: Add s390 IPA files.
2307 * configure.srv: Build IPA for s390.
2308 * linux-s390-ipa.c: New file.
2309 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2310 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2311 (tdesc_s390_linux32): Likewise.
2312 (init_registers_s390_linux32v1): Likewise.
2313 (tdesc_s390_linux32v1): Likewise.
2314 (init_registers_s390_linux32v2): Likewise.
2315 (tdesc_s390_linux32v2): Likewise.
2316 (init_registers_s390_linux64): Likewise.
2317 (tdesc_s390_linux64): Likewise.
2318 (init_registers_s390_linux64v1): Likewise.
2319 (tdesc_s390_linux64v1): Likewise.
2320 (init_registers_s390_linux64v2): Likewise.
2321 (tdesc_s390_linux64v2): Likewise.
2322 (init_registers_s390_te_linux64): Likewise.
2323 (tdesc_s390_te_linux64): Likewise.
2324 (init_registers_s390_vx_linux64): Likewise.
2325 (tdesc_s390_vx_linux64): Likewise.
2326 (init_registers_s390_tevx_linux64): Likewise.
2327 (tdesc_s390_tevx_linux64): Likewise.
2328 (init_registers_s390x_linux64): Likewise.
2329 (tdesc_s390x_linux64): Likewise.
2330 (init_registers_s390x_linux64v1): Likewise.
2331 (tdesc_s390x_linux64v1): Likewise.
2332 (init_registers_s390x_linux64v2): Likewise.
2333 (tdesc_s390x_linux64v2): Likewise.
2334 (init_registers_s390x_te_linux64): Likewise.
2335 (tdesc_s390x_te_linux64): Likewise.
2336 (init_registers_s390x_vx_linux64): Likewise.
2337 (tdesc_s390x_vx_linux64): Likewise.
2338 (init_registers_s390x_tevx_linux64): Likewise.
2339 (tdesc_s390x_tevx_linux64): Likewise.
2340 (have_hwcap_s390_vx): New static variable.
2341 (s390_arch_setup): Fill have_hwcap_s390_vx.
2342 (s390_get_thread_area): New function.
2343 (s390_ft_entry_gpr_esa): New const.
2344 (s390_ft_entry_gpr_zarch): New const.
2345 (s390_ft_entry_misc): New const.
2346 (s390_ft_entry_fr): New const.
2347 (s390_ft_entry_vr): New const.
2348 (s390_ft_main_31): New const.
2349 (s390_ft_main_64): New const.
2350 (s390_ft_exit_fr): New const.
2351 (s390_ft_exit_vr): New const.
2352 (s390_ft_exit_misc): New const.
2353 (s390_ft_exit_gpr_esa): New const.
2354 (s390_ft_exit_gpr_zarch): New const.
2355 (append_insns): New function.
2356 (s390_relocate_instruction): New function.
2357 (s390_install_fast_tracepoint_jump_pad): New function.
2358 (s390_get_min_fast_tracepoint_insn_len): New function.
2359 (s390_get_ipa_tdesc_idx): New function.
2360 (struct linux_target_ops): Wire in the above functions.
2361 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2362 * linux-s390-tdesc.h: New file.
2363
a4105d04
MK
23642016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2365
2366 * linux-s390-low.c (s390_supports_tracepoints): New function.
2367 (struct linux_target_ops): Fill supports_tracepoints hook.
2368
35ac8b3e
YQ
23692016-03-18 Yao Qi <yao.qi@linaro.org>
2370
2371 * linux-low.c (lwp_signal_can_be_delivered): New function.
2372 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2373
94610ec4
YQ
23742016-03-18 Yao Qi <yao.qi@linaro.org>
2375
2376 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2377 0 if signal is enqueued. Remove 'signal' from one debugging
2378 message. Move one debugging message to some lines below.
2379 Remove code setting 'signal' to 0.
2380
80aea927
YQ
23812016-03-18 Yao Qi <yao.qi@linaro.org>
2382
2383 * linux-low.c (linux_low_filter_event): Remove redundant
2384 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2385
b04fd3be
MK
23862016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2387
2388 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2389 (struct linux_target_ops): Wire in the above.
2390
c40c8d4b
YQ
23912016-03-03 Yao Qi <yao.qi@linaro.org>
2392
2393 * linux-low.c: Update comments to start_step_over.
2394
0f8288ae
YQ
23952016-03-03 Yao Qi <yao.qi@linaro.org>
2396
2397 PR server/19736
2398 * linux-low.c (handle_extended_wait): Set child suspended
2399 if event_lwp->bp_reinsert isn't zero.
2400
fdbd04a8
YQ
24012016-03-02 Yao Qi <yao.qi@linaro.org>
2402
2403 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2404 enqueue_pending_signal.
2405
6896a8fa
MK
24062016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2407
2408 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2409 is actually loaded.
2410
ab503087
MK
24112016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2412
2413 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2414 (s390_regmap_3264) [!__s390x__]: New global.
2415 (s390_collect_ptrace_register): Skip map entries containing -1.
2416 (s390_supply_ptrace_register): Ditto.
2417 (s390_fill_gprs_high): New function.
2418 (s390_store_gprs_high): New function.
2419 (s390_regsets): Add NT_S390_HIGH_GPRS.
2420 (s390_get_hwcap): Enable on 31-bit.
2421 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2422 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2423 Detect NT_S390_HIGH_GPRS.
2424 (s390_usrregs_info_3264): Enable on 31-bit.
2425 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2426 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2427
ae91f625
MK
24282016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2429
2430 PR gdb/13808
2431 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2432 * configure.srv: Ditto.
2433 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2434 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2435 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2436 (init_registers_amd64_linux): Remove prototype.
2437 (tdesc_amd64_linux): Remove declaration.
2438 (get_ipa_tdesc): New function.
2439 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2440 initialize remaining tdescs.
2441 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2442 (init_registers_i386_linux): Remove prototype.
2443 (tdesc_i386_linux): Remove declaration.
2444 (get_ipa_tdesc): New function.
2445 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2446 initialize remaining tdescs.
2447 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2448 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2449 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2450 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2451 (x86_get_ipa_tdesc_idx): New function.
2452 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2453 * linux-x86-tdesc.h: New file.
2454 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2455 (target_get_ipa_tdesc_idx): New macro.
2456 * tracepoint.c (ipa_tdesc_idx): New macro.
2457 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2458 (symbol_list): Add ipa_tdesc_idx.
2459 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2460 (ipa_tdesc): Remove.
2461 (ipa_tdesc_idx): New variable.
2462 (get_context_regcache): Use get_ipa_tdesc.
2463 (gdb_collect): Ditto.
2464 (gdb_probe): Ditto.
2465 * tracepoint.h (get_ipa_tdesc): New prototype.
2466 (ipa_tdesc): Remove.
2467
e7ad2f14
PA
24682016-02-24 Pedro Alves <palves@redhat.com>
2469
2470 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2471 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2472 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2473 Factor out common code between the USE_SIGTRAP_SIGINFO and
2474 !USE_SIGTRAP_SIGINFO blocks.
2475 (linux_low_filter_event): Call save_stop_reason instead of
2476 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2477 Update comments.
2478 (linux_wait_1): Update comments.
2479
657f9cde
WW
24802016-02-24 Wei-cheng Wang <cole945@gmail.com>
2481
2482 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2483 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2484 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2485 ppc_insert_point, ppc_remove_point.
2486
b00b61e1
MK
24872016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2488
2489 * linux-s390-low.c (s390_supports_z_point_type): New function.
2490 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2491
553cb527
YQ
24922016-02-16 Yao Qi <yao.qi@linaro.org>
2493
2494 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2495 PC. Get pc from regcache_read_pc.
2496
a5652c21
YQ
24972016-02-12 Yao Qi <yao.qi@linaro.org>
2498
2499 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2500 or linux_get_pc_32bit.
2501 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2502
ed443b61
YQ
25032016-02-12 Yao Qi <yao.qi@linaro.org>
2504
2505 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2506 arm_linux_get_next_pcs_fixup.
2507
020ecd38
MK
25082016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2509
2510 * tracepoint.c (x_tracepoint_action_download): Change
2511 write_inferior_data_ptr to write_inferior_data_pointer.
2512 (cmd_qtstart): Likewise.
2513 (write_inferior_data_ptr): Remove.
2514 (download_agent_expr): Change write_inferior_data_ptr to
2515 write_inferior_data_pointer.
2516 (download_tracepoint_1): Likewise.
2517 (download_tracepoint): Likewise.
2518 (download_trace_state_variables): Likewise.
2519
7cae9051
WW
25202016-02-11 Wei-cheng Wang <cole945@gmail.com>
2521 Marcin Kościelnicki <koriakin@0x04.net>
2522
2523 * tracepoint.c (struct tracepoint_action_ops): Remove.
2524 (struct tracepoint_action): Remove ops.
2525 (m_tracepoint_action_download, r_tracepoint_action_download)
2526 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2527 size and offset accordingly.
2528 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2529 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2530 (tracepoint_action_send, tracepoint_action_download): New functions.
2531 Helpers for trace action handlers.
2532 (add_tracepoint_action): Remove setup actions ops.
2533 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2534
9f6a71b4
YQ
25352016-02-10 Yao Qi <yao.qi@linaro.org>
2536
2537 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2538
1e94266c
SM
25392016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2540
2541 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2542 to AC_OUTPUT.
2543 * configure: Regenerate.
2544
8adce034
SM
25452016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2546
2547 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2548 void * to gdb_byte *.
2549 * linux-low.c (siginfo_fixup): Likewise.
2550 (linux_xfer_siginfo): Likewise.
2551 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2552 Likewise.
2553 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2554
93813b37
WT
25552016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2556
2557 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2558 to srv_tgtobj.
2559 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2560 to srv_tgtobj.
2561 * linux-x86-low.c [__x86_64__]: Include
2562 "nat/amd64-linux-siginfo.h".
2563 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2564 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2565 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2566 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2567 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2568 (cpt_si_fd, si_timerid, si_overrun): Move from
2569 nat/amd64-linux-siginfo.c.
2570 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2571
8424cc97
SM
25722016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2573
2574 * server.c (skip_to_semicolon): Remove.
2575 (process_point_options): Use strchrnul instead of
2576 skip_to_semicolon.
2577
4d18591b
YQ
25782016-01-26 Yao Qi <yao.qi@linaro.org>
2579
2580 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2581 * linux-low.c (install_software_single_step_breakpoints): Don't
2582 call regcache_read_pc.
2583 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2584 argument pc.
2585
d8020970
YQ
25862016-01-26 Yao Qi <yao.qi@linaro.org>
2587
2588 * linux-low.c (install_software_single_step_breakpoints): Call
2589 regcache_read_pc instead of get_pc.
2590
8b207339
YQ
25912016-01-26 Yao Qi <yao.qi@linaro.org>
2592
2593 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2594 (unblock_async_io): Rename to ...
2595 (block_unblock_async_io): ... it. New function.
2596 (enable_async_io): Don't install SIGIO handler. Unblock it
2597 instead.
2598 (disable_async_io): Don't ignore SIGIO. Block it instead.
2599 (initialize_async_io): Install SIGIO handler. Don't call
2600 unblock_async_io.
2601
18879fef
YQ
26022016-01-26 Yao Qi <yao.qi@linaro.org>
2603
2604 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2605 first character is '\003', call *the_target->request_interrupt.
2606
a0f8e08a
YQ
26072016-01-25 Yao Qi <yao.qi@linaro.org>
2608
2609 * remote-utils.c (new_thread_notify): Remove.
2610 (dead_thread_notify): Likewise.
2611 * remote-utils.h (new_thread_notify): Remove declaration.
2612 (dead_thread_notify): Likewise.
2613
cc5fd9ab
MK
26142016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2615
2616 * gdb.trace/pending.exp: Fix expected message on continue.
2617
99e8eb11
MK
26182016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2619
2620 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2621 it works properly on big-endian machines where sizeof (CORE_ADDR)
2622 != sizeof (void *).
2623
a994041d
PA
26242016-01-21 Pedro Alves <palves@redhat.com>
2625
2626 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2627 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2628 * configure: Regenerate.
2629
f7a6a40d
YQ
26302016-01-21 Yao Qi <yao.qi@linaro.org>
2631
2632 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2633 is_thumb and set it according to CPSR saved on the stack.
2634 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2635 arm_sigreturn_next_pc.
2636
6f69e520
YQ
26372016-01-18 Yao Qi <yao.qi@linaro.org>
2638
2639 * linux-low.c (linux_set_pc_64bit): New function.
2640 (linux_get_pc_64bit): New function.
2641 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2642 Declare.
2643 * linux-sparc-low.c (debug_threads): Remove declaration.
2644 (sparc_get_pc): Remove.
2645 (the_low_target): Use linux_get_pc_64bit instead of
2646 sparc_get_pc.
2647 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2648 (the_low_target): Use linux_get_pc_64bit and
2649 linux_set_pc_64bit.
2650
276d4552
YQ
26512016-01-18 Yao Qi <yao.qi@linaro.org>
2652
2653 * linux-arm-low.c (debug_threads): Remove declaration.
2654 (arm_get_pc, arm_set_pc): Remove.
2655 (the_low_target): Use linux_get_pc_32bit and
2656 linux_set_pc_32bit.
2657 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2658 (the_low_target): Use linux_get_pc_32bit and
2659 linux_set_pc_32bit.
2660 * linux-cris-low.c (debug_threads): Remove declaration.
2661 (cris_get_pc, cris_set_pc,): Remove.
2662 (the_low_target): Use linux_get_pc_32bit and
2663 linux_set_pc_32bit.
2664 * linux-crisv32-low.c (debug_threads): Remove declaration.
2665 (cris_get_pc, cris_set_pc): Remove.
2666 (the_low_target): Use linux_get_pc_32bit and
2667 linux_set_pc_32bit.
2668 * linux-low.c: Include inttypes.h.
2669 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2670 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2671 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2672 (the_low_target): Use linux_get_pc_32bit and
2673 linux_set_pc_32bit.
2674 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2675 (the_low_target): Use linux_get_pc_32bit and
2676 linux_set_pc_32bit.
2677 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2678 (the_low_target): Use linux_get_pc_32bit and
2679 linux_set_pc_32bit.
2680 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2681 (the_low_target): Use linux_get_pc_32bit and
2682 linux_set_pc_32bit.
2683 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2684 (the_low_target): Use linux_get_pc_32bit and
2685 linux_set_pc_32bit.
2686
eb0edac8
GB
26872016-01-18 Gary Benson <gbenson@redhat.com>
2688
2689 * configure.ac (AC_FUNC_FORK): New check.
2690 * config.in: Regenerate.
2691 * configure: Likewise.
2692
1b451dda
YQ
26932016-01-14 Yao Qi <yao.qi@linaro.org>
2694
2695 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2696 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2697 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2698 arm_get_next_pcs_ctor.
2699
82075af2
JS
27002016-01-12 Josh Stone <jistone@redhat.com>
2701 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2702
2703 * inferiors.h: Include "gdb_vecs.h".
2704 (struct process_info): Add syscalls_to_catch.
2705 * inferiors.c (remove_process): Free syscalls_to_catch.
2706 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2707 syscall_return stops.
2708 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2709 * server.c (handle_general_set): Handle QCatchSyscalls.
2710 (handle_query): Report support for QCatchSyscalls.
2711 * target.h (struct target_ops): Add supports_catch_syscall.
2712 (target_supports_catch_syscall): New macro.
2713 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2714 (struct lwp_info): Add syscall_state.
2715 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2716 Maintain syscall_state and syscalls_to_catch across exec.
2717 (get_syscall_trapinfo): New function, proxy to the_low_target.
2718 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2719 (linux_low_filter_event): Toggle syscall_state entry/return for
2720 syscall traps, and set it ignored for all others.
2721 (gdb_catching_syscalls_p): New function.
2722 (gdb_catch_this_syscall_p): New function.
2723 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2724 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2725 (linux_supports_catch_syscall): New function.
2726 (linux_target_ops): Install it.
2727 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2728 (the_low_target): Install it.
2729
8f13a3ce
MF
27302016-01-12 Mike Frysinger <vapier@gentoo.org>
2731
2732 * acinclude.m4: Include new ../warning.m4 file.
2733 * configure: Regenerated.
2734 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2735
5b3da067
MF
27362016-01-12 Mike Frysinger <vapier@gentoo.org>
2737
2738 * ax.c (is_goto_target): Mark static.
2739 * linux-low.c (register_addr): Likewise.
2740 (linux_fetch_registers, linux_store_registers): Likewise.
2741 * mem-break.c (any_persistent_commands): Fix old prototype.
2742 (add_commands_to_breakpoint): Mark static.
2743 * regcache.c (find_register_by_name): Delete unused func.
2744 * remote-utils.c (hex_or_minus_one): Mark static.
2745 * server.c (monitor_show_help): Mark static.
2746 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2747 handle_v_requests): Likewise.
2748
bc504a31
PA
27492016-01-12 Pedro Alves <palves@redhat.com>
2750
2751 Remove use of the registered trademark symbol throughout.
2752
5a0dd67a
YQ
27532016-01-08 Yao Qi <yao.qi@linaro.org>
2754
2755 * remote-utils.c (getpkt): If c is '\003', call target hook
2756 request_interrupt.
2757
b2ca446f
YQ
27582016-01-06 Yao Qi <yao.qi@linaro.org>
2759
2760 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2761 linux-aarch32-low.c.
2762 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2763 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2764 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2765 (thumb2_breakpoint): Declare.
2766 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2767 linux-aarch32-low.h.
2768 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2769 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2770 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2771
edd88788
JB
27722016-01-01 Joel Brobecker <brobecker@adacore.com>
2773
2774 * gdbreplay.c (gdbreplay_version): Change copyright year in
2775 version message.
2776 * server.c (gdbserver_version): Likewise.
2777
65da7f14
PP
27782015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2779
2780 * server.c (crc32_table): Delete.
2781 (crc32): Use libiberty's xcrc32 function.
2782
4abd5ed2
JB
27832015-12-22 Joel Brobecker <brobecker@adacore.com>
2784
2785 * lynx-low.c (lynx_delete_thread_callback): New function.
2786 (lynx_mourn): Properly delete our process and all of its
2787 threads. Remove call to clear_inferiors.
2788
0e50fe5c
JB
27892015-12-22 Joel Brobecker <brobecker@adacore.com>
2790
2791 * target.c (thread_search_callback): Add check that
2792 the thread_stopped target callback is not NULL before
2793 calling it.
2794
35adc03f
YQ
27952015-12-21 Yao Qi <yao.qi@linaro.org>
2796
2797 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2798 arm breakpoint.
2799
bd2b2909
AT
28002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2801
2802 * server.c (handle_query): Call target_supports_software_single_step.
2803
7fe5e27e
AT
28042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2805
2806 * linux-low.c (single_step): New function.
2807 (linux_resume_one_lwp_throw): Call single_step.
2808 (start_step_over): Likewise.
2809
d9311bfa
AT
28102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2811
2812 * Makefile.in (SFILES): Append arch/arm-linux.c,
2813 arch/arm-get-next-pcs.c.
2814 (arm-linux.o): New rule.
2815 (arm-get-next-pcs.o): New rule.
2816 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2817 arm-linux.o.
2818 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2819 to linux-aarch32-low.c.
2820 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2821 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2822 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2823 (thumb2_breakpoint_len): Likewise.
2824 (arm_is_thumb_mode): Make non-static.
2825 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2826 from linux-aarch32-low.c.
2827 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2828 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2829 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2830 (thumb2_breakpoint_len): Likewise.
2831 (arm_is_thumb_mode): New declaration.
2832 * linux-arm-low.c: Include arch/arm-linux.h
2833 aarch/arm-get-next-pcs.h, sys/syscall.h.
2834 (get_next_pcs_ops): New struct.
2835 (get_next_pcs_addr_bits_remove): New function.
2836 (get_next_pcs_is_thumb): New function.
2837 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2838 (arm_sigreturn_next_pc): Likewise.
2839 (get_next_pcs_syscall_next_pc): Likewise.
2840 (arm_gdbserver_get_next_pcs): Likewise.
2841 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2842 Initialize.
2843 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2844 * server.h: Include gdb_vecs.h.
2845
68ce2059
AT
28462015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2847
2848 * Makefile.in (SFILES): Append common/common-regcache.c.
2849 (OBS): Append common-regcache.o.
2850 (common-regcache.o): New rule.
2851 * regcache.c (init_register_cache): Initialize cache to
2852 REG_UNAVAILABLE.
2853 (regcache_raw_read_unsigned): New function.
2854 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2855 register_status enum.
2856
fa5308bd
AT
28572015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2858
2859 * linux-aarch64-low.c (the_low_targets): Rename
2860 breakpoint_reinsert_addr to get_next_pcs.
2861 * linux-arm-low.c (the_low_targets): Likewise.
2862 * linux-bfin-low.c (the_low_targets): Likewise.
2863 * linux-cris-low.c (the_low_targets): Likewise.
2864 * linux-crisv32-low.c (the_low_targets): Likewise.
2865 * linux-low.c (can_software_single_step): Likewise.
2866 (install_software_single_step_breakpoints): New function.
2867 (start_step_over): Use install_software_single_step_breakpoints.
2868 * linux-low.h: New CORE_ADDR vector.
2869 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2870 get_next_pcs.
2871 * linux-mips-low.c (the_low_targets): Likewise.
2872 * linux-nios2-low.c (the_low_targets): Likewise.
2873 * linux-sparc-low.c (the_low_targets): Likewise.
2874
4a6ed09b
PA
28752015-12-17 Pedro Alves <palves@redhat.com>
2876
2877 * linux-low.c (linux_kill_one_lwp): Remove references to
2878 LinuxThreads.
2879 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2880 to 'kill'.
2881 (linux_init_signals): Delete.
2882 (initialize_low): Adjust.
2883 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2884
7544db95
PA
28852015-12-16 Pedro Alves <palves@redhat.com>
2886
2887 * configure.ac (compiler warning flags): When testing a
2888 -Wno-foo option, check whether -Wfoo works instead.
2889 * configure: Regenerate.
2890
8020350c
DB
28912015-12-11 Don Breazeal <donb@codesourcery.com>
2892
2893 * server.c (process_serial_event): Don't exit from gdbserver
2894 in remote mode if there are still active inferiors.
2895
db91f502
YQ
28962015-12-11 Yao Qi <yao.qi@linaro.org>
2897
2898 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2899 arm_breakpoint_at if the process is 32-bit.
2900
b37a6290
YQ
29012015-12-11 Yao Qi <yao.qi@linaro.org>
2902
2903 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2904 arm breakpoint.
2905
17b1509a
YQ
29062015-12-07 Yao Qi <yao.qi@linaro.org>
2907
2908 * configure.srv: Append arm.o to srv_tgtobj for
2909 aarch64*-*-linux* target.
2910 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2911 from linux-arm-low.c.
2912 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2913 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2914 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2915 (thumb2_breakpoint_len): Likewise.
2916 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2917 (arm_breakpoint_kinds): Likewise.
2918 (arm_breakpoint_kind_from_pc): Likewise.
2919 (arm_sw_breakpoint_from_kind): Likewise.
2920 (arm_breakpoint_kind_from_current_state): Likewise.
2921 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2922 (arm_sw_breakpoint_from_kind): Declare.
2923 (arm_breakpoint_kind_from_current_state): Declare.
2924 (arm_breakpoint_at): Declare.
2925 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2926 arm_sw_breakpoint_from_kind if process is 32-bit.
2927 (aarch64_breakpoint_kind_from_pc): New function.
2928 (aarch64_breakpoint_kind_from_current_state): New function.
2929 (the_low_target): Initialize fields breakpoint_kind_from_pc
2930 and breakpoint_kind_from_current_state.
2931 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2932 linux-aarch32-low.c.
2933 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2934 (arm_breakpoint, arm_breakpoint_len): Likewise.
2935 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2936 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2937 (arm_is_thumb_mode): Likewise.
2938 (arm_breakpoint_at): Likewise.
2939 (arm_breakpoint_kind_from_pc): Likewise.
2940 (arm_sw_breakpoint_from_kind): Likewise.
2941 (arm_breakpoint_kind_from_current_state): Likewise.
2942
2943 Revert:
2944 2015-08-04 Yao Qi <yao.qi@linaro.org>
2945
2946 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2947 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2948 * server.c (extended_protocol): Remove "static".
2949 * server.h (extended_protocol): Declare it.
2950
ece66d65
JS
29512015-12-04 Josh Stone <jistone@redhat.com>
2952
2953 * target.h (struct target_ops) <arch_setup>: Rename to ...
2954 (struct target_ops) <post_create_inferior>: ... this.
2955 (target_arch_setup): Rename to ...
2956 (target_post_create_inferior): ... this, calling post_create_inferior.
2957 * server.c (start_inferior): Update target_arch_setup calls to
2958 target_post_create_inferior.
2959 * linux-low.c (linux_low_ptrace_options): Forward declare.
2960 (linux_arch_setup): Update its comment for general use.
2961 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2962 (struct linux_target_ops): Use linux_post_create_inferior.
2963 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2964 to post_create_inferior.
2965 * nto-low.c (struct nto_target_ops): Likewise.
2966 * spu-low.c (struct spu_target_ops): Likewise.
2967 * win32-low.c (struct win32_target_ops): Likewise.
2968
e58c48b4
AT
29692015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2970
2971 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2972
fbec8956
AT
29732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2974
2975 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2976 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2977 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2978 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2979 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2980 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2981 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2982 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2983 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2984 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2985 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2986 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2987
9b4c5f87
AT
29882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2989
2990 * linux-low.c (linux_look_up_symbols): Don't call
2991 linux_supports_traceclone.
2992 * linux-low.h (thread_db_init): Remove use_events argument.
2993 * thread-db.c (thread_db_use_event): Remove global variable.
2994 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2995 (struct thread_db) <td_create_bp>: Remove field.
2996 (thread_db_create_event): Remove function.
2997 (thread_db_enable_reporting): Likewise.
2998 (find_one_thread): Don't check for thread_db_use_events.
2999 (attach_thread): Likewise.
3000 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3001 (try_thread_db_load_1): Don't check for thread_db_use_events.
3002 (thread_db_init): Remove use_events argument and thread events
3003 handling.
3004 (remove_thread_event_breakpoints): Remove function.
3005 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3006
7d00775e
AT
30072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3008
3009 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3010 New function.
3011 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3012 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3013 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3014 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3015 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3016 Initialize.
3017 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3018 New function.
3019 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3020 * linux-low.c (can_hardware_single_step): Use
3021 supports_hardware_single_step.
3022 (can_software_single_step): New function.
3023 (start_step_over): Call can_software_single_step.
3024 (linux_supports_hardware_single_step): New function.
3025 (struct target_ops) <supports_software_single_step>: Initialize.
3026 * linux-low.h (struct linux_target_ops)
3027 <supports_hardware_single_step>: Initialize.
3028 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3029 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3030 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3031 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3032 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3033 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3034 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3035 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3036 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3037 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3038 Initialize.
3039 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3040 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3041 Initialize.
3042 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3043 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3044 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3045 New function.
3046 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3047 * target.h (struct target_ops): <supports_software_single_step>:
3048 New field.
3049 (target_supports_software_single_step): New macro.
3050
2d97cd35
AT
30512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3052
3053 * linux-low.c (linux_wait_1): Fix pc advance condition.
3054 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3055 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3056
769ef81f
AT
30572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3058
3059 * linux-arm-low.c (arm_is_thumb_mode): New function.
3060 (arm_breakpoint_at): Use arm_is_thumb_mode.
3061 (arm_breakpoint_kind_from_current_state): New function.
3062 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3063 Initialize.
3064 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3065 (linux_breakpoint_kind_from_current_state): New function.
3066 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3067 * linux-low.h (struct linux_target_ops)
3068 <breakpoint_kind_from_current_state>: New field.
3069 * target.h (struct target_ops): Likewise.
3070 (target_breakpoint_kind_from_current_state): New macro.
3071
1bebeeca
PA
30722015-11-30 Pedro Alves <palves@redhat.com>
3073
3074 * linux-low.c (linux_resume): Wake up the event loop before
3075 returning.
3076
a67a9fae
PA
30772015-11-30 Pedro Alves <palves@redhat.com>
3078
3079 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3080 check.
3081 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3082 to -1.
3083 * target.c (struct thread_search): New structure.
3084 (thread_search_callback): New function.
3085 (prev_general_thread): New global.
3086 (prepare_to_access_memory, done_accessing_memory): New functions.
3087 * target.h (prepare_to_access_memory, done_accessing_memory):
3088 Replace macros with function declarations.
3089
f2faf941
PA
30902015-11-30 Pedro Alves <palves@redhat.com>
3091
3092 PR 14618
3093 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3094 report TARGET_WAITKIND_NO_RESUMED.
3095 * remote-utils.c (prepare_resume_reply): Handle
3096 TARGET_WAITKIND_NO_RESUMED.
3097 * server.c (report_no_resumed): New global.
3098 (handle_query) <qSupported>: Handle "no-resumed+". Report
3099 "no-resumed+" support.
3100 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3101 return error if the client doesn't support no-resumed events.
3102 (push_stop_notification): New function.
3103 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3104 events if the client supports them.
3105
a681f9c9
PA
31062015-11-30 Pedro Alves <palves@redhat.com>
3107
3108 * linux-low.c (thread_still_has_status_pending_p): Don't check
3109 vCont;t here.
3110 (lwp_resumed): New function.
3111 (status_pending_p_callback): Return early if the LWP is not
3112 supposed to be resumed.
3113
65706a29
PA
31142015-11-30 Pedro Alves <palves@redhat.com>
3115
3116 * linux-low.c (handle_extended_wait): Assert that the LWP's
3117 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3118 thread create events, leave the new child's status pending.
3119 (linux_low_filter_event): If GDB wants to hear about thread exit
3120 events, leave the LWP marked dead and don't delete it.
3121 (linux_wait_for_event_filtered): Don't check for thread exit.
3122 (filter_exit_event): New function.
3123 (linux_wait_1): Use it, when returning an exit event.
3124 (linux_resume_one_lwp_throw): Assert that the LWP's
3125 waitstatus is TARGET_WAITKIND_IGNORE.
3126 * remote-utils.c (prepare_resume_reply): Handle
3127 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3128 * server.c (report_thread_events): New global.
3129 (handle_general_set): Handle QThreadEvents.
3130 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3131 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3132 TARGET_WAITKIND_THREAD_EXITED.
3133 * server.h (report_thread_events): Declare.
3134
56cf4bed
PA
31352015-11-30 Pedro Alves <palves@redhat.com>
3136
3137 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3138 the thread's last_resume_kind was resume_stop.
3139
500c1d85
PA
31402015-11-30 Pedro Alves <palves@redhat.com>
3141
3142 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3143 before returning.
3144
de979965
PA
31452015-11-30 Pedro Alves <palves@redhat.com>
3146
3147 * server.c (handle_v_requests): Handle vCtrlC.
3148
34c65914
PA
31492015-11-30 Pedro Alves <palves@redhat.com>
3150
3151 * gdbthread.h (find_any_thread_of_pid): Declare.
3152 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3153 functions.
3154 * server.c (handle_query): If current_thread is NULL, look for
3155 another thread of the selected process.
3156
79efa585 31572015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3158 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3159
3160 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3161 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3162 name in reply.
3163 * target.h (struct target_ops) <thread_name>: New field.
3164 (target_thread_name): New macro.
3165
80d82c19
JB
31662015-11-23 Joel Brobecker <brobecker@adacore.com>
3167
3168 * regcache.h (regcache_invalidate_pid): Add declaration.
3169 * regcache.c (regcache_invalidate_pid): New function, extracted
3170 from regcache_invalidate.
3171 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3172 Add trivial documentation comment.
3173 * lynx-low.c: Use regcache_invalidate_pid instead of
3174 regcache_invalidate.
3175
64da5dd5
JB
31762015-11-23 Joel Brobecker <brobecker@adacore.com>
3177
3178 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3179 and Elf64_auxv_t if the target is Android.
3180
37ce4055
DE
31812015-11-22 Doug Evans <xdje42@gmail.com>
3182
3183 * target.h: #include <sys/types.h>.
3184
06e03fff
PA
31852015-11-19 Pedro Alves <palves@redhat.com>
3186
3187 * linux-low.c (linux_process_qsupported): Change prototype.
3188 Adjust.
3189 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3190 Change prototype.
3191 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3192 and adjust to loop over all features.
3193 * server.c (handle_query) <qSupported>: Adjust to call
3194 target_process_qsupported once, passing it a vector of unprocessed
3195 features.
3196 * target.h (struct target_ops) <process_qsupported>: Change
3197 prototype.
3198 (target_process_qsupported): Adjust.
3199
9a084706
PA
32002015-11-19 Pedro Alves <palves@redhat.com>
3201
3202 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3203 mode.
3204 * configure: Regenerate.
3205
dad44a1f
PA
32062015-11-19 Pedro Alves <palves@redhat.com>
3207
3208 * configure: Regenerate.
3209
231c0592
YQ
32102015-11-19 Yao Qi <yao.qi@linaro.org>
3211
3212 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3213 type to uint32_t.
3214
6c1c9a8b
YQ
32152015-11-19 Yao Qi <yao.qi@linaro.org>
3216
3217 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3218 (struct aarch64_operand): Move enum out.
3219
9caa3311
YQ
32202015-11-19 Yao Qi <yao.qi@linaro.org>
3221
3222 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3223 struct user_fpsimd_state *.
3224 (aarch64_store_fpregset): Likewise.
3225
6a69a054
YQ
32262015-11-19 Yao Qi <yao.qi@linaro.org>
3227
3228 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3229 struct user_pt_regs *.
3230 (aarch64_store_gregset): Likewise.
3231
1798301e
PA
32322015-11-18 Pedro Alves <palves@redhat.com>
3233
3234 * Makefile.in (all_object_files): Add $IPA_OBJS.
3235
ce7715e2
PA
32362015-11-17 Pedro Alves <palves@redhat.com>
3237
3238 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3239 GDB_SIGNAL_0 and gdb_signal_to_string.
3240
c0879059
PA
32412015-11-17 Pedro Alves <palves@redhat.com>
3242
3243 * win32-low.c (handle_output_debug_string): Remove parameter.
3244 (win32_kill): Remove our_status local and adjust call to
3245 handle_output_debug_string.
3246 (get_child_debug_event): Adjust call to
3247 handle_output_debug_string.
3248
1996e237
SM
32492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3250
3251 * linux-mips-low.c (mips_fill_gregset): Add cast.
3252 (mips_store_gregset): Likewise.
3253 (mips_fill_fpregset): Likewise.
3254 (mips_store_fpregset): Likewise.
3255
cbec665b
SM
32562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3257
3258 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3259 priv.
3260
eb3e3c67
SM
32612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3262
3263 * linux-mips-low.c (mips_linux_new_thread): Change type of
3264 watch_type to enum target_hw_bp_type.
3265
171de4b8
SM
32662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3267
3268 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3269 Change return type to arm_hwbp_type.
3270
04248ead
SM
32712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3272
3273 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3274 (arm_store_gregset): Likewise.
3275 * linux-arm-low.c (arm_get_hwcap): Likewise.
3276 (arm_read_description): Likewise.
3277
04b3479c
SM
32782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3279
3280 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3281
2bc84e8a
SM
32822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3283
3284 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3285 (ppc_fill_vsxregset): Likewise.
3286 (ppc_store_vsxregset): Likewise.
3287 (ppc_fill_vrregset): Likewise.
3288 (ppc_store_vrregset): Likewise.
3289 (ppc_fill_evrregset): Likewise.
3290 (ppc_store_evrregset): Likewise.
3291
e6c5bb05
SM
32922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3293
3294 * linux-ppc-low.c (ppc_usrregs_info): Remove
3295 forward-declaration.
3296 (ppc_arch_setup): Move lower in file.
3297
7ea45d72
SM
32982015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3299
3300 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3301 (ps_pdwrite): Likewise.
3302
69291610
HW
33032015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3304
3305 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3306 to after assert checks.
3307
b42945fd
SM
33082015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3309
3310 * proc-service.c (ps_pdread): Add/adjust casts.
3311 (ps_pdwrite): Add/adjust casts.
3312
d6f85c84
SM
33132015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3314
3315 * server.c (handle_search_memory_1): Cast return value of
3316 memmem.
3317
f98cd059
SM
33182015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3319
3320 * server.c (write_qxfer_response): Change type of data to
3321 gdb_byte *.
3322
d2412fa5
PA
33232015-10-29 Pedro Alves <palves@redhat.com>
3324
3325 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3326
c17414a2
PA
33272015-10-29 Pedro Alves <palves@redhat.com>
3328
3329 * tracepoint.c (clear_installed_tracepoints): Add casts.
3330
e053fbc4
PA
33312015-10-29 Pedro Alves <palves@redhat.com>
3332
3333 * server.c (handle_v_cont, process_serial_event): Add enum
3334 gdb_signal casts to signal parsing code.
3335
add67df8
PA
33362015-10-29 Pedro Alves <palves@redhat.com>
3337
3338 * linux-low.h (NULL_REGSET): Define.
3339 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3340 * linux-arm-low.c (arm_regsets): Likewise.
3341 * linux-crisv32-low.c (cris_regsets): Likewise.
3342 * linux-m68k-low.c (m68k_regsets): Likewise.
3343 * linux-mips-low.c (mips_regsets): Likewise.
3344 * linux-nios2-low.c (nios2_regsets): Likewise.
3345 * linux-ppc-low.c (ppc_regsets): Likewise.
3346 * linux-s390-low.c (s390_regsets): Likewise.
3347 * linux-sh-low.c (sh_regsets): Likewise.
3348 * linux-sparc-low.c (sparc_regsets): Likewise.
3349 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3350 * linux-tile-low.c (tile_regsets): Likewise.
3351 * linux-x86-low.c (x86_regsets): Likewise.
3352 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3353
50bc912a
PA
33542015-10-29 Pedro Alves <palves@redhat.com>
3355
3356 * linux-low.h (NULL_REGSET): Define.
3357 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3358 * linux-arm-low.c (arm_regsets): Likewise.
3359 * linux-crisv32-low.c (cris_regsets): Likewise.
3360 * linux-m68k-low.c (m68k_regsets): Likewise.
3361 * linux-mips-low.c (mips_regsets): Likewise.
3362 * linux-nios2-low.c (nios2_regsets): Likewise.
3363 * linux-ppc-low.c (ppc_regsets): Likewise.
3364 * linux-s390-low.c (s390_regsets): Likewise.
3365 * linux-sh-low.c (sh_regsets): Likewise.
3366 * linux-sparc-low.c (sparc_regsets): Likewise.
3367 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3368 * linux-tile-low.c (tile_regsets): Likewise.
3369 * linux-x86-low.c (x86_regsets): Likewise.
3370 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3371
682b2546
DE
33722015-10-26 Doug Evans <dje@google.com>
3373
3374 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3375
963843d4
DE
33762015-10-26 Doug Evans <dje@google.com>
3377
3378 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3379
d41401ac
DE
33802015-10-26 Doug Evans <dje@google.com>
3381
3382 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3383 for debug_printf.
3384 (attach_thread, find_new_threads_callback): Ditto.
3385
3db28855
AT
33862015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3387
3388 * mem-break.h (set_breakpoint_data): Remove.
3389
fb78e89c
AT
33902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3391
3392 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3393 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3394 (initialize_low): Remove set_breakpoint_data call.
3395 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3396 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3397 (initialize_low): Remove set_breakpoint_data call.
3398 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3399 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3400 (initialize_low): Remove set_breakpoint_data call.
3401
2e6ee069
AT
34022015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3403
3404 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3405 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3406 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3407 * target.h (target_breakpoint_kind_from_pc): New macro.
3408
1652a986
AT
34092015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3410
3411 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3412 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3413 the default breakpoint kind.
3414
abeead09
AT
34152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3416
3417 * linux-arm-low.c (arm_supports_z_point_type): Add software
3418 breakpoint support.
3419
b0b4b501
AT
34202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3421
3422 * linux-arm-low.c: Refactor breakpoint definitions.
3423 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3424 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3425
8689682c
AT
34262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3427
3428 * Makefile.in: Add arm.c/o.
3429 * configure.srv: Likewise.
3430 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3431 (arm_breakpoint_kind_from_pc): New function.
3432 (arm_sw_breakpoint_from_kind): Return proper kind.
3433 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3434
27165294
AT
34352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3436
3437 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3438 removal.
3439 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3440 (struct raw_breakpoint) <size>: Remove.
3441 (struct raw_breakpoint) <kind>: Add.
3442 (bp_size): New function.
3443 (bp_opcode): Likewise.
3444 (find_raw_breakpoint_at): Adjust for kind.
3445 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3446 (remove_memory_breakpoint): Adjust for kind call bp_size.
3447 (set_raw_breakpoint_at): Adjust for kind.
3448 (set_breakpoint): Likewise.
3449 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3450 (delete_raw_breakpoint): Adjust for kind.
3451 (delete_breakpoint): Likewise.
3452 (find_gdb_breakpoint): Likewise.
3453 (set_gdb_breakpoint_1): Likewise.
3454 (set_gdb_breakpoint): Likewise.
3455 (delete_gdb_breakpoint_1): Likewise.
3456 (delete_gdb_breakpoint): Likewise.
3457 (uninsert_raw_breakpoint): Likewise.
3458 (reinsert_raw_breakpoint): Likewise.
3459 (set_breakpoint_data): Remove.
3460 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3461 (check_mem_read): Adjust for kind call bp_size.
3462 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3463 (clone_one_breakpoint): Adjust for kind.
3464 * mem-break.h (set_gdb_breakpoint): Likewise.
3465 (delete_gdb_breakpoint): Likewise.
3466 * server.c (process_serial_event): Likewise.
3467
dd373349
AT
34682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3469
3470 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3471 (struct linux_target_ops) <breakpoint>: Remove.
3472 (struct linux_target_ops) <breakpoint_len>: Remove.
3473 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3474 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3475 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3476 (arm_sw_breakpoint_from_kind): New function.
3477 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3478 (struct linux_target_ops) <breakpoint>: Remove.
3479 (struct linux_target_ops) <breakpoint_len>: Remove.
3480 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3481 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3482 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3483 (struct linux_target_ops) <breakpoint>: Remove.
3484 (struct linux_target_ops) <breakpoint_len>: Remove.
3485 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3486 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3487 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3488 (struct linux_target_ops) <breakpoint>: Remove.
3489 (struct linux_target_ops) <breakpoint_len>: Remove.
3490 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3491 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3492 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3493 and sw_breakpoint_from_kind to increment the pc.
3494 (linux_breakpoint_kind_from_pc): New function.
3495 (linux_sw_breakpoint_from_kind): New function.
3496 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3497 (initialize_low): Call breakpoint_kind_from_pc and
3498 sw_breakpoint_from_kind to replace breakpoint_data/len.
3499 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3500 New field.
3501 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3502 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3503 (struct linux_target_ops) <breakpoint>: Remove.
3504 (struct linux_target_ops) <breakpoint_len>: Remove.
3505 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3506 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3507 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3508 (struct linux_target_ops) <breakpoint>: Remove.
3509 (struct linux_target_ops) <breakpoint_len>: Remove.
3510 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3511 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3512 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3513 (struct linux_target_ops) <breakpoint>: Remove.
3514 (struct linux_target_ops) <breakpoint_len>: Remove.
3515 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3516 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3517 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3518 (struct linux_target_ops) <breakpoint>: Remove.
3519 (struct linux_target_ops) <breakpoint_len>: Remove.
3520 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3521 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3522 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3523 (struct linux_target_ops) <breakpoint>: Remove.
3524 (struct linux_target_ops) <breakpoint_len>: Remove.
3525 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3526 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3527 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3528 (struct linux_target_ops) <breakpoint>: Remove.
3529 (struct linux_target_ops) <breakpoint_len>: Remove.
3530 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3531 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3532 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3533 (struct linux_target_ops) <breakpoint>: Remove.
3534 (struct linux_target_ops) <breakpoint_len>: Remove.
3535 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3536 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3537 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3538 (struct linux_target_ops) <breakpoint>: Remove.
3539 (struct linux_target_ops) <breakpoint_len>: Remove.
3540 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3541 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3542 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3543 (struct linux_target_ops) <breakpoint>: Remove.
3544 (struct linux_target_ops) <breakpoint_len>: Remove.
3545 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3546 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3547 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3548 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3549 (struct linux_target_ops) <breakpoint>: Remove.
3550 (struct linux_target_ops) <breakpoint_len>: Remove.
3551 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3552 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3553 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3554 (struct linux_target_ops) <breakpoint>: Remove.
3555 (struct linux_target_ops) <breakpoint_len>: Remove.
3556 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3557 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3558
4cd98a19
AT
35592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3560
3561 * linux-cris-low.c (cris_get_pc): Remove void arg.
3562
774ee6d2
AR
35632015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3564
3565 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3566 variable name.
3567
833dcd29
AR
35682015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3569
3570 * inferiors.c (thread_pid_matches_callback): New function.
3571 (find_thread_process): New function.
3572 (remove_thread): Reset current_thread.
3573 (remove_process): Assert threads have been removed first.
3574
8d689ee5
YQ
35752015-10-15 Yao Qi <yao.qi@linaro.org>
3576
3577 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3578 if it is 3.
3579 (aarch64_remove_point): Likewise.
3580 * regcache.c (regcache_register_size): New function.
3581
1c2e1515
YQ
35822015-10-12 Yao Qi <yao.qi@linaro.org>
3583
3584 * linux-aarch64-low.c: Update all callers as emit_load_store
3585 is renamed to aarch64_emit_load_store.
3586
e1c587c3
YQ
35872015-10-12 Yao Qi <yao.qi@linaro.org>
3588
3589 * linux-aarch64-low.c: Update all callers of function renaming
3590 from emit_insn to aarch64_emit_insn.
3591
b6542f81
YQ
35922015-10-12 Yao Qi <yao.qi@linaro.org>
3593
3594 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3595 arch/aarch64-insn.h.
3596 (struct aarch64_memory_operand): Likewise.
3597 (ENCODE): Likewise.
3598 (emit_insn): Move to arch/aarch64-insn.c.
3599 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3600 (emit_load_store): Move to arch/aarch64-insn.c.
3601 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3602 (can_encode_int32): Remove.
3603
246994ce
YQ
36042015-10-12 Yao Qi <yao.qi@linaro.org>
3605
3606 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3607 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3608 (aarch64_relocate_instruction): Likewise.
3609 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3610 (struct aarch64_insn_visitor): Likewise.
3611
0badd99f
YQ
36122015-10-12 Yao Qi <yao.qi@linaro.org>
3613
3614 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3615 (struct aarch64_insn_visitor): New.
3616 (struct aarch64_insn_relocation_data): New.
3617 (aarch64_ftrace_insn_reloc_b): New function.
3618 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3619 (aarch64_ftrace_insn_reloc_cb): Likewise.
3620 (aarch64_ftrace_insn_reloc_tb): Likewise.
3621 (aarch64_ftrace_insn_reloc_adr): Likewise.
3622 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3623 (aarch64_ftrace_insn_reloc_others): Likewise.
3624 (visitor): New.
3625 (aarch64_relocate_instruction): Use visitor.
3626
dfaffe9d
YQ
36272015-10-12 Yao Qi <yao.qi@linaro.org>
3628
3629 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3630 int. Add argument buf.
3631 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3632 aarch64_relocate_instruction.
3633
70b439f0
YQ
36342015-10-12 Yao Qi <yao.qi@linaro.org>
3635
3636 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3637 argument insn. Remove local variable insn. Don't call
3638 target_read_uint32.
3639 (aarch64_install_fast_tracepoint_jump_pad): Call
3640 target_read_uint32.
3641
7781c06f
YQ
36422015-09-30 Yao Qi <yao.qi@linaro.org>
3643
3644 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3645 (emit_load_store_pair): Likewise.
3646
9a3c8263
SM
36472015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3648
3649 * dll.c (match_dll): Add cast(s).
3650 (unloaded_dll): Likewise.
3651 * linux-low.c (second_thread_of_pid_p): Likewise.
3652 (delete_lwp_callback): Likewise.
3653 (count_events_callback): Likewise.
3654 (select_event_lwp_callback): Likewise.
3655 (linux_set_resume_request): Likewise.
3656 * server.c (accumulate_file_name_length): Likewise.
3657 (emit_dll_description): Likewise.
3658 (handle_qxfer_threads_worker): Likewise.
3659 (visit_actioned_threads): Likewise.
3660 * thread-db.c (any_thread_of): Likewise.
3661 * tracepoint.c (same_process_p): Likewise.
3662 (match_blocktype): Likewise.
3663 (build_traceframe_info_xml): Likewise.
3664
224c3ddb
SM
36652015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3666
3667 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3668 assignment.
3669 (gdb_unparse_agent_expr): Likewise.
3670 * hostio.c (require_data): Likewise.
3671 (handle_pread): Likewise.
3672 * linux-low.c (disable_regset): Likewise.
3673 (fetch_register): Likewise.
3674 (store_register): Likewise.
3675 (get_dynamic): Likewise.
3676 (linux_qxfer_libraries_svr4): Likewise.
3677 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3678 (set_fast_tracepoint_jump): Likewise.
3679 (uninsert_fast_tracepoint_jumps_at): Likewise.
3680 (reinsert_fast_tracepoint_jumps_at): Likewise.
3681 (validate_inserted_breakpoint): Likewise.
3682 (clone_agent_expr): Likewise.
3683 * regcache.c (init_register_cache): Likewise.
3684 * remote-utils.c (putpkt_binary_1): Likewise.
3685 (decode_M_packet): Likewise.
3686 (decode_X_packet): Likewise.
3687 (look_up_one_symbol): Likewise.
3688 (relocate_instruction): Likewise.
3689 (monitor_output): Likewise.
3690 * server.c (handle_search_memory): Likewise.
3691 (handle_qxfer_exec_file): Likewise.
3692 (handle_qxfer_libraries): Likewise.
3693 (handle_qxfer): Likewise.
3694 (handle_query): Likewise.
3695 (handle_v_cont): Likewise.
3696 (handle_v_run): Likewise.
3697 (captured_main): Likewise.
3698 * target.c (write_inferior_memory): Likewise.
3699 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3700 * tracepoint.c (init_trace_buffer): Likewise.
3701 (add_tracepoint_action): Likewise.
3702 (add_traceframe): Likewise.
3703 (add_traceframe_block): Likewise.
3704 (cmd_qtdpsrc): Likewise.
3705 (cmd_qtdv): Likewise.
3706 (cmd_qtstatus): Likewise.
3707 (response_source): Likewise.
3708 (response_tsv): Likewise.
3709 (cmd_qtnotes): Likewise.
3710 (gdb_collect): Likewise.
3711 (initialize_tracepoint): Likewise.
3712
afbe19f8
PL
37132015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3714
3715 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3716 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3717 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3718 <NOP>: New.
3719 (enum aarch64_condition_codes): New enum.
3720 (w0): New static global.
3721 (fp): Likewise.
3722 (lr): Likewise.
3723 (struct aarch64_memory_operand) <type>: New
3724 MEMORY_OPERAND_POSTINDEX type.
3725 (postindex_memory_operand): New helper function.
3726 (emit_ret): New function.
3727 (emit_load_store_pair): New function, factored out of emit_stp
3728 with support for MEMORY_OPERAND_POSTINDEX.
3729 (emit_stp): Rewrite using emit_load_store_pair.
3730 (emit_ldp): New function.
3731 (emit_load_store): Likewise.
3732 (emit_ldr): Mention post-index instruction in comment.
3733 (emit_ldrh): New function.
3734 (emit_ldrb): New function.
3735 (emit_ldrsw): Mention post-index instruction in comment.
3736 (emit_str): Likewise.
3737 (emit_subs): New function.
3738 (emit_cmp): Likewise.
3739 (emit_and): Likewise.
3740 (emit_orr): Likewise.
3741 (emit_orn): Likewise.
3742 (emit_eor): Likewise.
3743 (emit_mvn): Likewise.
3744 (emit_lslv): Likewise.
3745 (emit_lsrv): Likewise.
3746 (emit_asrv): Likewise.
3747 (emit_mul): Likewise.
3748 (emit_sbfm): Likewise.
3749 (emit_sbfx): Likewise.
3750 (emit_ubfm): Likewise.
3751 (emit_ubfx): Likewise.
3752 (emit_csinc): Likewise.
3753 (emit_cset): Likewise.
3754 (emit_nop): Likewise.
3755 (emit_ops_insns): New helper function.
3756 (emit_pop): Likewise.
3757 (emit_push): Likewise.
3758 (aarch64_emit_prologue): New function.
3759 (aarch64_emit_epilogue): Likewise.
3760 (aarch64_emit_add): Likewise.
3761 (aarch64_emit_sub): Likewise.
3762 (aarch64_emit_mul): Likewise.
3763 (aarch64_emit_lsh): Likewise.
3764 (aarch64_emit_rsh_signed): Likewise.
3765 (aarch64_emit_rsh_unsigned): Likewise.
3766 (aarch64_emit_ext): Likewise.
3767 (aarch64_emit_log_not): Likewise.
3768 (aarch64_emit_bit_and): Likewise.
3769 (aarch64_emit_bit_or): Likewise.
3770 (aarch64_emit_bit_xor): Likewise.
3771 (aarch64_emit_bit_not): Likewise.
3772 (aarch64_emit_equal): Likewise.
3773 (aarch64_emit_less_signed): Likewise.
3774 (aarch64_emit_less_unsigned): Likewise.
3775 (aarch64_emit_ref): Likewise.
3776 (aarch64_emit_if_goto): Likewise.
3777 (aarch64_emit_goto): Likewise.
3778 (aarch64_write_goto_address): Likewise.
3779 (aarch64_emit_const): Likewise.
3780 (aarch64_emit_call): Likewise.
3781 (aarch64_emit_reg): Likewise.
3782 (aarch64_emit_pop): Likewise.
3783 (aarch64_emit_stack_flush): Likewise.
3784 (aarch64_emit_zero_ext): Likewise.
3785 (aarch64_emit_swap): Likewise.
3786 (aarch64_emit_stack_adjust): Likewise.
3787 (aarch64_emit_int_call_1): Likewise.
3788 (aarch64_emit_void_call_2): Likewise.
3789 (aarch64_emit_eq_goto): Likewise.
3790 (aarch64_emit_ne_goto): Likewise.
3791 (aarch64_emit_lt_goto): Likewise.
3792 (aarch64_emit_le_goto): Likewise.
3793 (aarch64_emit_gt_goto): Likewise.
3794 (aarch64_emit_ge_got): Likewise.
3795 (aarch64_emit_ops_impl): New static global variable.
3796 (aarch64_emit_ops): New target function, return
3797 &aarch64_emit_ops_impl.
3798 (struct linux_target_ops): Install it.
3799
bb903df0
PL
38002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3801
3802 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3803 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3804 aarch64-ipa.o.
3805 * linux-aarch64-ipa.c: New file.
3806 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3807 and endian.h.
3808 (aarch64_get_thread_area): New target method.
3809 (extract_signed_bitfield): New helper function.
3810 (aarch64_decode_ldr_literal): New function.
3811 (enum aarch64_opcodes): New enum.
3812 (struct aarch64_register): New struct.
3813 (struct aarch64_operand): New struct.
3814 (x0): New static global.
3815 (x1): Likewise.
3816 (x2): Likewise.
3817 (x3): Likewise.
3818 (x4): Likewise.
3819 (w2): Likewise.
3820 (ip0): Likewise.
3821 (sp): Likewise.
3822 (xzr): Likewise.
3823 (aarch64_register): New helper function.
3824 (register_operand): Likewise.
3825 (immediate_operand): Likewise.
3826 (struct aarch64_memory_operand): New struct.
3827 (offset_memory_operand): New helper function.
3828 (preindex_memory_operand): Likewise.
3829 (enum aarch64_system_control_registers): New enum.
3830 (ENCODE): New macro.
3831 (emit_insn): New helper function.
3832 (emit_b): New function.
3833 (emit_bcond): Likewise.
3834 (emit_cb): Likewise.
3835 (emit_tb): Likewise.
3836 (emit_blr): Likewise.
3837 (emit_stp): Likewise.
3838 (emit_ldp_q_offset): Likewise.
3839 (emit_stp_q_offset): Likewise.
3840 (emit_load_store): Likewise.
3841 (emit_ldr): Likewise.
3842 (emit_ldrsw): Likewise.
3843 (emit_str): Likewise.
3844 (emit_ldaxr): Likewise.
3845 (emit_stxr): Likewise.
3846 (emit_stlr): Likewise.
3847 (emit_data_processing_reg): Likewise.
3848 (emit_data_processing): Likewise.
3849 (emit_add): Likewise.
3850 (emit_sub): Likewise.
3851 (emit_mov): Likewise.
3852 (emit_movk): Likewise.
3853 (emit_mov_addr): Likewise.
3854 (emit_mrs): Likewise.
3855 (emit_msr): Likewise.
3856 (emit_sevl): Likewise.
3857 (emit_wfe): Likewise.
3858 (append_insns): Likewise.
3859 (can_encode_int32_in): New helper function.
3860 (aarch64_relocate_instruction): New function.
3861 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3862 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3863 (struct linux_target_ops): Install aarch64_get_thread_area,
3864 aarch64_install_fast_tracepoint_jump_pad and
3865 aarch64_get_min_fast_tracepoint_insn_len.
3866
787749ea
PL
38672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3868
3869 * Makefile.in (aarch64-insn.o): New rule.
3870 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3871
9812b2e6
YQ
38722015-09-21 Yao Qi <yao.qi@linaro.org>
3873
3874 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3875
18fe412b
YQ
38762015-09-21 Yao Qi <yao.qi@linaro.org>
3877
3878 * tracepoint.c (max_jump_pad_size): Remove.
3879
a0cc84cd
YQ
38802015-09-18 Yao Qi <yao.qi@linaro.org>
3881
3882 * linux-aarch64-low.c: Don't include sys/uio.h.
3883 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3884
d78908cf
WW
38852015-09-16 Wei-cheng Wang <cole945@gmail.com>
3886
3887 * tracepoint.c (eval_result_type): Change prototype.
3888 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3889
d57e0d50
PA
38902015-09-15 Pedro Alves <palves@redhat.com>
3891
3892 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3893 Check whether to report exec events instead of checking whether
3894 multiprocess is enabled.
3895
5a676acc
PA
38962015-09-15 Pedro Alves <palves@redhat.com>
3897
3898 PR remote/18965
3899 * remote-utils.c (prepare_resume_reply): Merge
3900 TARGET_WAITKIND_VFORK_DONE switch case with the
3901 TARGET_WAITKIND_FORKED case.
3902
7c5d0fad
YQ
39032015-09-15 Yao Qi <yao.qi@linaro.org>
3904
3905 * server.c (handle_query): Check string comparison using
3906 "else if" instead of "if".
3907
750ce8d1
YQ
39082015-09-15 Yao Qi <yao.qi@linaro.org>
3909
3910 * server.c (vCont_supported): New global variable.
3911 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3912 matches. Append ";vContSupported+" to own_buf.
3913 (handle_v_requests): Append ";s;S" to own_buf if target supports
3914 hardware single step or vCont_supported is false.
3915 (capture_main): Set vCont_supported to zero.
3916
70b90b91
YQ
39172015-09-15 Yao Qi <yao.qi@linaro.org>
3918
3919 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3920 it to ...
3921 (linux_supports_hardware_single_step): ... New function.
3922 (linux_target_ops): Update.
3923 * lynx-low.c (lynx_target_ops): Set field
3924 supports_hardware_single_step to target_can_do_hardware_single_step.
3925 * nto-low.c (nto_target_ops): Likewise.
3926 * spu-low.c (spu_target_ops): Likewise.
3927 * win32-low.c (win32_target_ops): Likewise.
3928 * target.c (target_can_do_hardware_single_step): New function.
3929 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3930 Remove. <supports_hardware_single_step>: New field.
3931 (target_supports_conditional_breakpoints): Remove.
3932 (target_supports_hardware_single_step): New macro.
3933 (target_can_do_hardware_single_step): Declare.
3934 * server.c (handle_query): Use target_supports_hardware_single_step
3935 instead of target_supports_conditional_breakpoints.
3936
ade90bde
YQ
39372015-09-15 Yao Qi <yao.qi@linaro.org>
3938
3939 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3940 function.
3941 (struct linux_target_ops the_low_target): Install
3942 aarch64_linux_siginfo_fixup.
3943
94585166
DB
39442015-09-11 Don Breazeal <donb@codesourcery.com>
3945 Luis Machado <lgustavo@codesourcery.com>
3946
3947 * linux-low.c (linux_mourn): Static declaration.
3948 (linux_arch_setup): Move in front of
3949 handle_extended_wait.
3950 (linux_arch_setup_thread): New function.
3951 (handle_extended_wait): Handle exec events. Call
3952 linux_arch_setup_thread. Make event_lwp argument a
3953 pointer-to-a-pointer.
3954 (check_zombie_leaders): Do not check stopped threads.
3955 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3956 (linux_low_filter_event): Add lwp and thread for exec'ing
3957 non-leader thread if leader thread has been deleted.
3958 Refactor code into linux_arch_setup_thread and call it.
3959 Pass child lwp pointer by reference to handle_extended_wait.
3960 (linux_wait_for_event_filtered): Update comment.
3961 (linux_wait_1): Prevent clobbering exec event status.
3962 (linux_supports_exec_events): New function.
3963 (linux_target_ops) <supports_exec_events>: Initialize new member.
3964 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3965 new member.
3966 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3967 * server.c (report_exec_events): New global variable.
3968 (handle_query): Handle qSupported query for exec-events feature.
3969 (captured_main): Initialize report_exec_events.
3970 * server.h (report_exec_events): Declare new global variable.
3971 * target.h (struct target_ops) <supports_exec_events>: New
3972 member.
3973 (target_supports_exec_events): New macro.
3974 * win32-low.c (win32_target_ops) <supports_exec_events>:
3975 Initialize new member.
3976
0568462b
MM
39772015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3978
3979 * linux-low.c (linux_low_enable_btrace): Remove.
3980 (linux_target_ops): Replace linux_low_enable_btrace with
3981 linux_enable_btrace.
3982
39edd165
YQ
39832015-09-03 Yao Qi <yao.qi@linaro.org>
3984
3985 * linux-aarch64-low.c (aarch64_insert_point): Call
3986 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3987 returns true.
3988
1db33b5a
UW
39892015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3990
3991 * linux-low.c (check_stopped_by_breakpoint): Use
3992 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3993
ab290430
PA
39942015-08-27 Pedro Alves <palves@redhat.com>
3995
3996 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3997
8d749320
SM
39982015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3999
6711b7f8
SM
4000 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4001 the XNEW-family equivalent.
8d749320
SM
4002 (compile_bytecodes): Likewise.
4003 * dll.c (loaded_dll): Likewise.
4004 * event-loop.c (append_callback_event): Likewise.
4005 (create_file_handler): Likewise.
4006 (create_file_event): Likewise.
4007 * hostio.c (handle_open): Likewise.
4008 * inferiors.c (add_thread): Likewise.
4009 (add_process): Likewise.
4010 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4011 * linux-arm-low.c (arm_new_process): Likewise.
4012 (arm_new_thread): Likewise.
4013 * linux-low.c (add_to_pid_list): Likewise.
4014 (linux_add_process): Likewise.
4015 (handle_extended_wait): Likewise.
4016 (add_lwp): Likewise.
4017 (enqueue_one_deferred_signal): Likewise.
4018 (enqueue_pending_signal): Likewise.
4019 (linux_resume_one_lwp_throw): Likewise.
4020 (linux_resume_one_thread): Likewise.
4021 (linux_read_memory): Likewise.
4022 (linux_write_memory): Likewise.
4023 * linux-mips-low.c (mips_linux_new_process): Likewise.
4024 (mips_linux_new_thread): Likewise.
4025 (mips_add_watchpoint): Likewise.
4026 * linux-x86-low.c (initialize_low_arch): Likewise.
4027 * lynx-low.c (lynx_add_process): Likewise.
4028 * mem-break.c (set_raw_breakpoint_at): Likewise.
4029 (set_breakpoint): Likewise.
4030 (add_condition_to_breakpoint): Likewise.
4031 (add_commands_to_breakpoint): Likewise.
4032 (clone_agent_expr): Likewise.
4033 (clone_one_breakpoint): Likewise.
4034 * regcache.c (new_register_cache): Likewise.
4035 * remote-utils.c (look_up_one_symbol): Likewise.
4036 * server.c (queue_stop_reply): Likewise.
4037 (start_inferior): Likewise.
4038 (queue_stop_reply_callback): Likewise.
4039 (handle_target_event): Likewise.
4040 * spu-low.c (fetch_ppc_memory): Likewise.
4041 (store_ppc_memory): Likewise.
4042 * target.c (set_target_ops): Likewise.
4043 * thread-db.c (thread_db_load_search): Likewise.
4044 (try_thread_db_load_1): Likewise.
4045 * tracepoint.c (add_tracepoint): Likewise.
4046 (add_tracepoint_action): Likewise.
4047 (create_trace_state_variable): Likewise.
4048 (cmd_qtdpsrc): Likewise.
4049 (cmd_qtro): Likewise.
4050 (add_while_stepping_state): Likewise.
4051 * win32-low.c (child_add_thread): Likewise.
4052 (get_image_name): Likewise.
4053
ed8b7b42
YQ
40542015-08-25 Yao Qi <yao.qi@linaro.org>
4055
4056 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4057
db3cb7cb
YQ
40582015-08-25 Yao Qi <yao.qi@linaro.org>
4059
4060 * Makefile.in (aarch64-linux.o): New rule.
4061 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4062 srv_tgtobj.
4063 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4064 (aarch64_init_debug_reg_state): Make it extern.
4065 (aarch64_linux_prepare_to_resume): Remove.
4066
f6011a1c
YQ
40672015-08-25 Yao Qi <yao.qi@linaro.org>
4068
4069 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4070 lwp_arch_private_info and ptid_of_lwp.
4071
88e2cf7e
YQ
40722015-08-25 Yao Qi <yao.qi@linaro.org>
4073
4074 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4075 Find proc_info by find_process_pid. All callers updated.
4076
5e35436e
YQ
40772015-08-25 Yao Qi <yao.qi@linaro.org>
4078
4079 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4080 Remove.
4081 (debug_reg_change_callback): Remove.
4082 (aarch64_notify_debug_reg_change): Remove.
4083
4a8a7965
YQ
40842015-08-25 Yao Qi <yao.qi@linaro.org>
4085
4086 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4087 Call current_lwp_ptid.
4088
32a271ee
YQ
40892015-08-25 Yao Qi <yao.qi@linaro.org>
4090
4091 * linux-aarch64-low.c (debug_reg_change_callback): Use
4092 debug_printf.
4093
0d51c8d7
YQ
40942015-08-25 Yao Qi <yao.qi@linaro.org>
4095
4096 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4097
31a43dd5
YQ
40982015-08-25 Yao Qi <yao.qi@linaro.org>
4099
4100 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4101
8ee52567
YQ
41022015-08-25 Yao Qi <yao.qi@linaro.org>
4103
4104 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4105 the code.
4106
ff3f0f45
YQ
41072015-08-25 Yao Qi <yao.qi@linaro.org>
4108
4109 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4110 Remove.
4111 (debug_reg_change_callback): Remove argument entry and add argument
4112 lwp. Remove local variable thread. Don't print thread id in the
4113 debugging output. Don't check whether pid of thread equals to pid.
4114 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4115 iterate_over_lwps instead find_inferior.
4116
3d40fbb5
PA
41172015-08-24 Pedro Alves <palves@redhat.com>
4118
4119 * inferiors.c (get_first_process): New function.
4120 * inferiors.h (get_first_process): New declaration.
4121 * remote-utils.c (read_ptid): Default to the first process in the
4122 list, instead of to the current thread's process.
4123
438e1e42
PA
41242015-08-24 Pedro Alves <palves@redhat.com>
4125
4126 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4127 * event-loop.c: Likewise.
4128 * remote-utils.c: Likewise.
4129 * tracepoint.c: Likewise.
4130
a8c6d4fc
PA
41312015-08-24 Pedro Alves <palves@redhat.com>
4132
4133 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4134 ptid_get_lwp.
4135
99b0bb12
PA
41362015-08-21 Pedro Alves <palves@redhat.com>
4137
4138 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4139 instead of literal 1.
4140
f8904751
PA
41412015-08-21 Pedro Alves <palves@redhat.com>
4142
4143 * tdesc.c (default_description): Explicitly zero-initialize.
4144
465a859e
PA
41452015-08-21 Pedro Alves <palves@redhat.com>
4146
4147 PR gdb/18749
4148 * inferiors.c (remove_thread): Discard any pending stop reply for
4149 this thread.
4150 * server.c (remove_all_on_match_pid): Rename to ...
4151 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4152 instead of a pid.
4153 (discard_queued_stop_replies): Change parameter to a ptid. Now
4154 extern.
4155 (handle_v_kill, kill_inferior_callback, captured_main)
4156 (process_serial_event): Adjust.
4157 * server.h (discard_queued_stop_replies): Declare.
4158
f0db101d
PA
41592015-08-21 Pedro Alves <palves@redhat.com>
4160
4161 * linux-low.c (wait_for_sigstop): Always switch to no thread
4162 selected if the previously current thread dies.
4163 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4164 process instead of the current thread's.
4165 * remote-utils.c (input_interrupt): Don't check if there's no
4166 current thread.
4167 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4168 current thread to the general thread fails, error out.
4169 (handle_qxfer_auxv, handle_qxfer_libraries)
4170 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4171 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4172 (handle_query): Check if there's a thread selected instead of
4173 checking whether there's any thread in the thread list.
4174 (handle_qxfer_threads, handle_qxfer_btrace)
4175 (handle_qxfer_btrace_conf): Don't error out early if there's no
4176 thread in the thread list.
4177 (handle_v_cont, myresume): Don't set the current thread to the
4178 continue thread.
4179 (process_serial_event) <Hg handling>: Also set thread_id if the
4180 previous general thread is still alive.
4181 (process_serial_event) <g/G handling>: If setting the current
4182 thread to the general thread fails, error out.
4183 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4184 thread's lwp instead of the current thread's.
4185 * target.c (set_desired_thread): If the desired thread was not
4186 found, leave the current thread pointing to NULL. Return an int
4187 (boolean) indicating success.
4188 * target.h (set_desired_thread): Change return type to int.
4189
40045d91
MF
41902015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4191
4192 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4193 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4194 #includes.
4195 (ps_get_thread_area): New function.
4196
45face3b
GB
41972015-08-19 Gary Benson <gbenson@redhat.com>
4198
4199 * hostio.c (handle_pread): Do not attempt to read more data
4200 than hostio_reply_with_data can fit in a packet.
4201
16d5f642
JB
42022015-08-18 Joel Brobecker <brobecker@adacore.com>
4203
4204 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4205
a738da3a
MF
42062015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4207
4208 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4209
33ebda9d
PA
42102015-08-06 Pedro Alves <palves@redhat.com>
4211
4212 * tracepoint.c (expr_eval_result): Now an int.
4213
a44892be
PA
42142015-08-06 Pedro Alves <palves@redhat.com>
4215
4216 * gdbthread.h (struct regcache): Forward declare.
4217 (struct thread_info) <regcache_data>: Now a struct regcache
4218 pointer.
4219 * inferiors.c (inferior_regcache_data)
4220 (set_inferior_regcache_data): Now work with struct regcache
4221 pointers.
4222 * inferiors.h (struct regcache): Forward declare.
4223 (inferior_regcache_data, set_inferior_regcache_data): Now work
4224 with struct regcache pointers.
4225 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4226 (free_register_cache_thread): Remove struct regcache pointer
4227 casts.
4228
608a1e46
PA
42292015-08-06 Pedro Alves <palves@redhat.com>
4230
4231 * server.c (captured_main): On error, print the exception message
4232 to stderr, and if run_once is set, throw a quit.
4233
f0ce0d3a
PA
42342015-08-06 Pedro Alves <palves@redhat.com>
4235
4236 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4237 the current thread.
4238
bf47e248
PA
42392015-08-06 Pedro Alves <palves@redhat.com>
4240
4241 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4242 reading beyond the passed in buffer length.
4243
b6b9ffcc
PL
42442015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4245
4246 * tracepoint.c (symbol_list) <required>: Remove.
4247
863d01bd
PA
42482015-08-06 Pedro Alves <palves@redhat.com>
4249
4250 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4251 count if stopping and suspending threads.
4252 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4253 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4254 (linux_detach): Complete an ongoing step-over.
4255 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4256 throughout.
4257 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4258 (linux_wait_1): If passing a signal to the inferior after
4259 finishing a step-over, unsuspend and re-resume all lwps. If we
4260 see a single-step event but the thread should be continuing, don't
4261 pass the trap to gdb.
4262 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4263 internal_error instead of gdb_assert.
4264 (enqueue_pending_signal): New function.
4265 (check_ptrace_stopped_lwp_gone): Add debug output.
4266 (start_step_over): Use internal_error instead of gdb_assert.
4267 (complete_ongoing_step_over): New function.
4268 (linux_resume_one_thread): Don't resume a suspended thread.
4269 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4270 it stepping.
4271
00db26fa
PA
42722015-08-06 Pedro Alves <palves@redhat.com>
4273
4274 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4275 (linux_thread_alive): Use lwp_is_marked_dead.
4276 (extended_event_reported): Delete.
4277 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4278 instead of extended_event_reported.
4279 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4280 as well.
4281 (lwp_is_marked_dead): New function.
4282 (lwp_running): Use lwp_is_marked_dead.
4283 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4284 comment.
4285
ad071a30
PA
42862015-08-06 Pedro Alves <palves@redhat.com>
4287
4288 * linux-low.c (linux_wait_1): Move fork event output out of the
4289 !report_to_gdb check. Pass event_child->waitstatus to
4290 target_waitstatus_to_string instead of ourstatus.
4291
524b57e6
YQ
42922015-08-04 Yao Qi <yao.qi@linaro.org>
4293
4294 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4295 if current_thread is 32 bit.
4296
6085d6f6
YQ
42972015-08-04 Yao Qi <yao.qi@linaro.org>
4298
4299 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4300 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4301 * server.c (extended_protocol): Remove "static".
4302 * server.h (extended_protocol): Declare it.
4303
8a7e4587
YQ
43042015-08-04 Yao Qi <yao.qi@linaro.org>
4305
4306 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4307 both aarch64 and aarch32.
4308 (aarch64_set_pc): Likewise.
4309
3b53ae99
YQ
43102015-08-04 Yao Qi <yao.qi@linaro.org>
4311
4312 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4313 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4314 arm-with-neon.xml to srv_xmlfiles.
4315 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4316 (is_64bit_tdesc): New function.
4317 (aarch64_linux_read_description): New function.
4318 (aarch64_arch_setup): Call aarch64_linux_read_description.
4319 (regs_info): Rename to regs_info_aarch64.
4320 (aarch64_regs_info): Return right regs_info.
4321 (initialize_low_arch): Call initialize_low_arch_aarch32.
4322
bd9e6534
YQ
43232015-08-04 Yao Qi <yao.qi@linaro.org>
4324
4325 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4326 * linux-aarch32-low.c: New file.
4327 * linux-aarch32-low.h: New file.
4328 * linux-arm-low.c (arm_fill_gregset): Move it to
4329 linux-aarch32-low.c.
4330 (arm_store_gregset): Likewise.
4331 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4332 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4333 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4334 (regs_info): Rename to regs_info_arm.
4335 (arm_regs_info): Return regs_info_aarch32 if
4336 have_ptrace_getregset is 1 and target description is
4337 arm_with_neon or arm_with_vfpv3.
4338 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4339 Call initialize_low_arch_aarch32 instead.
4340
ded48a5e
YQ
43412015-08-04 Yao Qi <yao.qi@linaro.org>
4342
4343 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4344 * linux-low.c: ... here.
4345 * linux-low.h (have_ptrace_getregset): Declare it.
4346
96e9210f
PA
43472015-08-04 Pedro Alves <palves@redhat.com>
4348
4349 * thread-db.c (struct thread_db): Use new typedefs.
4350 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4351 CHK calls.
4352 (disable_thread_event_reporting): Cast result of dlsym to
4353 destination function pointer type.
4354 (thread_db_mourn): Use td_ta_delete_ftype.
4355
af60a1ef
SL
43562015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4357
4358 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4359 arch variant.
4360 (CDX_BREAKPOINT): Define for R2.
4361 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4362 (the_low_target): Add comments.
4363
e8b41681
YQ
43642015-07-30 Yao Qi <yao.qi@linaro.org>
4365
4366 * linux-arm-low.c (arm_hwcap): Remove it.
4367 (arm_read_description): New local variable arm_hwcap. Don't
4368 set arm_hwcap to zero.
4369
89abb039
YQ
43702015-07-30 Yao Qi <yao.qi@linaro.org>
4371
4372 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4373 Use regcache->tdesc instead.
4374 (arm_store_wmmxregset): Likewise.
4375 (arm_fill_vfpregset): Likewise.
4376 (arm_store_vfpregset): Likewise.
4377
deca266c
YQ
43782015-07-30 Yao Qi <yao.qi@linaro.org>
4379
4380 * linux-arm-low.c: Include arch/arm.h.
4381 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4382 (arm_store_gregset): Likewise.
4383
aa58a496
SM
43842015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4385
4386 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4387 ptrace's 4th parameter.
4388
50904b25
YQ
43892015-07-27 Yao Qi <yao.qi@linaro.org>
4390
4391 * configure.srv (case aarch64*-*-linux*): Don't set
4392 srv_linux_usrregs.
4393
5826e159
PA
43942015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4395
4396 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4397 sys/ptrace.h.
4398 * linux-arm-low.c: Likewise.
4399 * linux-cris-low.c: Likewise.
4400 * linux-crisv32-low.c: Likewise.
4401 * linux-low.c: Likewise.
4402 * linux-m68k-low.c: Likewise.
4403 * linux-mips-low.c: Likewise.
4404 * linux-nios2-low.c: Likewise.
4405 * linux-s390-low.c: Likewise.
4406 * linux-sparc-low.c: Likewise.
4407 * linux-tic6x-low.c: Likewise.
4408 * linux-tile-low.c: Likewise.
4409 * linux-x86-low.c: Likewise.
4410
54019719
PA
44112015-07-24 Pedro Alves <palves@redhat.com>
4412
4413 * config.in: Regenerate.
4414 * configure: Regenerate.
4415
eb7aa561
PA
44162015-07-24 Pedro Alves <palves@redhat.com>
4417
4418 * acinclude.m4: Include ../ptrace.m4.
4419 * configure.ac: Call GDB_AC_PTRACE.
4420 * config.in, configure: Regenerate.
4421
55d7b841
YQ
44222015-07-24 Yao Qi <yao.qi@linaro.org>
4423
4424 * linux-low.c (linux_create_inferior): Remove setting to
4425 proc->priv->new_inferior.
4426 (linux_attach): Likewise.
4427 (linux_low_filter_event): Likewise.
4428 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4429
c06cbd92
YQ
44302015-07-24 Yao Qi <yao.qi@linaro.org>
4431
4432 * linux-low.c (linux_arch_setup): New function.
4433 (linux_low_filter_event): If proc->tdesc is NULL and
4434 proc->attached is true, call the_low_target.arch_setup.
4435 Otherwise, keep status pending, and return.
4436 (linux_resume_one_lwp_throw): Don't call get_pc if
4437 thread->while_stepping isn't NULL. Don't call
4438 get_thread_regcache if proc->tdesc is NULL.
4439 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4440 (linux_target_ops): Install arch_setup.
4441 * server.c (start_inferior): Call the_target->arch_setup.
4442 * target.h (struct target_ops) <arch_setup>: New field.
4443 (target_arch_setup): New marco.
4444 * lynx-low.c (lynx_target_ops): Update.
4445 * nto-low.c (nto_target_ops): Update.
4446 * spu-low.c (spu_target_ops): Update.
4447 * win32-low.c (win32_target_ops): Update.
4448
5ae3ebba
YQ
44492015-07-24 Yao Qi <yao.qi@linaro.org>
4450
4451 * linux-low.c (linux_add_process): Don't set
4452 proc->priv->new_inferior.
4453 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4454 (linux_attach): Likewise.
4455
eb97750b
YQ
44562015-07-24 Yao Qi <yao.qi@linaro.org>
4457
4458 * server.c (start_inferior): Code refactor.
4459
51aee833
YQ
44602015-07-24 Yao Qi <yao.qi@linaro.org>
4461
4462 * server.c (process_serial_event): Set general_thread.
4463
af1b22f3
YQ
44642015-07-21 Yao Qi <yao.qi@linaro.org>
4465
4466 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4467 aarch64_linux_get_debug_reg_capacity.
4468
554717a3
YQ
44692015-07-17 Yao Qi <yao.qi@linaro.org>
4470
4471 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4472 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4473 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4474 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4475 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4476 (AARCH64_HWP_ALIGNMENT): Likewise.
4477 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4478 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4479 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4480 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4481 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4482 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4483 (struct aarch64_debug_reg_state): Likewise.
4484 (struct arch_lwp_info): Likewise.
4485 (aarch64_align_watchpoint): Likewise.
4486 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4487 (aarch64_watchpoint_length): Likewise.
4488 (aarch64_point_encode_ctrl_reg): Likewise
4489 (aarch64_point_is_aligned): Likewise.
4490 (aarch64_align_watchpoint): Likewise.
4491 (aarch64_linux_set_debug_regs):
4492 (aarch64_dr_state_insert_one_point): Likewise.
4493 (aarch64_dr_state_remove_one_point): Likewise.
4494 (aarch64_handle_breakpoint): Likewise.
4495 (aarch64_handle_aligned_watchpoint): Likewise.
4496 (aarch64_handle_unaligned_watchpoint): Likewise.
4497 (aarch64_handle_watchpoint): Likewise.
4498
c67ca4de
YQ
44992015-07-17 Yao Qi <yao.qi@linaro.org>
4500
4501 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4502 and don't aarch64_get_debug_reg_state. All callers update.
4503 (aarch64_handle_aligned_watchpoint): Likewise.
4504 (aarch64_handle_unaligned_watchpoint): Likewise.
4505 (aarch64_handle_watchpoint): Likewise.
4506 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4507 (aarch64_remove_point): Likewise.
4508
25abf979
YQ
45092015-07-17 Yao Qi <yao.qi@linaro.org>
4510
4511 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4512 debug_printf.
4513 (aarch64_handle_unaligned_watchpoint): Likewise.
4514
db1ff28b
JK
45152015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4516
4517 Revert the previous 3 commits:
4518 Move gdb_regex* to common/
4519 Move linux_find_memory_regions_full & co.
4520 gdbserver build-id attribute generator
4521
700ca40f
JK
45222015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4523 Jan Kratochvil <jan.kratochvil@redhat.com>
4524
4525 gdbserver build-id attribute generator.
4526 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4527 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4528 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4529 (find_phdr): New.
4530 (get_dynamic): Use find_pdhr to traverse program headers.
4531 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4532 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4533 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4534 (get_hex_build_id): New.
4535 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4536 to reply XML document.
4537
9904185c
JK
45382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4539 Jan Kratochvil <jan.kratochvil@redhat.com>
4540
4541 * target.c: Include target/target-utils.h and fcntl.h.
4542 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4543 (target_fileio_read_stralloc): New functions.
4544
6e5b4429
JK
45452015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4546
4547 * Makefile.in (OBS): Add gdb_regex.o.
4548 (gdb_regex.o): New.
4549 * config.in: Rebuilt.
4550 * configure: Rebuilt.
4551
ddc98fbf
JK
45522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4553 Jan Kratochvil <jan.kratochvil@redhat.com>
4554
4555 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4556 * Makefile.in (OBS): Add target-utils.o.
4557 (linux-maps.o, target-utils.o): New.
4558 * configure.srv (srv_linux_obj): Add linux-maps.o.
4559
e57bb7a0
PL
45602015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4561
4562 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4563 function, return 1.
4564 (the_low_target): Install it.
4565
586b02a9
PA
45662015-07-14 Pedro Alves <palves@redhat.com>
4567
4568 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4569 Instead, ignore ECHILD, and throw an error for other errnos.
4570
58c1b36c
PA
45712015-07-10 Pedro Alves <palves@redhat.com>
4572
4573 * event-loop.c (struct callback_event) <data>: Change type to
4574 gdb_client_data instance instead of gdb_client_data pointer.
4575 (append_callback_event): Adjust.
4576
421530db
PL
45772015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4578
4579 * linux-aarch64-low.c: Add comments for each linux_target_ops
4580 method. Remove comments already covered in target_ops and
4581 linux_target_ops definitions.
4582 (the_low_target): Add comments for each unimplemented method.
4583
c2d65f38
YQ
45842015-07-09 Yao Qi <yao.qi@linaro.org>
4585
4586 * linux-aarch64-low.c (aarch64_regmap): Remove.
4587 (aarch64_usrregs_info): Remove.
4588 (regs_info): Set field usrregs to NULL.
4589
b20a6524
MM
45902015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4591
4592 * linux-low.c: Include "rsp-low.h"
4593 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4594 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4595 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4596 (handle_btrace_enable_pt): New.
4597 (handle_btrace_general_set): Support "pt".
4598 (handle_btrace_conf_general_set): Support "pt:size".
4599
96c97461
PL
46002015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4601
4602 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4603 Z_PACKET_SW_BP.
4604
37d66942
PL
46052015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4606
4607 * linux-aarch64-low.c: Remove comment about endianness.
4608 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4609 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4610 memcmp.
4611
dc06243f
GB
46122015-06-24 Gary Benson <gbenson@redhat.com>
4613
4614 * linux-i386-ipa.c (stdint.h): Do not include.
4615 * lynx-i386-low.c (stdint.h): Likewise.
4616 * lynx-ppc-low.c (stdint.h): Likewise.
4617 * mem-break.c (stdint.h): Likewise.
4618 * thread-db.c (stdint.h): Likewise.
4619 * tracepoint.c (stdint.h): Likewise.
4620 * win32-low.c (stdint.h): Likewise.
4621
124e13d9
SM
46222015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4623
4624 * server.c (write_qxfer_response): Update call to
4625 remote_escape_output.
4626
909c2cda
JK
46272015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4628 Jan Kratochvil <jan.kratochvil@redhat.com>
4629
4630 Merge multiple hex conversions.
4631 * gdbreplay.c (tohex): Rename to 'fromhex'.
4632 (logchar): Use fromhex.
4633
24c05f46
JK
46342015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4635
4636 * server.c (handle_qxfer_libraries): Set `version' attribute for
4637 <library-list>.
4638
14d2069a
GB
46392015-06-10 Gary Benson <gbenson@redhat.com>
4640
4641 * target.h (struct target_ops) <multifs_open>: New field.
4642 <multifs_unlink>: Likewise.
4643 <multifs_readlink>: Likewise.
4644 * linux-low.c (nat/linux-namespaces.h): New include.
4645 (linux_target_ops): Initialize the_target->multifs_open,
4646 the_target->multifs_unlink and the_target->multifs_readlink.
4647 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4648 * hostio.c (hostio_fs_pid): New static variable.
4649 (hostio_handle_new_gdb_connection): New function.
4650 (handle_setfs): Likewise.
4651 (handle_open): Use the_target->multifs_open as appropriate.
4652 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4653 (handle_readlink): Use the_target->multifs_readlink as
4654 appropriate.
4655 (handle_vFile): Handle vFile:setfs packets.
4656 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4657 after target_handle_new_gdb_connection.
4658
4b8b5e72
GB
46592015-06-10 Gary Benson <gbenson@redhat.com>
4660
4661 * configure.ac (AC_CHECK_FUNCS): Add setns.
4662 * config.in: Regenerate.
4663 * configure: Likewise.
4664 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4665 (linux-namespaces.o): New rule.
4666 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4667
3ac2e371
GB
46682015-06-09 Gary Benson <gbenson@redhat.com>
4669
4670 * hostio.c (handle_open): Process mode argument with
4671 fileio_to_host_mode.
4672
ca9b78ce
YQ
46732015-06-01 Yao Qi <yao.qi@linaro.org>
4674
4675 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4676 * linux-x86-low.c: Likewise.
4677
bfacd19d
DB
46782015-05-28 Don Breazeal <donb@codesourcery.com>
4679
4680 * linux-low.c (handle_extended_wait): Initialize
4681 thread_info.last_resume_kind for new fork children.
4682
452003ef
PA
46832015-05-15 Pedro Alves <palves@redhat.com>
4684
4685 * target.h (target_handle_new_gdb_connection): Rewrite using if
4686 wrapped in do/while.
4687
1041a03c
JB
46882015-05-14 Joel Brobecker <brobecker@adacore.com>
4689
4690 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4691 * configure, config.in: Regenerate.
4692 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4693 Declare typedef.
4694
c269dbdb
DB
46952015-05-12 Don Breazeal <donb@codesourcery.com>
4696
4697 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4698 PTRACE_EVENT_VFORK_DONE.
4699 (linux_low_ptrace_options, extended_event_reported): Add vfork
4700 events.
4701 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4702 and "vforkdone" for RSP 'T' Stop Reply Packet.
4703 * server.h (report_vfork_events): Declare
4704 global variable.
4705
3a8a0396
DB
47062015-05-12 Don Breazeal <donb@codesourcery.com>
4707
4708 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4709 (the_low_target) <new_fork>: Initialize new member.
4710 * linux-arm-low.c (arm_new_fork): New function.
4711 (the_low_target) <new_fork>: Initialize new member.
4712 * linux-low.c (handle_extended_wait): Call new target function
4713 new_fork.
4714 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4715 * linux-mips-low.c (mips_add_watchpoint): New function
4716 extracted from mips_insert_point.
4717 (the_low_target) <new_fork>: Initialize new member.
4718 (mips_linux_new_fork): New function.
4719 (mips_insert_point): Call mips_add_watchpoint.
4720 * linux-x86-low.c (x86_linux_new_fork): New function.
4721 (the_low_target) <new_fork>: Initialize new member.
4722
de0d863e
DB
47232015-05-12 Don Breazeal <donb@codesourcery.com>
4724
4725 * linux-low.c (handle_extended_wait): Implement return value,
4726 rename argument 'event_child' to 'event_lwp', handle
4727 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4728 (linux_low_ptrace_options): New function.
4729 (linux_low_filter_event): Call linux_low_ptrace_options,
4730 use different argument fo linux_enable_event_reporting,
4731 use return value from handle_extended_wait.
4732 (extended_event_reported): New function.
4733 (linux_wait_1): Call extended_event_reported and set
4734 status to report fork events.
4735 (linux_write_memory): Add pid to debug message.
4736 (reset_lwp_ptrace_options_callback): New function.
4737 (linux_handle_new_gdb_connection): New function.
4738 (linux_target_ops): Initialize new structure member.
4739 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4740 * lynx-low.c: Initialize new structure member.
4741 * remote-utils.c (prepare_resume_reply): Implement stop reason
4742 "fork" for "T" stop message.
4743 * server.c (handle_query): Call handle_new_gdb_connection.
4744 * server.h (report_fork_events): Declare global flag.
4745 * target.h (struct target_ops) <handle_new_gdb_connection>:
4746 New member.
4747 (target_handle_new_gdb_connection): New macro.
4748 * win32-low.c: Initialize new structure member.
4749
ddcbc397
DB
47502015-05-12 Don Breazeal <donb@codesourcery.com>
4751
4752 * mem-break.c (APPEND_TO_LIST): Define macro.
4753 (clone_agent_expr): New function.
4754 (clone_one_breakpoint): New function.
4755 (clone_all_breakpoints): New function.
4756 * mem-break.h: Declare new functions.
4757
89245bc0
DB
47582015-05-12 Don Breazeal <donb@codesourcery.com>
4759
4760 * linux-low.c (linux_supports_fork_events): New function.
4761 (linux_supports_vfork_events): New function.
4762 (linux_target_ops): Initialize new structure members.
4763 (initialize_low): Call linux_check_ptrace_features.
4764 * lynx-low.c (lynx_target_ops): Initialize new structure
4765 members.
4766 * server.c (report_fork_events, report_vfork_events):
4767 New global flags.
4768 (handle_query): Add new features to qSupported packet and
4769 response.
4770 (captured_main): Initialize new global variables.
4771 * target.h (struct target_ops) <supports_fork_events>:
4772 New member.
4773 <supports_vfork_events>: New member.
4774 (target_supports_fork_events): New macro.
4775 (target_supports_vfork_events): New macro.
4776 * win32-low.c (win32_target_ops): Initialize new structure
4777 members.
4778
835205d0
GB
47792015-05-12 Gary Benson <gbenson@redhat.com>
4780
4781 * server.c (handle_qxfer_exec_file): Use current process
4782 if annex is empty.
4783
21e94bd9
SL
47842015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4785
4786 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4787 Remove HAVE_PTRACE_GETREGS conditionals.
4788 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4789 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4790
45614f15
YQ
47912015-05-08 Yao Qi <yao.qi@linaro.org>
4792
4793 * linux-low.c (linux_supports_conditional_breakpoints): New
4794 function.
4795 (linux_target_ops): Install new target method.
4796 * lynx-low.c (lynx_target_ops): Install NULL hook for
4797 supports_conditional_breakpoints.
4798 * nto-low.c (nto_target_ops): Likewise.
4799 * spu-low.c (spu_target_ops): Likewise.
4800 * win32-low.c (win32_target_ops): Likewise.
4801 * server.c (handle_query): Check
4802 target_supports_conditional_breakpoints.
4803 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4804 New field.
4805 (target_supports_conditional_breakpoints): New macro.
4806
80ad801e
PA
48072015-05-06 Pedro Alves <palves@redhat.com>
4808
4809 PR server/18081
4810 * server.c (start_inferior): If the process exits, mourn it.
4811
819843c7
GB
48122015-04-21 Gary Benson <gbenson@redhat.com>
4813
4814 * hostio.c (fileio_open_flags_to_host): Factored out to
4815 fileio_to_host_openflags in common/fileio.c. Single use
4816 updated.
4817
a2d5a9d7
MF
48182015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4819
4820 * linux-xtensa-low.c (xtensa_fill_gregset)
4821 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4822 XCHAL_HAVE_LOOP.
4823
deb44829
MF
48242015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4825
4826 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4827 (regs_info): Replace usrregs pointer with NULL.
4828
e57f1de3
GB
48292015-04-17 Gary Benson <gbenson@redhat.com>
4830
4831 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4832 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4833 * server.c (handle_qxfer_exec_file): New function.
4834 (qxfer_packets): Add exec-file entry.
4835 (handle_query): Report qXfer:exec-file:read as supported packet.
4836
62828379
RN
48372015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4838
4839 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4840
b88bb450
GB
48412015-04-09 Gary Benson <gbenson@redhat.com>
4842
4843 * hostio-errno.c (errno_to_fileio_error): Remove function.
4844 Update caller to use remote_fileio_to_fio_error.
4845
c8f4bfdd
YQ
48462015-04-09 Yao Qi <yao.qi@linaro.org>
4847
4848 * linux-low.c (linux_insert_point): Call
4849 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4850 (linux_remove_point): Call remove_memory_breakpoint if type is
4851 raw_bkpt_type_sw.
4852 * linux-x86-low.c (x86_insert_point): Don't call
4853 insert_memory_breakpoint.
4854 (x86_remove_point): Don't call remove_memory_breakpoint.
4855
41f98f02
PA
48562015-04-01 Pedro Alves <palves@redhat.com>
4857 Cleber Rosa <crosa@redhat.com>
4858
4859 * server.c (gdbserver_usage): Reorganize and extend the usage
4860 message.
4861
2bf6fb9d
PA
48622015-03-24 Pedro Alves <palves@redhat.com>
4863
4864 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4865 output. Also dump TRAP_TRACE.
4866 (linux_low_filter_event): In debug output, distinguish a
4867 resume_stop SIGSTOP from a delayed SIGSTOP.
4868
369f6daa
GB
48692015-03-24 Gary Benson <gbenson@redhat.com>
4870
4871 * linux-x86-low.c (x86_linux_new_thread): Moved to
4872 nat/x86-linux.c.
4873 (x86_linux_prepare_to_resume): Likewise.
4874
8e5d4070
GB
48752015-03-24 Gary Benson <gbenson@redhat.com>
4876
4877 * Makefile.in (x86-linux-dregs.o): New rule.
4878 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4879 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4880 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4881 (x86_linux_dr_get): Likewise.
4882 (x86_linux_dr_set): Likewise.
4883 (update_debug_registers_callback): Likewise.
4884 (x86_linux_dr_set_addr): Likewise.
4885 (x86_linux_dr_get_addr): Likewise.
4886 (x86_linux_dr_set_control): Likewise.
4887 (x86_linux_dr_get_control): Likewise.
4888 (x86_linux_dr_get_status): Likewise.
4889 (x86_linux_update_debug_registers): Likewise.
4890
2b95d440
GB
48912015-03-24 Gary Benson <gbenson@redhat.com>
4892
4893 * linux-x86-low.c (x86_linux_update_debug_registers):
4894 New function, factored out from...
4895 (x86_linux_prepare_to_resume): ...this.
4896
14b0bc68
GB
48972015-03-24 Gary Benson <gbenson@redhat.com>
4898
4899 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4900 (x86_linux_dr_set): Likewise.
4901 (update_debug_registers_callback): Likewise.
4902 (x86_linux_dr_set_addr): Likewise.
4903 (x86_linux_dr_get_addr): Likewise.
4904 (x86_linux_dr_set_control): Likewise.
4905 (x86_linux_dr_get_control): Likewise.
4906 (x86_linux_dr_get_status): Likewise.
4907 (x86_linux_prepare_to_resume): Likewise.
4908
5dfe6ca8
GB
49092015-03-24 Gary Benson <gbenson@redhat.com>
4910
4911 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4912 Use perror_with_name. Pass string through gettext.
4913 (x86_linux_dr_set): Likewise.
4914
d33472ad
GB
49152015-03-24 Gary Benson <gbenson@redhat.com>
4916
4917 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4918 (x86_linux_dr_set_addr): ...this.
4919 (x86_dr_low_get_addr): Rename to...
4920 (x86_linux_dr_get_addr): ...this.
4921 (x86_dr_low_set_control): Rename to...
4922 (x86_linux_dr_set_control): ...this.
4923 (x86_dr_low_get_control): Rename to...
4924 (x86_linux_dr_get_control): ...this.
4925 (x86_dr_low_get_status): Rename to...
4926 (x86_linux_dr_get_status): ...this.
4927 (x86_dr_low): Update with new function names.
4928
4b134ca1
GB
49292015-03-24 Gary Benson <gbenson@redhat.com>
4930
4931 * Makefile.in (x86-linux.o): New rule.
4932 * configure.srv: Add x86-linux.o to relevant targets.
4933 * linux-low.c (lwp_set_arch_private_info): New function.
4934 (lwp_arch_private_info): Likewise.
4935 * linux-x86-low.c: Include nat/x86-linux.h.
4936 (arch_lwp_info): Removed structure.
4937 (update_debug_registers_callback):
4938 Use lwp_set_debug_registers_changed.
4939 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4940 and lwp_set_debug_registers_changed.
4941 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4942
34c703da
GB
49432015-03-24 Gary Benson <gbenson@redhat.com>
4944
4945 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4946 * linux-arm-low.c (arm_new_thread): Likewise.
4947 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4948 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4949 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4950 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4951
cff068da
GB
49522015-03-24 Gary Benson <gbenson@redhat.com>
4953
4954 * linux-low.c (ptid_of_lwp): New function.
4955 (lwp_is_stopped): Likewise.
4956 (lwp_stop_reason): Likewise.
4957 * linux-x86-low.c (update_debug_registers_callback):
4958 Use lwp_is_stopped.
4959 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4960 lwp_stop_reason.
4961
b2f7c7e8
GB
49622015-03-24 Gary Benson <gbenson@redhat.com>
4963
4964 * linux-low.h (linux_stop_lwp): Remove declaration.
4965
6d4ee8c6
GB
49662015-03-24 Gary Benson <gbenson@redhat.com>
4967
4968 * linux-low.h: Include nat/linux-nat.h.
4969 * linux-low.c (iterate_over_lwps_args): New structure.
4970 (iterate_over_lwps_filter): New function.
4971 (iterate_over_lwps): Likewise.
4972 * linux-x86-low.c (update_debug_registers_callback):
4973 Update signature to what iterate_over_lwps expects.
4974 Remove PID check that iterate_over_lwps now performs.
4975 (x86_dr_low_set_addr): Use iterate_over_lwps.
4976 (x86_dr_low_set_control): Likewise.
4977
70a0bb6b
GB
49782015-03-24 Gary Benson <gbenson@redhat.com>
4979
4980 * linux-x86-low.c (x86_debug_reg_state): New function.
4981 (x86_linux_prepare_to_resume): Use the above.
4982
7b669087
GB
49832015-03-24 Gary Benson <gbenson@redhat.com>
4984
4985 * linux-low.c (current_lwp_ptid): New function.
4986 * linux-x86-low.c: Include nat/linux-nat.h.
4987 (x86_dr_low_get_addr): Use current_lwp_ptid.
4988 (x86_dr_low_get_control): Likewise.
4989 (x86_dr_low_get_status): Likewise.
4990
eef49a3d
PA
49912015-03-20 Pedro Alves <palves@redhat.com>
4992
4993 * tracepoint.c (cmd_qtstatus): Make "str" const.
4994
b2333d22
PA
49952015-03-20 Pedro Alves <palves@redhat.com>
4996
4997 * server.c (handle_general_set): Make "req_str" const.
4998
23f238d3
PA
49992015-03-19 Pedro Alves <palves@redhat.com>
5000
5001 * linux-low.c (linux_resume_one_lwp): Rename to ...
5002 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5003 instead call perror_with_name.
5004 (check_ptrace_stopped_lwp_gone): New function.
5005 (linux_resume_one_lwp): Reimplement as wrapper around
5006 linux_resume_one_lwp_throw that swallows errors if the LWP is
5007 gone.
5008
91baf43f
PA
50092015-03-19 Pedro Alves <palves@redhat.com>
5010
5011 * linux-low.c (count_events_callback, select_event_lwp_callback):
5012 No longer check whether the thread has resume_stop as last resume
5013 kind.
5014
8bf3b159
PA
50152015-03-19 Pedro Alves <palves@redhat.com>
5016
5017 * linux-low.c (count_events_callback, select_event_lwp_callback):
5018 Use the lwp's status_pending_p field, not the thread's.
5019
b90fc188
PA
50202015-03-19 Pedro Alves <palves@redhat.com>
5021
5022 * linux-low.c (select_event_lwp_callback): Update comments to
5023 no longer mention SIGTRAP.
5024
464b0089
GB
50252015-03-18 Gary Benson <gbenson@redhat.com>
5026
5027 * server.c (handle_query): Do not report vFile:fstat as supported.
5028
aa9e327f
GB
50292015-03-11 Gary Benson <gbenson@redhat.com>
5030
5031 * hostio.c (sys/types.h): New include.
5032 (sys/stat.h): Likewise.
5033 (common-remote-fileio.h): Likewise.
5034 (handle_fstat): New function.
5035 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5036
791c0056
GB
50372015-03-11 Gary Benson <gbenson@redhat.com>
5038
5039 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5040 struct stat.st_blocks and struct stat.st_blksize.
5041 * configure: Regenerate.
5042 * config.in: Likewise.
5043 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5044 (OBS): Add common-remote-fileio.o.
5045 (common-remote-fileio.o): New rule.
5046
9a9df970
PA
50472015-03-09 Pedro Alves <palves@redhat.com>
5048
5049 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5050 'struct sockaddr' pointer in 'accept' call.
5051
9eb1356e
PA
50522015-03-09 Pedro Alves <palves@redhat.com>
5053
5054 Revert:
5055 2015-03-07 Pedro Alves <palves@redhat.com>
5056 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5057 or <winsock2.h> here. Instead include "gdb_socket.h".
5058 (remote_open): Use union gdb_sockaddr_u.
5059 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5060 or <winsock2.h> here. Instead include "gdb_socket.h".
5061 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5062 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5063 or <sys/un.h>.
5064 (init_named_socket, gdb_agent_helper_thread): Use union
5065 gdb_sockaddr_u.
5066
aac331e4
PA
50672015-03-07 Pedro Alves <palves@redhat.com>
5068
5069 * configure.ac (build_warnings): Move
5070 -Wdeclaration-after-statement to the C-specific set.
5071 * configure: Regenerate.
5072
366c75fc
PA
50732015-03-07 Pedro Alves <palves@redhat.com>
5074
5075 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5076 or <winsock2.h> here. Instead include "gdb_socket.h".
5077 (remote_open): Use union gdb_sockaddr_u.
5078 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5079 or <winsock2.h> here. Instead include "gdb_socket.h".
5080 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5081 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5082 or <sys/un.h>.
5083 (init_named_socket, gdb_agent_helper_thread): Use union
5084 gdb_sockaddr_u.
5085
492d29ea
PA
50862015-03-07 Pedro Alves <palves@redhat.com>
5087
5088 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5089 instead.
5090
60a191ed
YQ
50912015-03-06 Yao Qi <yao.qi@linaro.org>
5092
5093 * linux-aarch64-low.c (aarch64_insert_point): Use
5094 show_debug_regs as a boolean.
5095 (aarch64_remove_point): Likewise.
5096
f5771b1d
PA
50972015-03-05 Pedro Alves <palves@redhat.com>
5098
5099 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5100 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5101 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5102 * nto-low.c (nto_target_ops): Likewise.
5103 * spu-low.c (spu_target_ops): Likewise.
5104 * win32-low.c (win32_target_ops): Likewise.
5105
3e572f71
PA
51062015-03-04 Pedro Alves <palves@redhat.com>
5107
72f4393d 5108 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5109 Decide whether a breakpoint triggered based on the SIGTRAP's
5110 siginfo.si_code.
72f4393d
L
5111 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5112 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5113 (linux_low_filter_event): Check for breakpoints before checking
5114 watchpoints.
5115 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5116 siginfo.si_code.
72f4393d
L
5117 (linux_stopped_by_sw_breakpoint)
5118 (linux_supports_stopped_by_sw_breakpoint)
5119 (linux_stopped_by_hw_breakpoint)
5120 (linux_supports_stopped_by_hw_breakpoint): New functions.
5121 (linux_target_ops): Install new target methods.
3e572f71 5122
1ec68e26
PA
51232015-03-04 Pedro Alves <palves@redhat.com>
5124
5125 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5126 * server.c (swbreak_feature, hwbreak_feature): New globals.
5127 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5128 (captured_main): Clear swbreak_feature and hwbreak_feature.
5129 * server.h (swbreak_feature, hwbreak_feature): Declare.
5130 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5131 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5132 supports_stopped_by_hw_breakpoint>: New fields.
5133 (target_supports_stopped_by_sw_breakpoint)
5134 (target_stopped_by_sw_breakpoint)
5135 (target_supports_stopped_by_hw_breakpoint)
5136 (target_stopped_by_hw_breakpoint): Declare.
5137
15c66dd6
PA
51382015-03-04 Pedro Alves <palves@redhat.com>
5139
5140 enum lwp_stop_reason -> enum target_stop_reason
5141 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5142 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5143 (linux_wait_1, stuck_in_jump_pad_callback)
5144 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5145 (linux_stopped_by_watchpoint):
5146 * linux-low.h (enum lwp_stop_reason): Delete.
5147 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5148 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5149
98fc70d6
YQ
51502015-03-04 Yao Qi <yao.qi@linaro.org>
5151
5152 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5153
dd2ac174
GB
51542015-03-03 Gary Benson <gbenson@redhat.com>
5155
5156 * hostio.c (handle_vFile): Fix prefix lengths.
5157
d68e53f4
MM
51582015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5159
5160 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5161 ptr_bits.
5162
bf2d68ab
AA
51632015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5164
5165 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5166 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5167 (clean): Add "rm -f" for above C files.
5168 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5169 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5170 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5171 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5172 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5173 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5174 (init_registers_s390x_vx_linux64)
5175 (init_registers_s390x_tevx_linux64)
5176 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5177 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5178 declarations.
5179 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5180 (s390_store_vxrs_high): New functions.
5181 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5182 NT_S390_VXRS_HIGH.
5183 (s390_arch_setup): Add logic for selecting one of the new target
5184 descriptions. Activate the new vector regsets if applicable.
5185 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5186 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5187 and init_registers_s390x_tevx_linux64.
5188
c966a859
PA
51892015-03-01 Pedro Alves <palves@redhat.com>
5190
5191 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5192 parameter.
5193
4180215b
PA
51942015-02-27 Pedro Alves <palves@redhat.com>
5195
5196 * linux-x86-low.c (u_debugreg_offset): New function.
5197 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5198
749bab01
PA
51992015-02-27 Pedro Alves <palves@redhat.com>
5200
5201 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5202 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5203 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5204 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5205 (ps_lsetfpregs, ps_getpid)
5206 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5207 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5208 (ps_lsetxregs, ps_plog): Declare.
5209
3c14e5a3
PA
52102015-02-27 Pedro Alves <palves@redhat.com>
5211
5212 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5213 IP_AGENT_EXPORT_FUNC.
5214 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5215 IP_AGENT_EXPORT_FUNC.
5216 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5217 (IP_AGENT_EXPORT): Delete.
5218 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5219 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5220 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5221 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5222 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5223 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5224 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5225 (traceframe_read_count, traceframe_write_count)
5226 (traceframes_created, trace_state_variables, get_raw_reg)
5227 (get_trace_state_variable_value, set_trace_state_variable_value)
5228 (ust_loaded, helper_thread_id, cmd_buf): Use
5229 IPA_SYM_EXPORTED_NAME.
5230 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5231 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5232 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5233 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5234 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5235 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5236 EXTERN_C_PUSH/EXTERN_C_POP.
5237 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5238 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5239 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5240 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5241 (traceframe_write_count, traceframe_read_count)
5242 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5243 (about_to_request_buffer_space, get_trace_state_variable_value)
5244 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5245 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5246 EXTERN_C_PUSH/EXTERN_C_POP.
5247 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5248 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5249 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5250 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5251 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5252 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5253 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5254 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5255 Define.
5256 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5257 (IP_AGENT_EXPORT_VAR_DECL): Define.
5258 (tracing): Declare.
5259 (gdb_agent_get_raw_reg): Declare.
5260
fe978cb0
PA
52612015-02-27 Tom Tromey <tromey@redhat.com>
5262 Pedro Alves <palves@redhat.com>
5263
5264 Rename symbols whose names are reserved C++ keywords throughout.
5265
3bc3d82a
PA
52662015-02-27 Pedro Alves <palves@redhat.com>
5267
5268 * Makefile.in (COMPILER): New, get it from autoconf.
5269 (CXX): Get from autoconf instead.
5270 (COMPILE.pre): Use COMPILER.
5271 (CC-LD): Rename to ...
5272 (CC_LD): ... this. Use COMPILER.
5273 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5274 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5275 * acinclude.m4: Include build-with-cxx.m4.
5276 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5277 Disable -Werror by default if building in C++ mode.
5278 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5279 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5280 the C++ compiler. Save/restore CXXFLAGS too.
5281 * configure: Regenerate.
5282
07697489
PA
52832015-02-27 Pedro Alves <palves@redhat.com>
5284
5285 * acinclude.m4: Include libiberty.m4.
5286 * configure.ac: Call libiberty_INIT.
5287 * config.in, configure: Regenerate.
5288
9beb7c4e
PA
52892015-02-26 Pedro Alves <palves@redhat.com>
5290
5291 * linux-low.c (linux_wait_1): When incrementing the PC past a
5292 program breakpoint always use the_low_target.breakpoint_len as
5293 increment, rather than the maximum between that and
5294 the_low_target.decr_pc_after_break.
5295
8090aef2
PA
52962015-02-23 Pedro Alves <palves@redhat.com>
5297
5298 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5299 thread was doing a step-over; always adjust the PC if
5300 we stepped over a permanent breakpoint.
5301 (linux_wait_1): If we stepped over breakpoint that was on top of a
5302 permanent breakpoint, manually advance the PC past it.
5303
bc9540e8
PA
53042015-02-23 Pedro Alves <palves@redhat.com>
5305
5306 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5307 modes.
5308 (x86_fill_gregset, x86_store_gregset): Use it when handling
5309 $orig_eax.
5310
2db9a427
PA
53112015-02-20 Pedro Alves <palves@redhat.com>
5312
5313 * thread-db.c: Include "nat/linux-procfs.h".
5314 (thread_db_init): Skip listing new threads if the kernel supports
5315 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5316
afa8d396
PA
53172015-02-20 Pedro Alves <palves@redhat.com>
5318
5319 * linux-low.c (status_pending_p_callback): Use ptid_match.
5320
c9587f88
AT
53212015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5322
5323 PR breakpoints/16812
5324 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5325 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5326 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5327
b05ec7a5
AT
53282015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5329
5330 PR breakpoints/15956
5331 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5332
d33501a5
MM
53332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5334
5335 * linux-low.c (linux_low_btrace_conf): Print size.
5336 * server.c (handle_btrace_conf_general_set): New.
5337 (hanle_general_set): Call handle_btrace_conf_general_set.
5338 (handle_query): Report Qbtrace-conf:bts:size as supported.
5339
f4abbc16
MM
53402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5341
5342 * linux-low.c (linux_low_enable_btrace): Update parameters.
5343 (linux_low_btrace_conf): New.
5344 (linux_target_ops)<to_btrace_conf>: Initialize.
5345 * server.c (current_btrace_conf): New.
5346 (handle_btrace_enable): Rename to ...
5347 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5348 to target_enable_btrace. Update comment. Update users.
5349 (handle_qxfer_btrace_conf): New.
5350 (qxfer_packets): Add btrace-conf entry.
5351 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5352 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5353 (target_ops)<read_btrace_conf>: New.
5354 (target_enable_btrace): Update parameters.
5355 (target_read_btrace_conf): New.
5356
043c3577
MM
53572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5358
5359 * server.c (handle_btrace_general_set): Remove call to
5360 target_supports_btrace.
5361 (supported_btrace_packets): New.
5362 (handle_query): Call supported_btrace_packets.
5363 * target.h: include btrace-common.h.
5364 (btrace_target_info): Removed.
5365 (supports_btrace, target_supports_btrace): Update parameters.
5366
734b0e4b
MM
53672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5368
5369 * Makefile.in (SFILES): Add common/btrace-common.c.
5370 (OBS): Add common/btrace-common.o.
5371 (btrace-common.o): Add build rules.
5372 * linux-low: Include btrace-common.h.
5373 (linux_low_read_btrace): Use struct btrace_data. Call
5374 btrace_data_init and btrace_data_fini.
5375
d6c146e9
PA
53762015-02-06 Pedro Alves <palves@redhat.com>
5377
5378 * thread-db.c (find_new_threads_callback): Add debug output.
5379
20ba1ce6
PA
53802015-02-04 Pedro Alves <palves@redhat.com>
5381
5382 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5383 (resume_stopped_resumed_lwps): New function.
5384 (linux_wait_for_event_filtered): Use it.
5385
8cc73a39
SDJ
53862015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5387
5388 * Makefile.in (SFILES): Add linux-personality.c.
5389 (linux-personality.o): New rule.
5390 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5391 list of objects to be built.
5392 * linux-low.c: Include nat/linux-personality.h.
5393 (linux_create_inferior): Remove code to disable address space
5394 randomization (moved to ../nat/linux-personality.c). Create
5395 cleanup to disable address space randomization.
5396
fb23d554
SDJ
53972015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5398
5399 * Makefile.in (posix-strerror.o): New rule.
5400 (mingw-strerror.o): Likewise.
5401 * configure: Regenerated.
5402 * configure.ac: Source file ../common/common.host. Initialize new
5403 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5404
cdf43629
YQ
54052015-01-14 Yao Qi <yao@codesourcery.com>
5406
5407 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5408 (ppc-linux.o): New rule.
5409 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5410 * configure.ac: AC_CHECK_FUNCS(getauxval).
5411 * config.in: Re-generated.
5412 * configure: Re-generated.
5413 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5414 ppc64_64bit_inferior_p
5415
514c5338
YQ
54162015-01-14 Yao Qi <yao@codesourcery.com>
5417
5418 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5419 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5420 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5421 (PT_ORIG_R3, PT_TRAP): Likewise.
5422 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5423 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5424 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5425
3368c1e5
JB
54262015-01-10 Joel Brobecker <brobecker@adacore.com>
5427
5428 * i387-fp.c (i387_cache_to_xsave): In look over
5429 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5430 zmmh_low_space field by use of zmmh_high_space.
5431
582511be
PA
54322015-01-09 Pedro Alves <palves@redhat.com>
5433
5434 * linux-low.c (step_over_bkpt): Move higher up in the file.
5435 (handle_extended_wait): Don't store the stop_pc here.
5436 (get_stop_pc): Adjust comments and rename to ...
5437 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5438 stopped for a software breakpoint or hardware breakpoint.
5439 (thread_still_has_status_pending_p): New function.
5440 (status_pending_p_callback): Use
5441 thread_still_has_status_pending_p. If the event is no longer
5442 interesting, resume the LWP.
5443 (handle_tracepoints): Add assert.
5444 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5445 (wstatus_maybe_breakpoint): New function.
5446 (cancel_breakpoint): Delete function.
5447 (check_stopped_by_watchpoint): New function, factored out from
5448 linux_low_filter_event.
5449 (lp_status_maybe_breakpoint): Delete function.
5450 (linux_low_filter_event): Remove filter_ptid argument.
5451 Leave thread group exits pending here. Store the LWP's stop PC.
5452 Always leave events pending.
5453 (linux_wait_for_event_filtered): Pull all events out of the
5454 kernel, and leave them all pending.
5455 (count_events_callback, select_event_lwp_callback): Consider all
5456 events.
5457 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5458 (select_event_lwp): Only give preference to the stepping LWP in
5459 all-stop mode. Adjust comments.
5460 (ignore_event): New function.
5461 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5462 references to cancel_breakpoints. Adjust to renames. Also give
5463 equal priority to all LWPs that have had events in non-stop mode.
5464 If reporting a software breakpoint event, unadjust the LWP's PC.
5465 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5466 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5467 Adjust.
5468 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5469 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5470 (linux_stopped_by_watchpoint): Adjust.
5471 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5472 * linux-low.h (enum lwp_stop_reason): New.
5473 (struct lwp_info) <stop_pc>: Adjust comment.
5474 <stopped_by_watchpoint>: Delete field.
5475 <stop_reason>: New field.
5476 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5477 * mem-break.c (software_breakpoint_inserted_here)
5478 (hardware_breakpoint_inserted_here): New function.
5479 * mem-break.h (software_breakpoint_inserted_here)
5480 (hardware_breakpoint_inserted_here): Declare.
5481 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5482 (cancel_breakpoints): Delete.
5483 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5484 (upload_fast_traceframes): Remove references to
5485 cancel_breakpoints.
5486
a33e3959
PA
54872015-01-09 Pedro Alves <palves@redhat.com>
5488
5489 * thread-db.c (find_new_threads_callback): Ignore thread if the
5490 kernel thread ID is -1.
5491
8784d563
PA
54922015-01-09 Pedro Alves <palves@redhat.com>
5493
5494 * linux-low.c (linux_attach_fail_reason_string): Move to
5495 nat/linux-ptrace.c, and rename.
5496 (linux_attach_lwp): Update comment.
5497 (attach_proc_task_lwp_callback): New function.
5498 (linux_attach): Adjust to rename and use
5499 linux_proc_attach_tgid_threads.
5500 (linux_attach_fail_reason_string): Delete declaration.
5501
76f2b779
JB
55022015-01-01 Joel Brobecker <brobecker@adacore.com>
5503
5504 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5505 * server.c (gdbserver_version): Likewise.
5506
fafcc06a
SDJ
55072014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5508
5509 * remote-utils.c: Include ctype.h.
5510 (input_interrupt): Explicitly handle the case when the char
5511 received is the NUL byte. Improve the printing of non-ASCII
5512 characters.
5513
beed38b8
JB
55142014-12-16 Joel Brobecker <brobecker@adacore.com>
5515
5516 * linux-low.c (linux_low_filter_event): Update call to
5517 linux_enable_event_reporting following the addition of
5518 a new parameter to that function.
5519
bf330350
CU
55202014-12-16 Catalin Udma <catalin.udma@freescale.com>
5521
5522 PR server/17457
5523 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5524 (AARCH64_FPCR_REGNO): Likewise.
5525 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5526 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5527 (aarch64_store_fpregset): Likewise.
5528
5227d625
JB
55292014-12-15 Joel Brobecker <brobecker@adacore.com>
5530
5531 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5532 Remove FIXME comment about assumption about N.
5533
f93b65a0
JB
55342014-12-13 Joel Brobecker <brobecker@adacore.com>
5535
5536 * configure.ac: If large-file support is disabled in GDBserver,
5537 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5538 * configure: Regenerate.
5539
e5a9158d
AA
55402014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5541
5542 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5543 warning upon ENODATA from ptrace.
5544 * linux-s390-low.c (s390_store_tdb): New.
5545 (s390_regsets): Add regset for NT_S390_TDB.
5546
feea5f36
AA
55472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5548
5549 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5550 without a fill_function.
5551 * linux-s390-low.c (s390_fill_last_break): Remove.
5552 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5553 (s390_arch_setup): Use regset's size instead of fill_function for
5554 loop end condition.
5555
098dbe61
AA
55562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5557
5558 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5559 the regset's store function when ptrace returned an error.
5560 * regcache.c (get_thread_regcache): Invalidate register cache
5561 before fetching inferior's registers.
5562
28eef672
AA
55632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5564
5565 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5566 while-loop as for-loop.
5567 (regsets_store_inferior_registers): Likewise.
5568
bdca27a2
YQ
55692014-11-28 Yao Qi <yao@codesourcery.com>
5570
5571 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5572 * config.in, configure: Re-generate.
5573 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5574 is defined.
5575
9c232dda
YQ
55762014-11-21 Yao Qi <yao@codesourcery.com>
5577
5578 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5579 (AC_CHECK_HEADERS): Remove malloc.h.
5580 * configure: Re-generated.
5581 * config.in: Re-generated.
5582 * server.h: Don't include alloca.h and malloc.h.
5583 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5584 Don't include malloc.h.
5585
43968415
JB
55862014-11-17 Joel Brobecker <brobecker@adacore.com>
5587
5588 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5589 corresponding ERRNO check in same block.
5590
40e91bc7
PA
55912014-11-12 Pedro Alves <palves@redhat.com>
5592
5593 * server.c (cont_thread): Update comment.
5594 (start_inferior, attach_inferior): No longer clear cont_thread.
5595 (handle_v_cont): No longer set cont_thread.
5596 (captured_main): Clear cont_thread each time a GDB connects.
5597
c2c118cf
PA
55982014-11-12 Pedro Alves <palves@redhat.com>
5599
5600 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5601 thread, and don't resume all threads if the Hc thread has exited.
5602
78708b7c
PA
56032014-11-12 Pedro Alves <palves@redhat.com>
5604
5605 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5606 the process group instead of to a specific LWP.
5607
a2abc7de
PA
56082014-10-15 Pedro Alves <palves@redhat.com>
5609
5610 PR server/17487
5611 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5612 parameter.
5613 (arm_set_thread_context): Delete.
5614 (the_low_target): Adjust.
5615 * win32-i386-low.c (debug_registers_changed)
5616 (debug_registers_used): Delete.
5617 (update_debug_registers_callback): New function.
5618 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5619 needing to update their debug registers.
5620 (win32_get_current_dr): New function.
5621 (x86_dr_low_get_addr, x86_dr_low_get_control)
5622 (x86_dr_low_get_status): Fetch the debug register from the thread
5623 record's context.
5624 (i386_initial_stuff): Adjust.
5625 (i386_get_thread_context): Remove current_event parameter. Don't
5626 clear debug_registers_changed nor copy DR values to
5627 debug_reg_state.
5628 (i386_set_thread_context): Delete.
5629 (i386_prepare_to_resume): New function.
5630 (i386_thread_added): Mark the thread as needing to update irs
5631 debug registers.
5632 (the_low_target): Remove i386_set_thread_context and install
5633 i386_prepare_to_resume.
5634 * win32-low.c (win32_get_thread_context): Adjust.
5635 (win32_set_thread_context): Use SetThreadContext
5636 directly.
5637 (win32_prepare_to_resume): New function.
5638 (win32_require_context): New function, factored out from ...
5639 (thread_rec): ... this.
5640 (continue_one_thread): Call win32_prepare_to_resume on each thread
5641 we're about to continue.
5642 (win32_resume): Call win32_prepare_to_resume on the event thread.
5643 * win32-low.h (struct win32_thread_info)
5644 <debug_registers_changed>: New field.
5645 (struct win32_target_ops): Change prototype of set_thread_context,
5646 delete set_thread_context and add prepare_to_resume.
5647 (win32_require_context): New declaration.
5648
a442d071
GB
56492014-10-08 Gary Benson <gbenson@redhat.com>
5650
5651 * server.h: Do not include common-exceptions.h.
5652
6f1947e8
GB
56532014-10-08 Gary Benson <gbenson@redhat.com>
5654
5655 * server.h: Do not include cleanups.h.
5656
63b434a4
JH
56572014-09-30 James Hogan <james.hogan@imgtec.com>
5658
5659 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5660 mips64-dsp-linux.c.
5661
c4d9ceb6
YQ
56622014-09-23 Yao Qi <yao@codesourcery.com>
5663
5664 * linux-low.c (lp_status_maybe_breakpoint): New function.
5665 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5666 (count_events_callback): Likewise.
5667 (select_event_lwp_callback): Likewise.
5668 (cancel_breakpoints_callback): Likewise.
5669
89a5711c
DB
56702014-09-19 Don Breazeal <donb@codesourcery.com>
5671
5672 * linux-low.c (handle_extended_wait): Call
5673 linux_ptrace_get_extended_event.
5674 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5675 linux_is_extended_waitstatus.
5676
bffc0964
JB
56772014-09-16 Joel Brobecker <brobecker@adacore.com>
5678
5679 * Makefile.in (CPPFLAGS): Define.
5680 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5681 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5682
0bfdf32f
GB
56832014-09-16 Gary Benson <gbenson@redhat.com>
5684
5685 * inferiors.h (current_inferior): Renamed as...
5686 (current_thread): New variable. All uses updated.
5687 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5688 (maybe_move_out_of_jump_pad): Likewise.
5689 (cancel_breakpoint): Likewise.
5690 (linux_low_filter_event): Likewise.
5691 (wait_for_sigstop): Likewise.
5692 (linux_resume_one_lwp): Likewise.
5693 (need_step_over_p): Likewise.
5694 (start_step_over): Likewise.
5695 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5696 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5697 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5698 and save_inferior as saved_thread.
5699 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5700 saved_thread.
5701 (regcache_invalidate_thread): Likewise.
5702 * remote-utils.c (prepare_resume_reply): Likewise.
5703 * thread-db.c (thread_db_get_tls_address): Likewise.
5704 (disable_thread_event_reporting): Likewise.
5705 (remove_thread_event_breakpoints): Likewise.
5706 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5707 as saved_thread.
5708 * target.h (set_desired_inferior): Renamed as...
5709 (set_desired_thread): New declaration. All uses updated.
5710 * server.c (myresume): Updated comment to reference thread instead
5711 of inferior.
5712 (handle_serial_event): Likewise.
5713 (handle_target_event): Likewise.
5714
361c8ade
GB
57152014-09-12 Tom Tromey <tromey@redhat.com>
5716 Gary Benson <gbenson@redhat.com>
5717
5718 * regcache.h: Include common-regcache.h.
5719 (regcache_read_pc): Don't declare.
5720 * regcache.c (get_thread_regcache_for_ptid): New function.
5721
bd9269f7
GB
57222014-09-11 Tom Tromey <tromey@redhat.com>
5723 Gary Benson <gbenson@redhat.com>
5724
5725 * symbol.c: New file.
5726 * Makefile.in (SFILES): Add symbol.c.
5727 (OBS): Add symbol.o.
5728
f8c1d06b
GB
57292014-09-11 Gary Benson <gbenson@redhat.com>
5730
5731 * target.c (target_stop_ptid, target_continue_ptid): New
5732 functions.
5733
721ec300
GB
57342014-09-11 Tom Tromey <tromey@redhat.com>
5735 Gary Benson <gbenson@redhat.com>
5736
5737 * target.h: Include target/target.h.
5738 * target.c (target_read_memory, target_read_uint32)
5739 (target_write_memory): New functions.
5740
c5e92cca
GB
57412014-09-11 Gary Benson <gbenson@redhat.com>
5742
5743 * server.h (debug_hw_points): Don't declare.
5744 * server.c (debug_hw_points): Don't define. Replace all uses
5745 with show_debug_regs.
5746 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5747 all uses with show_debug_regs.
5748
2e4bb98a
EBM
57492014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5750
5751 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5752 endianness into account.
5753 (ppc_supply_ptrace_register): Likewise.
5754
ac740bc7
JH
57552014-09-03 James Hogan <james.hogan@imgtec.com>
5756
5757 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5758 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5759
97ea6506
GB
57602014-09-03 Gary Benson <gbenson@redhat.com>
5761
5762 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5763 ALL_DEBUG_ADDRESS_REGISTERS.
5764
df7e5265
GB
57652014-09-02 Gary Benson <gbenson@redhat.com>
5766
5767 * i386-low.h: Renamed as...
5768 * x86-low.h: New file. All type, function and variable name
5769 prefixes changed from "i386_" to "x86_". All references updated.
5770 * i386-low.c: Renamed as...
5771 * x86-low.c: New file. All type, function and variable name
5772 prefixes changed from "i386_" to "x86_". All references updated.
5773
ed859da7
GB
57742014-09-02 Gary Benson <gbenson@redhat.com>
5775
5776 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5777 (x86_linux_new_thread): Likewise.
5778
860789c7
GB
57792014-08-29 Gary Benson <gbenson@redhat.com>
5780
5781 * server.h (setjmp.h): Do not include.
5782 (toplevel): Do not declare.
5783 (common-exceptions.h): Include.
5784 (cleanups.h): Likewise.
5785 * server.c (toplevel): Do not define.
5786 (exit_code): New static global.
5787 (detach_or_kill_for_exit_cleanup): New function.
5788 (main): New function. Original main renamed to...
5789 (captured_main): New function.
5790 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5791
ff55e1b5
GB
57922014-08-29 Gary Benson <gbenson@redhat.com>
5793
5794 * Makefile.in (SFILES): Add common/common-exceptions.c.
5795 (OBS): Add common-exceptions.o.
5796 (common-exceptions.o): New rule.
5797 * utils.c (prepare_to_throw_exception): New function.
5798
e9bcb658
GB
57992014-08-29 Gary Benson <gbenson@redhat.com>
5800
5801 * config.in: Regenerate.
5802 * configure: Likewise.
5803
e3180625
GB
58042014-08-29 Gary Benson <gbenson@redhat.com>
5805
5806 * Makefile.in (SFILES): Add common/cleanups.c.
5807 (OBS): cleanups.o.
5808 (cleanups.o): New rule.
5809
e3d6ba5d
GB
58102014-08-29 Gary Benson <gbenson@redhat.com>
5811
5812 * utils.c (internal_vwarning): New function.
5813
7096e886
GB
58142014-08-28 Gary Benson <gbenson@redhat.com>
5815
5816 * utils.h (fatal): Remove declaration.
5817 * utils.c (fatal): Remove function.
5818
14ce3192
GB
58192014-08-28 Gary Benson <gbenson@redhat.com>
5820
5821 * tracepoint.c (gdb_agent_init): Replace fatal with
5822 perror_with_name.
5823 (initialize_tracepoint): Likewise.
5824
50278d59
GB
58252014-08-28 Gary Benson <gbenson@redhat.com>
5826
5827 * remote-utils.c (remote_prepare): Replace fatal with error.
5828
aa96c426
GB
58292014-08-28 Gary Benson <gbenson@redhat.com>
5830
5831 * linux-low.c (linux_async): Replace fatal with warning.
5832 Tidy up and return.
5833 (linux_start_non_stop): Return -1 if linux_async failed.
5834
f7160e97
GB
58352014-08-28 Gary Benson <gbenson@redhat.com>
5836
5837 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5838 gdb_assert.
5839 (i386_dr_low_get_addr): Remove vague comment.
5840 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5841 gdb_assert.
5842
38e08fca
GB
58432014-08-28 Gary Benson <gbenson@redhat.com>
5844
5845 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5846 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5847 internal_error.
5848 (linux_resume_one_lwp): Likewise.
5849 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5850 gdb_assert.
5851 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5852 with internal_error.
5853 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5854 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5855 (find_register_by_name): Replace fatal with internal_error.
5856 (find_regno): Likewise.
5857 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5858 * thread-db.c (thread_db_create_event): Likewise.
5859 (thread_db_load_search): Likewise.
5860 (try_thread_db_load_1): Likewise.
5861 * tracepoint.c (get_jump_space_head): Replace fatal with
5862 internal_error.
5863 (claim_trampoline_space): Likewise.
5864 (have_fast_tracepoint_trampoline_buffer): Likewise.
5865 (cmd_qtstart): Likewise.
5866 (stop_tracing): Likewise.
5867 (fast_tracepoint_collecting): Likewise.
5868 (target_malloc): Likewise.
5869 (download_tracepoint): Likewise.
5870 (download_trace_state_variables): Replace check with gdb_assert.
5871 (upload_fast_traceframes): Replace fatal with internal_error.
5872
34abf635
GB
58732014-08-19 Tom Tromey <tromey@redhat.com>
5874 Gary Benson <gbenson@redhat.com>
5875
5876 * Makefile.in (SFILES): Add common/common-debug.c.
5877 (OBS): Add common-debug.o.
5878 (common-debug.o): New rule.
5879 * debug.h (debug_printf): Don't declare.
5880 * debug.c (debug_printf): Renamed and rewritten as...
5881 (debug_vprintf): New function.
5882
f6e94d78
GB
58832014-08-19 Gary Benson <gbenson@redhat.com>
5884
5885 * utils.h: Do not include print-utils.h.
5886
9239eeab
GB
58872014-08-19 Tom Tromey <tromey@redhat.com>
5888 Gary Benson <gbenson@redhat.com>
5889
5890 * server.h: Add static assertion.
5891 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5892
ef87c8bb
GB
58932014-08-19 Tom Tromey <tromey@redhat.com>
5894 Gary Benson <gbenson@redhat.com>
5895
5896 * Makefile.in (SFILES): Add common/errors.c.
5897 (OBS): Add errors.o.
5898 (IPA_OBS): Add errors-ipa.o.
5899 (errors.o): New rule.
5900 (errors-ipa.o): Likewise.
5901 * utils.h (perror_with_name, error, warning): Don't declare.
5902 * utils.c (warning): Renamed and rewritten as...
5903 (vwarning): New function.
5904 (error): Renamed and rewritten as...
5905 (verror): New function.
5906 (internal_error): Renamed and rewritten as...
5907 (internal_verror): New function.
5908
bb974a24
GB
59092014-08-07 Gary Benson <gbenson@redhat.com>
5910
5911 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5912 * configure: Regenerate.
5913 * config.in: Likewise.
5914 * server.h: Do not include errno.h.
5915 * event-loop.c: Likewise.
5916 * hostio-errno.c: Likewise.
5917 * linux-low.c: Likewise.
5918 * remote-utils.c: Likewise.
5919 * spu-low.c: Likewise.
5920 * utils.c: Likewise.
5921 * gdbreplay.c: Unconditionally include errno.h.
5922
6d3d12eb
GB
59232014-08-07 Gary Benson <gbenson@redhat.com>
5924
5925 * server.h: Do not include string.h.
5926 * event-loop.c: Likewise.
5927 * linux-low.c: Likewise.
5928 * regcache.c: Likewise.
5929 * remote-utils.c: Likewise.
5930 * spu-low.c: Likewise.
5931 * utils.c: Likewise.
5932
dccbb609
GB
59332014-08-07 Gary Benson <gbenson@redhat.com>
5934
5935 * server.h: Do not include gdb_assert.h.
5936
e76df0d0
GB
59372014-08-07 Gary Benson <gbenson@redhat.com>
5938
5939 * server.h: Do not include common-utils.h.
5940
4cb9c816
GB
59412014-08-07 Gary Benson <gbenson@redhat.com>
5942
5943 * server.h: Do not include ptid.h.
5944 * notif.h: Likewise.
5945
3995eeee
GB
59462014-08-07 Gary Benson <gbenson@redhat.com>
5947
5948 * server.h: Do not include gdb_locale.h.
5949
cb9f1a9b
GB
59502014-08-07 Gary Benson <gbenson@redhat.com>
5951
5952 * server.h: Do not include gdb/signals.h.
5953 * win32-low.c: Likewise.
5954
a5fceff8
GB
59552014-08-07 Gary Benson <gbenson@redhat.com>
5956
5957 * server.h: Do not include pathmax.h.
5958
b9391142
GB
59592014-08-07 Gary Benson <gbenson@redhat.com>
5960
5961 * server.h: Do not include libiberty.h.
5962 * linux-bfin-low.c: Likewise.
5963
0e443c87
GB
59642014-08-07 Gary Benson <gbenson@redhat.com>
5965
5966 * server.h: Do not include ansidecl.h.
5967
8ebb3f56
GB
59682014-08-07 Gary Benson <gbenson@redhat.com>
5969
5970 * linux-x86-low.c: Do not include stddef.h.
5971 * lynx-ppc-low.c: Likewise.
5972 * tracepoint.c: Likewise.
5973
8980bdf6
GB
59742014-08-07 Gary Benson <gbenson@redhat.com>
5975
5976 * server.h: Do not include stdarg.h.
5977 * nto-low.c: Likewise.
5978
d7096f71
GB
59792014-08-07 Gary Benson <gbenson@redhat.com>
5980
5981 * server.h: Do not include stdlib.h.
5982 * inferiors.c: Likewise.
5983 * linux-low.c: Likewise.
5984 * regcache.c: Likewise.
5985 * spu-low.c: Likewise.
5986 * tracepoint.c: Likewise.
5987 * utils.c: Likewise.
5988
d02f550d
GB
59892014-08-07 Gary Benson <gbenson@redhat.com>
5990
5991 * server.h: Do not include stdio.h.
5992 * linux-low.c: Likewise.
5993 * remote-utils.c: Likewise.
5994 * spu-low.c: Likewise.
5995 * utils.c: Likewise.
5996 * wincecompat.c: Likewise.
5997
87f6c4e3
GB
59982014-08-06 Gary Benson <gbenson@redhat.com>
5999
6000 * regcache.c (init_register_cache): Move conditionals inside if.
6001
7089dca4
GB
60022014-08-06 Gary Benson <gbenson@redhat.com>
6003
6004 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6005
462f517e
GB
60062014-07-31 Gary Benson <gbenson@redhat.com>
6007
6008 * ax.h: Do not include server.h.
6009 * gdbthread.h: Likewise.
6010 * lynx-low.h: Likewise.
6011 * notif.h: Likewise.
6012
976411d6
GB
60132014-07-30 Gary Benson <gbenson@redhat.com>
6014
6015 * server.h: Include common-defs.h.
6016 Do not include config.h or build-gnulib-gdbserver/config.h.
6017
d41f6d8e
GB
60182014-07-30 Gary Benson <gbenson@redhat.com>
6019
6020 * hostio-errno.c: Move server.h to top of includes list.
6021 * inferiors.c: Likewise.
6022 * linux-x86-low.c: Likewise.
6023 * notif.c: Include server.h.
6024
314c6a35
TT
60252014-07-24 Tom Tromey <tromey@redhat.com>
6026 Gary Benson <gbenson@redhat.com>
6027
6028 * server.h (CORE_ADDR): Now unsigned.
6029
69ff6be5
PA
60302014-07-16 Pedro Alves <palves@redhat.com>
6031
6032 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6033
ce9e3fe7
PA
60342014-07-15 Pedro Alves <palves@redhat.com>
6035
6036 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6037 copy.
6038
e76126e8
PA
60392014-07-11 Pedro Alves <palves@redhat.com>
6040
6041 * linux-low.c (kill_wait_lwp): New function, based on
6042 kill_one_lwp_callback, but use my_waitpid directly.
6043 (kill_one_lwp_callback, linux_kill): Use it.
6044
8e9db26e
PA
60452014-06-23 Pedro Alves <palves@redhat.com>
6046
6047 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6048 before setting DR0..DR3.
6049
698b3e08
GB
60502014-06-20 Gary Benson <gbenson@redhat.com>
6051
6052 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6053 * configure: Regenerated.
6054 * config.in: Likewise.
6055
125f8a3d
GB
60562014-06-20 Gary Benson <gbenson@redhat.com>
6057
6058 * Makefile.in (SFILES): Update locations for files moved
6059 from common to nat.
6060 (object file files): Reordered.
6061
42995dbd
GB
60622014-06-20 Gary Benson <gbenson@redhat.com>
6063
6064 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6065 (i386_dr_low_set_addr): Likewise.
6066 (i386_dr_low_get_addr): Likewise.
6067 (i386_dr_low_can_set_control): Likewise.
6068 (i386_dr_low_set_control): Likewise.
6069 (i386_dr_low_get_control): Likewise.
6070 (i386_dr_low_get_status): Likewise.
6071 (i386_get_debug_register_length): Likewise.
6072 * linux-x86-low.c (i386_dr_low_set_addr):
6073 Changed signature. Made static.
6074 (i386_dr_low_get_addr): Likewise.
6075 (i386_dr_low_set_control): Likewise.
6076 (i386_dr_low_get_control): Likewise.
6077 (i386_dr_low_get_status): Likewise.
6078 (i386_dr_low): New global variable.
6079 * win32-i386-low.c (i386_dr_low_set_addr):
6080 Changed signature. Made static.
6081 (i386_dr_low_get_addr): Likewise.
6082 (i386_dr_low_set_control): Likewise.
6083 (i386_dr_low_get_control): Likewise.
6084 (i386_dr_low_get_status): Likewise.
6085 (i386_dr_low): New global variable.
6086
e1d2394b
MS
60872014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6088
6089 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6090 * Makefile.in (AR, AR_FLAGS): Define.
6091 * configure: Regenerate.
6092
3a8ee006
GB
60932014-06-19 Gary Benson <gbenson@redhat.com>
6094
6095 * Makefile.in (i386-dregs.o): New rule.
6096 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6097 * i386-low.c (target.h): Remove include.
6098 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6099 (DR_CONTROL_SHIFT): Likewise.
6100 (DR_CONTROL_SIZE): Likewise.
6101 (DR_RW_EXECUTE): Likewise.
6102 (DR_RW_WRITE): Likewise.
6103 (DR_RW_READ): Likewise.
6104 (DR_RW_IORW): Likewise.
6105 (DR_LEN_1): Likewise.
6106 (DR_LEN_2): Likewise.
6107 (DR_LEN_4): Likewise.
6108 (DR_LEN_8): Likewise.
6109 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6110 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6111 (DR_ENABLE_SIZE): Likewise.
6112 (DR_LOCAL_SLOWDOWN): Likewise.
6113 (DR_GLOBAL_SLOWDOWN): Likewise.
6114 (DR_CONTROL_RESERVED): Likewise.
6115 (I386_DR_CONTROL_MASK): Likewise.
6116 (I386_DR_VACANT): Likewise.
6117 (I386_DR_LOCAL_ENABLE): Likewise.
6118 (I386_DR_GLOBAL_ENABLE): Likewise.
6119 (I386_DR_DISABLE): Likewise.
6120 (I386_DR_SET_RW_LEN): Likewise.
6121 (I386_DR_GET_RW_LEN): Likewise.
6122 (I386_DR_WATCH_HIT): Likewise.
6123 (i386_wp_op_t): Likewise.
6124 (i386_show_dr): Likewise.
6125 (i386_length_and_rw_bits): Likewise.
6126 (i386_insert_aligned_watchpoint): Likewise.
6127 (i386_remove_aligned_watchpoint): Likewise.
6128 (i386_handle_nonaligned_watchpoint): Likewise.
6129 i386_update_inferior_debug_regs(): Likewise.
6130 (i386_dr_insert_watchpoint): Likewise.
6131 (i386_dr_remove_watchpoint): Likewise.
6132 (i386_dr_region_ok_for_watchpoint): Likewise.
6133 (i386_dr_stopped_data_address): Likewise.
6134 (i386_dr_stopped_by_watchpoint): Likewise.
6135
8f26655c
GB
61362014-06-19 Gary Benson <gbenson@redhat.com>
6137
6138 * i386-low.c (i386_dr_show): Renamed to
6139 i386_show_dr and made static. All uses updated.
6140 (i386_dr_length_and_rw_bits): Renamed to
6141 i386_length_and_rw_bits and made static.
6142 All uses updated.
6143 (i386_dr_insert_aligned_watchpoint): Renamed to
6144 i386_insert_aligned_watchpoint and made static.
6145 All uses updated.
6146 (i386_dr_remove_aligned_watchpoint): Renamed to
6147 i386_remove_aligned_watchpoint and made static.
6148 All uses updated.
6149 (i386_dr_update_inferior_debug_regs): Renamed to
6150 i386_update_inferior_debug_regs and made static.
6151 All uses updated.
6152
b9228891
GB
61532014-06-18 Gary Benson <gbenson@redhat.com>
6154
5171def3
GB
6155 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6156 (i386_dr_low_can_set_control): Likewise.
6157 (i386_get_debug_register_length): Likewise.
6158 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6159 (i386_dr_low_can_set_control): Likewise.
6160 (i386_get_debug_register_length): Likewise.
6161
61622014-06-17 Gary Benson <gbenson@redhat.com>
6163
b9228891
GB
6164 * i386-low.h (i386-dregs.h): New include.
6165 (DR_FIRSTADDR): Now in i386-dregs.h.
6166 (DR_LASTADDR): Likewise.
6167 (DR_NADDR): Likewise.
6168 (DR_STATUS): Likewise.
6169 (DR_CONTROL): Likewise.
6170 (i386_debug_reg_state): Likewise.
6171 (i386_dr_insert_watchpoint): Likewise.
6172 (i386_dr_remove_watchpoint): Likewise.
6173 (i386_dr_region_ok_for_watchpoint): Likewise.
6174 (i386_dr_stopped_data_address): Likewise.
6175 (i386_dr_stopped_by_watchpoint): Likewise.
6176 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6177
4be83cc2
GB
61782014-06-18 Gary Benson <gbenson@redhat.com>
6179
6180 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6181 i386_dr_insert_watchpoint.
6182 (i386_low_remove_watchpoint): Renamed to
6183 i386_dr_remove_watchpoint.
6184 (i386_low_region_ok_for_watchpoint): Renamed to
6185 i386_dr_region_ok_for_watchpoint.
6186 (i386_low_stopped_data_address): Renamed to
6187 i386_dr_stopped_data_address.
6188 (i386_low_stopped_by_watchpoint): Renamed to
6189 i386_dr_stopped_by_watchpoint.
6190 * i386-low.c (i386_show_dr): Renamed to
6191 i386_dr_show and made nonstatic. All uses updated.
6192 (i386_length_and_rw_bits): Renamed to
6193 i386_dr_length_and_rw_bits and made nonstatic.
6194 All uses updated.
6195 (i386_insert_aligned_watchpoint): Renamed to
6196 i386_dr_insert_aligned_watchpoint and made nonstatic.
6197 All uses updated.
6198 (i386_remove_aligned_watchpoint): Renamed to
6199 i386_dr_remove_aligned_watchpoint and made nonstatic.
6200 All uses updated.
6201 (i386_update_inferior_debug_regs): Renamed to
6202 i386_dr_update_inferior_debug_regs and made nonstatic.
6203 All uses updated.
6204 (i386_low_insert_watchpoint): Renamed to
6205 i386_dr_insert_watchpoint. All uses updated.
6206 (i386_low_remove_watchpoint): Renamed to
6207 i386_dr_remove_watchpoint. All uses updated.
6208 (i386_low_region_ok_for_watchpoint): Renamed to
6209 i386_dr_region_ok_for_watchpoint. All uses updated.
6210 (i386_low_stopped_data_address): Renamed to
6211 i386_dr_stopped_data_address. All uses updated.
6212 (i386_low_stopped_by_watchpoint): Renamed to
6213 i386_dr_stopped_by_watchpoint. All uses updated.
6214
131aa0d4
GB
62152014-06-18 Gary Benson <gbenson@redhat.com>
6216
6217 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6218 (i386_dr_low_can_set_control): Likewise.
6219 (i386_insert_aligned_watchpoint): New check.
6220
d9305f7f
GB
62212014-06-18 Gary Benson <gbenson@redhat.com>
6222
6223 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6224 Renamed to state.
6225
e927c9fc
GB
62262014-06-18 Gary Benson <gbenson@redhat.com>
6227
6228 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6229 instead of fatal and error.
6230 (i386_handle_nonaligned_watchpoint): Likewise.
6231
1b6d4134
GB
62322014-06-18 Gary Benson <gbenson@redhat.com>
6233
6234 * i386-low.c (i386_get_debug_register_length): New macro.
6235 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6236 (i386_show_dr): Use debug_printf instead of fprintf. Use
6237 phex to format values.
6238
6e62758f
GB
62392014-06-18 Gary Benson <gbenson@redhat.com>
6240
6241 * i386-low.h: Comment changes.
6242 * i386-low.c: Likewise.
6243
fc6e2f03
GB
62442014-06-18 Gary Benson <gbenson@redhat.com>
6245
6246 * i386-low.c: Whitespace changes.
6247
f9d1eeed
TT
62482014-06-12 Tom Tromey <tromey@redhat.com>
6249
6250 * utils.c (freeargv): Remove.
6251
0b04e523
TT
62522014-06-12 Tom Tromey <tromey@redhat.com>
6253
6254 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6255 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6256 (parse_debug_format_options): Likewise.
6257 (gdbserver_usage): Likewise.
6258 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6259 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6260 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6261 against libiberty.
6262 ($(LIBGNU)): Depend on libiberty.
6263 (all-lib): Recurse into all subdirs.
6264 (install-only): Invoke "install" target in subdirs.
6265 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6266 targets.
6267 * configure: Rebuild.
6268 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6269 for vasprintf, vsnprintf, or gettimeofday.
6270 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6271 srv_tgtobj.
6272
270c9937
JB
62732014-06-05 Joel Brobecker <brobecker@adacore.com>
6274
6275 * development.sh: Delete.
6276 * Makefile.in (config.status): Adjust dependency on development.sh.
6277 * configure.ac: Adjust development.sh source call.
6278 * configure: Regenerate.
6279
0a261ed8
PA
62802014-06-02 Pedro Alves <palves@redhat.com>
6281
6282 * ax.c (gdb_free_agent_expr): New function.
6283 * ax.h (gdb_free_agent_expr): New declaration.
6284 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6285 list.
6286 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6287 static.
6288 (clear_breakpoint_conditions_and_commands): New function.
6289 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6290 (clear_breakpoint_conditions_and_commands): New declaration.
6291
e9dae05e
RR
62922014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6293
6294 * linux-aarch64-low.c (asm/ptrace.h): Include.
6295
5876f503
JK
62962014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6297
6298 Fix TLS access for -static -pthread.
6299 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6300 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6301 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6302
802e8e6d
PA
63032014-05-20 Pedro Alves <palves@redhat.com>
6304
6305 * linux-aarch64-low.c (aarch64_insert_point)
6306 (aarch64_remove_point): No longer check whether the type is
6307 supported here. Adjust to new interface.
6308 (the_low_target): Install aarch64_supports_z_point_type as
6309 supports_z_point_type method.
6310 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6311 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6312 instead of a Z packet char. Adjust.
6313 (arm_supports_z_point_type): New function.
6314 (arm_insert_point, arm_remove_point): Adjust to new interface.
6315 (the_low_target): Install arm_supports_z_point_type.
6316 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6317 (cris_insert_point, cris_remove_point): Adjust to new interface.
6318 Don't check whether the type is supported here.
6319 (the_low_target): Install cris_supports_z_point_type.
6320 * linux-low.c (linux_supports_z_point_type): New function.
6321 (linux_insert_point, linux_remove_point): Adjust to new interface.
6322 * linux-low.h (struct linux_target_ops) <insert_point,
6323 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6324 raw_breakpoint pointer parameter.
6325 <supports_z_point_type>: New method.
6326 * linux-mips-low.c (mips_supports_z_point_type): New function.
6327 (mips_insert_point, mips_remove_point): Adjust to new interface.
6328 Use mips_supports_z_point_type.
6329 (the_low_target): Install mips_supports_z_point_type.
6330 * linux-ppc-low.c (the_low_target): Install NULL as
6331 supports_z_point_type method.
6332 * linux-s390-low.c (the_low_target): Install NULL as
6333 supports_z_point_type method.
6334 * linux-sparc-low.c (the_low_target): Install NULL as
6335 supports_z_point_type method.
6336 * linux-x86-low.c (x86_supports_z_point_type): New function.
6337 (x86_insert_point): Adjust to new insert_point interface. Use
6338 insert_memory_breakpoint. Adjust to new
6339 i386_low_insert_watchpoint interface.
6340 (x86_remove_point): Adjust to remove_point interface. Use
6341 remove_memory_breakpoint. Adjust to new
6342 i386_low_remove_watchpoint interface.
6343 (the_low_target): Install x86_supports_z_point_type.
6344 * lynx-low.c (lynx_target_ops): Install NULL as
6345 supports_z_point_type callback.
6346 * nto-low.c (nto_supports_z_point_type): New.
6347 (nto_insert_point, nto_remove_point): Adjust to new interface.
6348 (nto_target_ops): Install nto_supports_z_point_type.
6349 * mem-break.c: Adjust intro comment.
6350 (struct raw_breakpoint) <raw_type, size>: New fields.
6351 <inserted>: Update comment.
6352 <shlib_disabled>: Delete field.
6353 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6354 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6355 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6356 (raw_bkpt_type_to_target_hw_bp_type): New function.
6357 (find_enabled_raw_code_breakpoint_at): New function.
6358 (find_raw_breakpoint_at): New type and size parameters. Use them.
6359 (insert_memory_breakpoint): New function, based off
6360 set_raw_breakpoint_at.
6361 (remove_memory_breakpoint): New function.
6362 (set_raw_breakpoint_at): Reimplement.
6363 (set_breakpoint): New, based on set_breakpoint_at.
6364 (set_breakpoint_at): Reimplement.
6365 (delete_raw_breakpoint): Go through the_target->remove_point
6366 instead of assuming memory breakpoints.
6367 (find_gdb_breakpoint_at): Delete.
6368 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6369 (find_gdb_breakpoint): New function.
6370 (set_gdb_breakpoint_at): Delete.
6371 (z_type_supported): New function.
6372 (set_gdb_breakpoint_1): New function, loosely based off
6373 set_gdb_breakpoint_at.
6374 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6375 (delete_gdb_breakpoint_at): Delete.
6376 (delete_gdb_breakpoint_1): New function, loosely based off
6377 delete_gdb_breakpoint_at.
6378 (delete_gdb_breakpoint): New function.
6379 (clear_gdb_breakpoint_conditions): Rename to ...
6380 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6381 breakpoint.
6382 (add_condition_to_breakpoint): Make static.
6383 (add_breakpoint_condition): Take a struct breakpoint pointer
6384 instead of an address. Adjust.
6385 (gdb_condition_true_at_breakpoint): Rename to ...
6386 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6387 z_type parameter.
6388 (gdb_condition_true_at_breakpoint): Reimplement.
6389 (add_breakpoint_commands): Take a struct breakpoint pointer
6390 instead of an address. Adjust.
6391 (gdb_no_commands_at_breakpoint): Rename to ...
6392 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6393 parameter. Return true if no breakpoint was found. Change debug
6394 output.
6395 (gdb_no_commands_at_breakpoint): Reimplement.
6396 (run_breakpoint_commands): Rename to ...
6397 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6398 and change return type to boolean.
6399 (run_breakpoint_commands): New function.
6400 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6401 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6402 breakpoint. Go through the_target->remove_point instead of
6403 assuming memory breakpoint.
6404 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6405 software and hardware breakpoints.
6406 (reinsert_raw_breakpoint): Go through the_target->insert_point
6407 instead of assuming memory breakpoint.
6408 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6409 software and hardware breakpoints.
6410 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6411 Check both software and hardware breakpoints.
6412 (validate_inserted_breakpoint): Assert the breakpoint is a
6413 software breakpoint. Set the inserted flag to -1 instead of
6414 setting shlib_disabled.
6415 (delete_disabled_breakpoints): Adjust.
6416 (validate_breakpoints): Only validate software breakpoints.
6417 Adjust to inserted flag change.
6418 (check_mem_read, check_mem_write): Skip breakpoint types other
6419 than software breakpoints. Adjust to inserted flag change.
6420 * mem-break.h (enum raw_bkpt_type): New enum.
6421 (raw_breakpoint, struct process_info): Forward declare.
6422 (Z_packet_to_target_hw_bp_type): Delete declaration.
6423 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6424 (set_gdb_breakpoint, delete_gdb_breakpoint)
6425 (clear_breakpoint_conditions): New declarations.
6426 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6427 (breakpoint_inserted_here): Update comment.
6428 (add_breakpoint_condition, add_breakpoint_commands): Replace
6429 address parameter with a breakpoint pointer parameter.
6430 (gdb_breakpoint_here): Update comment.
6431 (delete_gdb_breakpoint_at): Delete.
6432 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6433 * server.c (process_point_options): Take a struct breakpoint
6434 pointer instead of an address. Adjust.
6435 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6436 delete_gdb_breakpoint.
6437 * spu-low.c (spu_target_ops): Install NULL as
6438 supports_z_point_type method.
6439 * target.h: Include mem-break.h.
6440 (struct target_ops) <prepare_to_access_memory>: Update comment.
6441 <supports_z_point_type>: New field.
6442 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6443 instead of a char. Also take a raw breakpoint pointer.
6444 * win32-arm-low.c (the_low_target): Install NULL as
6445 supports_z_point_type.
6446 * win32-i386-low.c (i386_supports_z_point_type): New function.
6447 (i386_insert_point, i386_remove_point): Adjust to new interface.
6448 (the_low_target): Install i386_supports_z_point_type.
6449 * win32-low.c (win32_supports_z_point_type): New function.
6450 (win32_insert_point, win32_remove_point): Adjust to new interface.
6451 (win32_target_ops): Install win32_supports_z_point_type.
6452 * win32-low.h (struct win32_target_ops):
6453 <supports_z_point_type>: New method.
6454 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6455 instead of a char. Also take a raw breakpoint pointer.
6456
932539e3
PA
64572014-05-20 Pedro Alves <palves@redhat.com>
6458
6459 * mem-break.h: Include break-common.h.
6460 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6461 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6462 (Z_packet_to_target_hw_bp_type): New declaration.
6463 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6464 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6465 (Z_PACKET_ACCESS_WP): Delete macros.
6466 (Z_packet_to_hw_type): Delete function.
6467 * i386-low.h: Don't include break-common.h here.
6468 (Z_packet_to_hw_type): Delete declaration.
6469 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6470 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6471 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6472 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6473 * linux-aarch64-low.c: Don't include break-common.h here.
6474 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6475 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6476 (Z_packet_to_target_hw_bp_type): Delete function.
6477 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6478 function.
6479 (mips_insert_point, mips_remove_point): Use
6480 Z_packet_to_target_hw_bp_type.
6481
4ff0d3d8
PA
64822014-05-20 Pedro Alves <palves@redhat.com>
6483
6484 * linux-aarch64-low.c: Include break-common.h.
6485 (enum target_point_type): Delete.
6486 (Z_packet_to_point_type): Rename to ...
6487 (Z_packet_to_target_hw_bp_type): ... this, and return a
6488 target_hw_bp_type instead.
6489 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6490 instead of an enum target_point_type.
6491 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6492 breakpoint type.
6493 (aarch64_dr_state_insert_one_point)
6494 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6495 (aarch64_handle_aligned_watchpoint)
6496 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6497 Take an enum target_hw_bp_type instead of an enum
6498 target_point_type.
6499 (aarch64_supports_z_point_type): New function.
6500 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6501 use Z_packet_to_target_hw_bp_type.
6502
786dc519
JB
65032014-05-20 Joel Brobecker <brobecker@adacore.com>
6504
6505 * configure.ac: Only use -Werror by default when DEVELOPMENT
6506 is true.
6507 * configure: Regenerate.
6508
9e0aa64f
JK
65092014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6510
6511 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6512 * linux-x86-low.c (X86_64_USER_REGS): New.
6513 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6514
2b577b92
YQ
65152014-04-28 Yao Qi <yao@codesourcery.com>
6516
6517 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6518 name.
6519
94611da2
PA
65202014-04-25 Pedro Alves <palves@redhat.com>
6521
6522 PR server/16255
6523 * linux-low.c (linux_attach_fail_reason_string): New function.
6524 (linux_attach_lwp): Delete.
6525 (linux_attach_lwp_1): Rename to ...
6526 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6527 argument. Remove "initial" parameter. Return int instead of
6528 void. Don't error or warn here.
6529 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6530 failure to attach to the tgid. Call warning when failing to
6531 attach to an lwp.
6532 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6533 argument. Remove "initial" parameter. Return int instead of
6534 void. Don't error or warn here.
6535 (linux_attach_fail_reason_string): New declaration.
6536 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6537 interface change. Use linux_attach_fail_reason_string.
6538
01f9f808
MS
65392014-04-24 Michael Sturm <michael.sturm@mintel.com>
6540 Walfred Tedeschi <walfred.tedeschi@intel.com>
6541
6542 * Makefile.in: Added rules to handle new files
6543 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6544 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6545 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6546 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6547 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6548 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6549 x32-avx512-linux.o.
6550 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6551 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6552 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6553 i386/x32-avx512.xml.
6554 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6555 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6556 i386/x32-avx512-linux.xml.
6557 * i387-fp.c (num_avx512_k_registers): New constant for number
6558 of K registers.
6559 (num_avx512_zmmh_low_registers): New constant for number of
6560 lower ZMM registers (0-15).
6561 (num_avx512_zmmh_high_registers): New constant for number of
6562 higher ZMM registers (16-31).
6563 (num_avx512_ymmh_registers): New contant for number of higher
6564 YMM registers (ymm16-31 added by avx521 on x86_64).
6565 (num_avx512_xmm_registers): New constant for number of higher
6566 XMM registers (xmm16-31 added by AVX512 on x86_64).
6567 (struct i387_xsave): Add space for AVX512 registers.
6568 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6569 Add code to handle AVX512 registers.
6570 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6571 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6572 prototypei from generated file.
6573 (tdesc_amd64_avx512_linux): Likewise.
6574 (init_registers_x32_avx512_linux): Likewise.
6575 (tdesc_x32_avx512_linux): Likewise.
6576 (init_registers_i386_avx512_linux): Likewise.
6577 (tdesc_i386_avx512_linux): Likewise.
6578 (x86_64_regmap): Add AVX512 registers.
6579 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6580 mask.
6581 (initialize_low_arch): Add code to initialize AVX512 registers.
6582
51aa91f9
PA
65832014-04-23 Pedro Alves <palves@redhat.com>
6584
6585 * mem-break.c (find_gdb_breakpoint_at): Make static.
6586 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6587
a4165e94
PA
65882014-04-23 Pedro Alves <palves@redhat.com>
6589
6590 * i386-low.c: Don't include break-common.h here.
6591 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6592 prototype to take target_hw_bp_type as argument instead of a Z
6593 packet char.
6594 * i386-low.h: Include break-common.h here.
6595 (Z_packet_to_hw_type): Declare.
6596 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6597 prototypes.
6598 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6599 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6600 (x86_remove_point): Convert the packet number to a
6601 target_hw_bp_type before calling i386_low_remove_watchpoint.
6602 * win32-i386-low.c (i386_insert_point): Convert the packet number
6603 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6604 (i386_remove_point): Convert the packet number to a
6605 target_hw_bp_type before calling i386_low_remove_watchpoint.
6606
b8acf843
PA
66072014-04-23 Pedro Alves <palves@redhat.com>
6608
6609 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6610
d708bcd1
PA
66112014-04-10 Pedro Alves <palves@redhat.com>
6612
6613 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6614 Check if the condition or command is NULL before checking if the
6615 breakpoint is known. On success, return true.
6616 * mem-break.h (add_breakpoint_condition): Document return.
6617 (add_breakpoint_commands): Add describing comment.
6618 * server.c (skip_to_semicolon): New function.
6619 (process_point_options): Use it.
6620
2eec7d5b
PA
66212014-04-09 Pedro Alves <palves@redhat.com>
6622
6623 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6624 to lwpid_of.
6625
fa96cb38
PA
66262014-02-27 Pedro Alves <palves@redhat.com>
6627
6628 PR 12702
6629 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6630 macros.
6631 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6632 output.
6633 (last_thread_of_process_p): Take a PID argument instead of a
6634 thread pointer.
6635 (linux_wait_for_lwp): Delete.
6636 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6637 functions.
6638 (linux_low_filter_event): New function, party factored out from
6639 linux_wait_for_event.
6640 (linux_wait_for_event): Rename to ...
6641 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6642 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6643 sigsuspend. Check for zombie leaders.
6644 (linux_wait_for_event): Reimplement as wrapper around
6645 linux_wait_for_event_filtered.
6646 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6647 a normal or signal exit is seen, it's the whole process exiting.
6648 (wait_for_sigstop): No longer a for_each_inferior callback.
6649 Rewrite on top of linux_wait_for_event_filtered.
6650 (stop_all_lwps): Call wait_for_sigstop directly.
6651 * server.c (resume, handle_target_event): Handle
6652 TARGET_WAITKIND_NO_RESUMED.
6653
d763de10
JB
66542014-02-26 Joel Brobecker <brobecker@adacore.com>
6655
6656 * win32-low.c (psapi_get_dll_name,
6657 * win32_CreateToolhelp32Snapshot): Delete.
6658 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6659 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6660 Delete.
6661 (handle_load_dll): Add function description.
6662 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6663
850a0f76
JB
66642014-02-26 Joel Brobecker <brobecker@adacore.com>
6665
6666 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6667 Add comment.
6668 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6669 base address when calling win32_add_one_solib.
6670 (handle_load_dll): Delete local variable load_addr.
6671 Remove 0x1000 offset applied to DLL base address when calling
6672 win32_add_one_solib.
6673 (handle_unload_dll): Add comment.
6674
f25b3fc3
JB
66752014-02-26 Joel Brobecker <brobecker@adacore.com>
6676
6677 * win32-low.c (win32_add_all_dlls): Renames
6678 win32_ensure_ntdll_loaded. Rewrite function documentation.
6679 Adjust implementation to always load all DLLs.
6680 Add 0x1000 offset to DLL base address when calling
6681 win32_add_one_solib.
6682 (child_initialization_done): New static global.
6683 (do_initial_child_stuff): Set child_initialization_done to
6684 zero during child initialization, and 1 after. Replace call
6685 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6686 Add comment.
6687 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6688 (handle_unload_dll): Add function documentation.
6689 (get_child_debug_event): Ignore load and unload DLL events
6690 during child initialization.
6691
d86d4aaf
DE
66922014-02-20 Doug Evans <dje@google.com>
6693
3bc32da3 6694 Remove global all_lwps.
d86d4aaf
DE
6695 * inferiors.h (ptid_of): Move here from linux-low.h.
6696 (pid_of, lwpid_of): Ditto.
6697 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6698 parameter is a struct thread_info * now.
6699 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6700 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6701 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6702 directly.
6703 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6704 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6705 * linux-arm-low.c (update_registers_callback): Update, "entry"
6706 parameter is a struct thread_info * now.
6707 Fetch lwpid from current_inferior directly.
6708 (arm_insert_point): Pass &all_threads to find_inferior instead of
6709 &all_lwps.
6710 (arm_remove_point): Ditto.
6711 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6712 (arm_prepare_to_resume): Fetch pid from thread.
6713 (arm_read_description): Fetch lwpid from current_inferior directly.
6714 * linux-low.c (all_lwps): Delete.
6715 (delete_lwp): Delete call to remove_inferior.
6716 (handle_extended_wait): Fetch lwpid from thread.
6717 (add_lwp): Don't set lwp->entry.id. Remove call to
6718 add_inferior_to_list.
6719 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6720 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6721 (kill_one_lwp_callback): Ditto.
6722 (linux_kill): Don't dereference NULL pointer.
6723 Fetch ptid,lwpid from thread.
6724 (get_detach_signal): Fetch ptid from thread.
6725 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6726 Simplify call to regcache_invalidate_thread.
6727 (delete_lwp_callback): Update, "entry" parameter is a
6728 struct thread_info * now. Fetch pid from thread.
6729 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6730 (status_pending_p_callback): Update, "entry" parameter is a
6731 struct thread_info * now. Fetch ptid from thread.
6732 (find_lwp_pid): Update, "entry" parameter is a
6733 struct thread_info * now.
6734 (linux_wait_for_lwp): Fetch pid from thread.
6735 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6736 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6737 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6738 (dequeue_one_deferred_signal): Ditto.
6739 (cancel_breakpoint): Fetch ptid from current_inferior.
6740 (linux_wait_for_event): Pass &all_threads to find_inferior,
6741 not &all_lwps. Fetch ptid, lwpid from thread.
6742 (count_events_callback): Update, "entry" parameter is a
6743 struct thread_info * now.
6744 (select_singlestep_lwp_callback): Ditto.
6745 (select_event_lwp_callback): Ditto.
6746 (cancel_breakpoints_callback): Ditto.
6747 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6748 not &all_lwps.
6749 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6750 (unsuspend_one_lwp): Update, "entry" parameter is a
6751 struct thread_info * now.
6752 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6753 not &all_lwps.
6754 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6755 Fetch lwpid from thread, not lwp.
6756 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6757 Pass &all_threads to find_inferior, not &all_lwps.
6758 (send_sigstop): Fetch lwpid from thread, not lwp.
6759 (send_sigstop_callback): Update, "entry" parameter is a
6760 struct thread_info * now.
6761 (suspend_and_send_sigstop_callback): Ditto.
6762 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6763 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6764 struct thread_info * now.
6765 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6766 from thread, lwp.
6767 (lwp_running): Update, "entry" parameter is a
6768 struct thread_info * now.
6769 (stop_all_lwps): Fetch ptid from thread.
6770 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6771 (linux_resume_one_lwp): Fetch lwpid from thread.
6772 (linux_set_resume_request): Update, "entry" parameter is a
6773 struct thread_info * now. Fetch pid, lwpid from thread.
6774 (resume_status_pending_p): Update, "entry" parameter is a
6775 struct thread_info * now.
6776 (need_step_over_p): Ditto. Fetch lwpid from thread.
6777 (start_step_over): Fetch lwpid from thread.
6778 (linux_resume_one_thread): Update, "entry" parameter is a
6779 struct thread_info * now. Fetch lwpid from thread.
6780 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6781 (proceed_one_lwp): Update, "entry" parameter is a
6782 struct thread_info * now. Fetch lwpid from thread.
6783 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6784 struct thread_info * now.
6785 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6786 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6787 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6788 directly.
6789 (regsets_store_inferior_registers): Ditto.
6790 (fetch_register, store_register): Ditto.
6791 (linux_read_memory, linux_write_memory): Ditto.
6792 (linux_request_interrupt): Ditto.
6793 (linux_read_auxv): Ditto.
6794 (linux_xfer_siginfo): Ditto.
6795 (linux_qxfer_spu): Ditto.
6796 (linux_qxfer_libraries_svr4): Ditto.
6797 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6798 moved to inferiors.h.
6799 (get_lwp): Delete.
6800 (get_thread_lwp): Update.
6801 (struct lwp_info): Delete member "entry". Simplify comment for
6802 member "thread".
6803 (all_lwps): Delete.
6804 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6805 current_inferior directly.
6806 (update_watch_registers_callback): Update, "entry" parameter is a
6807 struct thread_info * now. Fetch pid from thread.
6808 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6809 (mips_insert_point): Fetch lwpid from current_inferior.
6810 Pass &all_threads to find_inferior, not &all_lwps.
6811 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6812 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6813 directly.
6814 (mips_stopped_data_address): Ditto.
6815 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6816 directly.
6817 * linux-tile-low.c (tile_arch_setup): Ditto.
6818 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6819 (update_debug_registers_callback): Update, "entry" parameter is a
6820 struct thread_info * now. Fetch pid from thread.
6821 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6822 Pass &all_threads to find_inferior, not &all_lwps.
6823 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6824 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6825 Pass &all_threads to find_inferior, not &all_lwps.
6826 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6827 (i386_dr_low_get_status): Ditto.
6828 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6829 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6830 (x86_linux_read_description): Ditto.
6831 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6832
3b8361aa
DE
68332014-02-20 Doug Evans <dje@google.com>
6834
6835 * inferiors.c (get_first_inferior): Fix buglet.
6836
f7667f0d
DE
68372014-02-19 Doug Evans <dje@google.com>
6838
6839 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6840 * inferiors.c (add_thread): Change result type to struct thread_info *.
6841 All callers updated.
6842 (add_lwp): Call add_thread here instead of in callers.
6843 All callers updated.
6844 * linux-low.h (get_lwp_thread): Rewrite.
6845 (struct lwp_info): New member "thread".
6846
b3312d80
DE
68472014-02-19 Doug Evans <dje@google.com>
6848
6849 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6850 All callers updated.
6851
ecc6f45c
DE
68522014-02-19 Doug Evans <dje@google.com>
6853
6854 * inferiors.c (add_thread): Fix whitespace.
6855
649ebbca
DE
68562014-02-19 Doug Evans <dje@google.com>
6857
6858 * dll.c (clear_dlls): Replace accessing list implemention details
6859 with API function.
6860 * gdbthread.h (get_first_thread): Declare.
6861 * inferiors.c (for_each_inferior_with_data): New function.
6862 (get_first_thread): New function.
6863 (find_thread_ptid): Simplify.
6864 (get_first_inferior): New function.
6865 (clear_list): Delete.
6866 (one_inferior_p): New function.
6867 (clear_inferior_list): New function.
6868 (clear_inferiors): Update.
6869 * inferiors.h (for_each_inferior_with_data): Declare.
6870 (clear_inferior_list): Declare.
6871 (one_inferior_p): Declare.
6872 (get_first_inferior): Declare.
6873 * linux-low.c (linux_wait_for_event): Replace accessing list
6874 implemention details with API function.
6875 * server.c (target_running): Ditto.
6876 (accumulate_file_name_length): New function.
6877 (emit_dll_description): New function.
6878 (handle_qxfer_libraries): Replace accessing list implemention
6879 details with API function.
6880 (handle_qxfer_threads_worker): New function.
6881 (handle_qxfer_threads_proper): Replace accessing list implemention
6882 details with API function.
6883 (handle_query): Ditto.
6884 (visit_actioned_threads_callback_ftype): New typedef.
6885 (visit_actioned_threads_data): New struct.
6886 (visit_actioned_threads): Rewrite to be find_inferior callback.
6887 (resume): Call find_inferior.
6888 (handle_status): Replace accessing list implemention
6889 details with API function.
6890 (process_serial_event): Replace accessing list implemention details
6891 with API function.
6892 * target.c (set_desired_inferior): Replace accessing list implemention
6893 details with API function.
6894 * tracepoint.c (same_process_p): New function.
6895 (gdb_agent_about_to_close): Replace accessing list implemention
6896 details with API function.
6897 * win32-low.c (child_delete_thread): Replace accessing list
6898 implemention details with API function.
6899 (match_dll_by_basename): New function.
6900 (dll_is_loaded_by_basename): New function.
6901 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6902 details call to dll_is_loaded_by_basename.
6903
80894984
DE
69042014-02-19 Doug Evans <dje@google.com>
6905
6906 * dll.h (struct dll_info): Add comment.
6907 * gdbthread.h (struct thread_info): Add comment.
6908 (current_ptid): Simplify.
6909 * inferiors.c (add_process): Update.
6910 (remove_process): Update.
6911 * inferiors.h (struct process_info): Rename member "head" to "entry".
6912 * linux-low.c (delete_lwp): Update.
6913 (add_lwp): Update.
6914 (last_thread_of_process_p): Update.
6915 (kill_one_lwp_callback, linux_kill): Update.
6916 (status_pending_p_callback): Update.
6917 (wait_for_sigstop): Update. Simplify read of ptid.
6918 (start_step_over): Update.
6919 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6920 (get_lwp_thread): Update.
6921 (struct lwp_info): Rename member "head" to "entry".
6922 * regcache.h (inferior_list_entry): Delete.
6923 * server.c (kill_inferior_callback): Update.
6924 (detach_or_kill_inferior_callback): Update.
6925 (print_started_pid): Update.
6926 (print_attached_pid): Update.
6927 (process_serial_event): Simplify read of ptid.
6928 * thread-db.c (thread_db_create_event): Update.
6929 (thread_db_get_tls_address): Update.
6930 * win32-low.c (current_inferior_ptid): Simplify.
6931
46917d26
TT
69322014-02-19 Tom Tromey <tromey@redhat.com>
6933
6934 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6935 argument.
6936 (target_supports_btrace): Update.
6937
0759a81e
YQ
69382014-02-14 Yao Qi <yao@codesourcery.com>
6939
6940 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6941 (rsp-low-ipa.o): New target.
6942
a7191e8b
TT
69432014-02-12 Tom Tromey <tromey@redhat.com>
6944
6945 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6946 convert_ascii_to_int.
6947 * regcache.c (registers_to_string): Likewise.
6948 * remote-utils.c (decode_M_packet): Likewise.
6949 * server.c (process_serial_event): Likewise.
6950
ff0e980e
TT
69512014-02-12 Tom Tromey <tromey@redhat.com>
6952
6953 * server.c (handle_query, handle_v_run): Use hex2bin, not
6954 unhexify.
6955 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6956
e9371aff
TT
69572014-02-12 Tom Tromey <tromey@redhat.com>
6958
6959 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6960 convert_int_to_ascii.
6961 * regcache.c (registers_to_string, collect_register_as_string):
6962 Likewise.
6963 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6964 Likewise.
6965 * server.c (process_serial_event): Likewise.
6966 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6967 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6968
971dc0b8
TT
69692014-02-12 Tom Tromey <tromey@redhat.com>
6970
6971 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6972 bin2hex, not hexify.
6973 * tracepoint.c (cmd_qtstatus): Likewise.
6974
0a822afb
TT
69752014-02-12 Tom Tromey <tromey@redhat.com>
6976
6977 * remote-utils.c (monitor_output): Pass explicit length to
6978 hexify.
6979
9c3d6531
TT
69802014-02-12 Tom Tromey <tromey@redhat.com>
6981
6982 * tracepoint.c: Include rsp-low.h.
6983 * server.c: Include rsp-low.h.
6984 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6985 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6986 declare.
6987 * remote-utils.c: Include rsp-low.h.
6988 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6989 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6990 (convert_int_to_ascii, convert_ascii_to_int): Move to
6991 common/rsp-low.c.
6992 * regcache.c: Include rsp-low.h.
6993 * ax.c: Include rsp-low.h.
6994 * Makefile.in (SFILES): Add common/rsp-low.c.
6995 (OBS): Add rsp-low.o.
6996 (rsp-low.o): New target.
6997
01fd3ea5
TT
69982014-02-12 Tom Tromey <tromey@redhat.com>
6999
7000 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7001 Include print-utils.h.
7002 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7003 (plongest, thirty_two, phex_nz): Remove.
7004 * Makefile.in (SFILES): Add common/print-utils.c.
7005 (OBS): Add print-utils.o.
7006 (print-utils-ipa.o): New target.
7007 (print-utils.o): New target.
7008 (IPA_OBJS): Add print-utils-ipa.o.
7009
e99dc820
TT
70102014-02-06 Tom Tromey <tromey@redhat.com>
7011
7012 * Makefile.in (SFILES): Fix indentation.
7013
ee1e2d4f
DE
70142014-02-05 Doug Evans <dje@google.com>
7015
7016 * linux-low.c (linux_wait_for_event): Improve comment.
7017 (linux_wait_1): Keep current_inferior in sync with event_child.
7018
f5a02773
DE
70192014-01-22 Doug Evans <dje@google.com>
7020
7021 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7022
87ce2a04
DE
70232014-01-22 Doug Evans <dje@google.com>
7024
7025 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7026 * configure: Regenerate.
7027 * config.in: Regenerate.
7028 * Makefile.in (SFILES): Add debug.c.
7029 (OBS): Add debug.o.
7030 * debug.c: New file.
7031 * debug.h: New file.
7032 * linux-aarch64-low.c (*): Update all debugging printfs to use
7033 debug_printf instead of fprintf.
7034 * linux-arm-low.c (*): Ditto.
7035 * linux-cris-low.c (*): Ditto.
7036 * linux-crisv32-low.c (*): Ditto.
7037 * linux-m32r-low.c (*): Ditto.
7038 * linux-sparc-low.c (*): Ditto.
7039 * linux-x86.c (*): Ditto.
7040 * linux-low.c (*): Ditto.
7041 (linux_wait_1): Add calls to debug_enter, debug_exit.
7042 (linux_wait): Remove redundant debugging printf.
7043 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7044 (linux_resume, unstop_all_lwps): Ditto.
7045 * mem-break.c (*): Update all debugging printfs to use
7046 debug_printf instead of fprintf.
7047 * remote-utils.c (*): Ditto.
7048 * thread-db.c (*): Ditto.
7049 * server.c #include <ctype.h>, "gdb_vecs.h".
7050 (debug_threads): Moved to debug.c.
7051 (*): Update all debugging printfs to use debug_printf instead of
7052 fprintf.
7053 (start_inferior): Replace call to fflush with call to debug_flush.
7054 (monitor_show_help): Mention set debug-format.
7055 (parse_debug_format_options): New function.
7056 (handle_monitor_command): Handle "monitor set debug-format".
7057 (gdbserver_usage): Mention --debug-format.
7058 (main): Parse --debug-format.
7059 * server.h (debug_threads): Declaration moved to debug.h.
7060 #include "debug.h".
7061 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7062 trace_debug_1 that uses debug_printf.
7063 (tracepoint_look_up_symbols): Update all debugging printfs to use
7064 debug_printf instead of fprintf.
7065
e671835b
BS
70662014-01-20 Baruch Siach <baruch@tkos.co.il>
7067
7068 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7069 sys/ptrace.h.
7070
b5737fa9
PA
70712014-01-17 Pedro Alves <palves@redhat.com>
7072
ea38d2a9 7073 PR build/16445
c7faa97a
PA
7074 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7075 defined after including gdb_proc_service.h.
b5737fa9 7076
40ed484e
DE
70772014-01-16 Doug Evans <dje@google.com>
7078
7079 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7080 (match_dll): Use it.
7081
969c39fb
MM
70822014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7083
7084 * target.h (target_ops) <read_btrace>: Change parameters and
7085 return type to allow error reporting.
7086 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7087 trace reading errors on.
7088 * linux-low.c (linux_low_read_btrace): Pass trace reading
7089 errors on.
7090 (linux_low_disable_btrace): New.
7091
ab7f45ba
DE
70922014-01-15 Doug Evans <dje@google.com>
7093
7094 * inferiors.c (thread_id_to_gdb_id): Delete.
7095 * inferiors.h (thread_id_to_gdb_id): Delete.
7096
66af0f44
EZ
70972014-01-13 Eli Zaretskii <eliz@gnu.org>
7098
7099 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7100 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7101 versions.
7102
9939e131
PA
71032014-01-08 Pedro Alves <palves@redhat.com>
7104
7105 * server.c (handle_status): Don't discard previous queued stop
7106 replies or thread's pending status here.
7107 (main) <disconnection>: Do it here instead.
7108
b7ea362b
PA
71092014-01-08 Pedro Alves <palves@redhat.com>
7110
7111 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7112 * server.c (visit_actioned_threads, handle_pending_status): New
7113 function.
7114 (handle_v_cont): Factor out parts to ...
7115 (resume): ... this new function. If in all-stop, and a thread
7116 being resumed has a pending status, report it without actually
7117 resuming.
7118 (myresume): Adjust to use the new 'resume' function.
7119 (clear_pending_status_callback, set_pending_status_callback)
7120 (find_status_pending_thread_callback): New functions.
7121 (handle_status): Handle the case of multiple threads having
7122 interesting statuses to report. Report threads' real last signal
7123 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7124 with an interesting thread to report the status for, instead of
7125 always reporting the status of the first thread.
7126
28498c42
JB
71272014-01-01 Joel Brobecker <brobecker@adacore.com>
7128
7129 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7130 * gdbreplay.c (gdbreplay_version): Likewise.
7131
f45c82da
YZ
71322013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7133
7134 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7135 iov.iov_len with the real length in use.
7136
379a5e2d
JB
71372013-12-13 Joel Brobecker <brobecker@adacore.com>
7138
7139 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7140 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7141 for all targets that use win32-low.c.
7142 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7143 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7144
4210d83e
PA
71452013-12-13 Pedro Alves <palves@redhat.com>
7146
7147 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7148 if equal to TARGET_WAITKIND_LOADED.
7149 * win32-low.c (cached_status): New static global.
7150 (win32_wait): Add declaration.
7151 (do_initial_child_stuff): Flush all initial pending debug events
7152 up to the initial breakpoint.
7153 (win32_wait): If CACHED_STATUS was set, return that instead
7154 of doing a real wait. Remove the code resuming the execution
7155 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7156 during the initial phase. Also remove the code changing
7157 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7158 TARGET_WAITKIND_STOPPED.
7159
e7f0d979
YQ
71602013-12-11 Yao Qi <yao@codesourcery.com>
7161
7162 * notif.c (handle_notif_ack): Return 0 if no notification
7163 matches.
7164
ebcf782c
DE
71652013-11-20 Doug Evans <dje@google.com>
7166
7167 * linux-low.c (linux_set_resume_request): Fix comment.
7168
20ad9378
DE
71692013-11-20 Doug Evans <dje@google.com>
7170
7171 * linux-low.c (resume_status_pending_p): Tweak comment.
7172
a196ebeb
WT
71732013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7174
7175 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7176 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7177 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7178 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7179 (srv_amd64_regobj): Add amd64-mpx.o.
7180 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7181 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7182 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7183 * i387-fp.c (num_pl_bnd_register) Added constant.
7184 (num_pl_bnd_cfg_registers) Added constant.
7185 (struct i387_xsave) Added reserved area and MPX fields.
7186 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7187 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7188 function.
7189 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7190 (init_registers_amd64_mpx_linux): Declare new function.
7191 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7192 (x86_64_regmap): Add MPX registers.
7193 (x86_linux_read_description): Add MPX case.
7194 (initialize_low_arch): Initialize MPX targets.
7195
0080a2f6
TT
71962013-11-18 Tom Tromey <tromey@redhat.com>
7197
7198 * configure: Rebuild.
7199 * configure.ac: Don't check for stdlib.h.
7200 * gdbreplay.c: Unconditionally include stdlib.h.
7201
2978b111
TT
72022013-11-18 Tom Tromey <tromey@redhat.com>
7203
7204 * config.in: Rebuild.
7205 * configure: Rebuild.
7206 * configure.ac: Don't use AC_HEADER_DIRENT.
7207
a3d08894
TT
72082013-11-18 Tom Tromey <tromey@redhat.com>
7209
7210 * server.h: Don't check HAVE_STRING_H.
7211 * gdbreplay.c: Don't check HAVE_STRING_H.
7212 * configure: Rebuild.
7213
0a5dd17d
TT
72142013-11-18 Tom Tromey <tromey@redhat.com>
7215
7216 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7217 LIBGNU.
7218
1bd2f0ba
TT
72192013-11-08 Tom Tromey <tromey@redhat.com>
7220
7221 * configure, config.in: Rebuild.
7222 * configure.ac: Remove unused configury.
7223
3266f10b
TT
72242013-11-08 Tom Tromey <tromey@redhat.com>
7225
7226 * acinclude.m4: Include common.m4, codeset.m4.
7227 * configure, config.in: Rebuild.
7228 * configure.ac: Use GDB_AC_COMMON.
7229
6682d959
AA
72302013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7231
7232 * linux-s390-low.c (HWCAP_S390_TE): New define.
7233 (s390_arch_setup): Consider the TE field in the HWCAP for
7234 determining 'have_regset_tdb'.
7235
fd0a4d76
SDJ
72362013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7237
7238 PR gdb/16014
7239 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7240 call to sizeof.
7241
1a3d890b
PA
72422013-10-02 Pedro Alves <palves@redhat.com>
7243
7244 * server.c (process_serial_event): Don't output "GDBserver
7245 exiting" if GDB is connected through stdio.
7246 * target.c (mywait): Likewise, be silent if GDB is connected
7247 through stdio.
7248
97ad4581
JB
72492013-10-01 Joel Brobecker <brobecker@adacore.com>
7250
7251 * lynx-low.c (lynx_add_threads_after_attach): New function.
7252 (lynx_attach): Remove call to add_thread. Add call to
7253 lynx_add_threads_after_attach instead.
7254
5b4e221c
MF
72552013-09-28 Mike Frysinger <vapier@gentoo.org>
7256
7257 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7258 * config.in, configure: Regenerated.
7259
ee47b2f8
YQ
72602013-09-18 Yao Qi <yao@codesourcery.com>
7261
7262 PR server/15959
7263 * server.c (start_inferior): Clear 'resume_info'.
7264
d6707650 72652013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7266
d6707650
JW
7267 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7268 for each register.
7269
9243dd0e 72702013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7271
9243dd0e
JW
7272 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7273 linux-tile-low.o to srv_tgtobj.
7274
c623a6ef
WN
72752013-09-16 Will Newton <will.newton@linaro.org>
7276
7277 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7278 out regs.
7279
fb71d39e
PA
72802013-09-06 Pedro Alves <palves@redhat.com>
7281
7282 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7283 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7284 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7285 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7286 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7287 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7288
8e7e9910
PA
72892013-09-06 Pedro Alves <palves@redhat.com>
7290
7291 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7292 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7293
7c3a12ca
PA
72942013-09-06 Pedro Alves <palves@redhat.com>
7295
7296 * linux-amd64-ipa.c: Include tracepoint.h.
7297 * linux-i386-ipa.c: Include tracepoint.h.
7298
8eb3d7b6
RW
72992013-09-06 Ricard Wanderlof <ricardw@axis.com>
7300
7301 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7302 (ps_get_thread_area): New function.
7303
eddddb9d
RW
73042013-09-06 Ricard Wanderlof <ricardw@axis.com>
7305
7306 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7307 (initialize_low_arch): Call init_registers_crisv32 rather than
7308 init_register_crisv32.
7309
533b0600
PA
73102013-09-05 Pedro Alves <palves@redhat.com>
7311
7312 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7313 to ...
7314 * hostio.h: ... this new file.
7315 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7316 win32-low.c: Include hostio.h.
7317
0ce3d3b5
PA
73182013-09-05 Pedro Alves <palves@redhat.com>
7319
7320 * server.h (gdb_client_data, handler_func, callback_handler_func)
7321 (delete_file_handler, add_file_handler, append_callback_event)
7322 (delete_callback_event, start_event_loop, initialize_event_loop):
7323 Move to event-loop.h and include it.
7324 * event-loop.h: New file.
7325
799cdc37
PA
73262013-09-05 Pedro Alves <palves@redhat.com>
7327
7328 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7329 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7330 (loaded_dll, unloaded_dll): Move to ...
7331 * dll.h: ... this new file.
7332 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7333
6a6bbd9d
PA
73342013-09-05 Pedro Alves <palves@redhat.com>
7335
7336 * server.h (current_process, get_thread_process, all_processes)
7337 (add_inferior_to_list, for_each_inferior, current_inferior)
7338 (remove_inferior, add_process, remove_process, find_process_pid)
7339 (have_started_inferiors_p, have_attached_inferiors_p)
7340 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7341 (clear_inferiors, find_inferior, find_inferior_id)
7342 (inferior_target_data, set_inferior_target_data)
7343 (inferior_regcache_data, set_inferior_regcache_data): Move to
7344 inferiors.h, and include it.
7345 * inferiors.h: New file.
7346
f699aaba
PA
73472013-09-05 Pedro Alves <palves@redhat.com>
7348
7349 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7350 Move ...
72f4393d 7351 * ax.h: ... here.
f699aaba 7352
c144c7a0
PA
73532013-09-05 Pedro Alves <palves@redhat.com>
7354
7355 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7356 tracepoint.h.
7357 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7358 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7359 (handle_tracepoint_general_set, handle_tracepoint_query)
7360 (tracepoint_finished_step, tracepoint_was_hit)
7361 (release_while_stepping_state_list, current_traceframe)
7362 (in_readonly_region, traceframe_read_mem)
7363 (fetch_traceframe_registers, traceframe_read_sdata)
7364 (traceframe_read_info, struct fast_tpoint_collect_status)
7365 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7366 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7367 (supply_fast_tracepoint_registers)
7368 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7369 (ipa_tdesc, claim_trampoline_space)
7370 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7371 (agent_mem_read, agent_get_trace_state_variable_value)
7372 (agent_set_trace_state_variable_value, agent_tsv_read)
7373 (agent_mem_read_string, get_raw_reg_func_addr)
7374 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7375 * tracepoint.h: ... this new file.
7376
ff42e6ab
PA
73772013-09-05 Pedro Alves <palves@redhat.com>
7378
7379 * server.h (perror_with_name, error, fatal, warning, paddress)
7380 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7381 include it.
7382 * utils.h: New file.
7383
541af0f4
PA
73842013-09-05 Pedro Alves <palves@redhat.com>
7385
7386 * server.h (remote_debug, noack_mode, transport_is_reliable)
7387 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7388 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7389 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7390 (write_enn, initialize_async_io, enable_async_io)
7391 (disable_async_io, check_remote_input_interrupt_request)
7392 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7393 (dead_thread_notify, prepare_resume_reply)
7394 (decode_address_to_semicolon, decode_address, decode_m_packet)
7395 (decode_M_packet, decode_X_packet, decode_xfer_write)
7396 (decode_search_memory_packet, unhexify, hexify)
7397 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7398 (look_up_one_symbol, relocate_instruction)
7399 (monitor_output): Move to remote-utils.h, and include it.
7400 * remote-utils.h: New file.
7401
eebdf26b
PA
74022013-09-05 Pedro Alves <palves@redhat.com>
7403
7404 * server.h (_): Delete.
7405
3aafd2ff
PA
74062013-09-02 Pedro Alves <palves@redhat.com>
7407
7408 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7409 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7410 allocated.
7411 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7412
cee83bcb
PM
74132013-09-02 Pierre Muller <muller@sourceware.org>
7414
7415 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7416 or WriteProcessMemory complete successfully and handle
7417 ERROR_PARTIAL_COPY error.
7418
9a13b2fa
PA
74192013-09-02 Pedro Alves <palves@redhat.com>
7420
7421 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7422 error instead of EIO.
7423
602e3198
JK
74242013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7425
7426 PR server/15604
7427 * linux-low.c: Include filestuff.h.
7428 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7429 * lynx-low.c: Include filestuff.h.
7430 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7431 * server.c: Include filestuff.h.
7432 (main): Call notice_open_fds.
7433 * spu-low.c: Include filestuff.h.
7434 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7435
96d7229d
LM
74362013-08-22 Luis Machado <lgustavo@codesourcery.com>
7437
7438 * Makefile.in: Explain why ../target and ../nat are not
7439 listed as include file search paths.
7440 (linux-waitpid.o): New object file rule.
7441 * configure.srv (srv_native_linux_obj): New variable.
7442 Replace all occurrences of linux native object files with
7443 $srv_native_linux_obj.
7444 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7445 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7446 (linux_enable_event_reporting): Remove declaration.
7447 (my_waitpid): Moved to common/linux-waitpid.c.
7448 (linux_wait_for_event): Pass ptid when calling
7449 linux_enable_event_reporting.
7450 (linux_supports_tracefork_flag): Remove.
7451 (linux_enable_event_reporting): Likewise.
7452 (linux_tracefork_grandchild): Remove.
7453 (STACK_SIZE): Moved to common/linux-ptrace.c.
7454 (linux_tracefork_child): Remove.
7455 (linux_test_for_tracefork): Remove.
7456 (linux_look_up_symbols): Call linux_supports_traceclone.
7457 (initialize_low): Remove call to linux_test_for_tracefork.
7458 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7459 common/linux-ptrace.h.
7460 (PTRACE_TYPE_ARG4): Likewise.
7461 Include linux-ptrace.h.
7462
32940073
PA
74632013-08-21 Pedro Alves <palves@redhat.com>
7464
7465 * config.in: Renegerate.
7466
33b60d58 74672013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7468
33b60d58
LM
7469 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7470 (SFILES): Remove $(srcdir)/common/target-common.c and
7471 add $(srcdir)/target/waitstatus.c.
7472 (OBS): Remove target-common.o and add waitstatus.o.
7473 (server_h): Remove $(srcdir)/../common/target-common.h and
7474 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7475 and $(srcdir)/../target/waitstatus.h.
7476 (target-common.o): Remove.
7477 (waitstatus.o): New target object file.
7478 * target.h: Do not include target-common.h and
7479 include target/resume.h, target/wait.h and
7480 target/waitstatus.h.
7481
b8e1b30e
LM
74822013-08-13 Luis Machado <lgustavo@codesourcery.com>
7483
7484 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7485 to PTRACE_TYPE_ARG3.
7486 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7487 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7488 PTRACE_TYPE_ARG4.
7489 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7490 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7491
7a60ad40
YQ
74922013-07-27 Jie Zhang <jie@codesourcery.com>
7493 Daniel Jacobowitz <dan@codesourcery.com>
7494 Yao Qi <yao@codesourcery.com>
7495
7496 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7497 (mips-linux-watch.o): New rule.
7498 (mips_linux_watch_h): New variable.
7499 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7500 srv_tgtobj.
7501 * linux-mips-low.c: Include mips-linux-watch.h.
7502 (struct arch_process_info, struct arch_lwp_info): New.
7503 (update_watch_registers_callback): New function.
7504 (mips_linux_new_process, mips_linux_new_thread) New functions.
7505 (mips_linux_prepare_to_resume, mips_insert_point): New
7506 functions.
7507 (mips_remove_point, mips_stopped_by_watchpoint): New
7508 functions.
7509 (rsp_bp_type_to_target_hw_bp_type): New function.
7510 (mips_stopped_data_address): New function.
7511 (the_low_target): Add watchpoint support functions.
7512
de6f69ad
YQ
75132013-07-27 Yao Qi <yao@codesourcery.com>
7514
7515 * i386-low.c: Include break-common.h.
7516 (enum target_hw_bp_type): Remove.
7517
3360c0bf
LM
75182013-07-24 Luis Machado <lgustavo@codesourcery.com>
7519
7520 * Makefile.in (SFILES): /common/target-common.c.
7521 (OBS): Add target-common.o.
7522 (server_h): Add $(srcdir)/../common/target-common.h.
7523 (target-common.o): New target.
7524 * server.c (queue_stop_reply_callback): Free
7525 status string after use.
7526 * target.c (target_waitstatus_to_string): Remove.
7527 * target.h: Include target-common.h.
7528 (resume_kind): Likewise.
7529 (target_waitkind): Likewise.
7530 (target_waitstatus): Likewise.
7531 (TARGET_WNOHANG): Likewise.
7532
bd885420
YQ
75332013-07-04 Yao Qi <yao@codesourcery.com>
7534
7535 * Makefile.in (host_alias): Use @host_noncanonical@.
7536 (target_alias): Use @target_noncanonical@.
7537 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7538 ACX_NONCANONICAL_HOST.
7539 * configure: Regenerated.
7540
7541 Revert:
7542 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7543
7544 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7545 * configure: Rebuild.
7546 * Makefile.in (version_host, version_target): Get from configure.
7547 (version.c): Use $(version_host) and $(version_target).
7548
17ef446e
PA
75492013-07-03 Pedro Alves <palves@redhat.com>
7550
7551 * Makefile.in (config.status): Depend on development.sh.
7552 * acinclude.m4: Include libmcheck.m4.
7553 * configure: Regenerate.
7554
7a9a7487
MG
75552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7556
7557 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7558 attribute inside the parentheses.
7559 (winapi_DebugSetProcessKillOnExit): Ditto.
7560 (winapi_DebugBreakProcess): Ditto.
7561 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7562
49b64de6
MG
75632013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7564
7565 * notif.h (notif_event): Add a dummy member to avoid compiler
7566 errors.
7567
d5749ee7
PA
75682013-07-01 Pedro Alves <palves@redhat.com>
7569
7570 * hostio.c (HOSTIO_PATH_MAX): Define.
7571 (require_filename, handle_open, handle_unlink, handle_readlink):
7572 Use it.
7573
d8d2a3ee
PA
75742013-07-01 Pedro Alves <palves@redhat.com>
7575
7576 * server.h: Include "pathmax.h".
7577 * linux-low.c: Don't include sys/param.h.
7578 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7579 MAXPATHLEN.
7580 * win32-low.c: Don't include sys/param.h.
7581 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7582
bc7dea8d
PA
75832013-07-01 Pedro Alves <palves@redhat.com>
7584
7585 * event-loop.c: Don't check HAVE_UNISTD_H before including
7586 <unistd.h>.
7587 * gdbreplay.c: Likewise.
7588 * remote-utils.c: Likewise.
7589 * server.c: Likewise.
7590 * configure.ac: Don't check for unistd.h.
7591 * configure: Regenerate.
7592
d6c2da54
TT
75932013-06-28 Tom Tromey <tromey@redhat.com>
7594
7595 * Makefile.in (version.c): Use version.in, not
7596 common/version.in.
7597
257b6bec
MG
75982013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7599
7600 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7601 * configure: Rebuild.
7602 * Makefile.in (version_host, version_target): Get from configure.
7603 (version.c): Use $(version_host) and $(version_target).
7604
86ebe149
DK
76052013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7606
7607 Fix trace-status to output user name without trailing colon.
7608 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7609
f30aa5af
DK
76102013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7611
7612 Fix trace-status to output proper start-time and stop-time.
7613 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7614 output start time and stop time in hex as gdb expects.
7615
28a93511
YQ
76162013-06-26 Pedro Alves <pedro@codesourcery.com>
7617
7618 * tracepoint.c (build_traceframe_info_xml): Output trace state
7619 variables present in the trace buffer.
7620
01208463
TT
76212013-06-24 Tom Tromey <tromey@redhat.com>
7622
7623 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7624 create-version.sh.
7625 (version.o): Remove.
7626 * gdbreplay.c: Include version.h.
7627 (version, host_name): Don't declare.
7628 * server.h: Include version.h.
7629 (version, host_name): Don't declare.
7630
760256f9
PA
76312013-06-12 Pedro Alves <palves@redhat.com>
7632
7633 * linux-x86-low.c (linux_is_elf64): Delete global.
7634 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7635 with local linux_pid_exe_is_elf_64_file use.
7636
030031ee
PA
76372013-06-11 Pedro Alves <palves@redhat.com>
7638
7639 * linux-low.c (regset_disabled, disable_regset): New functions.
7640 (regsets_fetch_inferior_registers)
7641 (regsets_store_inferior_registers): Use them.
7642 (initialize_regsets_info); Don't allocate the disabled_regsets
7643 array here.
7644 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7645 comment.
7646
5da6eb0a
PA
76472013-06-11 Pedro Alves <palves@redhat.com>
7648
7649 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7650 xmalloc.
7651
7e5aaa09
PA
76522013-06-11 Pedro Alves <palves@redhat.com>
7653
7654 * linux-x86-low.c (initialize_low_arch): Call
7655 init_registers_x32_avx_linux.
7656
d878444c
JK
76572013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7658
7659 Fix compatibility with Android Bionic.
7660 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7661 it is not empty.
7662
3aee8918
PA
76632013-06-07 Pedro Alves <palves@redhat.com>
7664
5f2b57b5 7665 PR server/14823
3aee8918
PA
7666 * Makefile.in (OBS): Add tdesc.o.
7667 (IPA_OBJS): Add tdesc-ipa.o.
7668 (tdesc-ipa.o): New rule.
7669 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7670 interface.
7671 * linux-low.c (new_inferior): Delete.
7672 (disabled_regsets, num_regsets): Delete.
7673 (linux_add_process): Adjust to set the new per-process
7674 new_inferior flag.
7675 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7676 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7677 was a stop. When calling arch_setup, switch the current inferior
7678 to the thread that got an event.
7679 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7680 (regsets_fetch_inferior_registers)
7681 (regsets_store_inferior_registers): New regsets_info parameter.
7682 Adjust to use it.
7683 (linux_register_in_regsets): New regs_info parameter. Adjust to
7684 use it.
7685 (register_addr, fetch_register, store_register): New usrregs_info
7686 parameter. Adjust to use it.
7687 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7688 parameter regs_info. Adjust to use it.
7689 (linux_fetch_registers): Get the current inferior's regs_info, and
7690 adjust to use it.
7691 (linux_store_registers): Ditto.
7692 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7693 (initialize_low): Don't initialize the target_regsets here. Call
7694 initialize_low_arch.
7695 * linux-low.h (target_regsets): Delete declaration.
7696 (struct regsets_info): New.
7697 (struct usrregs_info): New.
7698 (struct regs_info): New.
7699 (struct process_info_private) <new_inferior>: New field.
7700 (struct linux_target_ops): Delete the num_regs, regmap, and
7701 regset_bitmap fields. New field regs_info.
7702 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7703 * i387-fp.c (num_xmm_registers): Delete.
7704 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7705 calls to new interface.
7706 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7707 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7708 Infer the number of xmm registers from the regcache's target
7709 description.
7710 * i387-fp.h (num_xmm_registers): Delete.
7711 * inferiors.c (add_thread): Don't install the thread's regcache
7712 here.
7713 * proc-service.c (gregset_info): Fetch the current inferior's
7714 regs_info. Adjust to use it.
7715 * regcache.c: Include tdesc.h.
7716 (register_bytes, reg_defs, num_registers)
7717 (gdbserver_expedite_regs): Delete.
7718 (get_thread_regcache): If the thread doesn't have a regcache yet,
7719 create one, instead of aborting gdbserver.
7720 (regcache_invalidate_one): Rename to ...
7721 (regcache_invalidate_thread): ... this.
7722 (regcache_invalidate_one): New.
7723 (regcache_invalidate): Only invalidate registers of the current
7724 process.
7725 (init_register_cache): Add target_desc parameter, and use it.
7726 (new_register_cache): Ditto. Assert the target description has a
7727 non zero registers_size.
7728 (regcache_cpy): Add assertions. Adjust.
7729 (realloc_register_cache, set_register_cache): Delete.
7730 (registers_to_string, registers_from_string): Adjust.
7731 (find_register_by_name, find_regno, find_register_by_number)
7732 (register_cache_size): Add target_desc parameter, and use it.
7733 (free_register_cache_thread, free_register_cache_thread_one)
7734 (regcache_release, register_cache_size): New.
7735 (register_size): Add target_desc parameter, and use it.
7736 (register_data, supply_register, supply_register_zeroed)
7737 (supply_regblock, supply_register_by_name, collect_register)
7738 (collect_register_as_string, collect_register_by_name): Adjust.
7739 * regcache.h (struct target_desc): Forward declare.
7740 (struct regcache) <tdesc>: New field.
7741 (init_register_cache, new_register_cache): Add target_desc
7742 parameter.
7743 (regcache_invalidate_thread): Declare.
7744 (regcache_invalidate_one): Delete declaration.
7745 (regcache_release): Declare.
7746 (find_register_by_number, register_cache_size, register_size)
7747 (find_regno): Add target_desc parameter.
7748 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7749 declarations.
7750 * remote-utils.c: Include tdesc.h.
7751 (outreg, prepare_resume_reply): Adjust.
7752 * server.c: Include tdesc.h.
7753 (gdbserver_xmltarget): Delete declaration.
7754 (get_features_xml, process_serial_event): Adjust.
7755 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7756 declare.
7757 (struct process_info) <tdesc>: New field.
7758 (ipa_tdesc): Declare.
7759 * tdesc.c: New file.
7760 * tdesc.h: New file.
7761 * tracepoint.c: Include tdesc.h.
7762 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7763 (get_context_regcache): Adjust to pass ipa_tdesc down.
7764 (do_action_at_tracepoint): Adjust to get the register cache size
7765 from the context regcache's description.
7766 (traceframe_walk_blocks): Adjust to get the register cache size
7767 from the current trace frame's description.
7768 (traceframe_get_pc): Adjust to get current trace frame's
7769 description and pass it down.
7770 (gdb_collect): Adjust to get the register cache size from the
7771 IPA's description.
7772 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7773 (gdbserver_xmltarget): Delete.
7774 (initialize_low_tracepoint): Set the ipa's target description.
7775 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7776 (initialize_low_tracepoint): Set the ipa's target description.
7777 * linux-x86-low.c: Include tdesc.h.
7778 [__x86_64__] (is_64bit_tdesc): New.
7779 (ps_get_thread_area, x86_get_thread_area): Use it.
7780 (i386_cannot_store_register): Rename to ...
7781 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7782 (i386_cannot_fetch_register): Rename to ...
7783 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7784 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7785 to new interface.
7786 (target_regsets): Rename to ...
7787 (x86_regsets): ... this.
7788 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7789 interface.
7790 (x86_siginfo_fixup): Use is_64bit_tdesc.
7791 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7792 (tdesc_x32_avx_linux, tdesc_x32_linux)
7793 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7794 Declare.
7795 (x86_linux_update_xmltarget): Delete.
7796 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7797 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7798 (AMD64_LINUX_USER64_CS): New.
7799 (x86_linux_read_description): New, based on
7800 x86_linux_update_xmltarget.
7801 (same_process_callback): New.
7802 (x86_arch_setup_process_callback): New.
7803 (x86_linux_update_xmltarget): New.
7804 (x86_regsets_info): New.
7805 (amd64_linux_regs_info): New.
7806 (i386_linux_usrregs_info): New.
7807 (i386_linux_regs_info): New.
7808 (x86_linux_regs_info): New.
7809 (x86_arch_setup): Reimplement.
7810 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7811 (x86_emit_ops): Ditto.
7812 (the_low_target): Adjust. Install x86_linux_regs_info,
7813 x86_cannot_fetch_register, and x86_cannot_store_register.
7814 (initialize_low_arch): New.
7815 * linux-ia64-low.c (tdesc_ia64): Declare.
7816 (ia64_fetch_register): Adjust.
7817 (ia64_usrregs_info, regs_info): New globals.
7818 (ia64_regs_info): New function.
7819 (the_low_target): Adjust.
7820 (initialize_low_arch): New function.
7821 * linux-sparc-low.c (tdesc_sparc64): Declare.
7822 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7823 Adjust.
7824 (sparc_arch_setup): New function.
7825 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7826 (the_low_target): Adjust.
7827 (initialize_low_arch): New function.
7828 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7829 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7830 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7831 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7832 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7833 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7834 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7835 (tdesc_powerpc_isa205_vsx64l): Declare.
7836 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7837 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7838 (ppc_set_pc, ppc_get_hwcap): Adjust.
7839 (ppc_usrregs_info): Forward declare.
7840 (!__powerpc64__) ppc_regmap_adjusted: New global.
7841 (ppc_arch_setup): Adjust to the current process'es target
7842 description.
7843 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7844 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7845 (ppc_store_evrregset): Adjust.
7846 (target_regsets): Rename to ...
7847 (ppc_regsets): ... this, and make static.
7848 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7849 (ppc_regs_info): New function.
7850 (the_low_target): Adjust.
7851 (initialize_low_arch): New function.
7852 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7853 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7854 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7855 (tdesc_s390x_linux64v2): Declare.
7856 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7857 (s390_fill_gregset, s390_store_last_break): Adjust.
7858 (target_regsets): Rename to ...
7859 (s390_regsets): ... this, and make static.
7860 (s390_get_pc, s390_set_pc): Adjust.
7861 (s390_get_hwcap): New target_desc parameter, and use it.
7862 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7863 (s390_arch_setup): Adjust to set the current process'es target
7864 description. Don't adjust the regmap.
7865 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7866 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7867 (regs_info_3264): New globals.
7868 (s390_regs_info): New function.
7869 (the_low_target): Adjust.
7870 (initialize_low_arch): New function.
7871 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7872 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7873 [__mips64] (init_registers_mips_linux)
7874 (init_registers_mips_dsp_linux): Delete defines.
7875 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7876 (have_dsp): New global.
7877 (mips_read_description): New, based on mips_arch_setup.
7878 (mips_arch_setup): Reimplement.
7879 (get_usrregs_info): New function.
7880 (mips_cannot_fetch_register, mips_cannot_store_register)
7881 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7882 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7883 (target_regsets): Rename to ...
7884 (mips_regsets): ... this, and make static.
7885 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7886 (dsp_regs_info, regs_info): New globals.
7887 (mips_regs_info): New function.
7888 (the_low_target): Adjust.
7889 (initialize_low_arch): New function.
7890 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7891 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7892 Declare.
7893 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7894 (arm_read_description): New, with bits factored from
7895 arm_arch_setup.
7896 (arm_arch_setup): Reimplement.
7897 (target_regsets): Rename to ...
7898 (arm_regsets): ... this, and make static.
7899 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7900 (arm_regs_info): New function.
7901 (the_low_target): Adjust.
7902 (initialize_low_arch): New function.
7903 * linux-m68k-low.c (tdesc_m68k): Declare.
7904 (target_regsets): Rename to ...
7905 (m68k_regsets): ... this, and make static.
7906 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7907 (m68k_regs_info): New function.
7908 (m68k_arch_setup): New function.
7909 (the_low_target): Adjust.
7910 (initialize_low_arch): New function.
7911 * linux-sh-low.c (tdesc_sharch): Declare.
7912 (target_regsets): Rename to ...
7913 (sh_regsets): ... this, and make static.
7914 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7915 (sh_regs_info, sh_arch_setup): New functions.
7916 (the_low_target): Adjust.
7917 (initialize_low_arch): New function.
7918 * linux-bfin-low.c (tdesc_bfin): Declare.
7919 (bfin_arch_setup): New function.
7920 (bfin_usrregs_info, regs_info): New globals.
7921 (bfin_regs_info): New function.
7922 (the_low_target): Adjust.
7923 (initialize_low_arch): New function.
7924 * linux-cris-low.c (tdesc_cris): Declare.
7925 (cris_arch_setup): New function.
7926 (cris_usrregs_info, regs_info): New globals.
7927 (cris_regs_info): New function.
7928 (the_low_target): Adjust.
7929 (initialize_low_arch): New function.
7930 * linux-cris-low.c (tdesc_crisv32): Declare.
7931 (cris_arch_setup): New function.
7932 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7933 (cris_regs_info): New function.
7934 (the_low_target): Adjust.
7935 (initialize_low_arch): New function.
7936 * linux-m32r-low.c (tdesc_m32r): Declare.
7937 (m32r_arch_setup): New function.
7938 (m32r_usrregs_info, regs_info): New globals.
7939 (m32r_regs_info): Adjust.
7940 (initialize_low_arch): New function.
7941 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7942 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7943 (tic6x_usrregs_info): Forward declare.
7944 (tic6x_read_description): New function, based on ...
7945 (tic6x_arch_setup): ... this. Reimplement.
7946 (target_regsets): Rename to ...
7947 (tic6x_regsets): ... this, and make static.
7948 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7949 (tic6x_regs_info): New function.
7950 (the_low_target): Adjust.
7951 (initialize_low_arch): New function.
7952 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7953 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7954 (target_regsets): Rename to ...
7955 (xtensa_regsets): ... this, and make static.
7956 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7957 globals.
7958 (xtensa_arch_setup, xtensa_regs_info): New functions.
7959 (the_low_target): Adjust.
7960 (initialize_low_arch): New function.
7961 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7962 (nios2_arch_setup): Set the current process'es tdesc.
7963 (target_regsets): Rename to ...
7964 (nios2_regsets): ... this.
7965 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7966 (nios2_regs_info): New function.
7967 (the_low_target): Adjust.
7968 (initialize_low_arch): New function.
a261b8f5
PA
7969 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7970 (aarch64_arch_setup): Set the current process'es tdesc.
7971 (target_regsets): Rename to ...
7972 (aarch64_regsets): ... this.
7973 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7974 (aarch64_regs_info): New function.
7975 (the_low_target): Adjust.
7976 (initialize_low_arch): New function.
3aee8918
PA
7977 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7978 globals.
7979 (target_regsets): Rename to ...
7980 (tile_regsets): ... this.
7981 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7982 (tile_regs_info): New function.
7983 (tile_arch_setup): Set the current process'es tdesc.
7984 (the_low_target): Adjust.
7985 (initialize_low_arch): New function.
7986 * spu-low.c (tdesc_spu): Declare.
7987 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7988 * win32-arm-low.c (tdesc_arm): Declare.
7989 (arm_arch_setup): New function.
7990 (the_low_target): Install arm_arch_setup instead of
7991 init_registers_arm.
7992 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7993 (init_windows_x86): Rename to ...
7994 (i386_arch_setup): ... this. Set `win32_tdesc'.
7995 (the_low_target): Adjust.
7996 * win32-low.c (win32_tdesc): New global.
7997 (child_add_thread): Don't create the thread cache here.
7998 (do_initial_child_stuff): Set the new process'es tdesc.
7999 * win32-low.h (struct target_desc): Forward declare.
8000 (win32_tdesc): Declare.
8001 * lynx-i386-low.c (tdesc_i386): Declare global.
8002 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8003 * lynx-low.c (lynx_tdesc): New global.
8004 (lynx_add_process): Set the new process'es tdesc.
8005 * lynx-low.h (struct target_desc): Forward declare.
8006 (lynx_tdesc): Declare global.
8007 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8008 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8009 * nto-low.c (nto_tdesc): New global.
8010 (do_attach): Set the new process'es tdesc.
8011 * nto-low.h (struct target_desc): Forward declare.
8012 (nto_tdesc): Declare.
8013 * nto-x86-low.c (tdesc_i386): Declare.
8014 (nto_x86_arch_setup): Set `nto_tdesc'.
8015
b1fbec62
GB
80162013-06-04 Gary Benson <gbenson@redhat.com>
8017
8018 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8019 to qSupported response when appropriate.
8020 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8021 with nonzero-length annex.
8022 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8023 arguments supplied in annex.
8024
d1ec4ce7
DE
80252013-05-31 Doug Evans <dje@google.com>
8026
ac44adcb 8027 PR server/15594
d1ec4ce7
DE
8028 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8029 64 bits in 64-cross-32 environment.
8030
9b25f2d3
PA
80312013-05-28 Pedro Alves <palves@redhat.com>
8032
8033 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8034 (aarch64-without-fpu.c): Delete rule.
8035 * configure.srv (aarch64*-*-linux*): Remove references to
8036 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8037 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8038 declaration.
8039
6740dc9c
PA
80402013-05-24 Pedro Alves <palves@redhat.com>
8041
8042 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8043 instead of strchr/decode_address. Error if the range isn't split
8044 with a ','. Don't assume there's be a ':' in the action.
8045
c2d6af84
PA
80462013-05-23 Yao Qi <yao@codesourcery.com>
8047 Pedro Alves <palves@redhat.com>
8048
8049 * linux-low.c (lwp_in_step_range): New function.
8050 (linux_wait_1): If the thread was range stepping and stopped
8051 outside the stepping range, report the stop to GDB. Otherwise,
8052 continue stepping. Add range stepping debug output.
8053 (linux_set_resume_request): Copy the step range from the resume
8054 request to the lwp.
8055 (linux_supports_range_stepping): New.
8056 (linux_target_ops) <supports_range_stepping>: Set to
8057 linux_supports_range_stepping.
8058 * linux-low.h (struct linux_target_ops)
8059 <supports_range_stepping>: New field.
8060 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8061 * linux-x86-low.c (x86_supports_range_stepping): New.
8062 (the_low_target) <supports_range_stepping>: Set to
8063 x86_supports_range_stepping.
8064 * server.c (handle_v_cont): Handle 'r' action.
8065 (handle_v_requests): Append ";r" if the target supports range
8066 stepping.
8067 * target.h (struct thread_resume) <step_range_start,
8068 step_range_end>: New fields.
8069 (struct target_ops) <supports_range_stepping>:
8070 New field.
8071 (target_supports_range_stepping): New macro.
8072
58794e1a
JB
80732013-05-17 Joel Brobecker <brobecker@adacore.com>
8074
8075 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8076 confusion in comment.
8077
d631c5a7
JB
80782013-05-17 Joel Brobecker <brobecker@adacore.com>
8079
8080 * lynx-low.c (struct process_info_private): New type.
8081 (lynx_add_process): New function.
8082 (lynx_create_inferior, lynx_attach): Replace calls to
8083 add_process by calls to lynx_add_process.
8084 (lynx_resume): If PTID is null, then try using
8085 current_process()->private->last_wait_event_ptid.
8086 Add comments.
8087 (lynx_clear_inferiors): Delete. The contents of that function
8088 has been inlined in lynx_mourn;
8089 (lynx_wait_1): Save the ptid in the process's private data.
8090 (lynx_mourn): Free the process' private data. Replace call
8091 to lynx_clear_inferiors by call to clear_inferiors.
8092
96f7a20f
YQ
80932013-05-17 Yao Qi <yao@codesourcery.com>
8094
8095 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8096 the right place.
8097
db0dfaa0
LM
80982013-05-16 Luis Machado <lgustavo@codesourcery.com>
8099
8100 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8101 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8102 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8103 PT_TEXT_END_ADDR guards. Update comments.
8104 (linux_target_op) <read_offsets>: Conditionally define to
8105 linux_read_offsets if the target is UCLIBC and if it defines
8106 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8107
68f5f838
SL
81082013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8109 Andrew Jenner <andrew@codesourcery.com>
8110
8111 * Makefile.in (SFILES): Add linux-nios2-low.c.
8112 (clean): Add action to delete nios2-linux.c.
8113 (nios2-linux.c): New rule.
8114 * configure.srv: Add nios2*-*-linux*.
8115 * linux-nios2-low.c: New.
8116
1ebff1fd
HAQ
81172013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8118
8119 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8120
f6150862
HZ
81212013-04-25 Hui Zhu <hui@codesourcery.com>
8122
8123 PR gdb/15186
f6150862
HZ
8124 * ax.c (ax_printf): Add fflush.
8125
614c279d
TT
81262013-04-22 Tom Tromey <tromey@redhat.com>
8127
8128 * Makefile.in (SFILES): Add filestuff.c.
8129 (OBS): Add filestuff.o.
8130 (filestuff.o): New target.
8131 * config.in, configure: Rebuild.
8132 * configure.ac: Check for fdwalk, pipe2.
8133
7d4e5717
PA
81342013-04-17 Pedro Alves <palves@redhat.com>
8135
8136 * configure.ac (USE_THREAD_DB): Delete variable.
8137 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8138 Don't AC_SUBST USE_THREAD_DB.
8139 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8140 * config.in, configure: Regenerate.
8141
d5c93e41
PA
81422013-04-16 Pedro Alves <palves@redhat.com>
8143
8144 * linux-low.h (struct lwp_info) <thread_known>: Move under
8145 the USE_THREAD_DB #ifdef.
8146
04f5fe89
PA
81472013-04-16 Pedro Alves <palves@redhat.com>
8148
8149 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8150 (linux-low.o): Delete rule.
8151 * linux-low.h: Always include "gdb_thread_db.h" instead of
8152 conditionally including thread_db.h.
8153 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8154 HAVE_THREAD_DB_H.
8155
480b27bf
JK
81562013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8157
8158 * Makefile.in (install-only): Fix make install regression.
8159
43662968
JK
81602013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8161
8162 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8163 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8164 installation.
8165 * gdbserver.1: Remove.
8166
3e74e146
PA
81672013-03-22 Pedro Alves <palves@redhat.com>
8168
8169 * linux-low.c (handle_extended_wait): Don't call
8170 linux_enable_event_reporting.
8171
a8347a2a
TT
81722013-03-15 Tony Theodore <tonyt@logyst.com>
8173
8174 PR build/9098:
8175 * Makefile.in (SHELL): Use @SHELL@.
8176
eeb56fa7
SDJ
81772013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8178
8179 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8180 compiler warning.
8181
4fa7e2ff
JB
81822013-03-13 Joel Brobecker <brobecker@adacore.com>
8183
8184 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8185 Remove extraneous NULL element.
8186
8ddb1965
YQ
81872013-03-13 Yao Qi <yao@codesourcery.com>
8188
8189 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8190 'V' block in trace frame.
8191
9accd112
MM
81922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8193
8194 * target.h (struct target_ops): Add btrace ops.
8195 (target_supports_btrace): New macro.
8196 (target_enable_btrace): New macro.
8197 (target_disable_btrace): New macro.
8198 (target_read_btrace): New macro.
8199 * gdbthread.h (struct thread_info): Add btrace field.
8200 * server.c: Include btrace-common.h.
8201 (handle_btrace_general_set): New function.
8202 (handle_btrace_enable): New function.
8203 (handle_btrace_disable): New function.
8204 (handle_general_set): Call handle_btrace_general_set.
8205 (handle_qxfer_btrace): New function.
8206 (struct qxfer qxfer_packets[]): Add btrace entry.
8207 * inferiors.c (remove_thread): Disable btrace.
8208 * linux-low: Include linux-btrace.h.
8209 (linux_low_enable_btrace): New function.
8210 (linux_low_read_btrace): New function.
8211 (linux_target_ops): Add btrace ops.
8212 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8213 Add srv_linux_btrace=yes.
8214 (x86_64-*-linux*): Add linux-btrace.o.
8215 Add srv_linux_btrace=yes.
8216 * configure.ac: Define HAVE_LINUX_BTRACE.
8217 * config.in: Regenerated.
8218 * configure: Regenerated.
8219
5cc22e4c
MM
82202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8221
8222 * server.c (handle_qxfer): Preserve error message if -3 is
8223 returned.
8224 (qxfer): Document the -3 return value.
8225
7c97f91e
MM
82262013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8227
8228 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8229 (linux_btrace_h): New variable.
8230 (linux-btrace.o): New rule.
8231
be9a119c 82322013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8233 Hafiz Abid Qadeer <abidh@codesourcery.com>
8234
8235 * tracepoint.c (trace_buffer_size): New global.
8236 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8237 (init_trace_buffer): Change to one-argument function. Allocate
8238 trace buffer memory.
8239 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8240 handle QTBuffer:size packet.
8241 (cmd_bigqtbuffer_size): New function.
8242 (initialize_tracepoint): Call init_trace_buffer with
8243 DEFAULT_TRACE_BUFFER_SIZE.
8244 * server.c (handle_query): Add QTBuffer:size in the
8245 supported packets.
8246
e64f7499
YQ
82472013-03-07 Yao Qi <yao@codesourcery.com>
8248
8249 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8250 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8251 of -1.
8252 (cmd_qtsp): Adjust condition. Do post increment.
8253 Set cur_action and cur_step_action back to 0.
8254
f0ae6fc3
PA
82552013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8256
8257 PR server/15236
8258 * linux-low.c (linux_write_memory): Return early success if LEN is
8259 zero.
8260
b5b0b0af
CV
82612013-03-05 Corinna Vinschen <vinschen@redhat.de>
8262
334ad4a8 8263 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8264
589bc927
TT
82652013-02-28 Tom Tromey <tromey@redhat.com>
8266
8267 * configure.ac: Invoke AC_SYS_LARGEFILE.
8268 * configure, config.in: Rebuild.
8269
dfe07582
CV
82702013-02-28 Corinna Vinschen <vinschen@redhat.com>
8271
8272 * win32-low.c: Throughout, fix format strings and casts of
8273 printf-like functions to avoid type related warnings on all
8274 platforms.
8275 (get_child_debug_event): Print dwDebugEventCode as hex since
8276 that's how it's usually documented.
8277
736cd585
YQ
82782013-02-28 Yao Qi <yao@codesourcery.com>
8279
8280 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8281 pulongest.
8282
e1f58301
JW
82832013-02-27 Jiong Wang <jiwang@tilera.com>
8284
8285 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8286 (reg-tilegx32.c): New rule.
8287 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8288 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8289 different register info initializer according to elf class.
8290 (init_registers_tilgx32): New function. The tilegx32 register info
8291 initializer.
8292 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8293 (tile_store_gregset): Likewise.
8294
d171ca78
YQ
82952013-02-27 Yao Qi <yao@codesourcery.com>
8296
8297 * server.c (process_point_options): Print debug message when
8298 debug_threads is true.
8299
282bbdf3
YQ
83002013-02-26 Yao Qi <yao@codesourcery.com>
8301
8302 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8303
aca22551
PA
83042013-02-19 Pedro Alves <palves@redhat.com>
8305 Kai Tietz <ktietz@redhat.com>
8306
8307 PR gdb/15161
8308
8309 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8310 instead of strtoul to extract address from packet.
8311 (process_serial_event) <'z'>: Likewise.
8312
4f3cee1c
YQ
83132013-02-18 Yao Qi <yao@codesourcery.com>
8314
8315 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8316
8e1d55a3
PA
83172013-02-14 Pedro Alves <palves@redhat.com>
8318
8319 Plug memory leak.
8320
8321 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8322 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8323
458820da
PA
83242013-02-14 Pedro Alves <palves@redhat.com>
8325
8326 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8327
baea0dae
PA
83282013-02-14 Pedro Alves <palves@redhat.com>
8329
8330 * tracepoint.c (save_string): Delete.
8331 (add_tracepoint_action): Use savestring instead of save_string.
8332
0b1afbb3
PA
83332013-02-12 Pedro Alves <palves@redhat.com>
8334
8335 * linux-xtensa-low.c: Ditto.
8336 * xtensa-xtregs.c: Ditto.
8337
8a4ac37e
PA
83382013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8339
8340 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8341 thread_db.
8342
148de6bb
MS
83432013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8344
8345 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8346 aarch64_num_wp_regs and aarch64_num_bp_regs to
8347 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8348
55fac6e0
MS
83492013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8350
8351 * linux-aarch64-low.c (ps_get_thread_area): Replace
8352 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8353
176eb98c
MS
83542013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8355 Marcus Shawcroft <marcus.shawcroft@arm.com>
8356 Nigel Stephens <nigel.stephens@arm.com>
8357 Yufeng Zhang <yufeng.zhang@arm.com>
8358
8359 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8360 (aarch64.c, aarch64-without-fpu.c): New targets.
8361 * configure.srv (aarch64*-*-linux*): New.
8362 * linux-aarch64-low.c: New file.
8363
56f7af9c
MS
83642013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8365
43aaf8b6 8366 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8367 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8368 (dequeue_one_deferred_signal, linux_resume_one_thread)
8369 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8370 (linux_tracefork_grandchild, linux_test_for_tracefork)
8371 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8372 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8373 where the argument is 0.
8374
60f662b0
YQ
83752013-01-25 Yao Qi <yao@codesourcery.com>
8376
8377 * event-loop.c: Include "queue.h".
8378 (gdb_event_p): New typedef.
8379 (struct gdb_event) <next_event>: Remove.
8380 (event_queue): Change to QUEUE(gdb_event_p).
8381 (async_queue_event): Remove.
8382 (gdb_event_xfree): New.
8383 (initialize_event_loop): New.
8384 (process_event): Use API from QUEUE.
8385 (wait_for_event): Likewise.
8386 * server.c (main): Call initialize_event_loop.
8387 * server.h (initialize_event_loop): Declare.
8388
5ae4861a
YQ
83892013-01-18 Yao Qi <yao@codesourcery.com>
8390
8391 * ax.h (struct eval_agent_expr_context): New.
8392 (gdb_eval_agent_expr): Update declaration.
8393 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8394 TFRAME. Add new argument CTX.
8395 * server.h (struct eval_agent_expr_context): Declare.
8396 (agent_mem_read, agent_tsv_read): Update declaration.
8397 (agent_mem_read_string): Likewise.
8398 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8399 (add_traceframe_block): Add new argument TPOINT.
8400 Increase TPOINT->traceframe_usage.
8401 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8402 eval_tracepoint_agent_expr.
8403 (condition_true_at_tracepoint): Likewise.
8404 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8405 (agent_mem_read_string, agent_tsv_read): Likewise.
8406
85e00e85
YQ
84072013-01-16 Yao Qi <yao@codesourcery.com>
8408
8409 * linux-low.c (linux_resume_one_lwp): Don't check
8410 'lwp->bp_reinsert != 0'.
8411
4039cf45
JB
84122013-01-07 Joel Brobecker <brobecker@adacore.com>
8413 Pedro Alves <palves@redhat.com>
8414
8415 * lynx-low.c (ptrace_request_to_str): Define a temporary
8416 macro and use it to simplify this function's implementation.
8417
9044dee2
JB
84182013-01-07 Joel Brobecker <brobecker@adacore.com>
8419
8420 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8421 sets errno.
8422
e6352c8f
JB
84232013-01-07 Joel Brobecker <brobecker@adacore.com>
8424
8425 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8426
50681a27
JB
84272013-01-07 Joel Brobecker <brobecker@adacore.com>
8428
8429 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8430
3f6e77ef
JB
84312013-01-07 Joel Brobecker <brobecker@adacore.com>
8432
8433 * lynx-low.c (lynx_resume): Use the resume_info parameter
8434 to determine the ptid for the lynx_ptrace call, unless
8435 it is equal to minus_one_ptid, in which case we use the
8436 ptid of the current_inferior.
8437 (lynx_wait_1): After having received a thread create/exit
8438 event, resume the inferior's execution using the signaling
8439 thread's ptid, rather than the old ptid.
8440
7fda33ae
JB
84412013-01-07 Joel Brobecker <brobecker@adacore.com>
8442
8443 * lynx-low.c (lynx_resume): Delete variable ret.
8444
b9786c74
JB
84452013-01-01 Joel Brobecker <brobecker@adacore.com>
8446
8447 * gdbreplay.c (gdbreplay_version): Update copyright year.
8448 * server.c (gdbserver_version): Likewise.
8449
8b93d60f
JB
84502012-12-17 Joel Brobecker <brobecker@adacore.com>
8451
8452 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8453 new thread.
8454
037335a7
JB
84552012-12-17 Joel Brobecker <brobecker@adacore.com>
8456
8457 * lynx-low.c (ptrace_request_to_str): Add handling for
8458 PTRACE_GETTRACESIG.
8459
52d4cbd8
JB
84602012-12-17 Joel Brobecker <brobecker@adacore.com>
8461
8462 * lynx-low.c (lynx_attach): Delete variable new_process.
8463
ab8f6ca9
JB
84642012-12-17 Joel Brobecker <brobecker@adacore.com>
8465
8466 * lynx-low.c (lynx_create_inferior): Delete variable
8467 new_process.
8468
78cbc024
JB
84692012-12-17 Joel Brobecker <brobecker@adacore.com>
8470
8471 * lynx-low.c (ptrace_request_to_str): Do not handle
8472 PTRACE_GETTHREADLIST if this macro does not exist.
8473
14a00470
YQ
84742012-12-15 Yao Qi <yao@codesourcery.com>
8475
8476 * Makefile.in (OBS): Add notif.o.
8477 * notif.c, notif.h: New.
8478 * server.c: Include "notif.h".
8479 (struct vstop_notif) <next>: Remove.
8480 <base>: New field.
8481 (queue_stop_reply): Update.
8482 (push_event, send_next_stop_reply): Remove.
8483 (discard_queued_stop_replies): Update.
8484 (notif_stop): New variable.
8485 (handle_v_stopped): Remove.
8486 (handle_v_requests): Don't call handle_v_stopped. Call
8487 handle_ack_notif instead.
8488 (queue_stop_reply_callback): Call notif_event_enque instead
8489 of queue_stop_reply.
8490 (handle_status): Don't call send_next_stop_reply, call
8491 notif_write_event instead.
8492 (kill_inferior_callback): Likewise.
8493 (detach_or_kill_inferior_callback): Likewise.
8494 (main): Call initialize_notif.
8495 (process_serial_event): Call QUEUE_is_empty.
8496 (handle_target_event): Call notif_push instead of push event.
8497 * server.h (push_event): Remove declaration.
8498
61c125b9
TT
84992012-12-10 Tom Tromey <tromey@redhat.com>
8500
8501 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8502 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8503 macros.
8504 (.c.o): Rewrite.
8505 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8506 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8507 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8508 (amd64-linux-ipa.o, ax.o): Rewrite.
8509 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8510 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8511 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8512 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8513 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8514 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8515 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8516 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8517 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8518 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8519 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8520 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8521 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8522 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8523 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8524 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8525 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8526 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8527 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8528 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8529 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8530 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8531 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8532 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8533 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8534 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8535 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8536 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8537 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8538 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8539 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8540 (reg-tilegx.o): Remove.
8541 (all_object_files): New macro.
8542 Include .deps files.
8543 * aclocal.m4, configure: Rebuild.
8544 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8545 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8546 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8547
e90e9ad9
TT
85482012-12-05 Tom Tromey <tromey@redhat.com>
8549
8550 PR gdb/14917:
8551 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8552
02d403bf 85532012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8554
8555 * configure.ac: Check for linux/perf_event.h.
8556 * config.in: Regenerated.
8557 * configure: Regenerated.
8558
0270a750
PA
85592012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8560
8561 * hostio.c (handle_readlink): Decrease buffer size
8562 parameter passed to readlink by one byte.
8563
8c29b58e
YQ
85642012-11-26 Yao Qi <yao@codesourcery.com>
8565
8566 * configure.ac (build_warnings): Append '-Wempty-body'.
8567 * configure: Regenerated.
8568 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8569 body.
8570
8bdce1ff
PM
85712012-11-15 Pierre Muller <muller@sourceware.org>
8572
8573 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8574 * config.in: Regenerate.
8575 * configure: Regenerate.
8576 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8577 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8578 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8579 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8580 header.
8581 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8582 instead of <sys/wait.h> header.
8583 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8584
02d403bf 85852012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8586
8587 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8588 (various make rules): Remove -DGDBSERVER
8589
fbd5db48
YQ
85902012-11-09 Yao Qi <yao@codesourcery.com>
8591
8592 * spu-low.c (current_ptid): Move it to ..
8593 * gdbthread.h: ... here. New.
8594 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8595 * server.c (myresume, process_serial_event): Likewise.
8596 * thread-db.c (thread_db_find_new_threads): Likewise.
8597 * tracepoint.c (run_inferior_command): Likewise.
8598
b3dc46ff
AB
85992012-10-01 Andrew Burgess <aburgess@broadcom.com>
8600
8601 * server.c (handle_search_memory_1): Include access length in
8602 warning message.
8603
07c04788
HPN
86042012-09-05 Michael Brandt <michael.brandt@axis.com>
8605
8606 * linux-crisv32-low.c: Fix compile errors.
8607
918d227b
YQ
86082012-09-04 Yao Qi <yao@codesourcery.com>
8609
8610 * tracepoint.c (cmd_qtsv): Adjust debug message.
8611 Don't check CUR_TPOINT.
8612
18c1b81a
YQ
86132012-08-28 Yao Qi <yao@codesourcery.com>
8614
8615 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8616 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8617 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8618 Remove declarations of xmalloc, xreallloc, xstrdup and
8619 freeargv.
8620 * Makefile.in (libiberty_h): New.
8621 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8622 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8623
dc82f37b
YQ
86242012-08-23 Yao Qi <yao@codesourcery.com>
8625
8626 * server.h: Remove declaration of 'xsnprintf'.
8627
406b1477
KS
86282012-08-22 Keith Seitz <keiths@redhat.com>
8629
8630 * server.h: Include build-gnulib-gbserver/config.h.
8631 * gdbreplay.c: Likewise.
8632
e6712ff1
DE
86332012-08-08 Doug Evans <dje@google.com>
8634
8635 * Makefile.in (SFILES): Add gdb_vecs.c.
8636 (OBS): Add gdb_vecs.o.
8637 (gdb_vecs_h, host_defs_h): New variables.
8638 (thread-db.o): Add $(gdb_vecs_h) dependency.
8639 (gdb_vecs.o): New rule.
8640 * thread-db.c: #include "gdb_vecs.h".
8641 (thread_db_load_search): Use a vector to iterate over path elements.
8642 Handle text appearing after "$pdir".
8643
8644 * configure.ac: Add check for strstr.
8645 * config.in: Regenerate.
8646 * configure: Regenerate.
8647
7c3270ae
UW
86482012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8649
8650 * hostio.c (handle_pread): If pread fails, fall back to attempting
8651 lseek/read.
8652 (handle_pwrite): Likewise for pwrite.
8653
b62e2b27
UW
86542012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8655
8656 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8657 between unsupported TYPE and unimplementable ADDR/LEN combination.
8658 (arm_insert_point): Act on new return value.
8659
78a99e91
PA
86602012-07-31 Pedro Alves <palves@redhat.com>
8661
8662 * server.c (process_point_options): Only skip tokens if we find
8663 one that is unrecognized. Don't treat 'X' specially while
8664 skipping unrecognized tokens.
8665
fcf303ab
UW
86662012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8667
8668 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8669 to 4-byte-align HW breakpoint addresses for Thumb.
8670
7255706c
YQ
86712012-07-27 Yao Qi <yao@codesourcery.com>
8672
8673 PR remote/14161.
8674
8675 * server.h: Declare gdb_agent_about_to_close.
8676 * target.c (kill_inferior): Include "agent.h".
8677 New. Send command 'kill'.
8678 * target.h (kill_inferior): Removed macro.
8679 * tracepoint.c (gdb_agent_about_to_close): New.
8680 (gdb_agent_helper_thread): Handle command 'close'.
8681 Wait endlessly until the inferior stops.
8682 Install gdb_agent_remove_socket to atexit hook.
8683 (agent_socket_name): New static variable.
8684 (gdb_agent_socket_init): Replace local variable 'name' with
8685 'agent_socket_name'.
8686 (gdb_agent_remove_socket): New.
8687
5a3f286f
YQ
86882012-07-27 Yao Qi <yao@codesourcery.com>
8689
8690 * server.c (process_point_options): Stop at 'X' when parsing.
8691
961bd387
ME
86922012-07-19 Michael Eager <eager@eagercon.com>
8693
a261b8f5 8694 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8695 to hw_execute.
8696 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8697 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8698 hardware breakpoint.
8699
aa7c7447
JK
87002012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8701
8702 * gdbserver/linux-low.c (initialize_low): Call
8703 linux_ptrace_init_warnings.
8704
7f216e7c
DE
87052012-07-02 Doug Evans <dje@google.com>
8706
8707 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8708 pointer to int.
8709
d3ce09f5
SS
87102012-07-02 Stan Shebs <stan@codesourcery.com>
8711
8712 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8713 (ax.o): Add it to build rule.
8714 (ax-ipa.o): Ditto.
8715 (OBS): Add format.o.
8716 (IPA_OBS): Add format.o.
8717 * server.c (handle_query): Claim support for breakpoint commands.
8718 (process_point_options): Add command case.
8719 (process_serial_event): Leave running if there are printfs in
8720 effect.
8721 * mem-break.h (any_persistent_commands): Declare.
8722 (add_breakpoint_commands): Declare.
8723 (gdb_no_commands_at_breakpoint): Declare.
8724 (run_breakpoint_commands): Declare.
8725 * mem-break.c (struct point_command_list): New struct.
8726 (struct breakpoint): New field command_list.
8727 (any_persistent_commands): New function.
8728 (add_commands_to_breakpoint): New function.
8729 (add_breakpoint_commands): New function.
8730 (gdb_no_commands_at_breakpoint): New function.
8731 (run_breakpoint_commands): New function.
8732 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8733 locally.
8734 * ax.c: Include format.h.
8735 (ax_printf): New function.
8736 (gdb_eval_agent_expr): Add printf opcode.
8737
2f8f6aed
YQ
87382012-06-13 Yao Qi <yao@codesourcery.com>
8739
8740 * server.c (start_inferior): Remove duplicated writes to fields
8741 'last_resume_kind' and 'last_status' of 'current_inferior'.
8742
0c9070b3
YQ
87432012-06-12 Yao Qi <yao@codesourcery.com>
8744 Pedro Alves <palves@redhat.com>
8745
8746 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8747 comment.
8748 * server.c (handle_v_cont): Extend comment.
8749
c52daf70
YQ
87502012-06-11 Yao Qi <yao@codesourcery.com>
8751
8752 * linux-low.c (linux_attach): Add 'static'.
8753
d38bbb0a
YQ
87542012-06-06 Yao Qi <yao@codesourcery.com>
8755
8756 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8757
89dc0afd
JK
87582012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8759
8760 Fix gcc -flto compilation warning.
8761 * server.c (main): Make variable multi_mode and attach volatile.
8762
75f62ce7
TJB
87632012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8764
8765 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8766 if the platform doesn't know about it.
8767
65f479b6
PA
87682012-05-30 Jeff Kenton <jkenton@tilera.com>
8769
8770 * Makefile.in (SFILES): Add linux-tile-low.c.
8771 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8772 * configure.srv: Handle tilegx-*-linux*.
8773 * linux-tile-low.c: New file.
8774
0c5bf5a9
JK
87752012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8776
8777 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8778
a493e3e2
PA
87792012-05-24 Pedro Alves <palves@redhat.com>
8780
8781 PR gdb/7205
8782
43aaf8b6 8783 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8784
2ea28649
PA
87852012-05-24 Pedro Alves <palves@redhat.com>
8786
8787 PR gdb/7205
8788
8789 Replace target_signal with gdb_signal throughout.
8790
8d409d16
MR
87912012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8792
8793 * linux-low.c (linux_store_registers): Avoid the copying sequence
8794 when no data has been retrieved by ptrace.
8795
23512c01
MGD
87962012-05-22 Will Deacon <will.deacon@arm.com>
8797
8798 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8799 Include asm/ptrace.h.
8800 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8801 already defined.
8802
4934b29e
MR
88032012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8804
8805 * linux-low.c (linux_store_registers): Don't re-retrieve data
8806 with ptrace that has already been obtained from /proc. Always
8807 copy any data retrieved with ptrace to the buffer supplied.
8808
bde24c0a
PA
88092012-05-11 Yao Qi <yao@codesourcery.com>
8810 Pedro Alves <palves@redhat.com>
8811
8812 * linux-low.c (enum stopping_threads_kind): New.
8813 (stopping_threads): Change type to `enum stopping_threads_kind'.
8814 (handle_extended_wait): If stopping and suspending threads, leave
8815 the new_lwp suspended too.
8816 (linux_wait_for_event): Adjust.
8817 (stop_all_lwps): Set `stopping_threads' to
8818 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8819 whether we're suspending threads or just stopping them. Assert no
8820 recursion happens.
8821
623b6bdf
YQ
88222012-04-29 Yao Qi <yao@codesourcery.com>
8823
8824 * server.h: Move some code to ...
8825 * gdbthread.h: ... here. New.
8826 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8827 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8828 (nto-low.o, win32-low.o): Likewise.
8829 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8830 * regcache.c, remote-utils.c, server.c: Likewise.
8831 * target.c, tracepoint.c, win32-low.c: Likewise.
8832
f15f9948
TJB
88332012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8834
8835 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8836 (PTRACE_ARG4_TYPE): Likewise.
8837 (PTRACE_XFER_TYPE): Likewise.
8838 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8839 ptrace to PTRACE_ARG3_TYPE.
8840 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8841 (PTRACE_ARG4_TYPE): Likewise.
8842 (PTRACE_XFER_TYPE): Likewise.
8843 (linux_detach_one_lwp): Cast fourth argument of
8844 ptrace to long then PTRACE_ARG4_TYPE.
8845 (regsets_fetch_inferior_registers): Cast third argument of
8846 ptrace to long then PTRACE_ARG3_TYPE.
8847 (regsets_store_inferior_registers): Likewise.
8848
38ea300a
PA
88492012-04-20 Pedro Alves <palves@redhat.com>
8850
8851 * configure: Regenerate.
8852
c971b7fa
PA
88532012-04-19 Pedro Alves <palves@redhat.com>
8854
43aaf8b6 8855 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8856 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8857 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8858 (all, install-only, uninstall, clean-info, all-lib, clean): No
8859 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8860 (maintainer-clean realclean distclean): Use subdir_do.
8861 (subdir_do): New.
8862 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8863 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8864 * acinclude.m4: Include acx_configure_dir.m4.
8865 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8866 calls. Call AC_PROG_RANLIB. Configure gnulib using
8867 ACX_CONFIGURE_DIR.
8868 (GNULIB): New.
8869 (GNULIB_STDINT_H): Adjust.
8870 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8871 * gdbreplay.c: Include build-gnulib/config.h.
8872 * server.h: Likewise.
8873 * aclocal.m4: Regenerate.
8874 * config.in: Regenerate.
8875 * configure: Regenerate.
c971b7fa 8876
809277f8
PA
88772012-04-19 Pedro Alves <palves@redhat.com>
8878
8879 * Makefile.in (LIBGNU, INCGNU): Adjust.
8880 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8881 (all, install-only, uninstall, clean-info, all-lib, clean)
8882 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8883 * configure.ac: Adjust AC_OUTPUT output.
8884 * aclocal.m4: Regenerate.
8885 * configure: Regenerate.
8886
fd9bb8b8
PA
88872012-04-19 Pedro Alves <palves@redhat.com>
8888
8889 * Makefile.in (generated_files): New.
8890 (server_h): Remove the explicit dependency on config.h, and depend
8891 on $generated_files.
8892
1c298c66
PA
88932012-04-19 Pedro Alves <palves@redhat.com>
8894
8895 * Makefile.in (INCGNU): Add -Ignulib.
8896
57c4b50b
PA
88972012-04-19 Pedro Alves <palves@redhat.com>
8898
8899 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8900 (INCGNU): ... this, and spell out -I here.
8901 (GNULIB_LIB): Rename to ...
8902 (LIBGNU): ... this.
8903 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8904
1030e047
PA
89052012-04-19 Pedro Alves <palves@redhat.com>
8906
8907 * config.in: Regenerate.
8908
447d4319
PA
89092012-04-19 Pedro Alves <palves@redhat.com>
8910
8911 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8912 * server.h (memmem): Remove declaration.
8913 * config.in: Regenerate.
8914 * configure: Regenerate.
8915
aad9eab9
YQ
89162012-04-19 Yao Qi <yao@codesourcery.com>
8917
8918 * Makefile.in (SFILES): Add common/vec.c.
8919 (OBS): Add vec.o.
8920 (vec.o): New rule.
8921
3e10640f
YQ
89222012-04-19 Yao Qi <yao@codesourcery.com>
8923
8924 * remote-utils.c (prepare_resume_reply): Replace with macro
8925 target_core_of_thread.
8926 * server.c (handle_qxfer_threads_proper): Likewise.
8927 * target.h (traget_core_of_thread): New macro.
8928
71622373
PA
89292012-04-18 Pedro Alves <palves@redhat.com>
8930
8931 * aclocal.m4: Regenerate.
8932 * configure: Regenerate.
8933
80d26939
YQ
89342012-04-16 Yao Qi <yao@codesourcery.com>
8935
8936 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8937 duplicated on address.
8938
42476b70
YQ
89392012-04-16 Yao Qi <yao@codesourcery.com>
8940
8941 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8942 (struct tracepoint_action_ops) <send>: New field.
8943 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8944 (agent_expr_send, x_tracepoint_action_send): New.
8945 (l_tracepoint_action_send): New.
8946 (cmd_qtdp): Download and install tracepoint
8947 according to `use_agent'.
8948 (run_inferior_command): Add one more parameter `len'.
8949 Update callers.
8950 (tracepoint_send_agent): New.
8951 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8952
7bc83639
YQ
89532012-04-16 Yao Qi <yao@codesourcery.com>
8954
8955 * tracepoint.c (download_tracepoints): Moved to ...
8956 (cmd_qtstart): ... here.
8957
5f18041e
YQ
89582012-04-14 Yao Qi <yao@codesourcery.com>
8959
8960 * tracepoint.c: Include inttypes.h.
8961 (struct collect_memory_action): Use sized types.
8962 (struct tracepoint): Likewise.
8963 (cmd_qtdp, stop_tracing): Update print specifiers.
8964 (cmd_qtp, response_tracepoint): Likewise.
8965 (collect_data_at_tracepoint): Likewise.
8966 (collect_data_at_step): Likewise.
8967
55a8c076
YQ
89682012-04-14 Yao Qi <yao@codesourcery.com>
8969
8970 Import gnulib module inttypes.
8971 * aclocal.m4, config.in, configure: Regenerated.
8972
dc750257
YQ
89732012-04-14 Yao Qi <yao@codesourcery.com>
8974
8975 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8976 Makefile and config.status at last.
8977
0ab5faf9
YQ
89782012-04-13 Yao Qi <yao@codesourcery.com>
8979
8980 * tracepoint.c: Include stdint.h unconditionally.
8981
18f5fd81
TJB
89822012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8983
8984 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8985 on BFD_HAVE_SYS_PROCFS_TYPE.
8986 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8987 * configure: Regenerate.
8988 * config.in: Likewise.
8989
4d47af5c
L
89902012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8991
8992 * Makefile.in (clean): Also remove x32.c x32-linux.c
8993 x32-avx.c x32-avx-linux.c.
8994 (x32.o): New target.
8995 (x32.c): Likewise.
8996 (x32-linux.o): Likewise.
8997 (x32-linux.c): Likewise.
8998 (x32-avx.o): Likewise.
8999 (x32-avx.c): Likewise.
9000 (x32-avx-linux.o): Likewise.
9001 (x32-avx-linux.c): Likewise.
9002
9003 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9004 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9005 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9006 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9007 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9008 i386/x32-avx-linux.xml.
9009
9010 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9011 (init_registers_x32_avx_linux): Likwise.
9012 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9013 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9014
ecedbe58
PA
90152012-04-13 Pedro Alves <palves@redhat.com>
9016
9017 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9018 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9019 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9020 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9021 the sub-make.
9022
c92b5177
L
90232012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9024
9025 * linux-x86-low.c (compat_x32_clock_t): New.
9026 (compat_x32_siginfo_t): Likewise.
9027 (compat_x32_siginfo_from_siginfo): Likewise.
9028 (siginfo_from_compat_x32_siginfo): Likewise.
9029 (linux_is_elf64): Likewise.
9030 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9031 and siginfo_from_compat_x32_siginfo for x32.
9032 (x86_arch_setup): Set linux_is_elf64.
9033
214d508e
L
90342012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9035
9036 PR gdb/13969
9037 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9038 e_machine field.
9039 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9040 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9041 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9042 compatible with process.
9043
c9a1864a
YQ
90442012-04-12 Yao Qi <yao@codesourcery.com>
9045
9046 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9047 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9048 (install-only, install-info, clean): Handle sub dir gnulib.
9049 (all-lib, am--refresh): New targets.
9050 (memmem.o): Remove target.
9051 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9052 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9053 (AC_REPLACE_FUNCS): Remove memmem.
9054 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9055 (AC_OUTPUT): Generate Makefile in gnulib/.
9056 * aclocal.m4, config.in, configure: Regenerated.
9057
367ba2c2
MR
90582012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9059
9060 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9061
9d236627
PA
90622012-04-05 Pedro Alves <palves@redhat.com>
9063
9064 -Werror=strict-aliasing
9065
9066 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9067 pointer.
9068
111217b3
PA
90692012-04-04 Pedro Alves <palves@redhat.com>
9070
9071 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9072 (sparc_store_gregset_from_stack, sparc_store_gregset)
9073 (sparc_breakpoint_at): Fix formatting.
9074
8365dcf5
TJB
90752012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9076
9077 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9078 are available.
9079 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9080 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9081 * config.in: Regenerate.
9082 * configure: Likewise.
9083
689cc2ae
PA
90842012-03-29 Pedro Alves <palves@redhat.com>
9085
9086 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9087 Correct ptrace arguments.
9088
c14dfd32
PA
90892012-03-28 Pedro Alves <palves@redhat.com>
9090
9091 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9092 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9093 (IA64_FR1_REGNUM): New defines.
9094 (ia64_fetch_register): New.
9095 (the_low_target): Install it.
9096 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9097 field.
9098 * linux-low.c (linux_fetch_registers): Try the
9099 the_low_target.fetch_register hook first.
9100
9101 * linux-arm-low.c (the_low_target): Adjust.
9102 * linux-bfin-low.c (the_low_target): Adjust.
9103 * linux-cris-low.c (the_low_target): Adjust.
9104 * linux-crisv32-low.c (the_low_target): Adjust.
9105 * linux-m32r-low.c (the_low_target): Adjust.
9106 * linux-m68k-low.c (the_low_target): Adjust.
9107 * linux-mips-low.c (the_low_target): Adjust.
9108 * linux-ppc-low.c (the_low_target): Adjust.
9109 * linux-s390-low.c (the_low_target): Adjust.
9110 * linux-sh-low.c (the_low_target): Adjust.
9111 * linux-sparc-low.c (the_low_target): Adjust.
9112 * linux-tic6x-low.c (the_low_target): Adjust.
9113 * linux-x86-low.c (the_low_target): Adjust.
9114 * linux-xtensa-low.c (the_low_target): Adjust.
9115
63c88e13
PA
91162012-03-26 Pedro Alves <palves@redhat.com>
9117
9118 * server.c (handle_qxfer_libraries): Don't bail early if
9119 the_target->qxfer_libraries_svr4 is not NULL.
9120
fb723180
PA
91212012-03-26 Pedro Alves <palves@redhat.com>
9122
9123 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9124
0afae3cf
PA
91252012-03-23 Pedro Alves <palves@redhat.com>
9126
9127 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9128 "library-list-svr4" element's start tag when the the DSO list is
9129 empty.
9130
485f1ee4
PA
91312012-03-23 Pedro Alves <palves@redhat.com>
9132
9133 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9134 a variable whose type size is the same as the inferior's pointer
9135 size.
9136
a5362b9a
TS
91372012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9138
9139 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9140 struct siginfo.
9141 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9142 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9143 * linux-low.h: Include <signal.h>.
9144 (struct siginfo): Remove forward declaration.
9145 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9146 struct siginfo.
9147
d226c142
MF
91482012-03-21 Mike Frysinger <vapier@gentoo.org>
9149
9150 * .gitignore: Ignore more files.
9151
122f36ef
PA
91522012-03-19 Pedro Alves <palves@redhat.com>
9153 Jan Kratochvil <jan.kratochvil@redhat.com>
9154
9155 * server.c (cont_thread, general_thread): Add describing comments.
9156 (start_inferior): Clear `cont_thread'.
9157 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9158 of a process.
9159
fc3e5175
YQ
91602012-03-15 Yao Qi <yao@codesourcery.com>
9161
9162 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9163 handling to ...
9164 (cmd_qtdp): ... here.
9165
8d0d92cd
YQ
91662012-03-15 Yao Qi <yao@codesourcery.com>
9167
9168 * tracepoint.c (struct tracepoint_action_ops): New.
9169 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9170 (m_tracepoint_action_download): New.
9171 (r_tracepoint_action_download): New.
9172 (x_tracepoint_action_download): New.
9173 (l_tracepoint_action_download): New.
9174 (add_tracepoint_action): Install `action->ops' according type.
9175 (download_tracepoint_1): Move code `download' function pointer
9176 of various tracepoint_action_ops.
9177
87b0bb13
JK
91782012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9179
9180 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9181 linux_ptrace_attach_warnings.
9182
5f572dec
JK
91832012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9184
9185 * Makefile.in (linux-ptrace.o): New.
9186 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9187 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9188 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9189 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9190 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9191 of these targets.
9192 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9193
f4647387
YQ
91942012-03-08 Yao Qi <yao@codesourcery.com>
9195 Pedro Alves <palves@redhat.com>
9196
9197 Fix PR server/13392.
9198 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9199 offset of JMP insn.
9200 * tracepoint.c (remove_tracepoint): New.
9201 (cmd_qtdp): Call remove_tracepoint when failed to install.
9202
9b224c5e
PA
92032012-03-07 Pedro Alves <palves@redhat.com>
9204
9205 * linux-low.c (get_detach_signal): New.
9206 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9207 Pass on pending signals to PTRACE_DETACH. Check the result of the
9208 ptrace call.
9209 * server.c (program_signals, program_signals_p): New.
9210 (handle_general_set): Handle QProgramSignals.
9211 * server.h (program_signals, program_signals_p): Declare.
9212
e237a7e2
JK
92132012-03-05 Pedro Alves <palves@redhat.com>
9214 Jan Kratochvil <jan.kratochvil@redhat.com>
9215
9216 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9217 New comment why.
9218
5808517f
YQ
92192012-03-03 Yao Qi <yao@codesourcery.com>
9220
9221 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9222 agent_look_up_symbols.
9223
58b4daa5
YQ
92242012-03-03 Yao Qi <yao@codesourcery.com>
9225
9226 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9227 (linux-x86-low.o): Likewise.
9228 * server.h: Remove in_process_agent_loaded.
9229 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9230 common/agent.c.
9231 Update callers.
9232
8ffcbaaf
YQ
92332012-03-03 Yao Qi <yao@codesourcery.com>
9234
9235 * tracepoint.c (gdb_agent_capability): New global.
9236 (in_process_agent_loaded_ust): Renamed to
9237 `in_process_agent_supports_ust'.
9238 Update callers.
9239 (in_process_agent_supports_ust): Call agent_capability_check.
9240 (clear_installed_tracepoints): Assert that agent supports
9241 agent.
9242
d1feda86
YQ
92432012-03-03 Yao Qi <yao@codesourcery.com>
9244
9245 * linux-low.c (linux_supports_agent): New.
9246 (linux_target_ops): Initialize field `supports_agent' with
9247 linux_supports_agent.
9248 * target.h (struct target_ops) <supports_agent>: New.
9249 (target_supports_agent): New macro.
9250 * server.c (handle_general_set): Handle packet 'QAgent'.
9251 (handle_query): Send `QAgent+'.
9252 * Makefile.in (server.o): Depends on agent.h.
9253
2fa291ac
YQ
92542012-03-03 Yao Qi <yao@codesourcery.com>
9255
9256 * Makefile.in (OBS): Add agent.o.
9257 Add new rule for agent.o.
9258 Track dependence of tracepoint.c on agent.h.
9259 * tracepoint.c (run_inferior_command_1):
9260 (run_inferior_command): Call agent_run_command.
9261 (gdb_ust_connect_sync_socket): Deleted. Move it to
9262 common/agent.c.
9263 (resume_thread, stop_thread): Likewise.
9264 (gdb_ust_socket_init): Renamed to ...
9265 (gdb_agent_socket_init): ... New.
9266 (gdb_ust_thread): Renamed to ...
9267 (gdb_agent_helper_thread): ... New.
9268 (gdb_ust_init): Move some code to ...
9269 (gdb_agent_init): ... here. New.
9270 [HAVE_UST]: Call gdb_ust_init.
9271 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9272 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9273 * config.in, configure: Regenerated.
9274
05044653
PA
92752012-03-02 Pedro Alves <palves@redhat.com>
9276
9277 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9278 * linux-low.c (struct simple_pid_list): New.
9279 (stopped_pids): New a struct simple_pid_list pointer.
9280 (add_to_pid_list, pull_pid_from_list): New.
9281 (handle_extended_wait): Don't assume the first signal new children
9282 report is SIGSTOP. Adjust call to pull_pid_from_list.
9283 (linux_wait_for_lwp): Adjust.
9284
8d00225b
YQ
92852012-03-02 Yao Qi <yao@codesourcery.com>
9286
9287 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9288 debug log.
9289
19560ba5
YQ
92902012-03-02 Yao Qi <yao@codesourcery.com>
9291
9292 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9293 `stop_pc' and `tpoint'. Update caller.
9294
1faeff08
MR
92952012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9296
9297 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9298 * linux-low.c (use_linux_regsets): New macro.
9299 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9300 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9301 (linux_register_in_regsets): New function.
9302 (usr_fetch_inferior_registers): Skip registers covered by
9303 regsets.
9304 (usr_store_inferior_registers): Likewise.
9305 (usr_fetch_inferior_registers): New macro.
9306 (usr_store_inferior_registers): Likewise.
9307 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9308 (linux_store_registers): Likewise.
9309 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9310 prototype.
9311 (init_registers_mips64_dsp_linux): Likewise.
9312 (init_registers_mips_linux): New macro.
9313 (init_registers_mips_dsp_linux): Likewise.
9314 (mips_dsp_num_regs): Likewise.
9315 (DSP_BASE, DSP_CONTROL): New fallback macros.
9316 (mips_base_regs): New macro.
9317 (mips_regmap): Use it. Fix the size.
9318 (mips_dsp_regmap): New variable.
9319 (mips_dsp_regset_bitmap): Likewise.
9320 (mips_arch_setup): New function.
9321 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9322 than mips_regmap.
9323 (mips_cannot_store_register): Likewise.
9324 (the_low_target): Update .arch_setup, .num_regs and .regmap
9325 initializers. Add .regset_bitmap initializer.
9326 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9327 initializer.
9328 * linux-bfin-low.c (the_low_target): Likewise.
9329 * linux-cris-low.c (the_low_target): Likewise.
9330 * linux-crisv32-low.c (the_low_target): Likewise.
9331 * linux-ia64-low.c (the_low_target): Likewise.
9332 * linux-m32r-low.c (the_low_target): Likewise.
9333 * linux-m68k-low.c (the_low_target): Likewise.
9334 * linux-ppc-low.c (the_low_target): Likewise.
9335 * linux-s390-low.c (the_low_target): Likewise.
9336 * linux-sh-low.c (the_low_target): Likewise.
9337 * linux-sparc-low.c (the_low_target): Likewise.
9338 * linux-tic6x-low.c (the_low_target): Likewise.
9339 * linux-x86-low.c (the_low_target): Likewise.
9340 * linux-xtensa-low.c (the_low_target): Likewise.
9341 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9342 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9343 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9344 srv_xmlfiles.
9345 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9346 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9347
c03e6ccc
YQ
93482012-02-29 Yao Qi <yao@codesourcery.com>
9349 Pedro Alves <palves@redhat.com>
9350
9351 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9352 `step_over_finished' is true.
9353
644cebc9
PA
93542012-02-27 Pedro Alves <palves@redhat.com>
9355
9356 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9357 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9358
c14d7ab2
PA
93592012-02-27 Pedro Alves <palves@redhat.com>
9360
9361 PR server/9684
9362 * linux-low.c (pid_is_stopped): New.
9363 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9364
412c89dd
LM
93652012-02-25 Luis Machado <lgustavo@codesourcery.com>
9366
9367 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9368 of conditions.
9369
b745defe
MR
93702012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9371
9372 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9373
9f3a5c85
LM
93742012-02-24 Luis Machado <lgustavo@codesourcery>
9375
9376 * server.c (handle_query): Advertise support for target-side
9377 breakpoint condition evaluation.
9378 (process_point_options): New function.
9379 (process_serial_event): When inserting a breakpoint, check for
9380 a target-side condition that should be evaluated.
9381
9382 * mem-break.c: Include regcache.h and ax.h.
9383 (point_cond_list_t): New data structure.
9384 (breakpoint) <cond_list>: New field.
9385 (find_gdb_breakpoint_at): Make non-static.
9386 (delete_gdb_breakpoint_at): Clear any target-side
9387 conditions.
9388 (clear_gdb_breakpoint_conditions): New function.
9389 (add_condition_to_breakpoint): Likewise.
9390 (add_breakpoint_condition): Likewise.
9391 (gdb_condition_true_at_breakpoint): Likewise.
9392 (gdb_breakpoint_here): Return result directly instead
9393 of going through a local variable.
9394
9395 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9396 (clear_gdb_breakpoint_conditions): Likewise.
9397 (add_breakpoint_condition): Likewise.
9398 (gdb_condition_true_at_breakpoint): Likewise.
9399
9400 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9401 (need_step_over_p): Take target-side breakpoint condition into
9402 consideration.
9403
5e1dc496
LM
94042012-02-24 Luis Machado <lgustavo@codesourcery>
9405
9406 * server.h: Include tracepoint.h.
9407 (agent_mem_read, agent_get_trace_state_variable_value,
9408 agent_set_trace_state_variable_value,
9409 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9410 get_set_tsv_func_addr): New prototypes.
9411
9412 * ax.h: New include file.
9413 * ax.c: New source file.
9414
9415 * tracepoint.c: Include ax.h.
9416 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9417 agent_expr, eval_result_type): Move to ax.h.
9418 (parse_agent_expr): Rename to ...
9419 (gdb_parse_agent_expr): ... this, make it non-static and move
9420 to ax.h.
9421 (unparse_agent_expr) Rename to ...
9422 (gdb_unparse_agent_expr): ... this, make it non-static and move
9423 to ax.h.
9424 (eval_agent_expr): Rename to ...
9425 (eval_tracepoint_agent_expr): ... this.
9426 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9427 forward declarations.
9428 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9429 (agent_get_trace_state_variable_value): New function.
9430 (agent_set_trace_state_variable_value): New function.
9431 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9432 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9433 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9434 (condition_true_at_tracepoint): Likewise.
9435 (parse_agent_expr): Rename to ...
9436 (gdb_parse_agent_expr): ... this and move to ax.c.
9437 (unparse_agent_expr): Rename to ...
9438 (gdb_unparse_agent_expr): ... this and move to ax.c.
9439 (gdb_agent_op_name): Move to ax.c.
9440 (eval_agent_expr): Rename to ...
9441 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9442 and move to ax.c.
9443 (eval_tracepoint_agent_expr): New function.
9444 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9445 non-static.
5e1dc496
LM
9446 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9447 ax.c.
9448 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9449 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9450 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9451 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9452 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9453 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9454 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9455 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9456 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9457 (compile_bytecodes): Remove forward declaration.
9458 (is_goto_target): Move to ax.c.
9459 (compile_bytecodes): Move to ax.c and call
9460 agent_get_trace_state_variable_value (...) and
9461 agent_set_trace_state_variable_value (...).
9462
9463 * Makefile.in: Update ax.c and IPA dependencies.
9464
277e4e52
PA
94652012-02-24 Pedro Alves <palves@redhat.com>
9466
9467 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9468 (cmd_bigqtbuffer_circular): ... this. Only handle
9469 'QTBuffer:circular:'.
9470 (handle_tracepoint_general_set): Adjust.
9471
bf4c19f7
YQ
94722012-02-16 Yao Qi <yao@codesourcery.com>
9473
9474 * inferiors.c: Move code to ...
9475 * dll.c: .... here. New.
9476 * server.h: Declare clear_dlls.
9477 * Makefile.in (SFILES): Add dll.c.
9478 (OBS): Add dll.o
9479 (dll.o): New rule.
9480
d73f2619
YQ
94812012-02-11 Yao Qi <yao@codesourcery.com>
9482
9483 * server.c: (handle_monitor_command): Add a new parameter
9484 `own_buf'.
9485 (handle_query): Update caller.
9486
f8255c2a
JB
94872012-02-09 Joel Brobecker <brobecker@adacore.com>
9488
9489 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9490 * configure, config.in: Regenerate.
9491 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9492 is not defined.
9493
da84f473
PA
94942012-02-02 Pedro Alves <palves@redhat.com>
9495
9496 Try SIGKILL first, then PTRACE_KILL.
9497 * linux-low.c (linux_kill_one_lwp): New.
9498 (linux_kill_one_lwp): Rename to ...
9499 (kill_one_lwp_callback): ... this. Use the new
9500 linux_kill_one_lwp.
9501
e886a173
PA
95022012-02-02 Pedro Alves <palves@redhat.com>
9503
9504 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9505 inferior.
9506
be07f1a2
PA
95072012-01-27 Pedro Alves <palves@redhat.com>
9508
9509 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9510 (elf_64_file_p): Make static.
9511 (linux_pid_exe_is_elf_64_file): New.
9512 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9513 Delete declarations.
9514 (linux_pid_exe_is_elf_64_file): Declare.
9515 * linux-x86-low.c (x86_arch_setup): Use
9516 linux_pid_exe_is_elf_64_file.
9517
d8301ad1
JK
95182012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9519
9520 * linux-low.c (linux_wait_for_event_1): Rename to ...
9521 (linux_wait_for_event): ... here and merge it with former
9522 linux_wait_for_event - new variable wait_ptid, use it.
9523 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9524
01b17894
PA
95252012-01-23 Pedro Alves <palves@redhat.com>
9526
9527 * server.c (main): Avoid yet another case of infinite loop while
9528 detaching/killing after a longjmp.
9529
e825046f
JK
95302012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9531
9532 Code cleanup.
9533 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9534
b9e7b9c3
UW
95352012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9536
9537 * hostio.c (handle_readlink): New function.
9538 (handle_vFile): Call it to handle "vFile:readlink" packets.
9539
901f9912
UW
95402012-01-20 Pedro Alves <palves@redhat.com>
9541 Ulrich Weigand <ulrich.weigand@linaro.org>
9542
9543 * server.c (handle_v_requests): Only support vAttach and vRun to
9544 start multiple processes when in extended protocol mode.
9545
fc1ab1a0
PA
95462012-01-17 Pedro Alves <palves@redhat.com>
9547
9548 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9549 memalign plus mprotect to allocate the scratch buffer.
9550
7d5d4e98
PA
95512012-01-13 Pedro Alves <palves@redhat.com>
9552
9553 * server.c (attach_inferior): Clear `cont_thread'.
9554
f128d5e9
PA
95552012-01-13 Pedro Alves <palves@redhat.com>
9556
9557 * server.c (main): Avoid infinite loop while detaching/killing
9558 after a longjmp.
9559
06db92f0
DE
95602012-01-09 Doug Evans <dje@google.com>
9561
9562 * server.c (start_inferior): Set last_ptid in --wrapper case.
9563
32d92999
YQ
95642012-01-06 Yao Qi <yao@codesourcery.com>
9565
9566 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9567 defined.
9568 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9569
5e0a92a9
YQ
95702012-01-04 Yao Qi <yao@codesourcery.com>
9571
9572 * tracepoint.c (cmd_qtdp): Print debug message
9573 for static tracepoint.
9574
ae639e8c
YQ
95752012-01-04 Yao Qi <yao@codesourcery.com>
9576
9577 * tracepoint.c (trace_vdebug): Differentiate debug message
9578 between gdbserver and IPA.
9579
f72429c5
YQ
95802012-01-03 Yao Qi <yao@codesourcery.com>
9581
9582 * tracepoint.c (tracepoint_was_hit): Don't collect for
9583 static tracepoint.
9584
12c3e59c
JB
95852012-01-02 Joel Brobecker <brobecker@adacore.com>
9586
9587 * terminal.h: Reformat copyright header.
9588
67827812
JB
95892012-01-02 Joel Brobecker <brobecker@adacore.com>
9590
9591 * server.c (gdbserver_version): Update copyright year.
9592 * gdbreplay.c (gdbreplay_version): Likewise.
9593
3e52c33d
JK
95942011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9595
9596 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9597
9598 Revert:
9599 2011-12-18 Hui Zhu <teawater@gmail.com>
9600 * linux-low.c (linux_create_inferior): Save return value to ret.
9601
66f1260e
HZ
96022011-12-18 Hui Zhu <teawater@gmail.com>
9603
9604 * linux-low.c (linux_create_inferior): Save return value to ret.
9605
e77616d7
DE
96062011-12-16 Doug Evans <dje@google.com>
9607
e7b06c57
DE
9608 * linux-low.c (linux_create_inferior): If stdio connection,
9609 redirect stdin from /dev/null, stdout to stderr.
9610 * remote-utils.c (remote_is_stdio): New static global.
9611 (remote_connection_is_stdio): New function.
9612 (remote_prepare): Handle stdio connection.
9613 (remote_open): Ditto.
9614 (remote_close): Don't close stdin for stdio connections.
9615 (read_prim,write_prim): New functions. Replace all calls to
9616 read/write to these.
9617 * server.c (main): Watch for "-" argument. Move call to
9618 remote_prepare before start_inferior.
9619 * server.h (STDIO_CONNECTION_NAME): New macro.
9620 (remote_connection_is_stdio): Declare.
9621
e77616d7
DE
9622 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9623 in debugging output.
9624
82067193
YQ
96252011-12-15 Yao Qi <yao@codesourcery.com>
9626
9627 * tracepoint.c: Include sys/syscall.h.
9628 (gdb_ust_thread): Remove preprocessor conditional.
9629
82bfbe7e
PA
96302011-12-14 Pedro Alves <pedro@codesourcery.com>
9631
9632 * linux-low.c (linux_detach_one_lwp): Call
9633 the_low_target.prepare_to_resume before detaching.
9634
712c6575
YQ
96352011-12-14 Yao Qi <yao@codesourcery.com>
9636
9637 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9638 of write.
9639
d54d1edf
YQ
96402011-12-14 Yao Qi <yao@codesourcery.com>
9641
9642 * i386-low.c (i386_low_stopped_data_address): Initialize local
9643 variable `control'.
9644
6210a125
PA
96452011-12-13 Pedro Alves <pedro@codesourcery.com>
9646
9647 PR remote/13492
9648
9649 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9650 DR_CONTROL unless necessary. Extend comments.
9651 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9652 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9653
2ece8244
YQ
96542011-12-13 Yao Qi <yao@codesourcery.com>
9655
9656 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9657 macros.
9658 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9659
784867a5
JK
96602011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9661
9662 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9663 Print new debug message for such case.
9664
6bf36717
JK
96652011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9666
9667 Fix overlapping memcpy.
9668 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9669 the read_inferior_memory transfer.
9670 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9671 write_inferior_memory transfer.
9672 (set_fast_tracepoint_jump): New variable buf. Use it for the
9673 read_inferior_memory and write_inferior_memory transfers.
9674 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9675 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9676 Use it for the write_inferior_memory transfer.
9677 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9678 buffers.
9679
50275556
MR
96802011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9681
9682 * linux-low.c (fetch_register, store_register): Make code
9683 consistent, fix formatting.
9684
7325beb4
MR
96852011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9686
9687 * linux-low.c (usr_store_inferior_registers): Factor out code
9688 to handle individual registers into...
9689 (store_register): ... this new function.
9690
c642a434
UW
96912011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9692
9693 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9694 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9695 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9696 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9697 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9698 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9699 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9700 (srv_xmlfiles): Add new XML files.
9701
9702 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9703 and <sys/uio.h>.
9704 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9705 (init_registers_s390_linux32v1): Add prototype.
9706 (init_registers_s390_linux32v2): Likewise.
9707 (init_registers_s390_linux64v1): Likewise.
9708 (init_registers_s390_linux64v2): Likewise.
9709 (init_registers_s390x_linux64v1): Likewise.
9710 (init_registers_s390x_linux64v2): Likewise.
9711 (s390_num_regs): Increment to 52.
9712 (s390_regmap): Add orig_r2 register.
9713 (s390_num_regs_3264): Increment to 68.
9714 (s390_regmap_3264): Add orig_r2 register.
9715 (s390_collect_ptrace_register): Handle orig_r2 register.
9716 (s390_supply_ptrace_register): Likewise.
9717 (s390_fill_last_break): New function.
9718 (s390_store_last_break): Likewise.
9719 (s390_fill_system_call): New function.
9720 (s390_store_system_call): Likewise.
9721 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9722 register sets.
9723 (s390_check_regset): New function.
9724 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9725 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9726 Update target_regsets for available register sets.
9727
2268b414
JK
97282011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9729 Jan Kratochvil <jan.kratochvil@redhat.com>
9730
9731 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9732 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9733 New.
9734 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9735 * linux-low.h (struct process_info_private): New member r_debug.
9736 * server.c (handle_qxfer_libraries): Call
9737 the_target->qxfer_libraries_svr4.
9738 (handle_qxfer_libraries_svr4): New function.
9739 (qxfer_packets): New entry "libraries-svr4".
9740 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9741 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9742 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9743 PACKET_qXfer_libraries_svr4.
9744
d6db1fab
UW
97452011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9746
9747 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9748 PSW address/mask between 8-byte and 16-byte formats.
9749 (s390_supply_ptrace_register): Likewise.
9750 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9751 basic addressing mode bit.
9752
242f5f1c
SS
97532011-11-24 Stan Shebs <stan@codesourcery.com>
9754
9755 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9756
f196051f
SS
97572011-11-17 Stan Shebs <stan@codesourcery.com>
9758
9759 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9760 (tracing_start_time): New global.
9761 (tracing_stop_time): New global.
9762 (tracing_user_name): New global.
9763 (tracing_notes): New global.
9764 (tracing_stop_note): New global.
9765 (cmd_qtstart): Set traceframe_usage, start_time.
9766 (stop_tracing): Set stop_time.
9767 (cmd_qtstatus): Report additional status.
9768 (cmd_qtp): New function.
9769 (handle_tracepoint_query): Call it.
9770 (cmd_qtnotes): New function.
9771 (handle_tracepoint_general_set): Call it.
9772 (get_timestamp): Rename from tsv_get_timestamp.
9773
405f8e94
SS
97742011-11-14 Stan Shebs <stan@codesourcery.com>
9775 Kwok Cheung Yeung <kcy@codesourcery.com>
9776
9777 * linux-x86-low.c (small_jump_insn): New.
9778 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9779 trampoline and error message, build a trampoline and issue a small
9780 jump instruction to it.
9781 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9782 trampoline and error message.
9783 (x86_get_min_fast_tracepoint_insn_len): New.
9784 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9785 * linux-low.h (struct linux_target_ops): Add arguments to
9786 install_fast_tracepoint_jump_pad operation, add new operation.
9787 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9788 arguments.
9789 (linux_get_min_fast_tracepoint_insn_len): New function.
9790 (linux_target_op): Add new operation.
9791 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9792 (gdb_trampoline_buffer_end): Ditto.
9793 (gdb_trampoline_buffer_error): Ditto.
9794 (struct ipa_sym_addresses): Add fields for new IPA variables.
9795 (symbol_list): Add entries for new IPA variables.
9796 (struct tracepoint): Add fields to hold the address range of the
9797 trampoline used by the tracepoint.
9798 (trampoline_buffer_head): New static variable.
9799 (trampoline_buffer_tail): Ditto.
9800 (claim_trampoline_space): New function.
9801 (have_fast_tracepoint_trampoline_buffer): New function.
9802 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9803 structure.
9804 (install_fast_tracepoint): Ditto, also add error buffer argument.
9805 (cmd_qtminftpilen): New function.
9806 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9807 (fast_tracepoint_from_trampoline_address): New function.
9808 (fast_tracepoint_collecting): Handle trampoline as part of jump
9809 pad space.
9810 (set_trampoline_buffer_space): New function.
9811 (initialize_tracepoint): Initialize new IPA variables.
9812 * target.h (struct target_ops): Add arguments to
9813 install_fast_tracepoint_jump_pad operation, add new
9814 get_min_fast_tracepoint_insn_len operation.
9815 (target_get_min_fast_tracepoint_insn_len): New.
9816 (install_fast_tracepoint_jump_pad): Add arguments.
9817 * server.h (IPA_BUFSIZ): Define.
9818 * linux-i386-ipa.c: Include extra header files.
9819 (initialize_fast_tracepoint_trampoline_buffer): New function.
9820 (initialize_low_tracepoint): Call it.
9821 * server.h (set_trampoline_buffer_space): Declare.
9822 (claim_trampoline_space): Ditto.
9823 (have_fast_tracepoint_trampoline_buffer): Ditto.
9824
1e4d1764
YQ
98252011-11-14 Yao Qi <yao@codesourcery.com>
9826
9827 * server.c (handle_query): Handle InstallInTrace for qSupported.
9828 * tracepoint.c (add_tracepoint): Sort list.
9829 (install_tracepoint, download_tracepoint): New.
9830 (cmd_qtdp): Call them to install and download tracepoints.
9831 (sort_tracepoints): Removed.
9832 (cmd_qtstart): Update.
9833
5c73ff4e
YQ
98342011-11-14 Yao Qi <yao@codesourcery.com>
9835
9836 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9837 * mem-break.h: Declare.
9838 * tracepoint.c (cmd_qtstart): Move some code to ...
9839 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9840 New.
9841 (download_tracepoints): Move some code to ...
9842 (download_tracepoint_1): ... here. New.
9843
86a30030
YQ
98442011-11-08 Yao Qi <yao@codesourcery.com>
9845
9846 * remote-utils.c (relocate_instruction): A comment fix.
9847
8d26e50c
JB
98482011-11-07 Joel Brobecker <brobecker@adacore.com>
9849
9850 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9851 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9852 dr_status_mirror and dr_control_mirror from debug_reg_state.
9853 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9854 (i386_initial_stuff): Remove use of deleted globals.
9855 (i386_get_thread_context, i386_set_thread_context,
9856 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9857 from debug_reg_state.
9858
a59306a3
YQ
98592011-11-05 Yao Qi <yao@codesourcery.com>
9860
9861 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9862 address as TPOINT's.
9863
3065dfb6
SS
98642011-11-02 Stan Shebs <stan@codesourcery.com>
9865
9866 * tracepoint.c (agent_mem_read_string): New function.
9867 (eval_agent_expr): Call it for tracenz.
9868 * server.c (handle_query): Report support for tracenz.
9869
fd0d8c7c
YQ
98702011-11-02 Yao Qi <yao@codesourcery.com>
9871
9872 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9873
609086b1
YQ
98742011-11-02 Yao Qi <yao@codesourcery.com>
9875
9876 * target.h: Fix a typo in comment.
9877
b9fd1791
PA
98782011-10-31 Pedro Alves <pedro@codesourcery.com>
9879
9880 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9881 clobber the breakpoints' shadows with fast tracepoint jumps.
9882 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9883 * target.c (write_inferior_memory): Also pass MYADDR down to
9884 check_mem_write.
9885
03583c20
UW
98862011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9887
9888 * configure.ac: Check support for personality routine.
9889 * configure: Regenerate.
9890 * config.in: Likewise.
9891 * linux-low.c: Include <sys/personality.h>.
9892 Define ADDR_NO_RANDOMIZE if necessary.
9893 (linux_create_inferior): Disable address space randomization when
9894 forking inferior, if requested.
9895 (linux_supports_disable_randomization): New function.
9896 (linux_target_ops): Install it.
9897 * server.h (disable_randomization): Declare.
9898 * server.c (disable_randomization): New global variable.
9899 (handle_general_set): Handle QDisableRandomization.
9900 (handle_query): Likewise for qSupported.
9901 (main): Support --disable-randomization and --no-disable-randomization
9902 command line arguments.
9903 * target.h (struct target_ops): Add supports_disable_randomization.
9904 (target_supports_disable_randomization): New macro.
9905
723b724b
MF
99062011-09-29 Mike Frysinger <vapier@gentoo.org>
9907
9908 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9909 ifdef check.
9910 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9911 [!PT_GETDSBT] (target_loadmap): New definition.
9912 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9913 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9914 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9915 and PT_GETDSBT to LINUX_LOADMAP.
9916 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9917 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9918
55329a5c 99192011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9920
9921 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9922 (arm_linux_hwbp_cap): New static variable.
9923 (arm_linux_get_hwbp_cap): Replace by ...
9924 (arm_linux_init_hwbp_cap): ... this new function.
9925 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9926 (arm_linux_get_hw_watchpoint_count): Likewise.
9927 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9928 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9929 (arm_prepare_to_resume): Use perror_with_name instead of error.
9930
55329a5c 99312011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9932
9933 * linux-arm-low.c: Include <signal.h>.
9934 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9935 (struct arm_linux_hwbp_cap): New data type.
9936 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9937 (struct arm_linux_hw_breakpoint): New data type.
9938 (MAX_BPTS, MAX_WPTS): Define.
9939 (struct arch_process_info, struct arch_lwp_info): New data types.
9940 (arm_linux_get_hwbp_cap): New function.
9941 (arm_linux_get_hw_breakpoint_count): Likewise.
9942 (arm_linux_get_hw_watchpoint_count): Likewise.
9943 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9944 (arm_hwbp_control_initialize): Likewise.
9945 (arm_hwbp_control_is_enabled): Likewise.
9946 (arm_hwbp_control_is_initialized): Likewise.
9947 (arm_hwbp_control_disable): Likewise.
9948 (arm_linux_hw_breakpoint_equal): Likewise.
9949 (arm_linux_hw_point_initialize): Likewise.
9950 (struct update_registers_data): New data structure.
9951 (update_registers_callback: New function.
9952 (arm_insert_point): Likewise.
9953 (arm_remove_point): Likewise.
9954 (arm_stopped_by_watchpoint): Likewise.
9955 (arm_stopped_data_address): Likewise.
9956 (arm_new_process): Likewise.
9957 (arm_new_thread): Likewise.
9958 (arm_prepare_to_resume): Likewise.
9959 (the_low_target): Register arm_insert_point, arm_remove_point,
9960 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9961 arm_new_thread, and arm_prepare_to_resume.
9962
6b9801d4
SS
99632011-09-15 Stan Shebs <stan@codesourcery.com>
9964
9965 * server.h (struct emit_ops): Add compare-goto fields.
9966 * tracepoint.c (gdb_agent_op_sizes): New table.
9967 (emit_eq_goto): New function.
9968 (emit_ne_goto): New function.
9969 (emit_lt_goto): New function.
9970 (emit_le_goto): New function.
9971 (emit_gt_goto): New function.
9972 (emit_ge_goto): New function.
9973 (is_goto_target): New function.
9974 (compile_bytecodes): Recognize special cases of compare-goto
9975 combinations and call specialized emitters for them.
9976 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9977 (amd64_emit_ne_goto): New function.
9978 (amd64_emit_lt_goto): New function.
9979 (amd64_emit_le_goto): New function.
9980 (amd64_emit_gt_goto): New function.
9981 (amd64_emit_ge_goto): New function.
9982 (amd64_emit_ops): Add the new functions.
9983 (i386_emit_eq_goto): New function.
9984 (i386_emit_ne_goto): New function.
9985 (i386_emit_lt_goto): New function.
9986 (i386_emit_le_goto): New function.
9987 (i386_emit_gt_goto): New function.
9988 (i386_emit_ge_goto): New function.
9989 (i386_emit_ops): Add the new functions.
9990
bf15cbda
SS
99912011-09-08 Stan Shebs <stan@codesourcery.com>
9992
9993 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9994 (i386_emit_epilogue): Restore %ebx.
9995
943ca1dd
JZ
99962011-08-31 Jie Zhang <jzhang918@gmail.com>
9997
9998 * server.c (step_thread): Remove definition.
9999 (process_serial_event): Don't handle Hs.
10000 * server.h (step_thread): Remove declaration.
10001 * target.c (set_desired_inferior): Remove use of step_thread.
10002
e3deef73
LM
100032011-08-24 Luis Machado <lgustavo@codesourcery.com>
10004
10005 * linux-low.c: Include linux-procfs.h.
10006 (linux_attach_lwp_1): Update comments.
10007 (linux_attach): Scan for existing threads when attaching to a
10008 process that is the tgid.
10009 * Makefile.in: Update dependencies.
10010
13da1c97
LM
100112011-08-24 Luis Machado <lgustavo@codesourcery.com>
10012
10013 * configure.srv: Add linux-procfs.o dependencies.
10014
881127c9
YQ
100152011-08-14 Yao Qi <yao@codesourcery.com>
10016
10017 * target.h (struct target_ops): Fix indent.
10018 * win32-low.c (win32_target_ops): Fix comment.
10019
58dbd541
YQ
100202011-08-14 Andrew Jenner <andrew@codesourcery.com>
10021 Yao Qi <yao@codesourcery.com>
10022
10023 * Makefile.in (clean): Remove tic6x-*.c files.
10024 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10025 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10026 (tic6x-c64xp-linux.c): Likewise.
10027 * configure.srv: Add support for tic6x-*-uclinux.
10028 * linux-tic6x-low.c: New.
10029 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10030
78d85199
YQ
100312011-08-14 Andrew Stubbs <ams@codesourcery.com>
10032 Yao Qi <yao@codesourcery.com>
10033
10034 * target.h (struct target_ops): Add read_loadmap.
10035 * linux-low.c (struct target_loadseg): New type.
10036 (struct target_loadmap): New type.
10037 (linux_read_loadmap): New function.
10038 (linux_target_ops): Add linux_read_loadmap.
10039 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10040 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10041 to NULL.
78d85199 10042
a959a88d
EZ
100432011-08-05 Eli Zaretskii <eliz@gnu.org>
10044
10045 * win32-low.c: Include <stdint.h>.
10046
1ced966e
PA
100472011-07-22 Pedro Alves <pedro@codesourcery.com>
10048
10049 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10050 to the inferior here.
10051 (i386_remove_aligned_watchpoint): Ditto.
10052 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10053 fit part of the watchpoint in the debug registers.
10054 (i386_update_inferior_debug_regs): New.
10055 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10056 registers, and only update the inferior on success.
10057 (i386_low_remove_watchpoint): Ditto.
10058
d26e3629
KY
100592011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10060
10061 * linux-low.c (compare_ints, unique, list_threads, show_process,
10062 linux_core_of_thread): Delete.
10063 (linux_target_ops): Change linux_core_of_thread to
10064 linux_common_core_of_thread.
10065 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10066 * utils.c (malloc_failure): Change type of argument.
10067 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10068 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10069 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10070 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10071 (IPA_OBJS): Add common-utils-ipa.o.
10072 (ptid_h, linux_osdata_h): New macros.
10073 (server_h): Add common/common-utils.h, common/xml-utils.h,
10074 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10075 common/ptid.h.
10076 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10077 ptid.o, buffer.o): New rules.
10078 (linux-low.o): Add common/linux-osdata.h as a dependency.
10079 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10080 * configure.ac: Add AC_HEADER_DIRENT check.
10081 * config.in: Regenerate.
10082 * configure: Regenerate.
10083 * remote-utils.c (xml_escape_text): Delete.
10084 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10085 buffer_xml_printf): Move to common/buffer.c.
10086 * server.c (main): Remove call to initialize_inferiors.
10087 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10088 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10089 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10090 internal_error, gdb_assert, gdb_assert_fail): Delete.
10091 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10092 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10093 common/buffer.h.
10094 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10095 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10096 initialize_inferiors): Delete.
10097
2275a1a7
PA
100982011-07-20 Pedro Alves <pedro@codesourcery.com>
10099
10100 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10101 symbol error.
10102
0a5b1e09
PA
101032011-05-31 Pedro Alves <pedro@codesourcery.com>
10104
10105 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10106 assertion.
10107 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10108
6938fd34
YQ
101092011-05-26 Yao Qi <yao@codesourcery.com>
10110
10111 * Makefile.in (thread-db.o): Track dependence to
10112 common/gdb_thread_db.h.
10113 * thread-db.c: include gdb_thread_db.h from right place.
10114
b481f9e0
TT
101152011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10116
10117 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10118 __FILE__ and __LINE__ to internal_error.
10119
98a5dd13
DE
101202011-05-13 Doug Evans <dje@google.com>
10121
10122 * thread-db.c (try_thread_db_load_from_sdir): New function.
10123 (try_thread_db_load_from_dir): New function.
10124 (thread_db_load_search): Handle $sdir, ignore $pdir.
10125 Remove trying of system directories if search of
10126 libthread-db-search-path fails, that is now done via $sdir.
10127
d248b706
KY
101282011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10129
10130 * server.c (handle_query): Add EnableDisableTracepoints to the list
10131 of supported features.
43aaf8b6 10132 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10133 tracepoints.
43aaf8b6
PA
10134 (cmd_qtenable_disable): New.
10135 (cmd_qtstart): Install tracepoints even if disabled.
10136 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10137 receiving a QTEnable or QTDisable packet.
10138 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10139 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10140 tracepoints.
10141 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10142
84e578fb
DE
101432011-05-10 Doug Evans <dje@google.com>
10144
10145 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10146
71f55dd8
DE
101472011-05-04 Doug Evans <dje@google.com>
10148
10149 * linux-low.c (linux_join): Skip process lookup.
10150 * spu-low.c (spu_join): Ditto.
10151 * server.c (join_inferiors_callback): Delete.
10152 (process_serial_event): For 'D' packet (detach) call join_inferior
10153 directly.
10154
4d393d60
JM
101552011-05-04 Joseph Myers <joseph@codesourcery.com>
10156
10157 * README: Don't mention xscale*-*-linux*.
10158 * configure.srv (xscale*-*-linux*): Don't handle target.
10159
b00ad6ff
NF
101602011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10161
10162 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10163 casting pointers.
10164 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10165 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10166 (i386_emit_void_call_2): Likewise.
10167
af96c192
YQ
101682011-04-26 Yao Qi <yao@codesourcery.com>
10169
43aaf8b6
PA
10170 * linux-low.c: Move common macros to linux-ptrace.h.
10171 Include linux-ptrace.h.
af96c192
YQ
10172 * Makefile.in (linux_ptrace_h): New.
10173 (linux-low.o): Depends on linux-ptrace.h.
10174
03f2bd59
JK
101752011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10176
10177 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10178 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10179 (remote_prepare): New function with most of the TCP code from ...
10180 (remote_open): ... here. Detect PORT here unconditionally. Move also
10181 setting transport_is_reliable.
10182 * server.c (run_once): New variable.
10183 (gdbserver_usage): Document it.
10184 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10185 the first run if RUN_ONCE.
10186 * server.h (run_once, remote_prepare): New declarations.
10187
7a9dd1b2
TT
101882011-04-19 Tom Tromey <tromey@redhat.com>
10189
10190 * win32-low.c (handle_load_dll): Remove duplicate "the".
10191
81239425
PM
101922011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10193
10194 Remove support for old Cygwin 1.5 versions.
10195 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10196 function to avoid warning.
10197 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10198 warning.
10199
9e0627f1
PM
102002011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10201
10202 * gdbserver/server.h (Macro _): Define it if not available.
10203
588eebee
MS
102042011-03-14 Michael Snyder <msnyder@vmware.com>
10205
348af9f7 10206 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10207
43f70d4c
JB
102082011-03-10 Joel Brobecker <brobecker@adacore.com>
10209
10210 * Makefile.in (maintainer-clean realclean distclean): Remove
10211 "make ... subdir_do" command.
10212
348af9f7
MS
102132011-03-10 Michael Snyder <msnyder@vmware.com>
10214
10215 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10216
10217 * server.c (handle_v_run): Free alloced buffer on early return.
10218
e637a4f5
YQ
102192011-03-09 Yao Qi <yao@codesourcery.com>
10220
10221 Revert:
10222 2011-03-04 Yao Qi <yao@codesourcery.com>
10223
10224 * Makefile.in: Remove GNU make feature --directory.
10225
10226 2011-03-05 Yao Qi <yao@codesourcery.com>
10227
10228 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10229 (subdir_do): New make target. Copied from gdb/Makefile.
10230 (maintainer-clean, realclean, distclean, clean): Call corresponding
10231 make targets in common/Makefile.
10232
10233 2011-02-11 Yao Qi <yao@codesourcery.com>
10234
10235 * configure.ac: Call AC_PROG_RANLIB.
10236 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10237 * configure: Regenerate.
10238
e6edda56
JK
102392011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10240
10241 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10242
e5141119
JB
102432011-03-06 Yao Qi <yao@codesourcery.com>
10244
10245 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10246
64794aa4
JB
102472011-03-05 Yao Qi <yao@codesourcery.com>
10248
10249 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10250 (subdir_do): New make target. Copied from gdb/Makefile.
10251 (maintainer-clean, realclean, distclean, clean): Call corresponding
10252 make targets in common/Makefile.
10253
7a762829
YQ
102542011-03-04 Yao Qi <yao@codesourcery.com>
10255
10256 * Makefile.in: Remove GNU make feature --directory.
10257
348af9f7
MS
102582011-03-04 Michael Snyder <msnyder@vmware.com>
10259
10260 * server.c (queue_stop_reply): Call xmalloc not malloc.
10261
102622011-03-02 Michael Snyder <msnyder@vmware.com>
10263
10264 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10265
9f72fee2
MS
102662011-02-28 Michael Snyder <msnyder@vmware.com>
10267
588eebee
MS
10268 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10269 (cmd_qtframe): Ditto.
10270 (cmd_qtbuffer): Ditto.
10271 (cmd_bigqtbuffer): Ditto.
10272
9f72fee2
MS
10273 * utils.c (decimal2str): Initialize 'width' to nine, then
10274 don't mess with it.
10275
8040bd49
UW
102762011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10277
10278 * hostio.c (require_data): Free *data, not data.
10279
7e52cbd0
JK
102802011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10281
10282 * hostio.c (require_data): Use free, not xfree.
10283
9130f83e
MS
102842011-02-27 Michael Snyder <msnyder@vmware.com>
10285
4b812f4e
MS
10286 * server.c (handle_query): Discard unused value.
10287
9130f83e
MS
10288 * hostio.c (require_data): Free malloc memory before returning
10289 error.
10290
69d37113
MS
102912011-02-26 Michael Snyder <msnyder@vmware.com>
10292
10293 * linux-low.c (list_threads): Call closedir for dirent.
10294
35f5825a
MS
102952011-02-27 Michael Snyder <msnyder@vmware.com>
10296
2a589cef
MS
10297 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10298 a case statement falls through.
10299
0adea5f7
MS
10300 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10301
35f5825a
MS
10302 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10303 in comparison.
10304
238f1c74
MS
103052011-02-26 Michael Snyder <msnyder@vmware.com>
10306
10307 * utils.c (decimal2str): Eliminate dead code and dead param.
10308 (pulongest): Drop dead param from call to decimal2str.
10309 (plongest): Ditto.
10310
633ff500
JB
103112011-02-24 Joel Brobecker <brobecker@adacore.com>
10312
10313 Revert the following patch (not approved yet):
10314 2011-02-21 Hui Zhu <teawater@gmail.com>
10315 * tracepoint.c (tp_printf): New function.
10316 (eval_agent_expr): Handle gdb_agent_op_printf.
10317
f9c6ff72
HZ
103182011-02-21 Hui Zhu <teawater@gmail.com>
10319
10320 * tracepoint.c (tp_printf): New function.
10321 (eval_agent_expr): Handle gdb_agent_op_printf.
10322
94d5e490
TT
103232011-02-18 Tom Tromey <tromey@redhat.com>
10324
10325 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10326 (tracepoint.o): Likewise.
10327 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10328 (gdb_agent_op_names): Likewise.
10329
c7f96d2b
TT
103302011-02-18 Tom Tromey <tromey@redhat.com>
10331
10332 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10333 gdb_agent_op_rot>: New constants.
10334 (gdb_agent_op_names): Add pick and roll.
10335 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10336 cases.
10337
0feedb2c
JK
103382011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10339
10340 * aclocal.m4: Regenerated with aclocal-1.11.1.
10341
b3b9301e
PA
103422011-02-14 Pedro Alves <pedro@codesourcery.com>
10343
10344 * server.c (handle_qxfer_traceframe_info): New.
10345 (qxfer_packets): Register "traceframe-info".
10346 (handle_query): Report support for qXfer:traceframe-info:read+.
10347 * tracepoint.c (match_blocktype): New.
10348 (traceframe_find_block_type): Rename to ...
10349 (traceframe_walk_blocks): ... this. Add callback filter argument,
10350 and use it.
10351 (traceframe_find_block_type): New, reimplemented on top of
10352 traceframe_walk_blocks.
10353 (build_traceframe_info_xml): New.
10354 (traceframe_read_info): New.
10355 * server.h (traceframe_read_info): Declare.
10356
4f3e6fb7
YQ
103572011-02-11 Yao Qi <yao@codesourcery.com>
10358
10359 * configure.ac: Call AC_PROG_RANLIB.
10360 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10361 * configure: Regenerate.
10362
764880b7
PA
103632011-02-07 Pedro Alves <pedro@codesourcery.com>
10364
10365 * server.c (gdb_read_memory): Change return semantics to allow
10366 partial transfers.
10367 (handle_search_memory_1): Adjust.
10368 (process_serial_event) <'m' packet>: Handle partial transfers.
10369 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10370
1c79eb8a
PA
103712011-01-28 Pedro Alves <pedro@codesourcery.com>
10372
10373 * regcache.c (init_register_cache): Initialize
10374 regcache->register_status.
10375 (free_register_cache): Release regcache->register_status.
10376 (regcache_cpy): Copy register_status.
10377 (registers_to_string): Print 'x's for unavailable registers.
10378 (supply_register): Mark the register's status valid or
10379 unavailable, depending on whether a buffer was passed in or not.
10380 (supply_register_zeroed): New.
10381 (supply_regblock): Mark the registers' status valid or
10382 unavailable, depending on whether a buffer was passed in or not.
10383 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10384 (struct regcache): New `register_status' field.
10385 (supply_register_zeroed): Declare.
10386 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10387 supply_register_zeroed, rather than passing a NULL buffer to
10388 supply_register.
10389 * tracepoint.c (fetch_traceframe_registers): Update comment.
10390
85724a0e
PA
103912011-01-28 Pedro Alves <pedro@codesourcery.com>
10392
10393 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10394 buffer explicit.
10395
d08aafef
PA
103962011-01-25 Pedro Alves <pedro@codesourcery.com>
10397
10398 * server.h (decode_xfer_write): Change prototype.
10399 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10400 and don't extract the annex here.
10401 * server.c (decode_xfer_read): Remove `annex' parameter,
10402 and don't extract the annex here.
10403 (decode_xfer): New.
10404 (struct qxfer): New.
10405 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10406 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10407 (handle_qxfer_statictrace): New functions, abstracted out from
10408 handle_query, and made to use the struct qxfer interface.
10409 (handle_threads_qxfer_proper): Rename to ...
10410 (handle_qxfer_threads_proper): ... this.
10411 (handle_threads_qxfer): Rename to ...
10412 (handle_qxfer_threads): ... this. Adjust.
10413 (qxfer_packets): New array.
10414 (handle_qxfer): New function.
10415 (handle_query): Use handle_qxfer.
10416
493e2a69
MS
104172011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10418
10419 * gdbreplay.c: Shorten lines of >= 80 columns.
10420 * linux-low.c: Ditto.
10421 * linux-ppc-low.c: Ditto.
10422 * linux-s390-low.c: Ditto.
10423 * linux-sparc-low.c: Ditto.
10424 * linux-x86-low.c: Ditto.
10425 * linux-xtensa-low.c: Ditto.
10426 * mem-break.c: Ditto.
10427 * nto-low.c: Ditto.
10428 * regcache.h: Ditto.
10429 * remote-utils.c: Ditto.
10430 * server.c: Ditto.
10431 * server.h: Ditto.
10432 * thread-db.c: Ditto.
10433 * tracepoint.c: Ditto.
10434 * utils.c: Ditto.
10435 * win32-low.h: Ditto.
10436
44944448
JB
104372011-01-05 Joel Brobecker <brobecker@adacore.com>
10438
10439 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10440 update.
10441
71ce852c
JB
104422011-01-01 Joel Brobecker <brobecker@adacore.com>
10443
10444 * server.c (gdbserver_version): Update copyright year in version
10445 output.
10446 * gdbreplay.c (gdbreplay_version): Ditto.
10447
eb826dc6
MF
104482010-12-29 Jie Zhang <jie.zhang@analog.com>
10449
10450 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10451 * linux-bfin-low.c: New file.
10452 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10453 PT_DATA_ADDR for BFIN targets.
10454 * Makefile.in (SFILES): Add linux-bfin-low.c.
10455 (clean): Remove reg-bfin.c.
10456 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10457 * README: Mention supported Blackfin targets.
10458
39ab222a
MF
104592010-12-23 Mike Frysinger <vapier@gentoo.org>
10460
10461 * .gitignore: New file.
10462
a1f2ce7d
MF
104632010-11-16 Mike Frysinger <vapier@gentoo.org>
10464
10465 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10466
f474844c
JZ
104672010-10-22 Jie Zhang <jie@codesourcery.com>
10468
10469 * Makefile.in: Add FLAGS_TO_PASS variable.
10470 (install): Remove dependency of install-only and recursively
10471 invoke make for install-only.
10472
f1048712
DE
104732010-10-04 Doug Evans <dje@google.com>
10474
10475 * Makefile.in (uninstall): Use $(DESTDIR).
10476
b53a1623
PA
104772010-09-24 Pedro Alves <pedro@codesourcery.com>
10478
e6ee044d
PA
10479 PR gdb/11842
10480
b53a1623
PA
10481 * linux-x86-low.c (compat_siginfo_from_siginfo)
10482 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10483 si_code is < 0. Check for si_code == SI_TIMER before checking for
10484 si_code < 0.
10485
fa1bd1e4
JB
104862010-09-13 Joel Brobecker <brobecker@adacore.com>
10487
10488 * lynx-i386-low.c: New file.
10489 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10490
47fac8f8
JB
104912010-09-13 Joel Brobecker <brobecker@adacore.com>
10492
10493 * lynx-low.c (ptrace_request_to_str): Remove handling for
10494 request values that have been removed in LynxOS 5.x.
10495
1adfc54d
JB
104962010-09-13 Joel Brobecker <brobecker@adacore.com>
10497
10498 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10499 <ptrace.h>
10500
c2a66c29
NS
105012010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10502
10503 * configure.ac: Add --enable-inprocess-agent option.
10504 * configure: Rebuilt.
10505
32fcada3
YQ
105062010-09-06 Yao Qi <yao@codesourcery.com>
10507
10508 * linux-low.c (linux_kill): Remove unused variable.
10509 (linux_stabilize_threads): Likewise.
10510 * server.c (start_inferior): Likewise.
10511 (queue_stop_reply_callback): Likewise.
10512 * tracepoint.c (do_action_at_tracepoint): Likewise.
10513
0cccb683
YQ
105142010-09-06 Yao Qi <yao@codesourcery.com>
10515
10516 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10517 on return.
10518
423ec54c
JK
105192010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10520
10521 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10522
12ac6819
PA
105232010-09-06 Pedro Alves <pedro@codesourcery.com>
10524
10525 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10526 "$(IPA_DEPFILES)".
10527
8ed54b31
JB
105282010-09-01 Joel Brobecker <brobecker@adacore.com>
10529
10530 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10531 gdbserver/lynx-ppc-low.c: New files.
10532 * Makefile.in (lynx_low_h): New variable.
10533 (lynx-low.o, lynx-ppc-low.o): New rules.
10534 * configure.ac: On LynxOS, link with -lnetinet.
10535 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10536 * configure: regenerate.
10537
bb0116a4
JB
105382010-09-01 Joel Brobecker <brobecker@adacore.com>
10539
10540 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10541 * configure.ac: Add check for vasprintf and vsnprintf.
10542 * configure, config.in: Regenerate.
10543 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10544
a778ab81 105452010-09-01 Joel Brobecker <brobecker@adacore.com>
10546
10547 * gdbreplay.c: Move include of alloca.h up, next to include of
10548 malloc.h.
10549 * server.h: Add include of malloc.h.
10550 * mem-break.c: Remove include of malloc.h.
10551 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10552
8b034a19 105532010-09-01 Joel Brobecker <brobecker@adacore.com>
10554
10555 * Makefile.in (memmem.o): Build with -Wno-error.
10556
105572010-09-01 Joel Brobecker <brobecker@adacore.com>
10558
10559 * utils.c (xsnprintf): Make non-static.
10560 * server.h: Add xsnprintf declaration.
10561 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10562 replace calls to snprintf by calls to xsnprintf throughout.
10563
105642010-09-01 Joel Brobecker <brobecker@adacore.com>
10565
10566 * configure.ac: Add configure check for alloca.
10567 * configure, config.in: Regenerate.
10568 * server.h: Include alloca.h if it exists.
10569 * gdbreplay.c: Include alloca.h if it exists.
10570
1a981360
PA
105712010-08-28 Pedro Alves <pedro@codesourcery.com>
10572
10573 * linux-low.c (__SIGRTMIN): Define if not already defined.
10574 (linux_create_inferior): Check for __ANDROID__ rather than
10575 __SIGRTMIN.
10576 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10577 are already deferred.
10578 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10579 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10580 stopped and already has a pending signal to report.
10581 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10582 a pending signal to report or is moving out of a jump pad.
10583 (linux_init_signals): Check for __ANDROID__ rather than
10584 __SIGRTMIN.
10585
b4d51a55
PA
105862010-08-28 Pedro Alves <pedro@codesourcery.com>
10587
10588 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10589 debug_threads check. Avoid a linear search when not doing debug
10590 output.
10591
ec48365d
PA
105922010-08-27 Pedro Alves <pedro@codesourcery.com>
10593
10594 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10595 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10596 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10597 (process_event): Change local fd's type to gdb_fildes_t.
10598 (create_file_handler): Adjust prototype.
10599 (delete_file_handler): Adjust prototype.
10600 (handle_file_event): Adjust prototype. Use pfildes.
10601 (create_file_event): Adjsut prototype.
10602 * remote-utils.c (remote_desc, listen_desc): Change type to
10603 gdb_fildes_t.
10604 * server.h: New gdb_fildes_t typedef.
10605 [USE_WIN32API]: Include winsock2.h.
10606 (delete_file_handler, add_file_handler): Adjust prototypes.
10607 (pfildes): Declare.
10608 * utils.c (pfildes): New.
10609
854d88f0
PA
106102010-08-27 Pedro Alves <pedro@codesourcery.com>
10611
10612 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10613 * configure: Regenerate.
10614
0146f85b
PA
106152010-08-27 Pedro Alves <pedro@codesourcery.com>
10616
10617 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10618 (linux_done_accessing_memory): ... this.
10619 (linux_target_ops): Adjust.
10620 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10621 * nto-low.c (nto_target_ops): Adjust comment.
10622 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10623 * spu-low.c (spu_target_ops): Adjust comment.
10624 * target.h (target_ops): Rename unprepare_to_access_memory field
10625 to done_accessing_memory.
10626 (unprepare_to_access_memory): Rename to ...
10627 (done_accessing_memory): ... this.
10628
90d74c30
PA
106292010-08-26 Pedro Alves <pedro@codesourcery.com>
10630
10631 * linux-low.c (linux_prepare_to_access_memory): New.
10632 (linux_unprepare_to_access_memory): New.
10633 (linux_target_ops): Install them.
10634 * server.c (read_memory): Rename to ...
10635 (gdb_read_memory): ... this. Use
10636 prepare_to_access_memory/prepare_to_access_memory.
10637 (write_memory): Rename to ...
10638 (gdb_write_memory): ... this. Use
10639 prepare_to_access_memory/prepare_to_access_memory.
10640 (handle_search_memory_1): Adjust.
10641 (process_serial_event): Adjust.
10642 * target.h (struct target_ops): New fields
10643 prepare_to_access_memory and unprepare_to_access_memory.
10644 (prepare_to_access_memory, unprepare_to_access_memory): New.
10645 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10646 prepare_to_access_memory/prepare_to_access_memory.
10647 * nto-low.c (nto_target_ops): Adjust.
10648 * spu-low.c (spu_target_ops): Adjust.
10649 * win32-low.c (win32_target_ops): Adjust.
10650
fd467969
PA
106512010-08-26 Pedro Alves <pedro@codesourcery.com>
10652
10653 * Makefile.in (WARN_CFLAGS): Get it from configure.
10654 (WERROR_CFLAGS): New.
10655 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10656 * configure.ac: Introduce --enable-werror, which adds -Werror to
10657 the compiler command line. Enabled by default. Disable with
10658 --disable-werror. Add -Wdeclaration-after-statement
10659 Wpointer-arith and -Wformat-nonliteral to warning flags.
10660 * configure: Regenerate.
10661
331e2f5f
PA
106622010-08-26 Pedro Alves <pedro@codesourcery.com>
10663
10664 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10665
e581f2b4
PA
106662010-08-26 Pedro Alves <pedro@codesourcery.com>
10667
10668 * gdbreplay.c (remote_error): New.
10669 (gdbchar): New.
10670 (expect): Use gdbchar. Check for error reading from GDB.
10671 Clarify sync error output.
10672 (play): Check for errors writing to GDB.
10673 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10674 * remote-utils.c (getpkt): Check for errors writing to the remote
10675 descriptor.
10676
3c11dd79
PA
106772010-08-25 Pedro Alves <pedro@codesourcery.com>
10678
10679 * linux-low.c (linux_wait_1): Move non-debugging code out of
10680 `debug_threads' control.
10681
d20a8ad9
PA
106822010-08-25 Pedro Alves <pedro@codesourcery.com>
10683
10684 * linux-low.c (linux_wait_1): Don't set last_status here.
10685 * server.c (push_event, queue_stop_reply_callback): Assert we're
10686 not pushing a TARGET_WAITKIND_IGNORE event.
10687 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10688 (myresume, handle_target_event): Set the thread's last_resume_kind
10689 and last_status from the target returned status.
10690
964e4306
PA
106912010-08-25 Pedro Alves <pedro@codesourcery.com>
10692
10693 PR threads/10729
10694
10695 * linux-x86-low.c (update_debug_registers_callback): New.
10696 (i386_dr_low_set_addr): Use it.
10697 (i386_dr_low_get_addr): New.
10698 (i386_dr_low_set_control): Use update_debug_registers_callback.
10699 (i386_dr_low_get_control): New.
10700 (i386_dr_low_get_status): Adjust.
10701 * linux-low.c (linux_stop_lwp): New.
10702 * linux-low.h (linux_stop_lwp): Declare.
10703
10704 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10705 argument instead of a i386_debug_reg_state.
10706 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10707 a i386_debug_reg_state.
10708 (i386_insert_aligned_watchpoint): Adjust.
10709 (i386_remove_aligned_watchpoint): Adjust.
10710 (i386_low_stopped_data_address): Read the debug registers from the
10711 inferior instead of from the mirrors.
10712 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10713 (i386_dr_low_get_addr): Declare.
10714 (i386_dr_low_get_control): Declare.
10715 (i386_dr_low_get_status): Change prototype.
10716
10717 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10718 (i386_dr_low_get_addr): New.
10719 (i386_dr_low_get_control): New.
10720 (i386_dr_low_get_status): Adjust prototype. Return
10721 dr_status_mirror.
10722 (i386_initial_stuff): Clear dr_status_mirror and
10723 dr_control_mirror.
10724 (i386_get_thread_context): Adjust.
10725 (i386_set_thread_context): Adjust.
10726 (i386_thread_added): Adjust.
10727
5f21a75b
PA
107282010-08-24 Pedro Alves <pedro@codesourcery.com>
10729
10730 * linux-low.h (linux_thread_area): Delete declaration.
10731
3e4c1235
TS
107322010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10733
10734 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10735 after its termination.
10736
1971b033
PA
107372010-08-09 Pedro Alves <pedro@codesourcery.com>
10738
10739 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10740 (gdb_wants_all_stopped): Delete.
10741 (linux_wait_1): Don't call them.
10742 * server.c (handle_v_cont): Tag all threads as want-stopped.
10743 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10744 stopped as "client-wants-stopped".
10745
310444ac
PA
107462010-07-31 Pedro Alves <pedro@codesourcery.com>
10747
10748 * Makefile.in (signals_h): New.
10749 (server_h): Depend on it.
10750 (server.o): Don't depend on $(signals_def).
10751 (signals.o): Depend on $(signals_def).
10752
a19cae16
JK
107532010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10754
10755 * Makefile.in (signals_def): New.
10756 (server_h): Append include/gdb/signals.h and signals_def.
10757 (server.o): Append signals_def.
10758
30d50328
JK
107592010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10760
10761 * server.c (handle_target_event): Use target_signal_to_host for
10762 resume_info.sig initialization.
10763 * target.h (struct thread_resume) <sig>: New comment.
10764
5c3216e2
OS
107652010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10766
c6f46ca0
OS
10767 * server.c (handle_query): strcpy() the returned string from paddress()
10768 instead of sprintf().
5c3216e2
OS
10769 * utils.c (paddress): Return phex_nz().
10770
6bd31874
JB
107712010-07-07 Joel Brobecker <brobecker@adacore.com>
10772
10773 * server.c (handle_v_cont): Call mourn_inferior if process
10774 just exited.
10775 (myresume): Likewise.
10776
0fb4aa4b
PA
107772010-07-01 Pedro Alves <pedro@codesourcery.com>
10778
10779 Static tracepoints, and integration with UST.
10780
10781 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10782 * mem-break.c (uninsert_all_breakpoints)
10783 (reinsert_all_breakpoints): New.
10784 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10785 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10786 (gdb_agent_ust_loaded, helper_thread_id)
10787 (gdb_agent_helper_thread_id): New macros.
10788 (struct ipa_sym_addresses): Add addr_ust_loaded,
10789 addr_helper_thread_id, addr_cmd_buf.
10790 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10791 (in_process_agent_loaded_ust): New.
10792 (write_e_ust_not_loaded): New.
10793 (maybe_write_ipa_ust_not_loaded): New.
10794 (struct collect_static_trace_data_action): New.
10795 (enum tracepoint_type) <static_tracepoint>: New.
10796 (struct tracepoint) <handle>: Mention static tracepoints.
10797 (struct static_tracepoint_ctx): New.
10798 (CMD_BUF_SIZE): New.
10799 (add_tracepoint_action): Handle static tracepoint actions.
10800 (unprobe_marker_at): New.
10801 (clear_installed_tracepoints): Handle static tracepoints.
10802 (cmd_qtdp): Handle static tracepoints.
10803 (probe_marker_at): New.
10804 (cmd_qtstart): Handle static tracepoints.
10805 (response_tracepoint): Handle static tracepoints.
10806 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10807 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10808 (get_context_regcache): Handle static tracepoints.
10809 (do_action_at_tracepoint): Handle static tracepoint actions.
10810 (traceframe_find_block_type): Handle static trace data blocks.
10811 (traceframe_read_sdata): New.
10812 (download_tracepoints): Download static tracepoint actions.
10813 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10814 (GDB_PROBE_NAME): New.
10815 (ust_ops): New.
10816 (GET_UST_SYM): New.
10817 (USTF): New.
10818 (dlsym_ust): New.
10819 (ust_marker_to_static_tracepoint): New.
10820 (gdb_probe): New.
10821 (collect_ust_data_at_tracepoint): New.
10822 (gdb_ust_probe): New.
10823 (UNIX_PATH_MAX, SOCK_DIR): New.
10824 (gdb_ust_connect_sync_socket): New.
10825 (resume_thread, stop_thread): New.
10826 (run_inferior_command): New.
10827 (init_named_socket): New.
10828 (gdb_ust_socket_init): New.
10829 (cstr_to_hexstr): New.
10830 (next_st): New.
10831 (first_marker, next_marker): New.
10832 (response_ust_marker): New.
10833 (cmd_qtfstm, cmd_qtsstm): New.
10834 (unprobe_marker_at, probe_marker_at): New.
10835 (cmd_qtstmat, gdb_ust_thread): New.
10836 (gdb_ust_init): New.
10837 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10838 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10839 (ST_REGENTRY): New.
10840 (x86_64_st_collect_regmap): New.
10841 (X86_64_NUM_ST_COLLECT_GREGS): New.
10842 (AMD64_RIP_REGNUM): New.
10843 (supply_static_tracepoint_registers): New.
10844 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10845 (ST_REGENTRY): New.
10846 (i386_st_collect_regmap): New.
10847 (i386_NUM_ST_COLLECT_GREGS): New.
10848 (supply_static_tracepoint_registers): New.
10849 * server.c (handle_query): Handle qXfer:statictrace:read.
10850 <qSupported>: Report support for StaticTracepoints, and
10851 qXfer:statictrace:read features.
10852 * server.h (traceframe_read_sdata)
10853 (supply_static_tracepoint_registers): Declare.
10854 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10855 (unpack_varlen_hex): Include in IPA build.
10856 * Makefile.in (ustlibs, ustinc): New.
10857 (IPA_OBJS): Add remote-utils-ipa.o.
10858 ($(IPA_LIB)): Link -ldl and -lpthread.
10859 (UST_CFLAGS): New.
10860 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10861 * config.in, configure: Regenerate.
10862
9e4344e5
PA
108632010-06-20 Ian Lance Taylor <iant@google.com>
10864 Pedro Alves <pedro@codesourcery.com>
10865
10866 * linux-x86-low.c (always_true): Delete.
10867 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10868 trying to fool the compiler with always_true.
10869
c6beb2cb
PA
108702010-06-20 Pedro Alves <pedro@codesourcery.com>
10871
10872 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10873 conditions in gdbserver.
10874
d2ed6730
UW
108752010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10876
10877 * spu-low.c (spu_read_memory): Wrap around local store limit.
10878 (spu_write_memory): Likewise.
10879
4e29fb54
PA
108802010-06-15 Pedro Alves <pedro@codesourcery.com>
10881
10882 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10883 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10884 LONGEST uses.
10885 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10886 uses.
10887 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10888 uses with LONGEST uses.
10889
6a271cae
PA
108902010-06-14 Stan Shebs <stan@codesourcery.com>
10891 Pedro Alves <pedro@codesourcery.com>
10892
10893 Bytecode compiler.
10894
10895 * linux-x86-low.c: Include limits.h.
10896 (add_insns): New.
10897 (always_true): New.
10898 (EMIT_ASM): New.
10899 (EMIT_ASM32): New.
10900 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10901 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10902 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10903 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10904 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10905 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10906 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10907 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10908 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10909 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10910 (amd64_emit_void_call_2): New.
10911 (amd64_emit_ops): New.
10912 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10913 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10914 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10915 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10916 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10917 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10918 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10919 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10920 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10921 (i386_emit_stack_adjust, i386_emit_int_call_1)
10922 (i386_emit_void_call_2): New.
10923 (i386_emit_ops): New.
10924 (x86_emit_ops): New.
10925 (the_low_target): Install x86_emit_ops.
10926 * server.h (struct emit_ops): New.
10927 (get_raw_reg_func_addr): Declare.
10928 (current_insn_ptr, emit_error): Declare.
10929 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10930 (set_trace_state_variable_value): New defines.
10931 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10932 addr_get_trace_state_variable_value and
10933 addr_set_trace_state_variable_value.
10934 (symbol_list): New fields for get_raw_reg,
10935 get_trace_state_variable_value and set_trace_state_variable_value.
10936 (condfn): New typedef.
10937 (struct tracepoint): New field `compiled_cond'.
10938 (do_action_at_tracepoint): Clear compiled_cond.
10939 (get_trace_state_variable_value, set_trace_state_variable_value):
10940 Export in the IPA.
10941 (condition_true_at_tracepoint): If there's a compiled condition,
10942 run that.
10943 (current_insn_ptr, emit_error): New globals.
10944 (struct bytecode_address): New.
10945 (get_raw_reg_func_addr): New.
10946 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10947 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10948 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10949 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10950 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10951 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10952 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10953 (compile_tracepoint_condition, compile_bytecodes): New.
10954 * target.h (emit_ops): Forward declare.
10955 (struct target_ops): New field emit_ops.
10956 (target_emit_ops): New.
10957 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10958 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10959 * linux-low.c (linux_emit_ops): New.
10960 (linux_target_ops): Install it.
10961 * linux-low.h (struct linux_target_ops): New field emit_ops.
10962
92b72907
UW
109632010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10964
10965 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10966 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10967
fa593d66
PA
109682010-06-01 Pedro Alves <pedro@codesourcery.com>
10969 Stan Shebs <stan@codesourcery.com>
10970
10971 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10972 (all): Depend on $(extra_libraries).
10973 (install-only): Install the IPA.
10974 (IPA_OBJS, IPA_LIB): New.
10975 (clean): Remove the IPA lib.
10976 (IPAGENT_CFLAGS): New.
10977 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10978 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10979 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10980 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10981 * configure.ac: Check for atomic builtins support in the compiler.
10982 (IPA_DEPFILES, extra_libraries): Define.
10983 * configure.srv (ipa_obj): Add description.
10984 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10985 (i[34567]86-*-linux*): Set ipa_obj.
10986 (x86_64-*-linux*): Set ipa_obj.
10987 * linux-low.c (stabilizing_threads): New.
10988 (supports_fast_tracepoints): New.
10989 (linux_detach): Stabilize threads before detaching.
10990 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10991 the lwp is either not stabilizing, or is moving out of a jump pad.
10992 (linux_fast_tracepoint_collecting): New.
10993 (maybe_move_out_of_jump_pad): New.
10994 (enqueue_one_deferred_signal): New.
10995 (dequeue_one_deferred_signal): New.
10996 (linux_wait_for_event_1): If moving out of a jump pad, defer
10997 pending signals to later.
10998 (linux_stabilize_threads): New.
10999 (linux_wait_1): Check if threads need moving out of jump pads, and
11000 do it if so.
11001 (stuck_in_jump_pad_callback): New.
11002 (move_out_of_jump_pad_callback): New.
11003 (lwp_running): New.
11004 (linux_resume_one_lwp): Handle moving out of jump pads.
11005 (linux_set_resume_request): Dequeue deferred signals.
11006 (need_step_over_p): Also step over fast tracepoint jumps.
11007 (start_step_over): Also uninsert fast tracepoint jumps.
11008 (finish_step_over): Also reinsert fast tracepoint jumps.
11009 (linux_install_fast_tracepoint_jump): New.
11010 (linux_target_ops): Install linux_stabilize_threads and
11011 linux_install_fast_tracepoint_jump_pad.
11012 * linux-low.h (linux_target_ops) <get_thread_area,
11013 install_fast_tracepoint_jump_pad>: New fields.
11014 (struct lwp_info) <collecting_fast_tracepoint,
11015 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11016 (linux_get_thread_area): Declare.
11017 * linux-x86-low.c (jump_insn): New.
11018 (x86_get_thread_area): New.
11019 (append_insns): New.
11020 (push_opcode): New.
11021 (amd64_install_fast_tracepoint_jump_pad): New.
11022 (i386_install_fast_tracepoint_jump_pad): New.
11023 (x86_install_fast_tracepoint_jump_pad): New.
11024 (the_low_target): Install x86_get_thread_area and
11025 x86_install_fast_tracepoint_jump_pad.
11026 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11027 (struct fast_tracepoint_jump): New.
11028 (fast_tracepoint_jump_insn): New.
11029 (fast_tracepoint_jump_shadow): New.
11030 (find_fast_tracepoint_jump_at): New.
11031 (fast_tracepoint_jump_here): New.
11032 (delete_fast_tracepoint_jump): New.
11033 (set_fast_tracepoint_jump): New.
11034 (uninsert_fast_tracepoint_jumps_at): New.
11035 (reinsert_fast_tracepoint_jumps_at): New.
11036 (set_breakpoint_at): Use write_inferior_memory.
11037 (uninsert_raw_breakpoint): Use write_inferior_memory.
11038 (check_mem_read): Mask out fast tracepoint jumps.
11039 (check_mem_write): Mask out fast tracepoint jumps.
11040 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11041 (set_fast_tracepoint_jump): Declare.
11042 (delete_fast_tracepoint_jump)
11043 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11044 (reinsert_fast_tracepoint_jumps_at): Declare.
11045 * regcache.c: Don't compile many functions when building the
11046 in-process agent library.
11047 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11048 the register buffer in the heap.
11049 (free_register_cache): If the register buffer isn't owned by the
11050 regcache, don't free it.
11051 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11052 pre-existing register caches.
11053 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11054 type.
11055 (convert_ascii_to_int): : Constify `from' parameter type.
11056 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11057 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11058 the needed buffer in-place.
11059 (relocate_instruction): New.
11060 * server.c (handle_query) <qSymbols>: If the target supports
11061 tracepoints, give it a chance of looking up symbols. Report
11062 support for fast tracepoints.
11063 (handle_status): Stabilize threads.
11064 (process_serial_event): Adjust.
11065 * server.h (struct fast_tracepoint_jump): Forward declare.
11066 (struct process_info) <fast_tracepoint_jumps>: New field.
11067 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11068 (decode_X_packet, decode_M_packet): Adjust.
11069 (relocate_instruction): Declare.
11070 (in_process_agent_loaded): Declare.
11071 (tracepoint_look_up_symbols): Declare.
11072 (struct fast_tpoint_collect_status): Declare.
11073 (fast_tracepoint_collecting): Declare.
11074 (force_unlock_trace_buffer): Declare.
11075 (handle_tracepoint_bkpts): Declare.
11076 (initialize_low_tracepoint)
11077 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11078 * target.h (struct target_ops) <stabilize_threads,
11079 install_fast_tracepoint_jump_pad>: New fields.
11080 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11081 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11082 [HAVE_STDINT_H]: Include stdint.h.
11083 (trace_debug_1): Rename to ...
11084 (trace_vdebug): ... this.
11085 (trace_debug): Rename to ...
11086 (trace_debug_1): ... this. Add `level' parameter.
11087 (trace_debug): New.
11088 (ATTR_USED, ATTR_NOINLINE): New.
11089 (IP_AGENT_EXPORT): New.
11090 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11091 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11092 (about_to_request_buffer_space, trace_buffer_is_full)
11093 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11094 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11095 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11096 (traceframe_write_count, traceframes_created)
11097 (trace_state_variables)
11098 New renaming defines.
11099 (struct ipa_sym_addresses): New.
11100 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11101 (symbol_list): New.
11102 (ipa_sym_addrs): New.
11103 (all_tracepoint_symbols_looked_up): New.
11104 (in_process_agent_loaded): New.
11105 (write_e_ipa_not_loaded): New.
11106 (maybe_write_ipa_not_loaded): New.
11107 (tracepoint_look_up_symbols): New.
11108 (debug_threads) [IN_PROCESS_AGENT]: New.
11109 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11110 (UNKNOWN_SIDE_EFFECTS): New.
11111 (stop_tracing): New.
11112 (flush_trace_buffer): New.
11113 (stop_tracing_bkpt): New.
11114 (flush_trace_buffer_bkpt): New.
11115 (read_inferior_integer): New.
11116 (read_inferior_uinteger): New.
11117 (read_inferior_data_pointer): New.
11118 (write_inferior_data_pointer): New.
11119 (write_inferior_integer): New.
11120 (write_inferior_uinteger): New.
11121 (struct collect_static_trace_data_action): Delete.
11122 (enum tracepoint_type): New.
11123 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11124 <actions_str, step_actions, step_actions_str>: Only include in
11125 GDBserver.
fa593d66
PA
11126 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11127 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11128 (tracepoints): Use IP_AGENT_EXPORT.
11129 (last_tracepoint): Don't include in the IPA.
11130 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11131 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11132 (alloced_trace_state_variables): New.
11133 (trace_state_variables): Use IP_AGENT_EXPORT.
11134 (traceframe_t): Delete unused variable.
11135 (circular_trace_buffer): Don't include in the IPA.
11136 (trace_buffer_start): Delete.
11137 (struct trace_buffer_control): New.
11138 (trace_buffer_free): Delete.
11139 (struct ipa_trace_buffer_control): New.
11140 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11141 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11142 New.
11143 (trace_buffer_ctrl): New.
11144 (TRACE_BUFFER_CTRL_CURR): New.
11145 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11146 Reimplement as macros.
11147 (trace_buffer_wrap): Delete.
11148 (traceframe_write_count, traceframe_read_count)
11149 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11150 (struct tracepoint_hit_ctx) <type>: New field.
11151 (struct fast_tracepoint_ctx): New.
11152 (memory_barrier): New.
11153 (cmpxchg): New.
11154 (record_tracepoint_error): Update atomically in the IPA.
11155 (clear_inferior_trace_buffer): New.
11156 (about_to_request_buffer_space): New.
11157 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11158 updating the same buffer.
11159 (add_tracepoint): Default the tracepoint's type to trap
11160 tracepoint, and orig_size to -1.
11161 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11162 internal variables.
11163 (create_trace_state_variable): New parameter `gdb'. Handle it.
11164 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11165 (cmd_qtdp): Handle fast tracepoints.
11166 (cmd_qtdv): Adjust.
11167 (max_jump_pad_size): New.
11168 (gdb_jump_pad_head): New.
11169 (get_jump_space_head): New.
11170 (claim_jump_space): New.
11171 (sort_tracepoints): New.
11172 (MAX_JUMP_SIZE): New.
11173 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11174 IPA.
11175 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11176 support. Upload fast traceframes, and delete internal IPA
11177 breakpoints.
11178 (stop_tracing_handler): New.
11179 (flush_trace_buffer_handler): New.
11180 (cmd_qtstop): Upload fast tracepoints.
11181 (response_tracepoint): Handle fast tracepoints.
11182 (tracepoint_finished_step): Upload fast traceframes. Set the
11183 tracepoint hit context's tracepoint type.
11184 (handle_tracepoint_bkpts): New.
11185 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11186 type. Add comment about fast tracepoints.
11187 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11188 non-existing action_str field.
11189 (get_context_regcache): Handle fast tracepoints.
11190 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11191 to the regcache.
11192 (fast_tracepoint_from_jump_pad_address): New.
11193 (fast_tracepoint_from_ipa_tpoint_address): New.
11194 (collecting_t): New.
11195 (force_unlock_trace_buffer): New.
11196 (fast_tracepoint_collecting): New.
11197 (collecting): New.
11198 (gdb_collect): New.
11199 (write_inferior_data_ptr): New.
11200 (target_tp_heap): New.
11201 (target_malloc): New.
11202 (download_agent_expr): New.
11203 (UALIGN): New.
11204 (download_tracepoints): New.
11205 (download_trace_state_variables): New.
11206 (upload_fast_traceframes): New.
11207 (IPA_FIRST_TRACEFRAME): New.
11208 (IPA_NEXT_TRACEFRAME_1): New.
11209 (IPA_NEXT_TRACEFRAME): New.
11210 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11211 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11212 (gdb_jump_pad_buffer_end): New.
11213 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11214 (initialize_tracepoint): Adjust.
11215 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11216 buffer. Initialize the low module.
11217 * utils.c (PREFIX, TOOLNAME): New.
11218 (malloc_failure): Use PREFIX.
11219 (error): In the IPA, an error causes an exit.
11220 (fatal, warning): Use PREFIX.
11221 (internal_error): Use TOOLNAME.
11222 (NUMCELLS): Increase to 10.
11223 * configure, config.in: Regenerate.
11224
d149dd1d
PA
112252010-06-01 Pedro Alves <pedro@codesourcery.com>
11226
11227 * server.c (handle_query) <qSupported>: Do two passes over the
11228 qSupported string to avoid nesting strtok.
11229
f6528abd
JK
112302010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11231
11232 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11233 (CDEPS): New.
11234 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11235 -Wl,--dynamic-list.
11236 * configure: Regenerate.
11237 * proc-service.list: New.
11238
ca2a87a0
JK
112392010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11240
11241 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11242 New comment.
11243
363a6e9f
OS
112442010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11245
11246 * gdbreplay.c (remote_open): Check error return from socket() call by
11247 its equality to -1 not by it being negative.
11248 * remote-utils.c (remote_open): Likewise.
11249
d23b6cb1
PA
112502010-05-23 Pedro Alves <pedro@codesourcery.com>
11251
11252 * config.h: Regenerate.
11253
28d3cf85
MK
112542010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11255
11256 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11257 doesn't provide PTRACE_GET_THREAD_AREA.
11258
fea36a59
MK
112592010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11260
11261 * linux-m68k-low.c: Include <asm/ptrace.h>
11262 (ps_get_thread_area): Implement.
11263
24b066ba
DE
112642010-05-03 Doug Evans <dje@google.com>
11265
11266 * event-loop.c (struct callback_event): New struct.
11267 (callback_list): New global.
11268 (append_callback_event, delete_callback_event): New functions.
11269 (process_callback): New function.
11270 (start_event_loop): Call it.
11271 * remote-utils.c (NOT_SCHEDULED): Define.
11272 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11273 moved out of readchar.
11274 (readchar): Rewrite. Call reschedule before returning.
11275 (reset_readchar): New function.
11276 (remote_close): Call it.
11277 (process_remaining, reschedule): New functions.
11278 * server.h (callback_handler_func): New typedef.
11279 (append_callback_event, delete_callback_event): Declare.
11280
9836d6ea
PA
112812010-05-03 Pedro Alves <pedro@codesourcery.com>
11282
11283 * proc-service.c (ps_pglobal_lookup): Use
11284 thread_db_look_up_one_symbol.
11285 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11286 parameter. Use it instead of all_symbols_looked_up.
11287 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11288 field.
11289 (all_symbols_looked_up): Don't declare.
11290 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11291 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11292 field.
11293 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11294 Set all_symbols_looked_up here.
11295 (thread_db_look_up_one_symbol): New.
11296 (thread_db_get_tls_address): Adjust.
11297 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11298 thread_db object on the heap, and tentatively set it in the
11299 process structure.
11300 (thread_db_init): Don't set all_symbols_looked_up here.
11301 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11302
7984d532
PA
113032010-05-03 Pedro Alves <pedro@codesourcery.com>
11304
11305 * linux-low.c (linux_kill, linux_detach): Adjust.
11306 (status_pending_p_callback): Remove redundant statement. Check
11307 for !TARGET_WAITIKIND_IGNORE, instead of
11308 TARGET_WAITKIND_STOPPED.
11309 (handle_tracepoints): Make sure LWP is locked. Adjust.
11310 (linux_wait_for_event_1): Adjust.
11311 (linux_cancel_breakpoints): New.
11312 (unsuspend_one_lwp): New.
11313 (unsuspend_all_lwps): New.
11314 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11315 (send_sigstop_callback): Change return type to int, add new
11316 `except' parameter and handle it.
11317 (suspend_and_send_sigstop_callback): New.
11318 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11319 pass them down. If SUSPEND, also increment the lwp's suspend
11320 count.
11321 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11322 (need_step_over_p): Don't consider suspended LWPs.
11323 (start_step_over): Adjust.
11324 (proceed_one_lwp): Change return type to int, add new `except'
11325 parameter and handle it.
11326 (unsuspend_and_proceed_one_lwp): New.
11327 (proceed_all_lwps): Use find_inferior instead of
11328 for_each_inferior.
11329 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11330 also decrement the suspend count of LWPs. Pass `except' down,
11331 instead of hacking its suspend count.
11332 (linux_pause_all): Add `freeze' parameter. Adjust.
11333 (linux_unpause_all): New.
11334 (linux_target_ops): Install linux_unpause_all.
11335 * server.c (handle_status): Adjust.
11336 * target.h (struct target_ops): New fields `unpause_all' and
11337 `cancel_breakpoints'. Add new parameter to `pause_all'.
11338 (pause_all): Add new `freeze' parameter.
11339 (unpause_all): New.
11340 (cancel_breakpoints): New.
11341 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11342 cancel breakpoints.
11343 (cmd_qtstart): Pause threads.
11344 (stop_tracing): Pause threads, and cancel breakpoints.
11345 * win32-low.c (win32_target_ops): Adjust.
11346
e471f25b
PA
113472010-05-03 Pedro Alves <pedro@codesourcery.com>
11348
11349 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11350 the inferior right away from here...
11351 (linux_wait_1): ... to here, and adjust to check the thread's
11352 last_resume_kind instead of the lwp's step or stop_expected flags.
11353
1915ef4f
PA
113542010-05-02 Pedro Alves <pedro@codesourcery.com>
11355
11356 * README: Use consistent `GDB' and `GDBserver' spellings.
11357
f9e39928
PA
113582010-05-02 Pedro Alves <pedro@codesourcery.com>
11359
11360 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11361 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11362 (linux_detach_one_lwp): Assume the lwp is stopped.
11363 (any_thread_of): Delete.
11364 (linux_detach): Stop all lwps here. Don't blindly delete all
11365 breakpoints.
11366 (delete_lwp_callback): New.
11367 (linux_mourn): Delete all lwps of the process that is gone.
11368 (linux_wait_1): Don't delete the last lwp of the process here.
11369 * mem-break.h (mark_breakpoints_out): Declare.
11370 * mem-break.c (mark_breakpoints_out): New.
11371 (free_all_breakpoints): Use it.
11372 * server.c (handle_target_event): If the process is gone, mark
11373 breakpoints out.
11374 * thread-db.c (struct thread_db) <create_bp>: New field.
11375 (thread_db_enable_reporting): Fix prototype. Store a thread event
11376 breakpoint reference in the thread_db struct.
11377 (thread_db_load_search): Clear the thread_db object.
11378 (try_thread_db_load_1): Ditto.
11379 (switch_to_process): New.
11380 (disable_thread_event_reporting): Use it.
11381 (remove_thread_event_breakpoints): New.
11382 (thread_db_detach, thread_db_mourn): Use it.
11383
1e7fc18c
PA
113842010-05-01 Pedro Alves <pedro@codesourcery.com>
11385
11386 * linux-low.c (linux_enable_event_reporting): New.
11387 (linux_wait_for_event_1, handle_extended_wait): Use it.
11388
02fc4de7
PA
113892010-04-30 Pedro Alves <pedro@codesourcery.com>
11390
11391 * linux-low.c (linux_kill_one_lwp, linux_kill)
11392 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11393 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11394 SIGSTOP even if the LWP is stopped.
11395 (send_sigstop_callback): New.
11396 (stop_all_lwps): Use send_sigstop_callback instead.
11397 (linux_resume_one_thread): Adjust.
11398 (proceed_one_lwp): Still proceed an LWP that the client has
11399 requested to stop, if we haven't reported it as stopped yet. Make
11400 sure that LWPs the client want stopped, have a pending SIGSTOP.
11401
bc3b5632
DE
114022010-04-26 Doug Evans <dje@google.com>
11403
ae1ada35
DE
11404 * server.c (handle_general_set): Make static.
11405
bc3b5632
DE
11406 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11407 Print received char after testing for error/eof instead of before.
11408 (input_interrupt): Tweak comment.
11409
65730243
DE
114102010-04-23 Doug Evans <dje@google.com>
11411
11412 * server.c (start_inferior): Print inferior argv if --debug.
11413
a8ae7dc0
AR
114142010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11415
11416 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11417 * nto-x86-low.c: Include server.h
11418
1c07cc19
PM
114192010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11420
11421 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11422 be consistent with other sources of this directory.
11423 (init_registers_amd64): Correct name of source file of this function
11424 in the comment.
11425
e0a61e09
PM
114262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11427
11428 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11429 64-bit executables.
11430
54709339
PM
114312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11432
11433 * win32-i386-low.c: Add 64-bit support.
11434 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11435 (init_registers_amd64): Declare.
11436 (mappings): Add 64-bit version of array.
11437 (init_windows_x86): New function.
11438 (the_low_target): Change init_arch field to init_windows_x86.
11439
e8f0053d
PM
114402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11441
11442 * win32-low.c: Adapt to support also 64-bit architecture.
11443 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11444 (get_image_name): Use SIZE_T type for local variable `done'.
11445 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11446 (toolhelp_get_dll_name): Idem.
11447 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11448 Use uintptr_t typecast to avoid warning.
11449 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11450 (handle_exception): Use phex_nz to avoid warning.
11451 (win32_wait): Remove unused local variable `process'.
11452
c481e77e
PM
114532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11454
11455 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11456 `amd64-avx.o'.
11457
12ea4b69
PM
114582010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11459
11460 * configure.ac: Use `ws2_32' library for srv_mingw.
11461 * configure: Regenerate.
11462 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11463 * remote-utils.c: Likewise.
11464
f6d1620c
L
114652010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11466
11467 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11468 if __x86_64__ is defined.
11469
8e642873
PM
114702010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11471
11472 * configure: Regenerate.
11473
711e434b
PM
114742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11475
11476 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11477 * target.h (target_ops): New get_tib_address field.
11478 * win32-low.h (win32_thread_info): Add thread_local_base field.
11479 * win32-low.c (child_add_thread): Add tlb argument.
11480 Set thread_local_base field to TLB.
11481 (get_child_debug_event): Adapt to child_add_thread change.
11482 (win32_get_tib_address): New function.
11483 (win32_target_ops): Set get_tib_address field to
11484 win32_get_tib_address.
11485 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11486
505106cd
PA
114872010-04-12 Pedro Alves <pedro@codesourcery.com>
11488
505106cd
PA
11489 * linux-low.c (linux_mourn): Also remove the process.
11490 * server.c (handle_target_event): Don't remove the process here.
11491 * nto-low.c (nto_mourn): New.
11492 (nto_target_ops): Install it.
11493 * spu-low.c (spu_mourn): New.
11494 (spu_target_ops): Install it.
11495 * win32-low.c (win32_mourn): New.
11496 (win32_target_ops): Install it.
11497
e8470a06
PA
114982010-04-12 Pedro Alves <pedro@codesourcery.com>
11499
11500 * server.h (buffer_xml_printf): Remove redundant `;'.
11501
45ba0d02
PA
115022010-04-12 Pedro Alves <pedro@codesourcery.com>
11503
11504 * regcache.c (set_register_cache): Invalidate regcaches before
11505 changing the register cache layout.
11506 (regcache_invalidate_one): Allow a NULL regcache.
11507 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11508 regcaches before changing the register cache layout or the target
11509 regsets.
11510
59e04013
L
115112010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11512
11513 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11514 variable warning on Linux/x86-64.
11515
8336d594
PA
115162010-04-11 Pedro Alves <pedro@codesourcery.com>
11517
11518 GDBserver disconnected tracing support.
11519
11520 * linux-low.c (linux_remove_process): Delete.
11521 (add_lwp): Don't set last_resume_kind here.
11522 (linux_kill): Use `mourn'.
11523 (linux_detach): Use `thread_db_detach', and `mourn'.
11524 (linux_mourn): New.
11525 (linux_attach_lwp_1): Adjust comment.
11526 (linux_attach): last_resume_kind moved the thread_info; adjust.
11527 (status_pending_p_callback): Adjust.
11528 (linux_wait_for_event_1): Adjust.
11529 (count_events_callback, select_singlestep_lwp_callback)
11530 (select_event_lwp_callback, cancel_breakpoints_callback)
11531 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11532 (proceed_one_lwp): Adjust.
11533 (linux_async): Add debug output.
11534 (linux_thread_stopped): New.
11535 (linux_pause_all): New.
11536 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11537 linux_pause_all.
11538 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11539 (thread_db_free): Delete declaration.
11540 (thread_db_detach, thread_db_mourn): Declare.
11541 * thread-db.c (thread_db_init): Use thread_db_mourn.
11542 (thread_db_free): Delete, split in two.
11543 (disable_thread_event_reporting): New.
11544 (thread_db_detach): New.
11545 (thread_db_mourn): New.
11546
11547 * server.h (struct thread_info) <last_resume_kind>: New field.
11548 <attached>: Add comment.
11549 <gdb_detached>: New field.
11550 (handler_func): Change return type to int.
11551 (handle_serial_event, handle_target_event): Ditto.
11552 (gdb_connected): Declare.
11553 (tracing): Delete.
11554 (disconnected_tracing): Declare.
11555 (stop_tracing): Declare.
11556
11557 * server.c (handle_query) <qSupported>: Report support for
11558 disconnected tracing.
11559 (queue_stop_reply_callback): Account for running threads.
11560 (gdb_wants_thread_stopped): New.
11561 (gdb_wants_all_threads_stopped): New.
11562 (gdb_reattached_process): New.
11563 (handle_status): Clear the `gdb_detached' flag of all processes.
11564 In all-stop, stop all threads.
11565 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11566 (process_serial_event): If the remote connection breaks, or if an
11567 exit was forced with "monitor exit", force an event loop exit.
11568 Handle disconnected tracing on detach.
11569 (handle_serial_event): Adjust.
11570 (handle_target_event): If GDB isn't connected, forward events back
11571 to the inferior, unless the last process exited, in which case,
11572 exit gdbserver. Adjust interface.
11573
11574 * remote-utils.c (remote_open): Don't block in accept. Instead
11575 register an event loop source on the listen socket file
11576 descriptor. Refactor bits into ...
11577 (listen_desc): ... this new global.
11578 (gdb_connected): ... this new function.
11579 (enable_async_notification): ... this new function.
11580 (handle_accept_event): ... this new function.
11581 (remote_close): Clear remote_desc.
11582
11583 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11584
11585 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11586 New fields.
11587 (mourn_inferior): Define.
11588 (target_process_qsupported): Avoid the dangling else problem.
11589 (thread_stopped): Define.
11590 (pause_all): Define.
11591 (target_waitstatus_to_string): Declare.
11592 * target.c (target_waitstatus_to_string): New.
11593
11594 * tracepoint.c (tracing): Make extern.
11595 (disconnected_tracing): New.
11596 (stop_tracing): Make extern. Handle tracing stops due to GDB
11597 disconnecting.
11598 (cmd_qtdisconnected): New.
11599 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11600 (handle_tracepoint_general_set): Handle QTDisconnected.
11601
11602 * event-loop.c (event_handler_func): Change return type to int.
11603 (process_event): Bail out if the event handler wants the event
11604 loop to stop.
11605 (handle_file_event): Ditto.
11606 (start_event_loop): Bail out if the event handler wants the event
11607 loop to stop.
11608
11609 * nto-low.c (nto_target_ops): Adjust.
11610 * spu-low.c (spu_wait): Don't remove the process here.
11611 (spu_target_ops): Adjust.
11612 * win32-low.c (win32_wait): Don't remove the process here.
11613 (win32_target_ops): Adjust.
11614
5d267c4c
PA
116152010-04-11 Pedro Alves <pedro@codesourcery.com>
11616
11617 * regcache.c (realloc_register_cache): Invalidate inferior's
11618 regcache before recreating it.
11619
623ccd72
PA
116202010-04-09 Pedro Alves <pedro@codesourcery.com>
11621
11622 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11623
219f2f23
PA
116242010-04-09 Stan Shebs <stan@codesourcery.com>
11625 Pedro Alves <pedro@codesourcery.com>
11626
11627 * server.h (LONGEST): New.
11628 (struct thread_info) <while_stepping>: New field.
11629 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11630 Declare.
11631 (initialize_tracepoint, handle_tracepoint_general_set)
11632 (handle_tracepoint_query, tracepoint_finished_step)
11633 (tracepoint_was_hit, release_while_stepping_state_list):
11634 (current_traceframe): Declare.
11635 * server.c (handle_general_set): Handle tracepoint packets.
11636 (read_memory): New.
11637 (write_memory): New.
11638 (handle_search_memory_1): Use read_memory.
11639 (handle_query): Report support for conditional tracepoints, trace
11640 state variables, and tracepoint sources. Handle tracepoint
11641 queries.
11642 (main): Initialize the tracepoints module.
11643 (process_serial_event): Handle traceframe reads/writes.
11644
11645 * linux-low.c (handle_tracepoints): New.
11646 (linux_wait_1): Call it.
11647 (linux_resume_one_lwp): Handle while-stepping.
11648 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11649 (linux_target_ops): Install them.
11650 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11651 New field.
11652 * linux-x86-low.c (x86_supports_tracepoints): New.
11653 (the_low_target). Install it.
11654
11655 * mem-break.h (delete_breakpoint): Declare.
11656 * mem-break.c (delete_breakpoint): Make external.
11657
11658 * target.h (struct target_ops): Add `supports_tracepoints',
11659 `read_pc', and `write_pc' fields.
11660 (target_supports_tracepoints): Define.
11661 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11662 (phex_nz): New.
11663
11664 * regcache.h (struct regcache) <registers_owned>: New field.
11665 (init_register_cache, regcache_cpy): Declare.
11666 (regcache_read_pc, regcache_write_pc): Declare.
11667 (register_cache_size): Declare.
11668 (supply_regblock): Declare.
11669 * regcache.c (init_register_cache): New.
11670 (new_register_cache): Use it.
11671 (regcache_cpy): New.
11672 (register_cache_size): New.
11673 (supply_regblock): New.
11674 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11675
219f2f23
PA
11676 * tracepoint.c: New.
11677
11678 * Makefile.in (OBS): Add tracepoint.o.
11679 (tracepoint.o): New rule.
11680
3a13a53b
L
116812010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11682
11683 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11684 (i386-mmx.o): New.
11685 (i386-mmx.c): Likewise.
11686 (i386-mmx-linux.o): Likewise.
11687 (i386-mmx-linux.c): Likewise.
11688
11689 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11690 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11691 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11692 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11693
11694 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11695 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11696 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11697
1570b33e
L
116982010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11699
11700 * Makefile.in (clean): Updated.
11701 (i386-avx.o): New.
11702 (i386-avx.c): Likewise.
11703 (i386-avx-linux.o): Likewise.
11704 (i386-avx-linux.c): Likewise.
11705 (amd64-avx.o): Likewise.
11706 (amd64-avx.c): Likewise.
11707 (amd64-avx-linux.o): Likewise.
11708 (amd64-avx-linux.c): Likewise.
11709
11710 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11711 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11712 (srv_amd64_regobj): Add amd64-avx.o.
11713 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11714 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11715 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11716 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11717 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11718 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11719 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11720
11721 * i387-fp.c: Include "i386-xstate.h".
11722 (i387_xsave): New.
11723 (i387_cache_to_xsave): Likewise.
11724 (i387_xsave_to_cache): Likewise.
11725 (x86_xcr0): Likewise.
11726
11727 * i387-fp.h (i387_cache_to_xsave): Likewise.
11728 (i387_xsave_to_cache): Likewise.
11729 (x86_xcr0): Likewise.
11730
11731 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11732 * linux-crisv32-low.c (target_regsets): Likewise.
11733 * linux-m68k-low.c (target_regsets): Likewise.
11734 * linux-mips-low.c (target_regsets): Likewise.
11735 * linux-ppc-low.c (target_regsets): Likewise.
11736 * linux-s390-low.c (target_regsets): Likewise.
11737 * linux-sh-low.c (target_regsets): Likewise.
11738 * linux-sparc-low.c (target_regsets): Likewise.
11739 * linux-xtensa-low.c (target_regsets): Likewise.
11740
11741 * linux-low.c: Include <sys/uio.h>.
11742 (regsets_fetch_inferior_registers): Support nt_type.
11743 (regsets_store_inferior_registers): Likewise.
11744 (linux_process_qsupported): New.
11745 (linux_target_ops): Add linux_process_qsupported.
11746
11747 * linux-low.h (regset_info): Add nt_type.
11748 (linux_target_ops): Add process_qsupported.
11749
11750 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11751 and <sys/uio.h>.
11752 (init_registers_i386_avx_linux): New.
11753 (init_registers_amd64_avx_linux): Likewise.
11754 (xmltarget_i386_linux_no_xml): Likewise.
11755 (xmltarget_amd64_linux_no_xml): Likewise.
11756 (PTRACE_GETREGSET): Likewise.
11757 (PTRACE_SETREGSET): Likewise.
11758 (x86_fill_xstateregset): Likewise.
11759 (x86_store_xstateregset): Likewise.
11760 (use_xml): Likewise.
11761 (x86_linux_update_xmltarget): Likewise.
11762 (x86_linux_process_qsupported): Likewise.
11763 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11764 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11765 init_registers_i386_linux here. Call
11766 x86_linux_update_xmltarget.
11767 (the_low_target): Add x86_linux_process_qsupported.
11768
11769 * server.c (handle_query): Call target_process_qsupported.
11770
11771 * target.h (target_ops): Add process_qsupported.
11772 (target_process_qsupported): New.
11773
fc7238bb
PA
117742010-04-03 Pedro Alves <pedro@codesourcery.com>
11775
11776 * inferiors.c (add_thread): Set last_status kind to
11777 TARGET_WAITKIND_IGNORE.
11778 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11779 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11780 (linux_wait_1): Move `thread' local definition to block that uses
11781 it. Don't NULL initialize `event_child'.
11782 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11783 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11784 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11785
bdabb078
PA
117862010-04-01 Pedro Alves <pedro@codesourcery.com>
11787
11788 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11789 an extended waitstatus, or by a watchpoint.
11790 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11791 thread was stepping or has been stopped by a watchpoint.
11792
d3bbe7a0
PA
117932010-04-01 Pedro Alves <pedro@codesourcery.com>
11794
11795 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11796 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11797 of another, then delete the previous, and validate all
11798 breakpoints.
11799 (validate_inserted_breakpoint): New.
11800 (delete_disabled_breakpoints): New.
11801 (validate_breakpoints): New.
11802 (check_mem_read): Validate breakpoints before trusting their
11803 shadow. Delete disabled breakpoints.
11804 (check_mem_write): Validate breakpoints before trusting they
11805 should be inserted. Delete disabled breakpoints.
11806 * mem-break.h (validate_breakpoints):
11807 * server.c (handle_query): Validate breakpoints when we see a
11808 qSymbol query.
11809
8b07ae33
PA
118102010-04-01 Pedro Alves <pedro@codesourcery.com>
11811
11812 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11813 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11814 if we could tell there's a GDB breakpoint at stop_pc.
11815 (need_step_over_p): Don't do a step over if we find a GDB
11816 breakpoint at the resume PC.
11817
11818 * mem-break.c (struct raw_breakpoint): New.
11819 (enum bkpt_type): New type `gdb_breakpoint'.
11820 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11821 fields. New field `raw'.
11822 (find_raw_breakpoint_at): New.
11823 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11824 breakpoint instead.
11825 (set_breakpoint_at): Adjust.
11826 (delete_raw_breakpoint): New.
11827 (release_breakpoint): New.
11828 (delete_breakpoint): Rename to...
11829 (delete_breakpoint_1): ... this. Add proc parameter. Use
11830 release_breakpoint. Return ENOENT.
11831 (delete_breakpoint): Reimplement.
11832 (find_breakpoint_at): Delete.
11833 (find_gdb_breakpoint_at): New.
11834 (delete_breakpoint_at): Delete.
11835 (set_gdb_breakpoint_at): New.
11836 (delete_gdb_breakpoint_at): New.
11837 (gdb_breakpoint_here): New.
11838 (set_reinsert_breakpoint): Use release_breakpoint.
11839 (uninsert_breakpoint): Rename to ...
11840 (uninsert_raw_breakpoint): ... this.
11841 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11842 (reinsert_raw_breakpoint): Change parameter type to
11843 raw_breakpoint.
11844 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11845 instead.
11846 (check_breakpoints): Adjust. Use release_breakpoint.
11847 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11848 (breakpoint_inserted_here): Ditto.
11849 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11850 Don't trust the breakpoint's shadow if it is not inserted.
11851 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11852 (delete_all_breakpoints): Adjust.
11853 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11854 use delete_breakpoint_1.
11855
11856 * mem-break.h (breakpoints_supported): Delete declaration.
11857 (set_gdb_breakpoint_at): Declare.
11858 (gdb_breakpoint_here): Declare.
11859 (delete_breakpoint_at): Delete.
11860 (delete_gdb_breakpoint_at): Declare.
11861
11862 * server.h (struct raw_breakpoint): Forward declare.
11863 (struct process_info): New field `raw_breakpoints'.
11864
11865 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11866 breakpoints.
11867
6bf5e0ba
PA
118682010-03-24 Pedro Alves <pedro@codesourcery.com>
11869
11870 * linux-low.c (status_pending_p_callback): Fix comment.
11871 (linux_wait_for_event_1): Move most of the internal breakpoint
11872 handling from here...
11873 (linux_wait_1): ... to here.
11874 (count_events_callback): New.
11875 (select_singlestep_lwp_callback): New.
11876 (select_event_lwp_callback): New.
11877 (cancel_breakpoints_callback): New.
11878 (select_event_lwp): New.
11879 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11880 priority to all LWPs that have had events that should be reported
11881 to the client. Cancel breakpoints when about to reporting the
11882 event to the client, not while stopping lwps. No longer cancel
11883 finished single-steps here.
11884 (cancel_finished_single_step): Delete.
11885 (cancel_finished_single_steps): Delete.
11886
414a389f
PA
118872010-03-24 Pedro Alves <pedro@codesourcery.com>
11888
11889 * mem-break.c (enum bkpt_type): New.
11890 (struct breakpoint): New field `type'.
11891 (set_breakpoint_at): Change return type to struct breakpoint
11892 pointer. Set type to `other_breakpoint' by default.
11893 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11894 in the breakpoint list.
11895 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11896 (reinsert_breakpoint): Rename to ...
11897 (reinsert_raw_breakpoint): ... this.
11898 (reinsert_breakpoints_at): Adjust.
11899 * mem-break.h (struct breakpoint): Declare.
11900 (set_breakpoint_at): Change return type to struct breakpoint
11901 pointer.
11902
2280c721
PA
119032010-03-24 Pedro Alves <pedro@codesourcery.com>
11904
11905 * server.c (handle_query): Assign, not compare.
11906
d50171e4
PA
119072010-03-24 Pedro Alves <pedro@codesourcery.com>
11908
11909 Teach linux gdbserver to step-over-breakpoints.
11910
11911 * linux-low.c (can_hardware_single_step): New.
11912 (supports_breakpoints): New.
11913 (handle_extended_wait): If stopping threads, read the stop pc of
11914 the new cloned LWP.
11915 (get_pc): New.
11916 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11917 low target doesn't support retrieving the PC.
11918 (add_lwp): Set last_resume_kind to resume_continue.
11919 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11920 (linux_attach): Don't clear stop_expected. Set the lwp's
11921 last_resume_kind to resume_stop.
11922 (linux_detach_one_lwp): Don't check for removed breakpoints.
11923 (check_removed_breakpoint): Delete.
11924 (status_pending_p): Rename to ...
11925 (status_pending_p_callback): ... this. Don't check for removed
11926 breakpoints. Don't consider threads that are stopped from GDB's
11927 perspective.
11928 (linux_wait_for_lwp): Always read the stop_pc here.
11929 (cancel_breakpoint): New.
11930 (step_over_bkpt): New global.
11931 (linux_wait_for_event_1): Implement stepping over breakpoints.
11932 (gdb_wants_lwp_stopped): New.
11933 (gdb_wants_all_stopped): New.
11934 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11935 single-step traps here. Store the thread's last reported target
11936 wait status.
11937 (send_sigstop): Don't clear stop_expected. Always set it,
11938 instead.
11939 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11940 (cancel_finished_single_step): New.
11941 (cancel_finished_single_steps): New.
11942 (wait_for_sigstop): Don't cancel finished single-step traps here.
11943 (linux_resume_one_lwp): Don't check for removed breakpoints.
11944 Don't set `step' on non-hardware step archs.
11945 (linux_set_resume_request): Ignore resume_stop requests if already
11946 stopping or stopped. Set the lwp's last_resume_kind.
11947 (resume_status_pending_p): Don't check for removed breakpoints.
11948 (need_step_over_p): New.
11949 (start_step_over): New.
11950 (finish_step_over): New.
11951 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11952 requests. Clear the thread's last reported target waitstatus.
11953 Don't use the `suspended' flag. Don't consider pending breakpoints.
11954 (linux_resume): Start a step-over if necessary.
11955 (proceed_one_lwp): New.
11956 (proceed_all_lwps): New.
11957 (unstop_all_lwps): New.
11958 * linux-low.h (struct lwp_info): Rewrite comment for the
11959 `suspended' flag. Add the `stop_pc' field. Delete the
11960 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11961 Add `'last_resume_kind' and `need_step_over' fields.
11962 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11963 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11964 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11965 (set_raw_breakpoint_at): New.
11966 (set_breakpoint_at): Rewrite to use it.
11967 (reinsert_breakpoint_handler): Delete.
11968 (set_reinsert_breakpoint): New.
11969 (reinsert_breakpoint_by_bp): Delete.
11970 (delete_reinsert_breakpoints): New.
11971 (uninsert_breakpoint): Rewrite.
11972 (uninsert_breakpoints_at): New.
11973 (reinsert_breakpoint): Rewrite.
11974 (reinsert_breakpoints_at): New.
11975 (check_breakpoints): Rewrite.
11976 (breakpoint_here): New.
11977 (breakpoint_inserted_here): New.
11978 (check_mem_read): Adjust.
11979 * mem-break.h (breakpoints_supported, breakpoint_here)
11980 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11981 (reinsert_breakpoint_by_bp): Delete declaration.
11982 (delete_reinsert_breakpoints): Declare.
11983 (reinsert_breakpoint): Delete declaration.
11984 (reinsert_breakpoints_at): Declare.
11985 (uninsert_breakpoint): Delete declaration.
11986 (uninsert_breakpoints_at): Declare.
11987 (check_breakpoints): Adjust prototype.
11988 * server.h: Adjust include order.
11989 (struct thread_info): Declare here. Add a `last_status' field.
11990
30ba68cb
MS
119912010-03-23 Michael Snyder <msnyder@vmware.com>
11992
11993 * server.c (crc32): New function.
11994 (handle_query): Add handling for 'qCRC:' request.
11995
b9a881c2
PA
119962010-03-23 Pedro Alves <pedro@codesourcery.com>
11997
11998 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11999 lwp had been stopped by a watchpoint.
12000
e92d13d5
PA
120012010-03-16 Pedro Alves <pedro@codesourcery.com>
12002
12003 * server.h (internal_error): Declare.
12004 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12005 * utils.c (internal_error): New function.
12006
64daa791
AS
120072010-03-15 Andreas Schwab <schwab@redhat.com>
12008
12009 * configure.srv: Fix typo setting srv_regobj.
12010
f52cd8cd
PA
120112010-03-15 Pedro Alves <pedro@codesourcery.com>
12012
12013 * linux-low.c (fetch_register): Avoid passing a non string literal
12014 format to `error'.
12015 (usr_store_inferior_registers): Ditto.
12016
93ae6fdc
PA
120172010-03-14 Pedro Alves <pedro@codesourcery.com>
12018
12019 * linux-low.c (linux_write_memory): Bail out early if peeking
12020 memory failed.
12021
c3adc08c
PA
120222010-03-14 Pedro Alves <pedro@codesourcery.com>
12023
12024 * linux-low.h (struct lwp_info): New fields
12025 `stopped_by_watchpoint' and `stopped_data_address'.
12026 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12027 here, and cache them in the lwp object.
12028 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12029 directly.
12030 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12031 field.
12032 (linux_stopped_by_watchpoint): Rewrite.
12033 (linux_stopped_data_address): Rewrite.
12034
bce522a2
PA
120352010-03-06 Simo Melenius <simo.melenius@iki.fi>
12036
12037 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12038 switching the current inferior, not before.
12039
90884b2b
L
120402010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12041
12042 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12043 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12044 i386-linux.c and amd64-linux.c.
12045 (reg-i386.o): Removed.
12046 (reg-i386.c): Likewise.
12047 (reg-i386-linux.o): Likewise.
12048 (reg-i386-linux.c): Likewise.
12049 (reg-x86-64.o): Likewise.
12050 (reg-x86-64.c): Likewise.
12051 (reg-x86-64-linux.o): Likewise.
12052 (reg-x86-64-linux.c): Likewise.
12053 (i386.o): New.
12054 (i386.c): Likewise.
12055 (i386-linux.o): Likewise.
12056 (i386-linux.c): Likewise.
12057 (amd64.o): Likewise.
12058 (amd64.c): Likewise.
12059 (amd64-linux.o): Likewise.
12060 (amd64-linux.c): Likewise.
12061
12062 * configure.srv (srv_i386_regobj): New.
12063 (srv_i386_linux_regobj): Likewise.
12064 (srv_amd64_regobj): Likewise.
12065 (srv_amd64_linux_regobj): Likewise.
12066 (srv_i386_32bit_xmlfiles): Likewise.
12067 (srv_i386_64bit_xmlfiles): Likewise.
12068 (srv_i386_xmlfiles): Likewise.
12069 (srv_amd64_xmlfiles): Likewise.
12070 (srv_i386_linux_xmlfiles): Likewise.
12071 (srv_amd64_linux_xmlfiles): Likewise.
12072 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12073 srv_xmlfiles to $srv_i386_xmlfiles.
12074 (i[34567]86-*-mingw32ce*): Likewise.
12075 (i[34567]86-*-mingw*): Likewise.
12076 (i[34567]86-*-nto*): Likewise.
12077 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12078 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12079 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12080 (x86_64-*-linux*): Likewise.
12081
12082 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12083 (init_registers_amd64_linux): New.
12084 (x86_arch_setup): Replace init_registers_x86_64_linux with
12085 init_registers_amd64_linux.
12086
193f13e6
MK
120872010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12088
12089 * configure.ac: Check for libdl. If it is not available link against
12090 static libthread_db.
12091 * configure: Regenerate.
12092
85d721b8
PA
120932010-02-22 Pedro Alves <pedro@codesourcery.com>
12094
12095 PR9605
12096
12097 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12098 handing a read watchpoint.
12099 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12100
6076632b
DE
121012010-02-12 Doug Evans <dje@google.com>
12102
12103 * linux-low.c (linux_supports_tracefork_flag): Document.
12104 (linux_look_up_symbols): Add comment.
12105
3327ccf7
L
121062010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12107
12108 * regcache.c (supply_register): Clear regcache if buf is NULL.
12109
0718675c 121102010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12111 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12112
12113 * inferiors.c (find_inferior): Add function documentation.
12114 (unloaded_dll): Handle the case where the unloaded dll has not
12115 been previously registered in the dll list.
12116
177321bd
DJ
121172010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12118
12119 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12120 (thumb2_breakpoint): New.
12121 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12122
2b009048
DJ
121232010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12124
12125 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12126 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12127 breakpoints.
12128
3be029c7
PA
121292010-01-21 Pedro Alves <pedro@codesourcery.com>
12130
12131 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12132
18f5de3b
JK
121332010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12134
12135 * linux-s390-low.c (s390_collect_ptrace_register)
12136 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12137
3743bb4f
DE
121382010-01-21 Doug Evans <dje@google.com>
12139
14ce3065
DE
12140 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12141 (PTRACE_ARG4_TYPE): New macro.
12142 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12143 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12144 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12145 (usr_store_inferior_registers): Ditto.
12146 (linux_read_memory, linux_write_memory): Ditto.
12147 (linux_test_for_tracefork): Ditto.
12148
3743bb4f
DE
12149 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12150 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12151
8b315be5
PA
121522010-01-21 Pedro Alves <pedro@codesourcery.com>
12153
12154 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12155 target.
12156
85492558
PA
121572010-01-21 Pedro Alves <pedro@codesourcery.com>
12158
12159 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12160 prototype to take a regcache. Adjust.
12161
442ea881
PA
121622010-01-20 Pedro Alves <pedro@codesourcery.com>
12163
12164 * regcache.h (struct thread_info): Forward declare.
12165 (struct regcache): New.
12166 (new_register_cache): Adjust prototype.
12167 (get_thread_regcache): Declare.
12168 (free_register_cache): Adjust prototype.
12169 (registers_to_string, registers_from_string): Ditto.
12170 (supply_register, supply_register_by_name, collect_register)
12171 (collect_register_as_string, collect_register_by_name): Ditto.
12172 * regcache.c (struct inferior_regcache_data): Delete.
12173 (get_regcache): Rename to ...
12174 (get_thread_regcache): ... this. Adjust. Switch inferior before
12175 fetching registers.
12176 (regcache_invalidate_one): Adjust.
12177 (regcache_invalidate): Fix prototype.
12178 (new_register_cache): Return the new register cache.
12179 (free_register_cache): Change prototype.
12180 (realloc_register_cache): Adjust.
12181 (registers_to_string): Change prototype to take a regcache. Adjust.
12182 (registers_from_string): Ditto.
12183 (register_data): Ditto.
12184 (supply_register): Ditto.
12185 (supply_register_by_name): Ditto.
12186 (collect_register): Ditto.
12187 (collect_register_as_string): Ditto.
12188 (collect_register_by_name): Ditto.
12189 * server.c (process_serial_event): Adjust.
12190 * linux-low.h (regset_fill_func, regset_store_func): Change
12191 prototype.
12192 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12193 Change prototype.
12194 * linux-low.c (get_stop_pc): Adjust.
12195 (check_removed_breakpoint): Adjust.
12196 (linux_wait_for_event): Adjust.
12197 (linux_resume_one_lwp): Adjust.
12198 (fetch_register): Add regcache parameter. Adjust.
12199 (usr_store_inferior_registers): Ditto.
12200 (regsets_fetch_inferior_registers): Ditto.
12201 (regsets_store_inferior_registers): Ditto.
12202 (linux_fetch_registers, linux_store_registers): Ditto.
12203 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12204 regcache. Adjust.
43aaf8b6
PA
12205 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12206 Ditto.
442ea881
PA
12207 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12208 prototype to take a regcache.
12209 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12210 * remote-utils.c (convert_ascii_to_int, outreg)
12211 (prepare_resume_reply): Change prototype to take a regcache.
12212 Adjust.
12213 * target.h (struct target_ops) <fetch_registers, store_registers>:
12214 Change prototype to take a regcache.
12215 (fetch_inferior_registers, store_inferior_registers): Change
12216 prototype to take a regcache. Adjust.
12217 * proc-service.c (ps_lgetregs): Adjust.
12218 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12219 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12220 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12221 take a regcache. Adjust.
12222 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12223 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12224 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12225 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12226 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12227 (cris_cannot_fetch_register):
12228 (cris_breakpoint_at): Change prototype to take a regcache.
12229 Adjust.
12230 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12231 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12232 to take a regcache. Adjust.
12233 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12234 Adjust.
12235 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12236 take a regcache. Adjust.
12237 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12238 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12239 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12240 * linux-mips-low.c (mips_get_pc):
12241 (mips_set_pc): Change prototype to take a regcache. Adjust.
12242 (mips_reinsert_addr): Adjust.
12243 (mips_collect_register): Change prototype to take a regcache.
12244 Adjust.
12245 (mips_supply_register):
12246 (mips_collect_register_32bit, mips_supply_register_32bit)
12247 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12248 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12249 * linux-ppc-low.c (ppc_supply_ptrace_register)
12250 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12251 (parse_spufs_run): Adjust.
12252 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12253 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12254 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12255 take a regcache. Adjust.
12256 * linux-s390-low.c (s390_collect_ptrace_register)
12257 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12258 (s390_set_pc): Change prototype to take a regcache. Adjust.
12259 (s390_arch_setup): Adjust.
12260 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12261 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12262 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12263 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12264 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12265 regcache. Adjust.
12266 (sparc_breakpoint_at): Adjust.
12267 * linux-xtensa-low.c (xtensa_fill_gregset):
12268 (xtensa_store_gregset):
12269 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12270 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12271 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12272 prototype to take a regcache. Adjust.
12273 * win32-arm-low.c (arm_fetch_inferior_register)
12274 (arm_store_inferior_register): Change prototype to take a
12275 regcache. Adjust.
12276 * win32-i386-low.c (i386_fetch_inferior_register)
12277 (i386_store_inferior_register): Change prototype to take a
12278 regcache. Adjust.
12279 * win32-low.c (child_fetch_inferior_registers)
12280 (child_store_inferior_registers): Change prototype to take a
12281 regcache. Adjust.
12282 (win32_wait): Adjust.
12283 (win32_fetch_inferior_registers): Change prototype to take a
12284 regcache. Adjust.
12285 (win32_store_inferior_registers): Adjust.
12286 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12287 store_inferior_register>: Change prototype to take a regcache.
12288
60c3d7b0
DE
122892010-01-20 Doug Evans <dje@google.com>
12290
12291 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12292 #ifdef.
12293 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12294 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12295
dc146f7c
VP
122962010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12297
12298 * linux-low.c (linux_core_of_thread): New.
12299 (compare_ints, show_process, list_threads): New.
12300 (linux_qxfer_osdata): Report threads and cores.
12301 (linux_target_op): Register linux_core_of_thread.
12302 * remote-utils.c (prepare_resume_reply): Report the core.
12303 (buffer_xml_printf): Support %d specifier.
12304 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12305 New.
12306 (handle_query): Handle qXfer:threads. Announce availability
12307 thereof.
12308 * target.h (struct target_ops): New field core_of_thread.
12309
7803799a
UW
123102010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12311
12312 * Makefile.in (clean): Remove new generated files.
12313 (reg-s390.o, reg-s390.c): Remove rules.
12314 (reg-s390x.o, reg-s390x.c): Likewise.
12315 (s390-linux32.o, s390-linux32.c): Add rules.
12316 (s390-linux64.o, s390-linux64.c): Likewise.
12317 (s390x-linux64.o, s390x-linux64.c): Likewise.
12318 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12319 * linux-s390-low.c: Include <elf.h>.
12320 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12321 (init_registers_s390): Remove prototype.
12322 (init_registers_s390x): Likewise.
12323 (init_registers_s390_linux32): Add prototype.
12324 (init_registers_s390_linux64): Likewise.
12325 (init_registers_s390x_linux64): Likewise.
12326 (s390_num_regs_3264): New define.
12327 (s390_regmap_3264): New global variable.
12328 (s390_cannot_fetch_register): Remove obsolete check.
12329 (s390_cannot_store_register): Likewise.
12330 (s390_collect_ptrace_register): Handle upper/lower register halves.
12331 (s390_supply_ptrace_register): Likewise.
12332 (s390_fill_gregset): Update to register number changes.
12333 (s390_get_hwcap): New routine.
12334 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12335 Install appropriate regmap and register set.
12336
6e7ffa39
JB
123372010-01-01 Joel Brobecker <brobecker@adacore.com>
12338
12339 * server.c (gdbserver_version): Update copyright year to 2010.
12340 * gdbreplay.c (gdbreplay_version): Likewise.
12341
957f3f49
DE
123422009-12-28 Doug Evans <dje@google.com>
12343
12344 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12345 elf/external.h. Include <elf.h> instead but only if necessary.
12346
ca5c370d
PA
123472009-12-28 Pedro Alves <pedro@codesourcery.com>
12348
12349 * linux-low.c (linux_remove_process): Remove `detaching'
12350 parameter. Don't release/detach from thread_db here.
12351 (linux_kill): Release/detach from thread_db here, ...
12352 (linux_detach): ... and here, before actually detaching.
12353 (linux_wait_1): ... and here, when a process exits.
12354 * thread-db.c (any_thread_of): New.
12355 (thread_db_free): Switch the current inferior to a thread of the
12356 passed in process.
12357
4ee62156
DE
123582009-12-21 Doug Evans <dje@google.com>
12359
d90e6a88
DE
12360 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12361
c5f62d5f
DE
12362 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12363 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12364 warning ifndef __NR_tkill. Move setting of errno there too.
12365 Delete unnecessary resetting of errno after syscall.
12366 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12367
10e86dd7
DE
12368 * configure.ac: Check for dladdr.
12369 * config.in: Regenerate.
12370 * configure: Regenerate.
12371 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12372 (try_thread_db_load): Update.
12373
4ee62156
DE
12374 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12375
00f515da
DE
123762009-12-18 Doug Evans <dje@google.com>
12377
e9464885
DE
12378 * event-loop.c: Include unistd.h if it exists.
12379
07d4f67e
DE
12380 * linux-low.c (my_waitpid): Move definition away from being in
12381 between linux_tracefork_child/linux_test_for_tracefork.
12382
00f515da
DE
12383 * gdb_proc_service.h (psaddr_t): Fix type.
12384 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12385 signature to match glibc.
12386
1de1badb
DE
123872009-12-16 Doug Evans <dje@google.com>
12388
12389 * linux-low.c (linux_read_memory): Fix argument to read.
12390
aeeb81d1
PA
123912009-11-26 Pedro Alves <pedro@codesourcery.com>
12392
12393 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12394 events, don't leave current_inferior pointing at null.
12395
10357975
PA
123962009-11-26 Pedro Alves <pedro@codesourcery.com>
12397
12398 * win32-low.c (LOG): Delete.
12399 (OUTMSG): Output to stderr.
12400 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12401 on compile time LOG macro.
12402 (win32_wait): Fix debug output.
12403
cf6e3471
PA
124042009-11-26 Pedro Alves <pedro@codesourcery.com>
12405
12406 * win32-low.c (win32_add_one_solib): If the dll name is
12407 "ntdll.dll", prepend the system directory to the dll path.
12408
0c85e18e
MK
124092009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12410
12411 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12412
9ac544ce 124132009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12414 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12415
12416 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12417 * configure.ac: Check for __mcoldfire__ and set
12418 gdb_cv_m68k_is_coldfire.
12419 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12420 reg-cf.o and reg-m68k.o.
12421 * configure: Regenerated.
12422
fd7dd3e6
PA
124232009-11-16 Pedro Alves <pedro@codesourcery.com>
12424
12425 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12426 Pass it to thread_db_free.
12427 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12428 proper `detaching' argument to linux_remove_process.
12429 * linux-low.h (thread_db_free): Add `detaching' parameter.
12430 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12431 to thread_db_free.
12432 (thread_db_free): Add `detaching' parameter. Only
12433 call td_ta_clear_event if detaching from process.
12434
75aa492e
MK
124352009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12436
12437 * thread-db.c (thread_db_free): Fix typo.
12438
21e1bee4
PP
124392009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12440
12441 PR gdb/10838
12442 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12443
8838b45e
NS
124442009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12445
12446 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12447 with an i686 compiler.
12448 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12449 needed.
12450 * configure: Rebuilt.
12451
8a35fb51
SL
124522009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12453
12454 PR gdb/10783
12455
12456 * server.c (handle_search_memory_1): Correct read_addr initialization
12457 in loop for searching subsequent chunks.
12458
96f15937
PP
124592009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12460
12461 * configure.ac: New --with-libthread-db option.
12462 * thread-db.c: Allow direct dependence on libthread_db.
12463 (thread_db_free): Adjust.
12464 * config.in: Regenerate.
12465 * configure: Likewise.
889bf7c5 12466
5f7d1694
PP
124672009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12468
12469 PR gdb/10757
12470 * thread-db.c (attach_thread): New function.
12471 (maybe_attach_thread): Return success/failure.
12472 (find_new_threads_callback): Adjust.
889bf7c5
PA
12473 (thread_db_find_new_threads): Loop until no new threads.
12474
88e3b899
PA
124752009-10-13 Pedro Alves <pedro@codesourcery.com>
12476
12477 * proc-service.c (ps_lgetregs): Formatting.
12478
cdbfd419
PP
124792009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12480
12481 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12482 * configure.ac: Adjust.
12483 * linux-low.h (struct process_info_private): Move members to struct
12484 thread_db.
12485 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12486 * linux-low.c (linux_remove_process): Adjust.
12487 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12488 * server.c (handle_query): Move code ...
12489 (handle_monitor_command): ... here. New function.
12490 * target.h (struct target_ops): New member.
12491 * thread-db.c (struct thread_db): New.
12492 (libthread_db_search_path): New variable.
12493 (thread_db_create_event, thread_db_enable_reporting)
12494 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12495 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12496 (try_thread_db_load_1, dladdr_to_soname): New functions.
12497 (try_thread_db_load, thread_db_load_search): New functions.
12498 (thread_db_init): Search for libthread_db.
12499 (thread_db_free): New function.
12500 (thread_db_handle_monitor_command): Likewise.
12501 * config.in: Regenerate.
12502 * configure: Regenerate.
889bf7c5 12503
4168d2d6
UW
125042009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12505
12506 * spu-low.c (spu_kill): Wait for inferior to terminate.
12507 Call clear_inferiors.
12508 (spu_detach): Call clear_inferiors.
12509
81ecdfbb
RW
125102009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12511
12512 * aclocal.m4: Regenerate.
12513 * config.in: Likewise.
12514 * configure: Likewise.
12515
0b9ff2c0
UW
125162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12517
12518 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12519 (parse_spufs_run): New function.
12520 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12521 (ppc_breakpoint_at): Handle SPU breakpoints.
12522
efcbbd14
UW
125232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12524
12525 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12526 (SPUFS_MAGIC): Define.
12527 (spu_enumerate_spu_ids): New function.
12528 (linux_qxfer_spu): New function.
12529 (linux_target_ops): Install linux_qxfer_spu.
12530
f4d9bade
UW
125312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12532
12533 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12534 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12535 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12536 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12537 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12538 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12539 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12540 (init_registers_powerpc_cell32l): Add prototype.
12541 (init_registers_powerpc_cell64l): Likewise.
12542 (ppc_arch_setup): Detect Cell/B.E. architecture.
12543
96e946ca
RW
125442009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12545
12546 * Makefile.in (datarootdir): New variable.
12547
58d6951d
DJ
125482009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12549
12550 * linux-low.c (linux_write_memory): Update debugging output.
12551 * Makefile.in (clean): Add new descriptions.
12552 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12553 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12554 * configure.srv: Add new files for arm*-*-linux*.
12555 * linux-arm-low.c: Add new declarations.
12556 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12557 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12558 (HWCAP_VFPv3D16): New.
12559 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12560 instead of __IWMMXT__.
12561 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12562 (arm_arch_setup): New.
12563 (target_regsets): Remove #ifdef. Add VFP regset.
12564 (the_low_target): Use arm_arch_setup.
12565
12b42a12
DJ
125662009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12567
12568 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12569 the main thread again.
12570
ac8c974e
AR
125712009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12572
12573 Adding Neutrino gdbserver.
12574 * configure: Regenerated.
12575 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12576 * configure.srv (i[34567]86-*-nto*): New target.
12577 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12578 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12579 (nto_comctrl) [__QNX__]: New function.
12580 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12581
4424e0c3 125822009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12583
12584 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12585 srv_tgtobj.
12586
912cf4ba
PA
125872009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12588 Pedro Alves <pedro@codesourcery.com>
12589
12590 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12591 don't support CONTEXT_EXTENDED_REGISTERS.
12592 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12593 (the_low_target): Install them.
12594 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12595 failing with ERROR_PIPE_NOT_CONNECTED.
12596
aa5ca48f
DE
125972009-06-30 Doug Evans <dje@google.com>
12598 Pierre Muller <muller@ics.u-strasbg.fr>
12599
12600 Add h/w watchpoint support to x86-linux, win32-i386.
12601 * Makefile.in (SFILES): Add i386-low.c
12602 (i386_low_h): Define.
12603 (i386-low.o): Add dependencies.
12604 (linux-x86-low.o): Add i386-low.h dependency.
12605 (win32-i386-low.o): Ditto.
12606 * i386-low.c: New file.
12607 * i386-low.h: New file.
12608 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12609 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12610 * linux-low.c (linux_add_process): Initialize arch_private.
12611 (linux_remove_process): Free arch_private.
12612 (add_lwp): Initialize arch_private.
12613 (delete_lwp): Free arch_private.
12614 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12615 provided.
12616 * linux-low.h (process_info_private): New member arch_private.
12617 (lwp_info): New member arch_private.
12618 (linux_target_ops): New members new_process, new_thread,
12619 prepare_to_resume.
12620 (ptid_of): New macro.
12621 * linux-x86-low.c: Include stddef.h, i386-low.h.
12622 (arch_process_info): New struct.
12623 (arch_lwp_info): New struct.
12624 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12625 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12626 (i386_dr_low_get_status): New function.
12627 (x86_insert_point, x86_remove_point): New functions.
12628 (x86_stopped_by_watchpoint): New function.
12629 (x86_stopped_data_address): New function.
12630 (x86_linux_new_process, x86_linux_new_thread): New functions.
12631 (x86_linux_prepare_to_resume): New function.
12632 (the_low_target): Add entries for insert_point, remove_point,
12633 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12634 prepare_to_resume.
12635 * server.c (debug_hw_points): New global.
12636 (monitor_show_help): Document set debug-hw-points.
12637 (handle_query): Process "set debug-hw-points".
12638 * server.h (debug_hw_points): Declare.
12639 (paddress): Declare.
12640 * utils.c (NUMCELLS, CELLSIZE): New macros.
12641 (get_sell, xsnprintf, paddress): New functions.
12642 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12643 remove_point, stopped_by_watchpoint, stopped_data_address.
12644 * win32-i386-low.c: Include i386-low.h.
12645 (debug_reg_state): Replaces dr.
12646 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12647 (i386_dr_low_get_status): New function.
12648 (i386_insert_point, i386_remove_point): New functions.
12649 (i386_stopped_by_watchpoint): New function.
12650 (i386_stopped_data_address): New function.
12651 (i386_initial_stuff): Update.
12652 (get_thread_context,set_thread_context,i386_thread_added): Update.
12653 (the_low_target): Add entries for insert_point,
12654 remove_point, stopped_by_watchpoint, stopped_data_address.
12655 * win32-low.c (win32_insert_watchpoint): New function.
12656 (win32_remove_watchpoint): New function.
12657 (win32_stopped_by_watchpoint): New function.
12658 (win32_stopped_data_address): New function.
12659 (win32_target_ops): Add entries for insert_watchpoint,
12660 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12661 * win32-low.h (win32_target_ops): New members insert_point,
12662 remove_point, stopped_by_watchpoint, stopped_data_address.
12663
d993e290
PA
126642009-06-25 Pedro Alves <pedro@codesourcery.com>
12665
12666 * server.c (process_serial_event): Re-return unsupported, not
12667 error, if the type isn't recognized. Re-allow supporting only
12668 insert or remove packets. Also call require_running for
12669 breakpoints. Add missing break statement to default case. Tidy.
12670 * target.h (struct target_ops): Rename insert_watchpoint to
12671 insert_point, and remove_watchpoint to remove_point.
12672
12673 * linux-low.h (struct linux_target_ops): Likewise.
12674 * linux-low.c (linux_insert_watchpoint): Rename to ...
12675 (linux_insert_point): ... this. Adjust.
12676 (linux_remove_watchpoint): Rename to ...
12677 (linux_remove_point): ... this. Adjust.
12678 (linux_target_ops): Adjust.
12679 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12680 (cris_insert_point): ... this.
12681 (cris_remove_watchpoint): Rename to ...
12682 (cris_remove_point): ... this.
12683 (the_low_target): Adjust.
12684
0f54c268
PM
126852009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12686
12687 * server.c (handle_v_kill): Pass signal_pid to
12688 kill_inferior if multi_process is zero.
12689
c6314022
AR
126902009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12691
12692 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12693 * target.h (target_ops): Comment for *_watchpoint to make it clear
12694 the functions can get types '0' and '1'.
12695
4463ce24
AR
126962009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12697
12698 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12699 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12700 * regcache.c (get_regcache): Likewise.
12701 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12702 * win32-low.c (child_fetch_inferior_registers): Remove check for
12703 regno 0.
12704
cf8fd78b
PA
127052009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12706 Pedro Alves <pedro@codesourcery.com>
12707
12708 * target.h (struct target_ops) <supports_multi_process>: New
12709 callback.
12710 (target_supports_multi_process): New.
12711 * server.c (handle_query): Even if GDB reports support, only
12712 enable multi-process if the target also supports it. Report
12713 multi-process support only if the target backend supports it.
12714 * linux-low.c (linux_supports_multi_process): New function.
12715 (linux_target_ops): Install it as target_supports_multi_process
12716 callback.
12717
47c0c975
DE
127182009-05-24 Doug Evans <dje@google.com>
12719
e09875d4
DE
12720 Global renaming of find_thread_pid to find_thread_ptid.
12721 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12722 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12723 All callers updated.
12724
e27d73f6
DE
12725 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12726 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12727 directly.
12728
47c0c975
DE
12729 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12730 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12731 (linux_resume_one_lwp): Ditto.
12732
2acc282a
DE
127332009-05-23 Doug Evans <dje@google.com>
12734
12735 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12736 from struct inferior_list_entry * to struct lwp_info *.
12737 All callers updated.
12738
9f1036c1
DE
127392009-05-13 Doug Evans <dje@google.com>
12740
12741 * linux-x86-low.c: Don't include assert.h.
12742 (x86_siginfo_fixup): Use fatal, not assert.
12743 (x86_arch_setup): Fix comment.
12744
d0722149
DE
127452009-05-12 Doug Evans <dje@google.com>
12746
12747 Biarch support for i386/amd64 gdbserver.
12748 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12749 Add linux-x86-low.c.
12750 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12751 (linux-x86-low.o): Add.
12752 * linux-x86-64-low.c: Delete.
12753 * linux-i386-low.c: Delete.
12754 * linux-x86-low.c: New file.
12755 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12756 linux-x86-low.o.
12757 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12758 linux-x86-low.o.
12759 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12760 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12761 (linux_child_pid_to_exec_file): New function.
12762 (elf_64_header_p, elf_64_file_p): New functions.
12763 (siginfo_fixup): New function.
12764 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12765 give target a chance to convert layout.
12766 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12767 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12768
fdeb2a12
DE
127692009-05-07 Doug Evans <dje@google.com>
12770
12771 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12772 (regsets_store_inferior_registers): Ditto.
12773
a6dbe5df
PA
127742009-05-06 Pedro Alves <pedro@codesourcery.com>
12775
12776 PR server/10048
12777
12778 * linux-low.c (must_set_ptrace_flags): Delete.
12779 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12780 of the global.
12781 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12782 `lwp->must_set_ptrace_flags' instead.
ba42693b 12783 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12784 (linux_wait_1): ... not here.
12785
5091eb23
DE
127862009-04-30 Doug Evans <dje@google.com>
12787
9f767825
DE
12788 * inferiors.c (started_inferior_callback): New function.
12789 (attached_inferior_callback): New function.
12790 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12791 * server.c (print_started_pid, print_attached_pid): New functions.
12792 (detach_or_kill_for_exit): New function.
12793 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12794 * server.h (have_started_inferiors_p): Declare.
12795 (have_attached_inferiors_p): Declare.
12796
5091eb23
DE
12797 * inferiors.c (remove_process): Fix memory leak, free process.
12798 * linux-low.c (linux_remove_process): New function.
12799 (linux_kill): Call it instead of remove_process.
12800 (linux_detach, linux_wait_1): Ditto.
12801
155c8968
PA
128022009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12803
12804 * configure.srv: Add x86 Windows CE target.
12805
7fe519cb
UW
128062009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12807
12808 * inferiors.c (get_thread_process): Make global.
12809 * server.h (get_thread_process): Add prototype.
12810 * thread-db.c (find_one_thread): Use get_thread_process
12811 instead of current_process.
12812 (thread_db_get_tls_address): Do not crash if called when
12813 thread layer is not yet initialized.
12814
5472f405
UW
128152009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12816
12817 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12818 * spu-low.c (current_tid): Rename to ...
12819 (current_ptid): ... this.
12820 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12821 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12822 ptid_get_lwp (current_ptid) instead of current_tid.
12823 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12824 instead of current_tid. Use find_process_pid to verify pid
12825 argument is valid. Pass proper argument to remove_process.
12826 (spu_thread_alive): Compare current_ptid instead of current_tid.
12827 (spu_resume): Likewise.
12828
55ac2b99
PA
128292009-04-02 Pedro Alves <pedro@codesourcery.com>
12830
12831 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12832 variable.
12833
95954743
PA
128342009-04-01 Pedro Alves <pedro@codesourcery.com>
12835
12836 Implement the multiprocess extensions, and add linux multiprocess
12837 support.
12838
12839 * server.h (ULONGEST): Declare.
12840 (struct ptid, ptid_t): New.
12841 (minus_one_ptid, null_ptid): Declare.
12842 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12843 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12844 (struct inferior_list_entry): Change `id' type from unsigned from
12845 to ptid_t.
12846 (struct sym_cache, struct breakpoint, struct
12847 process_info_private): Forward declare.
12848 (struct process_info): Declare.
12849 (current_process): Declare.
12850 (all_processes): Declare.
12851 (initialize_inferiors): Declare.
12852 (add_thread): Adjust to use ptid_t.
12853 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12854 (add_process, remove_process, find_thread_pid): Declare.
12855 (find_inferior_id): Adjust to use ptid_t.
12856 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12857 (multi_process): Declare.
12858 (push_event): Adjust to use ptid_t.
12859 (read_ptid, write_ptid): Declare.
12860 (prepare_resume_reply): Adjust to use ptid_t.
12861 (clear_symbol_cache): Declare.
12862 * inferiors.c (all_processes): New.
12863 (null_ptid, minus_one_ptid): New.
12864 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12865 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12866 (add_thread): Change unsigned long to ptid. Remove gdb_id
12867 parameter. Adjust.
12868 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12869 (gdb_id_to_thread): Rename to ...
12870 (find_thread_pid): ... this. Change unsigned long to ptid.
12871 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12872 (loaded_dll, pull_pid_from_list): Adjust.
12873 (add_process, remove_process, find_process_pid)
12874 (get_thread_process, current_process, initialize_inferiors): New.
12875 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12876 (struct target_waitstatus) <related_pid>: Ditto.
12877 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12878 return type to int.
12879 (struct target_ops) <join>: Add `pid' argument.
12880 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12881 (struct target_ops) <wait>: Add `ptid' field. Change return type
12882 to ptid.
12883 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12884 (mywait): Add `ptid' argument. Change return type to ptid_t.
12885 (target_pid_to_str): Declare.
12886 * target.c (set_desired_inferior): Adjust to use ptids.
12887 (mywait): Add new `ptid' argument. Adjust.
12888 (target_pid_to_str): New.
12889 * mem-break.h (free_all_breakpoints): Declare.
12890 * mem-break.c (breakpoints): Delelete.
12891 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12892 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12893 to use per-process breakpoint list.
12894 (free_all_breakpoints): New.
12895 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12896 (symbol_cache, all_symbols_looked_up): Delete.
12897 (hexchars): New.
12898 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12899 read_ptid): New.
12900 (prepare_resume_reply): Change ptid argument's type from unsigned
12901 long to ptid_t. Adjust. Implement W;process and X;process.
12902 (free_sym_cache, clear_symbol_cache): New.
12903 (look_up_one_symbol): Adjust to per-process symbol cache. *
12904 * server.c (cont_thread, general_thread, step_thread): Change type
12905 to ptid_t.
12906 (attached): Delete.
12907 (multi_process): New.
12908 (last_ptid): Change type to ptid_t.
12909 (struct vstop_notif) <ptid>: Change type to ptid_t.
12910 (queue_stop_reply, push_event): Change `ptid' argument's type to
12911 ptid_t.
12912 (discard_queued_stop_replies): Add `pid' argument.
12913 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12914 changes. Don't reference the `attached' global.
12915 (attach_inferior): Adjust to mywait interface changes.
12916 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12917 features. Handle and report "multiprocess+". Handle
12918 "qAttached:PID".
12919 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12920 changes.
12921 (handle_v_kill): New.
12922 (handle_v_stopped): Adjust to use target_pid_to_str.
12923 (handle_v_requests): Allow multiple attaches and runs when
12924 multiprocess extensions are in effect. Handle "vKill".
12925 (myresume): Adjust to use ptids.
12926 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12927 (handle_status): Adjust to discard_queued_stop_replies interface
12928 change.
12929 (first_thread_of, kill_inferior_callback)
12930 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12931 (main): Call initialize_inferiors. Adjust to use ptids, killing
12932 and detaching from all inferiors. Handle multiprocess packet
12933 variants.
12934 * linux-low.h: Include gdb_proc_service.h.
12935 (struct process_info_private): New.
12936 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12937 <lwpid_of>: Use ptid_get_lwp.
12938 (get_lwp_thread): Adjust.
12939 (struct lwp_info): Add `dead' member.
12940 (find_lwp_pid): Declare.
12941 * linux-low.c (thread_db_active): Delete.
12942 (new_inferior): Adjust comment.
12943 (inferior_pid): Delete.
12944 (linux_add_process): New.
12945 (handle_extended_wait): Adjust.
12946 (add_lwp): Change unsigned long to ptid.
12947 (linux_create_inferior): Add process to processes table. Adjust
12948 to use ptids. Don't set new_inferior here.
12949 (linux_attach_lwp): Rename to ...
12950 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12951 it. Adjust to use ptids.
12952 (linux_attach_lwp): New.
12953 (linux_attach): Add process to processes table. Don't set
12954 new_inferior here.
12955 (struct counter): New.
12956 (second_thread_of_pid_p, last_thread_of_process_p): New.
12957 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12958 multiple processes.
12959 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12960 processes. Remove process from process table.
12961 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12962 to multiple processes.
12963 (any_thread_of): New.
12964 (linux_detach): Add `pid' argument, and handle it. Remove process
12965 from processes table.
12966 (linux_join): Add `pid' argument. Handle it.
12967 (linux_thread_alive): Change unsighed long argument to ptid_t.
12968 Consider dead lwps as not being alive.
12969 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12970 threads we're not interested in.
12971 (same_lwp, find_lwp_pid): New.
12972 (linux_wait_for_lwp): Change `pid' argument's type from int to
12973 ptid_t. Adjust.
12974 (linux_wait_for_event): Rename to ...
12975 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12976 from int to ptid_t. Adjust.
12977 (linux_wait_for_event): New.
12978 (linux_wait_1): Add `ptid' argument. Change return type to
12979 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12980 that exit from the process table.
12981 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12982 Adjust.
12983 (mark_lwp_dead): New.
12984 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12985 stopping all threads, mark its main lwp as dead.
12986 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12987 ptids.
12988 (fetch_register, usr_store_inferior_registers)
12989 (regsets_fetch_inferior_registers)
12990 (regsets_store_inferior_registers, linux_read_memory)
12991 (linux_write_memory): Inline `inferior_pid'.
12992 (linux_look_up_symbols): Adjust to use per-process
12993 `thread_db_active'.
12994 (linux_request_interrupt): Adjust to use ptids.
12995 (linux_read_auxv): Inline `inferior_pid'.
12996 (initialize_low): Don't reference thread_db_active.
12997 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12998 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12999 (ps_getpid): Return the pid of the current inferior.
13000 * thread-db.c (proc_handle, thread_agent): Delete.
13001 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13002 per-process data.
13003 (find_one_thread): Change argument type to ptid_t. Adjust to
13004 per-process data.
13005 (maybe_attach_thread): Adjust to per-process data and ptids.
13006 (thread_db_find_new_threads): Ditto.
13007 (thread_db_init): Ditto.
13008 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13009 processes table. Adjust to use ptids.
13010 (spu_kill, spu_detach): Adjust interface. Remove process from
13011 processes table.
13012 (spu_join, spu_thread_alive): Adjust interface.
13013 (spu_wait): Adjust interface. Remove process from processes
13014 table. Adjust to use ptids.
13015 * win32-low.c (current_inferior_tid): Delete.
13016 (current_inferior_ptid): New.
13017 (debug_event_ptid): New.
13018 (thread_rec): Take a ptid. Adjust.
13019 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13020 (child_delete_thread): Ditto.
13021 (do_initial_child_stuff): Add `attached' argument. Add process to
13022 processes table.
13023 (child_fetch_inferior_registers, child_store_inferior_registers):
13024 Adjust.
13025 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13026 (win32_attach): Pass 1 to do_initial_child_stuff.
13027 (win32_kill): Adjust interface. Remove process from processes
13028 table.
13029 (win32_detach): Ditto.
13030 (win32_join): Adjust interface.
13031 (win32_thread_alive): Take a ptid.
13032 (win32_resume): Adjust to use ptids.
13033 (get_child_debug_event): Ditto.
13034 (win32_wait): Adjust interface. Remove exiting process from
13035 processes table.
13036
bd99dc85
PA
130372009-04-01 Pedro Alves <pedro@codesourcery.com>
13038
13039 Non-stop mode support.
13040
13041 * server.h (non_stop): Declare.
13042 (gdb_client_data, handler_func): Declare.
13043 (delete_file_handler, add_file_handler, start_event_loop):
13044 Declare.
13045 (handle_serial_event, handle_target_event, push_event)
13046 (putpkt_notif): Declare.
13047 * target.h (enum resume_kind): New.
13048 (struct thread_resume): Replace `step' field by `kind' field.
13049 (TARGET_WNOHANG): Define.
13050 (struct target_ops) <wait>: Add `options' argument.
13051 <supports_non_stop, async, start_non_stop>: New fields.
13052 (target_supports_non_stop, target_async): New.
13053 (start_non_stop): Declare.
13054 (mywait): Add `options' argument.
13055 * target.c (mywait): Add `options' argument. Print child exit
13056 notifications here.
13057 (start_non_stop): New.
13058 * server.c (non_stop, own_buf, mem_buf): New globals.
13059 (struct vstop_notif): New.
13060 (notif_queue): New global.
13061 (queue_stop_reply, push_event, discard_queued_stop_replies)
13062 (send_next_stop_reply): New.
13063 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13064 interface changes.
13065 (attach_inferior): In non-stop mode, don't wait for the target
13066 here.
13067 (handle_general_set): Handle QNonStop.
13068 (handle_query): When handling qC, return the current general
13069 thread, instead of the first thread of the list.
13070 (handle_query): If the backend supports non-stop mode, include
13071 QNonStop+ in the qSupported query response.
13072 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13073 and non-stop mode.
13074 (handle_v_attach, handle_v_run): Handle non-stop mode.
13075 (handle_v_stopped): New.
13076 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13077 (myresume): Adjust to use resume_kind. Handle non-stop.
13078 (queue_stop_reply_callback): New.
13079 (handle_status): Handle non-stop mode.
13080 (main): Clear non_stop flag on reconnection. Use the event-loop.
13081 Refactor serial protocol handling from here ...
13082 (process_serial_event): ... to this new function. When GDB
13083 selects any thread, select one here. In non-stop mode, wait until
13084 GDB acks all pending events before exiting.
13085 (handle_serial_event, handle_target_event): New.
13086 * remote-utils.c (remote_open): Install remote_desc in the event
13087 loop.
13088 (remote_close): Remove remote_desc from the event loop.
13089 (putpkt_binary): Rename to...
13090 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13091 (putpkt_binary): New as wrapper around putpkt_binary_1.
13092 (putpkt_notif): New.
13093 (prepare_resume_reply): In non-stop mode, don't change the
13094 general_thread.
13095 * event-loop.c: New.
13096 * Makefile.in (OBJ): Add event-loop.o.
13097 (event-loop.o): New rule.
13098
13099 * linux-low.h (pid_of): Moved here.
13100 (lwpid_of): New.
13101 (get_lwp_thread): Use lwpid_of.
13102 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13103 * linux-low.c (pid_of): Delete.
13104 (inferior_pid): Use lwpid_of.
13105 (linux_event_pipe): New.
13106 (target_is_async_p): New.
13107 (delete_lwp): New.
13108 (handle_extended_wait): Use lwpid_of.
13109 (add_lwp): Don't set lwpid field.
13110 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13111 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13112 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13113 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13114 first. Adjust to linux_wait_for_event interface changes. Use
13115 lwpid_of.
13116 (linux_detach): Don't delete the main lwp here.
13117 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13118 (status_pending_p): Don't consider explicitly suspended lwps.
13119 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13120 pointer. Add OPTIONS argument. Change return type to int. Use
13121 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13122 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13123 pointer. Add status pointer argument. Return a pid instead of a
13124 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13125 changes. In non-stop mode, don't switch to a random thread.
13126 (linux_wait): Rename to...
13127 (linux_wait_1): ... this. Add target_options argument, and handle
13128 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13129 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13130 clean exit and signal exit code. Don't stop all threads in
13131 non-stop mode. In all-stop mode, only stop all threads when
13132 reporting a stop to GDB. Handle explicit thread stop requests.
13133 (async_file_flush, async_file_mark): New.
13134 (linux_wait): New.
13135 (send_sigstop): Use lwpid_of.
13136 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13137 interface changes. In non-stop mode, don't switch to a random
13138 thread.
13139 (linux_resume_one_lwp): Use lwpid_of.
13140 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13141 (linux_resume_one_thread): ... this. Handle resume_stop. In
13142 non-stop mode, don't look for pending flag in all threads.
13143 (resume_status_pending_p): Don't consider explicitly suspended
13144 threads.
13145 (my_waitpid): Reimplement. Emulate __WALL.
13146 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13147 Use lwpid_of.
13148 (sigchld_handler, linux_supports_non_stop, linux_async)
13149 (linux_start_non_stop): New.
13150 (linux_target_ops): Register linux_supports_non_stop, linux_async
13151 and linux_start_non_stop.
13152 (initialize_low): Install SIGCHLD handler.
13153 * thread-db.c (thread_db_create_event, find_one_thread)
13154 (thread_db_get_tls_address): Use lwpid_of.
13155 * win32-low.c (win32_detach): Adjust to use resume_kind.
13156 (win32_wait): Add `options' argument.
13157 * spu-low.c (spu_resume): Adjust to use resume_kind.
13158 (spu_wait): Add `options' argument.
13159
5b1c542e
PA
131602009-04-01 Pedro Alves <pedro@codesourcery.com>
13161
13162 Decouple target code from remote protocol.
13163
13164 * target.h (enum target_waitkind): New.
13165 (struct target_waitstatus): New.
13166 (struct target_ops) <wait>: Return an unsigned long. Take a
13167 target_waitstatus pointer instead of a char pointer.
13168 (mywait): Likewise.
13169 * target.c (mywait): Change prototype to return an unsigned long.
13170 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13171 * server.h (thread_from_wait, old_thread_from_wait): Delete
13172 declarations.
13173 (prepare_resume_reply): Change prototype to take a
13174 target_waitstatus.
13175 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13176 (last_status, last_ptid): New.
13177 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13178 pid instead of a signal.
13179 (attach_inferior): Remove "status" and "signal" parameters.
13180 Adjust.
13181 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13182 not as an address.
13183 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13184 (handle_v_requests, myresume): Remove "status" and "signal"
13185 parameters. Adjust.
13186 (handle_status): New.
13187 (main): Delete local `status'. Adjust.
13188 * remote-utils.c: Include target.h.
13189 (prepare_resume_reply): Change prototype to take a
13190 target_waitstatus. Adjust.
13191
13192 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13193 interface.
13194 * spu-low.c (spu_wait): Adjust.
13195 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13196 Delete.
13197 (win32_wait): Adjust.
13198
2bd7c093
PA
131992009-04-01 Pedro Alves <pedro@codesourcery.com>
13200
13201 * target.h (struct thread_resume): Delete leave_stopped member.
13202 (struct target_ops): Add a `n' argument to the `resume' callback.
13203 * server.c (start_inferior): Adjust.
13204 (handle_v_cont, myresume): Adjust.
13205 * linux-low.c (check_removed_breakpoint): Adjust to resume
13206 interface change, and to removed leave_stopped field.
13207 (resume_ptr): Delete.
13208 (struct thread_resume_array): New.
13209 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13210 resume interface change.
13211 (linux_continue_one_thread, linux_queue_one_thread)
13212 (resume_status_pending_p): Check if the resume field is NULL
13213 instead of checking the leave_stopped member.
13214 (linux_resume): Adjust to the target resume interface change.
13215 * spu-low.c (spu_resume): Adjust to the target resume interface
13216 change.
13217 * win32-low.c (win32_detach, win32_resume): Ditto.
13218
c35fafde
PA
132192009-04-01 Pedro Alves <pedro@codesourcery.com>
13220
13221 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13222 flag.
13223 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13224 pending.
13225 (linux_continue_one_thread): Only preserve the stepping flag if
13226 there's a pending breakpoint.
13227
0a59d50b
PA
132282009-03-31 Pedro Alves <pedro@codesourcery.com>
13229
13230 * server.c (main): After the inferior having exited, call
13231 remote_close before exiting gdbserver.
13232
f04c6d38
TJB
132332009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13234
13235 Fix size of FPSCR in Power 7 processors.
13236 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13237 (PPC_FEATURE_HAS_DFP): New #define.
13238 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13239 size of the FPSCR.
13240
78e5cee6
PA
132412009-03-23 Pedro Alves <pedro@codesourcery.com>
13242
13243 * server.c (handle_query) Whitespace and formatting.
13244
1b3f6016
PA
132452009-03-22 Pedro Alves <pedro@codesourcery.com>
13246
13247 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13248 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13249 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13250 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13251 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13252 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13253 Makefile.in, configure.ac: Fix whitespace throughout.
13254 * configure: Regenerate.
13255
a07b2135
PA
132562009-03-22 Pedro Alves <pedro@codesourcery.com>
13257
13258 * inferiors.c (find_inferior): Make it safe for the callback
13259 function to delete the currently iterated inferior.
13260
67cc2626
PA
132612009-03-22 Pedro Alves <pedro@codesourcery.com>
13262
13263 * Makefile.in (linuw_low_h): Move higher.
13264 (thread-db.o): Depend on $(linux_low_h).
13265
54a0b537
PA
132662009-03-17 Pedro Alves <pedro@codesourcery.com>
13267
13268 Rename "process" to "lwp" throughout.
13269
13270 * linux-low.c (all_processes): Rename to...
13271 (all_lwps): ... this.
13272 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13273 (add_process): Rename to ...
13274 (add_lwp): ... this. Adjust.
13275 (linux_create_inferior): Adjust.
13276 (linux_attach_lwp): Adjust.
13277 (linux_attach): Adjust.
13278 (linux_kill_one_process): Rename to ...
13279 (linux_kill_one_lwp): ... this. Adjust.
13280 (linux_kill): Adjust.
13281 (linux_detach_one_process): Rename to ...
13282 (linux_detach_one_lwp): ... this. Adjust.
13283 (linux_detach): Adjust.
13284 (check_removed_breakpoint): Adjust.
13285 (status_pending_p): Adjust.
13286 (linux_wait_for_process): Rename to ...
13287 (linux_wait_for_lwp): ... this. Adjust.
13288 (linux_wait_for_event): Adjust.
13289 (send_sigstop): Adjust.
13290 (wait_for_sigstop): Adjust.
13291 (stop_all_processes): Rename to ...
13292 (stop_all_lwps): ... this.
13293 (linux_resume_one_process): Rename to ...
13294 (linux_resume_one_lwp): ... this. Adjust.
13295 (linux_set_resume_request, linux_continue_one_thread)
13296 (linux_queue_one_thread, resume_status_pending_p)
13297 (usr_store_inferior_registers, regsets_store_inferior_registers)
13298 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13299 Adjust.
13300 * linux-low.h (get_process): Rename to ...
13301 (get_lwp): ... this. Adjust.
13302 (get_thread_process): Rename to ...
13303 (get_thread_lwp): ... this. Adjust.
13304 (get_process_thread): Rename to ...
13305 (get_lwp_thread): ... this. Adjust.
13306 (struct process_info): Rename to ...
13307 (struct lwp_info): ... this.
13308 (all_processes): Rename to ...
13309 (all_lwps): ... this.
13310 * proc-service.c (ps_lgetregs): Adjust.
13311 * thread-db.c (thread_db_create_event, find_one_thread)
13312 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13313
0b16c5cf
PA
133142009-03-14 Pedro Alves <pedro@codesourcery.com>
13315
13316 * server.c (handle_query): Handle "qAttached".
13317
32de4b9d
NS
133182009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13319
13320 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13321 GPLv3, update license URL.
13322
2aecd87f
DE
133232009-03-01 Doug Evans <dje@google.com>
13324
93efd302 13325 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13326 (server_h): Add gdb_signals.h.
13327 (signals.o): Update.
13328 * server.h (target_signal_from_host,target_signal_to_host_p)
13329 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13330
86b1f9c5
PM
133312009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13332
13333 * remote-utils.c (getpkt): Also generate remote-debug
13334 information if noack_mode is set.
13335
4aa995e1
PA
133362009-02-06 Pedro Alves <pedro@codesourcery.com>
13337
13338 * server.c (handle_query): Report qXfer:siginfo:read and
13339 qXfer:siginfo:write as supported and handle them.
13340 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13341 * linux-low.c (linux_xfer_siginfo): New.
13342 (linux_target_ops): Set it.
13343
62709adf
PA
133442009-01-26 Pedro Alves <pedro@codesourcery.com>
13345
13346 * server.c (gdbserver_usage): Mention --remote-debug.
13347 (main): Accept '--remote-debug' switch.
13348
aef93bd7
DE
133492009-01-18 Doug Evans <dje@google.com>
13350
13351 * regcache.c (new_register_cache): No need to check result of xcalloc.
13352 * server.c (handle_search_memory): Back out calls to xmalloc,
13353 result is checked and error is returned to user upon failure.
13354 (handle_query): Ditto. Add more checks for result of malloc.
13355 (handle_v_cont): Check result of malloc, report error back to
13356 user upon failure.
13357 (handle_v_run): Ditto. Call freeargv.
13358 * server.h (freeargv): Declare.
13359 * utils.c (freeargv): New fn.
13360
54363045
DE
133612009-01-15 Doug Evans <dje@google.com>
13362
f626972c
DE
13363 * gdbreplay.c (perror_with_name): Make arg const char *.
13364 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13365 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13366 * utils.c (perror_with_name): Make arg const char *.
54363045 13367
18aae699
PA
133682009-01-14 Pedro Alves <pedro@codesourcery.com>
13369
13370 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13371 when handling a EXIT_PROCESS_DEBUG_EVENT.
13372
ff703abe
JB
133732009-01-06 Joel Brobecker <brobecker@adacore.com>
13374
13375 * gdbreplay.c (gdbreplay_version): Update copyright year.
13376 * server.c (gdbserver_version): Likewise.
13377
f21cc1a2 133782009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13379
13380 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13381 (handle_extended_wait): Improve comment.
0e21c1ec 13382
bca929d3
DE
133832008-12-13 Doug Evans <dje@google.com>
13384
13385 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13386 * server.h (ATTR_MALLOC): New macro.
13387 (xmalloc,xcalloc,xstrdup): Declare.
13388 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13389 * inferiors.c: Ditto.
13390 * linux-low.c: Ditto.
13391 * mem-break.c: Ditto.
13392 * regcache.c: Ditto.
13393 * remote-utils.c: Ditto.
13394 * server.c: Ditto.
13395 * target.c: Ditto.
13396 * win32-low.c: Ditto.
13397
97438e3f
DE
133982008-12-12 Doug Evans <dje@google.com>
13399
896c7fbb
DE
13400 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13401 in debugging printf.
13402
97438e3f
DE
13403 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13404
e3b886f8
DE
134052008-12-09 Doug Evans <dje@google.com>
13406
13407 * linux-low.h (struct process_info): Delete member tid, unused.
13408 * thread-db.c (find_one_thread): Update.
13409 (maybe_attach_thread): Update.
13410
07e059b5
VP
134112008-12-02 Pedro Alves <pedro@codesourcery.com>
13412
889bf7c5
PA
13413 * target.h (struct target_ops): Add qxfer_osdata member.
13414 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13415 and dirent.h.
13416 (linux_qxfer_osdata): New functions.
13417 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13418 callback.
13419 * server.c (handle_query): Handle "qXfer:osdata:read:".
13420 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13421 (buffer_xml_printf): New functions.
13422 * server.h (struct buffer): New.
13423 (buffer_grow_str, buffer_grow_str0): New macros.
13424 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13425 (buffer_xml_printf): Declare.
07e059b5 13426
4cab47ab
DE
134272008-11-24 Doug Evans <dje@google.com>
13428
13429 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13430
f142445f
DJ
134312008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13432
13433 * server.c (handle_v_run): Always use the supplied argument list.
13434
d0107bb6 134352008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13436
d0107bb6
BW
13437 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13438 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13439
2c4ad781
TJB
134402008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13441
13442 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13443 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13444 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13445 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13446 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13447 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13448 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13449 XML target descriptions.
13450 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13451 when inferior is running on an ISA 2.05 or later processor. Add
13452 special case to return offset for full 64-bit slot of FPSCR when
13453 in 32-bits.
13454
dfb64f85
DJ
134552008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13456
13457 * Makefile.in (SFILES, clean): Added sparc64 files.
13458 (reg-sparc64.o, reg-sparc64.c): New.
13459 * configure.srv (sparc*-*-linux*): New configuration.
13460 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13461 syscall arguments for SPARC.
13462 (regsets_store_inferior_registers): Likewise.
13463 * linux-sparc-low.c: New file.
13464
66b6e1dd
DE
134652008-10-21 Doug Evans <dje@google.com>
13466
13467 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13468 (READLINE_DIR,READLINE_DEP): Delete.
13469 (INTERNAL_CFLAGS): Update.
13470 (LINTFLAGS): Update.
13471
9b710a42
PA
134722008-10-10 Pedro Alves <pedro@codesourcery.com>
13473
13474 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13475 whole argv from the last run, not just argv[0].
13476
5822d809
PA
134772008-09-08 Pedro Alves <pedro@codesourcery.com>
13478
13479 * regcache.c (new_register_cache): Return NULL if the register
13480 cache size isn't known yet.
13481 (free_register_cache): Avoid dereferencing a NULL regcache.
13482
74aac56f
DJ
134832008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13484
13485 * configure.srv: Merge MIPS and MIPS64.
13486
400b20f5
MR
134872008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13488
13489 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13490
677c5bb1
LM
134912008-08-18 Luis Machado <luisgpm@br.ibm.com>
13492
13493 * Makefile.in: Add required vsx dependencies.
13494
13495 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13496 Declare init_registers_powerpc_vsx32l.
13497 Declare init_registers_powerpc_vsx64l.
13498 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13499 (ppc_arch_setup): Check for VSX in hwcap.
13500 (ppc_fill_vsxregset): New function.
13501 (ppc_store_vsxregset): New function.
13502 Add new VSX entry in regset_info target_regsets.
13503
13504 * configure.srv: Add new VSX dependencies.
13505
a6f3e723
SL
135062008-08-12 Pedro Alves <pedro@codesourcery.com>
13507
13508 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13509 (remote_open): Set or clear transport_is_reliable.
13510 (putpkt_binary): Don't expect acks in noack mode.
13511 (getpkt): Don't send ack/nac in noack mode.
13512 * server.c (handle_general_set): Handle QStartNoAckMode.
13513 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13514 qSupported.
13515 (main): Reset noack_mode on every connection.
13516 * server.h (noack_mode): Declare.
13517
a417dc56
RW
135182008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13519
13520 * Makefile.in (GDBREPLAY_OBS): New variable.
13521 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13522
3221518c
UW
135232008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13524 Daniel Jacobowitz <dan@codesourcery.com>
13525
13526 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13527 (usr_store_inferior_registers): Likewise.
13528 (regsets_store_inferior_registers): Likewise.
13529
ec56be1b
PA
135302008-07-31 Rolf Jansen <rj@surtec.com>
13531 Pedro Alves <pedro@codesourcery.com>
13532
13533 * configure.ac: Check for memmem declaration.
13534 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13535 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13536 (disable_packet_qfThreadInfo): Unconditionally compile.
13537 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13538 * configure, config.in: Regenerate.
13539
2fe5e3ff
DE
135402008-07-28 Doug Kwan <dougkwan@google.com>
13541
13542 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13543 (linux_write_memory): Remove declaration of errno.
13544
836acd6d
UW
135452008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13546
13547 * linux-low.c (handle_extended_wait): Do not use "status"
13548 variable uninitialized.
13549
aeba519e
PA
135502008-07-07 Pedro Alves <pedro@codesourcery.com>
13551
13552 * server.c (handle_v_attach): Inhibit reporting dll changes.
13553
db42f210
PA
135542008-06-27 Pedro Alves <pedro@codesourcery.com>
13555
13556 * remote-utils.c (prepare_resume_reply): If requested, don't
13557 output "thread:TID" in the T stop reply.
13558
13559 * server.c (disable_packet_vCont, disable_packet_Tthread)
13560 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13561 (handle_query): If requested, disable support for qC, qfThreadInfo
13562 and qsThreadInfo.
13563 (handle_v_requests): If requested, disable support for vCont.
13564 (gdbserver_show_disableable): New.
13565 (main): Handle --disable-packet and --disable-packet=LIST.
13566
13567 * server.h (disable_packet_vCont, disable_packet_Tthread)
13568 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13569
8e4c5421
CD
135702008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13571
13572 * server.c (gdbserver_usage): Mention --version.
13573
6e23a804
DJ
135742008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13575
13576 * Makefile.in (gdbreplay.o): New rule.
13577
90aa6a40
JM
135782008-06-06 Joseph Myers <joseph@codesourcery.com>
13579
13580 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13581 message, not gdbserver.
13582
c16158bc 135832008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13584 Nathan Sidwell <nathan@codesourcery.com>
13585 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13586
13587 * acinclude.m4: Include ../../config/acx.m4.
13588 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13589 * configure, config.in: Regenerate.
13590 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13591 * server.c (gdbserver_version): Print PKGVERSION.
13592 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13593 (main): Adjust gdbserver_usage calls.
13594 * gdbreplay.c (version, host_name): Add declarations.
13595 (gdbreplay_version, gdbreplay_usage): New.
13596 (main): Accept --version and --help options.
13597
aeb75bf5
DJ
135982008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13599
13600 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13601 (arm_breakpoint_at): Handle Thumb.
13602 (the_low_target): Add comment.
13603
76b233dd
UW
136042008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13605
13606 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13607
08388c79
DE
136082008-05-09 Doug Evans <dje@google.com>
13609
a3c83fae
DE
13610 * server.h (decode_search_memory_packet): Declare.
13611 * remote-utils.c (decode_search_memory_packet): New fn.
13612 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13613 (handle_search_memory): New fn.
13614 (handle_query): Process qSearch:memory packets.
13615
bb9c3d36
UW
136162008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13617
13618 * regcache.c (registers_length): Remove.
13619 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13620 full register packet.
13621 * regcache.h (registers_length): Remove prototype.
13622 * server.h (PBUFSIZ): Define to 16384.
13623
7284e1be
UW
136242008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13625
13626 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13627 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13628 powerpc-64l.o, and powerpc-altivec64l.o.
13629 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13630 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13631 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13632 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13633 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13634 to srv_xmlfiles.
13635
13636 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13637 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13638 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13639 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13640 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13641 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13642 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13643 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13644 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13645 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13646 (clean): Update.
13647
13648 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13649 (init_registers_powerpc_32l): ... this new prototype.
13650 (init_registers_powerpc_32): Remove, replace by ...
13651 (init_registers_powerpc_altivec32l): ... this new prototype.
13652 (init_registers_powerpc_e500): Remove, replace by ...
13653 (init_registers_powerpc_e500l): ... this new prototype.
13654 (init_registers_ppc64): Remove, replace by ...
13655 (init_registers_powerpc_64l): ... this new prototype.
13656 (init_registers_powerpc_64): Remove, replace by ...
13657 (init_registers_powerpc_altivec64l): ... this new prototype.
13658 (ppc_num_regs): Set to 73.
13659 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13660 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13661 (ppc_cannot_store_register): Handle orig_r3 and trap.
13662 (ppc_arch_setup): Update init_registers_... calls.
13663 (ppc_fill_gregset): Handle orig_r3 and trap.
13664
13665 * inferiors.c (clear_inferiors): Reset current_inferior.
13666
fdc59709
PB
136672008-04-23 Paolo Bonzini <bonzini@gnu.org>
13668
889bf7c5
PA
13669 * acinclude.m4: Add override.m4.
13670 * configure: Regenerate.
fdc59709 13671
c9b2f845
UW
136722008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13673
13674 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13675 initial call to init_register_ppc64.
13676
550512b8
UW
136772008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13678
43aaf8b6
PA
13679 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13680 single powerpc*-*-linux* case.
550512b8
UW
13681 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13682
b6430ec3
UW
136832008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13684
13685 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13686 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13687 from reg_xmlfiles.
13688 * linux-ppc-low.c: Include <elf.h>.
13689 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13690 (ppc_hwcap): New global variable.
13691 (ppc_regmap): Remove __SPE__ #ifdef sections.
13692 (ppc_regmap_e500): New global variable.
13693 (ppc_cannot_store_register): Update __SPE__ special case.
13694 (ppc_get_hwcap): New function.
13695 (ppc_arch_setup): Use it to determine whether inferior supports
13696 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13697 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13698 Do not access registers if target does not support AltiVec.
13699 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13700 Do not access registers if target does not support SPE.
13701 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13702
52fa2412
UW
137032008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13704
13705 * linux-low.c (disabled_regsets, num_regsets): New.
13706 (use_regsets_p): Delete.
13707 (linux_wait_for_process): Clear disabled_regsets.
13708 (regsets_fetch_inferior_registers): Check and set it.
13709 (regsets_store_inferior_registers): Likewise.
13710 (linux_fetch_registers, linux_store_registers): Do not use
13711 use_regsets_p.
13712 (initialize_low): Allocate disabled_regsets.
13713
e28b3332
DJ
137142008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13715
13716 * Makefile.in (LIBOBJS): New.
13717 (OBS): Use LIBOBJS.
13718 (memmem.o): New rule.
13719 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13720 * configure: Regenerated.
13721
4536995d
UW
137222008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13723
13724 * server.c (handle_query): Never return "unsupported" for
13725 qXfer:features:read queries.
13726
221c031f
UW
137272008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13728
13729 * server.c (get_features_xml): Fix inverted condition.
13730 (handle_query): Always support qXfer:feature:read.
13731
ccd213ac
DJ
137322008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13733
13734 * server.c (wrapper_argv): New.
13735 (start_inferior): Handle wrapper_argv. If set, expect an extra
13736 trap.
13737 (gdbserver_usage): Document --wrapper.
13738 (main): Parse --wrapper.
13739
6fe305f7
UW
137402008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13741
13742 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13743 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13744 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13745 (ppc_set_pc): Likewise.
13746 (ppc_arch_setup): New function.
13747 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13748 of collect_register.
889bf7c5 13749 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13750
5b0a002e
UW
137512008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13752
13753 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13754 instead of linux-ppc64-low.o.
13755 * linux-ppc64-low.c: Remove file.
13756 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13757 (linux-ppc64-low.o): Remove rule.
13758
13759 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13760 (init_registers_powerpc_64): Likewise.
13761 (ppc_regmap): Conditionally define depending on __powerpc64__.
13762 (ppc_cannot_store_register): Do not special-case "fpscr" when
13763 compiled on __powerpc64__.
13764 (ppc_collect_ptrace_register): New function.
13765 (ppc_supply_ptrace_register): New function.
13766 (ppc_breakpoint): Change type to "unsigned int".
13767 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13768 (the_low_target): Conditionally provide initializers for the
889bf7c5 13769 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13770 collect_ptrace_register and supply_ptrace_register members.
13771
9b4b61c8
UW
137722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13773
13774 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13775 * server.c (gdbserver_xmltarget): Define.
13776 (get_features_xml): Use it to replace "target.xml" and arch_string.
13777
13778 * configure.srv: Remove srv_xmltarget. Add XML files that were
13779 mentioned there to srv_xmlfiles instead. Remove conditional tests
13780 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13781 srv_xmlfiles and srv_regobj to include all possible choices.
13782 * configure.ac (srv_xmltarget): Remove.
13783 (srv_xmlfiles): Do not add "target.xml".
13784 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13785 checks for supplementary target information.
13786 * configure: Regenerate.
13787 * Makefile.in (XML_TARGET): Remove.
13788 (target.xml): Remove rule.
13789 (clean): Do not clean up target.xml.
13790 (.PRECIOUS): Do not mention target.xml.
13791
13792 * target.h (struct target_ops): Remove arch_string member.
13793 * linux-low.c (linux_arch_string): Remove.
13794 (linux_target_ops): Remove arch_string initializer.
13795 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13796 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13797 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13798 * spu-low.c (spu_arch_string): Remove.
13799 (spu_target_ops): Remove arch_string initializer.
13800 * win32-low.c (win32_arch_string): Remove.
13801 (win32_target_ops): Remove arch_string initializer.
13802 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13803 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13804 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13805
ee1a7ae4
UW
138062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13807
13808 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13809 by collect_ptrace_register and supply_ptrace_register hooks.
13810 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13811 instead of checking for the_low_target.left_pad_xfer.
13812 (usr_store_inferior_registers): Use collect_ptrace_register callback
13813 instead of checking for the_low_target.left_pad_xfer.
13814
13815 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13816 (s390_supply_ptrace_register): Likewise.
13817 (s390_fill_gregset): Call s390_collect_ptrace_register.
13818 (the_low_target): Update.
13819
13820 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13821 (ppc_supply_ptrace_register): Likewise.
13822 (the_low_target): Update.
13823
13824 * linux-i386-low.c (the_low_target): Update.
13825 * linux-x86-64-low.c (the_low_target): Update.
13826
d61ddec4
UW
138272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13828
13829 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13830 reg-s390.o and reg-s390x.o.
13831
13832 * linux-low.c (new_inferior): New global variable.
13833 (linux_create_inferior, linux_attach): Set it.
13834 (linux_wait_for_process): Call the_low_target.arch_setup after the
13835 target has stopped for the first time.
13836 (initialize_low): Do not call the_low_target.arch_setup.
13837
13838 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13839 (s390_set_pc): Likewise.
13840 (s390_arch_setup): New function.
13841 (the_low_target): Use s390_arch_setup as arch_setup routine.
13842
13843 * regcache.c (realloc_register_cache): New function.
13844 (set_register_cache): Call it for each existing regcache.
13845
d05b4ac3
UW
138462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13847
13848 * server.h (init_registers): Remove prototype.
13849
13850 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13851 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13852 instead of init_registers ().
13853 * linux-arm-low.c (init_registers_arm): Add prototype.
13854 (init_registers_arm_with_iwmmxt): Likewise.
13855 (the_low_target): Add initializer for arch_setup field.
13856 * linux-cris-low.c (init_registers_cris): Add prototype.
13857 (the_low_target): Add initializer for arch_setup field.
13858 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13859 (the_low_target): Add initializer for arch_setup field.
13860 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13861 (the_low_target): Add initializer for arch_setup field.
13862 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13863 (the_low_target): Add initializer for arch_setup field.
13864 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13865 (the_low_target): Add initializer for arch_setup field.
13866 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13867 (the_low_target): Add initializer for arch_setup field.
13868 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13869 (init_registers_mips64_linux): Likewise.
13870 (the_low_target): Add initializer for arch_setup field.
13871 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13872 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13873 (the_low_target): Add initializer for arch_setup field.
13874 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13875 (init_registers_powerpc_64): Likewise.
13876 (the_low_target): Add initializer for arch_setup field.
13877 * linux-s390-low.c (init_registers_s390): Add prototype.
13878 (init_registers_s390x): Likewise.
13879 (the_low_target): Add initializer for arch_setup field.
13880 * linux-sh-low.c (init_registers_sh): Add prototype.
13881 (the_low_target): Add initializer for arch_setup field.
13882 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13883 (the_low_target): Add initializer for arch_setup field.
13884 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13885 (the_low_target): Add initializer for arch_setup field.
13886
13887 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13888 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13889 instead of init_registers ().
13890 * win32-arm-low.c (init_registers_arm): Add prototype.
13891 (the_low_target): Add initializer for arch_setup field.
13892 * win32-i386-low.c (init_registers_i386): Add prototype.
13893 (the_low_target): Add initializer for arch_setup field.
13894
13895 * spu-low.c (init_registers_spu): Add prototype.
13896 (initialize_low): Call initialie_registers_spu () instead of
13897 initialize_registers ().
13898
fd96d250
PA
138992008-02-19 Pedro Alves <pedro@codesourcery.com>
13900
13901 * server.c (handle_v_requests): When handling the vRun and vAttach
13902 packets, if already debugging a process, don't kill it. Return an
13903 error instead.
13904
d41b6bb4
DJ
139052008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13906
13907 * server.c (handle_query): Correct length check.
13908
5ac588cf
PA
139092008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13910
13911 * win32-low.c (do_initial_child_stuff): Add process handle
13912 parameter. Set current_process_handle and current_process_id from the
13913 parameters. Clear globals.
13914 (win32_create_inferior): Don't set current_process_handle and
13915 current_process_id here. Instead pass them on the call to
13916 do_initial_child_stuff.
13917 (win32_attach): Likewise.
13918 (win32_clear_inferiors): New.
13919 (win32_kill): Don't close the current process handle or the
13920 current thread handle here. Instead call win32_clear_inferiors.
13921 (win32_detach): Don't open a new handle to the process. Call
13922 win32_clear_inferiors.
13923 (win32_join): Don't rely on current_process_handle; open a new
13924 handle using the process id.
13925 (win32_wait): Call win32_clear_inferiors when the inferior process
13926 has exited.
13927
ecd7ecbc
DJ
139282008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13929
13930 * server.c (monitor_show_help): Add "exit".
13931
1525d545
MG
139322008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13933
ecd7ecbc 13934 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13935 (clean): Add reg-xtensa.c.
13936 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13937 * configure.srv (xtensa*-*-linux*) New target.
13938 * linux-xtensa-low.c: New.
13939 * xtensa-xtregs.c: New.
1525d545 13940
59a016f0
PA
139412008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13942
13943 * hostio.c: Don't include errno.h.
13944 (errno_to_fileio_errno): Move to hostio-errno.
13945 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13946 error number outputting to the target->hostio_last_error callback.
13947 (hostio_packet_error): Use FILEIO_EINVAL directly.
13948 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13949 calls to hostio_error.
13950 * hostio-errno.c: New.
13951 * server.h (hostio_last_error_from_errno): Declare.
13952 * target.h (target_ops): Add hostio_last_error member.
13953 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13954 as hostio_last_error handler.
889bf7c5 13955 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13956 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13957 (wince_hostio_last_error): New functions.
13958 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13959 as hostio_last_error handler.
13960 (win32_target_ops) [!_WIN32_WCE]: Register
13961 hostio_last_error_from_errno as hostio_last_error handler.
13962 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13963 (hostio-errno.o): New rule.
13964 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13965 * configure.srv (srv_hostio_err_objs): New variable. Default to
13966 hostio-errno.o.
13967 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13968 * configure: Regenerate.
13969
2d717e4f
DJ
139702008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13971
13972 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13973 (linux_kill, linux_detach): Clean up the process list.
13974 * remote-utils.c (remote_open): Improve port number parsing.
13975 (putpkt_binary, input_interrupt): Only send interrupts if the target
13976 is running.
13977 * server.c (extended_protocol): Make static.
13978 (attached): Define earlier.
13979 (exit_requested, response_needed, program_argv): New variables.
13980 (target_running): New.
13981 (start_inferior): Clear attached here.
13982 (attach_inferior): Set attached here.
13983 (require_running): Define.
13984 (handle_query): Use require_running and target_running. Implement
13985 "monitor exit".
13986 (handle_v_attach, handle_v_run): New.
13987 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13988 (gdbserver_usage): Update.
13989 (main): Redo argument parsing. Handle --debug and --multi. Handle
13990 --attach along with other options or after the port. Save
13991 program_argv. Support no initial program. Resynchronize
13992 communication with GDB after an error. Handle "monitor exit".
13993 Use require_running and target_running. Always allow the extended
13994 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13995 restart in extended mode.
13996 * README: Refer to the GDB manual. Update --attach usage.
13997
7407e2de
AS
139982007-12-20 Andreas Schwab <schwab@suse.de>
13999
14000 * linux-low.c (STACK_SIZE): Define.
14001 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14002 (linux_test_for_tracefork): Likewise.
14003
b65d95c5
DJ
140042007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14005
14006 * linux-low.c (linux_wait_for_event): Update messages. Do not
14007 reinsert auto-delete breakpoints.
14008 * mem-break.c (struct breakpoint): Change return type of handler to
14009 int.
14010 (set_breakpoint_at): Update handler type.
14011 (reinsert_breakpoint_handler): Return 1 instead of calling
14012 delete_breakpoint.
14013 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14014 setting a new one.
14015 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14016 * mem-break.h (set_breakpoint_at): Update handler type.
14017 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14018 * win32-low.c (auto_delete_breakpoint): New.
14019 (get_child_debug_event): Use it.
14020
4e799345
DJ
140212007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14022
14023 * configure.ac: Check for pread and pwrite.
14024 * hostio.c (handle_pread): Fall back to lseek and read.
14025 (handle_pwrite): Fall back to lseek and write.
14026 * config.in, configure: Regenerated.
14027
27524b67
DJ
140282007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14029
14030 * server.c (myresume): Add own_buf argument.
14031 (main): Update calls.
14032
a20d5e98
DJ
140332007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14034
14035 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14036 * remote-utils.c (remote_open): Do not call disable_async_io.
14037 (block_async_io): Delete.
14038 (unblock_async_io): Make static.
14039 (initialize_async_io): New.
14040 * server.c (handle_v_cont): Handle async I/O here.
14041 (myresume): Likewise. Move other common resume tasks here...
14042 (main): ... from here. Call initialize_async_io. Disable async
14043 I/O before the main loop.
14044 * server.h (initialize_async_io): Declare.
14045 (block_async_io, unblock_async_io): Delete prototypes.
14046 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14047
b79d787e
DJ
140482007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14049
14050 * remote-utils.c (readchar): Allow binary data in received messages.
14051
d97903b2
PA
140522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14053
14054 * win32-low.c (attaching): New global.
14055 (win32_create_inferior): Clear the `attaching' global.
14056 (win32_attach): Set the `attaching' global.
14057 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14058 attaching. Only set a breakpoint at the entry point if not
14059 attaching.
14060
311de423
PA
140612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14062
14063 * server.c (main): Don't report dll events on the initial
14064 connection on attaches.
14065
6c2d16d2
PA
140662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14067
14068 * server.c (main): Relax numerical bases supported for the pid of
14069 the --attach command line argument.
14070
5ca906e6
PA
140712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14072
14073 * win32-low.c (win32_attach): Call OpenProcess before
14074 DebugActiveProcess, not after. Add last error output to error
14075 call.
14076
9c6c8194
PA
140772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14078
14079 * win32-low.c (win32_get_thread_context)
14080 (win32_set_thread_context): New functions.
14081 (thread_rec): Use win32_get_thread_context.
14082 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14083 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14084 field.
14085
4d5d1aaa
PA
140862007-12-03 Leo Zayas
14087 Pedro Alves <pedro_alves@portugalmail.pt>
14088
14089 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14090 global variables.
14091 (child_add_thread): Minor cleanup.
14092 (child_continue): Resume artificially suspended threads before
14093 calling ContinueDebugEvent.
14094 (suspend_one_thread): New.
14095 (fake_breakpoint_event): New.
14096 (get_child_debug_event): Change return type to int. Check here if
14097 gdb sent an interrupt request. If a soft interrupt was requested,
14098 fake a breakpoint event. Return 0 if there is no event to handle,
14099 and 1 otherwise.
14100 (win32_wait): Don't check here if gdb sent an interrupt request.
14101 Ensure there is a valid event to handle.
14102 (win32_request_interrupt): Add soft interruption method as last
14103 resort.
14104
c436e841
PA
141052007-12-03 Leo Zayas
14106 Pedro Alves <pedro_alves@portugalmail.pt>
14107
14108 * win32-low.h (win32_thread_info): Add descriptions to the
14109 structure members. Replace `suspend_count' counter by a
14110 `suspended' flag.
14111 * win32-low.c (thread_rec): Update condition of when to get the
14112 context from the inferior. Rely on ContextFlags being set if it
14113 has already been retrieved. Only suspend the inferior thread if
14114 we haven't already. Warn if that fails.
14115 (continue_one_thread): s/suspend_count/suspended/. Only call
14116 ResumeThread once. Warn if that fails.
14117
e7b5fa67
PA
141182007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14119
14120 * win32-low.c (win32_wait): Don't read from the inferior when it
14121 has already exited.
14122
a385171d
PA
141232007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14124
14125 * Makefile.in (win32_low_h): New variable.
14126 (win32-low.o): Add dependency on $(win32_low_h).
14127 (win32-arm-low.o, win32-i386-low.o): New rules.
14128
f80c84b3
DJ
141292007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14130
14131 * hostio.c: Correct copyright year.
14132
a6b151f1
DJ
141332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14134
14135 * Makefile.in (OBS): Add hostio.o.
14136 (hostio.o): New rule.
14137 * server.h (handle_vFile): Declare.
14138 * hostio.c: New file.
14139 * server.c (handle_v_requests): Take packet_len and new_packet_len
14140 for binary packets. Call handle_vFile.
14141 (main): Update call to handle_v_requests.
14142
f9387fc3
DJ
141432007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14144
14145 * linux-low.c: Include <sched.h>.
14146
51c2684e
DJ
141472007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14148
14149 * linux-low.c (linux_tracefork_grandchild): New.
14150 (linux_tracefork_child): Use clone.
14151 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14152
75f83163
JB
141532007-10-31 Joel Brobecker <brobecker@adacore.com>
14154
14155 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14156
da5898ce
DJ
141572007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14158
14159 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14160
24a09b5f
DJ
141612007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14162
14163 * inferiors.c (change_inferior_id): Delete.
14164 (add_pid_to_list, pull_pid_from_list): New.
14165 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14166 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14167 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14168 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14169 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14170 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14171 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14172 (using_threads): Always set to 1.
14173 (handle_extended_wait): New.
14174 (add_process): Do not set TID.
14175 (linux_create_inferior): Set must_set_ptrace_flags.
14176 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14177 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14178 (linux_thread_alive): Rename TID argument to LWPID.
14179 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14180 (linux_wait_for_event): Do not use TID or check using_threads. Update
14181 call to dead_thread_notify. Call handle_extended_wait.
14182 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14183 (send_sigstop): Delete sigstop_sent.
14184 (wait_for_sigstop): Avoid TID.
14185 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14186 (linux_test_for_tracefork): New.
14187 (linux_lookup_signals): Use thread_db_active and
14188 linux_supports_tracefork_flag.
14189 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14190 * linux-low.h (get_process_thread): Avoid TID.
14191 (struct process_ifo): Move thread_known and tid to the end. Remove
14192 sigstop_sent.
14193 (linux_attach_lwp, thread_db_init): Update prototypes.
14194 * server.h (change_inferior_id): Delete prototype.
14195 (add_pid_to_list, pull_pid_from_list): New prototypes.
14196 * thread-db.c (thread_db_use_events): New.
14197 (find_first_thread): Rename to...
14198 (find_one_thread): ...this. Update callers and messages. Do not
14199 call fatal. Check thread_db_use_events. Do not call
14200 change_inferior_id or new_thread_notify.
14201 (maybe_attach_thread): Update. Do not call new_thread_notify.
14202 (thread_db_init): Set thread_db_use_events. Check use_events.
14203 * utils.c (fatal, warning): Correct message prefix.
14204
30ed0a8f
DJ
142052007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14206
14207 * Makefile.in (clean): Remove new files.
14208 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14209 (powerpc-64.o, powerpc-64.c): New rules.
14210 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14211 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14212 with SPE.
14213 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14214 SPE targets.
14215 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14216 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14217 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14218 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14219 (target_regsets): Add AltiVec and SPE register sets.
14220 * configure.ac: Check for AltiVec and SPE.
14221 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14222 (ppc_fill_vrregset, ppc_store_vrregset): New.
14223 (target_regsets): Add AltiVec register set.
14224 * configure: Regenerated.
14225
fd462a61
DJ
142262007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14227
14228 * linux-low.c (O_LARGEFILE): Define.
14229 (linux_read_memory): Use /proc/PID/mem.
14230 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14231 * configure, config.in: Regenerated.
14232
69f223ed
DJ
142332007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14234
14235 * linux-low.c (linux_wait_for_event): Do not pass signals while
14236 single-stepping.
14237
aec18585
PA
142382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14239
14240 * win32-low.c (create_process): New.
14241 (win32_create_inferior): Use create_process instead of
14242 CreateProcess. If create_process failed retry appending an ".exe"
14243 suffix. Store the GetLastError result immediatelly after
14244 create_process calls and use it on the call to error.
14245
34d86ddd
PA
142462007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14247
14248 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14249
5a0e3bd0
JB
142502007-08-23 Joel Brobecker <brobecker@adacore.com>
14251
14252 * configure.ac: Switch license to GPLv3.
14253
f88c79e6
MS
142542007-08-01 Michael Snyder <msnyder@access-company.com>
14255
14256 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14257
6b3d9b83
PA
142582007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14259
14260 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14261 typedef.
14262 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14263 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14264 CloseToolhelp32Snapshot.
14265 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14266 CloseToolhelp32Snapshot.
14267
c588c53c
MS
142682007-07-27 Michael Snyder <michael.snyder@access-company.com>
14269
14270 * server.c (main): Check for inferior exit before main loop.
14271
aa0403d9
PA
142722007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14273
14274 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14275 instead of on tmp_desc.
14276
255e7678
DJ
142772007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14278 Daniel Jacobowitz <dan@codesourcery.com>
14279
14280 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14281 (add_thread): Minor cleanups.
14282 (clear_inferiors): Move lower in the file. Clear the DLL
14283 list.
14284 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14285 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14286 (xml_escape_text): New.
14287 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14288 for qSupported.
14289 (handle_v_cont): Report errors.
14290 (gdbserver_version): Update.
14291 (main): Correct size of own_buf. Do not report initial DLL events.
14292 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14293 (unloaded_dll, xml_escape_text): New.
14294 * win32-low.c (enum target_waitkind): Update comments.
14295 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14296 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14297 (win32_EnumProcessModules, win32_GetModuleInformation)
14298 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14299 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14300 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14301 (win32_Module32First, win32_Module32Next, load_toolhelp)
14302 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14303 (get_child_debug_event): Handle DLL events.
14304 (win32_wait): Likewise.
14305
0d37add9
DJ
143062007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14307
14308 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14309 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14310
45e2715e
PA
143112007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14312
14313 * win32-low.c (handle_output_debug_string): Ignore event if not
14314 waiting.
14315
c5674cf1
PA
143162007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14317
14318 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14319
2bbe3cc1
DJ
143202007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14321
14322 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14323
ae13219e
DJ
143242007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14325
14326 * inferiors.c (change_inferior_id): Add comment.
14327 * linux-low.c (check_removed_breakpoint): Add an early
14328 prototype. Improve debug output.
14329 (linux_attach): Doc update.
14330 (linux_detach_one_process, linux_detach): Clean up before releasing
14331 each process.
14332 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14333 * linux-low.h (struct process_info): Doc improvement.
14334 * mem-break.c (delete_all_breakpoints): New.
14335 * mem-break.h (delete_all_breakpoints): New prototype.
14336 * thread-db.c (find_first_thread): New.
14337 (thread_db_create_event): Call it instead of
14338 thread_db_find_new_threads. Clean up unused variables.
14339 (maybe_attach_thread): Remove first thread handling.
14340 (thread_db_find_new_threads): Use find_first_thread.
14341 (thread_db_get_tls_address): Likewise.
14342
4105de34
DJ
143432007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14344
14345 * thread-db.c (thread_db_find_new_threads): Add prototype.
14346 (thread_db_create_event): Check for the main thread before adding
14347 a new thread.
14348 (maybe_attach_thread): Only enable event reporting if TID == 0.
14349 (thread_db_get_tls_address): Check for new threads.
14350
2b876972
DJ
143512007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14352
14353 * linux-low.c (linux_create_inferior): Try execv before execvp.
14354 * spu-low.c (spu_create_inferior): Likewise.
14355
7a245884
DJ
143562007-06-13 Mike Frysinger <vapier@gentoo.org>
14357
14358 * linux-low.c (linux_create_inferior): Change execv to execvp.
14359 * spu-low.c (spu_create_inferior): Likewies.
14360
117ce543
DJ
143612007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14362
14363 * Makefile.in (clean): Clean new files instead of deleted ones.
14364 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14365 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14366 rules.
14367 * configure.srv: Specify XML files and new regformats for MIPS and
14368 MIPS64 GNU/Linux.
14369 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14370 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14371 an entry for the restart register.
14372 (mips_cannot_fetch_register, mips_cannot_store_register)
14373 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14374 register names to match the XML descriptions.
14375 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14376 restart register instead of $0.
14377
0e7f50da
UW
143782007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14379 Markus Deuling <deuling@de.ibm.com>
14380
14381 * remote-utils.c (decode_xfer_write): New function.
14382 * server.h (decode_xfer_write): Add prototype.
14383 * server.c (handle_query): Add PACKET_LEN argument. Support
14384 qXfer:spu:read and qXfer:spu:write packets.
14385 (main): Pass packet_len to handle_query.
14386 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14387 * target.h (target_ops): Add qxfer_spu.
14388
374c1d38
UW
143892007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14390
14391 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14392 accessing non-seekable spufs files.
14393
bb63802a
UW
143942007-05-16 Markus Deuling <deuling@de.ibm.com>
14395
889bf7c5 14396 * server.c (handle_query): Add reply for qC packet.
bb63802a 14397
7390519e
PA
143982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14399 Leo Zayas <lerele@champenstudios@com>
14400
14401 * server.h (check_remote_input_interrupt_request): New function.
14402 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14403 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14404 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14405 (check_remote_input_interrupt_request): New function.
14406 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14407 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14408 winapi_GenerateConsoleCtrlEvent): New typedefs.
14409 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14410 to 250 ms.
14411 (win32_wait): Check for remote interrupt request
14412 with check_remote_input_interrupt_request.
14413 (win32_request_interrupt): New function.
14414 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14415
34b34921
PA
144162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14417
14418 * win32-low.c (debug_registers_changed,
14419 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14420 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14421 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14422 (thread_rec): Get context using the low target.
14423 (child_add_thread): Call thread_added on the low target,
14424 which does the same thing.
14425 (regptr): Delete.
14426 (do_initial_child_stuff): Remove debug registers references.
14427 Set context using the low target. Resume threads after
14428 setting the contexts.
14429 (child_continue): Remove dead variable. Remove debug
14430 registers references.
14431 (child_fetch_inferior_registers): Go through the low target.
14432 (do_child_store_inferior_registers): Remove.
14433 (child_store_inferior_registers): Go through the low target.
14434 (win32_resume): Remove debug registers references.
14435 Set context using the low target.
14436 (handle_exception): Change return type to void. Don't record
14437 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14438 first chance exception.
889bf7c5 14439 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14440 goto loop. Always return after waiting for debug event.
14441 (win32_wait): Convert to switch statement. Handle spurious
14442 events.
14443
14444 * win32-i386-low.c (debug_registers_changed,
14445 debug_registers_used): New.
14446 (initial_stuff): Rename to ...
14447 (i386_initial_stuff): ... this. Clear debug registers
14448 state variables.
14449 (store_debug_registers): Delete.
14450 (i386_get_thread_context): New.
14451 (load_debug_registers): Delete.
14452 (i386_set_thread_context): New.
14453 (i386_thread_added): New.
14454 (single_step): Rename to ...
14455 (i386_single_step): ... this.
14456 (do_fetch_inferior_registers): Rename to ...
14457 (i386_fetch_inferior_register): ... this.
14458 (i386_store_inferior_register): New.
14459 (the_low_target): Adapt to new interface.
14460
14461 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14462 (arm_get_thread_context): New.
14463 (arm_set_thread_context): New.
14464 (regptr): New.
14465 (do_fetch_inferior_registers): Rename to ...
14466 (arm_fetch_inferior_register): ... this.
14467 (arm_store_inferior_register): New.
14468 (arm_wince_breakpoint): Reimplement as unsigned long.
14469 (arm_wince_breakpoint_len): Define.
14470 (the_low_target): Adapt to new interface.
14471
14472 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14473 load_debug_registers. Add get_thread_context, set_thread_context,
14474 thread_added and store_inferior_register. Rename
14475 fetch_inferior_registers to fetch_inferior_register.
14476 (regptr): Remove declaration.
14477
dd6953e1
PA
144782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14479
14480 * linux-low.c (linux_detach): Change return type to int. Return 0.
14481 * spu-low.c (spu_detach): Likewise.
14482
444d6139
PA
144832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14484
14485 * target.h (target_ops): Change return type of detach to int.
14486 Add join.
14487 (join_inferior): New.
14488 * server.c (main): Don't skip detach support on mingw32.
14489 If the inferior doesn't support detaching return error.
14490 Call join_inferior instead of using waitpid.
14491 * linux-low.c (linux_join): New.
14492 (linux_target_op): Add linux_join.
14493 * spu-low.c (spu_join): New.
14494 (spu_target_ops): Add spu_join.
14495 * win32-low.c (win32_detach): Adapt to new interface.
14496 Reopen current_process_handle before detaching. Issue a child
14497 resume before detaching.
14498 (win32_join): New.
14499 (win32_target_op): Add win32_join.
14500
1d5315fe
PA
145012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14502
14503 * win32-low.c (win32-attach): Fix return value.
14504 * target.h (target_ops): Describe ATTACH return values.
14505
bf914831
PA
145062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14507
14508 * win32-low.c (GETPROCADDRESS): Define.
14509 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14510 (winapi_DebugSetProcessKillOnExit): Likewise.
14511 (win32_create_inferior): Force usage of ansi CreateProcessA.
14512 (win32_attach): Use GETPROCADDRESS.
14513 (win32_detach): Likewise.
14514
f72f3e60
PA
145152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14516
14517 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14518
ed50f18f
PA
145192007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14520
14521 * win32-low.c: Commit leftover changes from 2007-03-29.
14522
0c2ead7e
DJ
145232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14524
14525 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14526 fields short instead of int. Add explicit padding.
14527 (i387_cache_to_fsave): Remove unnecessary casts.
14528 (i387_fsave_to_cache): Doc fix.
14529 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14530
73725ff3
DJ
145312007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14532
14533 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14534 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14535
d99f33d8
PA
145362007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14537
14538 * configure.srv (arm*-*-mingw32ce*): Move near the other
14539 arm targets.
14540
68070c10
PA
145412007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14542
2482afc6 14543 * configure.ac: Add errno checking.
68070c10
PA
14544 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14545 sys/file.h and malloc.h.
14546 (AC_CHECK_DECLS): Add perror.
14547 (srv_mingwce): Handle.
2482afc6 14548 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14549 win32-i386-low.o to srv_tgtobj.
14550 (i[34567]86-*-mingw*): Likewise.
14551 (arm*-*-mingw32ce*): Add case.
14552 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14553 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14554 [__MINGW32CE__] (strerror): New function.
14555 [__MINGW32CE__] (errno): Define to GetLastError.
14556 [__MINGW32CE__] (COUNTOF): New macro.
14557 (remote_open): Remove extra close call.
14558 * mem-break.c (delete_breakpoint_at): New function.
14559 * mem-break.h (delete_breakpoint_at): Declare.
14560 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14561 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14562 [USE_WIN32API] (read, write): Add char* casts.
14563 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14564 * server.h: Include wincecompat.h on Windows CE.
14565 [HAVE_ERRNO_H]: Check.
14566 (perror): Declare if not declared.
14567 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14568 (perror_with_name): Remove errno declaration.
14569 * wincecompat.h: New.
14570 * wincecompat.c: New.
14571 * win32-low.h: New.
14572 * win32-arm-low.c: New.
14573 * win32-i386-low.c: New.
14574 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14575 (OUTMSG2): Make it safe.
14576 (_T): New macro.
14577 (COUNTOF): New macro.
14578 (NUM_REGS): Get it from the low target.
14579 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14580 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14581 (thread_rec): Let low target handle debug registers.
14582 (child_add_thread): Likewise.
14583 (child_init_thread_list): Likewise.
14584 (continue_one_thread): Likewise.
14585 (regptr): New.
14586 (do_child_fetch_inferior_registers): Move to ...
14587 * win32-i386-low.c: ... here, and rename to ...
14588 (do_fetch_inferior_registers): ... this.
889bf7c5 14589 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14590 Go through the low target.
14591 (do_child_store_inferior_registers): Use regptr.
14592 (strwinerror): New function.
14593 (win32_create_inferior): Handle Windows CE.
14594 Use strwinerror instead of strerror on Windows error
14595 codes. Add program to the error output.
14596 Don't close the main thread handle on Windows CE.
14597 (win32_attach): Use coredll.dll on Windows CE.
14598 (win32_kill): Close current process and current
14599 thread handles.
14600 (win32_detach): Use coredll.dll on Windows CE.
14601 (win32_resume): Let low target handle debug registers, and
14602 step request.
14603 (handle_exception): Add/Remove initial breakpoint. Avoid
14604 non-existant WSTOPSIG on Windows CE.
14605 (win32_read_inferior_memory): Cast to remove warning.
14606 (win32_arch_string): Go through the low target.
14607 (initialize_low): Call set_breakpoint_data with the low
14608 target's breakpoint.
14609 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14610 FOP_REGNUM, mappings): Move to ...
14611 * win32-i386-low.c: ... here.
14612 * win32-low.c (win32_thread_info): Move to ...
14613 * win32-low.h: ... here.
14614 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14615 win32-arm-low.c and wincecompat.c.
14616 (all:): Add $EXEEXT.
14617 (install-only:): Likewise.
14618 (gdbserver:): Likewise.
14619 (gdbreplay:): Likewise.
14620 * config.in: Regenerate.
14621 * configure: Regenerate.
14622
41093d81
PA
146232007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14624
14625 * win32-low.c: Rename typedef thread_info to
14626 win32_thread_info throughout.
14627
544afa54
PA
146282007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14629
14630 * win32-i386-low.c: Rename to ...
14631 * win32-low.c: ... this.
14632 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14633 * Makefile.in: Likewise.
14634
bce7165d
PA
146352007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14636
14637 * remote-utils.c (monitor_output): Constify msg parameter.
14638 * server.h (monitor_output): Likewise.
14639 * win32-i386-low.c (handle_output_debug_string): New.
14640 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14641 handle_output_debug_string.
14642 (get_child_debug_event): Likewise.
14643
506c7aa0
DJ
146442007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14645
14646 * server.c (main): Correct strtoul check.
14647
42c81e2a
DJ
146482007-03-27 Jon Ringle <jon@ringle.org>
14649
14650 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14651
9453113a
DJ
146522007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14653
14654 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14655
64a69107
DJ
146562007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14657
14658 * terminal.h: Check HAVE_SGTTY_H.
14659
146602007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14661
14662 * remote-utils.c (remote_open): Print out the assigned port number.
14663
c74d0ad8
DJ
146642007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14665
14666 * remote-utils.c (monitor_output): New function.
14667 * server.c (debug_threads): Define here.
14668 (monitor_show_help): New function.
14669 (handle_query): Handle qRcmd.
14670 (main): Do not handle 'd' packet.
14671 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14672 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14673 of debug_threads.
14674
de7c3b4a
PA
146752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14676
14677 * Makefile.in (EXEEXT): New.
14678 (clean): Use $(EXEEXT).
14679
ef57601b
PA
146802007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14681
14682 * target.h (target_ops): Rename send_signal to request_interrupt,
14683 and remove enum target_signal parameter.
14684 * linux-low.c (linux_request_interrupt): Rename from
14685 linux_send_signal, and always send SIGINT.
14686 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14687 and always send SIGINT.
14688 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14689 of send_signal.
14690 (input_interrupt): Likewise.
14691
820f2bda
PA
146922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14693
14694 * server.c (get_features_xml): Check if target implemented
14695 arch_string.
14696 * win32-i386-low.c (win32_arch_string): New.
14697 (win32_target_ops): Add win32_arch_string as arch_string member.
14698
ab39bf24
UW
146992007-02-22 Markus Deuling <deuling@de.ibm.com>
14700
14701 * spu-low.c (spu_arch_string): New.
14702 (spu_target_ops): Add spu_arch_string.
14703
61ff6e04
DJ
147042007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14705
14706 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14707 * configure.ac: Do not check for terminal.h.
14708 * configure, config.in: Regenerated.
14709
fb1e4ffc
DJ
147102007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14711
14712 * Makefile.in (OBS): Add $(XML_BUILTIN).
14713 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14714 (clean): Update.
14715 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14716 (arm-with-iwmmxt.c): New.
14717 * config.in, configure: Regenerate.
14718 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14719 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14720 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14721 (arm*-*-linux*): Add iWMMXt and regset support.
14722 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14723 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14724 (arm_store_wmmxregset, target_regsets): New.
14725 * server.c (get_features_xml): Take annex argument. Check builtin
14726 XML documents.
14727 (handle_query): Handle multiple annexes.
14728
0f48aa01
DJ
147292007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14730
14731 * remote-utils.c [USE_WIN32API] (read, write): Define.
14732 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14733 write.
14734
23181151
DJ
147352007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14736
14737 * linux-i386-low.c (the_low_target): Set arch_string.
14738 * linux-x86-64-low.c (the_low_target): Likewise.
14739 * linux-low.c (linux_arch_string): New.
14740 (linux_target_ops): Add it.
14741 * linux-low.h (struct linux_target_ops): Add arch_string.
14742 * server.c (write_qxfer_response): Use const void * for DATA.
14743 (get_features_xml): New.
14744 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14745 * target.h (struct target_ops): Add arch_string method.
14746
9d606399
DJ
147472007-01-03 Denis Pilat <denis.pilat@st.com>
14748 Daniel Jacobowitz <dan@codesourcery.com>
14749
14750 * linux-low.c (linux_kill): Handle being called with no threads.
14751 * win32-i386-low.c (win32_kill): Likewise.
14752 (get_child_debug_event): Clear current_process_handle.
14753
147542006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14755 Daniel Jacobowitz <dan@codesourcery.com>
14756
14757 * remote-utils.c (remote_open): Check the type of specified
14758 serial port devices before opening them.
14759 * server.c (main): Kill the inferior if an error occurs during
14760 the first remote_open.
14761
a5e13d24
DJ
147622006-12-05 Markus Deuling <deuling@de.ibm.com>
14763
14764 * README: Update supported targets.
14765
186947f7
DJ
147662006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14767
14768 * Makefile.in (clean): Remove reg-mips64.c.
14769 (reg-mips64.c, reg-mips64.o): New rules.
14770 * configure.srv: Handle mips64. Include regset support for mips.
14771 * linux-mips-low.c (union mips_register): New.
14772 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14773 (mips_breakpoint, mips_breakpoint_at): Use int.
14774 (mips_collect_register, mips_supply_register)
14775 (mips_collect_register_32bit, mips_supply_register_32bit)
14776 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14777 (mips_store_fpregset, target_regsets): New.
14778 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14779
a13e2c95
UW
147802006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14781
14782 * configure.srv: Add target "spu*-*-*".
14783 * Makefile.in (clean): Remove reg-spu.c.
14784 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14785 * spu-low.c: New file.
14786
cb7283db
DJ
147872006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14788
14789 * configure.ac: Correct td_thr_tls_get_addr test.
14790 * configure: Regenerated.
14791
89be2091
DJ
147922006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14793
14794 * linux-low.c (linux_wait_for_event): Reformat. Use the
14795 pass_signals array.
14796 * remote-utils.c (decode_address_to_semicolon): New.
14797 * server.c (pass_signals, handle_general_set): New.
14798 (handle_query): Mention QPassSignals for qSupported.
14799 (main): Call handle_general_set.
14800 * server.h (pass_signals, decode_address_to_semicolon): New.
14801
000ef4f0
DJ
148022006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14803
14804 * server.c (handle_query): Correct error handling for read_auxv.
14805
b7149293
UW
148062005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14807
14808 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14809 and srv_linux_thread_db to yes.
14810 * linux-s390-low.c (s390_fill_gregset): New function.
14811 (target_regsets): Define data structure.
14812
dae5f5cf
DJ
148132006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14814
14815 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14816 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14817 * config.in, configure: Regenerated.
14818 * inferiors.c (gdb_id_to_thread): New function.
14819 (gdb_id_to_thread_id): Use it.
14820 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14821 * linux-low.h (struct process_info): Add th member.
14822 (thread_db_get_tls_address): New prototype.
14823 * remote-utils.c (decode_address): Make non-static.
14824 * server.c (handle_query): Handle qGetTLSAddr.
14825 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14826 * target.h (struct target_ops): Add get_tls_address.
14827 * thread-db.c (maybe_attach_thread): Save the thread handle.
14828 (thread_db_get_tls_address): New.
14829
32ca6d61
DJ
148302006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14831
14832 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14833 (linux_resume_one_process): Take a siginfo_t *. Update all
14834 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14835 (struct pending_signals): Add a siginfo_t.
14836 (linux_wait_for_process): Always set last_status.
14837 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14838 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14839 * linux-low.h (struct process_info): Add last_status.
14840
5ffff7c1
DJ
148412006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14842
14843 * remote-utils.c (try_rle): New function.
14844 (putpkt_binary): Use it.
14845
8695c747
DJ
148462006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14847
14848 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14849 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14850 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14851 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14852 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14853 point registers.
14854
290fadea
RS
148552006-08-08 Richard Sandiford <richard@codesourcery.com>
14856
14857 * server.c (terminal_fd): New variable.
14858 (old_foreground_pgrp): Likewise.
14859 (restore_old_foreground_pgrp): New function.
14860 (start_inferior): Record the terminal file descriptor in terminal_fd
14861 and its original foreground group in old_foreground_pgrp. Register
14862 restore_old_foreground_pgrp with atexit().
14863
9f2e1e63
DJ
148642006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14865
14866 * server.c (handle_query): Correct qPart to qXfer.
14867
b80864fb
DJ
148682006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14869
14870 * configure.ac: Check for more headers which are missing on
14871 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14872 * configure.srv: Add Cygwin and mingw32.
14873 * remote-utils.c: Don't include headers unconditionally which
14874 are missing on mingw32. Include <winsock.h> for mingw32.
14875 (remote_open): Adjust for mingw32 support. Flush
14876 standard error after writing to it.
14877 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14878 (unblock_async_io, enable_async_io, disable_async_io)
14879 (readchar, getpkt): Update for Winsock support.
14880 (prepare_resume_reply): Expect a protocol signal number.
14881 * server.c: Disable <sys/wait.h> on mingw32.
14882 (start_inferior): Adjust for mingw32 support. Flush
14883 standard error after writing to it.
14884 (attach_inferior): Likewise. Use protocol signal
14885 numbers.
14886 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14887 and names.
14888 * win32-i386-low.c: New file.
14889 * Makefile.in (XM_CLIBS): Set.
14890 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14891 (win32-i386-low.o): New dependency rule.
14892 * linux-low.c (linux_wait): Use target signal numbers.
14893 * target.h (struct target_ops): Doc fix.
14894 * server.h (target_signal_to_name): New prototype.
14895 * gdbreplay.c: Don't include headers unconditionally which
14896 are missing on mingw32. Include <winsock.h> for mingw32.
14897 (remote_close, remote_open): Adjust for Winsock support.
14898 * configure, config.in: Regenerated.
14899
0876f84a
DJ
149002006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14901
14902 * server.c (decode_xfer_read, write_qxfer_response): New.
14903 (handle_query): Take a packet length argument. Handle
14904 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14905 the qSupported response.
14906 (main): Update call to handle_query.
14907
01f9e8fa
DJ
149082006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14909
14910 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14911 (putpkt_binary): Renamed from putpkt and adjusted for binary
14912 data.
14913 (putpkt): New wrapper for putpkt_binary.
14914 (readchar): Don't mask off the high bit.
14915 (decode_X_packet): New function.
14916 * server.c (main): Call putpkt_binary if a handler sets the packet
14917 length. Save the length of the incoming packet. Handle 'X'.
14918 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14919
be2a5f71
DJ
149202006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14921
14922 * server.c (handle_query): Handle qSupported.
14923
ea025f5f
DJ
149242006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14925
14926 * remote-utils.c (all_symbols_looked_up): New variable.
14927 (look_up_one_symbol): Check it.
14928 * server.h (look_up_one_symbol): New declaration.
14929 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14930
9308fc88
DJ
149312006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14932
14933 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14934 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14935 (PTRACE_GET_THREAD_AREA): Define.
14936 (ps_get_thread_area): New function.
14937
52fb6437
NS
149382006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14939
14940 * configure.srv (m68k*-*-uclinux*): New target.
14941 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14942 (linux_resume_one_process): Remove extraneous cast.
14943 (linux_read_offsets): New.
14944 (linux_target_op): Add linux_read_offsets on mmuless systems.
14945 * server.c (handle_query): Add qOffsets logic.
14946 * target.h (struct target_ops): Add read_offsets.
14947
21b0f40c
DJ
149482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14949
14950 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14951 (PTRACE_GET_THREAD_AREA): Define.
14952 (ps_get_thread_area): New function.
14953 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14954 (linux-x86-64-low.o): Update.
14955
0050a760
DJ
149562006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14957
14958 * configure.ac: Remove checks for prfpregset_t.
14959 * gdb_proc_service.h: New file.
14960 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14961 new "gdb_proc_service.h".
14962 * proc-service.c: Likewise.
14963 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14964 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14965 * Makefile.in (gdb_proc_service_h): Updated.
14966 * configure, config.in: Regenerated.
14967
b92a518e
DJ
149682006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14969
14970 * remote-utils.c (prepare_resume_reply): Move declaration
14971 of gdb_id_from_wait to the top of the block.
14972
545587ee
DJ
149732006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14974
14975 * linux-low.c (regsets_store_inferior_registers): Read the regset
14976 from the target before filling it.
14977
9db87ebd
DJ
149782006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14979
14980 * server.c (attach_inferior): Return SIGTRAP for a successful
14981 attach.
14982
dd24457d
DJ
149832006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14984
14985 * Makefile.in (OBS): Add version.o.
14986 (STAGESTUFF): Delete.
14987 (version.o): Add dependencies.
14988 (version.c): Replace rule.
14989 (clean): Remove version.c.
14990 * server.c (gdbserver_version): New.
14991 (gdbserver_usage): Use printf.
14992 (main): Handle --version and --help.
14993 * server.h (version, host_name): Add declarations.
14994
6f0f660e
EZ
149952005-12-23 Eli Zaretskii <eliz@gnu.org>
14996
889bf7c5
PA
14997 * linux-arm-low.c:
14998 * linux-arm-low.c:
14999 * inferiors.c:
15000 * i387-fp.h:
15001 * i387-fp.c:
15002 * gdbreplay.c:
15003 * regcache.c:
15004 * proc-service.c:
15005 * mem-break.h:
15006 * mem-break.c:
15007 * linux-x86-64-low.c:
15008 * linux-sh-low.c:
15009 * linux-s390-low.c:
15010 * linux-ppc64-low.c:
15011 * linux-ppc-low.c:
15012 * linux-mips-low.c:
15013 * linux-m68k-low.c:
15014 * linux-m32r-low.c:
15015 * linux-low.h:
15016 * linux-low.c:
15017 * linux-ia64-low.c:
15018 * linux-i386-low.c:
15019 * linux-crisv32-low.c:
15020 * thread-db.c:
15021 * terminal.h:
15022 * target.h:
15023 * target.c:
15024 * server.h:
15025 * server.c:
15026 * remote-utils.c:
15027 * regcache.h:
15028 * utils.c:
15029 * Makefile.in:
15030 * configure.ac:
6f0f660e
EZ
15031 * gdbserver.1: Add (C) after Copyright. Update the FSF
15032 address.
15033
9d1fb177
DJ
150342005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15035
15036 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15037 (arm_breakpoint_at): Recognize both breakpoints.
15038 (the_low_target): Use the correct breakpoint instruction.
15039
011a70c2
DJ
150402005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15041
15042 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15043 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15044 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15045 (the_low_target): Update.
15046
7fb85e41
AS
150472005-10-25 Andreas Schwab <schwab@suse.de>
15048
15049 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15050
15051 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15052 (ia64_num_regs): Reduce to 462.
15053
3db0444b
DJ
150542005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15055
15056 * acinclude.m4: Correct quoting.
15057 * aclocal.m4: Regenerated.
15058
15059 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15060 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15061 (thread_db_init): Call thread_db_err_str.
15062 * configure.ac: Check for TD_VERSION.
15063 * config.in, configure: Regenerated.
15064
bee0189a
DJ
150652005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15066
15067 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15068
e9d25b98
DJ
150692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15070
15071 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15072 is not available. Define HAVE_PTRACE_GETREGS if it is.
15073 * config.in, configure: Regenerated.
15074 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15075 * linux-i386-low.c, linux-m68k-low.c: Update to use
15076 HAVE_PTRACE_GETREGS.
15077 * linux-low.c (regsets_fetch_inferior_registers)
15078 (regsets_store_inferior_registers): Only return 0 if we processed
15079 GENERAL_REGS.
15080 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15081 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15082
a06660f7
DJ
150832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15084
15085 * inferiors.c (struct thread_info): Add gdb_id.
15086 (add_thread): Add gdb_id argument.
15087 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15088 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15089 calls to add_thread.
15090 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15091 * server.c (handle_query): Use thread_to_gdb_id.
15092 (handle_v_cont, main): Use gdb_id_to_thread_id.
15093 * server.h (add_thread): Update prototype.
15094 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15095 prototypes.
15096
5a1f5858
DJ
150972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15098
15099 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15100 left-padded registers.
15101 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15102 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15103
e122f1f5
SE
151042005-07-01 Steve Ellcey <sje@cup.hp.com>
15105
15106 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15107 * configure: Regenerate.
15108 * config.in: Regenerate.
15109 * server.h (NEED_DECLARATION_STRERROR):
15110 Replace with !HAVE_DECL_STRERROR.
15111
d592fa2f
DJ
151122005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15113
15114 * linux-low.c (linux_wait, linux_send_signal): Don't test
15115 an unsigned long variable for > 0 if it could be MAX_ULONG.
15116 * server.c (myresume): Likewise.
15117 * target.c (set_desired_inferior): Likewise.
15118
ccbd4912
MK
151192005-06-13 Mark Kettenis <kettenis@gnu.org>
15120
15121 * configure.ac: Simplify and improve check for socklen_t.
15122 * configure, config.in: Regenerate.
15123
f450004a
DJ
151242005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15125
15126 * acconfig.h: Remove.
15127 * configure.ac: Add a test for socklen_t. Use three-argument
15128 AC_DEFINE throughout.
15129 * config.in: Regenerated using autoheader 2.59.
15130 * configure: Regenerated.
15131
15132 * gdbreplay.c (socklen_t): Provide a default.
15133 (remote_open): Use socklen_t.
15134 * remote-utils.c (socklen_t): Provide a default.
15135 (remote_open): Use socklen_t.
15136 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15137 unsigned char.
15138
15139 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15140 char for buffers.
15141 * linux-low.c (linux_read_memory, linux_write_memory)
15142 (linux_read_auxv): Likewise.
15143 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15144 (check_mem_write): Likewise.
15145 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15146 Likewise.
15147 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15148 (registers_from_string, register_data): Likewise.
15149 * server.c (handle_query, main): Likewise.
15150 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15151 (decode_M_packet): Likewise.
15152 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15153 * target.h (struct target_ops): Update read_memory, write_memory,
15154 and read_auxv.
15155 (read_inferior_memory, write_inferior_memory): Update.
15156 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15157 to unsigned char *.
15158 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15159 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15160 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15161 linux-s390-low.c, linux-sh-low.c: Update for changes in
15162 read_inferior_memory and the_low_target->breakpoint.
15163
eee84df1
DJ
151642005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15165
15166 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15167 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15168 * configure.srv: Add powerpc64-*-linux*.
15169 * linux-ppc64-low.c: New file.
15170
45b134e5
OF
151712005-05-23 Orjan Friberg <orjanf@axis.com>
15172
15173 * linux-cris-low.c: New file with support for CRIS.
15174 * linux-crisv32-low.c: Ditto for CRISv32.
15175 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15176 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15177 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15178 reg-crisv32.o, and reg-crisv32.c to make rules.
15179 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15180 recognized targets.
15181
48d93c75
UW
151822005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15183
15184 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15185 of sizeof (PTRACE_XFER_TYPE).
15186 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15187
e013ee27
OF
151882005-05-12 Orjan Friberg <orjanf@axis.com>
15189
889bf7c5 15190 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15191 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15192 pointers for hardware watchpoint support.
15193 * linux-low.h (struct linux_target_ops): Ditto.
15194 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15195 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15196 to linux_target_ops.
15197 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15198 reply packet.
15199 * server.c (main): Recognize 'Z' and 'z' packets.
15200
b0ded00b
UW
152012005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15202
15203 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15204 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15205 (the_low_target): Add new members.
15206
8643e2ad
DJ
152072005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15208
15209 * proc-service.c (ps_lgetregs): Search all_processes instead of
15210 all_threads.
15211
fc620387
DJ
152122005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15213
15214 * server.c (start_inferior): Change return type to int.
15215 (attach_inferior): Change sigptr to int *.
15216 (handle_v_cont, handle_v_requests): Change signal to int *.
15217 (main): Change signal to int.
15218
152192005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15220
15221 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15222 * configure.srv: Add m32r*-*-linux*.
15223 * linux-m32r-low.c: New file.
15224
e0e76420
DJ
152252005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15226
15227 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15228
a1928bad
DJ
152292005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15230
15231 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15232 Take unsigned long arguments for PIDs.
15233 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15234 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15235 (wait_for_sigstop, linux_resume_one_process)
15236 (regsets_fetch_inferior_registers, linux_send_signal)
15237 (linux_read_auxv): Likewise. Update the types of variables holding
15238 PIDs. Update format string specifiers.
15239 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15240 * remote-utils.c (prepare_resume_reply): Likewise.
15241 * server.c (cont_thread, general_thread, step_thread)
15242 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15243 unsigned long.
15244 (handle_query): Update format specifiers.
15245 (handle_v_cont, main): Use strtoul for thread IDs.
15246 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15247 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15248 (general_thread, step_thread, thread_from_wait)
15249 (old_thread_from_wait): Update.
15250 * target.h (struct thread_resume): Use unsigned long for THREAD.
15251 (struct target_ops): Use unsigned long for arguments to attach and
15252 thread_alive.
15253
dcdb98d2
DJ
152542005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15255
15256 * acinclude.m4: Include bfd/bfd.m4 directly.
15257 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15258 <agriffis@toolchain.org>.
15259 * aclocal.m4, configure: Regenerated.
15260
bec39cab
AC
152612005-01-07 Andrew Cagney <cagney@gnu.org>
15262
15263 * configure.ac: Rename configure.in, require autoconf 2.59.
15264 * configure: Re-generate.
15265
434c4c77
DJ
152662004-12-08 Daniel Jacobowitz <dan@debian.org>
15267
15268 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15269 LIBS when finished.
15270 * aclocal.m4: Regenerated.
15271 * configure: Regenerated.
15272
db1d3e1b
AS
152732004-11-21 Andreas Schwab <schwab@suse.de>
15274
15275 * linux-m68k-low.c (m68k_num_gregs): Define.
15276 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15277 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15278 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15279 (m68k_breakpoint_at): New. Add to the_low_target.
15280
15281 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15282 srv_linux_thread_db to yes.
15283
43360365
JB
152842004-10-20 Joel Brobecker <brobecker@gnat.com>
15285
15286 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15287 (ARCH_SET_FS): Likewise.
15288 (ARCH_GET_FS): Likewise.
15289 (ARCH_GET_GS): Likewise.
15290
fd500816
DJ
152912004-10-16 Daniel Jacobowitz <dan@debian.org>
15292
15293 * linux-i386-low.c (ps_get_thread_area): New.
15294 * linux-x86-64-low.c (ps_get_thread_area): New.
15295 * linux-low.c: Include <sys/syscall.h>.
15296 (linux_kill_one_process): Don't kill the first thread here.
15297 (linux_kill): Kill the first thread here.
15298 (kill_lwp): New function.
15299 (send_sigstop, linux_send_signal): Use it.
15300 * proc-service.c: Clean up #ifdefs.
15301 (fpregset_info): Delete.
15302 (ps_lgetregs): Update and enable implementation.
15303 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15304 implementations.
15305 * remote-utils.c (struct sym_cache, symbol_cache): New.
15306 (input_interrupt): Print a clearer message.
15307 (async_io_enabled): New variable.
15308 (enable_async_io, disable_async_io): Use it. Update comments.
15309 (look_up_one_symbol): Use the symbol cache.
15310 * thread-db.c (thread_db_look_up_symbols): New function.
15311 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15312
f6de3c42
DJ
153132004-10-16 Daniel Jacobowitz <dan@debian.org>
15314
15315 * configure.in: Test for -rdynamic.
15316 * configure: Regenerated.
15317 * Makefile (INTERNAL_LDFLAGS): New.
15318 (gdbserver, gdbreplay): Use it.
15319
2c0fc042
AC
153202004-09-02 Andrew Cagney <cagney@gnu.org>
15321
15322 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15323
075b3282
DJ
153242004-03-23 Daniel Jacobowitz <drow@mvista.com>
15325
15326 * linux-low.c (linux_wait): Clear all_processes list also.
15327
fa6a77dc
DJ
153282004-03-12 Daniel Jacobowitz <drow@mvista.com>
15329
15330 * linux-low.c: Include <errno.h>. Remove extern declaration of
15331 errno.
15332
6d782a97
DJ
153332004-03-12 Daniel Jacobowitz <drow@mvista.com>
15334
15335 * gdbreplay.c, server.h, utils.c: Update copyright years.
15336
3a7fb99b
DJ
153372004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15338
15339 * server.c (main): Print child status or termination signal from
15340 variable 'signal', not 'sig'.
15341
c3e735a6
DJ
153422004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15343
15344 * linux-low.c (linux_read_memory): Change return type to
15345 int. Check for and return error from ptrace().
15346 * target.c (read_inferior_memory): Change return type to int. Pass
15347 back return status from the_target->read_memory().
15348 * target.h (struct target_ops): Adapt *read_memory() prototype.
15349 Update comment.
15350 (read_inferior_memory): Adapt prototype.
15351 * server.c (main): Return an error packet if
15352 read_inferior_memory() returns an error.
15353
a59d1c82
DJ
153542004-03-04 Daniel Jacobowitz <drow@mvista.com>
15355
15356 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15357 Unify with other clean targets.
15358
dc3f8883
DJ
153592004-02-29 Daniel Jacobowitz <drow@mvista.com>
15360
15361 * server.c (handle_v_cont): Call set_desired_inferior.
15362
89a208da
DJ
153632004-02-29 Daniel Jacobowitz <drow@mvista.com>
15364
15365 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15366
62ea82f5
DJ
153672004-02-29 Daniel Jacobowitz <drow@mvista.com>
15368
15369 * linux-low.c (linux_wait): Unblock async I/O.
15370 (linux_resume): Block and enable async I/O.
15371 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15372 * server.h (block_async_io, unblock_async_io): Add prototypes.
15373
6910d122
DJ
153742004-02-29 Daniel Jacobowitz <drow@mvista.com>
15375
15376 * remote-utils.c (remote_open): Print a status notice after
15377 opening a TCP port.
15378 * server.c (attach_inferior): Print a status notice after
15379 attaching.
15380
153812004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15382
15383 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15384
c89dc5d4
DJ
153852004-02-26 Daniel Jacobowitz <drow@mvista.com>
15386
15387 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15388 error packet.
15389 * server.c, target.h: Update copyright years.
15390
4b8dad4a
RM
153912004-02-25 Roland McGrath <roland@redhat.com>
15392
15393 * target.h (struct target_ops): New member `read_auxv'.
15394 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15395 * linux-low.c (linux_read_auxv): New function.
15396 (linux_target_ops): Initialize `read_auxv' member to that.
15397
d7446758
JB
153982004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15399
15400 Committed by Jim Blandy <jimb@redhat.com>.
15401
15402 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15403 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15404 instead of GPR_SIZE to distiguish s390 and s390x targets.
15405
5544ad89
DJ
154062004-01-31 Daniel Jacobowitz <drow@mvista.com>
15407
15408 * linux-low.c: Update copyright year.
15409 (check_removed_breakpoint): Clear pending_is_breakpoint.
15410 (linux_set_resume_request, linux_queue_one_thread)
15411 (resume_status_pending_p): New functions.
15412 (linux_continue_one_thread): Use process->resume.
15413 (linux_resume): Only resume threads if there are no pending events.
15414 * linux-low.h (struct process_info): Add resume request
15415 pointer.
15416
2a68b70e
DJ
154172004-01-30 Daniel Jacobowitz <drow@mvista.com>
15418
15419 * regcache.c (new_register_cache): Clear the allocated register
15420 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15421
64386c31
DJ
154222003-10-13 Daniel Jacobowitz <drow@mvista.com>
15423
15424 * linux-low.c (linux_resume): Take a struct thread_resume *
15425 argument.
15426 (linux_wait): Update call.
15427 (resume_ptr): New static variable.
15428 (linux_continue_one_thread): Renamed from
15429 linux_continue_one_process. Use resume_ptr.
15430 (linux_resume): Use linux_continue_one_thread.
15431 * server.c (handle_v_cont, handle_v_requests): New functions.
15432 (myresume): New function.
15433 (main): Handle 'v' case.
15434 * target.h (struct thread_resume): New type.
15435 (struct target_ops): Change argument of "resume" to struct
15436 thread_resume *.
15437 (myresume): Delete macro.
15438
c938e9b0
L
154392003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15440
15441 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15442 (uninstall): Support DESTDIR.
15443
7f313d07
BC
15444Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15445
15446 * configure.srv: Add xscale*linux copy of arm*linux entry.
15447
3b2fc2ea
DJ
154482003-07-24 Daniel Jacobowitz <drow@mvista.com>
15449
15450 * linux-arm-low.c (arm_reinsert_addr): New function.
15451 (the_low_target): Add arm_reinsert_addr.
15452
1c0a559e
MK
154532003-07-08 Mark Kettenis <kettenis@gnu.org>
15454
15455 * mem-break.c: Remove whitespace at end of file.
15456
43d5792c
DJ
154572003-06-28 Daniel Jacobowitz <drow@mvista.com>
15458
15459 * configure.in: Check whether we need to prototype strerror.
15460 * server.h: Optionally prototype strerror.
15461 * gdbreplay.c (perror_with_name): Use strerror.
15462 * linux-low.c (linux_attach_lwp): Use strerror.
15463 * utils.c (perror_with_name): Use strerror.
15464 * config.in, configure: Regenerated.
15465
c8a86edf
DJ
154662003-06-28 Daniel Jacobowitz <drow@mvista.com>
15467
15468 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15469 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15470
73d37363
DJ
154712003-06-20 Daniel Jacobowitz <drow@mvista.com>
15472
15473 * Makefile.in (SFILES): Update.
15474 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15475 low-sun3.c: Remove files.
15476
6ad8ae5c
DJ
154772003-06-17 Daniel Jacobowitz <drow@mvista.com>
15478
15479 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15480 (linux_detach_one_process, linux_detach): New functions.
15481 (linux_target_ops): Add linux_detach.
15482 * server.c (main): Handle 'D' packet.
15483 * target.h (struct target_ops): Add "detach" member.
15484 (detach_inferior): Define.
15485
1581182a
MK
154862003-06-13 Mark Kettenis <kettenis@gnu.org>
15487
15488 From Kelley Cook <kelleycook@wideopenwest.com>:
15489 * configure.srv: Accept i[34567]86 variants.
15490
e5379b03
DJ
154912003-06-05 Daniel Jacobowitz <drow@mvista.com>
15492
15493 * linux-low.c (linux_wait_for_event): Correct comment typos.
15494 (linux_resume_one_process): Call check_removed_breakpoint.
15495 (linux_send_signal): New function.
15496 (linux_target_ops): Add linux_send_signal.
15497 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15498 of kill.
15499 * target.h (struct target_ops): Add send_signal.
15500
2ff29de4
JB
155012003-05-29 Jim Blandy <jimb@redhat.com>
15502
15503 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15504 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15505 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15506 away part of the register's value.
15507
254787d4
DJ
155082003-03-26 Daniel Jacobowitz <drow@mvista.com>
15509
15510 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15511 (linux_wait_for_event, linux_init_signals): Likewise.
15512
94e10508
DJ
155132003-03-17 Daniel Jacobowitz <drow@mvista.com>
15514
15515 * configure.in: Check for stdlib.h.
15516 * configure: Regenerated.
15517 * config.in: Regenerated.
15518
4c0711e0
DJ
155192003-01-04 Andreas Schwab <schwab@suse.de>
15520
15521 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15522
ef66e766
AC
155232003-01-02 Andrew Cagney <ac131313@redhat.com>
15524
15525 * Makefile.in: Remove obsolete code.
15526
a1358604
DJ
155272002-11-20 Daniel Jacobowitz <drow@mvista.com>
15528
15529 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15530 defined(PT_FPR0_HI).
15531
23ce3b1c
DJ
155322002-11-17 Stuart Hughes <seh@zee2.com>
15533
15534 * linux-arm-low.c (arm_num_regs): Increase.
15535 (arm_regmap): Include status register.
15536
155372002-11-17 Daniel Jacobowitz <drow@mvista.com>
15538
15539 * linux-low.c (register_addr): Remove incorrect -1 check.
15540
a9fa9f7d
DJ
155412002-08-29 Daniel Jacobowitz <drow@mvista.com>
15542
15543 * linux-low.c (linux_create_inferior): Call setpgid. Return
15544 the new PID.
15545 (unstopped_p, linux_signal_pid): Remove.
15546 (linux_target_ops): Remove linux_signal_pid.
15547 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15548 global instead of target method.
15549 * target.h (struct target_ops): Remove signal_pid. Update comment
15550 for create_inferior.
15551 * server.c (signal_pid): New variable.
15552 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15553 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15554 (attach_inferior): Set signal_pid.
15555
17574093
DJ
155562002-08-23 Daniel Jacobowitz <drow@mvista.com>
15557
15558 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15559
155602002-08-20 Jim Blandy <jimb@redhat.com>
15561
15562 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15563 default for this.
15564
155652002-08-01 Andrew Cagney <cagney@redhat.com>
15566
15567 * Makefile.in: Make chill references obsolete.
15568
155692002-07-24 Kevin Buettner <kevinb@redhat.com>
15570
15571 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15572 * configure: Regenerate.
15573 * config.in: Regenerate.
15574
155752002-07-09 David O'Brien <obrien@FreeBSD.org>
15576
15577 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15578 (perror_with_name, remote_close, remote_open, expect, play): Static.
15579
155802002-07-04 Michal Ludvig <mludvig@suse.cz>
15581
4b8dad4a 15582 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15583 byte offsets instead of an array of indexes.
15584 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15585
155862002-06-13 Daniel Jacobowitz <drow@mvista.com>
15587
15588 * regcache.c: Add comment.
15589
155902002-06-11 Daniel Jacobowitz <drow@mvista.com>
15591
15592 * thread-db.c: New file.
15593 * proc-service.c: New file.
15594 * acinclude.m4: New file.
15595 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15596 proc-service.o, and thread-db.o.
15597 (linux-low.o): Add USE_THREAD_DB.
15598 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15599 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15600 * aclocal.m4: Regenerated.
15601 * config.in: Regenerated.
15602 * configure: Regenerated.
15603 * configure.in: Check for proc_service.h, sys/procfs.h,
15604 thread_db.h, and linux/elf.h headrs.
15605 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15606 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15607 Check for -lthread_db and thread support.
15608 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15609 PowerPC, and SuperH.
15610 * i387-fp.c: Constify arguments.
15611 * i387-fp.h: Likewise.
15612 * inferiors.c: (struct thread_info): Renamed from
15613 `struct inferior_info'. Remove PID member. Use generic inferior
15614 list header. All uses updated.
15615 (inferiors, signal_pid): Removed.
15616 (all_threads): New variable.
15617 (get_thread): Define.
15618 (add_inferior_to_list): New function.
15619 (for_each_inferior): New function.
15620 (change_inferior_id): New function.
15621 (add_inferior): Removed.
15622 (remove_inferior): New function.
15623 (add_thread): New function.
15624 (free_one_thread): New function.
15625 (remove_thread): New function.
15626 (clear_inferiors): Use for_each_inferior and free_one_thread.
15627 (find_inferior): New function.
15628 (find_inferior_id): New function.
15629 (inferior_target_data): Update argument type.
15630 (set_inferior_target_data): Likewise.
15631 (inferior_regcache_data): Likewise.
15632 (set_inferior_regcache_data): Likewise.
15633 * linux-low.c (linux_bp_reinsert): Remove.
15634 (all_processes, stopping_threads, using_thrads)
15635 (struct pending_signals, debug_threads, pid_of): New.
15636 (inferior_pid): Replace with macro.
15637 (struct inferior_linux_data): Remove.
15638 (get_stop_pc, add_process): New functions.
15639 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15640 Use add_process and add_thread.
15641 (linux_attach_lwp): New function, based on old linux_attach. Use
15642 add_process and add_thread. Set stop_expected for new threads.
15643 (linux_attach): New function.
15644 (linux_kill_one_process): New function.
15645 (linux_kill): Kill all LWPs.
15646 (linux_thread_alive): Use find_inferior_id.
15647 (check_removed_breakpoints, status_pending_p): New functions.
15648 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15649 Update. Use WNOHANG. Wait for cloned processes also. Update process
15650 struct for the found process.
15651 (linux_wait_for_event): New function.
15652 (linux_wait): Use it. Support LWPs.
15653 (send_sigstop, wait_for_sigstop, stop_all_processes)
15654 (linux_resume_one_process, linux_continue_one_process): New functions.
15655 (linux_resume): Support LWPs.
15656 (REGISTER_RAW_SIZE): Remove.
15657 (fetch_register): Use register_size instead. Call supply_register.
15658 (usr_store_inferior_registers): Likewise. Call collect_register.
15659 Fix recursive case.
15660 (regsets_fetch_inferior_registers): Improve error message.
15661 (regsets_store_inferior_registers): Add debugging.
15662 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15663 (unstopped_p, linux_signal_pid): New functions.
15664 (linux_target_ops): Add linux_signal_pid.
15665 (linux_init_signals): New function.
15666 (initialize_low): Call it. Initialize using_threads.
15667 * regcache.c (inferior_regcache_data): Add valid
15668 flag.
15669 (get_regcache): Fetch registers lazily. Add fetch argument
15670 and update all callers.
15671 (regcache_invalidate_one, regcache_invalidate): New
15672 functions.
15673 (new_register_cache): Renamed from create_register_cache.
15674 Return the new regcache.
15675 (free_register_cache): Change argument to a void *.
15676 (registers_to_string, registers_from_string): Call get_regcache
15677 with fetch flag set.
15678 (register_data): Make static. Pass fetch flag to get_regcache.
15679 (supply_register): Call get_regcache with fetch flag clear.
15680 (collect_register): Call get_regcache with fetch flag set.
15681 (collect_register_as_string): New function.
15682 * regcache.h: Update.
15683 * remote-utils.c (putpkt): Flush after debug output and use
15684 stderr.
15685 Handle input interrupts while waiting for an ACK.
15686 (input_interrupt): Use signal_pid method.
15687 (getpkt): Flush after debug output and use stderr.
15688 (outreg): Use collect_register_as_string.
15689 (new_thread_notify, dead_thread_notify): New functions.
15690 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15691 and general_thread.
15692 (look_up_one_symbol): Flush after debug output.
15693 * server.c (step_thread, server_waiting): New variables.
15694 (start_inferior): Don't use signal_pid. Update call to mywait.
15695 (attach_inferior): Update call to mywait.
15696 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15697 (main): Don't fetch/store registers explicitly. Use
15698 set_desired_inferior. Support proposed ``Hs'' packet. Update
15699 calls to mywait.
15700 * server.h: Update.
15701 (struct inferior_list, struct_inferior_list_entry): New.
15702 * target.c (set_desired_inferior): New.
15703 (write_inferior_memory): Constify.
15704 (mywait): New function.
15705 * target.h: Update.
15706 (struct target_ops): New signal_pid method.
15707 (mywait): Removed macro, added prototype.
15708
15709 * linux-low.h (regset_func): Removed.
15710 (regset_fill_func, regset_store_func): New.
15711 (enum regset_type): New.
15712 (struct regset_info): Add type field. Use new operation types.
15713 (struct linux_target_ops): stop_pc renamed to get_pc.
15714 Add decr_pc_after_break and breakpoint_at.
15715 (get_process, get_thread_proess, get_process_thread)
15716 (strut process_info, all_processes, linux_attach_lwp)
15717 (thread_db_init): New.
15718
15719 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15720 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15721 (the_low_target): Add new members.
15722 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15723 (i386_store_fpxregset): Constify.
15724 (target_regsets): Add new kind identifier.
15725 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15726 (i386_set_pc): Add debugging.
15727 (i386_breakpoint_at): New function.
15728 (the_low_target): Add new members.
15729 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15730 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15731 (mips_breakpoint_at): New.
15732 (the_low_target): Add new members.
15733 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15734 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15735 (the_low_target): Add new members.
15736 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15737 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15738 (the_low_target): Add new members.
15739 * linux-x86-64-low.c (target_regsets): Add new kind
15740 identifier.
15741
157422002-05-15 Daniel Jacobowitz <drow@mvista.com>
15743
15744 From Martin Pool <mbp@samba.org>:
15745 * server.c (gdbserver_usage): New function.
15746 (main): Call it.
15747
157482002-05-14 Daniel Jacobowitz <drow@mvista.com>
15749
15750 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15751 stop_at -> stop_pc.
15752
157532002-05-04 Andrew Cagney <ac131313@redhat.com>
15754
15755 * Makefile.in: Remove obsolete code.
15756
157572002-04-24 Michal Ludvig <mludvig@suse.cz>
15758
15759 * linux-low.c (regsets_fetch_inferior_registers),
15760 (regsets_store_inferior_registers): Removed cast to int from
15761 ptrace() calls.
15762 * regcache.h: Added declaration of struct inferior_info.
15763
157642002-04-20 Daniel Jacobowitz <drow@mvista.com>
15765
15766 * inferiors.c (struct inferior_info): Add regcache_data.
15767 (add_inferior): Call create_register_cache.
15768 (clear_inferiors): Call free_register_cache.
15769 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15770 * regcache.c (struct inferior_regcache_data): New.
15771 (registers): Remove.
15772 (get_regcache): New function.
15773 (create_register_cache, free_register_cache): New functions.
15774 (set_register_cache): Don't initialize the register cache here.
15775 (registers_to_string, registers_from_string, register_data): Call
15776 get_regcache.
15777 * regcache.h: Add prototypes.
15778 * server.h: Likewise.
15779
157802002-04-20 Daniel Jacobowitz <drow@mvista.com>
15781
15782 * mem-break.c: New file.
15783 * mem-break.h: New file.
15784 * Makefile.in: Add mem-break.o rule; update server.h
15785 dependencies.
15786 * inferiors.c (struct inferior_info): Add target_data
15787 member.
15788 (clear_inferiors): Free target_data member if set.
15789 (inferior_target_data, set_inferior_target_data): New functions.
15790 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15791 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15792 * linux-low.c (linux_bp_reinsert): New variable.
15793 (struct inferior_linux_data): New.
15794 (linux_create_inferior): Use set_inferior_target_data.
15795 (linux_attach): Likewise. Call add_inferior.
15796 (linux_wait_for_one_inferior): New function.
15797 (linux_wait): Call it.
15798 (linux_write_memory): Add const.
15799 (initialize_low): Call set_breakpoint_data.
15800 * linux-low.h (struct linux_target_ops): Add breakpoint
15801 handling members.
15802 * server.c (attach_inferior): Remove extra add_inferior
15803 call.
15804 * server.h: Include mem-break.h. Update inferior.c
15805 prototypes.
15806 * target.c (read_inferior_memory)
15807 (write_inferior_memory): New functions.
15808 * target.h (read_inferior_memory)
15809 (write_inferior_memory): Change macros to prototypes.
15810 (struct target_ops): Update comments. Add const to write_memory
15811 definition.
15812
158132002-04-11 Daniel Jacobowitz <drow@mvista.com>
15814
15815 * linux-low.c (usr_store_inferior_registers): Support
15816 registers which are allowed to fail to store.
15817 * linux-low.h (linux_target_ops): Likewise.
15818 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15819 (ppc_cannot_store_register): FPSCR may not be storable.
15820
158212002-04-09 Daniel Jacobowitz <drow@mvista.com>
15822
15823 * server.h: Include <string.h> if HAVE_STRING_H.
15824 * ChangeLog: Correct paths in last ChangeLog entry.
15825
158262002-04-09 Daniel Jacobowitz <drow@mvista.com>
15827
15828 * linux-low.h: Remove obsolete prototypes.
15829 (struct linux_target_ops): New.
15830 (extern the_low_target): New.
15831 * linux-low.c (num_regs, regmap): Remove declarations.
15832 (register_addr): Use the_low_target explicitly.
15833 (fetch_register): Likewise.
15834 (usr_fetch_inferior_registers): Likewise.
15835 (usr_store_inferior_registers): Likewise.
15836 * linux-arm-low.c (num_regs): Remove.
15837 (arm_num_regs): Define.
15838 (arm_regmap): Renamed from regmap, made static.
15839 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15840 made static.
15841 (arm_cannot_store_register): Renamed from cannot_store_register,
15842 made static.
15843 (the_low_target): New.
15844 * linux-i386-low.c (num_regs): Remove.
15845 (i386_num_regs): Define.
15846 (i386_regmap): Renamed from regmap, made static.
15847 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15848 made static.
15849 (i386_cannot_store_register): Renamed from cannot_store_register,
15850 made static.
15851 (the_low_target): New.
15852 * linux-ia64-low.c (num_regs): Remove.
15853 (ia64_num_regs): Define.
15854 (ia64_regmap): Renamed from regmap, made static.
15855 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15856 made static.
15857 (ia64_cannot_store_register): Renamed from cannot_store_register,
15858 made static.
15859 (the_low_target): New.
15860 * linux-m68k-low.c (num_regs): Remove.
15861 (m68k_num_regs): Define.
15862 (m68k_regmap): Renamed from regmap, made static.
15863 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15864 made static.
15865 (m68k_cannot_store_register): Renamed from cannot_store_register,
15866 made static.
15867 (the_low_target): New.
15868 * linux-mips-low.c (num_regs): Remove.
15869 (mips_num_regs): Define.
15870 (mips_regmap): Renamed from regmap, made static.
15871 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15872 made static.
15873 (mips_cannot_store_register): Renamed from cannot_store_register,
15874 made static.
15875 (the_low_target): New.
15876 * linux-ppc-low.c (num_regs): Remove.
15877 (ppc_num_regs): Define.
15878 (ppc_regmap): Renamed from regmap, made static.
15879 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15880 made static.
15881 (ppc_cannot_store_register): Renamed from cannot_store_register,
15882 made static.
15883 (the_low_target): New.
15884 * linux-s390-low.c (num_regs): Remove.
15885 (s390_num_regs): Define.
15886 (s390_regmap): Renamed from regmap, made static.
15887 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15888 made static.
15889 (s390_cannot_store_register): Renamed from cannot_store_register,
15890 made static.
15891 (the_low_target): New.
15892 * linux-sh-low.c (num_regs): Remove.
15893 (sh_num_regs): Define.
15894 (sh_regmap): Renamed from regmap, made static.
15895 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15896 made static.
15897 (sh_cannot_store_register): Renamed from cannot_store_register,
15898 made static.
15899 (the_low_target): New.
15900 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15901 (the_low_target): New.
15902
159032002-04-09 Daniel Jacobowitz <drow@mvista.com>
15904
15905 * Makefile.in: Add stamp-h target.
15906 * configure.in: Create stamp-h.
15907 * configure: Regenerated.
15908
159092002-04-09 Daniel Jacobowitz <drow@mvista.com>
15910
15911 * inferiors.c: New file.
15912 * target.c: New file.
15913 * target.h: New file.
15914 * Makefile.in: Add target.o and inferiors.o. Update
15915 dependencies.
15916 * linux-low.c (inferior_pid): New static variable,
15917 moved from server.c.
15918 (linux_create_inferior): Renamed from create_inferior.
15919 Call add_inferior. Return 0 on success instead of a PID.
15920 (linux_attach): Renamed from myattach.
15921 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15922 (linux_thread_alive): Renamed from mythread_alive.
15923 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15924 child dies.
15925 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15926 (regsets_store_inferior_registers): Correct error message.
15927 Add missing ``return 0''.
15928 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15929 (linux_store_registers): Renamed from store_inferior_registers.
15930 (linux_read_memory): Renamed from read_inferior_memory.
15931 (linux_write_memory): Renamed from write_inferior_memory.
15932 (linux_target_ops): New structure.
15933 (initialize_low): Call set_target_ops ().
15934 * remote-utils.c (unhexify): New function.
15935 (hexify): New function.
15936 (input_interrupt): Send signals to ``signal_pid''.
15937 * server.c (inferior_pid): Remove.
15938 (start_inferior): Update create_inferior call.
15939 (attach_inferior): Call add_inferior.
15940 (handle_query): New function.
15941 (main): Call handle_query for `q' packets.
15942 * server.h: Include "target.h". Remove obsolete prototypes.
15943 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15944
159452002-04-09 Daniel Jacobowitz <drow@mvista.com>
15946
15947 * Makefile.in: Add WARN_CFLAGS. Update configury
15948 dependencies.
15949 * configure.in: Check for <string.h>
15950 * configure: Regenerate.
15951 * config.in: Regenerate.
15952 * gdbreplay.c: Include needed system headers.
15953 (remote_open): Remove strchr prototype.
15954 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15955 * regcache.c (supply_register): Change buf argument to const void *.
15956 (supply_register_by_name): Likewise.
15957 (collect_register): Change buf argument to void *.
15958 (collect_register_by_name): Likewise.
15959 * regcache.h: Add missing prototypes.
15960 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15961 * server.c (handle_query): New function.
15962 (attached): New static variable, moved out of main.
15963 (main): Quiet longjmp clobber warnings.
15964 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15965 * utils.c (error): Remove NORETURN.
15966 (fatal): Likewise.