]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
gdbserver: add aarch64_create_target_description
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
d6d7ce56
AH
12017-11-24 Alan Hayward <alan.hayward@arm.com>
2
3 * configure.srv: Add new files.
4 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
5 aarch64_linux_read_description.
6 * linux-aarch64-low.c (aarch64_linux_read_description):
7 Merge with aarch64_arch_setup.
8 (aarch64_arch_setup): Call aarch64_linux_read_description.
9 * linux-aarch64-tdesc.c: New file.
10 * linux-aarch64-tdesc.h: New file.
11
506fe5f4
YQ
122017-11-24 Yao Qi <yao.qi@linaro.org>
13
14 * configure.srv: Set $srv_regobj for tic6x-linux.
15 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
16 (tic6x_read_description): Move some code to tic6x_arch_setup.
17 (tic6x_tdesc_test): New function.
18 (initialize_low_arch): Call selftests::register_test.
19
29f9a567
YQ
202017-11-22 Yao Qi <yao.qi@linaro.org>
21
22 * remote-utils.c (prepare_resume_reply): Use memcpy.
23
578290ec
SM
242017-11-19 Simon Marchi <simon.marchi@ericsson.com>
25
26 * linux-low.c (kill_one_lwp_callback): Return void, take
27 argument directly, don't filter on pid.
28 (linux_kill): Use for_each_thread.
29
eca55aec
SM
302017-11-19 Simon Marchi <simon.marchi@ericsson.com>
31
32 * linux-low.c (need_step_over_p): Return bool, remove dummy
33 argument.
34 (linux_resume, proceed_all_lwps): Use find_thread.
35
25c28b4d
SM
362017-11-19 Simon Marchi <simon.marchi@ericsson.com>
37
38 * linux-low.c (resume_status_pending_p): Return bool, remove
39 flag_p argument.
40 (linux_resume): Use find_thread.
41
5fdda392
SM
422017-11-19 Simon Marchi <simon.marchi@ericsson.com>
43
44 * linux-low.c (struct thread_resume_array): Remove.
45 (linux_set_resume_request): Return void, take arguments
46 directly.
47 (linux_resume): Use for_each_thread.
48
fcb056a5
SM
492017-11-19 Simon Marchi <simon.marchi@ericsson.com>
50
51 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
52 return bool, remove data argument.
53 (linux_stabilize_threads): Use find_thread.
54
139720c5
SM
552017-11-19 Simon Marchi <simon.marchi@ericsson.com>
56
57 * linux-low.c (unsuspend_one_lwp): Remove.
58 (unsuspend_all_lwps): Use for_each_thread, inline code from
59 unsuspend_one_lwp.
60
6d1e5673
SM
612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
62
63 * gdbthread.h (find_thread): Add overload with ptid_t filter.
64 * linux-low.c (struct iterate_over_lwps_args): Remove.
65 (iterate_over_lwps_filter): Remove.
66 (iterate_over_lwps): Use find_thread.
67
bbf550d5
SM
682017-11-19 Simon Marchi <simon.marchi@ericsson.com>
69
70 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
71 (linux_handle_new_gdb_connection): Use for_each_thread, inline
72 code from reset_lwp_ptrace_options_callback.
73
00192f77
SM
742017-11-19 Simon Marchi <simon.marchi@ericsson.com>
75
76 * linux-arm-low.c (struct update_registers_data): Remove.
77 (update_registers_callback): Return void, take arguments
78 directly, don't check thread's pid.
79 (arm_insert_point, arm_remove_point): Use for_each_thread.
80
2bee2b6c
SM
812017-11-19 Simon Marchi <simon.marchi@ericsson.com>
82
83 * win32-low.c (continue_one_thread): Return void, take argument
84 directly.
85 (child_continue): Use for_each_thread.
86
0b360f19
SM
872017-11-19 Simon Marchi <simon.marchi@ericsson.com>
88
89 * win32-i386-low.c (update_debug_registers_callback): Rename
90 to ...
91 (update_debug_registers): ... this, return void, remove pid_p arg.
92 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
93
f27866ba
SM
942017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
95
96 * inferiors.h (struct process_info): Add constructor, initialize
97 fields..
98 <syscalls_to_catch>: Change type to std::vector<int>.
99 * inferiors.c (add_process): Allocate process_info with new.
100 (remove_process): Free process_info with delete.
101 * linux-low.c (handle_extended_wait): Adjust.
102 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
103 * server.c (handle_general_set): Adjust.
104
e849ea89
PA
1052017-11-16 Pedro Alves <palves@redhat.com>
106
107 * remote-utils.c (remote_close): Block SIGIO signals instead of
108 uninstalling the SIGIO handler.
109
1d0aa65c
AH
1102017-11-16 Alan Hayward <alan.hayward@arm.com>
111
112 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
113
3491a34c
YQ
1142017-11-16 Yao Qi <yao.qi@linaro.org>
115
116 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
117 (tic6x_store_gregset): Likewise.
118 (tic6x_usrregs_info): Move it up.
119
a602f924
AH
1202017-11-15 Alan Hayward <alan.hayward@arm.com>
121
122 * Makefile.in: Update arch rules.
123 * configure.srv: Explicitly mark arch/ files.
124
5616b6c3
AS
1252017-11-13 Andreas Schwab <schwab@suse.de>
126
127 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
128 function.
129 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
130
d1928160
PA
1312017-11-06 Pedro Alves <palves@redhat.com>
132
133 * config.in, configure: Regenerate.
134
bac608e7
SM
1352017-10-27 Simon Marchi <simon.marchi@ericsson.com>
136
137 * target.c (struct thread_search): Remove.
138 (thread_search_callback): Remove.
139 (prepare_to_access_memory): Use for_each_thread instead of
140 find_inferior. Inline code from thread_search_callback.
141
eaddb425
SM
1422017-10-27 Simon Marchi <simon.marchi@ericsson.com>
143
144 * server.c (struct visit_actioned_threads_data): Remove.
145 (visit_actioned_threads): Change prototype to take arguments
146 directly.
147 (resume): Use find_thread instead of find_inferior.
148
99078d34
SM
1492017-10-27 Simon Marchi <simon.marchi@ericsson.com>
150
151 * server.c (queue_stop_reply_callback): Change prototype, return
152 void.
153 (find_status_pending_thread_callback): Remove.
154 (handle_status): Replace find_inferior with find_thread and
155 for_each_thread.
156
cc628f3d
AH
1572017-10-25 Alan Hayward <alan.hayward@arm.com>
158
159 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
160 with REGNO.
161 (aarch64_store_gregset): Likewise.
162 (aarch64_fill_fpregset): Likewise.
163 (aarch64_store_fpregset): Likewise.
164
4d3bb80e
SM
1652017-10-21 Simon Marchi <simon.marchi@ericsson.com>
166
167 * gdbthread.h (find_thread, for_each_thread): New functions.
168 * inferiors.c (thread_of_pid): Remove.
169 (find_any_thread_of_pid): Use find_thread.
170 * linux-low.c (num_lwps): Use for_each_thread.
171
7a7cdfa0
YQ
1722017-10-17 Yao Qi <yao.qi@linaro.org>
173
174 * Makefile.in: Remove one rule.
175 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
176
e675d170
YQ
1772017-10-17 Yao Qi <yao.qi@linaro.org>
178
179 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
180 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
181
7eb4e0f9
YQ
1822017-10-17 Yao Qi <yao.qi@linaro.org>
183
184 * configure.srv: Rename arm.o with arch/arm.o.
185
60d6cfc9
YQ
1862017-10-17 Yao Qi <yao.qi@linaro.org>
187
188 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
189 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
190 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
191 (arch-i386.o, arch-amd64.o): Remove rules.
192 (arch/%.o): New rule.
193 Update POSTCOMPILE and COMPILE.pre.
194 * configure.ac: Invoke AC_CONFIG_COMMANDS.
195 * configure: Re-generated.
196 * configure.srv: Replace arch-i386.o with arch/i386.o.
197 Replace arch-amd64.o with arch/amd64.o.
198
5bfda255
YQ
1992017-10-16 Yao Qi <yao.qi@linaro.org>
200
201 * configure: Regenerated.
202
9c80ecd6
SM
2032017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
204
205 * inferiors.h: (struct inferior_list): Remove.
206 (struct inferior_list_entry); Remove.
207 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
208 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
209 get_first_inferior): Remove.
210 (for_each_inferior, for_each_inferior_with_data, find_inferior,
211 find_inferior_id, find_inferior_in_random): Change signature.
212 * inferiors.c (all_threads): Change type to
213 std::list<thread_info *>.
214 (get_thread): Remove macro.
215 (find_inferior, find_inferior_id): Change signature, implement
216 using find_thread.
217 (find_inferior_in_random): Change signature, implement using
218 find_thread_in_random.
219 (for_each_inferior, for_each_inferior_with_data): Change
220 signature, implement using for_each_thread.
221 (add_inferior_to_list, remove_inferior): Remove.
222 (add_thread, get_first_thread, thread_of_pid,
223 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
224 (get_first_inferior, one_inferior_p, clear_inferior_list):
225 Remove.
226 (clear_inferiors, get_thread_process): Update.
227 * gdbthread.h: Include <list>.
228 (struct thread_info) <entry>: Remove field.
229 <id>: New field.
230 (all_threads): Change type to std::list<thread_info *>.
231 (get_first_inferior): Add doc.
232 (find_thread, for_each_thread, find_thread_in_random): New
233 functions.
234 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
235 * linux-arm-low.c (update_registers_callback): Update.
236 * linux-low.c (second_thread_of_pid_p): Update.
237 (kill_one_lwp_callback, linux_detach_lwp_callback,
238 delete_lwp_callback, status_pending_p_callback, same_lwp,
239 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
240 iterate_over_lwps, not_stopped_callback,
241 resume_stopped_resumed_lwps, count_events_callback,
242 select_singlestep_lwp_callback, select_event_lwp_callback,
243 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
244 suspend_and_send_sigstop_callback, wait_for_sigstop,
245 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
246 lwp_running, linux_set_resume_request, resume_status_pending_p,
247 need_step_over_p, start_step_over, linux_resume_one_thread,
248 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
249 reset_lwp_ptrace_options_callback): Update.
250 * linux-mips-low.c (update_watch_registers_callback): Update.
251 * regcache.c (regcache_invalidate_one, regcache_invalidate):
252 Update.
253 (free_register_cache_thread_one): Remove.
254 (regcache_release): Update.
255 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
256 handle_qxfer_threads_worker): Update.
257 (handle_query): Update, use list iterator.
258 (visit_actioned_threads, handle_pending_status,
259 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
260 clear_pending_status_callback, set_pending_status_callback,
261 find_status_pending_thread_callback, handle_status,
262 process_serial_event): Update.
263 * target.c (thread_search_callback): Update.
264 * thread-db.c (thread_db_get_tls_address): Update.
265 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
266 Update.
267 * win32-i386-low.c (update_debug_registers_callback): Update.
268 * win32-low.c (delete_thread_info, child_delete_thread,
269 continue_one_thread, suspend_one_thread,
270 get_child_debug_event): Adjust.
271
9179355e
SM
2722017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
273
274 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
275 * inferiors.h: Include <list>.
276 (struct process_info) <entry>: Remove field.
277 <pid>: New field.
278 (pid_of): Change macro to function.
279 (ptid_of, lwpid_of): Remove macro.
280 (all_processes): Change type to std::list<process_info *>.
281 (ALL_PROCESSES): Remove macro.
282 (for_each_process, find_process): New function.
283 * inferiors.c (all_processes): Change type to
284 std::list<process_info *>.
285 (find_thread_process): Adjust.
286 (add_process): Likewise.
287 (remove_process): Likewise.
288 (find_process_pid): Likewise.
289 (get_first_process): Likewise.
290 (started_inferior_callback): Remove.
291 (have_started_inferiors_p): Adjust.
292 (attached_inferior_callback): Remove.
293 (have_attached_inferiors_p): Adjust.
294 * linux-low.c (check_zombie_leaders): Likewise.
295 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
296 (x86_linux_update_xmltarget): Adjust.
297 * server.c (handle_query): Likewise.
298 (gdb_reattached_process): Remove.
299 (handle_status): Adjust.
300 (kill_inferior_callback): Likewise.
301 (detach_or_kill_inferior): Remove.
302 (print_started_pid): Likewise.
303 (print_attached_pid): Likewise.
304 (detach_or_kill_for_exit): Update.
305 (process_serial_event): Likewise.
306 * linux-arm-low.c (arm_new_fork): Likewise.
307
c9cb8905
SM
3082017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
309
310 * dll.h: Include <list>.
311 (struct dll_info): Add constructor.
312 <entry>: Remove field.
313 (all_dlls): Change type to std::list<dll_info>.
314 * dll.c: Include <algorithm>.
315 (get_dll): Remove macro.
316 (all_dlls): Change type to std::list<dll_info *>.
317 (free_one_dll): Remove.
318 (match_dll): Likewise.
319 (loaded_dll): Adjust.
320 (unloaded_dll): Adjust to all_dlls type change, use
321 std::find_if. Inline code from match_dll.
322 (clear_dlls): Adjust to all_dlls type change.
323 * server.c (emit_dll_description): Remove.
324 (handle_qxfer_libraries): Adjust to all_dlls type change,
325 integrate emit_dll_description's functionality.
326
04ec7890
SM
3272017-10-12 Simon Marchi <simon.marchi@ericsson.com>
328
329 * linux-low.h (struct linux_target_ops) <delete_process>: New
330 field.
331 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
332 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
333 (struct linux_target_ops): Add delete_process callback.
334 * linux-arm-low.c (arm_delete_process): New.
335 (struct linux_target_ops): Add delete_process callback.
336 * linux-bfin-low.c (struct linux_target_ops): Likewise.
337 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
338 * linux-m32r-low.c (struct linux_target_ops): Likewise.
339 * linux-mips-low.c (mips_linux_delete_process): New.
340 (struct linux_target_ops): Add delete_process callback.
341 * linux-ppc-low.c (struct linux_target_ops): Likewise.
342 * linux-s390-low.c (struct linux_target_ops): Likewise.
343 * linux-sh-low.c (struct linux_target_ops): Likewise.
344 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
345 * linux-tile-low.c (struct linux_target_ops): Likewise.
346 * linux-x86-low.c (x86_linux_delete_process): New.
347 (struct linux_target_ops): Add delete_process callback.
348 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
349
466eecee
SM
3502017-10-12 Simon Marchi <simon.marchi@ericsson.com>
351
352 * linux-aarch64-low.c (the_low_target): Add thread delete
353 callback.
354 * linux-arm-low.c (arm_delete_thread): New function.
355 (the_low_target): Add thread delete callback.
356 * linux-bfin-low.c (the_low_target): Likewise.
357 * linux-crisv32-low.c (the_low_target): Likewise.
358 * linux-low.c (delete_lwp): Invoke delete_thread callback if
359 set.
360 * linux-low.h (struct linux_target_ops) <delete_thread>: New
361 field.
362 * linux-m32r-low.c (the_low_target): Add thread delete callback.
363 * linux-mips-low.c (mips_linux_delete_thread): New function.
364 (the_low_target): Add thread delete callback.
365 * linux-ppc-low.c (the_low_target): Likewise.
366 * linux-s390-low.c (the_low_target): Likewise.
367 * linux-sh-low.c (the_low_target): Likewise.
368 * linux-tic6x-low.c (the_low_target): Likewise.
369 * linux-tile-low.c (the_low_target): Likewise.
370 * linux-x86-low.c (the_low_target): Likewise.
371 * linux-xtensa-low.c (the_low_target): Likewise.
372
b79f7801
YZ
3732017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
374
375 * win32-low.c: Include "common-inferior.h".
376
bc3b087d
SDJ
3772017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
378
379 * inferiors.c (set_inferior_cwd): New function.
380 * server.c (handle_general_set): Handle QSetWorkingDir packet.
381 (handle_query): Inform that QSetWorkingDir is supported.
382 * win32-low.c (create_process): Pass the inferior's cwd to
383 CreateProcess.
384
d092c5a2
SDJ
3852017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
386
387 * inferiors.c (current_inferior_cwd): New global variable.
388 (get_inferior_cwd): New function.
389 * inferiors.h (struct process_info) <cwd>: New field.
390
7da0a886
SDJ
3912017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
392
393 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
394 (OBS): Add gdb_tilde_expand.o.
395
289a6840
SM
3962017-10-02 Simon Marchi <simon.marchi@ericsson.com>
397
398 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
399 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
400
256642e8
PA
4012017-09-29 Pedro Alves <palves@redhat.com>
402
403 * ax.c (gdb_parse_agent_expr): Constify.
404 * ax.h (gdb_parse_agent_expr): Constify.
405 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
406 Constify.
407 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
408 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
409 * remote-utils.h (read_ptid): Constify.
410 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
411 (process_point_options, process_serial_event): Constify.
412 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
413 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
414 (cmd_qtbuffer): Constify.
415
5b9ca4d4
PA
4162017-09-29 Pedro Alves <palves@redhat.com>
417
418 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
419 fails.
420
94c207e0
PA
4212017-09-29 Pedro Alves <palves@redhat.com>
422
423 * linux-low.c (handle_extended_wait): Pass parent thread instead
424 of process to thread_db_notice_clone.
425 * linux-low.h (thread_db_notice_clone): Replace parent process
426 parameter with parent thread parameter.
427 * thread-db.c (find_one_thread): Add comment.
428 (thread_db_notice_clone): Replace parent process parameter with
429 parent thread parameter. Temporarily switch to the parent thread.
430
75352e28
SDJ
4312017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
432
433 * gdbthread.h: Include "common-gdbthread.h".
434 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
435 "if" when validating the ptid.
436 * remote-utils.c: Include "gdbthread.h".
437 (prepare_resume_reply): Use "switch_to_thread".
438 * target.c (done_accessing_memory): Likewise.
439
ad339634
AA
4402017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
441
442 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
443 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
444 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
445 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
446 s390x-gs-linux64-ipa.o to ipa_obj.
447 * linux-s390-low.c (HWCAP_S390_GS): New define.
448 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
449 New functions.
450 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
451 (s390_arch_setup): Check for guarded-storage support and choose
452 appropriate tdesc.
453 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
454 init_registers_s390x_gs_linux64.
455 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
456 enum value.
457 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
458 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
459
cc4d742f
SM
4602017-09-22 Simon Marchi <simon.marchi@ericsson.com>
461
462 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
463
f6327dcb
KB
4642017-09-21 Kevin Buettner <kevinb@redhat.com>
465
466 * linux-low.h (struct lwp_info): Add new field, thread_handle.
467 (thread_db_thread_handle): Declare.
468 * linux-low.c (linux_target_ops): Initialize thread_handle.
469 * server.c (handle_qxfer_threads_worker): Add support for
470 "handle" attribute.
471 * target.h (struct target_ops): Add new function pointer,
472 thread_handle.
473 (target_thread_handle): Define.
474 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
475 field in lwp.
476 (thread_db_thread_handle): New function.
477
86299109
KB
4782017-09-21 Kevin Buettner <kevinb@redhat.com>
479
480 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
481 * linux-low.h (thread_db_notice_clone): Declare.
482 * thread-db.c (thread_db_notice_clone): New function.
483
f557a88a
PA
4842017-09-21 Pedro Alves <palves@redhat.com>
485
486 * server.c (gdb_read_memory, handle_status, process_serial_event)
487 (handle_serial_event, handle_target_event): Adjust to
488 set_desired_thread prototype change.
489 * target.c (set_desired_thread): Remove 'use_general' parameter
490 and adjust.
491 * target.h (set_desired_thread): Remove 'use_general' parameter.
492
223ffa71
TT
4932017-09-20 Tom Tromey <tom@tromey.com>
494
495 * target.c (target_terminal::terminal_state): Define.
496 (target_terminal::init): Rename from target_terminal_init.
497 (target_terminal::inferior): Rename from
498 target_terminal_inferior.
499 (target_terminal::ours): Rename from target_terminal_ours.
500 (target_terminal::ours_for_output, target_terminal::info): New.
501
04fd3ba9
SM
5022017-09-16 Simon Marchi <simon.marchi@ericsson.com>
503
504 * server.c (accumulate_file_name_length): Remove.
505 (emit_dll_description): Adjust to std::string change.
506 (handle_qxfer_libraries): Use std::string to hold document.
507
5e187554
SM
5082017-09-16 Simon Marchi <simon.marchi@ericsson.com>
509
510 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
511 return type of xml_escape_text.
512 * server.c (emit_dll_description): Likewise.
513
1526853e
SM
5142017-09-16 Simon Marchi <simon.marchi@ericsson.com>
515
516 * server.c (captured_main): Accept argument for --selftest.
517 Update run_tests call.
518 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
519 when registering selftests.
520
c4dfafab
SDJ
5212017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
522
523 * regcache.c (get_thread_regcache): Update code to use "std::vector"
524 instead of "VEC" for "target_desc.reg_defs".
525 (regcache_cpy): Likewise.
526 (registers_to_string): Likewise.
527 (registers_from_string): Likewise.
528 (find_regno): Likewise.
529 (supply_regblock): Likewise.
530 (regcache_raw_read_unsigned): Likewise.
531 * tdesc.c (init_target_desc): Likewise.
532 (tdesc_create_reg): Likewise.
533 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
534 (struct target_desc) <reg_defs>: Convert to "std::vector".
535 (target_desc): Do not initialize "reg_defs".
536 (~target_desc): Update code to use "std::vector" instead of "VEC"
537 for "target_desc.reg_defs".
538 (operator==): Likewise.
539
124aceb4
SM
5402017-09-15 Simon Marchi <simon.marchi@ericsson.com>
541
542 * inferiors.h (thread_to_gdb_id): Remove.
543 * inferiors.c (thread_to_gdb_id): Remove.
544 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
545 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
546 lynx_store_registers, lynx_read_memory, lynx_write_memory):
547 Likewise.
548 * nto-low.c (nto_fetch_registers, nto_store_registers,
549 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
550
96cde54f
SM
5512017-09-15 Simon Marchi <simon.marchi@ericsson.com>
552
553 * inferiors.h (gdb_id_to_thread_id): Remove.
554 * inferiors.c (gdb_id_to_thread_id): Remove.
555 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
556 removal. Move pid declaration closer to where it's used.
557
e8ca139e
SM
5582017-09-15 Simon Marchi <simon.marchi@ericsson.com>
559
560 * server.c (handle_detach): New function.
561 (process_serial_event): Move code out, call handle_detach.
562
f8a4e119
SM
5632017-09-15 Simon Marchi <simon.marchi@ericsson.com>
564
565 * server.c (require_running): Rename to ...
566 (require_running_or_return): ... this ...
567 (require_running_or_break): ... and this.
568 (handle_query, process_serial_event): Adjust.
569
0eb0a407
SM
5702017-09-15 Simon Marchi <simon.marchi@ericsson.com>
571
572 * linux-low.c (linux_set_resume_request): Remove unused
573 variables.
574
785922a5
SM
5752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
576
577 * server.c (first_thread_of): Remove.
578 (process_serial_event): Replace usage of first_thread_of with
579 find_any_thread_of_pid.
580 * tracepoint.c (same_process_p): Remove.
581 (gdb_agent_about_to_close): Replace usage of same_process_p with
582 find_any_thread_of_pid.
583 * linux-x86-low.c (same_process_callback): Remove.
584 (x86_arch_setup_process_callback): Replace usage of
585 same_process_callback with find_any_thread_of_pid.
586 * thread-db.c (any_thread_of): Remove.
587 (switch_to_process): Replace usage of any_thread_of with
588 find_any_thread_of_pid.
589 * inferiors.c (thread_pid_matches_callback): Remove.
590 (find_thread_process): Adjust to use find_any_thread_of_pid.
591
a059f00c
SDJ
5922017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
593
594 * regcache.c (get_thread_regcache): Guard calls to "memset"
595 with "!VEC_empty".
596
cc397f3a
SDJ
5972017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
598
599 * linux-low.c (handle_extended_wait): Use
600 "allocate_target_description" instead of "XNEW".
601 * linux-x86-low.c (initialize_low_arch): Likewise.
602
22916b07
YQ
6032017-09-05 Yao Qi <yao.qi@linaro.org>
604
605 * configure.srv (srv_i386_regobj): Remove.
606 (srv_amd64_regobj): Remove.
607 (srv_regobj): Set it to "" for x86 non-linux targets.
608 * linux-x86-tdesc.c (i386_linux_read_description):
609 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
610 (init_registers_i386): Remove the declaration.
611 (tdesc_i386): Remove the declaration.
612 (lynx_i386_arch_setup): Call i386_create_target_description.
613 * nto-x86-low.c: Likewise.
614 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
615 [!__x86_64__]: include arch/i386.h.
616 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
617
38602d55
YQ
6182017-09-05 Yao Qi <yao.qi@linaro.org>
619
620 * configure.srv (srv_amd64_linux_xmlfiles): Remove
621 i386/amd64-XXX-linux from it.
622
44b886ff
YQ
6232017-09-05 Yao Qi <yao.qi@linaro.org>
624
625 * configure.srv: Empty srv_amd64_linux_regobj if $development is
626 false.
627 (ipa_amd64_linux_regobj): Remove.
628 (ipa_x32_linux_regobj): Remove.
629
b4570e4b
YQ
6302017-09-05 Yao Qi <yao.qi@linaro.org>
631
632 * Makefile.in (arch-amd64.o): New rule.
633 * configure.srv: Append arch-amd64.o.
634 * linux-amd64-ipa.c: Include common/x86-xstate.h.
635 (get_ipa_tdesc): Call amd64_linux_read_description.
636 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
637 and init_registers_amd64_XXX.
638 * linux-x86-low.c (x86_linux_read_description): Call
639 amd64_linux_read_description.
640 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
641 (initialize_low_arch): Don't call init_registers_x32_XXX and
642 init_registers_amd64_XXX.
643 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
644 and tdesc_amd64_XXX.
645 [__x86_64__] (amd64_tdesc_test): New function.
646 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
647 and init_registers_amd64_XXX.
648 * linux-x86-tdesc.c: Include arch/amd64.h.
649 (xcr0_to_tdesc_idx): New function.
650 (i386_linux_read_description): New function.
651 (amd64_get_ipa_tdesc_idx): New function.
652 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
653 (amd64_get_ipa_tdesc): Declare.
654
d1f28ea2
YQ
6552017-09-05 Yao Qi <yao.qi@linaro.org>
656
657 * configure.srv (srv_i386_linux_xmlfiles): Remove
658 i386/i386-XXX-linux.xml from it.
659
25a93583
YQ
6602017-09-05 Yao Qi <yao.qi@linaro.org>
661
662 * configure.srv: Set srv_i386_linux_regobj empty if $development
663 is false.
664 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
665 initialize_low_tdesc.
666 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
667 with #if initialize_low_tdesc.
668 * linux-x86-tdesc-selftest.c: New file.
669 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
670
5f035c07
YQ
6712017-09-05 Yao Qi <yao.qi@linaro.org>
672
673 * Makefile.in (arch-i386.o): New rule.
674 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
675 (x86_64-*-linux*): Likewise.
676 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
677 include arch/i386.h.
678 (i386_linux_read_description): Remove code and call
679 i386_create_target_description.
680 * tdesc.c (allocate_target_description): New function.
681 * tdesc.h (set_tdesc_architecture): Remove declaration.
682 (set_tdesc_osabi): Likewise.
683
0abe8a89
YQ
6842017-09-05 Yao Qi <yao.qi@linaro.org>
685
686 * linux-x86-tdesc.c: Don't include <inttypes.h>.
687 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
688 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
689 .xmltarget.
690 * server.c (get_features_xml): Call tdesc_get_features_xml.
691 * tdesc.c (set_tdesc_architecture): New function.
692 (set_tdesc_osabi): New function.
693 (tdesc_get_features_xml): New function.
694 (tdesc_create_feature): Add an argument.
695 * tdesc.h (struct target_desc) <features>: New field.
696 <arch, osabi>: New field.
697 (~target_desc): xfree features, arch, and osabi.
698 (target_desc::oerator==): Don't compare .xmltarget.
699 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
700 (set_tdesc_osabi): Likewise.
701 (tdesc_get_features_xml): Likewise.
702
0a188386
YQ
7032017-09-05 Yao Qi <yao.qi@linaro.org>
704
705 * linux-x86-tdesc.c: Include selftest.h.
706 (i386_tdesc_test): New function.
707 (initialize_low_tdesc): Call selftests::register_test.
708 * tdesc.h: Include regdef.h.
709 (target_desc): Override operator == and !=.
710
f49ff000
YQ
7112017-09-05 Yao Qi <yao.qi@linaro.org>
712
713 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
714 (ipa_obj): Likewise.
715 * linux-i386-ipa.c: Include common/x86-xstate.h
716 (get_ipa_tdesc): Call i386_linux_read_description.
717 (initialize_low_tracepoint): Don't call init_registers_XXX
718 functions, call initialize_low_tdesc instead.
719 * linux-x86-low.c (x86_linux_read_description): Call
720 i386_linux_read_description.
721 (initialize_low_arch): Don't call init_registers_i386_XXX
722 functions, call initialize_low_tdesc.
723 * linux-x86-tdesc.c: New file.
724 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
725 (i386_get_ipa_tdesc_idx): Declare.
726 (i386_get_ipa_tdesc): Declare.
727 (initialize_low_tdesc): Declare.
728
2b68ef2f
YQ
7292017-09-05 Yao Qi <yao.qi@linaro.org>
730
731 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
732 instead of 0.
733
f7000548
YQ
7342017-09-05 Yao Qi <yao.qi@linaro.org>
735
736 * Makefile.in (IPA_OBJS): Add vec-ipa.o
737 * regcache.c (get_thread_regcache): Use VEC_length.
738 (init_register_cache): Likewise.
739 (regcache_cpy): Likewise.
740 (registers_to_string): Iterate reg_defs via VEC_iterate.
741 (find_regno): Likewise.
742 (find_register_by_number): Use VEC_index.
743 (register_size): Call find_register_by_number.
744 (register_data): Call find_register_by_number.
745 (supply_regblock): Use VEC_length.
746 (regcache_raw_read_unsigned): Likewise.
747 * tdesc.c (init_target_desc): Iterate reg_defs via
748 VEC_iterate.
749 (default_description): Update initializer.
750 (copy_target_description): Don't update field num_registers.
751 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
752 <num_registers>: Remove.
753
50a421ac
SM
7542017-09-04 Simon Marchi <simon.marchi@ericsson.com>
755
756 * Makefile.in (.SECONDARY): Define target.
757
23fdd69e
SM
7582017-09-03 Simon Marchi <simon.marchi@ericsson.com>
759
760 * linux-low.c (linux_wait_1): Adjust.
761 * server.c (queue_stop_reply_callback): Adjust.
762
0a2dde4a
SDJ
7632017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
764
765 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
766 QEnvironmentUnset and QEnvironmentReset packets.
767 (handle_query): Inform remote that QEnvironmentHexEncoded,
768 QEnvironmentUnset and QEnvironmentReset are supported.
769
6afd337d
SM
7702017-08-25 Simon Marchi <simon.marchi@ericsson.com>
771
772 * inferiors.h (inferior_target_data): Rename to ...
773 (thread_target_data): ... this.
774 (inferior_regcache_data): Rename to ...
775 (thread_regcache_data): ... this.
776 (set_inferior_regcache_data): Rename to ...
777 (set_thread_regcache_data): ... this.
778 * inferiors.c (inferior_target_data): Rename to ...
779 (thread_target_data): ... this.
780 (inferior_regcache_data): Rename to ...
781 (thread_regcache_data): ... this.
782 (set_inferior_regcache_data): Rename to ...
783 (set_thread_regcache_data): ... this.
784 (free_one_thread): Update.
785 * linux-low.h (get_thread_lwp): Update.
786 * regcache.c (get_thread_regcache): Update.
787 (regcache_invalidate_thread): Update.
788 (free_register_cache_thread): Update.
789 * win32-i386-low.c (update_debug_registers_callback): Update.
790 (win32_get_current_dr): Update.
791 * win32-low.c (thread_rec): Update.
792 (delete_thread_info): Update.
793 (continue_one_thread): Update.
794 (suspend_one_thread): Update.
795
a160cc46
SM
7962017-08-24 Simon Marchi <simon.marchi@ericsson.com>
797
798 * inferiors.c (set_inferior_target_data): Remove.
799 * inferiors.h (set_inferior_target_data): Remove.
800
6d580b63
YQ
8012017-08-18 Yao Qi <yao.qi@linaro.org>
802
803 * Makefile.in (OBS): Add selftest.o.
804 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
805 * configure, config.in: Re-generated.
806 * server.c: Include common/sefltest.h.
807 (captured_main): Handle option --selftest.
808
f5a29eb0
YQ
8092017-08-09 Yao Qi <yao.qi@linaro.org>
810
811 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
812 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
813 i386-avx-mpx.o and i386-mmx.o.
814 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
815 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
816 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
817 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
818 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
819 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
820 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
821 i386/amd64-avx-mpx.xml.
822
57757c2f
YQ
8232017-08-09 Yao Qi <yao.qi@linaro.org>
824
825 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
826 and x32-avx-avx512.o.
827 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
828 i386/x32-avx-avx512.xml.
829
229d26fc
SM
8302017-07-26 Simon Marchi <simon.marchi@ericsson.com>
831
832 * tracepoint.h (enum class fast_tpoint_collect_result): New
833 enumeration.
834 (fast_tracepoint_collecting): Change return type to
835 fast_tpoint_collect_result.
836 * tracepoint.c (fast_tracepoint_collecting): Likewise.
837 * linux-low.h: Include tracepoint.h.
838 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
839 fast_tpoint_collect_result.
840 * linux-low.c (handle_tracepoints): Adjust.
841 (linux_fast_tracepoint_collecting): Change return type to
842 fast_tpoint_collect_result.
843 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
844 linux_wait_1, stuck_in_jump_pad_callback,
845 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
846 proceed_one_lwp): Adjust to type change.
847
2e1e43e1
YQ
8482017-07-10 Yao Qi <yao.qi@linaro.org>
849
850 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
851
adc764e7
YQ
8522017-06-29 Yao Qi <yao.qi@linaro.org>
853
854 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
855 Remove.
856 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
857
a206891a
SM
8582017-06-20 Simon Marchi <simon.marchi@ericsson.com>
859
860 * Makefile.in (IPA_OBJS): Sort and format one item per line.
861
9a6c7d9c
SDJ
8622017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
863
864 * linux-low.c (linux_create_inferior): Adjust code to access the
865 environment information via 'gdb_environ' class.
866 * lynx-low.c (lynx_create_inferior): Likewise.
867 * server.c (our_environ): Make it an instance of 'gdb_environ'.
868 (get_environ): Return a pointer to 'our_environ'.
869 (captured_main): Initialize 'our_environ'.
870 * server.h (get_environ): Adjust prototype.
871 * spu-low.c (spu_create_inferior): Adjust code to access the
872 environment information via 'gdb_environ' class.
873
ae3e2ccf
SM
8742017-06-17 Simon Marchi <simon.marchi@ericsson.com>
875
876 * linux-low.c (linux_read_memory, linux_write_memory): Remove
877 usage of "register" keyword.
878
3e019bdc
SM
8792017-06-17 Simon Marchi <simon.marchi@ericsson.com>
880
881 * configure: Re-generate.
882
8465943a
SM
8832017-06-17 Simon Marchi <simon.marchi@ericsson.com>
884
885 * configure: Re-generate.
886
cf0dd6f0
SM
8872017-06-17 Simon Marchi <simon.marchi@ericsson.com>
888
889 * Makefile.in (COMPILE.pre): Add "-x c++".
890
9845682b
SDJ
8912017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
892
893 * fork-child.c: Conditionally include <signal.h>.
894
aefd8b33
SDJ
8952017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
896
897 * server.c (handle_general_set): Handle new packet
898 "QStartupWithShell".
899 (handle_query): Add "QStartupWithShell" to the list of supported
900 packets.
901 (gdbserver_usage): Add help text explaining the
902 new "--startup-with-shell" and "--no-startup-with-shell" CLI
903 options.
904 (captured_main): Recognize and act upon the presence of the new
905 CLI options.
906
2090129c
SDJ
9072017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
908 Pedro Alves <palves@redhat.com>
909
910 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
911 * configure: Regenerate.
912 * configure.srv (srv_linux_obj): Add "fork-child.o" and
913 "fork-inferior.o".
914 (i[34567]86-*-lynxos*): Likewise.
915 (spu*-*-*): Likewise.
916 * fork-child.c: New file.
917 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
918 and "environ.h".
919 (linux_ptrace_fun): New function.
920 (linux_create_inferior): Adjust function prototype to reflect
921 change on "target.h". Adjust function code to use
922 "fork_inferior".
923 (linux_request_interrupt): Delete "signal_pid".
924 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
925 (lynx_ptrace_fun): New function.
926 (lynx_create_inferior): Adjust function prototype to reflect
927 change on "target.h". Adjust function code to use
928 "fork_inferior".
929 * nto-low.c (nto_create_inferior): Adjust function prototype and
930 code to reflect change on "target.h". Update comments.
931 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
932 "common-terminal.h" and "environ.h".
933 (terminal_fd): Moved to fork-child.c.
934 (old_foreground_pgrp): Likewise.
935 (restore_old_foreground_pgrp): Likewise.
936 (last_status): Make it global.
937 (last_ptid): Likewise.
938 (our_environ): New variable.
939 (startup_with_shell): Likewise.
940 (program_name): Likewise.
941 (program_argv): Rename to...
942 (program_args): ...this.
943 (wrapper_argv): New variable.
944 (start_inferior): Delete function.
945 (get_exec_wrapper): New function.
946 (get_exec_file): Likewise.
947 (get_environ): Likewise.
948 (prefork_hook): Likewise.
949 (post_fork_inferior): Likewise.
950 (postfork_hook): Likewise.
951 (postfork_child_hook): Likewise.
952 (handle_v_run): Update code to deal with arguments coming from the
953 remote host. Update calls from "start_inferior" to
954 "create_inferior".
955 (captured_main): Likewise. Initialize environment variable. Call
956 "have_job_control".
957 * server.h (post_fork_inferior): New prototype.
958 (get_environ): Likewise.
959 (last_status): Declare.
960 (last_ptid): Likewise.
961 (signal_pid): Likewise.
962 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
963 (spu_ptrace_fun): New function.
964 (spu_create_inferior): Adjust function prototype to reflect change
965 on "target.h". Adjust function code to use "fork_inferior".
966 * target.c (target_terminal_init): New function.
967 (target_terminal_inferior): Likewise.
968 (target_terminal_ours): Likewise.
969 * target.h: Include <vector>.
970 (struct target_ops) <create_inferior>: Update prototype.
971 (create_inferior): Update macro.
972 * utils.c (gdb_flush_out_err): New function.
973 * win32-low.c (win32_create_inferior): Adjust function prototype
974 and code to reflect change on "target.h".
975
043a4934
SDJ
9762017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
977
978 * inferiors.c (switch_to_thread): New function.
979
15652511
SDJ
9802017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
981
982 * Makefile.in (SFILE): Add "common/job-control.c".
983 (OBS): Add "job-control.o".
984
21ea5acd
SDJ
9852017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
986
987 * Makefile: Remove "@host_makefile_frag@".
988
e13cb306
PA
9892017-05-05 Pedro Alves <palves@redhat.com>
990
991 * configure: Regenerate.
992
c94fee56
SDJ
9932017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
994
995 * configure: Regenerate.
996
a0ff9e1a
SM
9972017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
998
999 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1000 software_single_step change of return type to
1001 std::vector<CORE_ADDR>.
1002 * linux-low.c (install_software_single_step_breakpoints):
1003 Likewise.
1004 * linux-low.h (install_software_single_step_breakpoints):
1005 Likewise.
1006
be628ab8
SDJ
10072017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1008
1009 * remote-utils.c: Include "gdb_termios.h" instead of
1010 "terminal.h".
1011 * terminal.h: Delete file.
1012
7c5ded6a
SDJ
10132017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1014
1015 * server.c: Include <vector>.
1016 <program_argv, wrapper_argv>: Convert to std::vector.
1017 (start_inferior): Rewrite function to use C++.
1018 (handle_v_run): Likewise. Update code that calculates the argv
1019 based on the vRun packet; use C++.
1020 (captured_main): Likewise.
1021
436252de
SM
10222017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1023
1024 * server.c (handle_v_cont): Initialize thread_resume::thread
1025 with null_ptid.
1026
9bf2a700
PA
10272017-04-05 Pedro Alves <palves@redhat.com>
1028
1029 * configure: Regenerate.
1030
a121b7c1
PA
10312017-04-05 Pedro Alves <palves@redhat.com>
1032
1033 * gdbreplay.c (sync_error): Constify.
1034 * linux-x86-low.c (push_opcode): Constify.
1035
21c8a587
PA
10362017-04-05 Pedro Alves <palves@redhat.com>
1037
1038 * win32-low.c (get_child_debug_event)
1039 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1040 Report TARGET_WAITKIND_SPURIOUS instead.
1041
fb32b4f7
PA
10422017-04-05 Pedro Alves <palves@redhat.com>
1043
1044 * remote-utils.c (remote_prepare, remote_open): Constify.
1045 * remote-utils.h (remote_prepare, remote_open): Constify.
1046 * server.c (captured_main): Constify 'port' handling.
1047
65dd1e59
SM
10482017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1049
1050 * Makefile.in (clean): Clear .deps.
1051
8fa5b777
SM
10522017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1053
1054 * .gitignore: Remove generated files, replace with wildcard.
1055 * (clean): Replace removal of generated files with wildcard.
1056 (version.c): Replace with...
1057 (version-generated.c): ...this.
1058 (xml-builtin.c): Replace with...
1059 (xml-builtin-generated.c): ...this.
1060 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1061 (%.c: *regformats*): Replace with...
1062 (%-generated.c: *regformats*): ...this.
1063
a12e714b
MF
10642017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1065
1066 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1067 (xtensa_fill_gregset): Call collect_register_by_name for
1068 threadptr register.
1069 (xtensa_store_gregset): Call supply_register_by_name for
1070 threadptr register.
1071
1a09b50a
MF
10722017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1073
1074 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1075 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1076 (xtensa_store_gregset): Call supply_register for all registers in
1077 a0_regnum..a0_regnum + C0_NREGS range.
1078
1a01e7c6
SM
10792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1080
1081 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1082 (ax-ipa.o: ax.c): Remove.
1083 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1084 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1085 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1086 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1087 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1088
36bc18a8
SM
10892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1090
1091 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1092 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1093 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1094 (errors-ipa.o: ../common/errors.c): Remove.
1095 (format-ipa.o: ../common/format.c): Remove.
1096 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1097
a8ebe3d5
SM
10982017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1099
1100 * Makefile.in (%-ipa.o: %.c): New rule.
1101 (tracepoint-ipa.o: tracepoint.c): Remove.
1102 (utils-ipa.o: utils.c): Remove.
1103 (remote-utils-ipa.o: remote-utils.c): Remove.
1104 (regcache-ipa.o: regcache.c): Remove.
1105 (i386-linux-ipa.o: i386-linux.c): Remove.
1106 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1107 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1108 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1109 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1110 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1111 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1112 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1113 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1114 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1115 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1116 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1117 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1118 (aarch64-ipa.o: aarch64.c): Remove.
1119 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1120 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1121 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1122 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1123 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1124 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1125 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1126 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1127 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1128 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1129 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1130 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1131 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1132 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1133 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1134 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1135 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1136 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1137 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1138 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1139 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1140 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1141 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1142 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1143 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1144 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1145 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1146 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1147 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1148 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1149 (tdesc-ipa.o: tdesc.c): Remove.
1150 (x32-linux-ipa.o: x32-linux.c): Remove.
1151 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1152 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1153
50cfacb7
SM
11542017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1155
1156 * Makefile.in (%.o: ../arch/%.c): New rule.
1157 (arm.o: ../arch/arm.c): Remove.
1158 (arm-linux.o: ../arch/arm-linux.c): Remove.
1159 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1160 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1161
c5a22423
SM
11622017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1163
1164 * Makefile.in (%.o: ../nat/%.c): New rule.
1165 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1166 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1167 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1168 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1169 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1170 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1171 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1172 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1173 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1174 (linux-personality.o: ../nat/linux-personality.c): Remove.
1175 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1176 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1177 (x86-linux.o: ../nat/x86-linux.c): Remove.
1178 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1179 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1180
6bda016b
SM
11812017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1182
1183 * Makefile.in (%.o: ../common/%.c): New rule.
1184 (signals.o: ../common/signals.c): Remove.
1185 (print-utils.o: ../common/print-utils.c): Remove.
1186 (rsp-low.o: ../common/rsp-low.c): Remove.
1187 (common-utils.o: ../common/common-utils.c): Remove.
1188 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1189 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1190 (vec.o: ../common/vec.c): Remove.
1191 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1192 (xml-utils.o: ../common/xml-utils.c): Remove.
1193 (ptid.o: ../common/ptid.c): Remove.
1194 (buffer.o: ../common/buffer.c): Remove.
1195 (format.o: ../common/format.c): Remove.
1196 (filestuff.o: ../common/filestuff.c): Remove.
1197 (agent.o: ../common/agent.c): Remove.
1198 (errors.o: ../common/errors.c): Remove.
1199 (environ.o: ../common/environ.c): Remove.
1200 (common-debug.o: ../common/common-debug.c): Remove.
1201 (cleanups.o: ../common/cleanups.c): Remove.
1202 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1203 (fileio.o: ../common/fileio.c): Remove.
1204 (common-regcache.o: ../common/common-regcache.c): Remove.
1205 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1206 (new-op.o: ../common/new-op.c): Remove.
1207 (btrace-common.o: ../common/btrace-common.c): Remove.
1208
21122961
SM
12092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1210
1211 * Makefile.in (%.o: ../target/%.c): New rule.
1212 (waitstatus.o: ../target/waitstatus.c): Remove.
1213
c362e621
SM
12142017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1215
1216 * Makefile.in
1217 (%.c: ../regformats/%.dat,
1218 (%.c: ../regformats/arm/%.dat,
1219 (%.c: ../regformats/i386/%.dat,
1220 (%.c: ../regformats/rs6000/%.dat): New rules.
1221 (aarch64.c): Remove.
1222 (reg-arm.c): Remove.
1223 (arm-with-iwmmxt.c): Remove.
1224 (arm-with-vfpv2.c): Remove.
1225 (arm-with-vfpv3.c): Remove.
1226 (arm-with-neon.c): Remove.
1227 (reg-bfin.c): Remove.
1228 (reg-cris.c): Remove.
1229 (reg-crisv32.c): Remove.
1230 (i386.c): Remove.
1231 (i386-linux.c): Remove.
1232 (i386-avx.c): Remove.
1233 (i386-avx-linux.c): Remove.
1234 (i386-avx-avx512.c): Remove.
1235 (i386-avx-avx512-linux.c): Remove.
1236 (i386-mpx.c): Remove.
1237 (i386-mpx-linux.c): Remove.
1238 (i386-avx-mpx-avx512-pku.c): Remove.
1239 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1240 (i386-avx-mpx.c): Remove.
1241 (i386-avx-mpx-linux.c): Remove.
1242 (i386-mmx.c): Remove.
1243 (i386-mmx-linux.c): Remove.
1244 (reg-ia64.c): Remove.
1245 (reg-m32r.c): Remove.
1246 (reg-m68k.c): Remove.
1247 (reg-cf.c): Remove.
1248 (mips-linux.c): Remove.
1249 (mips-dsp-linux.c): Remove.
1250 (mips64-linux.c): Remove.
1251 (mips64-dsp-linux.c): Remove.
1252 (nios2-linux.c): Remove.
1253 (powerpc-32.c): Remove.
1254 (powerpc-32l.c): Remove.
1255 (powerpc-altivec32l.c): Remove.
1256 (powerpc-cell32l.c): Remove.
1257 (powerpc-vsx32l.c): Remove.
1258 (powerpc-isa205-32l.c): Remove.
1259 (powerpc-isa205-altivec32l.c): Remove.
1260 (powerpc-isa205-vsx32l.c): Remove.
1261 (powerpc-e500l.c): Remove.
1262 (powerpc-64l.c): Remove.
1263 (powerpc-altivec64l.c): Remove.
1264 (powerpc-cell64l.c): Remove.
1265 (powerpc-vsx64l.c): Remove.
1266 (powerpc-isa205-64l.c): Remove.
1267 (powerpc-isa205-altivec64l.c): Remove.
1268 (powerpc-isa205-vsx64l.c): Remove.
1269 (s390-linux32.c): Remove.
1270 (s390-linux32v1.c): Remove.
1271 (s390-linux32v2.c): Remove.
1272 (s390-linux64.c): Remove.
1273 (s390-linux64v1.c): Remove.
1274 (s390-linux64v2.c): Remove.
1275 (s390-te-linux64.c): Remove.
1276 (s390-vx-linux64.c): Remove.
1277 (s390-tevx-linux64.c): Remove.
1278 (s390x-linux64.c): Remove.
1279 (s390x-linux64v1.c): Remove.
1280 (s390x-linux64v2.c): Remove.
1281 (s390x-te-linux64.c): Remove.
1282 (s390x-vx-linux64.c): Remove.
1283 (s390x-tevx-linux64.c): Remove.
1284 (tic6x-c64xp-linux.c): Remove.
1285 (tic6x-c64x-linux.c): Remove.
1286 (tic6x-c62x-linux.c): Remove.
1287 (reg-sh.c): Remove.
1288 (reg-sparc64.c): Remove.
1289 (reg-spu.c): Remove.
1290 (amd64.c): Remove.
1291 (amd64-linux.c): Remove.
1292 (amd64-avx.c): Remove.
1293 (amd64-avx-linux.c): Remove.
1294 (amd64-avx-avx512.c): Remove.
1295 (amd64-avx-avx512-linux.c): Remove.
1296 (amd64-mpx.c): Remove.
1297 (amd64-mpx-linux.c): Remove.
1298 (amd64-avx-mpx-avx512-pku.c): Remove.
1299 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1300 (amd64-avx-mpx.c): Remove.
1301 (amd64-avx-mpx-linux.c): Remove.
1302 (x32.c): Remove.
1303 (x32-linux.c): Remove.
1304 (x32-avx.c): Remove.
1305 (x32-avx-linux.c): Remove.
1306 (x32-avx-avx512.c): Remove.
1307 (x32-avx-avx512-linux.c): Remove.
1308 (reg-xtensa.c): Remove.
1309 (reg-tilegx.c): Remove.
1310 (reg-tilegx32.c): Remove.
1311
1672e0d9
SDJ
13122017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1313
1314 * Makefile.in (SFILES): Add "common/environ.c".
1315 (OBJS): Add "common/environ.h".
1316
239b6d10
WT
13172017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1318
1319 * configure.ac: Check if the fs_base and gs_base members of
1320 `struct user_regs_struct' exist.
1321 * config.in: Regenerated.
1322 * configure: Likewise.
1323
694b382c
AT
13242017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1325
1326 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1327 target_read_memory.
1328 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1329 (get_next_pcs_syscall_next_pc): Likewise.
1330
7dc53023
LM
13312016-12-23 Luis Machado <lgustavo@codesourcery.com>
1332
1333 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1334 * nto-x86-low.c: Likewise.
1335
ad02e4fe
SM
13362016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1337
1338 * Makefile.in: Include disable-implicit-rules.mk.
1339
dcb07cfa
PA
13402016-11-23 Pedro Alves <palves@redhat.com>
1341
1342 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1343 (debug_vprintf): Use std::chrono::steady_clock instead of
1344 gettimeofday. Use '.' instead of ':'.
1345 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1346 (get_timestamp): Use std::chrono::steady_clock instead of
1347 gettimeofday.
1348
8629c02c
SM
13492016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1350
1351 * Makefile.in: Fix whitespace formatting.
1352
b593ecca
SM
13532016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1354
1355 * Makefile.in (SFILES, OBS): Flatten list and order
1356 alphabetically.
1357
9986ba08
PA
13582016-11-23 Pedro Alves <palves@redhat.com>
1359
1360 * event-loop.c (handle_file_event): Use warning.
1361 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1362 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1363 Use warning.
1364
4eefa7bc
PA
13652016-11-23 Pedro Alves <palves@redhat.com>
1366
1367 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1368 output.
1369 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1370 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1371 debug_printf and debug_flush for debug output.
1372 * server.c (handle_general_set): Likewise.
1373 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1374 output.
1375
5443506e
SM
13762016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1377
1378 * Makefile.in (.c.o): Replace rule with ...
1379 (%.o: %.c): ... this one.
1380
3b165252
SM
13812016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1382
1383 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1384 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1385 make.
1386 * configure.ac: Remove checks for the make program.
1387 * configure: Re-generate.
1388
0bcda685
PA
13892016-10-28 Pedro Alves <palves@redhat.com>
1390
1391 * Makefile.in (CXX_DIALECT): Get from configure.
1392 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1393 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1394 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1395 * config.in: Regenerate.
1396 * configure: Regenerate.
1397
c3805894
YQ
13982016-10-27 Yao Qi <yao.qi@linaro.org>
1399
1400 * linux-low.c (linux_supports_range_stepping): Return true if
1401 can_software_single_step return true.
1402
89342618
YQ
14032016-10-27 Yao Qi <yao.qi@linaro.org>
1404
1405 * inferiors.c (find_inferior_in_random): New function.
1406 * inferiors.h (find_inferior_in_random): Declare.
1407 * linux-low.c (linux_wait_for_event_filtered): Call
1408 find_inferior_in_random instead of find_inferior.
1409
e3652c84
YQ
14102016-10-27 Yao Qi <yao.qi@linaro.org>
1411
1412 * linux-low.c (linux_wait_1): If single-step breakpoints are
1413 inserted, remove them.
1414
5a04c4cf
PA
14152016-10-26 Pedro Alves <palves@redhat.com>
1416
1417 * linux-low.c (handle_extended_wait): Link parent/child fork
1418 threads.
1419 (linux_wait_1): Unlink them.
1420 (linux_set_resume_request): Ignore resume requests for
1421 already-resumed and unhandled fork child threads.
1422 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1423 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1424 New functions.
1425 (handle_v_requests) <vCont>: Don't call require_running.
1426 * server.h (in_queued_stop_replies): New declaration.
1427
cb93dc7f
YQ
14282016-10-24 Yao Qi <yao.qi@linaro.org>
1429
1430 PR server/20733
1431 * linux-aarch64-low.c (append_insns): Cast the return value to
1432 'uint32_t *'.
1433
a1078bea
YQ
14342016-10-10 Yao Qi <yao.qi@linaro.org>
1435
1436 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1437
1fb77080
SDJ
14382016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1439
1440 * target.c (target_supports_multi_process): New function, moved
1441 from...
1442 * target.h (target_supports_multi_process): ... here. Remove
1443 macro.
1444
39b5a3b9
TT
14452016-10-05 Tom Tromey <tom@tromey.com>
1446
1447 PR remote/20655:
1448 * tracepoint.c (handle_tracepoint_bkpts): Check
1449 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1450
c1d0b70a
YQ
14512016-10-05 Yao Qi <yao.qi@linaro.org>
1452
1453 * configure.srv: Update the path of arm-*.xml files.
1454
0a69eedb
YQ
14552016-10-05 Terry Guo <terry.guo@arm.com>
1456 Yao Qi <yao.qi@linaro.org>
1457
1458 * Makefile.in: Adjust the path of rules.
1459 * configure.srv: Update the path of xml files.
1460 * regformats/arm-with-iwmmxt.dat: Regenerated.
1461 * regformats/arm-with-neon.dat: Likewise.
1462 * regformats/arm-with-vfpv2.dat: Likewise.
1463 * regformats/arm-with-vfpv3.dat Likewise.
1464
17e16485
YQ
14652016-09-30 Yao Qi <yao.qi@linaro.org>
1466
1467 PR gdbserver/20627
1468 * target.c (target_stop_and_wait): Don't call
1469 target_continue_no_signal, use resume_stop instead.
1470
edeeb602
YQ
14712016-09-26 Yao Qi <yao.qi@linaro.org>
1472
1473 * linux-low.c (linux_wait_1): Call debug_exit.
1474
503b1c39
PA
14752016-09-23 Pedro Alves <palves@redhat.com>
1476
1477 * Makefile.in (SFILES): Add common/new-op.c.
1478 (OBS): Add common/new-op.o.
1479 (new-op.o): New rule.
1480
74172ecf
SM
14812016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1482
1483 * .gitinore: Ignore more files.
1484
fc6cda2e
YQ
14852016-09-21 Yao Qi <yao.qi@linaro.org>
1486
1487 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1488 23.
1489
bc1e6c81
SDJ
14902016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1491
1492 * server.c (start_inferior): Call target_mourn_inferior instead of
1493 mourn_inferior; pass ptid_t argument to it.
1494 (resume): Likewise.
1495 (handle_target_event): Likewise.
1496 * target.c (target_mourn_inferior): New function.
1497 * target.h (mourn_inferior): Delete macro.
1498
0e00e962
AA
14992016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1500
1501 * linux-low.c (lwp_is_stepping): New function.
1502
1d8cb77d
CL
15032016-09-06 Carl Love <cel@us.ibm.com>
1504
1505 * server.c (start_inferior): Fixed comment, requested comment change
1506 didn't get updated correctly. Removed reference to ptrace () call as
1507 it is only true on Linux systems.
1508
7313bced
CL
15092016-09-06 Carl Love <cel@us.ibm.com>
1510
1511 * server.c (start_inferior): Do not call
1512 function target_post_create_inferior () if the
1513 inferior process has already exited.
1514
cf6de44d
PA
15152016-09-05 Pedro Alves <palves@redhat.com>
1516
1517 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1518 (COMPILE.pre, CC_LD): Use CXX directly.
1519 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1520 * acinclude.m4: Don't include build-with-cxx.m4.
1521 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1522 * configure: Regenerate.
1523
c1da6748
AT
15242016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1525
1526 PR gdb/19495
1527 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1528 call writing data to own_buf.
1529
f2b9e3df
SDJ
15302016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1531
1532 * target.c (mywait): Call target_wait instead of
1533 the_target->wait.
1534 (target_wait): New function.
1535
049a8570
SDJ
15362016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1537
1538 * server.c (start_inferior): New variable 'ptid'. Replace calls
1539 to the_target->resume by target_continue{,_no_signal}, depending
1540 on the case.
1541 * target.c (target_stop_and_wait): Call target_continue_no_signal
1542 instead of the_target->resume.
1543 (target_continue): New function.
1544
3aa5cfa0
AT
15452016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1546
1547 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1548
754653a7
AZ
15492016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1550
1551 PR server/20491
1552 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1553 ps_prochandle.
1554 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1555 * linux-arm-low.c (ps_get_thread_area): Likewise.
1556 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1557 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1558 * linux-mips-low.c (ps_get_thread_area): Likewise.
1559 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1560 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1561 * linux-x86-low.c (ps_get_thread_area): Likewise.
1562 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1563
ed036b40
PA
15642016-08-19 Pedro Alves <palves@redhat.com>
1565
1566 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1567
c8ef42ee
PA
15682016-08-19 Pedro Alves <palves@redhat.com>
1569
1570 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1571 comment. Use memcpy instead of casting through unsigned long.
1572
9c235a72
PA
15732016-08-19 Pedro Alves <palves@redhat.com>
1574
1575 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1576 allocating around 0x80000000.
1577
201506da
PA
15782016-08-19 Pedro Alves <palves@redhat.com>
1579
1580 PR gdb/20415
1581 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1582 (x32-avx512-linux-ipa.o): New rules.
1583 * configure.ac (x86_64-*-linux*): New x32 check.
1584 * configure.srv (ipa_x32_linux_regobj): New.
1585 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1586 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1587 descriptions.
1588 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1589 descriptions.
1590 * configure: Regenerate.
1591
f348d89a
PA
15922016-08-09 Pedro Alves <palves@redhat.com>
1593
1594 PR gdb/18653
1595 * Makefile.in (OBS): Add signals-state-save-restore.o.
1596 (signals-state-save-restore.o): New rule.
1597 * config.in: Regenerate.
1598 * configure: Regenerate.
1599 * linux-low.c: Include "signals-state-save-restore.h".
1600 (linux_create_inferior): Call
1601 restore_original_signals_state.
1602 * server.c: Include "dispositions-save-restore.h".
1603 (captured_main): Call save_original_signals_state.
1604
1baf5149
PA
16052016-08-05 Pedro Alves <palves@redhat.com>
1606
1607 * configure: Regenerate.
1608
fcd4a73d
YQ
16092016-08-04 Yao Qi <yao.qi@linaro.org>
1610
1611 * linux-low.c (regsets_fetch_inferior_registers): Check
1612 errno is ESRCH or not.
1613
979659d0
YQ
16142016-08-02 Yao Qi <yao.qi@linaro.org>
1615
1616 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1617 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1618 (thread_db_load_search): Update.
1619 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1620 td_ta_set_event and td_ta_event_getmsg.
1621
6598661d
PA
16222016-07-26 Pedro Alves <palves@redhat.com>
1623
1624 PR server/20414
1625 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1626 of unsigned long for 64-bit registers and use uint32_t instead of
1627 unsigned int for 32-bit registers.
1628
9cf12d57
PA
16292016-07-26 Pedro Alves <palves@redhat.com>
1630
1631 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1632 to 'ptrace'.
1633
305450ed
TT
16342016-07-21 Tom Tromey <tom@tromey.com>
1635
1636 * configure: Rebuild.
1637
2583da7c
YQ
16382016-07-21 Yao Qi <yao.qi@linaro.org>
1639
1640 * mem-break.c (find_gdb_breakpoint): Cast bp to
1641 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1642
21536b36
YQ
16432016-07-21 Yao Qi <yao.qi@linaro.org>
1644
1645 * server.c (handle_v_requests): Support s and S actions
1646 if target_supports_software_single_step return true.
1647
8901d193
YQ
16482016-07-21 Yao Qi <yao.qi@linaro.org>
1649
1650 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1651 is resume_step, call maybe_hw_step.
1652 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1653 and unstop them.
1654 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1655 breakpoints or not.
1656 (proceed_one_lwp): If resume request is resume_step, install
1657 reinsert breakpoints and call maybe_hw_step.
1658
0e9a339e
YQ
16592016-07-21 Yao Qi <yao.qi@linaro.org>
1660
1661 * linux-low.c (proceed_one_lwp): Declare.
1662 (linux_resume_one_thread): Remove local variable 'step'.
1663 Lift code enqueue signal. Call proceed_one_lwp instead of
1664 linux_resume_one_lwp.
1665
4281b351
YQ
16662016-07-21 Yao Qi <yao.qi@linaro.org>
1667
1668 * linux-low.c (linux_resume_one_thread): Call
1669 enqueue_pending_signal.
1670
984a2c04
YQ
16712016-07-21 Yao Qi <yao.qi@linaro.org>
1672
1673 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1674 * inferiors.c (do_restore_current_thread_cleanup): New function.
1675 (make_cleanup_restore_current_thread): Likewise.
1676 * linux-low.c (install_software_single_step_breakpoints): Call
1677 make_cleanup_restore_current_thread. Switch current_thread to
1678 thread.
1679
bec903c9
YQ
16802016-07-21 Yao Qi <yao.qi@linaro.org>
1681
1682 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1683 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1684 (clone_one_breakpoint): Likewise.
1685 (delete_reinsert_breakpoints): Change parameter to thread.
1686 Callers updated.
1687 (has_reinsert_breakpoints): Likewise.
1688 (uninsert_reinsert_breakpoints): Likewise.
1689 (reinsert_reinsert_breakpoints): Likewise.
1690 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1691 (delete_reinsert_breakpoints): Likewise.
1692 (reinsert_reinsert_breakpoints): Likewise.
1693 (uninsert_reinsert_breakpoints): Likewise.
1694 (has_reinsert_breakpoints): Likewise.
1695
63c40ec7
YQ
16962016-07-21 Yao Qi <yao.qi@linaro.org>
1697
1698 * inferiors.c (get_thread_process): Make parameter const.
1699 * inferiors.h (get_thread_process): Update declaration.
1700 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1701 Add new parameters child_thread and parent_thread. Callers
1702 updated.
1703 * mem-break.h (clone_all_breakpoints): Update declaration.
1704
9aa76cd0
YQ
17052016-07-21 Yao Qi <yao.qi@linaro.org>
1706
1707 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1708 <command_list, handler>: Remove.
1709 (struct gdb_breakpoint): New.
1710 (struct other_breakpoint): New.
1711 (struct reinsert_breakpoint): New.
1712 (is_gdb_breakpoint): New function.
1713 (any_persistent_commands): Update command_list if
1714 is_gdb_breakpoint returns true.
1715 (set_breakpoint): Create breakpoints according to their types.
1716 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1717 (set_gdb_breakpoint_1): Likewise.
1718 (set_gdb_breakpoint): Likewise.
1719 (clear_breakpoint_conditions): Change parameter type to
1720 'struct gdb_breakpoint *'.
1721 (clear_breakpoint_commands): Likewise.
1722 (clear_breakpoint_conditions_and_commands): Likewise.
1723 (add_condition_to_breakpoint): Likewise.
1724 (add_breakpoint_condition): Likewise.
1725 (add_commands_to_breakpoint): Likewise.
1726 (check_breakpoints): Check other_breakpoint.
1727 (clone_one_breakpoint): Clone breakpopint according to its type.
1728 * mem-break.h (struct gdb_breakpoint): Declare.
1729 (set_gdb_breakpoint): Update declaration.
1730 (clear_breakpoint_conditions_and_commands): Likewise.
1731 (add_breakpoint_condition): Likewise.
1732 (add_breakpoint_commands): Likewise.
1733 * server.c (process_point_options): Change parameter type to
1734 'struct gdb_breakpoint *'.
1735
811f8301
YQ
17362016-07-21 Yao Qi <yao.qi@linaro.org>
1737
1738 * mem-break.c (set_breakpoint_at): Rename it to ...
1739 (set_breakpoint_type_at): ... it.
1740 (set_breakpoint_at): Call set_breakpoint_type_at.
1741 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1742 * mem-break.h (set_breakpoint_at): Update comments.
1743
b1c51e36
CLT
17442016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1745
1746 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1747 to buf parameter.
1748 (nios2_store_gregset): Likewise.
1749
ced2dffb
PA
17502016-07-01 Pedro Alves <palves@redhat.com>
1751 Antoine Tremblay <antoine.tremblay@ericsson.com>
1752
1753 * linux-low.c: Change interface to take the target lwp_info
1754 pointer directly and return void. Handle detaching from a zombie
1755 thread.
1756 (linux_detach_lwp_callback): New function.
1757 (linux_detach): Detach from the leader thread after detaching from
1758 the clone threads.
1759
2ac09a5b
YQ
17602016-06-28 Yao Qi <yao.qi@linaro.org>
1761
1762 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1763 for variable new_offset.
1764 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1765 (aarch64_ftrace_insn_reloc_cb): Likewise.
1766 (aarch64_ftrace_insn_reloc_tb): Likewise.
1767 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1768 PRIx64 instead of PRIx32.
1769
79e7fd4f
YQ
17702016-06-28 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1773 (the_low_target): Install arm_get_syscall_trapinfo.
1774
061fc021
YQ
17752016-06-28 Yao Qi <yao.qi@linaro.org>
1776
1777 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1778 function.
1779 (the_low_target): Install aarch64_get_syscall_trapinfo.
1780
4cc32bec
YQ
17812016-06-28 Yao Qi <yao.qi@linaro.org>
1782
1783 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1784 Callers updated.
1785 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1786 Remove parameter sysno.
1787 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1788 sysret.
1789
782c1122
AA
17902016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1791
1792 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1793 (s390_emit_ne_goto): Likewise.
1794 (s390_emit_lt_goto): Likewise.
1795 (s390_emit_le_goto): Likewise.
1796 (s390_emit_gt_goto): Likewise.
1797 (s390_emit_ge_goto): Likewise.
1798 (s390x_emit_eq_goto): Likewise.
1799 (s390x_emit_ne_goto): Likewise.
1800 (s390x_emit_lt_goto): Likewise.
1801 (s390x_emit_le_goto): Likewise.
1802 (s390x_emit_gt_goto): Likewise.
1803 (s390x_emit_ge_goto): Likewise.
1804 (s390_emit_ops_impl): Mark variable static.
1805 (s390x_emit_ops): Likewise.
1806
2e7b624b
YQ
18072016-06-17 Yao Qi <yao.qi@linaro.org>
1808
1809 * linux-low.c (handle_extended_wait): Call
1810 uninsert_reinsert_breakpoints for the parent process. Remove
1811 reinsert breakpoints from the child process. Reinsert them to
1812 the parent process when vfork is done.
1813 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1814 (reinsert_reinsert_breakpoints): New function.
1815 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1816 (reinsert_reinsert_breakpoints): Declare.
1817
8a81c5d7
YQ
18182016-06-17 Yao Qi <yao.qi@linaro.org>
1819
1820 * linux-low.c (handle_extended_wait): If the parent is doing
1821 step-over, remove the reinsert breakpoints from the forked child.
1822
f50bf8e5
YQ
18232016-06-17 Yao Qi <yao.qi@linaro.org>
1824
1825 * linux-low.c (unsuspend_all_lwps): Declare.
1826 (linux_low_filter_event): If thread exited, call finish_step_over.
1827 If step-over is finished, unsuspend other threads.
1828
8376a3cb
YQ
18292016-06-17 Yao Qi <yao.qi@linaro.org>
1830
1831 * linux-low.c (linux_resume_one_lwp_throw): Assert
1832 has_reinsert_breakpoints returns false.
1833 * mem-break.c (delete_disabled_breakpoints): Assert
1834 bp type isn't reinsert_breakpoint.
1835
f79b145d
YQ
18362016-06-17 Yao Qi <yao.qi@linaro.org>
1837
1838 * linux-low.c (maybe_hw_step): New function.
1839 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1840 (finish_step_over): Switch current_thread to lwp temporarily,
1841 and assert has_reinsert_breakpoints returns true.
1842 (proceed_one_lwp): Call maybe_hw_step.
1843 * mem-break.c (has_reinsert_breakpoints): New function.
1844 * mem-break.h (has_reinsert_breakpoints): Declare.
1845
0ae534d2
JT
18462016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1847
1848 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1849
fcdad592
YQ
18502016-05-17 Yao Qi <yao.qi@linaro.org>
1851
1852 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1853 instead of find_inferior.
1854
9e784964
YQ
18552016-05-05 Yao Qi <yao.qi@linaro.org>
1856
1857 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1858 Initialize res to zero.
1859
cf2ebb6e
YQ
18602016-05-05 Yao Qi <yao.qi@linaro.org>
1861
1862 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1863 to uint32_t.
1864
c1aebf87
UW
18652016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1866
1867 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1868 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1869 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1870
35fd2deb 18712016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1872 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1873
1874 * tracepoint.c (write_inferior_int8): New function.
1875 (cmd_qtenable_disable): Write enable flag using
1876 write_inferior_int8.
1877
484b3c32
YQ
18782016-04-25 Yao Qi <yao.qi@linaro.org>
1879
1880 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1881 (need_step_over_p): Return zero if the LWP has pending signals
1882 can be delivered on software single step target.
1883
85ba7d86
YQ
18842016-04-25 Yao Qi <yao.qi@linaro.org>
1885
1886 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1887 return instead of error.
1888
3539aa13
YQ
18892016-04-22 Yao Qi <yao.qi@linaro.org>
1890
1891 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1892 to 23.
1893
5b061e98
YQ
18942016-04-22 Yao Qi <yao.qi@linaro.org>
1895
1896 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1897 signal when stepping over breakpoint with software single
1898 step.
1899
3451269c
PA
19002016-04-21 Pedro Alves <palves@redhat.com>
1901
1902 * linux-s390-low.c (s390_collect_ptrace_register)
1903 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1904 add casts.
1905 (s390_check_regset): Use void * instead of gdb_byte *.
1906
a2358508
PA
19072016-04-20 Pedro Alves <palves@redhat.com>
1908
1909 * configure: Renegerate.
1910
6885166d
YQ
19112016-04-20 Yao Qi <yao.qi@linaro.org>
1912
1913 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1914 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1915 number 16.
1916 (arm_store_gregset): Likewise.
1917
2b863f51
WT
19182016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1919
1920 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1921 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1922 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1923 (amd64-avx-mpx-linux.c): New rules.
1924 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1925 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1926 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1927 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1928 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1929 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1930 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1931 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1932 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1933 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1934 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1935 * linux-x86-low.c (x86_linux_read_description): Add case for
1936 X86_XSTATE_AVX_MPX_MASK.
1937 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1938 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1939 init_registers_i386_avx_mpx_linux.
1940 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1941 (initialize_low_tracepoint): Call
1942 init_registers_i386_avx_mpx_linux.
1943 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1944 (initialize_low_tracepoint): Call
1945 init_registers_amd64_avx_mpx_linux.
1946 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1947 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1948 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1949 declarations.
1950
9b30624b
PA
19512016-04-18 Pedro Alves <palves@redhat.com>
1952
1953 * configure: Regenerate.
1954
45e3745e
AT
19552016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1956
1957 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1958 (aarch64_emit_sub): Likewise.
1959
2afc13ff
PA
19602016-04-12 Pedro Alves <palves@redhat.com>
1961
1962 * utils.c (prepare_to_throw_exception): Delete.
1963
6e774b13
SM
19642016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1965
1966 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1967
4dca19f8
MK
19682016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1969
1970 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1971
d0a9981f
MK
19722016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1973
1974 * linux-aarch64-ipa.c: Add <elf.h> include.
1975 * linux-ppc-ipa.c: Add <elf.h> include.
1976 * linux-s390-ipa.c: Add <elf.h> include.
1977
252db07e
MK
19782016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1979
1980 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1981 (get_raw_reg_ptr): Likewise.
1982 (get_trace_state_variable_value_ptr): Likewise.
1983 (set_trace_state_variable_value_ptr): Likewise.
1984 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1985 char *.
1986
14e2b6d9
MK
19872016-03-31 Wei-cheng Wang <cole945@gmail.com>
1988 Marcin Kościelnicki <koriakin@0x04.net>
1989
1990 PR/17221
1991 * linux-ppc-low.c (emit_insns): New function.
1992 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1993 (ppc_emit_prologue): New function.
1994 (ppc_emit_epilogue): New function.
1995 (ppc_emit_add): New function.
1996 (ppc_emit_sub): New function.
1997 (ppc_emit_mul): New function.
1998 (ppc_emit_lsh): New function.
1999 (ppc_emit_rsh_signed): New function.
2000 (ppc_emit_rsh_unsigned): New function.
2001 (ppc_emit_ext): New function.
2002 (ppc_emit_zero_ext): New function.
2003 (ppc_emit_log_not): New function.
2004 (ppc_emit_bit_and): New function.
2005 (ppc_emit_bit_or): New function.
2006 (ppc_emit_bit_xor): New function.
2007 (ppc_emit_bit_not): New function.
2008 (ppc_emit_equal): New function.
2009 (ppc_emit_less_signed): New function.
2010 (ppc_emit_less_unsigned): New function.
2011 (ppc_emit_ref): New function.
2012 (ppc_emit_const): New function.
2013 (ppc_emit_reg): New function.
2014 (ppc_emit_pop): New function.
2015 (ppc_emit_stack_flush): New function.
2016 (ppc_emit_swap): New function.
2017 (ppc_emit_stack_adjust): New function.
2018 (ppc_emit_call): New function.
2019 (ppc_emit_int_call_1): New function.
2020 (ppc_emit_void_call_2): New function.
2021 (ppc_emit_if_goto): New function.
2022 (ppc_emit_goto): New function.
2023 (ppc_emit_eq_goto): New function.
2024 (ppc_emit_ne_goto): New function.
2025 (ppc_emit_lt_goto): New function.
2026 (ppc_emit_le_goto): New function.
2027 (ppc_emit_gt_goto): New function.
2028 (ppc_emit_ge_goto): New function.
2029 (ppc_write_goto_address): New function.
2030 (ppc_emit_ops_impl): New static variable.
2031 (ppc64v1_emit_prologue): New function.
2032 (ppc64v2_emit_prologue): New function.
2033 (ppc64_emit_epilogue): New function.
2034 (ppc64_emit_add): New function.
2035 (ppc64_emit_sub): New function.
2036 (ppc64_emit_mul): New function.
2037 (ppc64_emit_lsh): New function.
2038 (ppc64_emit_rsh_signed): New function.
2039 (ppc64_emit_rsh_unsigned): New function.
2040 (ppc64_emit_ext): New function.
2041 (ppc64_emit_zero_ext): New function.
2042 (ppc64_emit_log_not): New function.
2043 (ppc64_emit_bit_and): New function.
2044 (ppc64_emit_bit_or): New function.
2045 (ppc64_emit_bit_xor): New function.
2046 (ppc64_emit_bit_not): New function.
2047 (ppc64_emit_equal): New function.
2048 (ppc64_emit_less_signed): New function.
2049 (ppc64_emit_less_unsigned): New function.
2050 (ppc64_emit_ref): New function.
2051 (ppc64_emit_const): New function.
2052 (ppc64v1_emit_reg): New function.
2053 (ppc64v2_emit_reg): New function.
2054 (ppc64_emit_pop): New function.
2055 (ppc64_emit_stack_flush): New function.
2056 (ppc64_emit_swap): New function.
2057 (ppc64v1_emit_call): New function.
2058 (ppc64v2_emit_call): New function.
2059 (ppc64v1_emit_int_call_1): New function.
2060 (ppc64v2_emit_int_call_1): New function.
2061 (ppc64v1_emit_void_call_2): New function.
2062 (ppc64v2_emit_void_call_2): New function.
2063 (ppc64_emit_if_goto): New function.
2064 (ppc64_emit_eq_goto): New function.
2065 (ppc64_emit_ne_goto): New function.
2066 (ppc64_emit_lt_goto): New function.
2067 (ppc64_emit_le_goto): New function.
2068 (ppc64_emit_gt_goto): New function.
2069 (ppc64_emit_ge_goto): New function.
2070 (ppc64v1_emit_ops_impl): New static variable.
2071 (ppc64v2_emit_ops_impl): New static variable.
2072 (ppc_emit_ops): New function.
2073 (linux_low_target): Wire in ppc_emit_ops.
2074
a2174ba4
MK
20752016-03-31 Wei-cheng Wang <cole945@gmail.com>
2076 Marcin Kościelnicki <koriakin@0x04.net>
2077
2078 PR/17221
2079 * Makefile.in: Add powerpc-*-ipa.o
2080 * configure.srv: Add ipa_obj for powerpc*-linux.
2081 * linux-ppc-ipa.c: New file.
2082 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2083 includes.
2084 (PPC_FIELD): New macro.
2085 (PPC_SEXT): New macro.
2086 (PPC_OP6): New macro.
2087 (PPC_BO): New macro.
2088 (PPC_LI): New macro.
2089 (PPC_BD): New macro.
2090 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2091 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2092 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2093 (ppc_get_thread_area): New function.
2094 (is_elfv2_inferior): New function.
2095 (gen_ds_form): New function.
2096 (GEN_STD): New macro.
2097 (GEN_STDU): New macro.
2098 (GEN_LD): New macro.
2099 (GEN_LDU): New macro.
2100 (gen_d_form): New function.
2101 (GEN_ADDI): New macro.
2102 (GEN_ADDIS): New macro.
2103 (GEN_LI): New macro.
2104 (GEN_LIS): New macro.
2105 (GEN_ORI): New macro.
2106 (GEN_ORIS): New macro.
2107 (GEN_LWZ): New macro.
2108 (GEN_STW): New macro.
2109 (GEN_STWU): New macro.
2110 (gen_xfx_form): New function.
2111 (GEN_MFSPR): New macro.
2112 (GEN_MTSPR): New macro.
2113 (GEN_MFCR): New macro.
2114 (GEN_MTCR): New macro.
2115 (GEN_SYNC): New macro.
2116 (GEN_LWSYNC): New macro.
2117 (gen_x_form): New function.
2118 (GEN_OR): New macro.
2119 (GEN_MR): New macro.
2120 (GEN_LWARX): New macro.
2121 (GEN_STWCX): New macro.
2122 (GEN_CMPW): New macro.
2123 (gen_md_form): New function.
2124 (GEN_RLDICL): New macro.
2125 (GEN_RLDICR): New macro.
2126 (gen_i_form): New function.
2127 (GEN_B): New macro.
2128 (GEN_BL): New macro.
2129 (gen_b_form): New function.
2130 (GEN_BNE): New macro.
2131 (GEN_LOAD): New macro.
2132 (GEN_STORE): New macro.
2133 (gen_limm): New function.
2134 (gen_atomic_xchg): New function.
2135 (gen_call): New function.
2136 (ppc_relocate_instruction): New function.
2137 (ppc_install_fast_tracepoint_jump_pad): New function.
2138 (ppc_get_min_fast_tracepoint_insn_len): New function.
2139 (ppc_get_ipa_tdesc_idx): New function.
2140 (the_low_target): Wire in the new functions.
2141 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2142 tdescs.
2143 * linux-ppc-tdesc.h: New file.
2144
a13c4696
MK
21452016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2146
2147 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2148 (alloc_jump_pad_buffer): New function.
2149 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2150 (alloc_jump_pad_buffer): New function.
2151 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2152 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2153 (alloc_jump_pad_buffer): New function.
2154 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2155 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2156 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2157 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2158
1cda1512
MK
21592016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2160
2161 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2162 * linux-amd64-ipa.c: Likewise.
2163 * linux-i386-ipa.c: Likewise.
2164 * linux-s390-ipa.c: Likewise.
2165 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2166 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2167 set_trace_state_variable_value_ptr.
2168 (struct ipa_sym_addresses): Likewise.
2169 (symbol_list): Likewise.
2170 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2171 accessing gdb_collect directly.
2172 (gdb_collect_ptr_type): New typedef.
2173 (get_raw_reg_ptr_type): New typedef.
2174 (get_trace_state_variable_value_ptr_type): New typedef.
2175 (set_trace_state_variable_value_ptr_type): New typedef.
2176 (gdb_collect_ptr): New global.
2177 (get_raw_reg_ptr): New global.
2178 (get_trace_state_variable_value_ptr): New global.
2179 (set_trace_state_variable_value_ptr): New global.
2180 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2181 accessing get_raw_reg directly.
2182 (get_get_tsv_func_addr): Likewise for
2183 get_trace_state_variable_value_ptr.
2184 (get_set_tsv_func_addr): Likewise for
2185 set_trace_state_variable_value_ptr.
2186 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2187
72fb5488
SM
21882016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2189
2190 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2191
28170b88
MK
21922016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2193
2194 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2195 packets.
2196 (relocate_instruction): Remove own_buf.
2197 * server.c (own_buf): Make global.
2198 (handle_v_requests): Make global.
2199 * server.h (own_buf): New declaration.
2200 (handle_v_requests): New prototype.
2201
f39e8743
MK
22022016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2203
2204 PR 18377
2205 * linux-s390-low.c (add_insns): New function.
2206 (s390_emit_prologue): New function.
2207 (s390_emit_epilogue): New function.
2208 (s390_emit_add): New function.
2209 (s390_emit_sub): New function.
2210 (s390_emit_mul): New function.
2211 (s390_emit_lsh): New function.
2212 (s390_emit_rsh_signed): New function.
2213 (s390_emit_rsh_unsigned): New function.
2214 (s390_emit_ext): New function.
2215 (s390_emit_log_not): New function.
2216 (s390_emit_bit_and): New function.
2217 (s390_emit_bit_or): New function.
2218 (s390_emit_bit_xor): New function.
2219 (s390_emit_bit_not): New function.
2220 (s390_emit_equal): New function.
2221 (s390_emit_less_signed): New function.
2222 (s390_emit_less_unsigned): New function.
2223 (s390_emit_ref): New function.
2224 (s390_emit_if_goto): New function.
2225 (s390_emit_goto): New function.
2226 (s390_write_goto_address): New function.
2227 (s390_emit_litpool): New function.
2228 (s390_emit_const): New function.
2229 (s390_emit_call): New function.
2230 (s390_emit_reg): New function.
2231 (s390_emit_pop): New function.
2232 (s390_emit_stack_flush): New function.
2233 (s390_emit_zero_ext): New function.
2234 (s390_emit_swap): New function.
2235 (s390_emit_stack_adjust): New function.
2236 (s390_emit_set_r2): New function.
2237 (s390_emit_int_call_1): New function.
2238 (s390_emit_void_call_2): New function.
2239 (s390_emit_eq_goto): New function.
2240 (s390_emit_ne_goto): New function.
2241 (s390_emit_lt_goto): New function.
2242 (s390_emit_le_goto): New function.
2243 (s390_emit_gt_goto): New function.
2244 (s390_emit_ge_goto): New function.
2245 (s390x_emit_prologue): New function.
2246 (s390x_emit_epilogue): New function.
2247 (s390x_emit_add): New function.
2248 (s390x_emit_sub): New function.
2249 (s390x_emit_mul): New function.
2250 (s390x_emit_lsh): New function.
2251 (s390x_emit_rsh_signed): New function.
2252 (s390x_emit_rsh_unsigned): New function.
2253 (s390x_emit_ext): New function.
2254 (s390x_emit_log_not): New function.
2255 (s390x_emit_bit_and): New function.
2256 (s390x_emit_bit_or): New function.
2257 (s390x_emit_bit_xor): New function.
2258 (s390x_emit_bit_not): New function.
2259 (s390x_emit_equal): New function.
2260 (s390x_emit_less_signed): New function.
2261 (s390x_emit_less_unsigned): New function.
2262 (s390x_emit_ref): New function.
2263 (s390x_emit_if_goto): New function.
2264 (s390x_emit_const): New function.
2265 (s390x_emit_call): New function.
2266 (s390x_emit_reg): New function.
2267 (s390x_emit_pop): New function.
2268 (s390x_emit_stack_flush): New function.
2269 (s390x_emit_zero_ext): New function.
2270 (s390x_emit_swap): New function.
2271 (s390x_emit_stack_adjust): New function.
2272 (s390x_emit_int_call_1): New function.
2273 (s390x_emit_void_call_2): New function.
2274 (s390x_emit_eq_goto): New function.
2275 (s390x_emit_ne_goto): New function.
2276 (s390x_emit_lt_goto): New function.
2277 (s390x_emit_le_goto): New function.
2278 (s390x_emit_gt_goto): New function.
2279 (s390x_emit_ge_goto): New function.
2280 (s390_emit_ops): New function.
2281 (struct linux_target_ops): Fill in emit_ops hook.
2282
abd9baf9
MK
22832016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2284
2285 PR 18377
2286 * Makefile.in: Add s390 IPA files.
2287 * configure.srv: Build IPA for s390.
2288 * linux-s390-ipa.c: New file.
2289 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2290 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2291 (tdesc_s390_linux32): Likewise.
2292 (init_registers_s390_linux32v1): Likewise.
2293 (tdesc_s390_linux32v1): Likewise.
2294 (init_registers_s390_linux32v2): Likewise.
2295 (tdesc_s390_linux32v2): Likewise.
2296 (init_registers_s390_linux64): Likewise.
2297 (tdesc_s390_linux64): Likewise.
2298 (init_registers_s390_linux64v1): Likewise.
2299 (tdesc_s390_linux64v1): Likewise.
2300 (init_registers_s390_linux64v2): Likewise.
2301 (tdesc_s390_linux64v2): Likewise.
2302 (init_registers_s390_te_linux64): Likewise.
2303 (tdesc_s390_te_linux64): Likewise.
2304 (init_registers_s390_vx_linux64): Likewise.
2305 (tdesc_s390_vx_linux64): Likewise.
2306 (init_registers_s390_tevx_linux64): Likewise.
2307 (tdesc_s390_tevx_linux64): Likewise.
2308 (init_registers_s390x_linux64): Likewise.
2309 (tdesc_s390x_linux64): Likewise.
2310 (init_registers_s390x_linux64v1): Likewise.
2311 (tdesc_s390x_linux64v1): Likewise.
2312 (init_registers_s390x_linux64v2): Likewise.
2313 (tdesc_s390x_linux64v2): Likewise.
2314 (init_registers_s390x_te_linux64): Likewise.
2315 (tdesc_s390x_te_linux64): Likewise.
2316 (init_registers_s390x_vx_linux64): Likewise.
2317 (tdesc_s390x_vx_linux64): Likewise.
2318 (init_registers_s390x_tevx_linux64): Likewise.
2319 (tdesc_s390x_tevx_linux64): Likewise.
2320 (have_hwcap_s390_vx): New static variable.
2321 (s390_arch_setup): Fill have_hwcap_s390_vx.
2322 (s390_get_thread_area): New function.
2323 (s390_ft_entry_gpr_esa): New const.
2324 (s390_ft_entry_gpr_zarch): New const.
2325 (s390_ft_entry_misc): New const.
2326 (s390_ft_entry_fr): New const.
2327 (s390_ft_entry_vr): New const.
2328 (s390_ft_main_31): New const.
2329 (s390_ft_main_64): New const.
2330 (s390_ft_exit_fr): New const.
2331 (s390_ft_exit_vr): New const.
2332 (s390_ft_exit_misc): New const.
2333 (s390_ft_exit_gpr_esa): New const.
2334 (s390_ft_exit_gpr_zarch): New const.
2335 (append_insns): New function.
2336 (s390_relocate_instruction): New function.
2337 (s390_install_fast_tracepoint_jump_pad): New function.
2338 (s390_get_min_fast_tracepoint_insn_len): New function.
2339 (s390_get_ipa_tdesc_idx): New function.
2340 (struct linux_target_ops): Wire in the above functions.
2341 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2342 * linux-s390-tdesc.h: New file.
2343
a4105d04
MK
23442016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2345
2346 * linux-s390-low.c (s390_supports_tracepoints): New function.
2347 (struct linux_target_ops): Fill supports_tracepoints hook.
2348
35ac8b3e
YQ
23492016-03-18 Yao Qi <yao.qi@linaro.org>
2350
2351 * linux-low.c (lwp_signal_can_be_delivered): New function.
2352 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2353
94610ec4
YQ
23542016-03-18 Yao Qi <yao.qi@linaro.org>
2355
2356 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2357 0 if signal is enqueued. Remove 'signal' from one debugging
2358 message. Move one debugging message to some lines below.
2359 Remove code setting 'signal' to 0.
2360
80aea927
YQ
23612016-03-18 Yao Qi <yao.qi@linaro.org>
2362
2363 * linux-low.c (linux_low_filter_event): Remove redundant
2364 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2365
b04fd3be
MK
23662016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2367
2368 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2369 (struct linux_target_ops): Wire in the above.
2370
c40c8d4b
YQ
23712016-03-03 Yao Qi <yao.qi@linaro.org>
2372
2373 * linux-low.c: Update comments to start_step_over.
2374
0f8288ae
YQ
23752016-03-03 Yao Qi <yao.qi@linaro.org>
2376
2377 PR server/19736
2378 * linux-low.c (handle_extended_wait): Set child suspended
2379 if event_lwp->bp_reinsert isn't zero.
2380
fdbd04a8
YQ
23812016-03-02 Yao Qi <yao.qi@linaro.org>
2382
2383 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2384 enqueue_pending_signal.
2385
6896a8fa
MK
23862016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2387
2388 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2389 is actually loaded.
2390
ab503087
MK
23912016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2392
2393 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2394 (s390_regmap_3264) [!__s390x__]: New global.
2395 (s390_collect_ptrace_register): Skip map entries containing -1.
2396 (s390_supply_ptrace_register): Ditto.
2397 (s390_fill_gprs_high): New function.
2398 (s390_store_gprs_high): New function.
2399 (s390_regsets): Add NT_S390_HIGH_GPRS.
2400 (s390_get_hwcap): Enable on 31-bit.
2401 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2402 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2403 Detect NT_S390_HIGH_GPRS.
2404 (s390_usrregs_info_3264): Enable on 31-bit.
2405 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2406 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2407
ae91f625
MK
24082016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2409
2410 PR gdb/13808
2411 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2412 * configure.srv: Ditto.
2413 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2414 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2415 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2416 (init_registers_amd64_linux): Remove prototype.
2417 (tdesc_amd64_linux): Remove declaration.
2418 (get_ipa_tdesc): New function.
2419 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2420 initialize remaining tdescs.
2421 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2422 (init_registers_i386_linux): Remove prototype.
2423 (tdesc_i386_linux): Remove declaration.
2424 (get_ipa_tdesc): New function.
2425 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2426 initialize remaining tdescs.
2427 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2428 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2429 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2430 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2431 (x86_get_ipa_tdesc_idx): New function.
2432 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2433 * linux-x86-tdesc.h: New file.
2434 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2435 (target_get_ipa_tdesc_idx): New macro.
2436 * tracepoint.c (ipa_tdesc_idx): New macro.
2437 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2438 (symbol_list): Add ipa_tdesc_idx.
2439 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2440 (ipa_tdesc): Remove.
2441 (ipa_tdesc_idx): New variable.
2442 (get_context_regcache): Use get_ipa_tdesc.
2443 (gdb_collect): Ditto.
2444 (gdb_probe): Ditto.
2445 * tracepoint.h (get_ipa_tdesc): New prototype.
2446 (ipa_tdesc): Remove.
2447
e7ad2f14
PA
24482016-02-24 Pedro Alves <palves@redhat.com>
2449
2450 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2451 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2452 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2453 Factor out common code between the USE_SIGTRAP_SIGINFO and
2454 !USE_SIGTRAP_SIGINFO blocks.
2455 (linux_low_filter_event): Call save_stop_reason instead of
2456 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2457 Update comments.
2458 (linux_wait_1): Update comments.
2459
657f9cde
WW
24602016-02-24 Wei-cheng Wang <cole945@gmail.com>
2461
2462 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2463 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2464 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2465 ppc_insert_point, ppc_remove_point.
2466
b00b61e1
MK
24672016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2468
2469 * linux-s390-low.c (s390_supports_z_point_type): New function.
2470 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2471
553cb527
YQ
24722016-02-16 Yao Qi <yao.qi@linaro.org>
2473
2474 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2475 PC. Get pc from regcache_read_pc.
2476
a5652c21
YQ
24772016-02-12 Yao Qi <yao.qi@linaro.org>
2478
2479 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2480 or linux_get_pc_32bit.
2481 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2482
ed443b61
YQ
24832016-02-12 Yao Qi <yao.qi@linaro.org>
2484
2485 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2486 arm_linux_get_next_pcs_fixup.
2487
020ecd38
MK
24882016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2489
2490 * tracepoint.c (x_tracepoint_action_download): Change
2491 write_inferior_data_ptr to write_inferior_data_pointer.
2492 (cmd_qtstart): Likewise.
2493 (write_inferior_data_ptr): Remove.
2494 (download_agent_expr): Change write_inferior_data_ptr to
2495 write_inferior_data_pointer.
2496 (download_tracepoint_1): Likewise.
2497 (download_tracepoint): Likewise.
2498 (download_trace_state_variables): Likewise.
2499
7cae9051
WW
25002016-02-11 Wei-cheng Wang <cole945@gmail.com>
2501 Marcin Kościelnicki <koriakin@0x04.net>
2502
2503 * tracepoint.c (struct tracepoint_action_ops): Remove.
2504 (struct tracepoint_action): Remove ops.
2505 (m_tracepoint_action_download, r_tracepoint_action_download)
2506 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2507 size and offset accordingly.
2508 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2509 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2510 (tracepoint_action_send, tracepoint_action_download): New functions.
2511 Helpers for trace action handlers.
2512 (add_tracepoint_action): Remove setup actions ops.
2513 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2514
9f6a71b4
YQ
25152016-02-10 Yao Qi <yao.qi@linaro.org>
2516
2517 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2518
1e94266c
SM
25192016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2520
2521 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2522 to AC_OUTPUT.
2523 * configure: Regenerate.
2524
8adce034
SM
25252016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2526
2527 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2528 void * to gdb_byte *.
2529 * linux-low.c (siginfo_fixup): Likewise.
2530 (linux_xfer_siginfo): Likewise.
2531 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2532 Likewise.
2533 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2534
93813b37
WT
25352016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2536
2537 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2538 to srv_tgtobj.
2539 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2540 to srv_tgtobj.
2541 * linux-x86-low.c [__x86_64__]: Include
2542 "nat/amd64-linux-siginfo.h".
2543 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2544 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2545 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2546 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2547 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2548 (cpt_si_fd, si_timerid, si_overrun): Move from
2549 nat/amd64-linux-siginfo.c.
2550 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2551
8424cc97
SM
25522016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2553
2554 * server.c (skip_to_semicolon): Remove.
2555 (process_point_options): Use strchrnul instead of
2556 skip_to_semicolon.
2557
4d18591b
YQ
25582016-01-26 Yao Qi <yao.qi@linaro.org>
2559
2560 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2561 * linux-low.c (install_software_single_step_breakpoints): Don't
2562 call regcache_read_pc.
2563 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2564 argument pc.
2565
d8020970
YQ
25662016-01-26 Yao Qi <yao.qi@linaro.org>
2567
2568 * linux-low.c (install_software_single_step_breakpoints): Call
2569 regcache_read_pc instead of get_pc.
2570
8b207339
YQ
25712016-01-26 Yao Qi <yao.qi@linaro.org>
2572
2573 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2574 (unblock_async_io): Rename to ...
2575 (block_unblock_async_io): ... it. New function.
2576 (enable_async_io): Don't install SIGIO handler. Unblock it
2577 instead.
2578 (disable_async_io): Don't ignore SIGIO. Block it instead.
2579 (initialize_async_io): Install SIGIO handler. Don't call
2580 unblock_async_io.
2581
18879fef
YQ
25822016-01-26 Yao Qi <yao.qi@linaro.org>
2583
2584 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2585 first character is '\003', call *the_target->request_interrupt.
2586
a0f8e08a
YQ
25872016-01-25 Yao Qi <yao.qi@linaro.org>
2588
2589 * remote-utils.c (new_thread_notify): Remove.
2590 (dead_thread_notify): Likewise.
2591 * remote-utils.h (new_thread_notify): Remove declaration.
2592 (dead_thread_notify): Likewise.
2593
cc5fd9ab
MK
25942016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2595
2596 * gdb.trace/pending.exp: Fix expected message on continue.
2597
99e8eb11
MK
25982016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2599
2600 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2601 it works properly on big-endian machines where sizeof (CORE_ADDR)
2602 != sizeof (void *).
2603
a994041d
PA
26042016-01-21 Pedro Alves <palves@redhat.com>
2605
2606 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2607 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2608 * configure: Regenerate.
2609
f7a6a40d
YQ
26102016-01-21 Yao Qi <yao.qi@linaro.org>
2611
2612 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2613 is_thumb and set it according to CPSR saved on the stack.
2614 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2615 arm_sigreturn_next_pc.
2616
6f69e520
YQ
26172016-01-18 Yao Qi <yao.qi@linaro.org>
2618
2619 * linux-low.c (linux_set_pc_64bit): New function.
2620 (linux_get_pc_64bit): New function.
2621 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2622 Declare.
2623 * linux-sparc-low.c (debug_threads): Remove declaration.
2624 (sparc_get_pc): Remove.
2625 (the_low_target): Use linux_get_pc_64bit instead of
2626 sparc_get_pc.
2627 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2628 (the_low_target): Use linux_get_pc_64bit and
2629 linux_set_pc_64bit.
2630
276d4552
YQ
26312016-01-18 Yao Qi <yao.qi@linaro.org>
2632
2633 * linux-arm-low.c (debug_threads): Remove declaration.
2634 (arm_get_pc, arm_set_pc): Remove.
2635 (the_low_target): Use linux_get_pc_32bit and
2636 linux_set_pc_32bit.
2637 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2638 (the_low_target): Use linux_get_pc_32bit and
2639 linux_set_pc_32bit.
2640 * linux-cris-low.c (debug_threads): Remove declaration.
2641 (cris_get_pc, cris_set_pc,): Remove.
2642 (the_low_target): Use linux_get_pc_32bit and
2643 linux_set_pc_32bit.
2644 * linux-crisv32-low.c (debug_threads): Remove declaration.
2645 (cris_get_pc, cris_set_pc): Remove.
2646 (the_low_target): Use linux_get_pc_32bit and
2647 linux_set_pc_32bit.
2648 * linux-low.c: Include inttypes.h.
2649 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2650 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2651 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2652 (the_low_target): Use linux_get_pc_32bit and
2653 linux_set_pc_32bit.
2654 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2655 (the_low_target): Use linux_get_pc_32bit and
2656 linux_set_pc_32bit.
2657 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2658 (the_low_target): Use linux_get_pc_32bit and
2659 linux_set_pc_32bit.
2660 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2661 (the_low_target): Use linux_get_pc_32bit and
2662 linux_set_pc_32bit.
2663 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2664 (the_low_target): Use linux_get_pc_32bit and
2665 linux_set_pc_32bit.
2666
eb0edac8
GB
26672016-01-18 Gary Benson <gbenson@redhat.com>
2668
2669 * configure.ac (AC_FUNC_FORK): New check.
2670 * config.in: Regenerate.
2671 * configure: Likewise.
2672
1b451dda
YQ
26732016-01-14 Yao Qi <yao.qi@linaro.org>
2674
2675 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2676 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2677 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2678 arm_get_next_pcs_ctor.
2679
82075af2
JS
26802016-01-12 Josh Stone <jistone@redhat.com>
2681 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2682
2683 * inferiors.h: Include "gdb_vecs.h".
2684 (struct process_info): Add syscalls_to_catch.
2685 * inferiors.c (remove_process): Free syscalls_to_catch.
2686 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2687 syscall_return stops.
2688 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2689 * server.c (handle_general_set): Handle QCatchSyscalls.
2690 (handle_query): Report support for QCatchSyscalls.
2691 * target.h (struct target_ops): Add supports_catch_syscall.
2692 (target_supports_catch_syscall): New macro.
2693 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2694 (struct lwp_info): Add syscall_state.
2695 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2696 Maintain syscall_state and syscalls_to_catch across exec.
2697 (get_syscall_trapinfo): New function, proxy to the_low_target.
2698 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2699 (linux_low_filter_event): Toggle syscall_state entry/return for
2700 syscall traps, and set it ignored for all others.
2701 (gdb_catching_syscalls_p): New function.
2702 (gdb_catch_this_syscall_p): New function.
2703 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2704 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2705 (linux_supports_catch_syscall): New function.
2706 (linux_target_ops): Install it.
2707 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2708 (the_low_target): Install it.
2709
8f13a3ce
MF
27102016-01-12 Mike Frysinger <vapier@gentoo.org>
2711
2712 * acinclude.m4: Include new ../warning.m4 file.
2713 * configure: Regenerated.
2714 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2715
5b3da067
MF
27162016-01-12 Mike Frysinger <vapier@gentoo.org>
2717
2718 * ax.c (is_goto_target): Mark static.
2719 * linux-low.c (register_addr): Likewise.
2720 (linux_fetch_registers, linux_store_registers): Likewise.
2721 * mem-break.c (any_persistent_commands): Fix old prototype.
2722 (add_commands_to_breakpoint): Mark static.
2723 * regcache.c (find_register_by_name): Delete unused func.
2724 * remote-utils.c (hex_or_minus_one): Mark static.
2725 * server.c (monitor_show_help): Mark static.
2726 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2727 handle_v_requests): Likewise.
2728
bc504a31
PA
27292016-01-12 Pedro Alves <palves@redhat.com>
2730
2731 Remove use of the registered trademark symbol throughout.
2732
5a0dd67a
YQ
27332016-01-08 Yao Qi <yao.qi@linaro.org>
2734
2735 * remote-utils.c (getpkt): If c is '\003', call target hook
2736 request_interrupt.
2737
b2ca446f
YQ
27382016-01-06 Yao Qi <yao.qi@linaro.org>
2739
2740 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2741 linux-aarch32-low.c.
2742 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2743 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2744 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2745 (thumb2_breakpoint): Declare.
2746 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2747 linux-aarch32-low.h.
2748 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2749 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2750 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2751
edd88788
JB
27522016-01-01 Joel Brobecker <brobecker@adacore.com>
2753
2754 * gdbreplay.c (gdbreplay_version): Change copyright year in
2755 version message.
2756 * server.c (gdbserver_version): Likewise.
2757
65da7f14
PP
27582015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2759
2760 * server.c (crc32_table): Delete.
2761 (crc32): Use libiberty's xcrc32 function.
2762
4abd5ed2
JB
27632015-12-22 Joel Brobecker <brobecker@adacore.com>
2764
2765 * lynx-low.c (lynx_delete_thread_callback): New function.
2766 (lynx_mourn): Properly delete our process and all of its
2767 threads. Remove call to clear_inferiors.
2768
0e50fe5c
JB
27692015-12-22 Joel Brobecker <brobecker@adacore.com>
2770
2771 * target.c (thread_search_callback): Add check that
2772 the thread_stopped target callback is not NULL before
2773 calling it.
2774
35adc03f
YQ
27752015-12-21 Yao Qi <yao.qi@linaro.org>
2776
2777 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2778 arm breakpoint.
2779
bd2b2909
AT
27802015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2781
2782 * server.c (handle_query): Call target_supports_software_single_step.
2783
7fe5e27e
AT
27842015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2785
2786 * linux-low.c (single_step): New function.
2787 (linux_resume_one_lwp_throw): Call single_step.
2788 (start_step_over): Likewise.
2789
d9311bfa
AT
27902015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2791
2792 * Makefile.in (SFILES): Append arch/arm-linux.c,
2793 arch/arm-get-next-pcs.c.
2794 (arm-linux.o): New rule.
2795 (arm-get-next-pcs.o): New rule.
2796 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2797 arm-linux.o.
2798 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2799 to linux-aarch32-low.c.
2800 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2801 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2802 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2803 (thumb2_breakpoint_len): Likewise.
2804 (arm_is_thumb_mode): Make non-static.
2805 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2806 from linux-aarch32-low.c.
2807 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2808 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2809 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2810 (thumb2_breakpoint_len): Likewise.
2811 (arm_is_thumb_mode): New declaration.
2812 * linux-arm-low.c: Include arch/arm-linux.h
2813 aarch/arm-get-next-pcs.h, sys/syscall.h.
2814 (get_next_pcs_ops): New struct.
2815 (get_next_pcs_addr_bits_remove): New function.
2816 (get_next_pcs_is_thumb): New function.
2817 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2818 (arm_sigreturn_next_pc): Likewise.
2819 (get_next_pcs_syscall_next_pc): Likewise.
2820 (arm_gdbserver_get_next_pcs): Likewise.
2821 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2822 Initialize.
2823 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2824 * server.h: Include gdb_vecs.h.
2825
68ce2059
AT
28262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2827
2828 * Makefile.in (SFILES): Append common/common-regcache.c.
2829 (OBS): Append common-regcache.o.
2830 (common-regcache.o): New rule.
2831 * regcache.c (init_register_cache): Initialize cache to
2832 REG_UNAVAILABLE.
2833 (regcache_raw_read_unsigned): New function.
2834 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2835 register_status enum.
2836
fa5308bd
AT
28372015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2838
2839 * linux-aarch64-low.c (the_low_targets): Rename
2840 breakpoint_reinsert_addr to get_next_pcs.
2841 * linux-arm-low.c (the_low_targets): Likewise.
2842 * linux-bfin-low.c (the_low_targets): Likewise.
2843 * linux-cris-low.c (the_low_targets): Likewise.
2844 * linux-crisv32-low.c (the_low_targets): Likewise.
2845 * linux-low.c (can_software_single_step): Likewise.
2846 (install_software_single_step_breakpoints): New function.
2847 (start_step_over): Use install_software_single_step_breakpoints.
2848 * linux-low.h: New CORE_ADDR vector.
2849 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2850 get_next_pcs.
2851 * linux-mips-low.c (the_low_targets): Likewise.
2852 * linux-nios2-low.c (the_low_targets): Likewise.
2853 * linux-sparc-low.c (the_low_targets): Likewise.
2854
4a6ed09b
PA
28552015-12-17 Pedro Alves <palves@redhat.com>
2856
2857 * linux-low.c (linux_kill_one_lwp): Remove references to
2858 LinuxThreads.
2859 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2860 to 'kill'.
2861 (linux_init_signals): Delete.
2862 (initialize_low): Adjust.
2863 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2864
7544db95
PA
28652015-12-16 Pedro Alves <palves@redhat.com>
2866
2867 * configure.ac (compiler warning flags): When testing a
2868 -Wno-foo option, check whether -Wfoo works instead.
2869 * configure: Regenerate.
2870
8020350c
DB
28712015-12-11 Don Breazeal <donb@codesourcery.com>
2872
2873 * server.c (process_serial_event): Don't exit from gdbserver
2874 in remote mode if there are still active inferiors.
2875
db91f502
YQ
28762015-12-11 Yao Qi <yao.qi@linaro.org>
2877
2878 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2879 arm_breakpoint_at if the process is 32-bit.
2880
b37a6290
YQ
28812015-12-11 Yao Qi <yao.qi@linaro.org>
2882
2883 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2884 arm breakpoint.
2885
17b1509a
YQ
28862015-12-07 Yao Qi <yao.qi@linaro.org>
2887
2888 * configure.srv: Append arm.o to srv_tgtobj for
2889 aarch64*-*-linux* target.
2890 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2891 from linux-arm-low.c.
2892 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2893 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2894 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2895 (thumb2_breakpoint_len): Likewise.
2896 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2897 (arm_breakpoint_kinds): Likewise.
2898 (arm_breakpoint_kind_from_pc): Likewise.
2899 (arm_sw_breakpoint_from_kind): Likewise.
2900 (arm_breakpoint_kind_from_current_state): Likewise.
2901 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2902 (arm_sw_breakpoint_from_kind): Declare.
2903 (arm_breakpoint_kind_from_current_state): Declare.
2904 (arm_breakpoint_at): Declare.
2905 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2906 arm_sw_breakpoint_from_kind if process is 32-bit.
2907 (aarch64_breakpoint_kind_from_pc): New function.
2908 (aarch64_breakpoint_kind_from_current_state): New function.
2909 (the_low_target): Initialize fields breakpoint_kind_from_pc
2910 and breakpoint_kind_from_current_state.
2911 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2912 linux-aarch32-low.c.
2913 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2914 (arm_breakpoint, arm_breakpoint_len): Likewise.
2915 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2916 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2917 (arm_is_thumb_mode): Likewise.
2918 (arm_breakpoint_at): Likewise.
2919 (arm_breakpoint_kind_from_pc): Likewise.
2920 (arm_sw_breakpoint_from_kind): Likewise.
2921 (arm_breakpoint_kind_from_current_state): Likewise.
2922
2923 Revert:
2924 2015-08-04 Yao Qi <yao.qi@linaro.org>
2925
2926 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2927 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2928 * server.c (extended_protocol): Remove "static".
2929 * server.h (extended_protocol): Declare it.
2930
ece66d65
JS
29312015-12-04 Josh Stone <jistone@redhat.com>
2932
2933 * target.h (struct target_ops) <arch_setup>: Rename to ...
2934 (struct target_ops) <post_create_inferior>: ... this.
2935 (target_arch_setup): Rename to ...
2936 (target_post_create_inferior): ... this, calling post_create_inferior.
2937 * server.c (start_inferior): Update target_arch_setup calls to
2938 target_post_create_inferior.
2939 * linux-low.c (linux_low_ptrace_options): Forward declare.
2940 (linux_arch_setup): Update its comment for general use.
2941 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2942 (struct linux_target_ops): Use linux_post_create_inferior.
2943 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2944 to post_create_inferior.
2945 * nto-low.c (struct nto_target_ops): Likewise.
2946 * spu-low.c (struct spu_target_ops): Likewise.
2947 * win32-low.c (struct win32_target_ops): Likewise.
2948
e58c48b4
AT
29492015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2950
2951 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2952
fbec8956
AT
29532015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2954
2955 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2956 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2957 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2958 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2959 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2960 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2961 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2962 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2963 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2964 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2965 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2966 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2967
9b4c5f87
AT
29682015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2969
2970 * linux-low.c (linux_look_up_symbols): Don't call
2971 linux_supports_traceclone.
2972 * linux-low.h (thread_db_init): Remove use_events argument.
2973 * thread-db.c (thread_db_use_event): Remove global variable.
2974 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2975 (struct thread_db) <td_create_bp>: Remove field.
2976 (thread_db_create_event): Remove function.
2977 (thread_db_enable_reporting): Likewise.
2978 (find_one_thread): Don't check for thread_db_use_events.
2979 (attach_thread): Likewise.
2980 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2981 (try_thread_db_load_1): Don't check for thread_db_use_events.
2982 (thread_db_init): Remove use_events argument and thread events
2983 handling.
2984 (remove_thread_event_breakpoints): Remove function.
2985 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2986
7d00775e
AT
29872015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2988
2989 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2990 New function.
2991 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2992 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2993 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2994 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2995 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2996 Initialize.
2997 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2998 New function.
2999 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3000 * linux-low.c (can_hardware_single_step): Use
3001 supports_hardware_single_step.
3002 (can_software_single_step): New function.
3003 (start_step_over): Call can_software_single_step.
3004 (linux_supports_hardware_single_step): New function.
3005 (struct target_ops) <supports_software_single_step>: Initialize.
3006 * linux-low.h (struct linux_target_ops)
3007 <supports_hardware_single_step>: Initialize.
3008 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3009 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3010 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3011 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3012 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3013 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3014 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3015 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3016 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3017 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3018 Initialize.
3019 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3020 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3021 Initialize.
3022 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3023 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3024 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3025 New function.
3026 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3027 * target.h (struct target_ops): <supports_software_single_step>:
3028 New field.
3029 (target_supports_software_single_step): New macro.
3030
2d97cd35
AT
30312015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3032
3033 * linux-low.c (linux_wait_1): Fix pc advance condition.
3034 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3035 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3036
769ef81f
AT
30372015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3038
3039 * linux-arm-low.c (arm_is_thumb_mode): New function.
3040 (arm_breakpoint_at): Use arm_is_thumb_mode.
3041 (arm_breakpoint_kind_from_current_state): New function.
3042 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3043 Initialize.
3044 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3045 (linux_breakpoint_kind_from_current_state): New function.
3046 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3047 * linux-low.h (struct linux_target_ops)
3048 <breakpoint_kind_from_current_state>: New field.
3049 * target.h (struct target_ops): Likewise.
3050 (target_breakpoint_kind_from_current_state): New macro.
3051
1bebeeca
PA
30522015-11-30 Pedro Alves <palves@redhat.com>
3053
3054 * linux-low.c (linux_resume): Wake up the event loop before
3055 returning.
3056
a67a9fae
PA
30572015-11-30 Pedro Alves <palves@redhat.com>
3058
3059 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3060 check.
3061 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3062 to -1.
3063 * target.c (struct thread_search): New structure.
3064 (thread_search_callback): New function.
3065 (prev_general_thread): New global.
3066 (prepare_to_access_memory, done_accessing_memory): New functions.
3067 * target.h (prepare_to_access_memory, done_accessing_memory):
3068 Replace macros with function declarations.
3069
f2faf941
PA
30702015-11-30 Pedro Alves <palves@redhat.com>
3071
3072 PR 14618
3073 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3074 report TARGET_WAITKIND_NO_RESUMED.
3075 * remote-utils.c (prepare_resume_reply): Handle
3076 TARGET_WAITKIND_NO_RESUMED.
3077 * server.c (report_no_resumed): New global.
3078 (handle_query) <qSupported>: Handle "no-resumed+". Report
3079 "no-resumed+" support.
3080 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3081 return error if the client doesn't support no-resumed events.
3082 (push_stop_notification): New function.
3083 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3084 events if the client supports them.
3085
a681f9c9
PA
30862015-11-30 Pedro Alves <palves@redhat.com>
3087
3088 * linux-low.c (thread_still_has_status_pending_p): Don't check
3089 vCont;t here.
3090 (lwp_resumed): New function.
3091 (status_pending_p_callback): Return early if the LWP is not
3092 supposed to be resumed.
3093
65706a29
PA
30942015-11-30 Pedro Alves <palves@redhat.com>
3095
3096 * linux-low.c (handle_extended_wait): Assert that the LWP's
3097 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3098 thread create events, leave the new child's status pending.
3099 (linux_low_filter_event): If GDB wants to hear about thread exit
3100 events, leave the LWP marked dead and don't delete it.
3101 (linux_wait_for_event_filtered): Don't check for thread exit.
3102 (filter_exit_event): New function.
3103 (linux_wait_1): Use it, when returning an exit event.
3104 (linux_resume_one_lwp_throw): Assert that the LWP's
3105 waitstatus is TARGET_WAITKIND_IGNORE.
3106 * remote-utils.c (prepare_resume_reply): Handle
3107 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3108 * server.c (report_thread_events): New global.
3109 (handle_general_set): Handle QThreadEvents.
3110 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3111 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3112 TARGET_WAITKIND_THREAD_EXITED.
3113 * server.h (report_thread_events): Declare.
3114
56cf4bed
PA
31152015-11-30 Pedro Alves <palves@redhat.com>
3116
3117 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3118 the thread's last_resume_kind was resume_stop.
3119
500c1d85
PA
31202015-11-30 Pedro Alves <palves@redhat.com>
3121
3122 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3123 before returning.
3124
de979965
PA
31252015-11-30 Pedro Alves <palves@redhat.com>
3126
3127 * server.c (handle_v_requests): Handle vCtrlC.
3128
34c65914
PA
31292015-11-30 Pedro Alves <palves@redhat.com>
3130
3131 * gdbthread.h (find_any_thread_of_pid): Declare.
3132 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3133 functions.
3134 * server.c (handle_query): If current_thread is NULL, look for
3135 another thread of the selected process.
3136
79efa585 31372015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3138 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3139
3140 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3141 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3142 name in reply.
3143 * target.h (struct target_ops) <thread_name>: New field.
3144 (target_thread_name): New macro.
3145
80d82c19
JB
31462015-11-23 Joel Brobecker <brobecker@adacore.com>
3147
3148 * regcache.h (regcache_invalidate_pid): Add declaration.
3149 * regcache.c (regcache_invalidate_pid): New function, extracted
3150 from regcache_invalidate.
3151 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3152 Add trivial documentation comment.
3153 * lynx-low.c: Use regcache_invalidate_pid instead of
3154 regcache_invalidate.
3155
64da5dd5
JB
31562015-11-23 Joel Brobecker <brobecker@adacore.com>
3157
3158 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3159 and Elf64_auxv_t if the target is Android.
3160
37ce4055
DE
31612015-11-22 Doug Evans <xdje42@gmail.com>
3162
3163 * target.h: #include <sys/types.h>.
3164
06e03fff
PA
31652015-11-19 Pedro Alves <palves@redhat.com>
3166
3167 * linux-low.c (linux_process_qsupported): Change prototype.
3168 Adjust.
3169 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3170 Change prototype.
3171 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3172 and adjust to loop over all features.
3173 * server.c (handle_query) <qSupported>: Adjust to call
3174 target_process_qsupported once, passing it a vector of unprocessed
3175 features.
3176 * target.h (struct target_ops) <process_qsupported>: Change
3177 prototype.
3178 (target_process_qsupported): Adjust.
3179
9a084706
PA
31802015-11-19 Pedro Alves <palves@redhat.com>
3181
3182 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3183 mode.
3184 * configure: Regenerate.
3185
dad44a1f
PA
31862015-11-19 Pedro Alves <palves@redhat.com>
3187
3188 * configure: Regenerate.
3189
231c0592
YQ
31902015-11-19 Yao Qi <yao.qi@linaro.org>
3191
3192 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3193 type to uint32_t.
3194
6c1c9a8b
YQ
31952015-11-19 Yao Qi <yao.qi@linaro.org>
3196
3197 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3198 (struct aarch64_operand): Move enum out.
3199
9caa3311
YQ
32002015-11-19 Yao Qi <yao.qi@linaro.org>
3201
3202 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3203 struct user_fpsimd_state *.
3204 (aarch64_store_fpregset): Likewise.
3205
6a69a054
YQ
32062015-11-19 Yao Qi <yao.qi@linaro.org>
3207
3208 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3209 struct user_pt_regs *.
3210 (aarch64_store_gregset): Likewise.
3211
1798301e
PA
32122015-11-18 Pedro Alves <palves@redhat.com>
3213
3214 * Makefile.in (all_object_files): Add $IPA_OBJS.
3215
ce7715e2
PA
32162015-11-17 Pedro Alves <palves@redhat.com>
3217
3218 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3219 GDB_SIGNAL_0 and gdb_signal_to_string.
3220
c0879059
PA
32212015-11-17 Pedro Alves <palves@redhat.com>
3222
3223 * win32-low.c (handle_output_debug_string): Remove parameter.
3224 (win32_kill): Remove our_status local and adjust call to
3225 handle_output_debug_string.
3226 (get_child_debug_event): Adjust call to
3227 handle_output_debug_string.
3228
1996e237
SM
32292015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3230
3231 * linux-mips-low.c (mips_fill_gregset): Add cast.
3232 (mips_store_gregset): Likewise.
3233 (mips_fill_fpregset): Likewise.
3234 (mips_store_fpregset): Likewise.
3235
cbec665b
SM
32362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3237
3238 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3239 priv.
3240
eb3e3c67
SM
32412015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3242
3243 * linux-mips-low.c (mips_linux_new_thread): Change type of
3244 watch_type to enum target_hw_bp_type.
3245
171de4b8
SM
32462015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3247
3248 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3249 Change return type to arm_hwbp_type.
3250
04248ead
SM
32512015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3252
3253 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3254 (arm_store_gregset): Likewise.
3255 * linux-arm-low.c (arm_get_hwcap): Likewise.
3256 (arm_read_description): Likewise.
3257
04b3479c
SM
32582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3259
3260 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3261
2bc84e8a
SM
32622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3263
3264 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3265 (ppc_fill_vsxregset): Likewise.
3266 (ppc_store_vsxregset): Likewise.
3267 (ppc_fill_vrregset): Likewise.
3268 (ppc_store_vrregset): Likewise.
3269 (ppc_fill_evrregset): Likewise.
3270 (ppc_store_evrregset): Likewise.
3271
e6c5bb05
SM
32722015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3273
3274 * linux-ppc-low.c (ppc_usrregs_info): Remove
3275 forward-declaration.
3276 (ppc_arch_setup): Move lower in file.
3277
7ea45d72
SM
32782015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3279
3280 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3281 (ps_pdwrite): Likewise.
3282
69291610
HW
32832015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3284
3285 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3286 to after assert checks.
3287
b42945fd
SM
32882015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3289
3290 * proc-service.c (ps_pdread): Add/adjust casts.
3291 (ps_pdwrite): Add/adjust casts.
3292
d6f85c84
SM
32932015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3294
3295 * server.c (handle_search_memory_1): Cast return value of
3296 memmem.
3297
f98cd059
SM
32982015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3299
3300 * server.c (write_qxfer_response): Change type of data to
3301 gdb_byte *.
3302
d2412fa5
PA
33032015-10-29 Pedro Alves <palves@redhat.com>
3304
3305 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3306
c17414a2
PA
33072015-10-29 Pedro Alves <palves@redhat.com>
3308
3309 * tracepoint.c (clear_installed_tracepoints): Add casts.
3310
e053fbc4
PA
33112015-10-29 Pedro Alves <palves@redhat.com>
3312
3313 * server.c (handle_v_cont, process_serial_event): Add enum
3314 gdb_signal casts to signal parsing code.
3315
add67df8
PA
33162015-10-29 Pedro Alves <palves@redhat.com>
3317
3318 * linux-low.h (NULL_REGSET): Define.
3319 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3320 * linux-arm-low.c (arm_regsets): Likewise.
3321 * linux-crisv32-low.c (cris_regsets): Likewise.
3322 * linux-m68k-low.c (m68k_regsets): Likewise.
3323 * linux-mips-low.c (mips_regsets): Likewise.
3324 * linux-nios2-low.c (nios2_regsets): Likewise.
3325 * linux-ppc-low.c (ppc_regsets): Likewise.
3326 * linux-s390-low.c (s390_regsets): Likewise.
3327 * linux-sh-low.c (sh_regsets): Likewise.
3328 * linux-sparc-low.c (sparc_regsets): Likewise.
3329 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3330 * linux-tile-low.c (tile_regsets): Likewise.
3331 * linux-x86-low.c (x86_regsets): Likewise.
3332 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3333
50bc912a
PA
33342015-10-29 Pedro Alves <palves@redhat.com>
3335
3336 * linux-low.h (NULL_REGSET): Define.
3337 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3338 * linux-arm-low.c (arm_regsets): Likewise.
3339 * linux-crisv32-low.c (cris_regsets): Likewise.
3340 * linux-m68k-low.c (m68k_regsets): Likewise.
3341 * linux-mips-low.c (mips_regsets): Likewise.
3342 * linux-nios2-low.c (nios2_regsets): Likewise.
3343 * linux-ppc-low.c (ppc_regsets): Likewise.
3344 * linux-s390-low.c (s390_regsets): Likewise.
3345 * linux-sh-low.c (sh_regsets): Likewise.
3346 * linux-sparc-low.c (sparc_regsets): Likewise.
3347 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3348 * linux-tile-low.c (tile_regsets): Likewise.
3349 * linux-x86-low.c (x86_regsets): Likewise.
3350 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3351
682b2546
DE
33522015-10-26 Doug Evans <dje@google.com>
3353
3354 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3355
963843d4
DE
33562015-10-26 Doug Evans <dje@google.com>
3357
3358 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3359
d41401ac
DE
33602015-10-26 Doug Evans <dje@google.com>
3361
3362 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3363 for debug_printf.
3364 (attach_thread, find_new_threads_callback): Ditto.
3365
3db28855
AT
33662015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3367
3368 * mem-break.h (set_breakpoint_data): Remove.
3369
fb78e89c
AT
33702015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3371
3372 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3373 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3374 (initialize_low): Remove set_breakpoint_data call.
3375 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3376 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3377 (initialize_low): Remove set_breakpoint_data call.
3378 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3379 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3380 (initialize_low): Remove set_breakpoint_data call.
3381
2e6ee069
AT
33822015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3383
3384 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3385 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3386 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3387 * target.h (target_breakpoint_kind_from_pc): New macro.
3388
1652a986
AT
33892015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3390
3391 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3392 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3393 the default breakpoint kind.
3394
abeead09
AT
33952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3396
3397 * linux-arm-low.c (arm_supports_z_point_type): Add software
3398 breakpoint support.
3399
b0b4b501
AT
34002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3401
3402 * linux-arm-low.c: Refactor breakpoint definitions.
3403 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3404 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3405
8689682c
AT
34062015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3407
3408 * Makefile.in: Add arm.c/o.
3409 * configure.srv: Likewise.
3410 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3411 (arm_breakpoint_kind_from_pc): New function.
3412 (arm_sw_breakpoint_from_kind): Return proper kind.
3413 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3414
27165294
AT
34152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3416
3417 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3418 removal.
3419 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3420 (struct raw_breakpoint) <size>: Remove.
3421 (struct raw_breakpoint) <kind>: Add.
3422 (bp_size): New function.
3423 (bp_opcode): Likewise.
3424 (find_raw_breakpoint_at): Adjust for kind.
3425 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3426 (remove_memory_breakpoint): Adjust for kind call bp_size.
3427 (set_raw_breakpoint_at): Adjust for kind.
3428 (set_breakpoint): Likewise.
3429 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3430 (delete_raw_breakpoint): Adjust for kind.
3431 (delete_breakpoint): Likewise.
3432 (find_gdb_breakpoint): Likewise.
3433 (set_gdb_breakpoint_1): Likewise.
3434 (set_gdb_breakpoint): Likewise.
3435 (delete_gdb_breakpoint_1): Likewise.
3436 (delete_gdb_breakpoint): Likewise.
3437 (uninsert_raw_breakpoint): Likewise.
3438 (reinsert_raw_breakpoint): Likewise.
3439 (set_breakpoint_data): Remove.
3440 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3441 (check_mem_read): Adjust for kind call bp_size.
3442 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3443 (clone_one_breakpoint): Adjust for kind.
3444 * mem-break.h (set_gdb_breakpoint): Likewise.
3445 (delete_gdb_breakpoint): Likewise.
3446 * server.c (process_serial_event): Likewise.
3447
dd373349
AT
34482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3449
3450 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3451 (struct linux_target_ops) <breakpoint>: Remove.
3452 (struct linux_target_ops) <breakpoint_len>: Remove.
3453 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3454 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3455 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3456 (arm_sw_breakpoint_from_kind): New function.
3457 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3458 (struct linux_target_ops) <breakpoint>: Remove.
3459 (struct linux_target_ops) <breakpoint_len>: Remove.
3460 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3461 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3462 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3463 (struct linux_target_ops) <breakpoint>: Remove.
3464 (struct linux_target_ops) <breakpoint_len>: Remove.
3465 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3466 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3467 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3468 (struct linux_target_ops) <breakpoint>: Remove.
3469 (struct linux_target_ops) <breakpoint_len>: Remove.
3470 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3471 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3472 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3473 and sw_breakpoint_from_kind to increment the pc.
3474 (linux_breakpoint_kind_from_pc): New function.
3475 (linux_sw_breakpoint_from_kind): New function.
3476 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3477 (initialize_low): Call breakpoint_kind_from_pc and
3478 sw_breakpoint_from_kind to replace breakpoint_data/len.
3479 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3480 New field.
3481 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3482 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3493 (struct linux_target_ops) <breakpoint>: Remove.
3494 (struct linux_target_ops) <breakpoint_len>: Remove.
3495 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3496 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3497 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3498 (struct linux_target_ops) <breakpoint>: Remove.
3499 (struct linux_target_ops) <breakpoint_len>: Remove.
3500 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3501 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3502 * linux-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3528 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3529 (struct linux_target_ops) <breakpoint>: Remove.
3530 (struct linux_target_ops) <breakpoint_len>: Remove.
3531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3533 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3534 (struct linux_target_ops) <breakpoint>: Remove.
3535 (struct linux_target_ops) <breakpoint_len>: Remove.
3536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3538
4cd98a19
AT
35392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3540
3541 * linux-cris-low.c (cris_get_pc): Remove void arg.
3542
774ee6d2
AR
35432015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3544
3545 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3546 variable name.
3547
833dcd29
AR
35482015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3549
3550 * inferiors.c (thread_pid_matches_callback): New function.
3551 (find_thread_process): New function.
3552 (remove_thread): Reset current_thread.
3553 (remove_process): Assert threads have been removed first.
3554
8d689ee5
YQ
35552015-10-15 Yao Qi <yao.qi@linaro.org>
3556
3557 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3558 if it is 3.
3559 (aarch64_remove_point): Likewise.
3560 * regcache.c (regcache_register_size): New function.
3561
1c2e1515
YQ
35622015-10-12 Yao Qi <yao.qi@linaro.org>
3563
3564 * linux-aarch64-low.c: Update all callers as emit_load_store
3565 is renamed to aarch64_emit_load_store.
3566
e1c587c3
YQ
35672015-10-12 Yao Qi <yao.qi@linaro.org>
3568
3569 * linux-aarch64-low.c: Update all callers of function renaming
3570 from emit_insn to aarch64_emit_insn.
3571
b6542f81
YQ
35722015-10-12 Yao Qi <yao.qi@linaro.org>
3573
3574 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3575 arch/aarch64-insn.h.
3576 (struct aarch64_memory_operand): Likewise.
3577 (ENCODE): Likewise.
3578 (emit_insn): Move to arch/aarch64-insn.c.
3579 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3580 (emit_load_store): Move to arch/aarch64-insn.c.
3581 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3582 (can_encode_int32): Remove.
3583
246994ce
YQ
35842015-10-12 Yao Qi <yao.qi@linaro.org>
3585
3586 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3587 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3588 (aarch64_relocate_instruction): Likewise.
3589 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3590 (struct aarch64_insn_visitor): Likewise.
3591
0badd99f
YQ
35922015-10-12 Yao Qi <yao.qi@linaro.org>
3593
3594 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3595 (struct aarch64_insn_visitor): New.
3596 (struct aarch64_insn_relocation_data): New.
3597 (aarch64_ftrace_insn_reloc_b): New function.
3598 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3599 (aarch64_ftrace_insn_reloc_cb): Likewise.
3600 (aarch64_ftrace_insn_reloc_tb): Likewise.
3601 (aarch64_ftrace_insn_reloc_adr): Likewise.
3602 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3603 (aarch64_ftrace_insn_reloc_others): Likewise.
3604 (visitor): New.
3605 (aarch64_relocate_instruction): Use visitor.
3606
dfaffe9d
YQ
36072015-10-12 Yao Qi <yao.qi@linaro.org>
3608
3609 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3610 int. Add argument buf.
3611 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3612 aarch64_relocate_instruction.
3613
70b439f0
YQ
36142015-10-12 Yao Qi <yao.qi@linaro.org>
3615
3616 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3617 argument insn. Remove local variable insn. Don't call
3618 target_read_uint32.
3619 (aarch64_install_fast_tracepoint_jump_pad): Call
3620 target_read_uint32.
3621
7781c06f
YQ
36222015-09-30 Yao Qi <yao.qi@linaro.org>
3623
3624 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3625 (emit_load_store_pair): Likewise.
3626
9a3c8263
SM
36272015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3628
3629 * dll.c (match_dll): Add cast(s).
3630 (unloaded_dll): Likewise.
3631 * linux-low.c (second_thread_of_pid_p): Likewise.
3632 (delete_lwp_callback): Likewise.
3633 (count_events_callback): Likewise.
3634 (select_event_lwp_callback): Likewise.
3635 (linux_set_resume_request): Likewise.
3636 * server.c (accumulate_file_name_length): Likewise.
3637 (emit_dll_description): Likewise.
3638 (handle_qxfer_threads_worker): Likewise.
3639 (visit_actioned_threads): Likewise.
3640 * thread-db.c (any_thread_of): Likewise.
3641 * tracepoint.c (same_process_p): Likewise.
3642 (match_blocktype): Likewise.
3643 (build_traceframe_info_xml): Likewise.
3644
224c3ddb
SM
36452015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3646
3647 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3648 assignment.
3649 (gdb_unparse_agent_expr): Likewise.
3650 * hostio.c (require_data): Likewise.
3651 (handle_pread): Likewise.
3652 * linux-low.c (disable_regset): Likewise.
3653 (fetch_register): Likewise.
3654 (store_register): Likewise.
3655 (get_dynamic): Likewise.
3656 (linux_qxfer_libraries_svr4): Likewise.
3657 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3658 (set_fast_tracepoint_jump): Likewise.
3659 (uninsert_fast_tracepoint_jumps_at): Likewise.
3660 (reinsert_fast_tracepoint_jumps_at): Likewise.
3661 (validate_inserted_breakpoint): Likewise.
3662 (clone_agent_expr): Likewise.
3663 * regcache.c (init_register_cache): Likewise.
3664 * remote-utils.c (putpkt_binary_1): Likewise.
3665 (decode_M_packet): Likewise.
3666 (decode_X_packet): Likewise.
3667 (look_up_one_symbol): Likewise.
3668 (relocate_instruction): Likewise.
3669 (monitor_output): Likewise.
3670 * server.c (handle_search_memory): Likewise.
3671 (handle_qxfer_exec_file): Likewise.
3672 (handle_qxfer_libraries): Likewise.
3673 (handle_qxfer): Likewise.
3674 (handle_query): Likewise.
3675 (handle_v_cont): Likewise.
3676 (handle_v_run): Likewise.
3677 (captured_main): Likewise.
3678 * target.c (write_inferior_memory): Likewise.
3679 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3680 * tracepoint.c (init_trace_buffer): Likewise.
3681 (add_tracepoint_action): Likewise.
3682 (add_traceframe): Likewise.
3683 (add_traceframe_block): Likewise.
3684 (cmd_qtdpsrc): Likewise.
3685 (cmd_qtdv): Likewise.
3686 (cmd_qtstatus): Likewise.
3687 (response_source): Likewise.
3688 (response_tsv): Likewise.
3689 (cmd_qtnotes): Likewise.
3690 (gdb_collect): Likewise.
3691 (initialize_tracepoint): Likewise.
3692
afbe19f8
PL
36932015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3694
3695 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3696 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3697 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3698 <NOP>: New.
3699 (enum aarch64_condition_codes): New enum.
3700 (w0): New static global.
3701 (fp): Likewise.
3702 (lr): Likewise.
3703 (struct aarch64_memory_operand) <type>: New
3704 MEMORY_OPERAND_POSTINDEX type.
3705 (postindex_memory_operand): New helper function.
3706 (emit_ret): New function.
3707 (emit_load_store_pair): New function, factored out of emit_stp
3708 with support for MEMORY_OPERAND_POSTINDEX.
3709 (emit_stp): Rewrite using emit_load_store_pair.
3710 (emit_ldp): New function.
3711 (emit_load_store): Likewise.
3712 (emit_ldr): Mention post-index instruction in comment.
3713 (emit_ldrh): New function.
3714 (emit_ldrb): New function.
3715 (emit_ldrsw): Mention post-index instruction in comment.
3716 (emit_str): Likewise.
3717 (emit_subs): New function.
3718 (emit_cmp): Likewise.
3719 (emit_and): Likewise.
3720 (emit_orr): Likewise.
3721 (emit_orn): Likewise.
3722 (emit_eor): Likewise.
3723 (emit_mvn): Likewise.
3724 (emit_lslv): Likewise.
3725 (emit_lsrv): Likewise.
3726 (emit_asrv): Likewise.
3727 (emit_mul): Likewise.
3728 (emit_sbfm): Likewise.
3729 (emit_sbfx): Likewise.
3730 (emit_ubfm): Likewise.
3731 (emit_ubfx): Likewise.
3732 (emit_csinc): Likewise.
3733 (emit_cset): Likewise.
3734 (emit_nop): Likewise.
3735 (emit_ops_insns): New helper function.
3736 (emit_pop): Likewise.
3737 (emit_push): Likewise.
3738 (aarch64_emit_prologue): New function.
3739 (aarch64_emit_epilogue): Likewise.
3740 (aarch64_emit_add): Likewise.
3741 (aarch64_emit_sub): Likewise.
3742 (aarch64_emit_mul): Likewise.
3743 (aarch64_emit_lsh): Likewise.
3744 (aarch64_emit_rsh_signed): Likewise.
3745 (aarch64_emit_rsh_unsigned): Likewise.
3746 (aarch64_emit_ext): Likewise.
3747 (aarch64_emit_log_not): Likewise.
3748 (aarch64_emit_bit_and): Likewise.
3749 (aarch64_emit_bit_or): Likewise.
3750 (aarch64_emit_bit_xor): Likewise.
3751 (aarch64_emit_bit_not): Likewise.
3752 (aarch64_emit_equal): Likewise.
3753 (aarch64_emit_less_signed): Likewise.
3754 (aarch64_emit_less_unsigned): Likewise.
3755 (aarch64_emit_ref): Likewise.
3756 (aarch64_emit_if_goto): Likewise.
3757 (aarch64_emit_goto): Likewise.
3758 (aarch64_write_goto_address): Likewise.
3759 (aarch64_emit_const): Likewise.
3760 (aarch64_emit_call): Likewise.
3761 (aarch64_emit_reg): Likewise.
3762 (aarch64_emit_pop): Likewise.
3763 (aarch64_emit_stack_flush): Likewise.
3764 (aarch64_emit_zero_ext): Likewise.
3765 (aarch64_emit_swap): Likewise.
3766 (aarch64_emit_stack_adjust): Likewise.
3767 (aarch64_emit_int_call_1): Likewise.
3768 (aarch64_emit_void_call_2): Likewise.
3769 (aarch64_emit_eq_goto): Likewise.
3770 (aarch64_emit_ne_goto): Likewise.
3771 (aarch64_emit_lt_goto): Likewise.
3772 (aarch64_emit_le_goto): Likewise.
3773 (aarch64_emit_gt_goto): Likewise.
3774 (aarch64_emit_ge_got): Likewise.
3775 (aarch64_emit_ops_impl): New static global variable.
3776 (aarch64_emit_ops): New target function, return
3777 &aarch64_emit_ops_impl.
3778 (struct linux_target_ops): Install it.
3779
bb903df0
PL
37802015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3781
3782 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3783 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3784 aarch64-ipa.o.
3785 * linux-aarch64-ipa.c: New file.
3786 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3787 and endian.h.
3788 (aarch64_get_thread_area): New target method.
3789 (extract_signed_bitfield): New helper function.
3790 (aarch64_decode_ldr_literal): New function.
3791 (enum aarch64_opcodes): New enum.
3792 (struct aarch64_register): New struct.
3793 (struct aarch64_operand): New struct.
3794 (x0): New static global.
3795 (x1): Likewise.
3796 (x2): Likewise.
3797 (x3): Likewise.
3798 (x4): Likewise.
3799 (w2): Likewise.
3800 (ip0): Likewise.
3801 (sp): Likewise.
3802 (xzr): Likewise.
3803 (aarch64_register): New helper function.
3804 (register_operand): Likewise.
3805 (immediate_operand): Likewise.
3806 (struct aarch64_memory_operand): New struct.
3807 (offset_memory_operand): New helper function.
3808 (preindex_memory_operand): Likewise.
3809 (enum aarch64_system_control_registers): New enum.
3810 (ENCODE): New macro.
3811 (emit_insn): New helper function.
3812 (emit_b): New function.
3813 (emit_bcond): Likewise.
3814 (emit_cb): Likewise.
3815 (emit_tb): Likewise.
3816 (emit_blr): Likewise.
3817 (emit_stp): Likewise.
3818 (emit_ldp_q_offset): Likewise.
3819 (emit_stp_q_offset): Likewise.
3820 (emit_load_store): Likewise.
3821 (emit_ldr): Likewise.
3822 (emit_ldrsw): Likewise.
3823 (emit_str): Likewise.
3824 (emit_ldaxr): Likewise.
3825 (emit_stxr): Likewise.
3826 (emit_stlr): Likewise.
3827 (emit_data_processing_reg): Likewise.
3828 (emit_data_processing): Likewise.
3829 (emit_add): Likewise.
3830 (emit_sub): Likewise.
3831 (emit_mov): Likewise.
3832 (emit_movk): Likewise.
3833 (emit_mov_addr): Likewise.
3834 (emit_mrs): Likewise.
3835 (emit_msr): Likewise.
3836 (emit_sevl): Likewise.
3837 (emit_wfe): Likewise.
3838 (append_insns): Likewise.
3839 (can_encode_int32_in): New helper function.
3840 (aarch64_relocate_instruction): New function.
3841 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3842 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3843 (struct linux_target_ops): Install aarch64_get_thread_area,
3844 aarch64_install_fast_tracepoint_jump_pad and
3845 aarch64_get_min_fast_tracepoint_insn_len.
3846
787749ea
PL
38472015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3848
3849 * Makefile.in (aarch64-insn.o): New rule.
3850 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3851
9812b2e6
YQ
38522015-09-21 Yao Qi <yao.qi@linaro.org>
3853
3854 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3855
18fe412b
YQ
38562015-09-21 Yao Qi <yao.qi@linaro.org>
3857
3858 * tracepoint.c (max_jump_pad_size): Remove.
3859
a0cc84cd
YQ
38602015-09-18 Yao Qi <yao.qi@linaro.org>
3861
3862 * linux-aarch64-low.c: Don't include sys/uio.h.
3863 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3864
d78908cf
WW
38652015-09-16 Wei-cheng Wang <cole945@gmail.com>
3866
3867 * tracepoint.c (eval_result_type): Change prototype.
3868 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3869
d57e0d50
PA
38702015-09-15 Pedro Alves <palves@redhat.com>
3871
3872 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3873 Check whether to report exec events instead of checking whether
3874 multiprocess is enabled.
3875
5a676acc
PA
38762015-09-15 Pedro Alves <palves@redhat.com>
3877
3878 PR remote/18965
3879 * remote-utils.c (prepare_resume_reply): Merge
3880 TARGET_WAITKIND_VFORK_DONE switch case with the
3881 TARGET_WAITKIND_FORKED case.
3882
7c5d0fad
YQ
38832015-09-15 Yao Qi <yao.qi@linaro.org>
3884
3885 * server.c (handle_query): Check string comparison using
3886 "else if" instead of "if".
3887
750ce8d1
YQ
38882015-09-15 Yao Qi <yao.qi@linaro.org>
3889
3890 * server.c (vCont_supported): New global variable.
3891 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3892 matches. Append ";vContSupported+" to own_buf.
3893 (handle_v_requests): Append ";s;S" to own_buf if target supports
3894 hardware single step or vCont_supported is false.
3895 (capture_main): Set vCont_supported to zero.
3896
70b90b91
YQ
38972015-09-15 Yao Qi <yao.qi@linaro.org>
3898
3899 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3900 it to ...
3901 (linux_supports_hardware_single_step): ... New function.
3902 (linux_target_ops): Update.
3903 * lynx-low.c (lynx_target_ops): Set field
3904 supports_hardware_single_step to target_can_do_hardware_single_step.
3905 * nto-low.c (nto_target_ops): Likewise.
3906 * spu-low.c (spu_target_ops): Likewise.
3907 * win32-low.c (win32_target_ops): Likewise.
3908 * target.c (target_can_do_hardware_single_step): New function.
3909 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3910 Remove. <supports_hardware_single_step>: New field.
3911 (target_supports_conditional_breakpoints): Remove.
3912 (target_supports_hardware_single_step): New macro.
3913 (target_can_do_hardware_single_step): Declare.
3914 * server.c (handle_query): Use target_supports_hardware_single_step
3915 instead of target_supports_conditional_breakpoints.
3916
ade90bde
YQ
39172015-09-15 Yao Qi <yao.qi@linaro.org>
3918
3919 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3920 function.
3921 (struct linux_target_ops the_low_target): Install
3922 aarch64_linux_siginfo_fixup.
3923
94585166
DB
39242015-09-11 Don Breazeal <donb@codesourcery.com>
3925 Luis Machado <lgustavo@codesourcery.com>
3926
3927 * linux-low.c (linux_mourn): Static declaration.
3928 (linux_arch_setup): Move in front of
3929 handle_extended_wait.
3930 (linux_arch_setup_thread): New function.
3931 (handle_extended_wait): Handle exec events. Call
3932 linux_arch_setup_thread. Make event_lwp argument a
3933 pointer-to-a-pointer.
3934 (check_zombie_leaders): Do not check stopped threads.
3935 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3936 (linux_low_filter_event): Add lwp and thread for exec'ing
3937 non-leader thread if leader thread has been deleted.
3938 Refactor code into linux_arch_setup_thread and call it.
3939 Pass child lwp pointer by reference to handle_extended_wait.
3940 (linux_wait_for_event_filtered): Update comment.
3941 (linux_wait_1): Prevent clobbering exec event status.
3942 (linux_supports_exec_events): New function.
3943 (linux_target_ops) <supports_exec_events>: Initialize new member.
3944 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3945 new member.
3946 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3947 * server.c (report_exec_events): New global variable.
3948 (handle_query): Handle qSupported query for exec-events feature.
3949 (captured_main): Initialize report_exec_events.
3950 * server.h (report_exec_events): Declare new global variable.
3951 * target.h (struct target_ops) <supports_exec_events>: New
3952 member.
3953 (target_supports_exec_events): New macro.
3954 * win32-low.c (win32_target_ops) <supports_exec_events>:
3955 Initialize new member.
3956
0568462b
MM
39572015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3958
3959 * linux-low.c (linux_low_enable_btrace): Remove.
3960 (linux_target_ops): Replace linux_low_enable_btrace with
3961 linux_enable_btrace.
3962
39edd165
YQ
39632015-09-03 Yao Qi <yao.qi@linaro.org>
3964
3965 * linux-aarch64-low.c (aarch64_insert_point): Call
3966 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3967 returns true.
3968
1db33b5a
UW
39692015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3970
3971 * linux-low.c (check_stopped_by_breakpoint): Use
3972 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3973
ab290430
PA
39742015-08-27 Pedro Alves <palves@redhat.com>
3975
3976 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3977
8d749320
SM
39782015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3979
6711b7f8
SM
3980 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3981 the XNEW-family equivalent.
8d749320
SM
3982 (compile_bytecodes): Likewise.
3983 * dll.c (loaded_dll): Likewise.
3984 * event-loop.c (append_callback_event): Likewise.
3985 (create_file_handler): Likewise.
3986 (create_file_event): Likewise.
3987 * hostio.c (handle_open): Likewise.
3988 * inferiors.c (add_thread): Likewise.
3989 (add_process): Likewise.
3990 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3991 * linux-arm-low.c (arm_new_process): Likewise.
3992 (arm_new_thread): Likewise.
3993 * linux-low.c (add_to_pid_list): Likewise.
3994 (linux_add_process): Likewise.
3995 (handle_extended_wait): Likewise.
3996 (add_lwp): Likewise.
3997 (enqueue_one_deferred_signal): Likewise.
3998 (enqueue_pending_signal): Likewise.
3999 (linux_resume_one_lwp_throw): Likewise.
4000 (linux_resume_one_thread): Likewise.
4001 (linux_read_memory): Likewise.
4002 (linux_write_memory): Likewise.
4003 * linux-mips-low.c (mips_linux_new_process): Likewise.
4004 (mips_linux_new_thread): Likewise.
4005 (mips_add_watchpoint): Likewise.
4006 * linux-x86-low.c (initialize_low_arch): Likewise.
4007 * lynx-low.c (lynx_add_process): Likewise.
4008 * mem-break.c (set_raw_breakpoint_at): Likewise.
4009 (set_breakpoint): Likewise.
4010 (add_condition_to_breakpoint): Likewise.
4011 (add_commands_to_breakpoint): Likewise.
4012 (clone_agent_expr): Likewise.
4013 (clone_one_breakpoint): Likewise.
4014 * regcache.c (new_register_cache): Likewise.
4015 * remote-utils.c (look_up_one_symbol): Likewise.
4016 * server.c (queue_stop_reply): Likewise.
4017 (start_inferior): Likewise.
4018 (queue_stop_reply_callback): Likewise.
4019 (handle_target_event): Likewise.
4020 * spu-low.c (fetch_ppc_memory): Likewise.
4021 (store_ppc_memory): Likewise.
4022 * target.c (set_target_ops): Likewise.
4023 * thread-db.c (thread_db_load_search): Likewise.
4024 (try_thread_db_load_1): Likewise.
4025 * tracepoint.c (add_tracepoint): Likewise.
4026 (add_tracepoint_action): Likewise.
4027 (create_trace_state_variable): Likewise.
4028 (cmd_qtdpsrc): Likewise.
4029 (cmd_qtro): Likewise.
4030 (add_while_stepping_state): Likewise.
4031 * win32-low.c (child_add_thread): Likewise.
4032 (get_image_name): Likewise.
4033
ed8b7b42
YQ
40342015-08-25 Yao Qi <yao.qi@linaro.org>
4035
4036 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4037
db3cb7cb
YQ
40382015-08-25 Yao Qi <yao.qi@linaro.org>
4039
4040 * Makefile.in (aarch64-linux.o): New rule.
4041 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4042 srv_tgtobj.
4043 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4044 (aarch64_init_debug_reg_state): Make it extern.
4045 (aarch64_linux_prepare_to_resume): Remove.
4046
f6011a1c
YQ
40472015-08-25 Yao Qi <yao.qi@linaro.org>
4048
4049 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4050 lwp_arch_private_info and ptid_of_lwp.
4051
88e2cf7e
YQ
40522015-08-25 Yao Qi <yao.qi@linaro.org>
4053
4054 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4055 Find proc_info by find_process_pid. All callers updated.
4056
5e35436e
YQ
40572015-08-25 Yao Qi <yao.qi@linaro.org>
4058
4059 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4060 Remove.
4061 (debug_reg_change_callback): Remove.
4062 (aarch64_notify_debug_reg_change): Remove.
4063
4a8a7965
YQ
40642015-08-25 Yao Qi <yao.qi@linaro.org>
4065
4066 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4067 Call current_lwp_ptid.
4068
32a271ee
YQ
40692015-08-25 Yao Qi <yao.qi@linaro.org>
4070
4071 * linux-aarch64-low.c (debug_reg_change_callback): Use
4072 debug_printf.
4073
0d51c8d7
YQ
40742015-08-25 Yao Qi <yao.qi@linaro.org>
4075
4076 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4077
31a43dd5
YQ
40782015-08-25 Yao Qi <yao.qi@linaro.org>
4079
4080 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4081
8ee52567
YQ
40822015-08-25 Yao Qi <yao.qi@linaro.org>
4083
4084 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4085 the code.
4086
ff3f0f45
YQ
40872015-08-25 Yao Qi <yao.qi@linaro.org>
4088
4089 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4090 Remove.
4091 (debug_reg_change_callback): Remove argument entry and add argument
4092 lwp. Remove local variable thread. Don't print thread id in the
4093 debugging output. Don't check whether pid of thread equals to pid.
4094 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4095 iterate_over_lwps instead find_inferior.
4096
3d40fbb5
PA
40972015-08-24 Pedro Alves <palves@redhat.com>
4098
4099 * inferiors.c (get_first_process): New function.
4100 * inferiors.h (get_first_process): New declaration.
4101 * remote-utils.c (read_ptid): Default to the first process in the
4102 list, instead of to the current thread's process.
4103
438e1e42
PA
41042015-08-24 Pedro Alves <palves@redhat.com>
4105
4106 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4107 * event-loop.c: Likewise.
4108 * remote-utils.c: Likewise.
4109 * tracepoint.c: Likewise.
4110
a8c6d4fc
PA
41112015-08-24 Pedro Alves <palves@redhat.com>
4112
4113 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4114 ptid_get_lwp.
4115
99b0bb12
PA
41162015-08-21 Pedro Alves <palves@redhat.com>
4117
4118 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4119 instead of literal 1.
4120
f8904751
PA
41212015-08-21 Pedro Alves <palves@redhat.com>
4122
4123 * tdesc.c (default_description): Explicitly zero-initialize.
4124
465a859e
PA
41252015-08-21 Pedro Alves <palves@redhat.com>
4126
4127 PR gdb/18749
4128 * inferiors.c (remove_thread): Discard any pending stop reply for
4129 this thread.
4130 * server.c (remove_all_on_match_pid): Rename to ...
4131 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4132 instead of a pid.
4133 (discard_queued_stop_replies): Change parameter to a ptid. Now
4134 extern.
4135 (handle_v_kill, kill_inferior_callback, captured_main)
4136 (process_serial_event): Adjust.
4137 * server.h (discard_queued_stop_replies): Declare.
4138
f0db101d
PA
41392015-08-21 Pedro Alves <palves@redhat.com>
4140
4141 * linux-low.c (wait_for_sigstop): Always switch to no thread
4142 selected if the previously current thread dies.
4143 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4144 process instead of the current thread's.
4145 * remote-utils.c (input_interrupt): Don't check if there's no
4146 current thread.
4147 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4148 current thread to the general thread fails, error out.
4149 (handle_qxfer_auxv, handle_qxfer_libraries)
4150 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4151 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4152 (handle_query): Check if there's a thread selected instead of
4153 checking whether there's any thread in the thread list.
4154 (handle_qxfer_threads, handle_qxfer_btrace)
4155 (handle_qxfer_btrace_conf): Don't error out early if there's no
4156 thread in the thread list.
4157 (handle_v_cont, myresume): Don't set the current thread to the
4158 continue thread.
4159 (process_serial_event) <Hg handling>: Also set thread_id if the
4160 previous general thread is still alive.
4161 (process_serial_event) <g/G handling>: If setting the current
4162 thread to the general thread fails, error out.
4163 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4164 thread's lwp instead of the current thread's.
4165 * target.c (set_desired_thread): If the desired thread was not
4166 found, leave the current thread pointing to NULL. Return an int
4167 (boolean) indicating success.
4168 * target.h (set_desired_thread): Change return type to int.
4169
40045d91
MF
41702015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4171
4172 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4173 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4174 #includes.
4175 (ps_get_thread_area): New function.
4176
45face3b
GB
41772015-08-19 Gary Benson <gbenson@redhat.com>
4178
4179 * hostio.c (handle_pread): Do not attempt to read more data
4180 than hostio_reply_with_data can fit in a packet.
4181
16d5f642
JB
41822015-08-18 Joel Brobecker <brobecker@adacore.com>
4183
4184 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4185
a738da3a
MF
41862015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4187
4188 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4189
33ebda9d
PA
41902015-08-06 Pedro Alves <palves@redhat.com>
4191
4192 * tracepoint.c (expr_eval_result): Now an int.
4193
a44892be
PA
41942015-08-06 Pedro Alves <palves@redhat.com>
4195
4196 * gdbthread.h (struct regcache): Forward declare.
4197 (struct thread_info) <regcache_data>: Now a struct regcache
4198 pointer.
4199 * inferiors.c (inferior_regcache_data)
4200 (set_inferior_regcache_data): Now work with struct regcache
4201 pointers.
4202 * inferiors.h (struct regcache): Forward declare.
4203 (inferior_regcache_data, set_inferior_regcache_data): Now work
4204 with struct regcache pointers.
4205 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4206 (free_register_cache_thread): Remove struct regcache pointer
4207 casts.
4208
608a1e46
PA
42092015-08-06 Pedro Alves <palves@redhat.com>
4210
4211 * server.c (captured_main): On error, print the exception message
4212 to stderr, and if run_once is set, throw a quit.
4213
f0ce0d3a
PA
42142015-08-06 Pedro Alves <palves@redhat.com>
4215
4216 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4217 the current thread.
4218
bf47e248
PA
42192015-08-06 Pedro Alves <palves@redhat.com>
4220
4221 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4222 reading beyond the passed in buffer length.
4223
b6b9ffcc
PL
42242015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4225
4226 * tracepoint.c (symbol_list) <required>: Remove.
4227
863d01bd
PA
42282015-08-06 Pedro Alves <palves@redhat.com>
4229
4230 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4231 count if stopping and suspending threads.
4232 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4233 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4234 (linux_detach): Complete an ongoing step-over.
4235 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4236 throughout.
4237 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4238 (linux_wait_1): If passing a signal to the inferior after
4239 finishing a step-over, unsuspend and re-resume all lwps. If we
4240 see a single-step event but the thread should be continuing, don't
4241 pass the trap to gdb.
4242 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4243 internal_error instead of gdb_assert.
4244 (enqueue_pending_signal): New function.
4245 (check_ptrace_stopped_lwp_gone): Add debug output.
4246 (start_step_over): Use internal_error instead of gdb_assert.
4247 (complete_ongoing_step_over): New function.
4248 (linux_resume_one_thread): Don't resume a suspended thread.
4249 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4250 it stepping.
4251
00db26fa
PA
42522015-08-06 Pedro Alves <palves@redhat.com>
4253
4254 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4255 (linux_thread_alive): Use lwp_is_marked_dead.
4256 (extended_event_reported): Delete.
4257 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4258 instead of extended_event_reported.
4259 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4260 as well.
4261 (lwp_is_marked_dead): New function.
4262 (lwp_running): Use lwp_is_marked_dead.
4263 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4264 comment.
4265
ad071a30
PA
42662015-08-06 Pedro Alves <palves@redhat.com>
4267
4268 * linux-low.c (linux_wait_1): Move fork event output out of the
4269 !report_to_gdb check. Pass event_child->waitstatus to
4270 target_waitstatus_to_string instead of ourstatus.
4271
524b57e6
YQ
42722015-08-04 Yao Qi <yao.qi@linaro.org>
4273
4274 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4275 if current_thread is 32 bit.
4276
6085d6f6
YQ
42772015-08-04 Yao Qi <yao.qi@linaro.org>
4278
4279 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4280 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4281 * server.c (extended_protocol): Remove "static".
4282 * server.h (extended_protocol): Declare it.
4283
8a7e4587
YQ
42842015-08-04 Yao Qi <yao.qi@linaro.org>
4285
4286 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4287 both aarch64 and aarch32.
4288 (aarch64_set_pc): Likewise.
4289
3b53ae99
YQ
42902015-08-04 Yao Qi <yao.qi@linaro.org>
4291
4292 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4293 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4294 arm-with-neon.xml to srv_xmlfiles.
4295 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4296 (is_64bit_tdesc): New function.
4297 (aarch64_linux_read_description): New function.
4298 (aarch64_arch_setup): Call aarch64_linux_read_description.
4299 (regs_info): Rename to regs_info_aarch64.
4300 (aarch64_regs_info): Return right regs_info.
4301 (initialize_low_arch): Call initialize_low_arch_aarch32.
4302
bd9e6534
YQ
43032015-08-04 Yao Qi <yao.qi@linaro.org>
4304
4305 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4306 * linux-aarch32-low.c: New file.
4307 * linux-aarch32-low.h: New file.
4308 * linux-arm-low.c (arm_fill_gregset): Move it to
4309 linux-aarch32-low.c.
4310 (arm_store_gregset): Likewise.
4311 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4312 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4313 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4314 (regs_info): Rename to regs_info_arm.
4315 (arm_regs_info): Return regs_info_aarch32 if
4316 have_ptrace_getregset is 1 and target description is
4317 arm_with_neon or arm_with_vfpv3.
4318 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4319 Call initialize_low_arch_aarch32 instead.
4320
ded48a5e
YQ
43212015-08-04 Yao Qi <yao.qi@linaro.org>
4322
4323 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4324 * linux-low.c: ... here.
4325 * linux-low.h (have_ptrace_getregset): Declare it.
4326
96e9210f
PA
43272015-08-04 Pedro Alves <palves@redhat.com>
4328
4329 * thread-db.c (struct thread_db): Use new typedefs.
4330 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4331 CHK calls.
4332 (disable_thread_event_reporting): Cast result of dlsym to
4333 destination function pointer type.
4334 (thread_db_mourn): Use td_ta_delete_ftype.
4335
af60a1ef
SL
43362015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4337
4338 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4339 arch variant.
4340 (CDX_BREAKPOINT): Define for R2.
4341 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4342 (the_low_target): Add comments.
4343
e8b41681
YQ
43442015-07-30 Yao Qi <yao.qi@linaro.org>
4345
4346 * linux-arm-low.c (arm_hwcap): Remove it.
4347 (arm_read_description): New local variable arm_hwcap. Don't
4348 set arm_hwcap to zero.
4349
89abb039
YQ
43502015-07-30 Yao Qi <yao.qi@linaro.org>
4351
4352 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4353 Use regcache->tdesc instead.
4354 (arm_store_wmmxregset): Likewise.
4355 (arm_fill_vfpregset): Likewise.
4356 (arm_store_vfpregset): Likewise.
4357
deca266c
YQ
43582015-07-30 Yao Qi <yao.qi@linaro.org>
4359
4360 * linux-arm-low.c: Include arch/arm.h.
4361 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4362 (arm_store_gregset): Likewise.
4363
aa58a496
SM
43642015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4365
4366 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4367 ptrace's 4th parameter.
4368
50904b25
YQ
43692015-07-27 Yao Qi <yao.qi@linaro.org>
4370
4371 * configure.srv (case aarch64*-*-linux*): Don't set
4372 srv_linux_usrregs.
4373
5826e159
PA
43742015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4375
4376 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4377 sys/ptrace.h.
4378 * linux-arm-low.c: Likewise.
4379 * linux-cris-low.c: Likewise.
4380 * linux-crisv32-low.c: Likewise.
4381 * linux-low.c: Likewise.
4382 * linux-m68k-low.c: Likewise.
4383 * linux-mips-low.c: Likewise.
4384 * linux-nios2-low.c: Likewise.
4385 * linux-s390-low.c: Likewise.
4386 * linux-sparc-low.c: Likewise.
4387 * linux-tic6x-low.c: Likewise.
4388 * linux-tile-low.c: Likewise.
4389 * linux-x86-low.c: Likewise.
4390
54019719
PA
43912015-07-24 Pedro Alves <palves@redhat.com>
4392
4393 * config.in: Regenerate.
4394 * configure: Regenerate.
4395
eb7aa561
PA
43962015-07-24 Pedro Alves <palves@redhat.com>
4397
4398 * acinclude.m4: Include ../ptrace.m4.
4399 * configure.ac: Call GDB_AC_PTRACE.
4400 * config.in, configure: Regenerate.
4401
55d7b841
YQ
44022015-07-24 Yao Qi <yao.qi@linaro.org>
4403
4404 * linux-low.c (linux_create_inferior): Remove setting to
4405 proc->priv->new_inferior.
4406 (linux_attach): Likewise.
4407 (linux_low_filter_event): Likewise.
4408 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4409
c06cbd92
YQ
44102015-07-24 Yao Qi <yao.qi@linaro.org>
4411
4412 * linux-low.c (linux_arch_setup): New function.
4413 (linux_low_filter_event): If proc->tdesc is NULL and
4414 proc->attached is true, call the_low_target.arch_setup.
4415 Otherwise, keep status pending, and return.
4416 (linux_resume_one_lwp_throw): Don't call get_pc if
4417 thread->while_stepping isn't NULL. Don't call
4418 get_thread_regcache if proc->tdesc is NULL.
4419 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4420 (linux_target_ops): Install arch_setup.
4421 * server.c (start_inferior): Call the_target->arch_setup.
4422 * target.h (struct target_ops) <arch_setup>: New field.
4423 (target_arch_setup): New marco.
4424 * lynx-low.c (lynx_target_ops): Update.
4425 * nto-low.c (nto_target_ops): Update.
4426 * spu-low.c (spu_target_ops): Update.
4427 * win32-low.c (win32_target_ops): Update.
4428
5ae3ebba
YQ
44292015-07-24 Yao Qi <yao.qi@linaro.org>
4430
4431 * linux-low.c (linux_add_process): Don't set
4432 proc->priv->new_inferior.
4433 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4434 (linux_attach): Likewise.
4435
eb97750b
YQ
44362015-07-24 Yao Qi <yao.qi@linaro.org>
4437
4438 * server.c (start_inferior): Code refactor.
4439
51aee833
YQ
44402015-07-24 Yao Qi <yao.qi@linaro.org>
4441
4442 * server.c (process_serial_event): Set general_thread.
4443
af1b22f3
YQ
44442015-07-21 Yao Qi <yao.qi@linaro.org>
4445
4446 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4447 aarch64_linux_get_debug_reg_capacity.
4448
554717a3
YQ
44492015-07-17 Yao Qi <yao.qi@linaro.org>
4450
4451 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4452 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4453 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4454 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4455 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4456 (AARCH64_HWP_ALIGNMENT): Likewise.
4457 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4458 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4459 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4460 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4461 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4462 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4463 (struct aarch64_debug_reg_state): Likewise.
4464 (struct arch_lwp_info): Likewise.
4465 (aarch64_align_watchpoint): Likewise.
4466 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4467 (aarch64_watchpoint_length): Likewise.
4468 (aarch64_point_encode_ctrl_reg): Likewise
4469 (aarch64_point_is_aligned): Likewise.
4470 (aarch64_align_watchpoint): Likewise.
4471 (aarch64_linux_set_debug_regs):
4472 (aarch64_dr_state_insert_one_point): Likewise.
4473 (aarch64_dr_state_remove_one_point): Likewise.
4474 (aarch64_handle_breakpoint): Likewise.
4475 (aarch64_handle_aligned_watchpoint): Likewise.
4476 (aarch64_handle_unaligned_watchpoint): Likewise.
4477 (aarch64_handle_watchpoint): Likewise.
4478
c67ca4de
YQ
44792015-07-17 Yao Qi <yao.qi@linaro.org>
4480
4481 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4482 and don't aarch64_get_debug_reg_state. All callers update.
4483 (aarch64_handle_aligned_watchpoint): Likewise.
4484 (aarch64_handle_unaligned_watchpoint): Likewise.
4485 (aarch64_handle_watchpoint): Likewise.
4486 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4487 (aarch64_remove_point): Likewise.
4488
25abf979
YQ
44892015-07-17 Yao Qi <yao.qi@linaro.org>
4490
4491 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4492 debug_printf.
4493 (aarch64_handle_unaligned_watchpoint): Likewise.
4494
db1ff28b
JK
44952015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4496
4497 Revert the previous 3 commits:
4498 Move gdb_regex* to common/
4499 Move linux_find_memory_regions_full & co.
4500 gdbserver build-id attribute generator
4501
700ca40f
JK
45022015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4503 Jan Kratochvil <jan.kratochvil@redhat.com>
4504
4505 gdbserver build-id attribute generator.
4506 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4507 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4508 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4509 (find_phdr): New.
4510 (get_dynamic): Use find_pdhr to traverse program headers.
4511 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4512 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4513 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4514 (get_hex_build_id): New.
4515 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4516 to reply XML document.
4517
9904185c
JK
45182015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4519 Jan Kratochvil <jan.kratochvil@redhat.com>
4520
4521 * target.c: Include target/target-utils.h and fcntl.h.
4522 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4523 (target_fileio_read_stralloc): New functions.
4524
6e5b4429
JK
45252015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4526
4527 * Makefile.in (OBS): Add gdb_regex.o.
4528 (gdb_regex.o): New.
4529 * config.in: Rebuilt.
4530 * configure: Rebuilt.
4531
ddc98fbf
JK
45322015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4533 Jan Kratochvil <jan.kratochvil@redhat.com>
4534
4535 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4536 * Makefile.in (OBS): Add target-utils.o.
4537 (linux-maps.o, target-utils.o): New.
4538 * configure.srv (srv_linux_obj): Add linux-maps.o.
4539
e57bb7a0
PL
45402015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4541
4542 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4543 function, return 1.
4544 (the_low_target): Install it.
4545
586b02a9
PA
45462015-07-14 Pedro Alves <palves@redhat.com>
4547
4548 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4549 Instead, ignore ECHILD, and throw an error for other errnos.
4550
58c1b36c
PA
45512015-07-10 Pedro Alves <palves@redhat.com>
4552
4553 * event-loop.c (struct callback_event) <data>: Change type to
4554 gdb_client_data instance instead of gdb_client_data pointer.
4555 (append_callback_event): Adjust.
4556
421530db
PL
45572015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4558
4559 * linux-aarch64-low.c: Add comments for each linux_target_ops
4560 method. Remove comments already covered in target_ops and
4561 linux_target_ops definitions.
4562 (the_low_target): Add comments for each unimplemented method.
4563
c2d65f38
YQ
45642015-07-09 Yao Qi <yao.qi@linaro.org>
4565
4566 * linux-aarch64-low.c (aarch64_regmap): Remove.
4567 (aarch64_usrregs_info): Remove.
4568 (regs_info): Set field usrregs to NULL.
4569
b20a6524
MM
45702015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4571
4572 * linux-low.c: Include "rsp-low.h"
4573 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4574 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4575 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4576 (handle_btrace_enable_pt): New.
4577 (handle_btrace_general_set): Support "pt".
4578 (handle_btrace_conf_general_set): Support "pt:size".
4579
96c97461
PL
45802015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4581
4582 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4583 Z_PACKET_SW_BP.
4584
37d66942
PL
45852015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4586
4587 * linux-aarch64-low.c: Remove comment about endianness.
4588 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4589 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4590 memcmp.
4591
dc06243f
GB
45922015-06-24 Gary Benson <gbenson@redhat.com>
4593
4594 * linux-i386-ipa.c (stdint.h): Do not include.
4595 * lynx-i386-low.c (stdint.h): Likewise.
4596 * lynx-ppc-low.c (stdint.h): Likewise.
4597 * mem-break.c (stdint.h): Likewise.
4598 * thread-db.c (stdint.h): Likewise.
4599 * tracepoint.c (stdint.h): Likewise.
4600 * win32-low.c (stdint.h): Likewise.
4601
124e13d9
SM
46022015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4603
4604 * server.c (write_qxfer_response): Update call to
4605 remote_escape_output.
4606
909c2cda
JK
46072015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4608 Jan Kratochvil <jan.kratochvil@redhat.com>
4609
4610 Merge multiple hex conversions.
4611 * gdbreplay.c (tohex): Rename to 'fromhex'.
4612 (logchar): Use fromhex.
4613
24c05f46
JK
46142015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4615
4616 * server.c (handle_qxfer_libraries): Set `version' attribute for
4617 <library-list>.
4618
14d2069a
GB
46192015-06-10 Gary Benson <gbenson@redhat.com>
4620
4621 * target.h (struct target_ops) <multifs_open>: New field.
4622 <multifs_unlink>: Likewise.
4623 <multifs_readlink>: Likewise.
4624 * linux-low.c (nat/linux-namespaces.h): New include.
4625 (linux_target_ops): Initialize the_target->multifs_open,
4626 the_target->multifs_unlink and the_target->multifs_readlink.
4627 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4628 * hostio.c (hostio_fs_pid): New static variable.
4629 (hostio_handle_new_gdb_connection): New function.
4630 (handle_setfs): Likewise.
4631 (handle_open): Use the_target->multifs_open as appropriate.
4632 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4633 (handle_readlink): Use the_target->multifs_readlink as
4634 appropriate.
4635 (handle_vFile): Handle vFile:setfs packets.
4636 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4637 after target_handle_new_gdb_connection.
4638
4b8b5e72
GB
46392015-06-10 Gary Benson <gbenson@redhat.com>
4640
4641 * configure.ac (AC_CHECK_FUNCS): Add setns.
4642 * config.in: Regenerate.
4643 * configure: Likewise.
4644 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4645 (linux-namespaces.o): New rule.
4646 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4647
3ac2e371
GB
46482015-06-09 Gary Benson <gbenson@redhat.com>
4649
4650 * hostio.c (handle_open): Process mode argument with
4651 fileio_to_host_mode.
4652
ca9b78ce
YQ
46532015-06-01 Yao Qi <yao.qi@linaro.org>
4654
4655 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4656 * linux-x86-low.c: Likewise.
4657
bfacd19d
DB
46582015-05-28 Don Breazeal <donb@codesourcery.com>
4659
4660 * linux-low.c (handle_extended_wait): Initialize
4661 thread_info.last_resume_kind for new fork children.
4662
452003ef
PA
46632015-05-15 Pedro Alves <palves@redhat.com>
4664
4665 * target.h (target_handle_new_gdb_connection): Rewrite using if
4666 wrapped in do/while.
4667
1041a03c
JB
46682015-05-14 Joel Brobecker <brobecker@adacore.com>
4669
4670 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4671 * configure, config.in: Regenerate.
4672 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4673 Declare typedef.
4674
c269dbdb
DB
46752015-05-12 Don Breazeal <donb@codesourcery.com>
4676
4677 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4678 PTRACE_EVENT_VFORK_DONE.
4679 (linux_low_ptrace_options, extended_event_reported): Add vfork
4680 events.
4681 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4682 and "vforkdone" for RSP 'T' Stop Reply Packet.
4683 * server.h (report_vfork_events): Declare
4684 global variable.
4685
3a8a0396
DB
46862015-05-12 Don Breazeal <donb@codesourcery.com>
4687
4688 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4689 (the_low_target) <new_fork>: Initialize new member.
4690 * linux-arm-low.c (arm_new_fork): New function.
4691 (the_low_target) <new_fork>: Initialize new member.
4692 * linux-low.c (handle_extended_wait): Call new target function
4693 new_fork.
4694 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4695 * linux-mips-low.c (mips_add_watchpoint): New function
4696 extracted from mips_insert_point.
4697 (the_low_target) <new_fork>: Initialize new member.
4698 (mips_linux_new_fork): New function.
4699 (mips_insert_point): Call mips_add_watchpoint.
4700 * linux-x86-low.c (x86_linux_new_fork): New function.
4701 (the_low_target) <new_fork>: Initialize new member.
4702
de0d863e
DB
47032015-05-12 Don Breazeal <donb@codesourcery.com>
4704
4705 * linux-low.c (handle_extended_wait): Implement return value,
4706 rename argument 'event_child' to 'event_lwp', handle
4707 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4708 (linux_low_ptrace_options): New function.
4709 (linux_low_filter_event): Call linux_low_ptrace_options,
4710 use different argument fo linux_enable_event_reporting,
4711 use return value from handle_extended_wait.
4712 (extended_event_reported): New function.
4713 (linux_wait_1): Call extended_event_reported and set
4714 status to report fork events.
4715 (linux_write_memory): Add pid to debug message.
4716 (reset_lwp_ptrace_options_callback): New function.
4717 (linux_handle_new_gdb_connection): New function.
4718 (linux_target_ops): Initialize new structure member.
4719 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4720 * lynx-low.c: Initialize new structure member.
4721 * remote-utils.c (prepare_resume_reply): Implement stop reason
4722 "fork" for "T" stop message.
4723 * server.c (handle_query): Call handle_new_gdb_connection.
4724 * server.h (report_fork_events): Declare global flag.
4725 * target.h (struct target_ops) <handle_new_gdb_connection>:
4726 New member.
4727 (target_handle_new_gdb_connection): New macro.
4728 * win32-low.c: Initialize new structure member.
4729
ddcbc397
DB
47302015-05-12 Don Breazeal <donb@codesourcery.com>
4731
4732 * mem-break.c (APPEND_TO_LIST): Define macro.
4733 (clone_agent_expr): New function.
4734 (clone_one_breakpoint): New function.
4735 (clone_all_breakpoints): New function.
4736 * mem-break.h: Declare new functions.
4737
89245bc0
DB
47382015-05-12 Don Breazeal <donb@codesourcery.com>
4739
4740 * linux-low.c (linux_supports_fork_events): New function.
4741 (linux_supports_vfork_events): New function.
4742 (linux_target_ops): Initialize new structure members.
4743 (initialize_low): Call linux_check_ptrace_features.
4744 * lynx-low.c (lynx_target_ops): Initialize new structure
4745 members.
4746 * server.c (report_fork_events, report_vfork_events):
4747 New global flags.
4748 (handle_query): Add new features to qSupported packet and
4749 response.
4750 (captured_main): Initialize new global variables.
4751 * target.h (struct target_ops) <supports_fork_events>:
4752 New member.
4753 <supports_vfork_events>: New member.
4754 (target_supports_fork_events): New macro.
4755 (target_supports_vfork_events): New macro.
4756 * win32-low.c (win32_target_ops): Initialize new structure
4757 members.
4758
835205d0
GB
47592015-05-12 Gary Benson <gbenson@redhat.com>
4760
4761 * server.c (handle_qxfer_exec_file): Use current process
4762 if annex is empty.
4763
21e94bd9
SL
47642015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4765
4766 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4767 Remove HAVE_PTRACE_GETREGS conditionals.
4768 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4769 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4770
45614f15
YQ
47712015-05-08 Yao Qi <yao.qi@linaro.org>
4772
4773 * linux-low.c (linux_supports_conditional_breakpoints): New
4774 function.
4775 (linux_target_ops): Install new target method.
4776 * lynx-low.c (lynx_target_ops): Install NULL hook for
4777 supports_conditional_breakpoints.
4778 * nto-low.c (nto_target_ops): Likewise.
4779 * spu-low.c (spu_target_ops): Likewise.
4780 * win32-low.c (win32_target_ops): Likewise.
4781 * server.c (handle_query): Check
4782 target_supports_conditional_breakpoints.
4783 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4784 New field.
4785 (target_supports_conditional_breakpoints): New macro.
4786
80ad801e
PA
47872015-05-06 Pedro Alves <palves@redhat.com>
4788
4789 PR server/18081
4790 * server.c (start_inferior): If the process exits, mourn it.
4791
819843c7
GB
47922015-04-21 Gary Benson <gbenson@redhat.com>
4793
4794 * hostio.c (fileio_open_flags_to_host): Factored out to
4795 fileio_to_host_openflags in common/fileio.c. Single use
4796 updated.
4797
a2d5a9d7
MF
47982015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4799
4800 * linux-xtensa-low.c (xtensa_fill_gregset)
4801 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4802 XCHAL_HAVE_LOOP.
4803
deb44829
MF
48042015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4805
4806 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4807 (regs_info): Replace usrregs pointer with NULL.
4808
e57f1de3
GB
48092015-04-17 Gary Benson <gbenson@redhat.com>
4810
4811 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4812 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4813 * server.c (handle_qxfer_exec_file): New function.
4814 (qxfer_packets): Add exec-file entry.
4815 (handle_query): Report qXfer:exec-file:read as supported packet.
4816
62828379
RN
48172015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4818
4819 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4820
b88bb450
GB
48212015-04-09 Gary Benson <gbenson@redhat.com>
4822
4823 * hostio-errno.c (errno_to_fileio_error): Remove function.
4824 Update caller to use remote_fileio_to_fio_error.
4825
c8f4bfdd
YQ
48262015-04-09 Yao Qi <yao.qi@linaro.org>
4827
4828 * linux-low.c (linux_insert_point): Call
4829 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4830 (linux_remove_point): Call remove_memory_breakpoint if type is
4831 raw_bkpt_type_sw.
4832 * linux-x86-low.c (x86_insert_point): Don't call
4833 insert_memory_breakpoint.
4834 (x86_remove_point): Don't call remove_memory_breakpoint.
4835
41f98f02
PA
48362015-04-01 Pedro Alves <palves@redhat.com>
4837 Cleber Rosa <crosa@redhat.com>
4838
4839 * server.c (gdbserver_usage): Reorganize and extend the usage
4840 message.
4841
2bf6fb9d
PA
48422015-03-24 Pedro Alves <palves@redhat.com>
4843
4844 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4845 output. Also dump TRAP_TRACE.
4846 (linux_low_filter_event): In debug output, distinguish a
4847 resume_stop SIGSTOP from a delayed SIGSTOP.
4848
369f6daa
GB
48492015-03-24 Gary Benson <gbenson@redhat.com>
4850
4851 * linux-x86-low.c (x86_linux_new_thread): Moved to
4852 nat/x86-linux.c.
4853 (x86_linux_prepare_to_resume): Likewise.
4854
8e5d4070
GB
48552015-03-24 Gary Benson <gbenson@redhat.com>
4856
4857 * Makefile.in (x86-linux-dregs.o): New rule.
4858 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4859 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4860 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4861 (x86_linux_dr_get): Likewise.
4862 (x86_linux_dr_set): Likewise.
4863 (update_debug_registers_callback): Likewise.
4864 (x86_linux_dr_set_addr): Likewise.
4865 (x86_linux_dr_get_addr): Likewise.
4866 (x86_linux_dr_set_control): Likewise.
4867 (x86_linux_dr_get_control): Likewise.
4868 (x86_linux_dr_get_status): Likewise.
4869 (x86_linux_update_debug_registers): Likewise.
4870
2b95d440
GB
48712015-03-24 Gary Benson <gbenson@redhat.com>
4872
4873 * linux-x86-low.c (x86_linux_update_debug_registers):
4874 New function, factored out from...
4875 (x86_linux_prepare_to_resume): ...this.
4876
14b0bc68
GB
48772015-03-24 Gary Benson <gbenson@redhat.com>
4878
4879 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4880 (x86_linux_dr_set): Likewise.
4881 (update_debug_registers_callback): Likewise.
4882 (x86_linux_dr_set_addr): Likewise.
4883 (x86_linux_dr_get_addr): Likewise.
4884 (x86_linux_dr_set_control): Likewise.
4885 (x86_linux_dr_get_control): Likewise.
4886 (x86_linux_dr_get_status): Likewise.
4887 (x86_linux_prepare_to_resume): Likewise.
4888
5dfe6ca8
GB
48892015-03-24 Gary Benson <gbenson@redhat.com>
4890
4891 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4892 Use perror_with_name. Pass string through gettext.
4893 (x86_linux_dr_set): Likewise.
4894
d33472ad
GB
48952015-03-24 Gary Benson <gbenson@redhat.com>
4896
4897 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4898 (x86_linux_dr_set_addr): ...this.
4899 (x86_dr_low_get_addr): Rename to...
4900 (x86_linux_dr_get_addr): ...this.
4901 (x86_dr_low_set_control): Rename to...
4902 (x86_linux_dr_set_control): ...this.
4903 (x86_dr_low_get_control): Rename to...
4904 (x86_linux_dr_get_control): ...this.
4905 (x86_dr_low_get_status): Rename to...
4906 (x86_linux_dr_get_status): ...this.
4907 (x86_dr_low): Update with new function names.
4908
4b134ca1
GB
49092015-03-24 Gary Benson <gbenson@redhat.com>
4910
4911 * Makefile.in (x86-linux.o): New rule.
4912 * configure.srv: Add x86-linux.o to relevant targets.
4913 * linux-low.c (lwp_set_arch_private_info): New function.
4914 (lwp_arch_private_info): Likewise.
4915 * linux-x86-low.c: Include nat/x86-linux.h.
4916 (arch_lwp_info): Removed structure.
4917 (update_debug_registers_callback):
4918 Use lwp_set_debug_registers_changed.
4919 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4920 and lwp_set_debug_registers_changed.
4921 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4922
34c703da
GB
49232015-03-24 Gary Benson <gbenson@redhat.com>
4924
4925 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4926 * linux-arm-low.c (arm_new_thread): Likewise.
4927 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4928 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4929 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4930 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4931
cff068da
GB
49322015-03-24 Gary Benson <gbenson@redhat.com>
4933
4934 * linux-low.c (ptid_of_lwp): New function.
4935 (lwp_is_stopped): Likewise.
4936 (lwp_stop_reason): Likewise.
4937 * linux-x86-low.c (update_debug_registers_callback):
4938 Use lwp_is_stopped.
4939 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4940 lwp_stop_reason.
4941
b2f7c7e8
GB
49422015-03-24 Gary Benson <gbenson@redhat.com>
4943
4944 * linux-low.h (linux_stop_lwp): Remove declaration.
4945
6d4ee8c6
GB
49462015-03-24 Gary Benson <gbenson@redhat.com>
4947
4948 * linux-low.h: Include nat/linux-nat.h.
4949 * linux-low.c (iterate_over_lwps_args): New structure.
4950 (iterate_over_lwps_filter): New function.
4951 (iterate_over_lwps): Likewise.
4952 * linux-x86-low.c (update_debug_registers_callback):
4953 Update signature to what iterate_over_lwps expects.
4954 Remove PID check that iterate_over_lwps now performs.
4955 (x86_dr_low_set_addr): Use iterate_over_lwps.
4956 (x86_dr_low_set_control): Likewise.
4957
70a0bb6b
GB
49582015-03-24 Gary Benson <gbenson@redhat.com>
4959
4960 * linux-x86-low.c (x86_debug_reg_state): New function.
4961 (x86_linux_prepare_to_resume): Use the above.
4962
7b669087
GB
49632015-03-24 Gary Benson <gbenson@redhat.com>
4964
4965 * linux-low.c (current_lwp_ptid): New function.
4966 * linux-x86-low.c: Include nat/linux-nat.h.
4967 (x86_dr_low_get_addr): Use current_lwp_ptid.
4968 (x86_dr_low_get_control): Likewise.
4969 (x86_dr_low_get_status): Likewise.
4970
eef49a3d
PA
49712015-03-20 Pedro Alves <palves@redhat.com>
4972
4973 * tracepoint.c (cmd_qtstatus): Make "str" const.
4974
b2333d22
PA
49752015-03-20 Pedro Alves <palves@redhat.com>
4976
4977 * server.c (handle_general_set): Make "req_str" const.
4978
23f238d3
PA
49792015-03-19 Pedro Alves <palves@redhat.com>
4980
4981 * linux-low.c (linux_resume_one_lwp): Rename to ...
4982 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4983 instead call perror_with_name.
4984 (check_ptrace_stopped_lwp_gone): New function.
4985 (linux_resume_one_lwp): Reimplement as wrapper around
4986 linux_resume_one_lwp_throw that swallows errors if the LWP is
4987 gone.
4988
91baf43f
PA
49892015-03-19 Pedro Alves <palves@redhat.com>
4990
4991 * linux-low.c (count_events_callback, select_event_lwp_callback):
4992 No longer check whether the thread has resume_stop as last resume
4993 kind.
4994
8bf3b159
PA
49952015-03-19 Pedro Alves <palves@redhat.com>
4996
4997 * linux-low.c (count_events_callback, select_event_lwp_callback):
4998 Use the lwp's status_pending_p field, not the thread's.
4999
b90fc188
PA
50002015-03-19 Pedro Alves <palves@redhat.com>
5001
5002 * linux-low.c (select_event_lwp_callback): Update comments to
5003 no longer mention SIGTRAP.
5004
464b0089
GB
50052015-03-18 Gary Benson <gbenson@redhat.com>
5006
5007 * server.c (handle_query): Do not report vFile:fstat as supported.
5008
aa9e327f
GB
50092015-03-11 Gary Benson <gbenson@redhat.com>
5010
5011 * hostio.c (sys/types.h): New include.
5012 (sys/stat.h): Likewise.
5013 (common-remote-fileio.h): Likewise.
5014 (handle_fstat): New function.
5015 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5016
791c0056
GB
50172015-03-11 Gary Benson <gbenson@redhat.com>
5018
5019 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5020 struct stat.st_blocks and struct stat.st_blksize.
5021 * configure: Regenerate.
5022 * config.in: Likewise.
5023 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5024 (OBS): Add common-remote-fileio.o.
5025 (common-remote-fileio.o): New rule.
5026
9a9df970
PA
50272015-03-09 Pedro Alves <palves@redhat.com>
5028
5029 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5030 'struct sockaddr' pointer in 'accept' call.
5031
9eb1356e
PA
50322015-03-09 Pedro Alves <palves@redhat.com>
5033
5034 Revert:
5035 2015-03-07 Pedro Alves <palves@redhat.com>
5036 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5037 or <winsock2.h> here. Instead include "gdb_socket.h".
5038 (remote_open): Use union gdb_sockaddr_u.
5039 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5040 or <winsock2.h> here. Instead include "gdb_socket.h".
5041 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5042 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5043 or <sys/un.h>.
5044 (init_named_socket, gdb_agent_helper_thread): Use union
5045 gdb_sockaddr_u.
5046
aac331e4
PA
50472015-03-07 Pedro Alves <palves@redhat.com>
5048
5049 * configure.ac (build_warnings): Move
5050 -Wdeclaration-after-statement to the C-specific set.
5051 * configure: Regenerate.
5052
366c75fc
PA
50532015-03-07 Pedro Alves <palves@redhat.com>
5054
5055 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5056 or <winsock2.h> here. Instead include "gdb_socket.h".
5057 (remote_open): Use union gdb_sockaddr_u.
5058 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5059 or <winsock2.h> here. Instead include "gdb_socket.h".
5060 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5061 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5062 or <sys/un.h>.
5063 (init_named_socket, gdb_agent_helper_thread): Use union
5064 gdb_sockaddr_u.
5065
492d29ea
PA
50662015-03-07 Pedro Alves <palves@redhat.com>
5067
5068 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5069 instead.
5070
60a191ed
YQ
50712015-03-06 Yao Qi <yao.qi@linaro.org>
5072
5073 * linux-aarch64-low.c (aarch64_insert_point): Use
5074 show_debug_regs as a boolean.
5075 (aarch64_remove_point): Likewise.
5076
f5771b1d
PA
50772015-03-05 Pedro Alves <palves@redhat.com>
5078
5079 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5080 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5081 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5082 * nto-low.c (nto_target_ops): Likewise.
5083 * spu-low.c (spu_target_ops): Likewise.
5084 * win32-low.c (win32_target_ops): Likewise.
5085
3e572f71
PA
50862015-03-04 Pedro Alves <palves@redhat.com>
5087
72f4393d 5088 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5089 Decide whether a breakpoint triggered based on the SIGTRAP's
5090 siginfo.si_code.
72f4393d
L
5091 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5092 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5093 (linux_low_filter_event): Check for breakpoints before checking
5094 watchpoints.
5095 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5096 siginfo.si_code.
72f4393d
L
5097 (linux_stopped_by_sw_breakpoint)
5098 (linux_supports_stopped_by_sw_breakpoint)
5099 (linux_stopped_by_hw_breakpoint)
5100 (linux_supports_stopped_by_hw_breakpoint): New functions.
5101 (linux_target_ops): Install new target methods.
3e572f71 5102
1ec68e26
PA
51032015-03-04 Pedro Alves <palves@redhat.com>
5104
5105 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5106 * server.c (swbreak_feature, hwbreak_feature): New globals.
5107 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5108 (captured_main): Clear swbreak_feature and hwbreak_feature.
5109 * server.h (swbreak_feature, hwbreak_feature): Declare.
5110 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5111 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5112 supports_stopped_by_hw_breakpoint>: New fields.
5113 (target_supports_stopped_by_sw_breakpoint)
5114 (target_stopped_by_sw_breakpoint)
5115 (target_supports_stopped_by_hw_breakpoint)
5116 (target_stopped_by_hw_breakpoint): Declare.
5117
15c66dd6
PA
51182015-03-04 Pedro Alves <palves@redhat.com>
5119
5120 enum lwp_stop_reason -> enum target_stop_reason
5121 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5122 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5123 (linux_wait_1, stuck_in_jump_pad_callback)
5124 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5125 (linux_stopped_by_watchpoint):
5126 * linux-low.h (enum lwp_stop_reason): Delete.
5127 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5128 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5129
98fc70d6
YQ
51302015-03-04 Yao Qi <yao.qi@linaro.org>
5131
5132 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5133
dd2ac174
GB
51342015-03-03 Gary Benson <gbenson@redhat.com>
5135
5136 * hostio.c (handle_vFile): Fix prefix lengths.
5137
d68e53f4
MM
51382015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5139
5140 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5141 ptr_bits.
5142
bf2d68ab
AA
51432015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5144
5145 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5146 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5147 (clean): Add "rm -f" for above C files.
5148 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5149 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5150 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5151 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5152 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5153 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5154 (init_registers_s390x_vx_linux64)
5155 (init_registers_s390x_tevx_linux64)
5156 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5157 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5158 declarations.
5159 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5160 (s390_store_vxrs_high): New functions.
5161 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5162 NT_S390_VXRS_HIGH.
5163 (s390_arch_setup): Add logic for selecting one of the new target
5164 descriptions. Activate the new vector regsets if applicable.
5165 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5166 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5167 and init_registers_s390x_tevx_linux64.
5168
c966a859
PA
51692015-03-01 Pedro Alves <palves@redhat.com>
5170
5171 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5172 parameter.
5173
4180215b
PA
51742015-02-27 Pedro Alves <palves@redhat.com>
5175
5176 * linux-x86-low.c (u_debugreg_offset): New function.
5177 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5178
749bab01
PA
51792015-02-27 Pedro Alves <palves@redhat.com>
5180
5181 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5182 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5183 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5184 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5185 (ps_lsetfpregs, ps_getpid)
5186 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5187 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5188 (ps_lsetxregs, ps_plog): Declare.
5189
3c14e5a3
PA
51902015-02-27 Pedro Alves <palves@redhat.com>
5191
5192 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5193 IP_AGENT_EXPORT_FUNC.
5194 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5195 IP_AGENT_EXPORT_FUNC.
5196 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5197 (IP_AGENT_EXPORT): Delete.
5198 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5199 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5200 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5201 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5202 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5203 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5204 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5205 (traceframe_read_count, traceframe_write_count)
5206 (traceframes_created, trace_state_variables, get_raw_reg)
5207 (get_trace_state_variable_value, set_trace_state_variable_value)
5208 (ust_loaded, helper_thread_id, cmd_buf): Use
5209 IPA_SYM_EXPORTED_NAME.
5210 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5211 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5212 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5213 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5214 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5215 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5216 EXTERN_C_PUSH/EXTERN_C_POP.
5217 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5218 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5219 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5220 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5221 (traceframe_write_count, traceframe_read_count)
5222 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5223 (about_to_request_buffer_space, get_trace_state_variable_value)
5224 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5225 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5226 EXTERN_C_PUSH/EXTERN_C_POP.
5227 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5228 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5229 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5230 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5231 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5232 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5233 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5234 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5235 Define.
5236 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5237 (IP_AGENT_EXPORT_VAR_DECL): Define.
5238 (tracing): Declare.
5239 (gdb_agent_get_raw_reg): Declare.
5240
fe978cb0
PA
52412015-02-27 Tom Tromey <tromey@redhat.com>
5242 Pedro Alves <palves@redhat.com>
5243
5244 Rename symbols whose names are reserved C++ keywords throughout.
5245
3bc3d82a
PA
52462015-02-27 Pedro Alves <palves@redhat.com>
5247
5248 * Makefile.in (COMPILER): New, get it from autoconf.
5249 (CXX): Get from autoconf instead.
5250 (COMPILE.pre): Use COMPILER.
5251 (CC-LD): Rename to ...
5252 (CC_LD): ... this. Use COMPILER.
5253 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5254 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5255 * acinclude.m4: Include build-with-cxx.m4.
5256 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5257 Disable -Werror by default if building in C++ mode.
5258 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5259 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5260 the C++ compiler. Save/restore CXXFLAGS too.
5261 * configure: Regenerate.
5262
07697489
PA
52632015-02-27 Pedro Alves <palves@redhat.com>
5264
5265 * acinclude.m4: Include libiberty.m4.
5266 * configure.ac: Call libiberty_INIT.
5267 * config.in, configure: Regenerate.
5268
9beb7c4e
PA
52692015-02-26 Pedro Alves <palves@redhat.com>
5270
5271 * linux-low.c (linux_wait_1): When incrementing the PC past a
5272 program breakpoint always use the_low_target.breakpoint_len as
5273 increment, rather than the maximum between that and
5274 the_low_target.decr_pc_after_break.
5275
8090aef2
PA
52762015-02-23 Pedro Alves <palves@redhat.com>
5277
5278 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5279 thread was doing a step-over; always adjust the PC if
5280 we stepped over a permanent breakpoint.
5281 (linux_wait_1): If we stepped over breakpoint that was on top of a
5282 permanent breakpoint, manually advance the PC past it.
5283
bc9540e8
PA
52842015-02-23 Pedro Alves <palves@redhat.com>
5285
5286 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5287 modes.
5288 (x86_fill_gregset, x86_store_gregset): Use it when handling
5289 $orig_eax.
5290
2db9a427
PA
52912015-02-20 Pedro Alves <palves@redhat.com>
5292
5293 * thread-db.c: Include "nat/linux-procfs.h".
5294 (thread_db_init): Skip listing new threads if the kernel supports
5295 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5296
afa8d396
PA
52972015-02-20 Pedro Alves <palves@redhat.com>
5298
5299 * linux-low.c (status_pending_p_callback): Use ptid_match.
5300
c9587f88
AT
53012015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5302
5303 PR breakpoints/16812
5304 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5305 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5306 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5307
b05ec7a5
AT
53082015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5309
5310 PR breakpoints/15956
5311 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5312
d33501a5
MM
53132015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5314
5315 * linux-low.c (linux_low_btrace_conf): Print size.
5316 * server.c (handle_btrace_conf_general_set): New.
5317 (hanle_general_set): Call handle_btrace_conf_general_set.
5318 (handle_query): Report Qbtrace-conf:bts:size as supported.
5319
f4abbc16
MM
53202015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5321
5322 * linux-low.c (linux_low_enable_btrace): Update parameters.
5323 (linux_low_btrace_conf): New.
5324 (linux_target_ops)<to_btrace_conf>: Initialize.
5325 * server.c (current_btrace_conf): New.
5326 (handle_btrace_enable): Rename to ...
5327 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5328 to target_enable_btrace. Update comment. Update users.
5329 (handle_qxfer_btrace_conf): New.
5330 (qxfer_packets): Add btrace-conf entry.
5331 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5332 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5333 (target_ops)<read_btrace_conf>: New.
5334 (target_enable_btrace): Update parameters.
5335 (target_read_btrace_conf): New.
5336
043c3577
MM
53372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5338
5339 * server.c (handle_btrace_general_set): Remove call to
5340 target_supports_btrace.
5341 (supported_btrace_packets): New.
5342 (handle_query): Call supported_btrace_packets.
5343 * target.h: include btrace-common.h.
5344 (btrace_target_info): Removed.
5345 (supports_btrace, target_supports_btrace): Update parameters.
5346
734b0e4b
MM
53472015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5348
5349 * Makefile.in (SFILES): Add common/btrace-common.c.
5350 (OBS): Add common/btrace-common.o.
5351 (btrace-common.o): Add build rules.
5352 * linux-low: Include btrace-common.h.
5353 (linux_low_read_btrace): Use struct btrace_data. Call
5354 btrace_data_init and btrace_data_fini.
5355
d6c146e9
PA
53562015-02-06 Pedro Alves <palves@redhat.com>
5357
5358 * thread-db.c (find_new_threads_callback): Add debug output.
5359
20ba1ce6
PA
53602015-02-04 Pedro Alves <palves@redhat.com>
5361
5362 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5363 (resume_stopped_resumed_lwps): New function.
5364 (linux_wait_for_event_filtered): Use it.
5365
8cc73a39
SDJ
53662015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5367
5368 * Makefile.in (SFILES): Add linux-personality.c.
5369 (linux-personality.o): New rule.
5370 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5371 list of objects to be built.
5372 * linux-low.c: Include nat/linux-personality.h.
5373 (linux_create_inferior): Remove code to disable address space
5374 randomization (moved to ../nat/linux-personality.c). Create
5375 cleanup to disable address space randomization.
5376
fb23d554
SDJ
53772015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5378
5379 * Makefile.in (posix-strerror.o): New rule.
5380 (mingw-strerror.o): Likewise.
5381 * configure: Regenerated.
5382 * configure.ac: Source file ../common/common.host. Initialize new
5383 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5384
cdf43629
YQ
53852015-01-14 Yao Qi <yao@codesourcery.com>
5386
5387 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5388 (ppc-linux.o): New rule.
5389 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5390 * configure.ac: AC_CHECK_FUNCS(getauxval).
5391 * config.in: Re-generated.
5392 * configure: Re-generated.
5393 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5394 ppc64_64bit_inferior_p
5395
514c5338
YQ
53962015-01-14 Yao Qi <yao@codesourcery.com>
5397
5398 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5399 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5400 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5401 (PT_ORIG_R3, PT_TRAP): Likewise.
5402 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5403 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5404 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5405
3368c1e5
JB
54062015-01-10 Joel Brobecker <brobecker@adacore.com>
5407
5408 * i387-fp.c (i387_cache_to_xsave): In look over
5409 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5410 zmmh_low_space field by use of zmmh_high_space.
5411
582511be
PA
54122015-01-09 Pedro Alves <palves@redhat.com>
5413
5414 * linux-low.c (step_over_bkpt): Move higher up in the file.
5415 (handle_extended_wait): Don't store the stop_pc here.
5416 (get_stop_pc): Adjust comments and rename to ...
5417 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5418 stopped for a software breakpoint or hardware breakpoint.
5419 (thread_still_has_status_pending_p): New function.
5420 (status_pending_p_callback): Use
5421 thread_still_has_status_pending_p. If the event is no longer
5422 interesting, resume the LWP.
5423 (handle_tracepoints): Add assert.
5424 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5425 (wstatus_maybe_breakpoint): New function.
5426 (cancel_breakpoint): Delete function.
5427 (check_stopped_by_watchpoint): New function, factored out from
5428 linux_low_filter_event.
5429 (lp_status_maybe_breakpoint): Delete function.
5430 (linux_low_filter_event): Remove filter_ptid argument.
5431 Leave thread group exits pending here. Store the LWP's stop PC.
5432 Always leave events pending.
5433 (linux_wait_for_event_filtered): Pull all events out of the
5434 kernel, and leave them all pending.
5435 (count_events_callback, select_event_lwp_callback): Consider all
5436 events.
5437 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5438 (select_event_lwp): Only give preference to the stepping LWP in
5439 all-stop mode. Adjust comments.
5440 (ignore_event): New function.
5441 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5442 references to cancel_breakpoints. Adjust to renames. Also give
5443 equal priority to all LWPs that have had events in non-stop mode.
5444 If reporting a software breakpoint event, unadjust the LWP's PC.
5445 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5446 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5447 Adjust.
5448 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5449 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5450 (linux_stopped_by_watchpoint): Adjust.
5451 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5452 * linux-low.h (enum lwp_stop_reason): New.
5453 (struct lwp_info) <stop_pc>: Adjust comment.
5454 <stopped_by_watchpoint>: Delete field.
5455 <stop_reason>: New field.
5456 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5457 * mem-break.c (software_breakpoint_inserted_here)
5458 (hardware_breakpoint_inserted_here): New function.
5459 * mem-break.h (software_breakpoint_inserted_here)
5460 (hardware_breakpoint_inserted_here): Declare.
5461 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5462 (cancel_breakpoints): Delete.
5463 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5464 (upload_fast_traceframes): Remove references to
5465 cancel_breakpoints.
5466
a33e3959
PA
54672015-01-09 Pedro Alves <palves@redhat.com>
5468
5469 * thread-db.c (find_new_threads_callback): Ignore thread if the
5470 kernel thread ID is -1.
5471
8784d563
PA
54722015-01-09 Pedro Alves <palves@redhat.com>
5473
5474 * linux-low.c (linux_attach_fail_reason_string): Move to
5475 nat/linux-ptrace.c, and rename.
5476 (linux_attach_lwp): Update comment.
5477 (attach_proc_task_lwp_callback): New function.
5478 (linux_attach): Adjust to rename and use
5479 linux_proc_attach_tgid_threads.
5480 (linux_attach_fail_reason_string): Delete declaration.
5481
76f2b779
JB
54822015-01-01 Joel Brobecker <brobecker@adacore.com>
5483
5484 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5485 * server.c (gdbserver_version): Likewise.
5486
fafcc06a
SDJ
54872014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5488
5489 * remote-utils.c: Include ctype.h.
5490 (input_interrupt): Explicitly handle the case when the char
5491 received is the NUL byte. Improve the printing of non-ASCII
5492 characters.
5493
beed38b8
JB
54942014-12-16 Joel Brobecker <brobecker@adacore.com>
5495
5496 * linux-low.c (linux_low_filter_event): Update call to
5497 linux_enable_event_reporting following the addition of
5498 a new parameter to that function.
5499
bf330350
CU
55002014-12-16 Catalin Udma <catalin.udma@freescale.com>
5501
5502 PR server/17457
5503 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5504 (AARCH64_FPCR_REGNO): Likewise.
5505 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5506 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5507 (aarch64_store_fpregset): Likewise.
5508
5227d625
JB
55092014-12-15 Joel Brobecker <brobecker@adacore.com>
5510
5511 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5512 Remove FIXME comment about assumption about N.
5513
f93b65a0
JB
55142014-12-13 Joel Brobecker <brobecker@adacore.com>
5515
5516 * configure.ac: If large-file support is disabled in GDBserver,
5517 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5518 * configure: Regenerate.
5519
e5a9158d
AA
55202014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5521
5522 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5523 warning upon ENODATA from ptrace.
5524 * linux-s390-low.c (s390_store_tdb): New.
5525 (s390_regsets): Add regset for NT_S390_TDB.
5526
feea5f36
AA
55272014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5528
5529 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5530 without a fill_function.
5531 * linux-s390-low.c (s390_fill_last_break): Remove.
5532 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5533 (s390_arch_setup): Use regset's size instead of fill_function for
5534 loop end condition.
5535
098dbe61
AA
55362014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5537
5538 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5539 the regset's store function when ptrace returned an error.
5540 * regcache.c (get_thread_regcache): Invalidate register cache
5541 before fetching inferior's registers.
5542
28eef672
AA
55432014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5544
5545 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5546 while-loop as for-loop.
5547 (regsets_store_inferior_registers): Likewise.
5548
bdca27a2
YQ
55492014-11-28 Yao Qi <yao@codesourcery.com>
5550
5551 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5552 * config.in, configure: Re-generate.
5553 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5554 is defined.
5555
9c232dda
YQ
55562014-11-21 Yao Qi <yao@codesourcery.com>
5557
5558 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5559 (AC_CHECK_HEADERS): Remove malloc.h.
5560 * configure: Re-generated.
5561 * config.in: Re-generated.
5562 * server.h: Don't include alloca.h and malloc.h.
5563 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5564 Don't include malloc.h.
5565
43968415
JB
55662014-11-17 Joel Brobecker <brobecker@adacore.com>
5567
5568 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5569 corresponding ERRNO check in same block.
5570
40e91bc7
PA
55712014-11-12 Pedro Alves <palves@redhat.com>
5572
5573 * server.c (cont_thread): Update comment.
5574 (start_inferior, attach_inferior): No longer clear cont_thread.
5575 (handle_v_cont): No longer set cont_thread.
5576 (captured_main): Clear cont_thread each time a GDB connects.
5577
c2c118cf
PA
55782014-11-12 Pedro Alves <palves@redhat.com>
5579
5580 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5581 thread, and don't resume all threads if the Hc thread has exited.
5582
78708b7c
PA
55832014-11-12 Pedro Alves <palves@redhat.com>
5584
5585 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5586 the process group instead of to a specific LWP.
5587
a2abc7de
PA
55882014-10-15 Pedro Alves <palves@redhat.com>
5589
5590 PR server/17487
5591 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5592 parameter.
5593 (arm_set_thread_context): Delete.
5594 (the_low_target): Adjust.
5595 * win32-i386-low.c (debug_registers_changed)
5596 (debug_registers_used): Delete.
5597 (update_debug_registers_callback): New function.
5598 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5599 needing to update their debug registers.
5600 (win32_get_current_dr): New function.
5601 (x86_dr_low_get_addr, x86_dr_low_get_control)
5602 (x86_dr_low_get_status): Fetch the debug register from the thread
5603 record's context.
5604 (i386_initial_stuff): Adjust.
5605 (i386_get_thread_context): Remove current_event parameter. Don't
5606 clear debug_registers_changed nor copy DR values to
5607 debug_reg_state.
5608 (i386_set_thread_context): Delete.
5609 (i386_prepare_to_resume): New function.
5610 (i386_thread_added): Mark the thread as needing to update irs
5611 debug registers.
5612 (the_low_target): Remove i386_set_thread_context and install
5613 i386_prepare_to_resume.
5614 * win32-low.c (win32_get_thread_context): Adjust.
5615 (win32_set_thread_context): Use SetThreadContext
5616 directly.
5617 (win32_prepare_to_resume): New function.
5618 (win32_require_context): New function, factored out from ...
5619 (thread_rec): ... this.
5620 (continue_one_thread): Call win32_prepare_to_resume on each thread
5621 we're about to continue.
5622 (win32_resume): Call win32_prepare_to_resume on the event thread.
5623 * win32-low.h (struct win32_thread_info)
5624 <debug_registers_changed>: New field.
5625 (struct win32_target_ops): Change prototype of set_thread_context,
5626 delete set_thread_context and add prepare_to_resume.
5627 (win32_require_context): New declaration.
5628
a442d071
GB
56292014-10-08 Gary Benson <gbenson@redhat.com>
5630
5631 * server.h: Do not include common-exceptions.h.
5632
6f1947e8
GB
56332014-10-08 Gary Benson <gbenson@redhat.com>
5634
5635 * server.h: Do not include cleanups.h.
5636
63b434a4
JH
56372014-09-30 James Hogan <james.hogan@imgtec.com>
5638
5639 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5640 mips64-dsp-linux.c.
5641
c4d9ceb6
YQ
56422014-09-23 Yao Qi <yao@codesourcery.com>
5643
5644 * linux-low.c (lp_status_maybe_breakpoint): New function.
5645 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5646 (count_events_callback): Likewise.
5647 (select_event_lwp_callback): Likewise.
5648 (cancel_breakpoints_callback): Likewise.
5649
89a5711c
DB
56502014-09-19 Don Breazeal <donb@codesourcery.com>
5651
5652 * linux-low.c (handle_extended_wait): Call
5653 linux_ptrace_get_extended_event.
5654 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5655 linux_is_extended_waitstatus.
5656
bffc0964
JB
56572014-09-16 Joel Brobecker <brobecker@adacore.com>
5658
5659 * Makefile.in (CPPFLAGS): Define.
5660 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5661 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5662
0bfdf32f
GB
56632014-09-16 Gary Benson <gbenson@redhat.com>
5664
5665 * inferiors.h (current_inferior): Renamed as...
5666 (current_thread): New variable. All uses updated.
5667 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5668 (maybe_move_out_of_jump_pad): Likewise.
5669 (cancel_breakpoint): Likewise.
5670 (linux_low_filter_event): Likewise.
5671 (wait_for_sigstop): Likewise.
5672 (linux_resume_one_lwp): Likewise.
5673 (need_step_over_p): Likewise.
5674 (start_step_over): Likewise.
5675 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5676 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5677 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5678 and save_inferior as saved_thread.
5679 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5680 saved_thread.
5681 (regcache_invalidate_thread): Likewise.
5682 * remote-utils.c (prepare_resume_reply): Likewise.
5683 * thread-db.c (thread_db_get_tls_address): Likewise.
5684 (disable_thread_event_reporting): Likewise.
5685 (remove_thread_event_breakpoints): Likewise.
5686 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5687 as saved_thread.
5688 * target.h (set_desired_inferior): Renamed as...
5689 (set_desired_thread): New declaration. All uses updated.
5690 * server.c (myresume): Updated comment to reference thread instead
5691 of inferior.
5692 (handle_serial_event): Likewise.
5693 (handle_target_event): Likewise.
5694
361c8ade
GB
56952014-09-12 Tom Tromey <tromey@redhat.com>
5696 Gary Benson <gbenson@redhat.com>
5697
5698 * regcache.h: Include common-regcache.h.
5699 (regcache_read_pc): Don't declare.
5700 * regcache.c (get_thread_regcache_for_ptid): New function.
5701
bd9269f7
GB
57022014-09-11 Tom Tromey <tromey@redhat.com>
5703 Gary Benson <gbenson@redhat.com>
5704
5705 * symbol.c: New file.
5706 * Makefile.in (SFILES): Add symbol.c.
5707 (OBS): Add symbol.o.
5708
f8c1d06b
GB
57092014-09-11 Gary Benson <gbenson@redhat.com>
5710
5711 * target.c (target_stop_ptid, target_continue_ptid): New
5712 functions.
5713
721ec300
GB
57142014-09-11 Tom Tromey <tromey@redhat.com>
5715 Gary Benson <gbenson@redhat.com>
5716
5717 * target.h: Include target/target.h.
5718 * target.c (target_read_memory, target_read_uint32)
5719 (target_write_memory): New functions.
5720
c5e92cca
GB
57212014-09-11 Gary Benson <gbenson@redhat.com>
5722
5723 * server.h (debug_hw_points): Don't declare.
5724 * server.c (debug_hw_points): Don't define. Replace all uses
5725 with show_debug_regs.
5726 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5727 all uses with show_debug_regs.
5728
2e4bb98a
EBM
57292014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5730
5731 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5732 endianness into account.
5733 (ppc_supply_ptrace_register): Likewise.
5734
ac740bc7
JH
57352014-09-03 James Hogan <james.hogan@imgtec.com>
5736
5737 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5738 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5739
97ea6506
GB
57402014-09-03 Gary Benson <gbenson@redhat.com>
5741
5742 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5743 ALL_DEBUG_ADDRESS_REGISTERS.
5744
df7e5265
GB
57452014-09-02 Gary Benson <gbenson@redhat.com>
5746
5747 * i386-low.h: Renamed as...
5748 * x86-low.h: New file. All type, function and variable name
5749 prefixes changed from "i386_" to "x86_". All references updated.
5750 * i386-low.c: Renamed as...
5751 * x86-low.c: New file. All type, function and variable name
5752 prefixes changed from "i386_" to "x86_". All references updated.
5753
ed859da7
GB
57542014-09-02 Gary Benson <gbenson@redhat.com>
5755
5756 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5757 (x86_linux_new_thread): Likewise.
5758
860789c7
GB
57592014-08-29 Gary Benson <gbenson@redhat.com>
5760
5761 * server.h (setjmp.h): Do not include.
5762 (toplevel): Do not declare.
5763 (common-exceptions.h): Include.
5764 (cleanups.h): Likewise.
5765 * server.c (toplevel): Do not define.
5766 (exit_code): New static global.
5767 (detach_or_kill_for_exit_cleanup): New function.
5768 (main): New function. Original main renamed to...
5769 (captured_main): New function.
5770 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5771
ff55e1b5
GB
57722014-08-29 Gary Benson <gbenson@redhat.com>
5773
5774 * Makefile.in (SFILES): Add common/common-exceptions.c.
5775 (OBS): Add common-exceptions.o.
5776 (common-exceptions.o): New rule.
5777 * utils.c (prepare_to_throw_exception): New function.
5778
e9bcb658
GB
57792014-08-29 Gary Benson <gbenson@redhat.com>
5780
5781 * config.in: Regenerate.
5782 * configure: Likewise.
5783
e3180625
GB
57842014-08-29 Gary Benson <gbenson@redhat.com>
5785
5786 * Makefile.in (SFILES): Add common/cleanups.c.
5787 (OBS): cleanups.o.
5788 (cleanups.o): New rule.
5789
e3d6ba5d
GB
57902014-08-29 Gary Benson <gbenson@redhat.com>
5791
5792 * utils.c (internal_vwarning): New function.
5793
7096e886
GB
57942014-08-28 Gary Benson <gbenson@redhat.com>
5795
5796 * utils.h (fatal): Remove declaration.
5797 * utils.c (fatal): Remove function.
5798
14ce3192
GB
57992014-08-28 Gary Benson <gbenson@redhat.com>
5800
5801 * tracepoint.c (gdb_agent_init): Replace fatal with
5802 perror_with_name.
5803 (initialize_tracepoint): Likewise.
5804
50278d59
GB
58052014-08-28 Gary Benson <gbenson@redhat.com>
5806
5807 * remote-utils.c (remote_prepare): Replace fatal with error.
5808
aa96c426
GB
58092014-08-28 Gary Benson <gbenson@redhat.com>
5810
5811 * linux-low.c (linux_async): Replace fatal with warning.
5812 Tidy up and return.
5813 (linux_start_non_stop): Return -1 if linux_async failed.
5814
f7160e97
GB
58152014-08-28 Gary Benson <gbenson@redhat.com>
5816
5817 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5818 gdb_assert.
5819 (i386_dr_low_get_addr): Remove vague comment.
5820 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5821 gdb_assert.
5822
38e08fca
GB
58232014-08-28 Gary Benson <gbenson@redhat.com>
5824
5825 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5826 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5827 internal_error.
5828 (linux_resume_one_lwp): Likewise.
5829 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5830 gdb_assert.
5831 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5832 with internal_error.
5833 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5834 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5835 (find_register_by_name): Replace fatal with internal_error.
5836 (find_regno): Likewise.
5837 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5838 * thread-db.c (thread_db_create_event): Likewise.
5839 (thread_db_load_search): Likewise.
5840 (try_thread_db_load_1): Likewise.
5841 * tracepoint.c (get_jump_space_head): Replace fatal with
5842 internal_error.
5843 (claim_trampoline_space): Likewise.
5844 (have_fast_tracepoint_trampoline_buffer): Likewise.
5845 (cmd_qtstart): Likewise.
5846 (stop_tracing): Likewise.
5847 (fast_tracepoint_collecting): Likewise.
5848 (target_malloc): Likewise.
5849 (download_tracepoint): Likewise.
5850 (download_trace_state_variables): Replace check with gdb_assert.
5851 (upload_fast_traceframes): Replace fatal with internal_error.
5852
34abf635
GB
58532014-08-19 Tom Tromey <tromey@redhat.com>
5854 Gary Benson <gbenson@redhat.com>
5855
5856 * Makefile.in (SFILES): Add common/common-debug.c.
5857 (OBS): Add common-debug.o.
5858 (common-debug.o): New rule.
5859 * debug.h (debug_printf): Don't declare.
5860 * debug.c (debug_printf): Renamed and rewritten as...
5861 (debug_vprintf): New function.
5862
f6e94d78
GB
58632014-08-19 Gary Benson <gbenson@redhat.com>
5864
5865 * utils.h: Do not include print-utils.h.
5866
9239eeab
GB
58672014-08-19 Tom Tromey <tromey@redhat.com>
5868 Gary Benson <gbenson@redhat.com>
5869
5870 * server.h: Add static assertion.
5871 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5872
ef87c8bb
GB
58732014-08-19 Tom Tromey <tromey@redhat.com>
5874 Gary Benson <gbenson@redhat.com>
5875
5876 * Makefile.in (SFILES): Add common/errors.c.
5877 (OBS): Add errors.o.
5878 (IPA_OBS): Add errors-ipa.o.
5879 (errors.o): New rule.
5880 (errors-ipa.o): Likewise.
5881 * utils.h (perror_with_name, error, warning): Don't declare.
5882 * utils.c (warning): Renamed and rewritten as...
5883 (vwarning): New function.
5884 (error): Renamed and rewritten as...
5885 (verror): New function.
5886 (internal_error): Renamed and rewritten as...
5887 (internal_verror): New function.
5888
bb974a24
GB
58892014-08-07 Gary Benson <gbenson@redhat.com>
5890
5891 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5892 * configure: Regenerate.
5893 * config.in: Likewise.
5894 * server.h: Do not include errno.h.
5895 * event-loop.c: Likewise.
5896 * hostio-errno.c: Likewise.
5897 * linux-low.c: Likewise.
5898 * remote-utils.c: Likewise.
5899 * spu-low.c: Likewise.
5900 * utils.c: Likewise.
5901 * gdbreplay.c: Unconditionally include errno.h.
5902
6d3d12eb
GB
59032014-08-07 Gary Benson <gbenson@redhat.com>
5904
5905 * server.h: Do not include string.h.
5906 * event-loop.c: Likewise.
5907 * linux-low.c: Likewise.
5908 * regcache.c: Likewise.
5909 * remote-utils.c: Likewise.
5910 * spu-low.c: Likewise.
5911 * utils.c: Likewise.
5912
dccbb609
GB
59132014-08-07 Gary Benson <gbenson@redhat.com>
5914
5915 * server.h: Do not include gdb_assert.h.
5916
e76df0d0
GB
59172014-08-07 Gary Benson <gbenson@redhat.com>
5918
5919 * server.h: Do not include common-utils.h.
5920
4cb9c816
GB
59212014-08-07 Gary Benson <gbenson@redhat.com>
5922
5923 * server.h: Do not include ptid.h.
5924 * notif.h: Likewise.
5925
3995eeee
GB
59262014-08-07 Gary Benson <gbenson@redhat.com>
5927
5928 * server.h: Do not include gdb_locale.h.
5929
cb9f1a9b
GB
59302014-08-07 Gary Benson <gbenson@redhat.com>
5931
5932 * server.h: Do not include gdb/signals.h.
5933 * win32-low.c: Likewise.
5934
a5fceff8
GB
59352014-08-07 Gary Benson <gbenson@redhat.com>
5936
5937 * server.h: Do not include pathmax.h.
5938
b9391142
GB
59392014-08-07 Gary Benson <gbenson@redhat.com>
5940
5941 * server.h: Do not include libiberty.h.
5942 * linux-bfin-low.c: Likewise.
5943
0e443c87
GB
59442014-08-07 Gary Benson <gbenson@redhat.com>
5945
5946 * server.h: Do not include ansidecl.h.
5947
8ebb3f56
GB
59482014-08-07 Gary Benson <gbenson@redhat.com>
5949
5950 * linux-x86-low.c: Do not include stddef.h.
5951 * lynx-ppc-low.c: Likewise.
5952 * tracepoint.c: Likewise.
5953
8980bdf6
GB
59542014-08-07 Gary Benson <gbenson@redhat.com>
5955
5956 * server.h: Do not include stdarg.h.
5957 * nto-low.c: Likewise.
5958
d7096f71
GB
59592014-08-07 Gary Benson <gbenson@redhat.com>
5960
5961 * server.h: Do not include stdlib.h.
5962 * inferiors.c: Likewise.
5963 * linux-low.c: Likewise.
5964 * regcache.c: Likewise.
5965 * spu-low.c: Likewise.
5966 * tracepoint.c: Likewise.
5967 * utils.c: Likewise.
5968
d02f550d
GB
59692014-08-07 Gary Benson <gbenson@redhat.com>
5970
5971 * server.h: Do not include stdio.h.
5972 * linux-low.c: Likewise.
5973 * remote-utils.c: Likewise.
5974 * spu-low.c: Likewise.
5975 * utils.c: Likewise.
5976 * wincecompat.c: Likewise.
5977
87f6c4e3
GB
59782014-08-06 Gary Benson <gbenson@redhat.com>
5979
5980 * regcache.c (init_register_cache): Move conditionals inside if.
5981
7089dca4
GB
59822014-08-06 Gary Benson <gbenson@redhat.com>
5983
5984 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5985
462f517e
GB
59862014-07-31 Gary Benson <gbenson@redhat.com>
5987
5988 * ax.h: Do not include server.h.
5989 * gdbthread.h: Likewise.
5990 * lynx-low.h: Likewise.
5991 * notif.h: Likewise.
5992
976411d6
GB
59932014-07-30 Gary Benson <gbenson@redhat.com>
5994
5995 * server.h: Include common-defs.h.
5996 Do not include config.h or build-gnulib-gdbserver/config.h.
5997
d41f6d8e
GB
59982014-07-30 Gary Benson <gbenson@redhat.com>
5999
6000 * hostio-errno.c: Move server.h to top of includes list.
6001 * inferiors.c: Likewise.
6002 * linux-x86-low.c: Likewise.
6003 * notif.c: Include server.h.
6004
314c6a35
TT
60052014-07-24 Tom Tromey <tromey@redhat.com>
6006 Gary Benson <gbenson@redhat.com>
6007
6008 * server.h (CORE_ADDR): Now unsigned.
6009
69ff6be5
PA
60102014-07-16 Pedro Alves <palves@redhat.com>
6011
6012 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6013
ce9e3fe7
PA
60142014-07-15 Pedro Alves <palves@redhat.com>
6015
6016 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6017 copy.
6018
e76126e8
PA
60192014-07-11 Pedro Alves <palves@redhat.com>
6020
6021 * linux-low.c (kill_wait_lwp): New function, based on
6022 kill_one_lwp_callback, but use my_waitpid directly.
6023 (kill_one_lwp_callback, linux_kill): Use it.
6024
8e9db26e
PA
60252014-06-23 Pedro Alves <palves@redhat.com>
6026
6027 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6028 before setting DR0..DR3.
6029
698b3e08
GB
60302014-06-20 Gary Benson <gbenson@redhat.com>
6031
6032 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6033 * configure: Regenerated.
6034 * config.in: Likewise.
6035
125f8a3d
GB
60362014-06-20 Gary Benson <gbenson@redhat.com>
6037
6038 * Makefile.in (SFILES): Update locations for files moved
6039 from common to nat.
6040 (object file files): Reordered.
6041
42995dbd
GB
60422014-06-20 Gary Benson <gbenson@redhat.com>
6043
6044 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6045 (i386_dr_low_set_addr): Likewise.
6046 (i386_dr_low_get_addr): Likewise.
6047 (i386_dr_low_can_set_control): Likewise.
6048 (i386_dr_low_set_control): Likewise.
6049 (i386_dr_low_get_control): Likewise.
6050 (i386_dr_low_get_status): Likewise.
6051 (i386_get_debug_register_length): Likewise.
6052 * linux-x86-low.c (i386_dr_low_set_addr):
6053 Changed signature. Made static.
6054 (i386_dr_low_get_addr): Likewise.
6055 (i386_dr_low_set_control): Likewise.
6056 (i386_dr_low_get_control): Likewise.
6057 (i386_dr_low_get_status): Likewise.
6058 (i386_dr_low): New global variable.
6059 * win32-i386-low.c (i386_dr_low_set_addr):
6060 Changed signature. Made static.
6061 (i386_dr_low_get_addr): Likewise.
6062 (i386_dr_low_set_control): Likewise.
6063 (i386_dr_low_get_control): Likewise.
6064 (i386_dr_low_get_status): Likewise.
6065 (i386_dr_low): New global variable.
6066
e1d2394b
MS
60672014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6068
6069 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6070 * Makefile.in (AR, AR_FLAGS): Define.
6071 * configure: Regenerate.
6072
3a8ee006
GB
60732014-06-19 Gary Benson <gbenson@redhat.com>
6074
6075 * Makefile.in (i386-dregs.o): New rule.
6076 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6077 * i386-low.c (target.h): Remove include.
6078 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6079 (DR_CONTROL_SHIFT): Likewise.
6080 (DR_CONTROL_SIZE): Likewise.
6081 (DR_RW_EXECUTE): Likewise.
6082 (DR_RW_WRITE): Likewise.
6083 (DR_RW_READ): Likewise.
6084 (DR_RW_IORW): Likewise.
6085 (DR_LEN_1): Likewise.
6086 (DR_LEN_2): Likewise.
6087 (DR_LEN_4): Likewise.
6088 (DR_LEN_8): Likewise.
6089 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6090 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6091 (DR_ENABLE_SIZE): Likewise.
6092 (DR_LOCAL_SLOWDOWN): Likewise.
6093 (DR_GLOBAL_SLOWDOWN): Likewise.
6094 (DR_CONTROL_RESERVED): Likewise.
6095 (I386_DR_CONTROL_MASK): Likewise.
6096 (I386_DR_VACANT): Likewise.
6097 (I386_DR_LOCAL_ENABLE): Likewise.
6098 (I386_DR_GLOBAL_ENABLE): Likewise.
6099 (I386_DR_DISABLE): Likewise.
6100 (I386_DR_SET_RW_LEN): Likewise.
6101 (I386_DR_GET_RW_LEN): Likewise.
6102 (I386_DR_WATCH_HIT): Likewise.
6103 (i386_wp_op_t): Likewise.
6104 (i386_show_dr): Likewise.
6105 (i386_length_and_rw_bits): Likewise.
6106 (i386_insert_aligned_watchpoint): Likewise.
6107 (i386_remove_aligned_watchpoint): Likewise.
6108 (i386_handle_nonaligned_watchpoint): Likewise.
6109 i386_update_inferior_debug_regs(): Likewise.
6110 (i386_dr_insert_watchpoint): Likewise.
6111 (i386_dr_remove_watchpoint): Likewise.
6112 (i386_dr_region_ok_for_watchpoint): Likewise.
6113 (i386_dr_stopped_data_address): Likewise.
6114 (i386_dr_stopped_by_watchpoint): Likewise.
6115
8f26655c
GB
61162014-06-19 Gary Benson <gbenson@redhat.com>
6117
6118 * i386-low.c (i386_dr_show): Renamed to
6119 i386_show_dr and made static. All uses updated.
6120 (i386_dr_length_and_rw_bits): Renamed to
6121 i386_length_and_rw_bits and made static.
6122 All uses updated.
6123 (i386_dr_insert_aligned_watchpoint): Renamed to
6124 i386_insert_aligned_watchpoint and made static.
6125 All uses updated.
6126 (i386_dr_remove_aligned_watchpoint): Renamed to
6127 i386_remove_aligned_watchpoint and made static.
6128 All uses updated.
6129 (i386_dr_update_inferior_debug_regs): Renamed to
6130 i386_update_inferior_debug_regs and made static.
6131 All uses updated.
6132
b9228891
GB
61332014-06-18 Gary Benson <gbenson@redhat.com>
6134
5171def3
GB
6135 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6136 (i386_dr_low_can_set_control): Likewise.
6137 (i386_get_debug_register_length): Likewise.
6138 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6139 (i386_dr_low_can_set_control): Likewise.
6140 (i386_get_debug_register_length): Likewise.
6141
61422014-06-17 Gary Benson <gbenson@redhat.com>
6143
b9228891
GB
6144 * i386-low.h (i386-dregs.h): New include.
6145 (DR_FIRSTADDR): Now in i386-dregs.h.
6146 (DR_LASTADDR): Likewise.
6147 (DR_NADDR): Likewise.
6148 (DR_STATUS): Likewise.
6149 (DR_CONTROL): Likewise.
6150 (i386_debug_reg_state): Likewise.
6151 (i386_dr_insert_watchpoint): Likewise.
6152 (i386_dr_remove_watchpoint): Likewise.
6153 (i386_dr_region_ok_for_watchpoint): Likewise.
6154 (i386_dr_stopped_data_address): Likewise.
6155 (i386_dr_stopped_by_watchpoint): Likewise.
6156 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6157
4be83cc2
GB
61582014-06-18 Gary Benson <gbenson@redhat.com>
6159
6160 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6161 i386_dr_insert_watchpoint.
6162 (i386_low_remove_watchpoint): Renamed to
6163 i386_dr_remove_watchpoint.
6164 (i386_low_region_ok_for_watchpoint): Renamed to
6165 i386_dr_region_ok_for_watchpoint.
6166 (i386_low_stopped_data_address): Renamed to
6167 i386_dr_stopped_data_address.
6168 (i386_low_stopped_by_watchpoint): Renamed to
6169 i386_dr_stopped_by_watchpoint.
6170 * i386-low.c (i386_show_dr): Renamed to
6171 i386_dr_show and made nonstatic. All uses updated.
6172 (i386_length_and_rw_bits): Renamed to
6173 i386_dr_length_and_rw_bits and made nonstatic.
6174 All uses updated.
6175 (i386_insert_aligned_watchpoint): Renamed to
6176 i386_dr_insert_aligned_watchpoint and made nonstatic.
6177 All uses updated.
6178 (i386_remove_aligned_watchpoint): Renamed to
6179 i386_dr_remove_aligned_watchpoint and made nonstatic.
6180 All uses updated.
6181 (i386_update_inferior_debug_regs): Renamed to
6182 i386_dr_update_inferior_debug_regs and made nonstatic.
6183 All uses updated.
6184 (i386_low_insert_watchpoint): Renamed to
6185 i386_dr_insert_watchpoint. All uses updated.
6186 (i386_low_remove_watchpoint): Renamed to
6187 i386_dr_remove_watchpoint. All uses updated.
6188 (i386_low_region_ok_for_watchpoint): Renamed to
6189 i386_dr_region_ok_for_watchpoint. All uses updated.
6190 (i386_low_stopped_data_address): Renamed to
6191 i386_dr_stopped_data_address. All uses updated.
6192 (i386_low_stopped_by_watchpoint): Renamed to
6193 i386_dr_stopped_by_watchpoint. All uses updated.
6194
131aa0d4
GB
61952014-06-18 Gary Benson <gbenson@redhat.com>
6196
6197 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6198 (i386_dr_low_can_set_control): Likewise.
6199 (i386_insert_aligned_watchpoint): New check.
6200
d9305f7f
GB
62012014-06-18 Gary Benson <gbenson@redhat.com>
6202
6203 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6204 Renamed to state.
6205
e927c9fc
GB
62062014-06-18 Gary Benson <gbenson@redhat.com>
6207
6208 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6209 instead of fatal and error.
6210 (i386_handle_nonaligned_watchpoint): Likewise.
6211
1b6d4134
GB
62122014-06-18 Gary Benson <gbenson@redhat.com>
6213
6214 * i386-low.c (i386_get_debug_register_length): New macro.
6215 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6216 (i386_show_dr): Use debug_printf instead of fprintf. Use
6217 phex to format values.
6218
6e62758f
GB
62192014-06-18 Gary Benson <gbenson@redhat.com>
6220
6221 * i386-low.h: Comment changes.
6222 * i386-low.c: Likewise.
6223
fc6e2f03
GB
62242014-06-18 Gary Benson <gbenson@redhat.com>
6225
6226 * i386-low.c: Whitespace changes.
6227
f9d1eeed
TT
62282014-06-12 Tom Tromey <tromey@redhat.com>
6229
6230 * utils.c (freeargv): Remove.
6231
0b04e523
TT
62322014-06-12 Tom Tromey <tromey@redhat.com>
6233
6234 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6235 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6236 (parse_debug_format_options): Likewise.
6237 (gdbserver_usage): Likewise.
6238 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6239 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6240 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6241 against libiberty.
6242 ($(LIBGNU)): Depend on libiberty.
6243 (all-lib): Recurse into all subdirs.
6244 (install-only): Invoke "install" target in subdirs.
6245 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6246 targets.
6247 * configure: Rebuild.
6248 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6249 for vasprintf, vsnprintf, or gettimeofday.
6250 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6251 srv_tgtobj.
6252
270c9937
JB
62532014-06-05 Joel Brobecker <brobecker@adacore.com>
6254
6255 * development.sh: Delete.
6256 * Makefile.in (config.status): Adjust dependency on development.sh.
6257 * configure.ac: Adjust development.sh source call.
6258 * configure: Regenerate.
6259
0a261ed8
PA
62602014-06-02 Pedro Alves <palves@redhat.com>
6261
6262 * ax.c (gdb_free_agent_expr): New function.
6263 * ax.h (gdb_free_agent_expr): New declaration.
6264 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6265 list.
6266 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6267 static.
6268 (clear_breakpoint_conditions_and_commands): New function.
6269 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6270 (clear_breakpoint_conditions_and_commands): New declaration.
6271
e9dae05e
RR
62722014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6273
6274 * linux-aarch64-low.c (asm/ptrace.h): Include.
6275
5876f503
JK
62762014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6277
6278 Fix TLS access for -static -pthread.
6279 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6280 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6281 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6282
802e8e6d
PA
62832014-05-20 Pedro Alves <palves@redhat.com>
6284
6285 * linux-aarch64-low.c (aarch64_insert_point)
6286 (aarch64_remove_point): No longer check whether the type is
6287 supported here. Adjust to new interface.
6288 (the_low_target): Install aarch64_supports_z_point_type as
6289 supports_z_point_type method.
6290 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6291 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6292 instead of a Z packet char. Adjust.
6293 (arm_supports_z_point_type): New function.
6294 (arm_insert_point, arm_remove_point): Adjust to new interface.
6295 (the_low_target): Install arm_supports_z_point_type.
6296 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6297 (cris_insert_point, cris_remove_point): Adjust to new interface.
6298 Don't check whether the type is supported here.
6299 (the_low_target): Install cris_supports_z_point_type.
6300 * linux-low.c (linux_supports_z_point_type): New function.
6301 (linux_insert_point, linux_remove_point): Adjust to new interface.
6302 * linux-low.h (struct linux_target_ops) <insert_point,
6303 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6304 raw_breakpoint pointer parameter.
6305 <supports_z_point_type>: New method.
6306 * linux-mips-low.c (mips_supports_z_point_type): New function.
6307 (mips_insert_point, mips_remove_point): Adjust to new interface.
6308 Use mips_supports_z_point_type.
6309 (the_low_target): Install mips_supports_z_point_type.
6310 * linux-ppc-low.c (the_low_target): Install NULL as
6311 supports_z_point_type method.
6312 * linux-s390-low.c (the_low_target): Install NULL as
6313 supports_z_point_type method.
6314 * linux-sparc-low.c (the_low_target): Install NULL as
6315 supports_z_point_type method.
6316 * linux-x86-low.c (x86_supports_z_point_type): New function.
6317 (x86_insert_point): Adjust to new insert_point interface. Use
6318 insert_memory_breakpoint. Adjust to new
6319 i386_low_insert_watchpoint interface.
6320 (x86_remove_point): Adjust to remove_point interface. Use
6321 remove_memory_breakpoint. Adjust to new
6322 i386_low_remove_watchpoint interface.
6323 (the_low_target): Install x86_supports_z_point_type.
6324 * lynx-low.c (lynx_target_ops): Install NULL as
6325 supports_z_point_type callback.
6326 * nto-low.c (nto_supports_z_point_type): New.
6327 (nto_insert_point, nto_remove_point): Adjust to new interface.
6328 (nto_target_ops): Install nto_supports_z_point_type.
6329 * mem-break.c: Adjust intro comment.
6330 (struct raw_breakpoint) <raw_type, size>: New fields.
6331 <inserted>: Update comment.
6332 <shlib_disabled>: Delete field.
6333 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6334 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6335 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6336 (raw_bkpt_type_to_target_hw_bp_type): New function.
6337 (find_enabled_raw_code_breakpoint_at): New function.
6338 (find_raw_breakpoint_at): New type and size parameters. Use them.
6339 (insert_memory_breakpoint): New function, based off
6340 set_raw_breakpoint_at.
6341 (remove_memory_breakpoint): New function.
6342 (set_raw_breakpoint_at): Reimplement.
6343 (set_breakpoint): New, based on set_breakpoint_at.
6344 (set_breakpoint_at): Reimplement.
6345 (delete_raw_breakpoint): Go through the_target->remove_point
6346 instead of assuming memory breakpoints.
6347 (find_gdb_breakpoint_at): Delete.
6348 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6349 (find_gdb_breakpoint): New function.
6350 (set_gdb_breakpoint_at): Delete.
6351 (z_type_supported): New function.
6352 (set_gdb_breakpoint_1): New function, loosely based off
6353 set_gdb_breakpoint_at.
6354 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6355 (delete_gdb_breakpoint_at): Delete.
6356 (delete_gdb_breakpoint_1): New function, loosely based off
6357 delete_gdb_breakpoint_at.
6358 (delete_gdb_breakpoint): New function.
6359 (clear_gdb_breakpoint_conditions): Rename to ...
6360 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6361 breakpoint.
6362 (add_condition_to_breakpoint): Make static.
6363 (add_breakpoint_condition): Take a struct breakpoint pointer
6364 instead of an address. Adjust.
6365 (gdb_condition_true_at_breakpoint): Rename to ...
6366 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6367 z_type parameter.
6368 (gdb_condition_true_at_breakpoint): Reimplement.
6369 (add_breakpoint_commands): Take a struct breakpoint pointer
6370 instead of an address. Adjust.
6371 (gdb_no_commands_at_breakpoint): Rename to ...
6372 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6373 parameter. Return true if no breakpoint was found. Change debug
6374 output.
6375 (gdb_no_commands_at_breakpoint): Reimplement.
6376 (run_breakpoint_commands): Rename to ...
6377 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6378 and change return type to boolean.
6379 (run_breakpoint_commands): New function.
6380 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6381 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6382 breakpoint. Go through the_target->remove_point instead of
6383 assuming memory breakpoint.
6384 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6385 software and hardware breakpoints.
6386 (reinsert_raw_breakpoint): Go through the_target->insert_point
6387 instead of assuming memory breakpoint.
6388 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6389 software and hardware breakpoints.
6390 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6391 Check both software and hardware breakpoints.
6392 (validate_inserted_breakpoint): Assert the breakpoint is a
6393 software breakpoint. Set the inserted flag to -1 instead of
6394 setting shlib_disabled.
6395 (delete_disabled_breakpoints): Adjust.
6396 (validate_breakpoints): Only validate software breakpoints.
6397 Adjust to inserted flag change.
6398 (check_mem_read, check_mem_write): Skip breakpoint types other
6399 than software breakpoints. Adjust to inserted flag change.
6400 * mem-break.h (enum raw_bkpt_type): New enum.
6401 (raw_breakpoint, struct process_info): Forward declare.
6402 (Z_packet_to_target_hw_bp_type): Delete declaration.
6403 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6404 (set_gdb_breakpoint, delete_gdb_breakpoint)
6405 (clear_breakpoint_conditions): New declarations.
6406 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6407 (breakpoint_inserted_here): Update comment.
6408 (add_breakpoint_condition, add_breakpoint_commands): Replace
6409 address parameter with a breakpoint pointer parameter.
6410 (gdb_breakpoint_here): Update comment.
6411 (delete_gdb_breakpoint_at): Delete.
6412 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6413 * server.c (process_point_options): Take a struct breakpoint
6414 pointer instead of an address. Adjust.
6415 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6416 delete_gdb_breakpoint.
6417 * spu-low.c (spu_target_ops): Install NULL as
6418 supports_z_point_type method.
6419 * target.h: Include mem-break.h.
6420 (struct target_ops) <prepare_to_access_memory>: Update comment.
6421 <supports_z_point_type>: New field.
6422 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6423 instead of a char. Also take a raw breakpoint pointer.
6424 * win32-arm-low.c (the_low_target): Install NULL as
6425 supports_z_point_type.
6426 * win32-i386-low.c (i386_supports_z_point_type): New function.
6427 (i386_insert_point, i386_remove_point): Adjust to new interface.
6428 (the_low_target): Install i386_supports_z_point_type.
6429 * win32-low.c (win32_supports_z_point_type): New function.
6430 (win32_insert_point, win32_remove_point): Adjust to new interface.
6431 (win32_target_ops): Install win32_supports_z_point_type.
6432 * win32-low.h (struct win32_target_ops):
6433 <supports_z_point_type>: New method.
6434 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6435 instead of a char. Also take a raw breakpoint pointer.
6436
932539e3
PA
64372014-05-20 Pedro Alves <palves@redhat.com>
6438
6439 * mem-break.h: Include break-common.h.
6440 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6441 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6442 (Z_packet_to_target_hw_bp_type): New declaration.
6443 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6444 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6445 (Z_PACKET_ACCESS_WP): Delete macros.
6446 (Z_packet_to_hw_type): Delete function.
6447 * i386-low.h: Don't include break-common.h here.
6448 (Z_packet_to_hw_type): Delete declaration.
6449 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6450 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6451 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6452 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6453 * linux-aarch64-low.c: Don't include break-common.h here.
6454 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6455 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6456 (Z_packet_to_target_hw_bp_type): Delete function.
6457 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6458 function.
6459 (mips_insert_point, mips_remove_point): Use
6460 Z_packet_to_target_hw_bp_type.
6461
4ff0d3d8
PA
64622014-05-20 Pedro Alves <palves@redhat.com>
6463
6464 * linux-aarch64-low.c: Include break-common.h.
6465 (enum target_point_type): Delete.
6466 (Z_packet_to_point_type): Rename to ...
6467 (Z_packet_to_target_hw_bp_type): ... this, and return a
6468 target_hw_bp_type instead.
6469 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6470 instead of an enum target_point_type.
6471 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6472 breakpoint type.
6473 (aarch64_dr_state_insert_one_point)
6474 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6475 (aarch64_handle_aligned_watchpoint)
6476 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6477 Take an enum target_hw_bp_type instead of an enum
6478 target_point_type.
6479 (aarch64_supports_z_point_type): New function.
6480 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6481 use Z_packet_to_target_hw_bp_type.
6482
786dc519
JB
64832014-05-20 Joel Brobecker <brobecker@adacore.com>
6484
6485 * configure.ac: Only use -Werror by default when DEVELOPMENT
6486 is true.
6487 * configure: Regenerate.
6488
9e0aa64f
JK
64892014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6490
6491 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6492 * linux-x86-low.c (X86_64_USER_REGS): New.
6493 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6494
2b577b92
YQ
64952014-04-28 Yao Qi <yao@codesourcery.com>
6496
6497 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6498 name.
6499
94611da2
PA
65002014-04-25 Pedro Alves <palves@redhat.com>
6501
6502 PR server/16255
6503 * linux-low.c (linux_attach_fail_reason_string): New function.
6504 (linux_attach_lwp): Delete.
6505 (linux_attach_lwp_1): Rename to ...
6506 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6507 argument. Remove "initial" parameter. Return int instead of
6508 void. Don't error or warn here.
6509 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6510 failure to attach to the tgid. Call warning when failing to
6511 attach to an lwp.
6512 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6513 argument. Remove "initial" parameter. Return int instead of
6514 void. Don't error or warn here.
6515 (linux_attach_fail_reason_string): New declaration.
6516 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6517 interface change. Use linux_attach_fail_reason_string.
6518
01f9f808
MS
65192014-04-24 Michael Sturm <michael.sturm@mintel.com>
6520 Walfred Tedeschi <walfred.tedeschi@intel.com>
6521
6522 * Makefile.in: Added rules to handle new files
6523 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6524 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6525 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6526 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6527 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6528 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6529 x32-avx512-linux.o.
6530 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6531 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6532 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6533 i386/x32-avx512.xml.
6534 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6535 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6536 i386/x32-avx512-linux.xml.
6537 * i387-fp.c (num_avx512_k_registers): New constant for number
6538 of K registers.
6539 (num_avx512_zmmh_low_registers): New constant for number of
6540 lower ZMM registers (0-15).
6541 (num_avx512_zmmh_high_registers): New constant for number of
6542 higher ZMM registers (16-31).
6543 (num_avx512_ymmh_registers): New contant for number of higher
6544 YMM registers (ymm16-31 added by avx521 on x86_64).
6545 (num_avx512_xmm_registers): New constant for number of higher
6546 XMM registers (xmm16-31 added by AVX512 on x86_64).
6547 (struct i387_xsave): Add space for AVX512 registers.
6548 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6549 Add code to handle AVX512 registers.
6550 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6551 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6552 prototypei from generated file.
6553 (tdesc_amd64_avx512_linux): Likewise.
6554 (init_registers_x32_avx512_linux): Likewise.
6555 (tdesc_x32_avx512_linux): Likewise.
6556 (init_registers_i386_avx512_linux): Likewise.
6557 (tdesc_i386_avx512_linux): Likewise.
6558 (x86_64_regmap): Add AVX512 registers.
6559 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6560 mask.
6561 (initialize_low_arch): Add code to initialize AVX512 registers.
6562
51aa91f9
PA
65632014-04-23 Pedro Alves <palves@redhat.com>
6564
6565 * mem-break.c (find_gdb_breakpoint_at): Make static.
6566 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6567
a4165e94
PA
65682014-04-23 Pedro Alves <palves@redhat.com>
6569
6570 * i386-low.c: Don't include break-common.h here.
6571 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6572 prototype to take target_hw_bp_type as argument instead of a Z
6573 packet char.
6574 * i386-low.h: Include break-common.h here.
6575 (Z_packet_to_hw_type): Declare.
6576 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6577 prototypes.
6578 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6579 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6580 (x86_remove_point): Convert the packet number to a
6581 target_hw_bp_type before calling i386_low_remove_watchpoint.
6582 * win32-i386-low.c (i386_insert_point): Convert the packet number
6583 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6584 (i386_remove_point): Convert the packet number to a
6585 target_hw_bp_type before calling i386_low_remove_watchpoint.
6586
b8acf843
PA
65872014-04-23 Pedro Alves <palves@redhat.com>
6588
6589 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6590
d708bcd1
PA
65912014-04-10 Pedro Alves <palves@redhat.com>
6592
6593 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6594 Check if the condition or command is NULL before checking if the
6595 breakpoint is known. On success, return true.
6596 * mem-break.h (add_breakpoint_condition): Document return.
6597 (add_breakpoint_commands): Add describing comment.
6598 * server.c (skip_to_semicolon): New function.
6599 (process_point_options): Use it.
6600
2eec7d5b
PA
66012014-04-09 Pedro Alves <palves@redhat.com>
6602
6603 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6604 to lwpid_of.
6605
fa96cb38
PA
66062014-02-27 Pedro Alves <palves@redhat.com>
6607
6608 PR 12702
6609 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6610 macros.
6611 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6612 output.
6613 (last_thread_of_process_p): Take a PID argument instead of a
6614 thread pointer.
6615 (linux_wait_for_lwp): Delete.
6616 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6617 functions.
6618 (linux_low_filter_event): New function, party factored out from
6619 linux_wait_for_event.
6620 (linux_wait_for_event): Rename to ...
6621 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6622 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6623 sigsuspend. Check for zombie leaders.
6624 (linux_wait_for_event): Reimplement as wrapper around
6625 linux_wait_for_event_filtered.
6626 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6627 a normal or signal exit is seen, it's the whole process exiting.
6628 (wait_for_sigstop): No longer a for_each_inferior callback.
6629 Rewrite on top of linux_wait_for_event_filtered.
6630 (stop_all_lwps): Call wait_for_sigstop directly.
6631 * server.c (resume, handle_target_event): Handle
6632 TARGET_WAITKIND_NO_RESUMED.
6633
d763de10
JB
66342014-02-26 Joel Brobecker <brobecker@adacore.com>
6635
6636 * win32-low.c (psapi_get_dll_name,
6637 * win32_CreateToolhelp32Snapshot): Delete.
6638 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6639 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6640 Delete.
6641 (handle_load_dll): Add function description.
6642 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6643
850a0f76
JB
66442014-02-26 Joel Brobecker <brobecker@adacore.com>
6645
6646 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6647 Add comment.
6648 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6649 base address when calling win32_add_one_solib.
6650 (handle_load_dll): Delete local variable load_addr.
6651 Remove 0x1000 offset applied to DLL base address when calling
6652 win32_add_one_solib.
6653 (handle_unload_dll): Add comment.
6654
f25b3fc3
JB
66552014-02-26 Joel Brobecker <brobecker@adacore.com>
6656
6657 * win32-low.c (win32_add_all_dlls): Renames
6658 win32_ensure_ntdll_loaded. Rewrite function documentation.
6659 Adjust implementation to always load all DLLs.
6660 Add 0x1000 offset to DLL base address when calling
6661 win32_add_one_solib.
6662 (child_initialization_done): New static global.
6663 (do_initial_child_stuff): Set child_initialization_done to
6664 zero during child initialization, and 1 after. Replace call
6665 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6666 Add comment.
6667 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6668 (handle_unload_dll): Add function documentation.
6669 (get_child_debug_event): Ignore load and unload DLL events
6670 during child initialization.
6671
d86d4aaf
DE
66722014-02-20 Doug Evans <dje@google.com>
6673
3bc32da3 6674 Remove global all_lwps.
d86d4aaf
DE
6675 * inferiors.h (ptid_of): Move here from linux-low.h.
6676 (pid_of, lwpid_of): Ditto.
6677 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6678 parameter is a struct thread_info * now.
6679 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6680 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6681 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6682 directly.
6683 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6684 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6685 * linux-arm-low.c (update_registers_callback): Update, "entry"
6686 parameter is a struct thread_info * now.
6687 Fetch lwpid from current_inferior directly.
6688 (arm_insert_point): Pass &all_threads to find_inferior instead of
6689 &all_lwps.
6690 (arm_remove_point): Ditto.
6691 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6692 (arm_prepare_to_resume): Fetch pid from thread.
6693 (arm_read_description): Fetch lwpid from current_inferior directly.
6694 * linux-low.c (all_lwps): Delete.
6695 (delete_lwp): Delete call to remove_inferior.
6696 (handle_extended_wait): Fetch lwpid from thread.
6697 (add_lwp): Don't set lwp->entry.id. Remove call to
6698 add_inferior_to_list.
6699 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6700 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6701 (kill_one_lwp_callback): Ditto.
6702 (linux_kill): Don't dereference NULL pointer.
6703 Fetch ptid,lwpid from thread.
6704 (get_detach_signal): Fetch ptid from thread.
6705 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6706 Simplify call to regcache_invalidate_thread.
6707 (delete_lwp_callback): Update, "entry" parameter is a
6708 struct thread_info * now. Fetch pid from thread.
6709 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6710 (status_pending_p_callback): Update, "entry" parameter is a
6711 struct thread_info * now. Fetch ptid from thread.
6712 (find_lwp_pid): Update, "entry" parameter is a
6713 struct thread_info * now.
6714 (linux_wait_for_lwp): Fetch pid from thread.
6715 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6716 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6717 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6718 (dequeue_one_deferred_signal): Ditto.
6719 (cancel_breakpoint): Fetch ptid from current_inferior.
6720 (linux_wait_for_event): Pass &all_threads to find_inferior,
6721 not &all_lwps. Fetch ptid, lwpid from thread.
6722 (count_events_callback): Update, "entry" parameter is a
6723 struct thread_info * now.
6724 (select_singlestep_lwp_callback): Ditto.
6725 (select_event_lwp_callback): Ditto.
6726 (cancel_breakpoints_callback): Ditto.
6727 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6728 not &all_lwps.
6729 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6730 (unsuspend_one_lwp): Update, "entry" parameter is a
6731 struct thread_info * now.
6732 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6733 not &all_lwps.
6734 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6735 Fetch lwpid from thread, not lwp.
6736 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6737 Pass &all_threads to find_inferior, not &all_lwps.
6738 (send_sigstop): Fetch lwpid from thread, not lwp.
6739 (send_sigstop_callback): Update, "entry" parameter is a
6740 struct thread_info * now.
6741 (suspend_and_send_sigstop_callback): Ditto.
6742 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6743 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6744 struct thread_info * now.
6745 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6746 from thread, lwp.
6747 (lwp_running): Update, "entry" parameter is a
6748 struct thread_info * now.
6749 (stop_all_lwps): Fetch ptid from thread.
6750 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6751 (linux_resume_one_lwp): Fetch lwpid from thread.
6752 (linux_set_resume_request): Update, "entry" parameter is a
6753 struct thread_info * now. Fetch pid, lwpid from thread.
6754 (resume_status_pending_p): Update, "entry" parameter is a
6755 struct thread_info * now.
6756 (need_step_over_p): Ditto. Fetch lwpid from thread.
6757 (start_step_over): Fetch lwpid from thread.
6758 (linux_resume_one_thread): Update, "entry" parameter is a
6759 struct thread_info * now. Fetch lwpid from thread.
6760 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6761 (proceed_one_lwp): Update, "entry" parameter is a
6762 struct thread_info * now. Fetch lwpid from thread.
6763 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6764 struct thread_info * now.
6765 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6766 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6767 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6768 directly.
6769 (regsets_store_inferior_registers): Ditto.
6770 (fetch_register, store_register): Ditto.
6771 (linux_read_memory, linux_write_memory): Ditto.
6772 (linux_request_interrupt): Ditto.
6773 (linux_read_auxv): Ditto.
6774 (linux_xfer_siginfo): Ditto.
6775 (linux_qxfer_spu): Ditto.
6776 (linux_qxfer_libraries_svr4): Ditto.
6777 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6778 moved to inferiors.h.
6779 (get_lwp): Delete.
6780 (get_thread_lwp): Update.
6781 (struct lwp_info): Delete member "entry". Simplify comment for
6782 member "thread".
6783 (all_lwps): Delete.
6784 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6785 current_inferior directly.
6786 (update_watch_registers_callback): Update, "entry" parameter is a
6787 struct thread_info * now. Fetch pid from thread.
6788 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6789 (mips_insert_point): Fetch lwpid from current_inferior.
6790 Pass &all_threads to find_inferior, not &all_lwps.
6791 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6792 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6793 directly.
6794 (mips_stopped_data_address): Ditto.
6795 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6796 directly.
6797 * linux-tile-low.c (tile_arch_setup): Ditto.
6798 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6799 (update_debug_registers_callback): Update, "entry" parameter is a
6800 struct thread_info * now. Fetch pid from thread.
6801 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6802 Pass &all_threads to find_inferior, not &all_lwps.
6803 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6804 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6805 Pass &all_threads to find_inferior, not &all_lwps.
6806 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6807 (i386_dr_low_get_status): Ditto.
6808 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6809 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6810 (x86_linux_read_description): Ditto.
6811 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6812
3b8361aa
DE
68132014-02-20 Doug Evans <dje@google.com>
6814
6815 * inferiors.c (get_first_inferior): Fix buglet.
6816
f7667f0d
DE
68172014-02-19 Doug Evans <dje@google.com>
6818
6819 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6820 * inferiors.c (add_thread): Change result type to struct thread_info *.
6821 All callers updated.
6822 (add_lwp): Call add_thread here instead of in callers.
6823 All callers updated.
6824 * linux-low.h (get_lwp_thread): Rewrite.
6825 (struct lwp_info): New member "thread".
6826
b3312d80
DE
68272014-02-19 Doug Evans <dje@google.com>
6828
6829 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6830 All callers updated.
6831
ecc6f45c
DE
68322014-02-19 Doug Evans <dje@google.com>
6833
6834 * inferiors.c (add_thread): Fix whitespace.
6835
649ebbca
DE
68362014-02-19 Doug Evans <dje@google.com>
6837
6838 * dll.c (clear_dlls): Replace accessing list implemention details
6839 with API function.
6840 * gdbthread.h (get_first_thread): Declare.
6841 * inferiors.c (for_each_inferior_with_data): New function.
6842 (get_first_thread): New function.
6843 (find_thread_ptid): Simplify.
6844 (get_first_inferior): New function.
6845 (clear_list): Delete.
6846 (one_inferior_p): New function.
6847 (clear_inferior_list): New function.
6848 (clear_inferiors): Update.
6849 * inferiors.h (for_each_inferior_with_data): Declare.
6850 (clear_inferior_list): Declare.
6851 (one_inferior_p): Declare.
6852 (get_first_inferior): Declare.
6853 * linux-low.c (linux_wait_for_event): Replace accessing list
6854 implemention details with API function.
6855 * server.c (target_running): Ditto.
6856 (accumulate_file_name_length): New function.
6857 (emit_dll_description): New function.
6858 (handle_qxfer_libraries): Replace accessing list implemention
6859 details with API function.
6860 (handle_qxfer_threads_worker): New function.
6861 (handle_qxfer_threads_proper): Replace accessing list implemention
6862 details with API function.
6863 (handle_query): Ditto.
6864 (visit_actioned_threads_callback_ftype): New typedef.
6865 (visit_actioned_threads_data): New struct.
6866 (visit_actioned_threads): Rewrite to be find_inferior callback.
6867 (resume): Call find_inferior.
6868 (handle_status): Replace accessing list implemention
6869 details with API function.
6870 (process_serial_event): Replace accessing list implemention details
6871 with API function.
6872 * target.c (set_desired_inferior): Replace accessing list implemention
6873 details with API function.
6874 * tracepoint.c (same_process_p): New function.
6875 (gdb_agent_about_to_close): Replace accessing list implemention
6876 details with API function.
6877 * win32-low.c (child_delete_thread): Replace accessing list
6878 implemention details with API function.
6879 (match_dll_by_basename): New function.
6880 (dll_is_loaded_by_basename): New function.
6881 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6882 details call to dll_is_loaded_by_basename.
6883
80894984
DE
68842014-02-19 Doug Evans <dje@google.com>
6885
6886 * dll.h (struct dll_info): Add comment.
6887 * gdbthread.h (struct thread_info): Add comment.
6888 (current_ptid): Simplify.
6889 * inferiors.c (add_process): Update.
6890 (remove_process): Update.
6891 * inferiors.h (struct process_info): Rename member "head" to "entry".
6892 * linux-low.c (delete_lwp): Update.
6893 (add_lwp): Update.
6894 (last_thread_of_process_p): Update.
6895 (kill_one_lwp_callback, linux_kill): Update.
6896 (status_pending_p_callback): Update.
6897 (wait_for_sigstop): Update. Simplify read of ptid.
6898 (start_step_over): Update.
6899 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6900 (get_lwp_thread): Update.
6901 (struct lwp_info): Rename member "head" to "entry".
6902 * regcache.h (inferior_list_entry): Delete.
6903 * server.c (kill_inferior_callback): Update.
6904 (detach_or_kill_inferior_callback): Update.
6905 (print_started_pid): Update.
6906 (print_attached_pid): Update.
6907 (process_serial_event): Simplify read of ptid.
6908 * thread-db.c (thread_db_create_event): Update.
6909 (thread_db_get_tls_address): Update.
6910 * win32-low.c (current_inferior_ptid): Simplify.
6911
46917d26
TT
69122014-02-19 Tom Tromey <tromey@redhat.com>
6913
6914 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6915 argument.
6916 (target_supports_btrace): Update.
6917
0759a81e
YQ
69182014-02-14 Yao Qi <yao@codesourcery.com>
6919
6920 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6921 (rsp-low-ipa.o): New target.
6922
a7191e8b
TT
69232014-02-12 Tom Tromey <tromey@redhat.com>
6924
6925 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6926 convert_ascii_to_int.
6927 * regcache.c (registers_to_string): Likewise.
6928 * remote-utils.c (decode_M_packet): Likewise.
6929 * server.c (process_serial_event): Likewise.
6930
ff0e980e
TT
69312014-02-12 Tom Tromey <tromey@redhat.com>
6932
6933 * server.c (handle_query, handle_v_run): Use hex2bin, not
6934 unhexify.
6935 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6936
e9371aff
TT
69372014-02-12 Tom Tromey <tromey@redhat.com>
6938
6939 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6940 convert_int_to_ascii.
6941 * regcache.c (registers_to_string, collect_register_as_string):
6942 Likewise.
6943 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6944 Likewise.
6945 * server.c (process_serial_event): Likewise.
6946 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6947 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6948
971dc0b8
TT
69492014-02-12 Tom Tromey <tromey@redhat.com>
6950
6951 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6952 bin2hex, not hexify.
6953 * tracepoint.c (cmd_qtstatus): Likewise.
6954
0a822afb
TT
69552014-02-12 Tom Tromey <tromey@redhat.com>
6956
6957 * remote-utils.c (monitor_output): Pass explicit length to
6958 hexify.
6959
9c3d6531
TT
69602014-02-12 Tom Tromey <tromey@redhat.com>
6961
6962 * tracepoint.c: Include rsp-low.h.
6963 * server.c: Include rsp-low.h.
6964 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6965 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6966 declare.
6967 * remote-utils.c: Include rsp-low.h.
6968 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6969 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6970 (convert_int_to_ascii, convert_ascii_to_int): Move to
6971 common/rsp-low.c.
6972 * regcache.c: Include rsp-low.h.
6973 * ax.c: Include rsp-low.h.
6974 * Makefile.in (SFILES): Add common/rsp-low.c.
6975 (OBS): Add rsp-low.o.
6976 (rsp-low.o): New target.
6977
01fd3ea5
TT
69782014-02-12 Tom Tromey <tromey@redhat.com>
6979
6980 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6981 Include print-utils.h.
6982 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6983 (plongest, thirty_two, phex_nz): Remove.
6984 * Makefile.in (SFILES): Add common/print-utils.c.
6985 (OBS): Add print-utils.o.
6986 (print-utils-ipa.o): New target.
6987 (print-utils.o): New target.
6988 (IPA_OBJS): Add print-utils-ipa.o.
6989
e99dc820
TT
69902014-02-06 Tom Tromey <tromey@redhat.com>
6991
6992 * Makefile.in (SFILES): Fix indentation.
6993
ee1e2d4f
DE
69942014-02-05 Doug Evans <dje@google.com>
6995
6996 * linux-low.c (linux_wait_for_event): Improve comment.
6997 (linux_wait_1): Keep current_inferior in sync with event_child.
6998
f5a02773
DE
69992014-01-22 Doug Evans <dje@google.com>
7000
7001 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7002
87ce2a04
DE
70032014-01-22 Doug Evans <dje@google.com>
7004
7005 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7006 * configure: Regenerate.
7007 * config.in: Regenerate.
7008 * Makefile.in (SFILES): Add debug.c.
7009 (OBS): Add debug.o.
7010 * debug.c: New file.
7011 * debug.h: New file.
7012 * linux-aarch64-low.c (*): Update all debugging printfs to use
7013 debug_printf instead of fprintf.
7014 * linux-arm-low.c (*): Ditto.
7015 * linux-cris-low.c (*): Ditto.
7016 * linux-crisv32-low.c (*): Ditto.
7017 * linux-m32r-low.c (*): Ditto.
7018 * linux-sparc-low.c (*): Ditto.
7019 * linux-x86.c (*): Ditto.
7020 * linux-low.c (*): Ditto.
7021 (linux_wait_1): Add calls to debug_enter, debug_exit.
7022 (linux_wait): Remove redundant debugging printf.
7023 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7024 (linux_resume, unstop_all_lwps): Ditto.
7025 * mem-break.c (*): Update all debugging printfs to use
7026 debug_printf instead of fprintf.
7027 * remote-utils.c (*): Ditto.
7028 * thread-db.c (*): Ditto.
7029 * server.c #include <ctype.h>, "gdb_vecs.h".
7030 (debug_threads): Moved to debug.c.
7031 (*): Update all debugging printfs to use debug_printf instead of
7032 fprintf.
7033 (start_inferior): Replace call to fflush with call to debug_flush.
7034 (monitor_show_help): Mention set debug-format.
7035 (parse_debug_format_options): New function.
7036 (handle_monitor_command): Handle "monitor set debug-format".
7037 (gdbserver_usage): Mention --debug-format.
7038 (main): Parse --debug-format.
7039 * server.h (debug_threads): Declaration moved to debug.h.
7040 #include "debug.h".
7041 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7042 trace_debug_1 that uses debug_printf.
7043 (tracepoint_look_up_symbols): Update all debugging printfs to use
7044 debug_printf instead of fprintf.
7045
e671835b
BS
70462014-01-20 Baruch Siach <baruch@tkos.co.il>
7047
7048 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7049 sys/ptrace.h.
7050
b5737fa9
PA
70512014-01-17 Pedro Alves <palves@redhat.com>
7052
ea38d2a9 7053 PR build/16445
c7faa97a
PA
7054 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7055 defined after including gdb_proc_service.h.
b5737fa9 7056
40ed484e
DE
70572014-01-16 Doug Evans <dje@google.com>
7058
7059 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7060 (match_dll): Use it.
7061
969c39fb
MM
70622014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7063
7064 * target.h (target_ops) <read_btrace>: Change parameters and
7065 return type to allow error reporting.
7066 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7067 trace reading errors on.
7068 * linux-low.c (linux_low_read_btrace): Pass trace reading
7069 errors on.
7070 (linux_low_disable_btrace): New.
7071
ab7f45ba
DE
70722014-01-15 Doug Evans <dje@google.com>
7073
7074 * inferiors.c (thread_id_to_gdb_id): Delete.
7075 * inferiors.h (thread_id_to_gdb_id): Delete.
7076
66af0f44
EZ
70772014-01-13 Eli Zaretskii <eliz@gnu.org>
7078
7079 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7080 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7081 versions.
7082
9939e131
PA
70832014-01-08 Pedro Alves <palves@redhat.com>
7084
7085 * server.c (handle_status): Don't discard previous queued stop
7086 replies or thread's pending status here.
7087 (main) <disconnection>: Do it here instead.
7088
b7ea362b
PA
70892014-01-08 Pedro Alves <palves@redhat.com>
7090
7091 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7092 * server.c (visit_actioned_threads, handle_pending_status): New
7093 function.
7094 (handle_v_cont): Factor out parts to ...
7095 (resume): ... this new function. If in all-stop, and a thread
7096 being resumed has a pending status, report it without actually
7097 resuming.
7098 (myresume): Adjust to use the new 'resume' function.
7099 (clear_pending_status_callback, set_pending_status_callback)
7100 (find_status_pending_thread_callback): New functions.
7101 (handle_status): Handle the case of multiple threads having
7102 interesting statuses to report. Report threads' real last signal
7103 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7104 with an interesting thread to report the status for, instead of
7105 always reporting the status of the first thread.
7106
28498c42
JB
71072014-01-01 Joel Brobecker <brobecker@adacore.com>
7108
7109 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7110 * gdbreplay.c (gdbreplay_version): Likewise.
7111
f45c82da
YZ
71122013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7113
7114 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7115 iov.iov_len with the real length in use.
7116
379a5e2d
JB
71172013-12-13 Joel Brobecker <brobecker@adacore.com>
7118
7119 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7120 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7121 for all targets that use win32-low.c.
7122 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7123 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7124
4210d83e
PA
71252013-12-13 Pedro Alves <palves@redhat.com>
7126
7127 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7128 if equal to TARGET_WAITKIND_LOADED.
7129 * win32-low.c (cached_status): New static global.
7130 (win32_wait): Add declaration.
7131 (do_initial_child_stuff): Flush all initial pending debug events
7132 up to the initial breakpoint.
7133 (win32_wait): If CACHED_STATUS was set, return that instead
7134 of doing a real wait. Remove the code resuming the execution
7135 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7136 during the initial phase. Also remove the code changing
7137 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7138 TARGET_WAITKIND_STOPPED.
7139
e7f0d979
YQ
71402013-12-11 Yao Qi <yao@codesourcery.com>
7141
7142 * notif.c (handle_notif_ack): Return 0 if no notification
7143 matches.
7144
ebcf782c
DE
71452013-11-20 Doug Evans <dje@google.com>
7146
7147 * linux-low.c (linux_set_resume_request): Fix comment.
7148
20ad9378
DE
71492013-11-20 Doug Evans <dje@google.com>
7150
7151 * linux-low.c (resume_status_pending_p): Tweak comment.
7152
a196ebeb
WT
71532013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7154
7155 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7156 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7157 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7158 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7159 (srv_amd64_regobj): Add amd64-mpx.o.
7160 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7161 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7162 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7163 * i387-fp.c (num_pl_bnd_register) Added constant.
7164 (num_pl_bnd_cfg_registers) Added constant.
7165 (struct i387_xsave) Added reserved area and MPX fields.
7166 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7167 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7168 function.
7169 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7170 (init_registers_amd64_mpx_linux): Declare new function.
7171 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7172 (x86_64_regmap): Add MPX registers.
7173 (x86_linux_read_description): Add MPX case.
7174 (initialize_low_arch): Initialize MPX targets.
7175
0080a2f6
TT
71762013-11-18 Tom Tromey <tromey@redhat.com>
7177
7178 * configure: Rebuild.
7179 * configure.ac: Don't check for stdlib.h.
7180 * gdbreplay.c: Unconditionally include stdlib.h.
7181
2978b111
TT
71822013-11-18 Tom Tromey <tromey@redhat.com>
7183
7184 * config.in: Rebuild.
7185 * configure: Rebuild.
7186 * configure.ac: Don't use AC_HEADER_DIRENT.
7187
a3d08894
TT
71882013-11-18 Tom Tromey <tromey@redhat.com>
7189
7190 * server.h: Don't check HAVE_STRING_H.
7191 * gdbreplay.c: Don't check HAVE_STRING_H.
7192 * configure: Rebuild.
7193
0a5dd17d
TT
71942013-11-18 Tom Tromey <tromey@redhat.com>
7195
7196 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7197 LIBGNU.
7198
1bd2f0ba
TT
71992013-11-08 Tom Tromey <tromey@redhat.com>
7200
7201 * configure, config.in: Rebuild.
7202 * configure.ac: Remove unused configury.
7203
3266f10b
TT
72042013-11-08 Tom Tromey <tromey@redhat.com>
7205
7206 * acinclude.m4: Include common.m4, codeset.m4.
7207 * configure, config.in: Rebuild.
7208 * configure.ac: Use GDB_AC_COMMON.
7209
6682d959
AA
72102013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7211
7212 * linux-s390-low.c (HWCAP_S390_TE): New define.
7213 (s390_arch_setup): Consider the TE field in the HWCAP for
7214 determining 'have_regset_tdb'.
7215
fd0a4d76
SDJ
72162013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7217
7218 PR gdb/16014
7219 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7220 call to sizeof.
7221
1a3d890b
PA
72222013-10-02 Pedro Alves <palves@redhat.com>
7223
7224 * server.c (process_serial_event): Don't output "GDBserver
7225 exiting" if GDB is connected through stdio.
7226 * target.c (mywait): Likewise, be silent if GDB is connected
7227 through stdio.
7228
97ad4581
JB
72292013-10-01 Joel Brobecker <brobecker@adacore.com>
7230
7231 * lynx-low.c (lynx_add_threads_after_attach): New function.
7232 (lynx_attach): Remove call to add_thread. Add call to
7233 lynx_add_threads_after_attach instead.
7234
5b4e221c
MF
72352013-09-28 Mike Frysinger <vapier@gentoo.org>
7236
7237 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7238 * config.in, configure: Regenerated.
7239
ee47b2f8
YQ
72402013-09-18 Yao Qi <yao@codesourcery.com>
7241
7242 PR server/15959
7243 * server.c (start_inferior): Clear 'resume_info'.
7244
d6707650 72452013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7246
d6707650
JW
7247 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7248 for each register.
7249
9243dd0e 72502013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7251
9243dd0e
JW
7252 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7253 linux-tile-low.o to srv_tgtobj.
7254
c623a6ef
WN
72552013-09-16 Will Newton <will.newton@linaro.org>
7256
7257 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7258 out regs.
7259
fb71d39e
PA
72602013-09-06 Pedro Alves <palves@redhat.com>
7261
7262 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7263 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7264 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7265 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7266 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7267 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7268
8e7e9910
PA
72692013-09-06 Pedro Alves <palves@redhat.com>
7270
7271 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7272 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7273
7c3a12ca
PA
72742013-09-06 Pedro Alves <palves@redhat.com>
7275
7276 * linux-amd64-ipa.c: Include tracepoint.h.
7277 * linux-i386-ipa.c: Include tracepoint.h.
7278
8eb3d7b6
RW
72792013-09-06 Ricard Wanderlof <ricardw@axis.com>
7280
7281 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7282 (ps_get_thread_area): New function.
7283
eddddb9d
RW
72842013-09-06 Ricard Wanderlof <ricardw@axis.com>
7285
7286 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7287 (initialize_low_arch): Call init_registers_crisv32 rather than
7288 init_register_crisv32.
7289
533b0600
PA
72902013-09-05 Pedro Alves <palves@redhat.com>
7291
7292 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7293 to ...
7294 * hostio.h: ... this new file.
7295 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7296 win32-low.c: Include hostio.h.
7297
0ce3d3b5
PA
72982013-09-05 Pedro Alves <palves@redhat.com>
7299
7300 * server.h (gdb_client_data, handler_func, callback_handler_func)
7301 (delete_file_handler, add_file_handler, append_callback_event)
7302 (delete_callback_event, start_event_loop, initialize_event_loop):
7303 Move to event-loop.h and include it.
7304 * event-loop.h: New file.
7305
799cdc37
PA
73062013-09-05 Pedro Alves <palves@redhat.com>
7307
7308 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7309 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7310 (loaded_dll, unloaded_dll): Move to ...
7311 * dll.h: ... this new file.
7312 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7313
6a6bbd9d
PA
73142013-09-05 Pedro Alves <palves@redhat.com>
7315
7316 * server.h (current_process, get_thread_process, all_processes)
7317 (add_inferior_to_list, for_each_inferior, current_inferior)
7318 (remove_inferior, add_process, remove_process, find_process_pid)
7319 (have_started_inferiors_p, have_attached_inferiors_p)
7320 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7321 (clear_inferiors, find_inferior, find_inferior_id)
7322 (inferior_target_data, set_inferior_target_data)
7323 (inferior_regcache_data, set_inferior_regcache_data): Move to
7324 inferiors.h, and include it.
7325 * inferiors.h: New file.
7326
f699aaba
PA
73272013-09-05 Pedro Alves <palves@redhat.com>
7328
7329 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7330 Move ...
72f4393d 7331 * ax.h: ... here.
f699aaba 7332
c144c7a0
PA
73332013-09-05 Pedro Alves <palves@redhat.com>
7334
7335 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7336 tracepoint.h.
7337 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7338 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7339 (handle_tracepoint_general_set, handle_tracepoint_query)
7340 (tracepoint_finished_step, tracepoint_was_hit)
7341 (release_while_stepping_state_list, current_traceframe)
7342 (in_readonly_region, traceframe_read_mem)
7343 (fetch_traceframe_registers, traceframe_read_sdata)
7344 (traceframe_read_info, struct fast_tpoint_collect_status)
7345 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7346 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7347 (supply_fast_tracepoint_registers)
7348 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7349 (ipa_tdesc, claim_trampoline_space)
7350 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7351 (agent_mem_read, agent_get_trace_state_variable_value)
7352 (agent_set_trace_state_variable_value, agent_tsv_read)
7353 (agent_mem_read_string, get_raw_reg_func_addr)
7354 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7355 * tracepoint.h: ... this new file.
7356
ff42e6ab
PA
73572013-09-05 Pedro Alves <palves@redhat.com>
7358
7359 * server.h (perror_with_name, error, fatal, warning, paddress)
7360 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7361 include it.
7362 * utils.h: New file.
7363
541af0f4
PA
73642013-09-05 Pedro Alves <palves@redhat.com>
7365
7366 * server.h (remote_debug, noack_mode, transport_is_reliable)
7367 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7368 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7369 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7370 (write_enn, initialize_async_io, enable_async_io)
7371 (disable_async_io, check_remote_input_interrupt_request)
7372 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7373 (dead_thread_notify, prepare_resume_reply)
7374 (decode_address_to_semicolon, decode_address, decode_m_packet)
7375 (decode_M_packet, decode_X_packet, decode_xfer_write)
7376 (decode_search_memory_packet, unhexify, hexify)
7377 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7378 (look_up_one_symbol, relocate_instruction)
7379 (monitor_output): Move to remote-utils.h, and include it.
7380 * remote-utils.h: New file.
7381
eebdf26b
PA
73822013-09-05 Pedro Alves <palves@redhat.com>
7383
7384 * server.h (_): Delete.
7385
3aafd2ff
PA
73862013-09-02 Pedro Alves <palves@redhat.com>
7387
7388 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7389 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7390 allocated.
7391 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7392
cee83bcb
PM
73932013-09-02 Pierre Muller <muller@sourceware.org>
7394
7395 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7396 or WriteProcessMemory complete successfully and handle
7397 ERROR_PARTIAL_COPY error.
7398
9a13b2fa
PA
73992013-09-02 Pedro Alves <palves@redhat.com>
7400
7401 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7402 error instead of EIO.
7403
602e3198
JK
74042013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7405
7406 PR server/15604
7407 * linux-low.c: Include filestuff.h.
7408 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7409 * lynx-low.c: Include filestuff.h.
7410 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7411 * server.c: Include filestuff.h.
7412 (main): Call notice_open_fds.
7413 * spu-low.c: Include filestuff.h.
7414 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7415
96d7229d
LM
74162013-08-22 Luis Machado <lgustavo@codesourcery.com>
7417
7418 * Makefile.in: Explain why ../target and ../nat are not
7419 listed as include file search paths.
7420 (linux-waitpid.o): New object file rule.
7421 * configure.srv (srv_native_linux_obj): New variable.
7422 Replace all occurrences of linux native object files with
7423 $srv_native_linux_obj.
7424 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7425 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7426 (linux_enable_event_reporting): Remove declaration.
7427 (my_waitpid): Moved to common/linux-waitpid.c.
7428 (linux_wait_for_event): Pass ptid when calling
7429 linux_enable_event_reporting.
7430 (linux_supports_tracefork_flag): Remove.
7431 (linux_enable_event_reporting): Likewise.
7432 (linux_tracefork_grandchild): Remove.
7433 (STACK_SIZE): Moved to common/linux-ptrace.c.
7434 (linux_tracefork_child): Remove.
7435 (linux_test_for_tracefork): Remove.
7436 (linux_look_up_symbols): Call linux_supports_traceclone.
7437 (initialize_low): Remove call to linux_test_for_tracefork.
7438 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7439 common/linux-ptrace.h.
7440 (PTRACE_TYPE_ARG4): Likewise.
7441 Include linux-ptrace.h.
7442
32940073
PA
74432013-08-21 Pedro Alves <palves@redhat.com>
7444
7445 * config.in: Renegerate.
7446
33b60d58 74472013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7448
33b60d58
LM
7449 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7450 (SFILES): Remove $(srcdir)/common/target-common.c and
7451 add $(srcdir)/target/waitstatus.c.
7452 (OBS): Remove target-common.o and add waitstatus.o.
7453 (server_h): Remove $(srcdir)/../common/target-common.h and
7454 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7455 and $(srcdir)/../target/waitstatus.h.
7456 (target-common.o): Remove.
7457 (waitstatus.o): New target object file.
7458 * target.h: Do not include target-common.h and
7459 include target/resume.h, target/wait.h and
7460 target/waitstatus.h.
7461
b8e1b30e
LM
74622013-08-13 Luis Machado <lgustavo@codesourcery.com>
7463
7464 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7465 to PTRACE_TYPE_ARG3.
7466 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7467 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7468 PTRACE_TYPE_ARG4.
7469 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7470 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7471
7a60ad40
YQ
74722013-07-27 Jie Zhang <jie@codesourcery.com>
7473 Daniel Jacobowitz <dan@codesourcery.com>
7474 Yao Qi <yao@codesourcery.com>
7475
7476 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7477 (mips-linux-watch.o): New rule.
7478 (mips_linux_watch_h): New variable.
7479 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7480 srv_tgtobj.
7481 * linux-mips-low.c: Include mips-linux-watch.h.
7482 (struct arch_process_info, struct arch_lwp_info): New.
7483 (update_watch_registers_callback): New function.
7484 (mips_linux_new_process, mips_linux_new_thread) New functions.
7485 (mips_linux_prepare_to_resume, mips_insert_point): New
7486 functions.
7487 (mips_remove_point, mips_stopped_by_watchpoint): New
7488 functions.
7489 (rsp_bp_type_to_target_hw_bp_type): New function.
7490 (mips_stopped_data_address): New function.
7491 (the_low_target): Add watchpoint support functions.
7492
de6f69ad
YQ
74932013-07-27 Yao Qi <yao@codesourcery.com>
7494
7495 * i386-low.c: Include break-common.h.
7496 (enum target_hw_bp_type): Remove.
7497
3360c0bf
LM
74982013-07-24 Luis Machado <lgustavo@codesourcery.com>
7499
7500 * Makefile.in (SFILES): /common/target-common.c.
7501 (OBS): Add target-common.o.
7502 (server_h): Add $(srcdir)/../common/target-common.h.
7503 (target-common.o): New target.
7504 * server.c (queue_stop_reply_callback): Free
7505 status string after use.
7506 * target.c (target_waitstatus_to_string): Remove.
7507 * target.h: Include target-common.h.
7508 (resume_kind): Likewise.
7509 (target_waitkind): Likewise.
7510 (target_waitstatus): Likewise.
7511 (TARGET_WNOHANG): Likewise.
7512
bd885420
YQ
75132013-07-04 Yao Qi <yao@codesourcery.com>
7514
7515 * Makefile.in (host_alias): Use @host_noncanonical@.
7516 (target_alias): Use @target_noncanonical@.
7517 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7518 ACX_NONCANONICAL_HOST.
7519 * configure: Regenerated.
7520
7521 Revert:
7522 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7523
7524 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7525 * configure: Rebuild.
7526 * Makefile.in (version_host, version_target): Get from configure.
7527 (version.c): Use $(version_host) and $(version_target).
7528
17ef446e
PA
75292013-07-03 Pedro Alves <palves@redhat.com>
7530
7531 * Makefile.in (config.status): Depend on development.sh.
7532 * acinclude.m4: Include libmcheck.m4.
7533 * configure: Regenerate.
7534
7a9a7487
MG
75352013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7536
7537 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7538 attribute inside the parentheses.
7539 (winapi_DebugSetProcessKillOnExit): Ditto.
7540 (winapi_DebugBreakProcess): Ditto.
7541 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7542
49b64de6
MG
75432013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7544
7545 * notif.h (notif_event): Add a dummy member to avoid compiler
7546 errors.
7547
d5749ee7
PA
75482013-07-01 Pedro Alves <palves@redhat.com>
7549
7550 * hostio.c (HOSTIO_PATH_MAX): Define.
7551 (require_filename, handle_open, handle_unlink, handle_readlink):
7552 Use it.
7553
d8d2a3ee
PA
75542013-07-01 Pedro Alves <palves@redhat.com>
7555
7556 * server.h: Include "pathmax.h".
7557 * linux-low.c: Don't include sys/param.h.
7558 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7559 MAXPATHLEN.
7560 * win32-low.c: Don't include sys/param.h.
7561 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7562
bc7dea8d
PA
75632013-07-01 Pedro Alves <palves@redhat.com>
7564
7565 * event-loop.c: Don't check HAVE_UNISTD_H before including
7566 <unistd.h>.
7567 * gdbreplay.c: Likewise.
7568 * remote-utils.c: Likewise.
7569 * server.c: Likewise.
7570 * configure.ac: Don't check for unistd.h.
7571 * configure: Regenerate.
7572
d6c2da54
TT
75732013-06-28 Tom Tromey <tromey@redhat.com>
7574
7575 * Makefile.in (version.c): Use version.in, not
7576 common/version.in.
7577
257b6bec
MG
75782013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7579
7580 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7581 * configure: Rebuild.
7582 * Makefile.in (version_host, version_target): Get from configure.
7583 (version.c): Use $(version_host) and $(version_target).
7584
86ebe149
DK
75852013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7586
7587 Fix trace-status to output user name without trailing colon.
7588 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7589
f30aa5af
DK
75902013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7591
7592 Fix trace-status to output proper start-time and stop-time.
7593 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7594 output start time and stop time in hex as gdb expects.
7595
28a93511
YQ
75962013-06-26 Pedro Alves <pedro@codesourcery.com>
7597
7598 * tracepoint.c (build_traceframe_info_xml): Output trace state
7599 variables present in the trace buffer.
7600
01208463
TT
76012013-06-24 Tom Tromey <tromey@redhat.com>
7602
7603 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7604 create-version.sh.
7605 (version.o): Remove.
7606 * gdbreplay.c: Include version.h.
7607 (version, host_name): Don't declare.
7608 * server.h: Include version.h.
7609 (version, host_name): Don't declare.
7610
760256f9
PA
76112013-06-12 Pedro Alves <palves@redhat.com>
7612
7613 * linux-x86-low.c (linux_is_elf64): Delete global.
7614 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7615 with local linux_pid_exe_is_elf_64_file use.
7616
030031ee
PA
76172013-06-11 Pedro Alves <palves@redhat.com>
7618
7619 * linux-low.c (regset_disabled, disable_regset): New functions.
7620 (regsets_fetch_inferior_registers)
7621 (regsets_store_inferior_registers): Use them.
7622 (initialize_regsets_info); Don't allocate the disabled_regsets
7623 array here.
7624 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7625 comment.
7626
5da6eb0a
PA
76272013-06-11 Pedro Alves <palves@redhat.com>
7628
7629 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7630 xmalloc.
7631
7e5aaa09
PA
76322013-06-11 Pedro Alves <palves@redhat.com>
7633
7634 * linux-x86-low.c (initialize_low_arch): Call
7635 init_registers_x32_avx_linux.
7636
d878444c
JK
76372013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7638
7639 Fix compatibility with Android Bionic.
7640 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7641 it is not empty.
7642
3aee8918
PA
76432013-06-07 Pedro Alves <palves@redhat.com>
7644
5f2b57b5 7645 PR server/14823
3aee8918
PA
7646 * Makefile.in (OBS): Add tdesc.o.
7647 (IPA_OBJS): Add tdesc-ipa.o.
7648 (tdesc-ipa.o): New rule.
7649 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7650 interface.
7651 * linux-low.c (new_inferior): Delete.
7652 (disabled_regsets, num_regsets): Delete.
7653 (linux_add_process): Adjust to set the new per-process
7654 new_inferior flag.
7655 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7656 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7657 was a stop. When calling arch_setup, switch the current inferior
7658 to the thread that got an event.
7659 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7660 (regsets_fetch_inferior_registers)
7661 (regsets_store_inferior_registers): New regsets_info parameter.
7662 Adjust to use it.
7663 (linux_register_in_regsets): New regs_info parameter. Adjust to
7664 use it.
7665 (register_addr, fetch_register, store_register): New usrregs_info
7666 parameter. Adjust to use it.
7667 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7668 parameter regs_info. Adjust to use it.
7669 (linux_fetch_registers): Get the current inferior's regs_info, and
7670 adjust to use it.
7671 (linux_store_registers): Ditto.
7672 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7673 (initialize_low): Don't initialize the target_regsets here. Call
7674 initialize_low_arch.
7675 * linux-low.h (target_regsets): Delete declaration.
7676 (struct regsets_info): New.
7677 (struct usrregs_info): New.
7678 (struct regs_info): New.
7679 (struct process_info_private) <new_inferior>: New field.
7680 (struct linux_target_ops): Delete the num_regs, regmap, and
7681 regset_bitmap fields. New field regs_info.
7682 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7683 * i387-fp.c (num_xmm_registers): Delete.
7684 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7685 calls to new interface.
7686 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7687 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7688 Infer the number of xmm registers from the regcache's target
7689 description.
7690 * i387-fp.h (num_xmm_registers): Delete.
7691 * inferiors.c (add_thread): Don't install the thread's regcache
7692 here.
7693 * proc-service.c (gregset_info): Fetch the current inferior's
7694 regs_info. Adjust to use it.
7695 * regcache.c: Include tdesc.h.
7696 (register_bytes, reg_defs, num_registers)
7697 (gdbserver_expedite_regs): Delete.
7698 (get_thread_regcache): If the thread doesn't have a regcache yet,
7699 create one, instead of aborting gdbserver.
7700 (regcache_invalidate_one): Rename to ...
7701 (regcache_invalidate_thread): ... this.
7702 (regcache_invalidate_one): New.
7703 (regcache_invalidate): Only invalidate registers of the current
7704 process.
7705 (init_register_cache): Add target_desc parameter, and use it.
7706 (new_register_cache): Ditto. Assert the target description has a
7707 non zero registers_size.
7708 (regcache_cpy): Add assertions. Adjust.
7709 (realloc_register_cache, set_register_cache): Delete.
7710 (registers_to_string, registers_from_string): Adjust.
7711 (find_register_by_name, find_regno, find_register_by_number)
7712 (register_cache_size): Add target_desc parameter, and use it.
7713 (free_register_cache_thread, free_register_cache_thread_one)
7714 (regcache_release, register_cache_size): New.
7715 (register_size): Add target_desc parameter, and use it.
7716 (register_data, supply_register, supply_register_zeroed)
7717 (supply_regblock, supply_register_by_name, collect_register)
7718 (collect_register_as_string, collect_register_by_name): Adjust.
7719 * regcache.h (struct target_desc): Forward declare.
7720 (struct regcache) <tdesc>: New field.
7721 (init_register_cache, new_register_cache): Add target_desc
7722 parameter.
7723 (regcache_invalidate_thread): Declare.
7724 (regcache_invalidate_one): Delete declaration.
7725 (regcache_release): Declare.
7726 (find_register_by_number, register_cache_size, register_size)
7727 (find_regno): Add target_desc parameter.
7728 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7729 declarations.
7730 * remote-utils.c: Include tdesc.h.
7731 (outreg, prepare_resume_reply): Adjust.
7732 * server.c: Include tdesc.h.
7733 (gdbserver_xmltarget): Delete declaration.
7734 (get_features_xml, process_serial_event): Adjust.
7735 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7736 declare.
7737 (struct process_info) <tdesc>: New field.
7738 (ipa_tdesc): Declare.
7739 * tdesc.c: New file.
7740 * tdesc.h: New file.
7741 * tracepoint.c: Include tdesc.h.
7742 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7743 (get_context_regcache): Adjust to pass ipa_tdesc down.
7744 (do_action_at_tracepoint): Adjust to get the register cache size
7745 from the context regcache's description.
7746 (traceframe_walk_blocks): Adjust to get the register cache size
7747 from the current trace frame's description.
7748 (traceframe_get_pc): Adjust to get current trace frame's
7749 description and pass it down.
7750 (gdb_collect): Adjust to get the register cache size from the
7751 IPA's description.
7752 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7753 (gdbserver_xmltarget): Delete.
7754 (initialize_low_tracepoint): Set the ipa's target description.
7755 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7756 (initialize_low_tracepoint): Set the ipa's target description.
7757 * linux-x86-low.c: Include tdesc.h.
7758 [__x86_64__] (is_64bit_tdesc): New.
7759 (ps_get_thread_area, x86_get_thread_area): Use it.
7760 (i386_cannot_store_register): Rename to ...
7761 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7762 (i386_cannot_fetch_register): Rename to ...
7763 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7764 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7765 to new interface.
7766 (target_regsets): Rename to ...
7767 (x86_regsets): ... this.
7768 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7769 interface.
7770 (x86_siginfo_fixup): Use is_64bit_tdesc.
7771 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7772 (tdesc_x32_avx_linux, tdesc_x32_linux)
7773 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7774 Declare.
7775 (x86_linux_update_xmltarget): Delete.
7776 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7777 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7778 (AMD64_LINUX_USER64_CS): New.
7779 (x86_linux_read_description): New, based on
7780 x86_linux_update_xmltarget.
7781 (same_process_callback): New.
7782 (x86_arch_setup_process_callback): New.
7783 (x86_linux_update_xmltarget): New.
7784 (x86_regsets_info): New.
7785 (amd64_linux_regs_info): New.
7786 (i386_linux_usrregs_info): New.
7787 (i386_linux_regs_info): New.
7788 (x86_linux_regs_info): New.
7789 (x86_arch_setup): Reimplement.
7790 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7791 (x86_emit_ops): Ditto.
7792 (the_low_target): Adjust. Install x86_linux_regs_info,
7793 x86_cannot_fetch_register, and x86_cannot_store_register.
7794 (initialize_low_arch): New.
7795 * linux-ia64-low.c (tdesc_ia64): Declare.
7796 (ia64_fetch_register): Adjust.
7797 (ia64_usrregs_info, regs_info): New globals.
7798 (ia64_regs_info): New function.
7799 (the_low_target): Adjust.
7800 (initialize_low_arch): New function.
7801 * linux-sparc-low.c (tdesc_sparc64): Declare.
7802 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7803 Adjust.
7804 (sparc_arch_setup): New function.
7805 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7806 (the_low_target): Adjust.
7807 (initialize_low_arch): New function.
7808 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7809 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7810 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7811 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7812 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7813 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7814 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7815 (tdesc_powerpc_isa205_vsx64l): Declare.
7816 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7817 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7818 (ppc_set_pc, ppc_get_hwcap): Adjust.
7819 (ppc_usrregs_info): Forward declare.
7820 (!__powerpc64__) ppc_regmap_adjusted: New global.
7821 (ppc_arch_setup): Adjust to the current process'es target
7822 description.
7823 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7824 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7825 (ppc_store_evrregset): Adjust.
7826 (target_regsets): Rename to ...
7827 (ppc_regsets): ... this, and make static.
7828 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7829 (ppc_regs_info): New function.
7830 (the_low_target): Adjust.
7831 (initialize_low_arch): New function.
7832 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7833 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7834 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7835 (tdesc_s390x_linux64v2): Declare.
7836 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7837 (s390_fill_gregset, s390_store_last_break): Adjust.
7838 (target_regsets): Rename to ...
7839 (s390_regsets): ... this, and make static.
7840 (s390_get_pc, s390_set_pc): Adjust.
7841 (s390_get_hwcap): New target_desc parameter, and use it.
7842 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7843 (s390_arch_setup): Adjust to set the current process'es target
7844 description. Don't adjust the regmap.
7845 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7846 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7847 (regs_info_3264): New globals.
7848 (s390_regs_info): New function.
7849 (the_low_target): Adjust.
7850 (initialize_low_arch): New function.
7851 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7852 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7853 [__mips64] (init_registers_mips_linux)
7854 (init_registers_mips_dsp_linux): Delete defines.
7855 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7856 (have_dsp): New global.
7857 (mips_read_description): New, based on mips_arch_setup.
7858 (mips_arch_setup): Reimplement.
7859 (get_usrregs_info): New function.
7860 (mips_cannot_fetch_register, mips_cannot_store_register)
7861 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7862 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7863 (target_regsets): Rename to ...
7864 (mips_regsets): ... this, and make static.
7865 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7866 (dsp_regs_info, regs_info): New globals.
7867 (mips_regs_info): New function.
7868 (the_low_target): Adjust.
7869 (initialize_low_arch): New function.
7870 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7871 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7872 Declare.
7873 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7874 (arm_read_description): New, with bits factored from
7875 arm_arch_setup.
7876 (arm_arch_setup): Reimplement.
7877 (target_regsets): Rename to ...
7878 (arm_regsets): ... this, and make static.
7879 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7880 (arm_regs_info): New function.
7881 (the_low_target): Adjust.
7882 (initialize_low_arch): New function.
7883 * linux-m68k-low.c (tdesc_m68k): Declare.
7884 (target_regsets): Rename to ...
7885 (m68k_regsets): ... this, and make static.
7886 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7887 (m68k_regs_info): New function.
7888 (m68k_arch_setup): New function.
7889 (the_low_target): Adjust.
7890 (initialize_low_arch): New function.
7891 * linux-sh-low.c (tdesc_sharch): Declare.
7892 (target_regsets): Rename to ...
7893 (sh_regsets): ... this, and make static.
7894 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7895 (sh_regs_info, sh_arch_setup): New functions.
7896 (the_low_target): Adjust.
7897 (initialize_low_arch): New function.
7898 * linux-bfin-low.c (tdesc_bfin): Declare.
7899 (bfin_arch_setup): New function.
7900 (bfin_usrregs_info, regs_info): New globals.
7901 (bfin_regs_info): New function.
7902 (the_low_target): Adjust.
7903 (initialize_low_arch): New function.
7904 * linux-cris-low.c (tdesc_cris): Declare.
7905 (cris_arch_setup): New function.
7906 (cris_usrregs_info, regs_info): New globals.
7907 (cris_regs_info): New function.
7908 (the_low_target): Adjust.
7909 (initialize_low_arch): New function.
7910 * linux-cris-low.c (tdesc_crisv32): Declare.
7911 (cris_arch_setup): New function.
7912 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7913 (cris_regs_info): New function.
7914 (the_low_target): Adjust.
7915 (initialize_low_arch): New function.
7916 * linux-m32r-low.c (tdesc_m32r): Declare.
7917 (m32r_arch_setup): New function.
7918 (m32r_usrregs_info, regs_info): New globals.
7919 (m32r_regs_info): Adjust.
7920 (initialize_low_arch): New function.
7921 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7922 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7923 (tic6x_usrregs_info): Forward declare.
7924 (tic6x_read_description): New function, based on ...
7925 (tic6x_arch_setup): ... this. Reimplement.
7926 (target_regsets): Rename to ...
7927 (tic6x_regsets): ... this, and make static.
7928 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7929 (tic6x_regs_info): New function.
7930 (the_low_target): Adjust.
7931 (initialize_low_arch): New function.
7932 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7933 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7934 (target_regsets): Rename to ...
7935 (xtensa_regsets): ... this, and make static.
7936 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7937 globals.
7938 (xtensa_arch_setup, xtensa_regs_info): New functions.
7939 (the_low_target): Adjust.
7940 (initialize_low_arch): New function.
7941 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7942 (nios2_arch_setup): Set the current process'es tdesc.
7943 (target_regsets): Rename to ...
7944 (nios2_regsets): ... this.
7945 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7946 (nios2_regs_info): New function.
7947 (the_low_target): Adjust.
7948 (initialize_low_arch): New function.
a261b8f5
PA
7949 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7950 (aarch64_arch_setup): Set the current process'es tdesc.
7951 (target_regsets): Rename to ...
7952 (aarch64_regsets): ... this.
7953 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7954 (aarch64_regs_info): New function.
7955 (the_low_target): Adjust.
7956 (initialize_low_arch): New function.
3aee8918
PA
7957 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7958 globals.
7959 (target_regsets): Rename to ...
7960 (tile_regsets): ... this.
7961 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7962 (tile_regs_info): New function.
7963 (tile_arch_setup): Set the current process'es tdesc.
7964 (the_low_target): Adjust.
7965 (initialize_low_arch): New function.
7966 * spu-low.c (tdesc_spu): Declare.
7967 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7968 * win32-arm-low.c (tdesc_arm): Declare.
7969 (arm_arch_setup): New function.
7970 (the_low_target): Install arm_arch_setup instead of
7971 init_registers_arm.
7972 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7973 (init_windows_x86): Rename to ...
7974 (i386_arch_setup): ... this. Set `win32_tdesc'.
7975 (the_low_target): Adjust.
7976 * win32-low.c (win32_tdesc): New global.
7977 (child_add_thread): Don't create the thread cache here.
7978 (do_initial_child_stuff): Set the new process'es tdesc.
7979 * win32-low.h (struct target_desc): Forward declare.
7980 (win32_tdesc): Declare.
7981 * lynx-i386-low.c (tdesc_i386): Declare global.
7982 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7983 * lynx-low.c (lynx_tdesc): New global.
7984 (lynx_add_process): Set the new process'es tdesc.
7985 * lynx-low.h (struct target_desc): Forward declare.
7986 (lynx_tdesc): Declare global.
7987 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7988 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7989 * nto-low.c (nto_tdesc): New global.
7990 (do_attach): Set the new process'es tdesc.
7991 * nto-low.h (struct target_desc): Forward declare.
7992 (nto_tdesc): Declare.
7993 * nto-x86-low.c (tdesc_i386): Declare.
7994 (nto_x86_arch_setup): Set `nto_tdesc'.
7995
b1fbec62
GB
79962013-06-04 Gary Benson <gbenson@redhat.com>
7997
7998 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7999 to qSupported response when appropriate.
8000 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8001 with nonzero-length annex.
8002 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8003 arguments supplied in annex.
8004
d1ec4ce7
DE
80052013-05-31 Doug Evans <dje@google.com>
8006
ac44adcb 8007 PR server/15594
d1ec4ce7
DE
8008 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8009 64 bits in 64-cross-32 environment.
8010
9b25f2d3
PA
80112013-05-28 Pedro Alves <palves@redhat.com>
8012
8013 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8014 (aarch64-without-fpu.c): Delete rule.
8015 * configure.srv (aarch64*-*-linux*): Remove references to
8016 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8017 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8018 declaration.
8019
6740dc9c
PA
80202013-05-24 Pedro Alves <palves@redhat.com>
8021
8022 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8023 instead of strchr/decode_address. Error if the range isn't split
8024 with a ','. Don't assume there's be a ':' in the action.
8025
c2d6af84
PA
80262013-05-23 Yao Qi <yao@codesourcery.com>
8027 Pedro Alves <palves@redhat.com>
8028
8029 * linux-low.c (lwp_in_step_range): New function.
8030 (linux_wait_1): If the thread was range stepping and stopped
8031 outside the stepping range, report the stop to GDB. Otherwise,
8032 continue stepping. Add range stepping debug output.
8033 (linux_set_resume_request): Copy the step range from the resume
8034 request to the lwp.
8035 (linux_supports_range_stepping): New.
8036 (linux_target_ops) <supports_range_stepping>: Set to
8037 linux_supports_range_stepping.
8038 * linux-low.h (struct linux_target_ops)
8039 <supports_range_stepping>: New field.
8040 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8041 * linux-x86-low.c (x86_supports_range_stepping): New.
8042 (the_low_target) <supports_range_stepping>: Set to
8043 x86_supports_range_stepping.
8044 * server.c (handle_v_cont): Handle 'r' action.
8045 (handle_v_requests): Append ";r" if the target supports range
8046 stepping.
8047 * target.h (struct thread_resume) <step_range_start,
8048 step_range_end>: New fields.
8049 (struct target_ops) <supports_range_stepping>:
8050 New field.
8051 (target_supports_range_stepping): New macro.
8052
58794e1a
JB
80532013-05-17 Joel Brobecker <brobecker@adacore.com>
8054
8055 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8056 confusion in comment.
8057
d631c5a7
JB
80582013-05-17 Joel Brobecker <brobecker@adacore.com>
8059
8060 * lynx-low.c (struct process_info_private): New type.
8061 (lynx_add_process): New function.
8062 (lynx_create_inferior, lynx_attach): Replace calls to
8063 add_process by calls to lynx_add_process.
8064 (lynx_resume): If PTID is null, then try using
8065 current_process()->private->last_wait_event_ptid.
8066 Add comments.
8067 (lynx_clear_inferiors): Delete. The contents of that function
8068 has been inlined in lynx_mourn;
8069 (lynx_wait_1): Save the ptid in the process's private data.
8070 (lynx_mourn): Free the process' private data. Replace call
8071 to lynx_clear_inferiors by call to clear_inferiors.
8072
96f7a20f
YQ
80732013-05-17 Yao Qi <yao@codesourcery.com>
8074
8075 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8076 the right place.
8077
db0dfaa0
LM
80782013-05-16 Luis Machado <lgustavo@codesourcery.com>
8079
8080 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8081 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8082 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8083 PT_TEXT_END_ADDR guards. Update comments.
8084 (linux_target_op) <read_offsets>: Conditionally define to
8085 linux_read_offsets if the target is UCLIBC and if it defines
8086 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8087
68f5f838
SL
80882013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8089 Andrew Jenner <andrew@codesourcery.com>
8090
8091 * Makefile.in (SFILES): Add linux-nios2-low.c.
8092 (clean): Add action to delete nios2-linux.c.
8093 (nios2-linux.c): New rule.
8094 * configure.srv: Add nios2*-*-linux*.
8095 * linux-nios2-low.c: New.
8096
1ebff1fd
HAQ
80972013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8098
8099 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8100
f6150862
HZ
81012013-04-25 Hui Zhu <hui@codesourcery.com>
8102
8103 PR gdb/15186
f6150862
HZ
8104 * ax.c (ax_printf): Add fflush.
8105
614c279d
TT
81062013-04-22 Tom Tromey <tromey@redhat.com>
8107
8108 * Makefile.in (SFILES): Add filestuff.c.
8109 (OBS): Add filestuff.o.
8110 (filestuff.o): New target.
8111 * config.in, configure: Rebuild.
8112 * configure.ac: Check for fdwalk, pipe2.
8113
7d4e5717
PA
81142013-04-17 Pedro Alves <palves@redhat.com>
8115
8116 * configure.ac (USE_THREAD_DB): Delete variable.
8117 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8118 Don't AC_SUBST USE_THREAD_DB.
8119 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8120 * config.in, configure: Regenerate.
8121
d5c93e41
PA
81222013-04-16 Pedro Alves <palves@redhat.com>
8123
8124 * linux-low.h (struct lwp_info) <thread_known>: Move under
8125 the USE_THREAD_DB #ifdef.
8126
04f5fe89
PA
81272013-04-16 Pedro Alves <palves@redhat.com>
8128
8129 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8130 (linux-low.o): Delete rule.
8131 * linux-low.h: Always include "gdb_thread_db.h" instead of
8132 conditionally including thread_db.h.
8133 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8134 HAVE_THREAD_DB_H.
8135
480b27bf
JK
81362013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8137
8138 * Makefile.in (install-only): Fix make install regression.
8139
43662968
JK
81402013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8141
8142 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8143 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8144 installation.
8145 * gdbserver.1: Remove.
8146
3e74e146
PA
81472013-03-22 Pedro Alves <palves@redhat.com>
8148
8149 * linux-low.c (handle_extended_wait): Don't call
8150 linux_enable_event_reporting.
8151
a8347a2a
TT
81522013-03-15 Tony Theodore <tonyt@logyst.com>
8153
8154 PR build/9098:
8155 * Makefile.in (SHELL): Use @SHELL@.
8156
eeb56fa7
SDJ
81572013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8158
8159 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8160 compiler warning.
8161
4fa7e2ff
JB
81622013-03-13 Joel Brobecker <brobecker@adacore.com>
8163
8164 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8165 Remove extraneous NULL element.
8166
8ddb1965
YQ
81672013-03-13 Yao Qi <yao@codesourcery.com>
8168
8169 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8170 'V' block in trace frame.
8171
9accd112
MM
81722013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8173
8174 * target.h (struct target_ops): Add btrace ops.
8175 (target_supports_btrace): New macro.
8176 (target_enable_btrace): New macro.
8177 (target_disable_btrace): New macro.
8178 (target_read_btrace): New macro.
8179 * gdbthread.h (struct thread_info): Add btrace field.
8180 * server.c: Include btrace-common.h.
8181 (handle_btrace_general_set): New function.
8182 (handle_btrace_enable): New function.
8183 (handle_btrace_disable): New function.
8184 (handle_general_set): Call handle_btrace_general_set.
8185 (handle_qxfer_btrace): New function.
8186 (struct qxfer qxfer_packets[]): Add btrace entry.
8187 * inferiors.c (remove_thread): Disable btrace.
8188 * linux-low: Include linux-btrace.h.
8189 (linux_low_enable_btrace): New function.
8190 (linux_low_read_btrace): New function.
8191 (linux_target_ops): Add btrace ops.
8192 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8193 Add srv_linux_btrace=yes.
8194 (x86_64-*-linux*): Add linux-btrace.o.
8195 Add srv_linux_btrace=yes.
8196 * configure.ac: Define HAVE_LINUX_BTRACE.
8197 * config.in: Regenerated.
8198 * configure: Regenerated.
8199
5cc22e4c
MM
82002013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8201
8202 * server.c (handle_qxfer): Preserve error message if -3 is
8203 returned.
8204 (qxfer): Document the -3 return value.
8205
7c97f91e
MM
82062013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8207
8208 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8209 (linux_btrace_h): New variable.
8210 (linux-btrace.o): New rule.
8211
be9a119c 82122013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8213 Hafiz Abid Qadeer <abidh@codesourcery.com>
8214
8215 * tracepoint.c (trace_buffer_size): New global.
8216 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8217 (init_trace_buffer): Change to one-argument function. Allocate
8218 trace buffer memory.
8219 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8220 handle QTBuffer:size packet.
8221 (cmd_bigqtbuffer_size): New function.
8222 (initialize_tracepoint): Call init_trace_buffer with
8223 DEFAULT_TRACE_BUFFER_SIZE.
8224 * server.c (handle_query): Add QTBuffer:size in the
8225 supported packets.
8226
e64f7499
YQ
82272013-03-07 Yao Qi <yao@codesourcery.com>
8228
8229 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8230 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8231 of -1.
8232 (cmd_qtsp): Adjust condition. Do post increment.
8233 Set cur_action and cur_step_action back to 0.
8234
f0ae6fc3
PA
82352013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8236
8237 PR server/15236
8238 * linux-low.c (linux_write_memory): Return early success if LEN is
8239 zero.
8240
b5b0b0af
CV
82412013-03-05 Corinna Vinschen <vinschen@redhat.de>
8242
334ad4a8 8243 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8244
589bc927
TT
82452013-02-28 Tom Tromey <tromey@redhat.com>
8246
8247 * configure.ac: Invoke AC_SYS_LARGEFILE.
8248 * configure, config.in: Rebuild.
8249
dfe07582
CV
82502013-02-28 Corinna Vinschen <vinschen@redhat.com>
8251
8252 * win32-low.c: Throughout, fix format strings and casts of
8253 printf-like functions to avoid type related warnings on all
8254 platforms.
8255 (get_child_debug_event): Print dwDebugEventCode as hex since
8256 that's how it's usually documented.
8257
736cd585
YQ
82582013-02-28 Yao Qi <yao@codesourcery.com>
8259
8260 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8261 pulongest.
8262
e1f58301
JW
82632013-02-27 Jiong Wang <jiwang@tilera.com>
8264
8265 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8266 (reg-tilegx32.c): New rule.
8267 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8268 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8269 different register info initializer according to elf class.
8270 (init_registers_tilgx32): New function. The tilegx32 register info
8271 initializer.
8272 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8273 (tile_store_gregset): Likewise.
8274
d171ca78
YQ
82752013-02-27 Yao Qi <yao@codesourcery.com>
8276
8277 * server.c (process_point_options): Print debug message when
8278 debug_threads is true.
8279
282bbdf3
YQ
82802013-02-26 Yao Qi <yao@codesourcery.com>
8281
8282 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8283
aca22551
PA
82842013-02-19 Pedro Alves <palves@redhat.com>
8285 Kai Tietz <ktietz@redhat.com>
8286
8287 PR gdb/15161
8288
8289 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8290 instead of strtoul to extract address from packet.
8291 (process_serial_event) <'z'>: Likewise.
8292
4f3cee1c
YQ
82932013-02-18 Yao Qi <yao@codesourcery.com>
8294
8295 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8296
8e1d55a3
PA
82972013-02-14 Pedro Alves <palves@redhat.com>
8298
8299 Plug memory leak.
8300
8301 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8302 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8303
458820da
PA
83042013-02-14 Pedro Alves <palves@redhat.com>
8305
8306 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8307
baea0dae
PA
83082013-02-14 Pedro Alves <palves@redhat.com>
8309
8310 * tracepoint.c (save_string): Delete.
8311 (add_tracepoint_action): Use savestring instead of save_string.
8312
0b1afbb3
PA
83132013-02-12 Pedro Alves <palves@redhat.com>
8314
8315 * linux-xtensa-low.c: Ditto.
8316 * xtensa-xtregs.c: Ditto.
8317
8a4ac37e
PA
83182013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8319
8320 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8321 thread_db.
8322
148de6bb
MS
83232013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8324
8325 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8326 aarch64_num_wp_regs and aarch64_num_bp_regs to
8327 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8328
55fac6e0
MS
83292013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8330
8331 * linux-aarch64-low.c (ps_get_thread_area): Replace
8332 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8333
176eb98c
MS
83342013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8335 Marcus Shawcroft <marcus.shawcroft@arm.com>
8336 Nigel Stephens <nigel.stephens@arm.com>
8337 Yufeng Zhang <yufeng.zhang@arm.com>
8338
8339 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8340 (aarch64.c, aarch64-without-fpu.c): New targets.
8341 * configure.srv (aarch64*-*-linux*): New.
8342 * linux-aarch64-low.c: New file.
8343
56f7af9c
MS
83442013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8345
43aaf8b6 8346 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8347 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8348 (dequeue_one_deferred_signal, linux_resume_one_thread)
8349 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8350 (linux_tracefork_grandchild, linux_test_for_tracefork)
8351 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8352 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8353 where the argument is 0.
8354
60f662b0
YQ
83552013-01-25 Yao Qi <yao@codesourcery.com>
8356
8357 * event-loop.c: Include "queue.h".
8358 (gdb_event_p): New typedef.
8359 (struct gdb_event) <next_event>: Remove.
8360 (event_queue): Change to QUEUE(gdb_event_p).
8361 (async_queue_event): Remove.
8362 (gdb_event_xfree): New.
8363 (initialize_event_loop): New.
8364 (process_event): Use API from QUEUE.
8365 (wait_for_event): Likewise.
8366 * server.c (main): Call initialize_event_loop.
8367 * server.h (initialize_event_loop): Declare.
8368
5ae4861a
YQ
83692013-01-18 Yao Qi <yao@codesourcery.com>
8370
8371 * ax.h (struct eval_agent_expr_context): New.
8372 (gdb_eval_agent_expr): Update declaration.
8373 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8374 TFRAME. Add new argument CTX.
8375 * server.h (struct eval_agent_expr_context): Declare.
8376 (agent_mem_read, agent_tsv_read): Update declaration.
8377 (agent_mem_read_string): Likewise.
8378 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8379 (add_traceframe_block): Add new argument TPOINT.
8380 Increase TPOINT->traceframe_usage.
8381 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8382 eval_tracepoint_agent_expr.
8383 (condition_true_at_tracepoint): Likewise.
8384 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8385 (agent_mem_read_string, agent_tsv_read): Likewise.
8386
85e00e85
YQ
83872013-01-16 Yao Qi <yao@codesourcery.com>
8388
8389 * linux-low.c (linux_resume_one_lwp): Don't check
8390 'lwp->bp_reinsert != 0'.
8391
4039cf45
JB
83922013-01-07 Joel Brobecker <brobecker@adacore.com>
8393 Pedro Alves <palves@redhat.com>
8394
8395 * lynx-low.c (ptrace_request_to_str): Define a temporary
8396 macro and use it to simplify this function's implementation.
8397
9044dee2
JB
83982013-01-07 Joel Brobecker <brobecker@adacore.com>
8399
8400 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8401 sets errno.
8402
e6352c8f
JB
84032013-01-07 Joel Brobecker <brobecker@adacore.com>
8404
8405 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8406
50681a27
JB
84072013-01-07 Joel Brobecker <brobecker@adacore.com>
8408
8409 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8410
3f6e77ef
JB
84112013-01-07 Joel Brobecker <brobecker@adacore.com>
8412
8413 * lynx-low.c (lynx_resume): Use the resume_info parameter
8414 to determine the ptid for the lynx_ptrace call, unless
8415 it is equal to minus_one_ptid, in which case we use the
8416 ptid of the current_inferior.
8417 (lynx_wait_1): After having received a thread create/exit
8418 event, resume the inferior's execution using the signaling
8419 thread's ptid, rather than the old ptid.
8420
7fda33ae
JB
84212013-01-07 Joel Brobecker <brobecker@adacore.com>
8422
8423 * lynx-low.c (lynx_resume): Delete variable ret.
8424
b9786c74
JB
84252013-01-01 Joel Brobecker <brobecker@adacore.com>
8426
8427 * gdbreplay.c (gdbreplay_version): Update copyright year.
8428 * server.c (gdbserver_version): Likewise.
8429
8b93d60f
JB
84302012-12-17 Joel Brobecker <brobecker@adacore.com>
8431
8432 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8433 new thread.
8434
037335a7
JB
84352012-12-17 Joel Brobecker <brobecker@adacore.com>
8436
8437 * lynx-low.c (ptrace_request_to_str): Add handling for
8438 PTRACE_GETTRACESIG.
8439
52d4cbd8
JB
84402012-12-17 Joel Brobecker <brobecker@adacore.com>
8441
8442 * lynx-low.c (lynx_attach): Delete variable new_process.
8443
ab8f6ca9
JB
84442012-12-17 Joel Brobecker <brobecker@adacore.com>
8445
8446 * lynx-low.c (lynx_create_inferior): Delete variable
8447 new_process.
8448
78cbc024
JB
84492012-12-17 Joel Brobecker <brobecker@adacore.com>
8450
8451 * lynx-low.c (ptrace_request_to_str): Do not handle
8452 PTRACE_GETTHREADLIST if this macro does not exist.
8453
14a00470
YQ
84542012-12-15 Yao Qi <yao@codesourcery.com>
8455
8456 * Makefile.in (OBS): Add notif.o.
8457 * notif.c, notif.h: New.
8458 * server.c: Include "notif.h".
8459 (struct vstop_notif) <next>: Remove.
8460 <base>: New field.
8461 (queue_stop_reply): Update.
8462 (push_event, send_next_stop_reply): Remove.
8463 (discard_queued_stop_replies): Update.
8464 (notif_stop): New variable.
8465 (handle_v_stopped): Remove.
8466 (handle_v_requests): Don't call handle_v_stopped. Call
8467 handle_ack_notif instead.
8468 (queue_stop_reply_callback): Call notif_event_enque instead
8469 of queue_stop_reply.
8470 (handle_status): Don't call send_next_stop_reply, call
8471 notif_write_event instead.
8472 (kill_inferior_callback): Likewise.
8473 (detach_or_kill_inferior_callback): Likewise.
8474 (main): Call initialize_notif.
8475 (process_serial_event): Call QUEUE_is_empty.
8476 (handle_target_event): Call notif_push instead of push event.
8477 * server.h (push_event): Remove declaration.
8478
61c125b9
TT
84792012-12-10 Tom Tromey <tromey@redhat.com>
8480
8481 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8482 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8483 macros.
8484 (.c.o): Rewrite.
8485 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8486 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8487 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8488 (amd64-linux-ipa.o, ax.o): Rewrite.
8489 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8490 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8491 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8492 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8493 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8494 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8495 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8496 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8497 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8498 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8499 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8500 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8501 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8502 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8503 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8504 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8505 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8506 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8507 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8508 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8509 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8510 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8511 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8512 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8513 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8514 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8515 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8516 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8517 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8518 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8519 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8520 (reg-tilegx.o): Remove.
8521 (all_object_files): New macro.
8522 Include .deps files.
8523 * aclocal.m4, configure: Rebuild.
8524 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8525 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8526 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8527
e90e9ad9
TT
85282012-12-05 Tom Tromey <tromey@redhat.com>
8529
8530 PR gdb/14917:
8531 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8532
02d403bf 85332012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8534
8535 * configure.ac: Check for linux/perf_event.h.
8536 * config.in: Regenerated.
8537 * configure: Regenerated.
8538
0270a750
PA
85392012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8540
8541 * hostio.c (handle_readlink): Decrease buffer size
8542 parameter passed to readlink by one byte.
8543
8c29b58e
YQ
85442012-11-26 Yao Qi <yao@codesourcery.com>
8545
8546 * configure.ac (build_warnings): Append '-Wempty-body'.
8547 * configure: Regenerated.
8548 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8549 body.
8550
8bdce1ff
PM
85512012-11-15 Pierre Muller <muller@sourceware.org>
8552
8553 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8554 * config.in: Regenerate.
8555 * configure: Regenerate.
8556 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8557 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8558 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8559 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8560 header.
8561 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8562 instead of <sys/wait.h> header.
8563 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8564
02d403bf 85652012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8566
8567 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8568 (various make rules): Remove -DGDBSERVER
8569
fbd5db48
YQ
85702012-11-09 Yao Qi <yao@codesourcery.com>
8571
8572 * spu-low.c (current_ptid): Move it to ..
8573 * gdbthread.h: ... here. New.
8574 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8575 * server.c (myresume, process_serial_event): Likewise.
8576 * thread-db.c (thread_db_find_new_threads): Likewise.
8577 * tracepoint.c (run_inferior_command): Likewise.
8578
b3dc46ff
AB
85792012-10-01 Andrew Burgess <aburgess@broadcom.com>
8580
8581 * server.c (handle_search_memory_1): Include access length in
8582 warning message.
8583
07c04788
HPN
85842012-09-05 Michael Brandt <michael.brandt@axis.com>
8585
8586 * linux-crisv32-low.c: Fix compile errors.
8587
918d227b
YQ
85882012-09-04 Yao Qi <yao@codesourcery.com>
8589
8590 * tracepoint.c (cmd_qtsv): Adjust debug message.
8591 Don't check CUR_TPOINT.
8592
18c1b81a
YQ
85932012-08-28 Yao Qi <yao@codesourcery.com>
8594
8595 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8596 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8597 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8598 Remove declarations of xmalloc, xreallloc, xstrdup and
8599 freeargv.
8600 * Makefile.in (libiberty_h): New.
8601 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8602 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8603
dc82f37b
YQ
86042012-08-23 Yao Qi <yao@codesourcery.com>
8605
8606 * server.h: Remove declaration of 'xsnprintf'.
8607
406b1477
KS
86082012-08-22 Keith Seitz <keiths@redhat.com>
8609
8610 * server.h: Include build-gnulib-gbserver/config.h.
8611 * gdbreplay.c: Likewise.
8612
e6712ff1
DE
86132012-08-08 Doug Evans <dje@google.com>
8614
8615 * Makefile.in (SFILES): Add gdb_vecs.c.
8616 (OBS): Add gdb_vecs.o.
8617 (gdb_vecs_h, host_defs_h): New variables.
8618 (thread-db.o): Add $(gdb_vecs_h) dependency.
8619 (gdb_vecs.o): New rule.
8620 * thread-db.c: #include "gdb_vecs.h".
8621 (thread_db_load_search): Use a vector to iterate over path elements.
8622 Handle text appearing after "$pdir".
8623
8624 * configure.ac: Add check for strstr.
8625 * config.in: Regenerate.
8626 * configure: Regenerate.
8627
7c3270ae
UW
86282012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8629
8630 * hostio.c (handle_pread): If pread fails, fall back to attempting
8631 lseek/read.
8632 (handle_pwrite): Likewise for pwrite.
8633
b62e2b27
UW
86342012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8635
8636 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8637 between unsupported TYPE and unimplementable ADDR/LEN combination.
8638 (arm_insert_point): Act on new return value.
8639
78a99e91
PA
86402012-07-31 Pedro Alves <palves@redhat.com>
8641
8642 * server.c (process_point_options): Only skip tokens if we find
8643 one that is unrecognized. Don't treat 'X' specially while
8644 skipping unrecognized tokens.
8645
fcf303ab
UW
86462012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8647
8648 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8649 to 4-byte-align HW breakpoint addresses for Thumb.
8650
7255706c
YQ
86512012-07-27 Yao Qi <yao@codesourcery.com>
8652
8653 PR remote/14161.
8654
8655 * server.h: Declare gdb_agent_about_to_close.
8656 * target.c (kill_inferior): Include "agent.h".
8657 New. Send command 'kill'.
8658 * target.h (kill_inferior): Removed macro.
8659 * tracepoint.c (gdb_agent_about_to_close): New.
8660 (gdb_agent_helper_thread): Handle command 'close'.
8661 Wait endlessly until the inferior stops.
8662 Install gdb_agent_remove_socket to atexit hook.
8663 (agent_socket_name): New static variable.
8664 (gdb_agent_socket_init): Replace local variable 'name' with
8665 'agent_socket_name'.
8666 (gdb_agent_remove_socket): New.
8667
5a3f286f
YQ
86682012-07-27 Yao Qi <yao@codesourcery.com>
8669
8670 * server.c (process_point_options): Stop at 'X' when parsing.
8671
961bd387
ME
86722012-07-19 Michael Eager <eager@eagercon.com>
8673
a261b8f5 8674 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8675 to hw_execute.
8676 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8677 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8678 hardware breakpoint.
8679
aa7c7447
JK
86802012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8681
8682 * gdbserver/linux-low.c (initialize_low): Call
8683 linux_ptrace_init_warnings.
8684
7f216e7c
DE
86852012-07-02 Doug Evans <dje@google.com>
8686
8687 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8688 pointer to int.
8689
d3ce09f5
SS
86902012-07-02 Stan Shebs <stan@codesourcery.com>
8691
8692 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8693 (ax.o): Add it to build rule.
8694 (ax-ipa.o): Ditto.
8695 (OBS): Add format.o.
8696 (IPA_OBS): Add format.o.
8697 * server.c (handle_query): Claim support for breakpoint commands.
8698 (process_point_options): Add command case.
8699 (process_serial_event): Leave running if there are printfs in
8700 effect.
8701 * mem-break.h (any_persistent_commands): Declare.
8702 (add_breakpoint_commands): Declare.
8703 (gdb_no_commands_at_breakpoint): Declare.
8704 (run_breakpoint_commands): Declare.
8705 * mem-break.c (struct point_command_list): New struct.
8706 (struct breakpoint): New field command_list.
8707 (any_persistent_commands): New function.
8708 (add_commands_to_breakpoint): New function.
8709 (add_breakpoint_commands): New function.
8710 (gdb_no_commands_at_breakpoint): New function.
8711 (run_breakpoint_commands): New function.
8712 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8713 locally.
8714 * ax.c: Include format.h.
8715 (ax_printf): New function.
8716 (gdb_eval_agent_expr): Add printf opcode.
8717
2f8f6aed
YQ
87182012-06-13 Yao Qi <yao@codesourcery.com>
8719
8720 * server.c (start_inferior): Remove duplicated writes to fields
8721 'last_resume_kind' and 'last_status' of 'current_inferior'.
8722
0c9070b3
YQ
87232012-06-12 Yao Qi <yao@codesourcery.com>
8724 Pedro Alves <palves@redhat.com>
8725
8726 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8727 comment.
8728 * server.c (handle_v_cont): Extend comment.
8729
c52daf70
YQ
87302012-06-11 Yao Qi <yao@codesourcery.com>
8731
8732 * linux-low.c (linux_attach): Add 'static'.
8733
d38bbb0a
YQ
87342012-06-06 Yao Qi <yao@codesourcery.com>
8735
8736 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8737
89dc0afd
JK
87382012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8739
8740 Fix gcc -flto compilation warning.
8741 * server.c (main): Make variable multi_mode and attach volatile.
8742
75f62ce7
TJB
87432012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8744
8745 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8746 if the platform doesn't know about it.
8747
65f479b6
PA
87482012-05-30 Jeff Kenton <jkenton@tilera.com>
8749
8750 * Makefile.in (SFILES): Add linux-tile-low.c.
8751 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8752 * configure.srv: Handle tilegx-*-linux*.
8753 * linux-tile-low.c: New file.
8754
0c5bf5a9
JK
87552012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8756
8757 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8758
a493e3e2
PA
87592012-05-24 Pedro Alves <palves@redhat.com>
8760
8761 PR gdb/7205
8762
43aaf8b6 8763 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8764
2ea28649
PA
87652012-05-24 Pedro Alves <palves@redhat.com>
8766
8767 PR gdb/7205
8768
8769 Replace target_signal with gdb_signal throughout.
8770
8d409d16
MR
87712012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8772
8773 * linux-low.c (linux_store_registers): Avoid the copying sequence
8774 when no data has been retrieved by ptrace.
8775
23512c01
MGD
87762012-05-22 Will Deacon <will.deacon@arm.com>
8777
8778 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8779 Include asm/ptrace.h.
8780 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8781 already defined.
8782
4934b29e
MR
87832012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8784
8785 * linux-low.c (linux_store_registers): Don't re-retrieve data
8786 with ptrace that has already been obtained from /proc. Always
8787 copy any data retrieved with ptrace to the buffer supplied.
8788
bde24c0a
PA
87892012-05-11 Yao Qi <yao@codesourcery.com>
8790 Pedro Alves <palves@redhat.com>
8791
8792 * linux-low.c (enum stopping_threads_kind): New.
8793 (stopping_threads): Change type to `enum stopping_threads_kind'.
8794 (handle_extended_wait): If stopping and suspending threads, leave
8795 the new_lwp suspended too.
8796 (linux_wait_for_event): Adjust.
8797 (stop_all_lwps): Set `stopping_threads' to
8798 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8799 whether we're suspending threads or just stopping them. Assert no
8800 recursion happens.
8801
623b6bdf
YQ
88022012-04-29 Yao Qi <yao@codesourcery.com>
8803
8804 * server.h: Move some code to ...
8805 * gdbthread.h: ... here. New.
8806 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8807 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8808 (nto-low.o, win32-low.o): Likewise.
8809 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8810 * regcache.c, remote-utils.c, server.c: Likewise.
8811 * target.c, tracepoint.c, win32-low.c: Likewise.
8812
f15f9948
TJB
88132012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8814
8815 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8816 (PTRACE_ARG4_TYPE): Likewise.
8817 (PTRACE_XFER_TYPE): Likewise.
8818 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8819 ptrace to PTRACE_ARG3_TYPE.
8820 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8821 (PTRACE_ARG4_TYPE): Likewise.
8822 (PTRACE_XFER_TYPE): Likewise.
8823 (linux_detach_one_lwp): Cast fourth argument of
8824 ptrace to long then PTRACE_ARG4_TYPE.
8825 (regsets_fetch_inferior_registers): Cast third argument of
8826 ptrace to long then PTRACE_ARG3_TYPE.
8827 (regsets_store_inferior_registers): Likewise.
8828
38ea300a
PA
88292012-04-20 Pedro Alves <palves@redhat.com>
8830
8831 * configure: Regenerate.
8832
c971b7fa
PA
88332012-04-19 Pedro Alves <palves@redhat.com>
8834
43aaf8b6 8835 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8836 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8837 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8838 (all, install-only, uninstall, clean-info, all-lib, clean): No
8839 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8840 (maintainer-clean realclean distclean): Use subdir_do.
8841 (subdir_do): New.
8842 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8843 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8844 * acinclude.m4: Include acx_configure_dir.m4.
8845 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8846 calls. Call AC_PROG_RANLIB. Configure gnulib using
8847 ACX_CONFIGURE_DIR.
8848 (GNULIB): New.
8849 (GNULIB_STDINT_H): Adjust.
8850 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8851 * gdbreplay.c: Include build-gnulib/config.h.
8852 * server.h: Likewise.
8853 * aclocal.m4: Regenerate.
8854 * config.in: Regenerate.
8855 * configure: Regenerate.
c971b7fa 8856
809277f8
PA
88572012-04-19 Pedro Alves <palves@redhat.com>
8858
8859 * Makefile.in (LIBGNU, INCGNU): Adjust.
8860 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8861 (all, install-only, uninstall, clean-info, all-lib, clean)
8862 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8863 * configure.ac: Adjust AC_OUTPUT output.
8864 * aclocal.m4: Regenerate.
8865 * configure: Regenerate.
8866
fd9bb8b8
PA
88672012-04-19 Pedro Alves <palves@redhat.com>
8868
8869 * Makefile.in (generated_files): New.
8870 (server_h): Remove the explicit dependency on config.h, and depend
8871 on $generated_files.
8872
1c298c66
PA
88732012-04-19 Pedro Alves <palves@redhat.com>
8874
8875 * Makefile.in (INCGNU): Add -Ignulib.
8876
57c4b50b
PA
88772012-04-19 Pedro Alves <palves@redhat.com>
8878
8879 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8880 (INCGNU): ... this, and spell out -I here.
8881 (GNULIB_LIB): Rename to ...
8882 (LIBGNU): ... this.
8883 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8884
1030e047
PA
88852012-04-19 Pedro Alves <palves@redhat.com>
8886
8887 * config.in: Regenerate.
8888
447d4319
PA
88892012-04-19 Pedro Alves <palves@redhat.com>
8890
8891 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8892 * server.h (memmem): Remove declaration.
8893 * config.in: Regenerate.
8894 * configure: Regenerate.
8895
aad9eab9
YQ
88962012-04-19 Yao Qi <yao@codesourcery.com>
8897
8898 * Makefile.in (SFILES): Add common/vec.c.
8899 (OBS): Add vec.o.
8900 (vec.o): New rule.
8901
3e10640f
YQ
89022012-04-19 Yao Qi <yao@codesourcery.com>
8903
8904 * remote-utils.c (prepare_resume_reply): Replace with macro
8905 target_core_of_thread.
8906 * server.c (handle_qxfer_threads_proper): Likewise.
8907 * target.h (traget_core_of_thread): New macro.
8908
71622373
PA
89092012-04-18 Pedro Alves <palves@redhat.com>
8910
8911 * aclocal.m4: Regenerate.
8912 * configure: Regenerate.
8913
80d26939
YQ
89142012-04-16 Yao Qi <yao@codesourcery.com>
8915
8916 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8917 duplicated on address.
8918
42476b70
YQ
89192012-04-16 Yao Qi <yao@codesourcery.com>
8920
8921 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8922 (struct tracepoint_action_ops) <send>: New field.
8923 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8924 (agent_expr_send, x_tracepoint_action_send): New.
8925 (l_tracepoint_action_send): New.
8926 (cmd_qtdp): Download and install tracepoint
8927 according to `use_agent'.
8928 (run_inferior_command): Add one more parameter `len'.
8929 Update callers.
8930 (tracepoint_send_agent): New.
8931 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8932
7bc83639
YQ
89332012-04-16 Yao Qi <yao@codesourcery.com>
8934
8935 * tracepoint.c (download_tracepoints): Moved to ...
8936 (cmd_qtstart): ... here.
8937
5f18041e
YQ
89382012-04-14 Yao Qi <yao@codesourcery.com>
8939
8940 * tracepoint.c: Include inttypes.h.
8941 (struct collect_memory_action): Use sized types.
8942 (struct tracepoint): Likewise.
8943 (cmd_qtdp, stop_tracing): Update print specifiers.
8944 (cmd_qtp, response_tracepoint): Likewise.
8945 (collect_data_at_tracepoint): Likewise.
8946 (collect_data_at_step): Likewise.
8947
55a8c076
YQ
89482012-04-14 Yao Qi <yao@codesourcery.com>
8949
8950 Import gnulib module inttypes.
8951 * aclocal.m4, config.in, configure: Regenerated.
8952
dc750257
YQ
89532012-04-14 Yao Qi <yao@codesourcery.com>
8954
8955 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8956 Makefile and config.status at last.
8957
0ab5faf9
YQ
89582012-04-13 Yao Qi <yao@codesourcery.com>
8959
8960 * tracepoint.c: Include stdint.h unconditionally.
8961
18f5fd81
TJB
89622012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8963
8964 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8965 on BFD_HAVE_SYS_PROCFS_TYPE.
8966 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8967 * configure: Regenerate.
8968 * config.in: Likewise.
8969
4d47af5c
L
89702012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8971
8972 * Makefile.in (clean): Also remove x32.c x32-linux.c
8973 x32-avx.c x32-avx-linux.c.
8974 (x32.o): New target.
8975 (x32.c): Likewise.
8976 (x32-linux.o): Likewise.
8977 (x32-linux.c): Likewise.
8978 (x32-avx.o): Likewise.
8979 (x32-avx.c): Likewise.
8980 (x32-avx-linux.o): Likewise.
8981 (x32-avx-linux.c): Likewise.
8982
8983 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8984 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8985 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8986 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8987 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8988 i386/x32-avx-linux.xml.
8989
8990 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8991 (init_registers_x32_avx_linux): Likwise.
8992 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8993 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8994
ecedbe58
PA
89952012-04-13 Pedro Alves <palves@redhat.com>
8996
8997 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8998 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8999 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9000 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9001 the sub-make.
9002
c92b5177
L
90032012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9004
9005 * linux-x86-low.c (compat_x32_clock_t): New.
9006 (compat_x32_siginfo_t): Likewise.
9007 (compat_x32_siginfo_from_siginfo): Likewise.
9008 (siginfo_from_compat_x32_siginfo): Likewise.
9009 (linux_is_elf64): Likewise.
9010 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9011 and siginfo_from_compat_x32_siginfo for x32.
9012 (x86_arch_setup): Set linux_is_elf64.
9013
214d508e
L
90142012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9015
9016 PR gdb/13969
9017 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9018 e_machine field.
9019 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9020 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9021 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9022 compatible with process.
9023
c9a1864a
YQ
90242012-04-12 Yao Qi <yao@codesourcery.com>
9025
9026 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9027 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9028 (install-only, install-info, clean): Handle sub dir gnulib.
9029 (all-lib, am--refresh): New targets.
9030 (memmem.o): Remove target.
9031 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9032 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9033 (AC_REPLACE_FUNCS): Remove memmem.
9034 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9035 (AC_OUTPUT): Generate Makefile in gnulib/.
9036 * aclocal.m4, config.in, configure: Regenerated.
9037
367ba2c2
MR
90382012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9039
9040 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9041
9d236627
PA
90422012-04-05 Pedro Alves <palves@redhat.com>
9043
9044 -Werror=strict-aliasing
9045
9046 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9047 pointer.
9048
111217b3
PA
90492012-04-04 Pedro Alves <palves@redhat.com>
9050
9051 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9052 (sparc_store_gregset_from_stack, sparc_store_gregset)
9053 (sparc_breakpoint_at): Fix formatting.
9054
8365dcf5
TJB
90552012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9056
9057 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9058 are available.
9059 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9060 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9061 * config.in: Regenerate.
9062 * configure: Likewise.
9063
689cc2ae
PA
90642012-03-29 Pedro Alves <palves@redhat.com>
9065
9066 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9067 Correct ptrace arguments.
9068
c14dfd32
PA
90692012-03-28 Pedro Alves <palves@redhat.com>
9070
9071 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9072 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9073 (IA64_FR1_REGNUM): New defines.
9074 (ia64_fetch_register): New.
9075 (the_low_target): Install it.
9076 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9077 field.
9078 * linux-low.c (linux_fetch_registers): Try the
9079 the_low_target.fetch_register hook first.
9080
9081 * linux-arm-low.c (the_low_target): Adjust.
9082 * linux-bfin-low.c (the_low_target): Adjust.
9083 * linux-cris-low.c (the_low_target): Adjust.
9084 * linux-crisv32-low.c (the_low_target): Adjust.
9085 * linux-m32r-low.c (the_low_target): Adjust.
9086 * linux-m68k-low.c (the_low_target): Adjust.
9087 * linux-mips-low.c (the_low_target): Adjust.
9088 * linux-ppc-low.c (the_low_target): Adjust.
9089 * linux-s390-low.c (the_low_target): Adjust.
9090 * linux-sh-low.c (the_low_target): Adjust.
9091 * linux-sparc-low.c (the_low_target): Adjust.
9092 * linux-tic6x-low.c (the_low_target): Adjust.
9093 * linux-x86-low.c (the_low_target): Adjust.
9094 * linux-xtensa-low.c (the_low_target): Adjust.
9095
63c88e13
PA
90962012-03-26 Pedro Alves <palves@redhat.com>
9097
9098 * server.c (handle_qxfer_libraries): Don't bail early if
9099 the_target->qxfer_libraries_svr4 is not NULL.
9100
fb723180
PA
91012012-03-26 Pedro Alves <palves@redhat.com>
9102
9103 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9104
0afae3cf
PA
91052012-03-23 Pedro Alves <palves@redhat.com>
9106
9107 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9108 "library-list-svr4" element's start tag when the the DSO list is
9109 empty.
9110
485f1ee4
PA
91112012-03-23 Pedro Alves <palves@redhat.com>
9112
9113 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9114 a variable whose type size is the same as the inferior's pointer
9115 size.
9116
a5362b9a
TS
91172012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9118
9119 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9120 struct siginfo.
9121 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9122 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9123 * linux-low.h: Include <signal.h>.
9124 (struct siginfo): Remove forward declaration.
9125 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9126 struct siginfo.
9127
d226c142
MF
91282012-03-21 Mike Frysinger <vapier@gentoo.org>
9129
9130 * .gitignore: Ignore more files.
9131
122f36ef
PA
91322012-03-19 Pedro Alves <palves@redhat.com>
9133 Jan Kratochvil <jan.kratochvil@redhat.com>
9134
9135 * server.c (cont_thread, general_thread): Add describing comments.
9136 (start_inferior): Clear `cont_thread'.
9137 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9138 of a process.
9139
fc3e5175
YQ
91402012-03-15 Yao Qi <yao@codesourcery.com>
9141
9142 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9143 handling to ...
9144 (cmd_qtdp): ... here.
9145
8d0d92cd
YQ
91462012-03-15 Yao Qi <yao@codesourcery.com>
9147
9148 * tracepoint.c (struct tracepoint_action_ops): New.
9149 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9150 (m_tracepoint_action_download): New.
9151 (r_tracepoint_action_download): New.
9152 (x_tracepoint_action_download): New.
9153 (l_tracepoint_action_download): New.
9154 (add_tracepoint_action): Install `action->ops' according type.
9155 (download_tracepoint_1): Move code `download' function pointer
9156 of various tracepoint_action_ops.
9157
87b0bb13
JK
91582012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9159
9160 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9161 linux_ptrace_attach_warnings.
9162
5f572dec
JK
91632012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9164
9165 * Makefile.in (linux-ptrace.o): New.
9166 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9167 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9168 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9169 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9170 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9171 of these targets.
9172 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9173
f4647387
YQ
91742012-03-08 Yao Qi <yao@codesourcery.com>
9175 Pedro Alves <palves@redhat.com>
9176
9177 Fix PR server/13392.
9178 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9179 offset of JMP insn.
9180 * tracepoint.c (remove_tracepoint): New.
9181 (cmd_qtdp): Call remove_tracepoint when failed to install.
9182
9b224c5e
PA
91832012-03-07 Pedro Alves <palves@redhat.com>
9184
9185 * linux-low.c (get_detach_signal): New.
9186 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9187 Pass on pending signals to PTRACE_DETACH. Check the result of the
9188 ptrace call.
9189 * server.c (program_signals, program_signals_p): New.
9190 (handle_general_set): Handle QProgramSignals.
9191 * server.h (program_signals, program_signals_p): Declare.
9192
e237a7e2
JK
91932012-03-05 Pedro Alves <palves@redhat.com>
9194 Jan Kratochvil <jan.kratochvil@redhat.com>
9195
9196 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9197 New comment why.
9198
5808517f
YQ
91992012-03-03 Yao Qi <yao@codesourcery.com>
9200
9201 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9202 agent_look_up_symbols.
9203
58b4daa5
YQ
92042012-03-03 Yao Qi <yao@codesourcery.com>
9205
9206 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9207 (linux-x86-low.o): Likewise.
9208 * server.h: Remove in_process_agent_loaded.
9209 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9210 common/agent.c.
9211 Update callers.
9212
8ffcbaaf
YQ
92132012-03-03 Yao Qi <yao@codesourcery.com>
9214
9215 * tracepoint.c (gdb_agent_capability): New global.
9216 (in_process_agent_loaded_ust): Renamed to
9217 `in_process_agent_supports_ust'.
9218 Update callers.
9219 (in_process_agent_supports_ust): Call agent_capability_check.
9220 (clear_installed_tracepoints): Assert that agent supports
9221 agent.
9222
d1feda86
YQ
92232012-03-03 Yao Qi <yao@codesourcery.com>
9224
9225 * linux-low.c (linux_supports_agent): New.
9226 (linux_target_ops): Initialize field `supports_agent' with
9227 linux_supports_agent.
9228 * target.h (struct target_ops) <supports_agent>: New.
9229 (target_supports_agent): New macro.
9230 * server.c (handle_general_set): Handle packet 'QAgent'.
9231 (handle_query): Send `QAgent+'.
9232 * Makefile.in (server.o): Depends on agent.h.
9233
2fa291ac
YQ
92342012-03-03 Yao Qi <yao@codesourcery.com>
9235
9236 * Makefile.in (OBS): Add agent.o.
9237 Add new rule for agent.o.
9238 Track dependence of tracepoint.c on agent.h.
9239 * tracepoint.c (run_inferior_command_1):
9240 (run_inferior_command): Call agent_run_command.
9241 (gdb_ust_connect_sync_socket): Deleted. Move it to
9242 common/agent.c.
9243 (resume_thread, stop_thread): Likewise.
9244 (gdb_ust_socket_init): Renamed to ...
9245 (gdb_agent_socket_init): ... New.
9246 (gdb_ust_thread): Renamed to ...
9247 (gdb_agent_helper_thread): ... New.
9248 (gdb_ust_init): Move some code to ...
9249 (gdb_agent_init): ... here. New.
9250 [HAVE_UST]: Call gdb_ust_init.
9251 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9252 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9253 * config.in, configure: Regenerated.
9254
05044653
PA
92552012-03-02 Pedro Alves <palves@redhat.com>
9256
9257 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9258 * linux-low.c (struct simple_pid_list): New.
9259 (stopped_pids): New a struct simple_pid_list pointer.
9260 (add_to_pid_list, pull_pid_from_list): New.
9261 (handle_extended_wait): Don't assume the first signal new children
9262 report is SIGSTOP. Adjust call to pull_pid_from_list.
9263 (linux_wait_for_lwp): Adjust.
9264
8d00225b
YQ
92652012-03-02 Yao Qi <yao@codesourcery.com>
9266
9267 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9268 debug log.
9269
19560ba5
YQ
92702012-03-02 Yao Qi <yao@codesourcery.com>
9271
9272 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9273 `stop_pc' and `tpoint'. Update caller.
9274
1faeff08
MR
92752012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9276
9277 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9278 * linux-low.c (use_linux_regsets): New macro.
9279 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9280 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9281 (linux_register_in_regsets): New function.
9282 (usr_fetch_inferior_registers): Skip registers covered by
9283 regsets.
9284 (usr_store_inferior_registers): Likewise.
9285 (usr_fetch_inferior_registers): New macro.
9286 (usr_store_inferior_registers): Likewise.
9287 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9288 (linux_store_registers): Likewise.
9289 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9290 prototype.
9291 (init_registers_mips64_dsp_linux): Likewise.
9292 (init_registers_mips_linux): New macro.
9293 (init_registers_mips_dsp_linux): Likewise.
9294 (mips_dsp_num_regs): Likewise.
9295 (DSP_BASE, DSP_CONTROL): New fallback macros.
9296 (mips_base_regs): New macro.
9297 (mips_regmap): Use it. Fix the size.
9298 (mips_dsp_regmap): New variable.
9299 (mips_dsp_regset_bitmap): Likewise.
9300 (mips_arch_setup): New function.
9301 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9302 than mips_regmap.
9303 (mips_cannot_store_register): Likewise.
9304 (the_low_target): Update .arch_setup, .num_regs and .regmap
9305 initializers. Add .regset_bitmap initializer.
9306 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9307 initializer.
9308 * linux-bfin-low.c (the_low_target): Likewise.
9309 * linux-cris-low.c (the_low_target): Likewise.
9310 * linux-crisv32-low.c (the_low_target): Likewise.
9311 * linux-ia64-low.c (the_low_target): Likewise.
9312 * linux-m32r-low.c (the_low_target): Likewise.
9313 * linux-m68k-low.c (the_low_target): Likewise.
9314 * linux-ppc-low.c (the_low_target): Likewise.
9315 * linux-s390-low.c (the_low_target): Likewise.
9316 * linux-sh-low.c (the_low_target): Likewise.
9317 * linux-sparc-low.c (the_low_target): Likewise.
9318 * linux-tic6x-low.c (the_low_target): Likewise.
9319 * linux-x86-low.c (the_low_target): Likewise.
9320 * linux-xtensa-low.c (the_low_target): Likewise.
9321 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9322 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9323 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9324 srv_xmlfiles.
9325 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9326 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9327
c03e6ccc
YQ
93282012-02-29 Yao Qi <yao@codesourcery.com>
9329 Pedro Alves <palves@redhat.com>
9330
9331 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9332 `step_over_finished' is true.
9333
644cebc9
PA
93342012-02-27 Pedro Alves <palves@redhat.com>
9335
9336 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9337 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9338
c14d7ab2
PA
93392012-02-27 Pedro Alves <palves@redhat.com>
9340
9341 PR server/9684
9342 * linux-low.c (pid_is_stopped): New.
9343 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9344
412c89dd
LM
93452012-02-25 Luis Machado <lgustavo@codesourcery.com>
9346
9347 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9348 of conditions.
9349
b745defe
MR
93502012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9351
9352 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9353
9f3a5c85
LM
93542012-02-24 Luis Machado <lgustavo@codesourcery>
9355
9356 * server.c (handle_query): Advertise support for target-side
9357 breakpoint condition evaluation.
9358 (process_point_options): New function.
9359 (process_serial_event): When inserting a breakpoint, check for
9360 a target-side condition that should be evaluated.
9361
9362 * mem-break.c: Include regcache.h and ax.h.
9363 (point_cond_list_t): New data structure.
9364 (breakpoint) <cond_list>: New field.
9365 (find_gdb_breakpoint_at): Make non-static.
9366 (delete_gdb_breakpoint_at): Clear any target-side
9367 conditions.
9368 (clear_gdb_breakpoint_conditions): New function.
9369 (add_condition_to_breakpoint): Likewise.
9370 (add_breakpoint_condition): Likewise.
9371 (gdb_condition_true_at_breakpoint): Likewise.
9372 (gdb_breakpoint_here): Return result directly instead
9373 of going through a local variable.
9374
9375 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9376 (clear_gdb_breakpoint_conditions): Likewise.
9377 (add_breakpoint_condition): Likewise.
9378 (gdb_condition_true_at_breakpoint): Likewise.
9379
9380 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9381 (need_step_over_p): Take target-side breakpoint condition into
9382 consideration.
9383
5e1dc496
LM
93842012-02-24 Luis Machado <lgustavo@codesourcery>
9385
9386 * server.h: Include tracepoint.h.
9387 (agent_mem_read, agent_get_trace_state_variable_value,
9388 agent_set_trace_state_variable_value,
9389 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9390 get_set_tsv_func_addr): New prototypes.
9391
9392 * ax.h: New include file.
9393 * ax.c: New source file.
9394
9395 * tracepoint.c: Include ax.h.
9396 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9397 agent_expr, eval_result_type): Move to ax.h.
9398 (parse_agent_expr): Rename to ...
9399 (gdb_parse_agent_expr): ... this, make it non-static and move
9400 to ax.h.
9401 (unparse_agent_expr) Rename to ...
9402 (gdb_unparse_agent_expr): ... this, make it non-static and move
9403 to ax.h.
9404 (eval_agent_expr): Rename to ...
9405 (eval_tracepoint_agent_expr): ... this.
9406 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9407 forward declarations.
9408 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9409 (agent_get_trace_state_variable_value): New function.
9410 (agent_set_trace_state_variable_value): New function.
9411 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9412 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9413 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9414 (condition_true_at_tracepoint): Likewise.
9415 (parse_agent_expr): Rename to ...
9416 (gdb_parse_agent_expr): ... this and move to ax.c.
9417 (unparse_agent_expr): Rename to ...
9418 (gdb_unparse_agent_expr): ... this and move to ax.c.
9419 (gdb_agent_op_name): Move to ax.c.
9420 (eval_agent_expr): Rename to ...
9421 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9422 and move to ax.c.
9423 (eval_tracepoint_agent_expr): New function.
9424 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9425 non-static.
5e1dc496
LM
9426 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9427 ax.c.
9428 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9429 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9430 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9431 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9432 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9433 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9434 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9435 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9436 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9437 (compile_bytecodes): Remove forward declaration.
9438 (is_goto_target): Move to ax.c.
9439 (compile_bytecodes): Move to ax.c and call
9440 agent_get_trace_state_variable_value (...) and
9441 agent_set_trace_state_variable_value (...).
9442
9443 * Makefile.in: Update ax.c and IPA dependencies.
9444
277e4e52
PA
94452012-02-24 Pedro Alves <palves@redhat.com>
9446
9447 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9448 (cmd_bigqtbuffer_circular): ... this. Only handle
9449 'QTBuffer:circular:'.
9450 (handle_tracepoint_general_set): Adjust.
9451
bf4c19f7
YQ
94522012-02-16 Yao Qi <yao@codesourcery.com>
9453
9454 * inferiors.c: Move code to ...
9455 * dll.c: .... here. New.
9456 * server.h: Declare clear_dlls.
9457 * Makefile.in (SFILES): Add dll.c.
9458 (OBS): Add dll.o
9459 (dll.o): New rule.
9460
d73f2619
YQ
94612012-02-11 Yao Qi <yao@codesourcery.com>
9462
9463 * server.c: (handle_monitor_command): Add a new parameter
9464 `own_buf'.
9465 (handle_query): Update caller.
9466
f8255c2a
JB
94672012-02-09 Joel Brobecker <brobecker@adacore.com>
9468
9469 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9470 * configure, config.in: Regenerate.
9471 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9472 is not defined.
9473
da84f473
PA
94742012-02-02 Pedro Alves <palves@redhat.com>
9475
9476 Try SIGKILL first, then PTRACE_KILL.
9477 * linux-low.c (linux_kill_one_lwp): New.
9478 (linux_kill_one_lwp): Rename to ...
9479 (kill_one_lwp_callback): ... this. Use the new
9480 linux_kill_one_lwp.
9481
e886a173
PA
94822012-02-02 Pedro Alves <palves@redhat.com>
9483
9484 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9485 inferior.
9486
be07f1a2
PA
94872012-01-27 Pedro Alves <palves@redhat.com>
9488
9489 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9490 (elf_64_file_p): Make static.
9491 (linux_pid_exe_is_elf_64_file): New.
9492 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9493 Delete declarations.
9494 (linux_pid_exe_is_elf_64_file): Declare.
9495 * linux-x86-low.c (x86_arch_setup): Use
9496 linux_pid_exe_is_elf_64_file.
9497
d8301ad1
JK
94982012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9499
9500 * linux-low.c (linux_wait_for_event_1): Rename to ...
9501 (linux_wait_for_event): ... here and merge it with former
9502 linux_wait_for_event - new variable wait_ptid, use it.
9503 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9504
01b17894
PA
95052012-01-23 Pedro Alves <palves@redhat.com>
9506
9507 * server.c (main): Avoid yet another case of infinite loop while
9508 detaching/killing after a longjmp.
9509
e825046f
JK
95102012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9511
9512 Code cleanup.
9513 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9514
b9e7b9c3
UW
95152012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9516
9517 * hostio.c (handle_readlink): New function.
9518 (handle_vFile): Call it to handle "vFile:readlink" packets.
9519
901f9912
UW
95202012-01-20 Pedro Alves <palves@redhat.com>
9521 Ulrich Weigand <ulrich.weigand@linaro.org>
9522
9523 * server.c (handle_v_requests): Only support vAttach and vRun to
9524 start multiple processes when in extended protocol mode.
9525
fc1ab1a0
PA
95262012-01-17 Pedro Alves <palves@redhat.com>
9527
9528 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9529 memalign plus mprotect to allocate the scratch buffer.
9530
7d5d4e98
PA
95312012-01-13 Pedro Alves <palves@redhat.com>
9532
9533 * server.c (attach_inferior): Clear `cont_thread'.
9534
f128d5e9
PA
95352012-01-13 Pedro Alves <palves@redhat.com>
9536
9537 * server.c (main): Avoid infinite loop while detaching/killing
9538 after a longjmp.
9539
06db92f0
DE
95402012-01-09 Doug Evans <dje@google.com>
9541
9542 * server.c (start_inferior): Set last_ptid in --wrapper case.
9543
32d92999
YQ
95442012-01-06 Yao Qi <yao@codesourcery.com>
9545
9546 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9547 defined.
9548 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9549
5e0a92a9
YQ
95502012-01-04 Yao Qi <yao@codesourcery.com>
9551
9552 * tracepoint.c (cmd_qtdp): Print debug message
9553 for static tracepoint.
9554
ae639e8c
YQ
95552012-01-04 Yao Qi <yao@codesourcery.com>
9556
9557 * tracepoint.c (trace_vdebug): Differentiate debug message
9558 between gdbserver and IPA.
9559
f72429c5
YQ
95602012-01-03 Yao Qi <yao@codesourcery.com>
9561
9562 * tracepoint.c (tracepoint_was_hit): Don't collect for
9563 static tracepoint.
9564
12c3e59c
JB
95652012-01-02 Joel Brobecker <brobecker@adacore.com>
9566
9567 * terminal.h: Reformat copyright header.
9568
67827812
JB
95692012-01-02 Joel Brobecker <brobecker@adacore.com>
9570
9571 * server.c (gdbserver_version): Update copyright year.
9572 * gdbreplay.c (gdbreplay_version): Likewise.
9573
3e52c33d
JK
95742011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9575
9576 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9577
9578 Revert:
9579 2011-12-18 Hui Zhu <teawater@gmail.com>
9580 * linux-low.c (linux_create_inferior): Save return value to ret.
9581
66f1260e
HZ
95822011-12-18 Hui Zhu <teawater@gmail.com>
9583
9584 * linux-low.c (linux_create_inferior): Save return value to ret.
9585
e77616d7
DE
95862011-12-16 Doug Evans <dje@google.com>
9587
e7b06c57
DE
9588 * linux-low.c (linux_create_inferior): If stdio connection,
9589 redirect stdin from /dev/null, stdout to stderr.
9590 * remote-utils.c (remote_is_stdio): New static global.
9591 (remote_connection_is_stdio): New function.
9592 (remote_prepare): Handle stdio connection.
9593 (remote_open): Ditto.
9594 (remote_close): Don't close stdin for stdio connections.
9595 (read_prim,write_prim): New functions. Replace all calls to
9596 read/write to these.
9597 * server.c (main): Watch for "-" argument. Move call to
9598 remote_prepare before start_inferior.
9599 * server.h (STDIO_CONNECTION_NAME): New macro.
9600 (remote_connection_is_stdio): Declare.
9601
e77616d7
DE
9602 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9603 in debugging output.
9604
82067193
YQ
96052011-12-15 Yao Qi <yao@codesourcery.com>
9606
9607 * tracepoint.c: Include sys/syscall.h.
9608 (gdb_ust_thread): Remove preprocessor conditional.
9609
82bfbe7e
PA
96102011-12-14 Pedro Alves <pedro@codesourcery.com>
9611
9612 * linux-low.c (linux_detach_one_lwp): Call
9613 the_low_target.prepare_to_resume before detaching.
9614
712c6575
YQ
96152011-12-14 Yao Qi <yao@codesourcery.com>
9616
9617 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9618 of write.
9619
d54d1edf
YQ
96202011-12-14 Yao Qi <yao@codesourcery.com>
9621
9622 * i386-low.c (i386_low_stopped_data_address): Initialize local
9623 variable `control'.
9624
6210a125
PA
96252011-12-13 Pedro Alves <pedro@codesourcery.com>
9626
9627 PR remote/13492
9628
9629 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9630 DR_CONTROL unless necessary. Extend comments.
9631 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9632 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9633
2ece8244
YQ
96342011-12-13 Yao Qi <yao@codesourcery.com>
9635
9636 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9637 macros.
9638 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9639
784867a5
JK
96402011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9641
9642 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9643 Print new debug message for such case.
9644
6bf36717
JK
96452011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9646
9647 Fix overlapping memcpy.
9648 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9649 the read_inferior_memory transfer.
9650 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9651 write_inferior_memory transfer.
9652 (set_fast_tracepoint_jump): New variable buf. Use it for the
9653 read_inferior_memory and write_inferior_memory transfers.
9654 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9655 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9656 Use it for the write_inferior_memory transfer.
9657 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9658 buffers.
9659
50275556
MR
96602011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9661
9662 * linux-low.c (fetch_register, store_register): Make code
9663 consistent, fix formatting.
9664
7325beb4
MR
96652011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9666
9667 * linux-low.c (usr_store_inferior_registers): Factor out code
9668 to handle individual registers into...
9669 (store_register): ... this new function.
9670
c642a434
UW
96712011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9672
9673 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9674 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9675 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9676 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9677 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9678 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9679 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9680 (srv_xmlfiles): Add new XML files.
9681
9682 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9683 and <sys/uio.h>.
9684 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9685 (init_registers_s390_linux32v1): Add prototype.
9686 (init_registers_s390_linux32v2): Likewise.
9687 (init_registers_s390_linux64v1): Likewise.
9688 (init_registers_s390_linux64v2): Likewise.
9689 (init_registers_s390x_linux64v1): Likewise.
9690 (init_registers_s390x_linux64v2): Likewise.
9691 (s390_num_regs): Increment to 52.
9692 (s390_regmap): Add orig_r2 register.
9693 (s390_num_regs_3264): Increment to 68.
9694 (s390_regmap_3264): Add orig_r2 register.
9695 (s390_collect_ptrace_register): Handle orig_r2 register.
9696 (s390_supply_ptrace_register): Likewise.
9697 (s390_fill_last_break): New function.
9698 (s390_store_last_break): Likewise.
9699 (s390_fill_system_call): New function.
9700 (s390_store_system_call): Likewise.
9701 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9702 register sets.
9703 (s390_check_regset): New function.
9704 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9705 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9706 Update target_regsets for available register sets.
9707
2268b414
JK
97082011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9709 Jan Kratochvil <jan.kratochvil@redhat.com>
9710
9711 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9712 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9713 New.
9714 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9715 * linux-low.h (struct process_info_private): New member r_debug.
9716 * server.c (handle_qxfer_libraries): Call
9717 the_target->qxfer_libraries_svr4.
9718 (handle_qxfer_libraries_svr4): New function.
9719 (qxfer_packets): New entry "libraries-svr4".
9720 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9721 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9722 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9723 PACKET_qXfer_libraries_svr4.
9724
d6db1fab
UW
97252011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9726
9727 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9728 PSW address/mask between 8-byte and 16-byte formats.
9729 (s390_supply_ptrace_register): Likewise.
9730 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9731 basic addressing mode bit.
9732
242f5f1c
SS
97332011-11-24 Stan Shebs <stan@codesourcery.com>
9734
9735 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9736
f196051f
SS
97372011-11-17 Stan Shebs <stan@codesourcery.com>
9738
9739 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9740 (tracing_start_time): New global.
9741 (tracing_stop_time): New global.
9742 (tracing_user_name): New global.
9743 (tracing_notes): New global.
9744 (tracing_stop_note): New global.
9745 (cmd_qtstart): Set traceframe_usage, start_time.
9746 (stop_tracing): Set stop_time.
9747 (cmd_qtstatus): Report additional status.
9748 (cmd_qtp): New function.
9749 (handle_tracepoint_query): Call it.
9750 (cmd_qtnotes): New function.
9751 (handle_tracepoint_general_set): Call it.
9752 (get_timestamp): Rename from tsv_get_timestamp.
9753
405f8e94
SS
97542011-11-14 Stan Shebs <stan@codesourcery.com>
9755 Kwok Cheung Yeung <kcy@codesourcery.com>
9756
9757 * linux-x86-low.c (small_jump_insn): New.
9758 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9759 trampoline and error message, build a trampoline and issue a small
9760 jump instruction to it.
9761 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9762 trampoline and error message.
9763 (x86_get_min_fast_tracepoint_insn_len): New.
9764 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9765 * linux-low.h (struct linux_target_ops): Add arguments to
9766 install_fast_tracepoint_jump_pad operation, add new operation.
9767 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9768 arguments.
9769 (linux_get_min_fast_tracepoint_insn_len): New function.
9770 (linux_target_op): Add new operation.
9771 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9772 (gdb_trampoline_buffer_end): Ditto.
9773 (gdb_trampoline_buffer_error): Ditto.
9774 (struct ipa_sym_addresses): Add fields for new IPA variables.
9775 (symbol_list): Add entries for new IPA variables.
9776 (struct tracepoint): Add fields to hold the address range of the
9777 trampoline used by the tracepoint.
9778 (trampoline_buffer_head): New static variable.
9779 (trampoline_buffer_tail): Ditto.
9780 (claim_trampoline_space): New function.
9781 (have_fast_tracepoint_trampoline_buffer): New function.
9782 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9783 structure.
9784 (install_fast_tracepoint): Ditto, also add error buffer argument.
9785 (cmd_qtminftpilen): New function.
9786 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9787 (fast_tracepoint_from_trampoline_address): New function.
9788 (fast_tracepoint_collecting): Handle trampoline as part of jump
9789 pad space.
9790 (set_trampoline_buffer_space): New function.
9791 (initialize_tracepoint): Initialize new IPA variables.
9792 * target.h (struct target_ops): Add arguments to
9793 install_fast_tracepoint_jump_pad operation, add new
9794 get_min_fast_tracepoint_insn_len operation.
9795 (target_get_min_fast_tracepoint_insn_len): New.
9796 (install_fast_tracepoint_jump_pad): Add arguments.
9797 * server.h (IPA_BUFSIZ): Define.
9798 * linux-i386-ipa.c: Include extra header files.
9799 (initialize_fast_tracepoint_trampoline_buffer): New function.
9800 (initialize_low_tracepoint): Call it.
9801 * server.h (set_trampoline_buffer_space): Declare.
9802 (claim_trampoline_space): Ditto.
9803 (have_fast_tracepoint_trampoline_buffer): Ditto.
9804
1e4d1764
YQ
98052011-11-14 Yao Qi <yao@codesourcery.com>
9806
9807 * server.c (handle_query): Handle InstallInTrace for qSupported.
9808 * tracepoint.c (add_tracepoint): Sort list.
9809 (install_tracepoint, download_tracepoint): New.
9810 (cmd_qtdp): Call them to install and download tracepoints.
9811 (sort_tracepoints): Removed.
9812 (cmd_qtstart): Update.
9813
5c73ff4e
YQ
98142011-11-14 Yao Qi <yao@codesourcery.com>
9815
9816 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9817 * mem-break.h: Declare.
9818 * tracepoint.c (cmd_qtstart): Move some code to ...
9819 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9820 New.
9821 (download_tracepoints): Move some code to ...
9822 (download_tracepoint_1): ... here. New.
9823
86a30030
YQ
98242011-11-08 Yao Qi <yao@codesourcery.com>
9825
9826 * remote-utils.c (relocate_instruction): A comment fix.
9827
8d26e50c
JB
98282011-11-07 Joel Brobecker <brobecker@adacore.com>
9829
9830 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9831 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9832 dr_status_mirror and dr_control_mirror from debug_reg_state.
9833 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9834 (i386_initial_stuff): Remove use of deleted globals.
9835 (i386_get_thread_context, i386_set_thread_context,
9836 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9837 from debug_reg_state.
9838
a59306a3
YQ
98392011-11-05 Yao Qi <yao@codesourcery.com>
9840
9841 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9842 address as TPOINT's.
9843
3065dfb6
SS
98442011-11-02 Stan Shebs <stan@codesourcery.com>
9845
9846 * tracepoint.c (agent_mem_read_string): New function.
9847 (eval_agent_expr): Call it for tracenz.
9848 * server.c (handle_query): Report support for tracenz.
9849
fd0d8c7c
YQ
98502011-11-02 Yao Qi <yao@codesourcery.com>
9851
9852 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9853
609086b1
YQ
98542011-11-02 Yao Qi <yao@codesourcery.com>
9855
9856 * target.h: Fix a typo in comment.
9857
b9fd1791
PA
98582011-10-31 Pedro Alves <pedro@codesourcery.com>
9859
9860 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9861 clobber the breakpoints' shadows with fast tracepoint jumps.
9862 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9863 * target.c (write_inferior_memory): Also pass MYADDR down to
9864 check_mem_write.
9865
03583c20
UW
98662011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9867
9868 * configure.ac: Check support for personality routine.
9869 * configure: Regenerate.
9870 * config.in: Likewise.
9871 * linux-low.c: Include <sys/personality.h>.
9872 Define ADDR_NO_RANDOMIZE if necessary.
9873 (linux_create_inferior): Disable address space randomization when
9874 forking inferior, if requested.
9875 (linux_supports_disable_randomization): New function.
9876 (linux_target_ops): Install it.
9877 * server.h (disable_randomization): Declare.
9878 * server.c (disable_randomization): New global variable.
9879 (handle_general_set): Handle QDisableRandomization.
9880 (handle_query): Likewise for qSupported.
9881 (main): Support --disable-randomization and --no-disable-randomization
9882 command line arguments.
9883 * target.h (struct target_ops): Add supports_disable_randomization.
9884 (target_supports_disable_randomization): New macro.
9885
723b724b
MF
98862011-09-29 Mike Frysinger <vapier@gentoo.org>
9887
9888 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9889 ifdef check.
9890 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9891 [!PT_GETDSBT] (target_loadmap): New definition.
9892 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9893 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9894 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9895 and PT_GETDSBT to LINUX_LOADMAP.
9896 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9897 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9898
55329a5c 98992011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9900
9901 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9902 (arm_linux_hwbp_cap): New static variable.
9903 (arm_linux_get_hwbp_cap): Replace by ...
9904 (arm_linux_init_hwbp_cap): ... this new function.
9905 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9906 (arm_linux_get_hw_watchpoint_count): Likewise.
9907 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9908 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9909 (arm_prepare_to_resume): Use perror_with_name instead of error.
9910
55329a5c 99112011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9912
9913 * linux-arm-low.c: Include <signal.h>.
9914 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9915 (struct arm_linux_hwbp_cap): New data type.
9916 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9917 (struct arm_linux_hw_breakpoint): New data type.
9918 (MAX_BPTS, MAX_WPTS): Define.
9919 (struct arch_process_info, struct arch_lwp_info): New data types.
9920 (arm_linux_get_hwbp_cap): New function.
9921 (arm_linux_get_hw_breakpoint_count): Likewise.
9922 (arm_linux_get_hw_watchpoint_count): Likewise.
9923 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9924 (arm_hwbp_control_initialize): Likewise.
9925 (arm_hwbp_control_is_enabled): Likewise.
9926 (arm_hwbp_control_is_initialized): Likewise.
9927 (arm_hwbp_control_disable): Likewise.
9928 (arm_linux_hw_breakpoint_equal): Likewise.
9929 (arm_linux_hw_point_initialize): Likewise.
9930 (struct update_registers_data): New data structure.
9931 (update_registers_callback: New function.
9932 (arm_insert_point): Likewise.
9933 (arm_remove_point): Likewise.
9934 (arm_stopped_by_watchpoint): Likewise.
9935 (arm_stopped_data_address): Likewise.
9936 (arm_new_process): Likewise.
9937 (arm_new_thread): Likewise.
9938 (arm_prepare_to_resume): Likewise.
9939 (the_low_target): Register arm_insert_point, arm_remove_point,
9940 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9941 arm_new_thread, and arm_prepare_to_resume.
9942
6b9801d4
SS
99432011-09-15 Stan Shebs <stan@codesourcery.com>
9944
9945 * server.h (struct emit_ops): Add compare-goto fields.
9946 * tracepoint.c (gdb_agent_op_sizes): New table.
9947 (emit_eq_goto): New function.
9948 (emit_ne_goto): New function.
9949 (emit_lt_goto): New function.
9950 (emit_le_goto): New function.
9951 (emit_gt_goto): New function.
9952 (emit_ge_goto): New function.
9953 (is_goto_target): New function.
9954 (compile_bytecodes): Recognize special cases of compare-goto
9955 combinations and call specialized emitters for them.
9956 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9957 (amd64_emit_ne_goto): New function.
9958 (amd64_emit_lt_goto): New function.
9959 (amd64_emit_le_goto): New function.
9960 (amd64_emit_gt_goto): New function.
9961 (amd64_emit_ge_goto): New function.
9962 (amd64_emit_ops): Add the new functions.
9963 (i386_emit_eq_goto): New function.
9964 (i386_emit_ne_goto): New function.
9965 (i386_emit_lt_goto): New function.
9966 (i386_emit_le_goto): New function.
9967 (i386_emit_gt_goto): New function.
9968 (i386_emit_ge_goto): New function.
9969 (i386_emit_ops): Add the new functions.
9970
bf15cbda
SS
99712011-09-08 Stan Shebs <stan@codesourcery.com>
9972
9973 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9974 (i386_emit_epilogue): Restore %ebx.
9975
943ca1dd
JZ
99762011-08-31 Jie Zhang <jzhang918@gmail.com>
9977
9978 * server.c (step_thread): Remove definition.
9979 (process_serial_event): Don't handle Hs.
9980 * server.h (step_thread): Remove declaration.
9981 * target.c (set_desired_inferior): Remove use of step_thread.
9982
e3deef73
LM
99832011-08-24 Luis Machado <lgustavo@codesourcery.com>
9984
9985 * linux-low.c: Include linux-procfs.h.
9986 (linux_attach_lwp_1): Update comments.
9987 (linux_attach): Scan for existing threads when attaching to a
9988 process that is the tgid.
9989 * Makefile.in: Update dependencies.
9990
13da1c97
LM
99912011-08-24 Luis Machado <lgustavo@codesourcery.com>
9992
9993 * configure.srv: Add linux-procfs.o dependencies.
9994
881127c9
YQ
99952011-08-14 Yao Qi <yao@codesourcery.com>
9996
9997 * target.h (struct target_ops): Fix indent.
9998 * win32-low.c (win32_target_ops): Fix comment.
9999
58dbd541
YQ
100002011-08-14 Andrew Jenner <andrew@codesourcery.com>
10001 Yao Qi <yao@codesourcery.com>
10002
10003 * Makefile.in (clean): Remove tic6x-*.c files.
10004 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10005 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10006 (tic6x-c64xp-linux.c): Likewise.
10007 * configure.srv: Add support for tic6x-*-uclinux.
10008 * linux-tic6x-low.c: New.
10009 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10010
78d85199
YQ
100112011-08-14 Andrew Stubbs <ams@codesourcery.com>
10012 Yao Qi <yao@codesourcery.com>
10013
10014 * target.h (struct target_ops): Add read_loadmap.
10015 * linux-low.c (struct target_loadseg): New type.
10016 (struct target_loadmap): New type.
10017 (linux_read_loadmap): New function.
10018 (linux_target_ops): Add linux_read_loadmap.
10019 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10020 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10021 to NULL.
78d85199 10022
a959a88d
EZ
100232011-08-05 Eli Zaretskii <eliz@gnu.org>
10024
10025 * win32-low.c: Include <stdint.h>.
10026
1ced966e
PA
100272011-07-22 Pedro Alves <pedro@codesourcery.com>
10028
10029 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10030 to the inferior here.
10031 (i386_remove_aligned_watchpoint): Ditto.
10032 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10033 fit part of the watchpoint in the debug registers.
10034 (i386_update_inferior_debug_regs): New.
10035 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10036 registers, and only update the inferior on success.
10037 (i386_low_remove_watchpoint): Ditto.
10038
d26e3629
KY
100392011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10040
10041 * linux-low.c (compare_ints, unique, list_threads, show_process,
10042 linux_core_of_thread): Delete.
10043 (linux_target_ops): Change linux_core_of_thread to
10044 linux_common_core_of_thread.
10045 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10046 * utils.c (malloc_failure): Change type of argument.
10047 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10048 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10049 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10050 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10051 (IPA_OBJS): Add common-utils-ipa.o.
10052 (ptid_h, linux_osdata_h): New macros.
10053 (server_h): Add common/common-utils.h, common/xml-utils.h,
10054 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10055 common/ptid.h.
10056 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10057 ptid.o, buffer.o): New rules.
10058 (linux-low.o): Add common/linux-osdata.h as a dependency.
10059 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10060 * configure.ac: Add AC_HEADER_DIRENT check.
10061 * config.in: Regenerate.
10062 * configure: Regenerate.
10063 * remote-utils.c (xml_escape_text): Delete.
10064 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10065 buffer_xml_printf): Move to common/buffer.c.
10066 * server.c (main): Remove call to initialize_inferiors.
10067 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10068 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10069 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10070 internal_error, gdb_assert, gdb_assert_fail): Delete.
10071 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10072 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10073 common/buffer.h.
10074 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10075 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10076 initialize_inferiors): Delete.
10077
2275a1a7
PA
100782011-07-20 Pedro Alves <pedro@codesourcery.com>
10079
10080 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10081 symbol error.
10082
0a5b1e09
PA
100832011-05-31 Pedro Alves <pedro@codesourcery.com>
10084
10085 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10086 assertion.
10087 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10088
6938fd34
YQ
100892011-05-26 Yao Qi <yao@codesourcery.com>
10090
10091 * Makefile.in (thread-db.o): Track dependence to
10092 common/gdb_thread_db.h.
10093 * thread-db.c: include gdb_thread_db.h from right place.
10094
b481f9e0
TT
100952011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10096
10097 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10098 __FILE__ and __LINE__ to internal_error.
10099
98a5dd13
DE
101002011-05-13 Doug Evans <dje@google.com>
10101
10102 * thread-db.c (try_thread_db_load_from_sdir): New function.
10103 (try_thread_db_load_from_dir): New function.
10104 (thread_db_load_search): Handle $sdir, ignore $pdir.
10105 Remove trying of system directories if search of
10106 libthread-db-search-path fails, that is now done via $sdir.
10107
d248b706
KY
101082011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10109
10110 * server.c (handle_query): Add EnableDisableTracepoints to the list
10111 of supported features.
43aaf8b6 10112 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10113 tracepoints.
43aaf8b6
PA
10114 (cmd_qtenable_disable): New.
10115 (cmd_qtstart): Install tracepoints even if disabled.
10116 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10117 receiving a QTEnable or QTDisable packet.
10118 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10119 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10120 tracepoints.
10121 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10122
84e578fb
DE
101232011-05-10 Doug Evans <dje@google.com>
10124
10125 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10126
71f55dd8
DE
101272011-05-04 Doug Evans <dje@google.com>
10128
10129 * linux-low.c (linux_join): Skip process lookup.
10130 * spu-low.c (spu_join): Ditto.
10131 * server.c (join_inferiors_callback): Delete.
10132 (process_serial_event): For 'D' packet (detach) call join_inferior
10133 directly.
10134
4d393d60
JM
101352011-05-04 Joseph Myers <joseph@codesourcery.com>
10136
10137 * README: Don't mention xscale*-*-linux*.
10138 * configure.srv (xscale*-*-linux*): Don't handle target.
10139
b00ad6ff
NF
101402011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10141
10142 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10143 casting pointers.
10144 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10145 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10146 (i386_emit_void_call_2): Likewise.
10147
af96c192
YQ
101482011-04-26 Yao Qi <yao@codesourcery.com>
10149
43aaf8b6
PA
10150 * linux-low.c: Move common macros to linux-ptrace.h.
10151 Include linux-ptrace.h.
af96c192
YQ
10152 * Makefile.in (linux_ptrace_h): New.
10153 (linux-low.o): Depends on linux-ptrace.h.
10154
03f2bd59
JK
101552011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10156
10157 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10158 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10159 (remote_prepare): New function with most of the TCP code from ...
10160 (remote_open): ... here. Detect PORT here unconditionally. Move also
10161 setting transport_is_reliable.
10162 * server.c (run_once): New variable.
10163 (gdbserver_usage): Document it.
10164 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10165 the first run if RUN_ONCE.
10166 * server.h (run_once, remote_prepare): New declarations.
10167
7a9dd1b2
TT
101682011-04-19 Tom Tromey <tromey@redhat.com>
10169
10170 * win32-low.c (handle_load_dll): Remove duplicate "the".
10171
81239425
PM
101722011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10173
10174 Remove support for old Cygwin 1.5 versions.
10175 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10176 function to avoid warning.
10177 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10178 warning.
10179
9e0627f1
PM
101802011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10181
10182 * gdbserver/server.h (Macro _): Define it if not available.
10183
588eebee
MS
101842011-03-14 Michael Snyder <msnyder@vmware.com>
10185
348af9f7 10186 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10187
43f70d4c
JB
101882011-03-10 Joel Brobecker <brobecker@adacore.com>
10189
10190 * Makefile.in (maintainer-clean realclean distclean): Remove
10191 "make ... subdir_do" command.
10192
348af9f7
MS
101932011-03-10 Michael Snyder <msnyder@vmware.com>
10194
10195 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10196
10197 * server.c (handle_v_run): Free alloced buffer on early return.
10198
e637a4f5
YQ
101992011-03-09 Yao Qi <yao@codesourcery.com>
10200
10201 Revert:
10202 2011-03-04 Yao Qi <yao@codesourcery.com>
10203
10204 * Makefile.in: Remove GNU make feature --directory.
10205
10206 2011-03-05 Yao Qi <yao@codesourcery.com>
10207
10208 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10209 (subdir_do): New make target. Copied from gdb/Makefile.
10210 (maintainer-clean, realclean, distclean, clean): Call corresponding
10211 make targets in common/Makefile.
10212
10213 2011-02-11 Yao Qi <yao@codesourcery.com>
10214
10215 * configure.ac: Call AC_PROG_RANLIB.
10216 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10217 * configure: Regenerate.
10218
e6edda56
JK
102192011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10220
10221 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10222
e5141119
JB
102232011-03-06 Yao Qi <yao@codesourcery.com>
10224
10225 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10226
64794aa4
JB
102272011-03-05 Yao Qi <yao@codesourcery.com>
10228
10229 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10230 (subdir_do): New make target. Copied from gdb/Makefile.
10231 (maintainer-clean, realclean, distclean, clean): Call corresponding
10232 make targets in common/Makefile.
10233
7a762829
YQ
102342011-03-04 Yao Qi <yao@codesourcery.com>
10235
10236 * Makefile.in: Remove GNU make feature --directory.
10237
348af9f7
MS
102382011-03-04 Michael Snyder <msnyder@vmware.com>
10239
10240 * server.c (queue_stop_reply): Call xmalloc not malloc.
10241
102422011-03-02 Michael Snyder <msnyder@vmware.com>
10243
10244 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10245
9f72fee2
MS
102462011-02-28 Michael Snyder <msnyder@vmware.com>
10247
588eebee
MS
10248 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10249 (cmd_qtframe): Ditto.
10250 (cmd_qtbuffer): Ditto.
10251 (cmd_bigqtbuffer): Ditto.
10252
9f72fee2
MS
10253 * utils.c (decimal2str): Initialize 'width' to nine, then
10254 don't mess with it.
10255
8040bd49
UW
102562011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10257
10258 * hostio.c (require_data): Free *data, not data.
10259
7e52cbd0
JK
102602011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10261
10262 * hostio.c (require_data): Use free, not xfree.
10263
9130f83e
MS
102642011-02-27 Michael Snyder <msnyder@vmware.com>
10265
4b812f4e
MS
10266 * server.c (handle_query): Discard unused value.
10267
9130f83e
MS
10268 * hostio.c (require_data): Free malloc memory before returning
10269 error.
10270
69d37113
MS
102712011-02-26 Michael Snyder <msnyder@vmware.com>
10272
10273 * linux-low.c (list_threads): Call closedir for dirent.
10274
35f5825a
MS
102752011-02-27 Michael Snyder <msnyder@vmware.com>
10276
2a589cef
MS
10277 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10278 a case statement falls through.
10279
0adea5f7
MS
10280 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10281
35f5825a
MS
10282 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10283 in comparison.
10284
238f1c74
MS
102852011-02-26 Michael Snyder <msnyder@vmware.com>
10286
10287 * utils.c (decimal2str): Eliminate dead code and dead param.
10288 (pulongest): Drop dead param from call to decimal2str.
10289 (plongest): Ditto.
10290
633ff500
JB
102912011-02-24 Joel Brobecker <brobecker@adacore.com>
10292
10293 Revert the following patch (not approved yet):
10294 2011-02-21 Hui Zhu <teawater@gmail.com>
10295 * tracepoint.c (tp_printf): New function.
10296 (eval_agent_expr): Handle gdb_agent_op_printf.
10297
f9c6ff72
HZ
102982011-02-21 Hui Zhu <teawater@gmail.com>
10299
10300 * tracepoint.c (tp_printf): New function.
10301 (eval_agent_expr): Handle gdb_agent_op_printf.
10302
94d5e490
TT
103032011-02-18 Tom Tromey <tromey@redhat.com>
10304
10305 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10306 (tracepoint.o): Likewise.
10307 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10308 (gdb_agent_op_names): Likewise.
10309
c7f96d2b
TT
103102011-02-18 Tom Tromey <tromey@redhat.com>
10311
10312 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10313 gdb_agent_op_rot>: New constants.
10314 (gdb_agent_op_names): Add pick and roll.
10315 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10316 cases.
10317
0feedb2c
JK
103182011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10319
10320 * aclocal.m4: Regenerated with aclocal-1.11.1.
10321
b3b9301e
PA
103222011-02-14 Pedro Alves <pedro@codesourcery.com>
10323
10324 * server.c (handle_qxfer_traceframe_info): New.
10325 (qxfer_packets): Register "traceframe-info".
10326 (handle_query): Report support for qXfer:traceframe-info:read+.
10327 * tracepoint.c (match_blocktype): New.
10328 (traceframe_find_block_type): Rename to ...
10329 (traceframe_walk_blocks): ... this. Add callback filter argument,
10330 and use it.
10331 (traceframe_find_block_type): New, reimplemented on top of
10332 traceframe_walk_blocks.
10333 (build_traceframe_info_xml): New.
10334 (traceframe_read_info): New.
10335 * server.h (traceframe_read_info): Declare.
10336
4f3e6fb7
YQ
103372011-02-11 Yao Qi <yao@codesourcery.com>
10338
10339 * configure.ac: Call AC_PROG_RANLIB.
10340 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10341 * configure: Regenerate.
10342
764880b7
PA
103432011-02-07 Pedro Alves <pedro@codesourcery.com>
10344
10345 * server.c (gdb_read_memory): Change return semantics to allow
10346 partial transfers.
10347 (handle_search_memory_1): Adjust.
10348 (process_serial_event) <'m' packet>: Handle partial transfers.
10349 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10350
1c79eb8a
PA
103512011-01-28 Pedro Alves <pedro@codesourcery.com>
10352
10353 * regcache.c (init_register_cache): Initialize
10354 regcache->register_status.
10355 (free_register_cache): Release regcache->register_status.
10356 (regcache_cpy): Copy register_status.
10357 (registers_to_string): Print 'x's for unavailable registers.
10358 (supply_register): Mark the register's status valid or
10359 unavailable, depending on whether a buffer was passed in or not.
10360 (supply_register_zeroed): New.
10361 (supply_regblock): Mark the registers' status valid or
10362 unavailable, depending on whether a buffer was passed in or not.
10363 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10364 (struct regcache): New `register_status' field.
10365 (supply_register_zeroed): Declare.
10366 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10367 supply_register_zeroed, rather than passing a NULL buffer to
10368 supply_register.
10369 * tracepoint.c (fetch_traceframe_registers): Update comment.
10370
85724a0e
PA
103712011-01-28 Pedro Alves <pedro@codesourcery.com>
10372
10373 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10374 buffer explicit.
10375
d08aafef
PA
103762011-01-25 Pedro Alves <pedro@codesourcery.com>
10377
10378 * server.h (decode_xfer_write): Change prototype.
10379 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10380 and don't extract the annex here.
10381 * server.c (decode_xfer_read): Remove `annex' parameter,
10382 and don't extract the annex here.
10383 (decode_xfer): New.
10384 (struct qxfer): New.
10385 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10386 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10387 (handle_qxfer_statictrace): New functions, abstracted out from
10388 handle_query, and made to use the struct qxfer interface.
10389 (handle_threads_qxfer_proper): Rename to ...
10390 (handle_qxfer_threads_proper): ... this.
10391 (handle_threads_qxfer): Rename to ...
10392 (handle_qxfer_threads): ... this. Adjust.
10393 (qxfer_packets): New array.
10394 (handle_qxfer): New function.
10395 (handle_query): Use handle_qxfer.
10396
493e2a69
MS
103972011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10398
10399 * gdbreplay.c: Shorten lines of >= 80 columns.
10400 * linux-low.c: Ditto.
10401 * linux-ppc-low.c: Ditto.
10402 * linux-s390-low.c: Ditto.
10403 * linux-sparc-low.c: Ditto.
10404 * linux-x86-low.c: Ditto.
10405 * linux-xtensa-low.c: Ditto.
10406 * mem-break.c: Ditto.
10407 * nto-low.c: Ditto.
10408 * regcache.h: Ditto.
10409 * remote-utils.c: Ditto.
10410 * server.c: Ditto.
10411 * server.h: Ditto.
10412 * thread-db.c: Ditto.
10413 * tracepoint.c: Ditto.
10414 * utils.c: Ditto.
10415 * win32-low.h: Ditto.
10416
44944448
JB
104172011-01-05 Joel Brobecker <brobecker@adacore.com>
10418
10419 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10420 update.
10421
71ce852c
JB
104222011-01-01 Joel Brobecker <brobecker@adacore.com>
10423
10424 * server.c (gdbserver_version): Update copyright year in version
10425 output.
10426 * gdbreplay.c (gdbreplay_version): Ditto.
10427
eb826dc6
MF
104282010-12-29 Jie Zhang <jie.zhang@analog.com>
10429
10430 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10431 * linux-bfin-low.c: New file.
10432 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10433 PT_DATA_ADDR for BFIN targets.
10434 * Makefile.in (SFILES): Add linux-bfin-low.c.
10435 (clean): Remove reg-bfin.c.
10436 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10437 * README: Mention supported Blackfin targets.
10438
39ab222a
MF
104392010-12-23 Mike Frysinger <vapier@gentoo.org>
10440
10441 * .gitignore: New file.
10442
a1f2ce7d
MF
104432010-11-16 Mike Frysinger <vapier@gentoo.org>
10444
10445 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10446
f474844c
JZ
104472010-10-22 Jie Zhang <jie@codesourcery.com>
10448
10449 * Makefile.in: Add FLAGS_TO_PASS variable.
10450 (install): Remove dependency of install-only and recursively
10451 invoke make for install-only.
10452
f1048712
DE
104532010-10-04 Doug Evans <dje@google.com>
10454
10455 * Makefile.in (uninstall): Use $(DESTDIR).
10456
b53a1623
PA
104572010-09-24 Pedro Alves <pedro@codesourcery.com>
10458
e6ee044d
PA
10459 PR gdb/11842
10460
b53a1623
PA
10461 * linux-x86-low.c (compat_siginfo_from_siginfo)
10462 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10463 si_code is < 0. Check for si_code == SI_TIMER before checking for
10464 si_code < 0.
10465
fa1bd1e4
JB
104662010-09-13 Joel Brobecker <brobecker@adacore.com>
10467
10468 * lynx-i386-low.c: New file.
10469 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10470
47fac8f8
JB
104712010-09-13 Joel Brobecker <brobecker@adacore.com>
10472
10473 * lynx-low.c (ptrace_request_to_str): Remove handling for
10474 request values that have been removed in LynxOS 5.x.
10475
1adfc54d
JB
104762010-09-13 Joel Brobecker <brobecker@adacore.com>
10477
10478 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10479 <ptrace.h>
10480
c2a66c29
NS
104812010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10482
10483 * configure.ac: Add --enable-inprocess-agent option.
10484 * configure: Rebuilt.
10485
32fcada3
YQ
104862010-09-06 Yao Qi <yao@codesourcery.com>
10487
10488 * linux-low.c (linux_kill): Remove unused variable.
10489 (linux_stabilize_threads): Likewise.
10490 * server.c (start_inferior): Likewise.
10491 (queue_stop_reply_callback): Likewise.
10492 * tracepoint.c (do_action_at_tracepoint): Likewise.
10493
0cccb683
YQ
104942010-09-06 Yao Qi <yao@codesourcery.com>
10495
10496 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10497 on return.
10498
423ec54c
JK
104992010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10500
10501 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10502
12ac6819
PA
105032010-09-06 Pedro Alves <pedro@codesourcery.com>
10504
10505 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10506 "$(IPA_DEPFILES)".
10507
8ed54b31
JB
105082010-09-01 Joel Brobecker <brobecker@adacore.com>
10509
10510 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10511 gdbserver/lynx-ppc-low.c: New files.
10512 * Makefile.in (lynx_low_h): New variable.
10513 (lynx-low.o, lynx-ppc-low.o): New rules.
10514 * configure.ac: On LynxOS, link with -lnetinet.
10515 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10516 * configure: regenerate.
10517
bb0116a4
JB
105182010-09-01 Joel Brobecker <brobecker@adacore.com>
10519
10520 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10521 * configure.ac: Add check for vasprintf and vsnprintf.
10522 * configure, config.in: Regenerate.
10523 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10524
a778ab81 105252010-09-01 Joel Brobecker <brobecker@adacore.com>
10526
10527 * gdbreplay.c: Move include of alloca.h up, next to include of
10528 malloc.h.
10529 * server.h: Add include of malloc.h.
10530 * mem-break.c: Remove include of malloc.h.
10531 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10532
8b034a19 105332010-09-01 Joel Brobecker <brobecker@adacore.com>
10534
10535 * Makefile.in (memmem.o): Build with -Wno-error.
10536
105372010-09-01 Joel Brobecker <brobecker@adacore.com>
10538
10539 * utils.c (xsnprintf): Make non-static.
10540 * server.h: Add xsnprintf declaration.
10541 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10542 replace calls to snprintf by calls to xsnprintf throughout.
10543
105442010-09-01 Joel Brobecker <brobecker@adacore.com>
10545
10546 * configure.ac: Add configure check for alloca.
10547 * configure, config.in: Regenerate.
10548 * server.h: Include alloca.h if it exists.
10549 * gdbreplay.c: Include alloca.h if it exists.
10550
1a981360
PA
105512010-08-28 Pedro Alves <pedro@codesourcery.com>
10552
10553 * linux-low.c (__SIGRTMIN): Define if not already defined.
10554 (linux_create_inferior): Check for __ANDROID__ rather than
10555 __SIGRTMIN.
10556 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10557 are already deferred.
10558 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10559 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10560 stopped and already has a pending signal to report.
10561 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10562 a pending signal to report or is moving out of a jump pad.
10563 (linux_init_signals): Check for __ANDROID__ rather than
10564 __SIGRTMIN.
10565
b4d51a55
PA
105662010-08-28 Pedro Alves <pedro@codesourcery.com>
10567
10568 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10569 debug_threads check. Avoid a linear search when not doing debug
10570 output.
10571
ec48365d
PA
105722010-08-27 Pedro Alves <pedro@codesourcery.com>
10573
10574 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10575 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10576 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10577 (process_event): Change local fd's type to gdb_fildes_t.
10578 (create_file_handler): Adjust prototype.
10579 (delete_file_handler): Adjust prototype.
10580 (handle_file_event): Adjust prototype. Use pfildes.
10581 (create_file_event): Adjsut prototype.
10582 * remote-utils.c (remote_desc, listen_desc): Change type to
10583 gdb_fildes_t.
10584 * server.h: New gdb_fildes_t typedef.
10585 [USE_WIN32API]: Include winsock2.h.
10586 (delete_file_handler, add_file_handler): Adjust prototypes.
10587 (pfildes): Declare.
10588 * utils.c (pfildes): New.
10589
854d88f0
PA
105902010-08-27 Pedro Alves <pedro@codesourcery.com>
10591
10592 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10593 * configure: Regenerate.
10594
0146f85b
PA
105952010-08-27 Pedro Alves <pedro@codesourcery.com>
10596
10597 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10598 (linux_done_accessing_memory): ... this.
10599 (linux_target_ops): Adjust.
10600 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10601 * nto-low.c (nto_target_ops): Adjust comment.
10602 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10603 * spu-low.c (spu_target_ops): Adjust comment.
10604 * target.h (target_ops): Rename unprepare_to_access_memory field
10605 to done_accessing_memory.
10606 (unprepare_to_access_memory): Rename to ...
10607 (done_accessing_memory): ... this.
10608
90d74c30
PA
106092010-08-26 Pedro Alves <pedro@codesourcery.com>
10610
10611 * linux-low.c (linux_prepare_to_access_memory): New.
10612 (linux_unprepare_to_access_memory): New.
10613 (linux_target_ops): Install them.
10614 * server.c (read_memory): Rename to ...
10615 (gdb_read_memory): ... this. Use
10616 prepare_to_access_memory/prepare_to_access_memory.
10617 (write_memory): Rename to ...
10618 (gdb_write_memory): ... this. Use
10619 prepare_to_access_memory/prepare_to_access_memory.
10620 (handle_search_memory_1): Adjust.
10621 (process_serial_event): Adjust.
10622 * target.h (struct target_ops): New fields
10623 prepare_to_access_memory and unprepare_to_access_memory.
10624 (prepare_to_access_memory, unprepare_to_access_memory): New.
10625 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10626 prepare_to_access_memory/prepare_to_access_memory.
10627 * nto-low.c (nto_target_ops): Adjust.
10628 * spu-low.c (spu_target_ops): Adjust.
10629 * win32-low.c (win32_target_ops): Adjust.
10630
fd467969
PA
106312010-08-26 Pedro Alves <pedro@codesourcery.com>
10632
10633 * Makefile.in (WARN_CFLAGS): Get it from configure.
10634 (WERROR_CFLAGS): New.
10635 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10636 * configure.ac: Introduce --enable-werror, which adds -Werror to
10637 the compiler command line. Enabled by default. Disable with
10638 --disable-werror. Add -Wdeclaration-after-statement
10639 Wpointer-arith and -Wformat-nonliteral to warning flags.
10640 * configure: Regenerate.
10641
331e2f5f
PA
106422010-08-26 Pedro Alves <pedro@codesourcery.com>
10643
10644 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10645
e581f2b4
PA
106462010-08-26 Pedro Alves <pedro@codesourcery.com>
10647
10648 * gdbreplay.c (remote_error): New.
10649 (gdbchar): New.
10650 (expect): Use gdbchar. Check for error reading from GDB.
10651 Clarify sync error output.
10652 (play): Check for errors writing to GDB.
10653 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10654 * remote-utils.c (getpkt): Check for errors writing to the remote
10655 descriptor.
10656
3c11dd79
PA
106572010-08-25 Pedro Alves <pedro@codesourcery.com>
10658
10659 * linux-low.c (linux_wait_1): Move non-debugging code out of
10660 `debug_threads' control.
10661
d20a8ad9
PA
106622010-08-25 Pedro Alves <pedro@codesourcery.com>
10663
10664 * linux-low.c (linux_wait_1): Don't set last_status here.
10665 * server.c (push_event, queue_stop_reply_callback): Assert we're
10666 not pushing a TARGET_WAITKIND_IGNORE event.
10667 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10668 (myresume, handle_target_event): Set the thread's last_resume_kind
10669 and last_status from the target returned status.
10670
964e4306
PA
106712010-08-25 Pedro Alves <pedro@codesourcery.com>
10672
10673 PR threads/10729
10674
10675 * linux-x86-low.c (update_debug_registers_callback): New.
10676 (i386_dr_low_set_addr): Use it.
10677 (i386_dr_low_get_addr): New.
10678 (i386_dr_low_set_control): Use update_debug_registers_callback.
10679 (i386_dr_low_get_control): New.
10680 (i386_dr_low_get_status): Adjust.
10681 * linux-low.c (linux_stop_lwp): New.
10682 * linux-low.h (linux_stop_lwp): Declare.
10683
10684 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10685 argument instead of a i386_debug_reg_state.
10686 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10687 a i386_debug_reg_state.
10688 (i386_insert_aligned_watchpoint): Adjust.
10689 (i386_remove_aligned_watchpoint): Adjust.
10690 (i386_low_stopped_data_address): Read the debug registers from the
10691 inferior instead of from the mirrors.
10692 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10693 (i386_dr_low_get_addr): Declare.
10694 (i386_dr_low_get_control): Declare.
10695 (i386_dr_low_get_status): Change prototype.
10696
10697 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10698 (i386_dr_low_get_addr): New.
10699 (i386_dr_low_get_control): New.
10700 (i386_dr_low_get_status): Adjust prototype. Return
10701 dr_status_mirror.
10702 (i386_initial_stuff): Clear dr_status_mirror and
10703 dr_control_mirror.
10704 (i386_get_thread_context): Adjust.
10705 (i386_set_thread_context): Adjust.
10706 (i386_thread_added): Adjust.
10707
5f21a75b
PA
107082010-08-24 Pedro Alves <pedro@codesourcery.com>
10709
10710 * linux-low.h (linux_thread_area): Delete declaration.
10711
3e4c1235
TS
107122010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10713
10714 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10715 after its termination.
10716
1971b033
PA
107172010-08-09 Pedro Alves <pedro@codesourcery.com>
10718
10719 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10720 (gdb_wants_all_stopped): Delete.
10721 (linux_wait_1): Don't call them.
10722 * server.c (handle_v_cont): Tag all threads as want-stopped.
10723 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10724 stopped as "client-wants-stopped".
10725
310444ac
PA
107262010-07-31 Pedro Alves <pedro@codesourcery.com>
10727
10728 * Makefile.in (signals_h): New.
10729 (server_h): Depend on it.
10730 (server.o): Don't depend on $(signals_def).
10731 (signals.o): Depend on $(signals_def).
10732
a19cae16
JK
107332010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10734
10735 * Makefile.in (signals_def): New.
10736 (server_h): Append include/gdb/signals.h and signals_def.
10737 (server.o): Append signals_def.
10738
30d50328
JK
107392010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10740
10741 * server.c (handle_target_event): Use target_signal_to_host for
10742 resume_info.sig initialization.
10743 * target.h (struct thread_resume) <sig>: New comment.
10744
5c3216e2
OS
107452010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10746
c6f46ca0
OS
10747 * server.c (handle_query): strcpy() the returned string from paddress()
10748 instead of sprintf().
5c3216e2
OS
10749 * utils.c (paddress): Return phex_nz().
10750
6bd31874
JB
107512010-07-07 Joel Brobecker <brobecker@adacore.com>
10752
10753 * server.c (handle_v_cont): Call mourn_inferior if process
10754 just exited.
10755 (myresume): Likewise.
10756
0fb4aa4b
PA
107572010-07-01 Pedro Alves <pedro@codesourcery.com>
10758
10759 Static tracepoints, and integration with UST.
10760
10761 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10762 * mem-break.c (uninsert_all_breakpoints)
10763 (reinsert_all_breakpoints): New.
10764 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10765 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10766 (gdb_agent_ust_loaded, helper_thread_id)
10767 (gdb_agent_helper_thread_id): New macros.
10768 (struct ipa_sym_addresses): Add addr_ust_loaded,
10769 addr_helper_thread_id, addr_cmd_buf.
10770 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10771 (in_process_agent_loaded_ust): New.
10772 (write_e_ust_not_loaded): New.
10773 (maybe_write_ipa_ust_not_loaded): New.
10774 (struct collect_static_trace_data_action): New.
10775 (enum tracepoint_type) <static_tracepoint>: New.
10776 (struct tracepoint) <handle>: Mention static tracepoints.
10777 (struct static_tracepoint_ctx): New.
10778 (CMD_BUF_SIZE): New.
10779 (add_tracepoint_action): Handle static tracepoint actions.
10780 (unprobe_marker_at): New.
10781 (clear_installed_tracepoints): Handle static tracepoints.
10782 (cmd_qtdp): Handle static tracepoints.
10783 (probe_marker_at): New.
10784 (cmd_qtstart): Handle static tracepoints.
10785 (response_tracepoint): Handle static tracepoints.
10786 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10787 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10788 (get_context_regcache): Handle static tracepoints.
10789 (do_action_at_tracepoint): Handle static tracepoint actions.
10790 (traceframe_find_block_type): Handle static trace data blocks.
10791 (traceframe_read_sdata): New.
10792 (download_tracepoints): Download static tracepoint actions.
10793 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10794 (GDB_PROBE_NAME): New.
10795 (ust_ops): New.
10796 (GET_UST_SYM): New.
10797 (USTF): New.
10798 (dlsym_ust): New.
10799 (ust_marker_to_static_tracepoint): New.
10800 (gdb_probe): New.
10801 (collect_ust_data_at_tracepoint): New.
10802 (gdb_ust_probe): New.
10803 (UNIX_PATH_MAX, SOCK_DIR): New.
10804 (gdb_ust_connect_sync_socket): New.
10805 (resume_thread, stop_thread): New.
10806 (run_inferior_command): New.
10807 (init_named_socket): New.
10808 (gdb_ust_socket_init): New.
10809 (cstr_to_hexstr): New.
10810 (next_st): New.
10811 (first_marker, next_marker): New.
10812 (response_ust_marker): New.
10813 (cmd_qtfstm, cmd_qtsstm): New.
10814 (unprobe_marker_at, probe_marker_at): New.
10815 (cmd_qtstmat, gdb_ust_thread): New.
10816 (gdb_ust_init): New.
10817 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10818 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10819 (ST_REGENTRY): New.
10820 (x86_64_st_collect_regmap): New.
10821 (X86_64_NUM_ST_COLLECT_GREGS): New.
10822 (AMD64_RIP_REGNUM): New.
10823 (supply_static_tracepoint_registers): New.
10824 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10825 (ST_REGENTRY): New.
10826 (i386_st_collect_regmap): New.
10827 (i386_NUM_ST_COLLECT_GREGS): New.
10828 (supply_static_tracepoint_registers): New.
10829 * server.c (handle_query): Handle qXfer:statictrace:read.
10830 <qSupported>: Report support for StaticTracepoints, and
10831 qXfer:statictrace:read features.
10832 * server.h (traceframe_read_sdata)
10833 (supply_static_tracepoint_registers): Declare.
10834 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10835 (unpack_varlen_hex): Include in IPA build.
10836 * Makefile.in (ustlibs, ustinc): New.
10837 (IPA_OBJS): Add remote-utils-ipa.o.
10838 ($(IPA_LIB)): Link -ldl and -lpthread.
10839 (UST_CFLAGS): New.
10840 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10841 * config.in, configure: Regenerate.
10842
9e4344e5
PA
108432010-06-20 Ian Lance Taylor <iant@google.com>
10844 Pedro Alves <pedro@codesourcery.com>
10845
10846 * linux-x86-low.c (always_true): Delete.
10847 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10848 trying to fool the compiler with always_true.
10849
c6beb2cb
PA
108502010-06-20 Pedro Alves <pedro@codesourcery.com>
10851
10852 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10853 conditions in gdbserver.
10854
d2ed6730
UW
108552010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10856
10857 * spu-low.c (spu_read_memory): Wrap around local store limit.
10858 (spu_write_memory): Likewise.
10859
4e29fb54
PA
108602010-06-15 Pedro Alves <pedro@codesourcery.com>
10861
10862 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10863 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10864 LONGEST uses.
10865 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10866 uses.
10867 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10868 uses with LONGEST uses.
10869
6a271cae
PA
108702010-06-14 Stan Shebs <stan@codesourcery.com>
10871 Pedro Alves <pedro@codesourcery.com>
10872
10873 Bytecode compiler.
10874
10875 * linux-x86-low.c: Include limits.h.
10876 (add_insns): New.
10877 (always_true): New.
10878 (EMIT_ASM): New.
10879 (EMIT_ASM32): New.
10880 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10881 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10882 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10883 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10884 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10885 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10886 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10887 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10888 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10889 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10890 (amd64_emit_void_call_2): New.
10891 (amd64_emit_ops): New.
10892 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10893 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10894 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10895 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10896 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10897 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10898 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10899 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10900 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10901 (i386_emit_stack_adjust, i386_emit_int_call_1)
10902 (i386_emit_void_call_2): New.
10903 (i386_emit_ops): New.
10904 (x86_emit_ops): New.
10905 (the_low_target): Install x86_emit_ops.
10906 * server.h (struct emit_ops): New.
10907 (get_raw_reg_func_addr): Declare.
10908 (current_insn_ptr, emit_error): Declare.
10909 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10910 (set_trace_state_variable_value): New defines.
10911 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10912 addr_get_trace_state_variable_value and
10913 addr_set_trace_state_variable_value.
10914 (symbol_list): New fields for get_raw_reg,
10915 get_trace_state_variable_value and set_trace_state_variable_value.
10916 (condfn): New typedef.
10917 (struct tracepoint): New field `compiled_cond'.
10918 (do_action_at_tracepoint): Clear compiled_cond.
10919 (get_trace_state_variable_value, set_trace_state_variable_value):
10920 Export in the IPA.
10921 (condition_true_at_tracepoint): If there's a compiled condition,
10922 run that.
10923 (current_insn_ptr, emit_error): New globals.
10924 (struct bytecode_address): New.
10925 (get_raw_reg_func_addr): New.
10926 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10927 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10928 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10929 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10930 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10931 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10932 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10933 (compile_tracepoint_condition, compile_bytecodes): New.
10934 * target.h (emit_ops): Forward declare.
10935 (struct target_ops): New field emit_ops.
10936 (target_emit_ops): New.
10937 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10938 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10939 * linux-low.c (linux_emit_ops): New.
10940 (linux_target_ops): Install it.
10941 * linux-low.h (struct linux_target_ops): New field emit_ops.
10942
92b72907
UW
109432010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10944
10945 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10946 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10947
fa593d66
PA
109482010-06-01 Pedro Alves <pedro@codesourcery.com>
10949 Stan Shebs <stan@codesourcery.com>
10950
10951 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10952 (all): Depend on $(extra_libraries).
10953 (install-only): Install the IPA.
10954 (IPA_OBJS, IPA_LIB): New.
10955 (clean): Remove the IPA lib.
10956 (IPAGENT_CFLAGS): New.
10957 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10958 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10959 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10960 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10961 * configure.ac: Check for atomic builtins support in the compiler.
10962 (IPA_DEPFILES, extra_libraries): Define.
10963 * configure.srv (ipa_obj): Add description.
10964 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10965 (i[34567]86-*-linux*): Set ipa_obj.
10966 (x86_64-*-linux*): Set ipa_obj.
10967 * linux-low.c (stabilizing_threads): New.
10968 (supports_fast_tracepoints): New.
10969 (linux_detach): Stabilize threads before detaching.
10970 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10971 the lwp is either not stabilizing, or is moving out of a jump pad.
10972 (linux_fast_tracepoint_collecting): New.
10973 (maybe_move_out_of_jump_pad): New.
10974 (enqueue_one_deferred_signal): New.
10975 (dequeue_one_deferred_signal): New.
10976 (linux_wait_for_event_1): If moving out of a jump pad, defer
10977 pending signals to later.
10978 (linux_stabilize_threads): New.
10979 (linux_wait_1): Check if threads need moving out of jump pads, and
10980 do it if so.
10981 (stuck_in_jump_pad_callback): New.
10982 (move_out_of_jump_pad_callback): New.
10983 (lwp_running): New.
10984 (linux_resume_one_lwp): Handle moving out of jump pads.
10985 (linux_set_resume_request): Dequeue deferred signals.
10986 (need_step_over_p): Also step over fast tracepoint jumps.
10987 (start_step_over): Also uninsert fast tracepoint jumps.
10988 (finish_step_over): Also reinsert fast tracepoint jumps.
10989 (linux_install_fast_tracepoint_jump): New.
10990 (linux_target_ops): Install linux_stabilize_threads and
10991 linux_install_fast_tracepoint_jump_pad.
10992 * linux-low.h (linux_target_ops) <get_thread_area,
10993 install_fast_tracepoint_jump_pad>: New fields.
10994 (struct lwp_info) <collecting_fast_tracepoint,
10995 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10996 (linux_get_thread_area): Declare.
10997 * linux-x86-low.c (jump_insn): New.
10998 (x86_get_thread_area): New.
10999 (append_insns): New.
11000 (push_opcode): New.
11001 (amd64_install_fast_tracepoint_jump_pad): New.
11002 (i386_install_fast_tracepoint_jump_pad): New.
11003 (x86_install_fast_tracepoint_jump_pad): New.
11004 (the_low_target): Install x86_get_thread_area and
11005 x86_install_fast_tracepoint_jump_pad.
11006 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11007 (struct fast_tracepoint_jump): New.
11008 (fast_tracepoint_jump_insn): New.
11009 (fast_tracepoint_jump_shadow): New.
11010 (find_fast_tracepoint_jump_at): New.
11011 (fast_tracepoint_jump_here): New.
11012 (delete_fast_tracepoint_jump): New.
11013 (set_fast_tracepoint_jump): New.
11014 (uninsert_fast_tracepoint_jumps_at): New.
11015 (reinsert_fast_tracepoint_jumps_at): New.
11016 (set_breakpoint_at): Use write_inferior_memory.
11017 (uninsert_raw_breakpoint): Use write_inferior_memory.
11018 (check_mem_read): Mask out fast tracepoint jumps.
11019 (check_mem_write): Mask out fast tracepoint jumps.
11020 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11021 (set_fast_tracepoint_jump): Declare.
11022 (delete_fast_tracepoint_jump)
11023 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11024 (reinsert_fast_tracepoint_jumps_at): Declare.
11025 * regcache.c: Don't compile many functions when building the
11026 in-process agent library.
11027 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11028 the register buffer in the heap.
11029 (free_register_cache): If the register buffer isn't owned by the
11030 regcache, don't free it.
11031 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11032 pre-existing register caches.
11033 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11034 type.
11035 (convert_ascii_to_int): : Constify `from' parameter type.
11036 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11037 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11038 the needed buffer in-place.
11039 (relocate_instruction): New.
11040 * server.c (handle_query) <qSymbols>: If the target supports
11041 tracepoints, give it a chance of looking up symbols. Report
11042 support for fast tracepoints.
11043 (handle_status): Stabilize threads.
11044 (process_serial_event): Adjust.
11045 * server.h (struct fast_tracepoint_jump): Forward declare.
11046 (struct process_info) <fast_tracepoint_jumps>: New field.
11047 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11048 (decode_X_packet, decode_M_packet): Adjust.
11049 (relocate_instruction): Declare.
11050 (in_process_agent_loaded): Declare.
11051 (tracepoint_look_up_symbols): Declare.
11052 (struct fast_tpoint_collect_status): Declare.
11053 (fast_tracepoint_collecting): Declare.
11054 (force_unlock_trace_buffer): Declare.
11055 (handle_tracepoint_bkpts): Declare.
11056 (initialize_low_tracepoint)
11057 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11058 * target.h (struct target_ops) <stabilize_threads,
11059 install_fast_tracepoint_jump_pad>: New fields.
11060 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11061 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11062 [HAVE_STDINT_H]: Include stdint.h.
11063 (trace_debug_1): Rename to ...
11064 (trace_vdebug): ... this.
11065 (trace_debug): Rename to ...
11066 (trace_debug_1): ... this. Add `level' parameter.
11067 (trace_debug): New.
11068 (ATTR_USED, ATTR_NOINLINE): New.
11069 (IP_AGENT_EXPORT): New.
11070 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11071 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11072 (about_to_request_buffer_space, trace_buffer_is_full)
11073 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11074 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11075 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11076 (traceframe_write_count, traceframes_created)
11077 (trace_state_variables)
11078 New renaming defines.
11079 (struct ipa_sym_addresses): New.
11080 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11081 (symbol_list): New.
11082 (ipa_sym_addrs): New.
11083 (all_tracepoint_symbols_looked_up): New.
11084 (in_process_agent_loaded): New.
11085 (write_e_ipa_not_loaded): New.
11086 (maybe_write_ipa_not_loaded): New.
11087 (tracepoint_look_up_symbols): New.
11088 (debug_threads) [IN_PROCESS_AGENT]: New.
11089 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11090 (UNKNOWN_SIDE_EFFECTS): New.
11091 (stop_tracing): New.
11092 (flush_trace_buffer): New.
11093 (stop_tracing_bkpt): New.
11094 (flush_trace_buffer_bkpt): New.
11095 (read_inferior_integer): New.
11096 (read_inferior_uinteger): New.
11097 (read_inferior_data_pointer): New.
11098 (write_inferior_data_pointer): New.
11099 (write_inferior_integer): New.
11100 (write_inferior_uinteger): New.
11101 (struct collect_static_trace_data_action): Delete.
11102 (enum tracepoint_type): New.
11103 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11104 <actions_str, step_actions, step_actions_str>: Only include in
11105 GDBserver.
fa593d66
PA
11106 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11107 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11108 (tracepoints): Use IP_AGENT_EXPORT.
11109 (last_tracepoint): Don't include in the IPA.
11110 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11111 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11112 (alloced_trace_state_variables): New.
11113 (trace_state_variables): Use IP_AGENT_EXPORT.
11114 (traceframe_t): Delete unused variable.
11115 (circular_trace_buffer): Don't include in the IPA.
11116 (trace_buffer_start): Delete.
11117 (struct trace_buffer_control): New.
11118 (trace_buffer_free): Delete.
11119 (struct ipa_trace_buffer_control): New.
11120 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11121 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11122 New.
11123 (trace_buffer_ctrl): New.
11124 (TRACE_BUFFER_CTRL_CURR): New.
11125 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11126 Reimplement as macros.
11127 (trace_buffer_wrap): Delete.
11128 (traceframe_write_count, traceframe_read_count)
11129 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11130 (struct tracepoint_hit_ctx) <type>: New field.
11131 (struct fast_tracepoint_ctx): New.
11132 (memory_barrier): New.
11133 (cmpxchg): New.
11134 (record_tracepoint_error): Update atomically in the IPA.
11135 (clear_inferior_trace_buffer): New.
11136 (about_to_request_buffer_space): New.
11137 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11138 updating the same buffer.
11139 (add_tracepoint): Default the tracepoint's type to trap
11140 tracepoint, and orig_size to -1.
11141 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11142 internal variables.
11143 (create_trace_state_variable): New parameter `gdb'. Handle it.
11144 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11145 (cmd_qtdp): Handle fast tracepoints.
11146 (cmd_qtdv): Adjust.
11147 (max_jump_pad_size): New.
11148 (gdb_jump_pad_head): New.
11149 (get_jump_space_head): New.
11150 (claim_jump_space): New.
11151 (sort_tracepoints): New.
11152 (MAX_JUMP_SIZE): New.
11153 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11154 IPA.
11155 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11156 support. Upload fast traceframes, and delete internal IPA
11157 breakpoints.
11158 (stop_tracing_handler): New.
11159 (flush_trace_buffer_handler): New.
11160 (cmd_qtstop): Upload fast tracepoints.
11161 (response_tracepoint): Handle fast tracepoints.
11162 (tracepoint_finished_step): Upload fast traceframes. Set the
11163 tracepoint hit context's tracepoint type.
11164 (handle_tracepoint_bkpts): New.
11165 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11166 type. Add comment about fast tracepoints.
11167 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11168 non-existing action_str field.
11169 (get_context_regcache): Handle fast tracepoints.
11170 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11171 to the regcache.
11172 (fast_tracepoint_from_jump_pad_address): New.
11173 (fast_tracepoint_from_ipa_tpoint_address): New.
11174 (collecting_t): New.
11175 (force_unlock_trace_buffer): New.
11176 (fast_tracepoint_collecting): New.
11177 (collecting): New.
11178 (gdb_collect): New.
11179 (write_inferior_data_ptr): New.
11180 (target_tp_heap): New.
11181 (target_malloc): New.
11182 (download_agent_expr): New.
11183 (UALIGN): New.
11184 (download_tracepoints): New.
11185 (download_trace_state_variables): New.
11186 (upload_fast_traceframes): New.
11187 (IPA_FIRST_TRACEFRAME): New.
11188 (IPA_NEXT_TRACEFRAME_1): New.
11189 (IPA_NEXT_TRACEFRAME): New.
11190 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11191 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11192 (gdb_jump_pad_buffer_end): New.
11193 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11194 (initialize_tracepoint): Adjust.
11195 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11196 buffer. Initialize the low module.
11197 * utils.c (PREFIX, TOOLNAME): New.
11198 (malloc_failure): Use PREFIX.
11199 (error): In the IPA, an error causes an exit.
11200 (fatal, warning): Use PREFIX.
11201 (internal_error): Use TOOLNAME.
11202 (NUMCELLS): Increase to 10.
11203 * configure, config.in: Regenerate.
11204
d149dd1d
PA
112052010-06-01 Pedro Alves <pedro@codesourcery.com>
11206
11207 * server.c (handle_query) <qSupported>: Do two passes over the
11208 qSupported string to avoid nesting strtok.
11209
f6528abd
JK
112102010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11211
11212 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11213 (CDEPS): New.
11214 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11215 -Wl,--dynamic-list.
11216 * configure: Regenerate.
11217 * proc-service.list: New.
11218
ca2a87a0
JK
112192010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11220
11221 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11222 New comment.
11223
363a6e9f
OS
112242010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11225
11226 * gdbreplay.c (remote_open): Check error return from socket() call by
11227 its equality to -1 not by it being negative.
11228 * remote-utils.c (remote_open): Likewise.
11229
d23b6cb1
PA
112302010-05-23 Pedro Alves <pedro@codesourcery.com>
11231
11232 * config.h: Regenerate.
11233
28d3cf85
MK
112342010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11235
11236 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11237 doesn't provide PTRACE_GET_THREAD_AREA.
11238
fea36a59
MK
112392010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11240
11241 * linux-m68k-low.c: Include <asm/ptrace.h>
11242 (ps_get_thread_area): Implement.
11243
24b066ba
DE
112442010-05-03 Doug Evans <dje@google.com>
11245
11246 * event-loop.c (struct callback_event): New struct.
11247 (callback_list): New global.
11248 (append_callback_event, delete_callback_event): New functions.
11249 (process_callback): New function.
11250 (start_event_loop): Call it.
11251 * remote-utils.c (NOT_SCHEDULED): Define.
11252 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11253 moved out of readchar.
11254 (readchar): Rewrite. Call reschedule before returning.
11255 (reset_readchar): New function.
11256 (remote_close): Call it.
11257 (process_remaining, reschedule): New functions.
11258 * server.h (callback_handler_func): New typedef.
11259 (append_callback_event, delete_callback_event): Declare.
11260
9836d6ea
PA
112612010-05-03 Pedro Alves <pedro@codesourcery.com>
11262
11263 * proc-service.c (ps_pglobal_lookup): Use
11264 thread_db_look_up_one_symbol.
11265 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11266 parameter. Use it instead of all_symbols_looked_up.
11267 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11268 field.
11269 (all_symbols_looked_up): Don't declare.
11270 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11271 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11272 field.
11273 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11274 Set all_symbols_looked_up here.
11275 (thread_db_look_up_one_symbol): New.
11276 (thread_db_get_tls_address): Adjust.
11277 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11278 thread_db object on the heap, and tentatively set it in the
11279 process structure.
11280 (thread_db_init): Don't set all_symbols_looked_up here.
11281 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11282
7984d532
PA
112832010-05-03 Pedro Alves <pedro@codesourcery.com>
11284
11285 * linux-low.c (linux_kill, linux_detach): Adjust.
11286 (status_pending_p_callback): Remove redundant statement. Check
11287 for !TARGET_WAITIKIND_IGNORE, instead of
11288 TARGET_WAITKIND_STOPPED.
11289 (handle_tracepoints): Make sure LWP is locked. Adjust.
11290 (linux_wait_for_event_1): Adjust.
11291 (linux_cancel_breakpoints): New.
11292 (unsuspend_one_lwp): New.
11293 (unsuspend_all_lwps): New.
11294 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11295 (send_sigstop_callback): Change return type to int, add new
11296 `except' parameter and handle it.
11297 (suspend_and_send_sigstop_callback): New.
11298 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11299 pass them down. If SUSPEND, also increment the lwp's suspend
11300 count.
11301 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11302 (need_step_over_p): Don't consider suspended LWPs.
11303 (start_step_over): Adjust.
11304 (proceed_one_lwp): Change return type to int, add new `except'
11305 parameter and handle it.
11306 (unsuspend_and_proceed_one_lwp): New.
11307 (proceed_all_lwps): Use find_inferior instead of
11308 for_each_inferior.
11309 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11310 also decrement the suspend count of LWPs. Pass `except' down,
11311 instead of hacking its suspend count.
11312 (linux_pause_all): Add `freeze' parameter. Adjust.
11313 (linux_unpause_all): New.
11314 (linux_target_ops): Install linux_unpause_all.
11315 * server.c (handle_status): Adjust.
11316 * target.h (struct target_ops): New fields `unpause_all' and
11317 `cancel_breakpoints'. Add new parameter to `pause_all'.
11318 (pause_all): Add new `freeze' parameter.
11319 (unpause_all): New.
11320 (cancel_breakpoints): New.
11321 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11322 cancel breakpoints.
11323 (cmd_qtstart): Pause threads.
11324 (stop_tracing): Pause threads, and cancel breakpoints.
11325 * win32-low.c (win32_target_ops): Adjust.
11326
e471f25b
PA
113272010-05-03 Pedro Alves <pedro@codesourcery.com>
11328
11329 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11330 the inferior right away from here...
11331 (linux_wait_1): ... to here, and adjust to check the thread's
11332 last_resume_kind instead of the lwp's step or stop_expected flags.
11333
1915ef4f
PA
113342010-05-02 Pedro Alves <pedro@codesourcery.com>
11335
11336 * README: Use consistent `GDB' and `GDBserver' spellings.
11337
f9e39928
PA
113382010-05-02 Pedro Alves <pedro@codesourcery.com>
11339
11340 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11341 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11342 (linux_detach_one_lwp): Assume the lwp is stopped.
11343 (any_thread_of): Delete.
11344 (linux_detach): Stop all lwps here. Don't blindly delete all
11345 breakpoints.
11346 (delete_lwp_callback): New.
11347 (linux_mourn): Delete all lwps of the process that is gone.
11348 (linux_wait_1): Don't delete the last lwp of the process here.
11349 * mem-break.h (mark_breakpoints_out): Declare.
11350 * mem-break.c (mark_breakpoints_out): New.
11351 (free_all_breakpoints): Use it.
11352 * server.c (handle_target_event): If the process is gone, mark
11353 breakpoints out.
11354 * thread-db.c (struct thread_db) <create_bp>: New field.
11355 (thread_db_enable_reporting): Fix prototype. Store a thread event
11356 breakpoint reference in the thread_db struct.
11357 (thread_db_load_search): Clear the thread_db object.
11358 (try_thread_db_load_1): Ditto.
11359 (switch_to_process): New.
11360 (disable_thread_event_reporting): Use it.
11361 (remove_thread_event_breakpoints): New.
11362 (thread_db_detach, thread_db_mourn): Use it.
11363
1e7fc18c
PA
113642010-05-01 Pedro Alves <pedro@codesourcery.com>
11365
11366 * linux-low.c (linux_enable_event_reporting): New.
11367 (linux_wait_for_event_1, handle_extended_wait): Use it.
11368
02fc4de7
PA
113692010-04-30 Pedro Alves <pedro@codesourcery.com>
11370
11371 * linux-low.c (linux_kill_one_lwp, linux_kill)
11372 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11373 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11374 SIGSTOP even if the LWP is stopped.
11375 (send_sigstop_callback): New.
11376 (stop_all_lwps): Use send_sigstop_callback instead.
11377 (linux_resume_one_thread): Adjust.
11378 (proceed_one_lwp): Still proceed an LWP that the client has
11379 requested to stop, if we haven't reported it as stopped yet. Make
11380 sure that LWPs the client want stopped, have a pending SIGSTOP.
11381
bc3b5632
DE
113822010-04-26 Doug Evans <dje@google.com>
11383
ae1ada35
DE
11384 * server.c (handle_general_set): Make static.
11385
bc3b5632
DE
11386 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11387 Print received char after testing for error/eof instead of before.
11388 (input_interrupt): Tweak comment.
11389
65730243
DE
113902010-04-23 Doug Evans <dje@google.com>
11391
11392 * server.c (start_inferior): Print inferior argv if --debug.
11393
a8ae7dc0
AR
113942010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11395
11396 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11397 * nto-x86-low.c: Include server.h
11398
1c07cc19
PM
113992010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11400
11401 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11402 be consistent with other sources of this directory.
11403 (init_registers_amd64): Correct name of source file of this function
11404 in the comment.
11405
e0a61e09
PM
114062010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11407
11408 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11409 64-bit executables.
11410
54709339
PM
114112010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11412
11413 * win32-i386-low.c: Add 64-bit support.
11414 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11415 (init_registers_amd64): Declare.
11416 (mappings): Add 64-bit version of array.
11417 (init_windows_x86): New function.
11418 (the_low_target): Change init_arch field to init_windows_x86.
11419
e8f0053d
PM
114202010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11421
11422 * win32-low.c: Adapt to support also 64-bit architecture.
11423 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11424 (get_image_name): Use SIZE_T type for local variable `done'.
11425 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11426 (toolhelp_get_dll_name): Idem.
11427 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11428 Use uintptr_t typecast to avoid warning.
11429 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11430 (handle_exception): Use phex_nz to avoid warning.
11431 (win32_wait): Remove unused local variable `process'.
11432
c481e77e
PM
114332010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11434
11435 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11436 `amd64-avx.o'.
11437
12ea4b69
PM
114382010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11439
11440 * configure.ac: Use `ws2_32' library for srv_mingw.
11441 * configure: Regenerate.
11442 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11443 * remote-utils.c: Likewise.
11444
f6d1620c
L
114452010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11446
11447 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11448 if __x86_64__ is defined.
11449
8e642873
PM
114502010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11451
11452 * configure: Regenerate.
11453
711e434b
PM
114542010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11455
11456 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11457 * target.h (target_ops): New get_tib_address field.
11458 * win32-low.h (win32_thread_info): Add thread_local_base field.
11459 * win32-low.c (child_add_thread): Add tlb argument.
11460 Set thread_local_base field to TLB.
11461 (get_child_debug_event): Adapt to child_add_thread change.
11462 (win32_get_tib_address): New function.
11463 (win32_target_ops): Set get_tib_address field to
11464 win32_get_tib_address.
11465 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11466
505106cd
PA
114672010-04-12 Pedro Alves <pedro@codesourcery.com>
11468
505106cd
PA
11469 * linux-low.c (linux_mourn): Also remove the process.
11470 * server.c (handle_target_event): Don't remove the process here.
11471 * nto-low.c (nto_mourn): New.
11472 (nto_target_ops): Install it.
11473 * spu-low.c (spu_mourn): New.
11474 (spu_target_ops): Install it.
11475 * win32-low.c (win32_mourn): New.
11476 (win32_target_ops): Install it.
11477
e8470a06
PA
114782010-04-12 Pedro Alves <pedro@codesourcery.com>
11479
11480 * server.h (buffer_xml_printf): Remove redundant `;'.
11481
45ba0d02
PA
114822010-04-12 Pedro Alves <pedro@codesourcery.com>
11483
11484 * regcache.c (set_register_cache): Invalidate regcaches before
11485 changing the register cache layout.
11486 (regcache_invalidate_one): Allow a NULL regcache.
11487 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11488 regcaches before changing the register cache layout or the target
11489 regsets.
11490
59e04013
L
114912010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11492
11493 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11494 variable warning on Linux/x86-64.
11495
8336d594
PA
114962010-04-11 Pedro Alves <pedro@codesourcery.com>
11497
11498 GDBserver disconnected tracing support.
11499
11500 * linux-low.c (linux_remove_process): Delete.
11501 (add_lwp): Don't set last_resume_kind here.
11502 (linux_kill): Use `mourn'.
11503 (linux_detach): Use `thread_db_detach', and `mourn'.
11504 (linux_mourn): New.
11505 (linux_attach_lwp_1): Adjust comment.
11506 (linux_attach): last_resume_kind moved the thread_info; adjust.
11507 (status_pending_p_callback): Adjust.
11508 (linux_wait_for_event_1): Adjust.
11509 (count_events_callback, select_singlestep_lwp_callback)
11510 (select_event_lwp_callback, cancel_breakpoints_callback)
11511 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11512 (proceed_one_lwp): Adjust.
11513 (linux_async): Add debug output.
11514 (linux_thread_stopped): New.
11515 (linux_pause_all): New.
11516 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11517 linux_pause_all.
11518 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11519 (thread_db_free): Delete declaration.
11520 (thread_db_detach, thread_db_mourn): Declare.
11521 * thread-db.c (thread_db_init): Use thread_db_mourn.
11522 (thread_db_free): Delete, split in two.
11523 (disable_thread_event_reporting): New.
11524 (thread_db_detach): New.
11525 (thread_db_mourn): New.
11526
11527 * server.h (struct thread_info) <last_resume_kind>: New field.
11528 <attached>: Add comment.
11529 <gdb_detached>: New field.
11530 (handler_func): Change return type to int.
11531 (handle_serial_event, handle_target_event): Ditto.
11532 (gdb_connected): Declare.
11533 (tracing): Delete.
11534 (disconnected_tracing): Declare.
11535 (stop_tracing): Declare.
11536
11537 * server.c (handle_query) <qSupported>: Report support for
11538 disconnected tracing.
11539 (queue_stop_reply_callback): Account for running threads.
11540 (gdb_wants_thread_stopped): New.
11541 (gdb_wants_all_threads_stopped): New.
11542 (gdb_reattached_process): New.
11543 (handle_status): Clear the `gdb_detached' flag of all processes.
11544 In all-stop, stop all threads.
11545 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11546 (process_serial_event): If the remote connection breaks, or if an
11547 exit was forced with "monitor exit", force an event loop exit.
11548 Handle disconnected tracing on detach.
11549 (handle_serial_event): Adjust.
11550 (handle_target_event): If GDB isn't connected, forward events back
11551 to the inferior, unless the last process exited, in which case,
11552 exit gdbserver. Adjust interface.
11553
11554 * remote-utils.c (remote_open): Don't block in accept. Instead
11555 register an event loop source on the listen socket file
11556 descriptor. Refactor bits into ...
11557 (listen_desc): ... this new global.
11558 (gdb_connected): ... this new function.
11559 (enable_async_notification): ... this new function.
11560 (handle_accept_event): ... this new function.
11561 (remote_close): Clear remote_desc.
11562
11563 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11564
11565 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11566 New fields.
11567 (mourn_inferior): Define.
11568 (target_process_qsupported): Avoid the dangling else problem.
11569 (thread_stopped): Define.
11570 (pause_all): Define.
11571 (target_waitstatus_to_string): Declare.
11572 * target.c (target_waitstatus_to_string): New.
11573
11574 * tracepoint.c (tracing): Make extern.
11575 (disconnected_tracing): New.
11576 (stop_tracing): Make extern. Handle tracing stops due to GDB
11577 disconnecting.
11578 (cmd_qtdisconnected): New.
11579 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11580 (handle_tracepoint_general_set): Handle QTDisconnected.
11581
11582 * event-loop.c (event_handler_func): Change return type to int.
11583 (process_event): Bail out if the event handler wants the event
11584 loop to stop.
11585 (handle_file_event): Ditto.
11586 (start_event_loop): Bail out if the event handler wants the event
11587 loop to stop.
11588
11589 * nto-low.c (nto_target_ops): Adjust.
11590 * spu-low.c (spu_wait): Don't remove the process here.
11591 (spu_target_ops): Adjust.
11592 * win32-low.c (win32_wait): Don't remove the process here.
11593 (win32_target_ops): Adjust.
11594
5d267c4c
PA
115952010-04-11 Pedro Alves <pedro@codesourcery.com>
11596
11597 * regcache.c (realloc_register_cache): Invalidate inferior's
11598 regcache before recreating it.
11599
623ccd72
PA
116002010-04-09 Pedro Alves <pedro@codesourcery.com>
11601
11602 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11603
219f2f23
PA
116042010-04-09 Stan Shebs <stan@codesourcery.com>
11605 Pedro Alves <pedro@codesourcery.com>
11606
11607 * server.h (LONGEST): New.
11608 (struct thread_info) <while_stepping>: New field.
11609 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11610 Declare.
11611 (initialize_tracepoint, handle_tracepoint_general_set)
11612 (handle_tracepoint_query, tracepoint_finished_step)
11613 (tracepoint_was_hit, release_while_stepping_state_list):
11614 (current_traceframe): Declare.
11615 * server.c (handle_general_set): Handle tracepoint packets.
11616 (read_memory): New.
11617 (write_memory): New.
11618 (handle_search_memory_1): Use read_memory.
11619 (handle_query): Report support for conditional tracepoints, trace
11620 state variables, and tracepoint sources. Handle tracepoint
11621 queries.
11622 (main): Initialize the tracepoints module.
11623 (process_serial_event): Handle traceframe reads/writes.
11624
11625 * linux-low.c (handle_tracepoints): New.
11626 (linux_wait_1): Call it.
11627 (linux_resume_one_lwp): Handle while-stepping.
11628 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11629 (linux_target_ops): Install them.
11630 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11631 New field.
11632 * linux-x86-low.c (x86_supports_tracepoints): New.
11633 (the_low_target). Install it.
11634
11635 * mem-break.h (delete_breakpoint): Declare.
11636 * mem-break.c (delete_breakpoint): Make external.
11637
11638 * target.h (struct target_ops): Add `supports_tracepoints',
11639 `read_pc', and `write_pc' fields.
11640 (target_supports_tracepoints): Define.
11641 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11642 (phex_nz): New.
11643
11644 * regcache.h (struct regcache) <registers_owned>: New field.
11645 (init_register_cache, regcache_cpy): Declare.
11646 (regcache_read_pc, regcache_write_pc): Declare.
11647 (register_cache_size): Declare.
11648 (supply_regblock): Declare.
11649 * regcache.c (init_register_cache): New.
11650 (new_register_cache): Use it.
11651 (regcache_cpy): New.
11652 (register_cache_size): New.
11653 (supply_regblock): New.
11654 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11655
219f2f23
PA
11656 * tracepoint.c: New.
11657
11658 * Makefile.in (OBS): Add tracepoint.o.
11659 (tracepoint.o): New rule.
11660
3a13a53b
L
116612010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11662
11663 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11664 (i386-mmx.o): New.
11665 (i386-mmx.c): Likewise.
11666 (i386-mmx-linux.o): Likewise.
11667 (i386-mmx-linux.c): Likewise.
11668
11669 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11670 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11671 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11672 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11673
11674 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11675 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11676 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11677
1570b33e
L
116782010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11679
11680 * Makefile.in (clean): Updated.
11681 (i386-avx.o): New.
11682 (i386-avx.c): Likewise.
11683 (i386-avx-linux.o): Likewise.
11684 (i386-avx-linux.c): Likewise.
11685 (amd64-avx.o): Likewise.
11686 (amd64-avx.c): Likewise.
11687 (amd64-avx-linux.o): Likewise.
11688 (amd64-avx-linux.c): Likewise.
11689
11690 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11691 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11692 (srv_amd64_regobj): Add amd64-avx.o.
11693 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11694 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11695 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11696 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11697 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11698 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11699 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11700
11701 * i387-fp.c: Include "i386-xstate.h".
11702 (i387_xsave): New.
11703 (i387_cache_to_xsave): Likewise.
11704 (i387_xsave_to_cache): Likewise.
11705 (x86_xcr0): Likewise.
11706
11707 * i387-fp.h (i387_cache_to_xsave): Likewise.
11708 (i387_xsave_to_cache): Likewise.
11709 (x86_xcr0): Likewise.
11710
11711 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11712 * linux-crisv32-low.c (target_regsets): Likewise.
11713 * linux-m68k-low.c (target_regsets): Likewise.
11714 * linux-mips-low.c (target_regsets): Likewise.
11715 * linux-ppc-low.c (target_regsets): Likewise.
11716 * linux-s390-low.c (target_regsets): Likewise.
11717 * linux-sh-low.c (target_regsets): Likewise.
11718 * linux-sparc-low.c (target_regsets): Likewise.
11719 * linux-xtensa-low.c (target_regsets): Likewise.
11720
11721 * linux-low.c: Include <sys/uio.h>.
11722 (regsets_fetch_inferior_registers): Support nt_type.
11723 (regsets_store_inferior_registers): Likewise.
11724 (linux_process_qsupported): New.
11725 (linux_target_ops): Add linux_process_qsupported.
11726
11727 * linux-low.h (regset_info): Add nt_type.
11728 (linux_target_ops): Add process_qsupported.
11729
11730 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11731 and <sys/uio.h>.
11732 (init_registers_i386_avx_linux): New.
11733 (init_registers_amd64_avx_linux): Likewise.
11734 (xmltarget_i386_linux_no_xml): Likewise.
11735 (xmltarget_amd64_linux_no_xml): Likewise.
11736 (PTRACE_GETREGSET): Likewise.
11737 (PTRACE_SETREGSET): Likewise.
11738 (x86_fill_xstateregset): Likewise.
11739 (x86_store_xstateregset): Likewise.
11740 (use_xml): Likewise.
11741 (x86_linux_update_xmltarget): Likewise.
11742 (x86_linux_process_qsupported): Likewise.
11743 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11744 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11745 init_registers_i386_linux here. Call
11746 x86_linux_update_xmltarget.
11747 (the_low_target): Add x86_linux_process_qsupported.
11748
11749 * server.c (handle_query): Call target_process_qsupported.
11750
11751 * target.h (target_ops): Add process_qsupported.
11752 (target_process_qsupported): New.
11753
fc7238bb
PA
117542010-04-03 Pedro Alves <pedro@codesourcery.com>
11755
11756 * inferiors.c (add_thread): Set last_status kind to
11757 TARGET_WAITKIND_IGNORE.
11758 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11759 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11760 (linux_wait_1): Move `thread' local definition to block that uses
11761 it. Don't NULL initialize `event_child'.
11762 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11763 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11764 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11765
bdabb078
PA
117662010-04-01 Pedro Alves <pedro@codesourcery.com>
11767
11768 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11769 an extended waitstatus, or by a watchpoint.
11770 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11771 thread was stepping or has been stopped by a watchpoint.
11772
d3bbe7a0
PA
117732010-04-01 Pedro Alves <pedro@codesourcery.com>
11774
11775 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11776 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11777 of another, then delete the previous, and validate all
11778 breakpoints.
11779 (validate_inserted_breakpoint): New.
11780 (delete_disabled_breakpoints): New.
11781 (validate_breakpoints): New.
11782 (check_mem_read): Validate breakpoints before trusting their
11783 shadow. Delete disabled breakpoints.
11784 (check_mem_write): Validate breakpoints before trusting they
11785 should be inserted. Delete disabled breakpoints.
11786 * mem-break.h (validate_breakpoints):
11787 * server.c (handle_query): Validate breakpoints when we see a
11788 qSymbol query.
11789
8b07ae33
PA
117902010-04-01 Pedro Alves <pedro@codesourcery.com>
11791
11792 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11793 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11794 if we could tell there's a GDB breakpoint at stop_pc.
11795 (need_step_over_p): Don't do a step over if we find a GDB
11796 breakpoint at the resume PC.
11797
11798 * mem-break.c (struct raw_breakpoint): New.
11799 (enum bkpt_type): New type `gdb_breakpoint'.
11800 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11801 fields. New field `raw'.
11802 (find_raw_breakpoint_at): New.
11803 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11804 breakpoint instead.
11805 (set_breakpoint_at): Adjust.
11806 (delete_raw_breakpoint): New.
11807 (release_breakpoint): New.
11808 (delete_breakpoint): Rename to...
11809 (delete_breakpoint_1): ... this. Add proc parameter. Use
11810 release_breakpoint. Return ENOENT.
11811 (delete_breakpoint): Reimplement.
11812 (find_breakpoint_at): Delete.
11813 (find_gdb_breakpoint_at): New.
11814 (delete_breakpoint_at): Delete.
11815 (set_gdb_breakpoint_at): New.
11816 (delete_gdb_breakpoint_at): New.
11817 (gdb_breakpoint_here): New.
11818 (set_reinsert_breakpoint): Use release_breakpoint.
11819 (uninsert_breakpoint): Rename to ...
11820 (uninsert_raw_breakpoint): ... this.
11821 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11822 (reinsert_raw_breakpoint): Change parameter type to
11823 raw_breakpoint.
11824 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11825 instead.
11826 (check_breakpoints): Adjust. Use release_breakpoint.
11827 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11828 (breakpoint_inserted_here): Ditto.
11829 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11830 Don't trust the breakpoint's shadow if it is not inserted.
11831 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11832 (delete_all_breakpoints): Adjust.
11833 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11834 use delete_breakpoint_1.
11835
11836 * mem-break.h (breakpoints_supported): Delete declaration.
11837 (set_gdb_breakpoint_at): Declare.
11838 (gdb_breakpoint_here): Declare.
11839 (delete_breakpoint_at): Delete.
11840 (delete_gdb_breakpoint_at): Declare.
11841
11842 * server.h (struct raw_breakpoint): Forward declare.
11843 (struct process_info): New field `raw_breakpoints'.
11844
11845 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11846 breakpoints.
11847
6bf5e0ba
PA
118482010-03-24 Pedro Alves <pedro@codesourcery.com>
11849
11850 * linux-low.c (status_pending_p_callback): Fix comment.
11851 (linux_wait_for_event_1): Move most of the internal breakpoint
11852 handling from here...
11853 (linux_wait_1): ... to here.
11854 (count_events_callback): New.
11855 (select_singlestep_lwp_callback): New.
11856 (select_event_lwp_callback): New.
11857 (cancel_breakpoints_callback): New.
11858 (select_event_lwp): New.
11859 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11860 priority to all LWPs that have had events that should be reported
11861 to the client. Cancel breakpoints when about to reporting the
11862 event to the client, not while stopping lwps. No longer cancel
11863 finished single-steps here.
11864 (cancel_finished_single_step): Delete.
11865 (cancel_finished_single_steps): Delete.
11866
414a389f
PA
118672010-03-24 Pedro Alves <pedro@codesourcery.com>
11868
11869 * mem-break.c (enum bkpt_type): New.
11870 (struct breakpoint): New field `type'.
11871 (set_breakpoint_at): Change return type to struct breakpoint
11872 pointer. Set type to `other_breakpoint' by default.
11873 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11874 in the breakpoint list.
11875 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11876 (reinsert_breakpoint): Rename to ...
11877 (reinsert_raw_breakpoint): ... this.
11878 (reinsert_breakpoints_at): Adjust.
11879 * mem-break.h (struct breakpoint): Declare.
11880 (set_breakpoint_at): Change return type to struct breakpoint
11881 pointer.
11882
2280c721
PA
118832010-03-24 Pedro Alves <pedro@codesourcery.com>
11884
11885 * server.c (handle_query): Assign, not compare.
11886
d50171e4
PA
118872010-03-24 Pedro Alves <pedro@codesourcery.com>
11888
11889 Teach linux gdbserver to step-over-breakpoints.
11890
11891 * linux-low.c (can_hardware_single_step): New.
11892 (supports_breakpoints): New.
11893 (handle_extended_wait): If stopping threads, read the stop pc of
11894 the new cloned LWP.
11895 (get_pc): New.
11896 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11897 low target doesn't support retrieving the PC.
11898 (add_lwp): Set last_resume_kind to resume_continue.
11899 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11900 (linux_attach): Don't clear stop_expected. Set the lwp's
11901 last_resume_kind to resume_stop.
11902 (linux_detach_one_lwp): Don't check for removed breakpoints.
11903 (check_removed_breakpoint): Delete.
11904 (status_pending_p): Rename to ...
11905 (status_pending_p_callback): ... this. Don't check for removed
11906 breakpoints. Don't consider threads that are stopped from GDB's
11907 perspective.
11908 (linux_wait_for_lwp): Always read the stop_pc here.
11909 (cancel_breakpoint): New.
11910 (step_over_bkpt): New global.
11911 (linux_wait_for_event_1): Implement stepping over breakpoints.
11912 (gdb_wants_lwp_stopped): New.
11913 (gdb_wants_all_stopped): New.
11914 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11915 single-step traps here. Store the thread's last reported target
11916 wait status.
11917 (send_sigstop): Don't clear stop_expected. Always set it,
11918 instead.
11919 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11920 (cancel_finished_single_step): New.
11921 (cancel_finished_single_steps): New.
11922 (wait_for_sigstop): Don't cancel finished single-step traps here.
11923 (linux_resume_one_lwp): Don't check for removed breakpoints.
11924 Don't set `step' on non-hardware step archs.
11925 (linux_set_resume_request): Ignore resume_stop requests if already
11926 stopping or stopped. Set the lwp's last_resume_kind.
11927 (resume_status_pending_p): Don't check for removed breakpoints.
11928 (need_step_over_p): New.
11929 (start_step_over): New.
11930 (finish_step_over): New.
11931 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11932 requests. Clear the thread's last reported target waitstatus.
11933 Don't use the `suspended' flag. Don't consider pending breakpoints.
11934 (linux_resume): Start a step-over if necessary.
11935 (proceed_one_lwp): New.
11936 (proceed_all_lwps): New.
11937 (unstop_all_lwps): New.
11938 * linux-low.h (struct lwp_info): Rewrite comment for the
11939 `suspended' flag. Add the `stop_pc' field. Delete the
11940 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11941 Add `'last_resume_kind' and `need_step_over' fields.
11942 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11943 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11944 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11945 (set_raw_breakpoint_at): New.
11946 (set_breakpoint_at): Rewrite to use it.
11947 (reinsert_breakpoint_handler): Delete.
11948 (set_reinsert_breakpoint): New.
11949 (reinsert_breakpoint_by_bp): Delete.
11950 (delete_reinsert_breakpoints): New.
11951 (uninsert_breakpoint): Rewrite.
11952 (uninsert_breakpoints_at): New.
11953 (reinsert_breakpoint): Rewrite.
11954 (reinsert_breakpoints_at): New.
11955 (check_breakpoints): Rewrite.
11956 (breakpoint_here): New.
11957 (breakpoint_inserted_here): New.
11958 (check_mem_read): Adjust.
11959 * mem-break.h (breakpoints_supported, breakpoint_here)
11960 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11961 (reinsert_breakpoint_by_bp): Delete declaration.
11962 (delete_reinsert_breakpoints): Declare.
11963 (reinsert_breakpoint): Delete declaration.
11964 (reinsert_breakpoints_at): Declare.
11965 (uninsert_breakpoint): Delete declaration.
11966 (uninsert_breakpoints_at): Declare.
11967 (check_breakpoints): Adjust prototype.
11968 * server.h: Adjust include order.
11969 (struct thread_info): Declare here. Add a `last_status' field.
11970
30ba68cb
MS
119712010-03-23 Michael Snyder <msnyder@vmware.com>
11972
11973 * server.c (crc32): New function.
11974 (handle_query): Add handling for 'qCRC:' request.
11975
b9a881c2
PA
119762010-03-23 Pedro Alves <pedro@codesourcery.com>
11977
11978 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11979 lwp had been stopped by a watchpoint.
11980
e92d13d5
PA
119812010-03-16 Pedro Alves <pedro@codesourcery.com>
11982
11983 * server.h (internal_error): Declare.
11984 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11985 * utils.c (internal_error): New function.
11986
64daa791
AS
119872010-03-15 Andreas Schwab <schwab@redhat.com>
11988
11989 * configure.srv: Fix typo setting srv_regobj.
11990
f52cd8cd
PA
119912010-03-15 Pedro Alves <pedro@codesourcery.com>
11992
11993 * linux-low.c (fetch_register): Avoid passing a non string literal
11994 format to `error'.
11995 (usr_store_inferior_registers): Ditto.
11996
93ae6fdc
PA
119972010-03-14 Pedro Alves <pedro@codesourcery.com>
11998
11999 * linux-low.c (linux_write_memory): Bail out early if peeking
12000 memory failed.
12001
c3adc08c
PA
120022010-03-14 Pedro Alves <pedro@codesourcery.com>
12003
12004 * linux-low.h (struct lwp_info): New fields
12005 `stopped_by_watchpoint' and `stopped_data_address'.
12006 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12007 here, and cache them in the lwp object.
12008 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12009 directly.
12010 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12011 field.
12012 (linux_stopped_by_watchpoint): Rewrite.
12013 (linux_stopped_data_address): Rewrite.
12014
bce522a2
PA
120152010-03-06 Simo Melenius <simo.melenius@iki.fi>
12016
12017 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12018 switching the current inferior, not before.
12019
90884b2b
L
120202010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12021
12022 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12023 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12024 i386-linux.c and amd64-linux.c.
12025 (reg-i386.o): Removed.
12026 (reg-i386.c): Likewise.
12027 (reg-i386-linux.o): Likewise.
12028 (reg-i386-linux.c): Likewise.
12029 (reg-x86-64.o): Likewise.
12030 (reg-x86-64.c): Likewise.
12031 (reg-x86-64-linux.o): Likewise.
12032 (reg-x86-64-linux.c): Likewise.
12033 (i386.o): New.
12034 (i386.c): Likewise.
12035 (i386-linux.o): Likewise.
12036 (i386-linux.c): Likewise.
12037 (amd64.o): Likewise.
12038 (amd64.c): Likewise.
12039 (amd64-linux.o): Likewise.
12040 (amd64-linux.c): Likewise.
12041
12042 * configure.srv (srv_i386_regobj): New.
12043 (srv_i386_linux_regobj): Likewise.
12044 (srv_amd64_regobj): Likewise.
12045 (srv_amd64_linux_regobj): Likewise.
12046 (srv_i386_32bit_xmlfiles): Likewise.
12047 (srv_i386_64bit_xmlfiles): Likewise.
12048 (srv_i386_xmlfiles): Likewise.
12049 (srv_amd64_xmlfiles): Likewise.
12050 (srv_i386_linux_xmlfiles): Likewise.
12051 (srv_amd64_linux_xmlfiles): Likewise.
12052 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12053 srv_xmlfiles to $srv_i386_xmlfiles.
12054 (i[34567]86-*-mingw32ce*): Likewise.
12055 (i[34567]86-*-mingw*): Likewise.
12056 (i[34567]86-*-nto*): Likewise.
12057 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12058 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12059 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12060 (x86_64-*-linux*): Likewise.
12061
12062 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12063 (init_registers_amd64_linux): New.
12064 (x86_arch_setup): Replace init_registers_x86_64_linux with
12065 init_registers_amd64_linux.
12066
193f13e6
MK
120672010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12068
12069 * configure.ac: Check for libdl. If it is not available link against
12070 static libthread_db.
12071 * configure: Regenerate.
12072
85d721b8
PA
120732010-02-22 Pedro Alves <pedro@codesourcery.com>
12074
12075 PR9605
12076
12077 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12078 handing a read watchpoint.
12079 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12080
6076632b
DE
120812010-02-12 Doug Evans <dje@google.com>
12082
12083 * linux-low.c (linux_supports_tracefork_flag): Document.
12084 (linux_look_up_symbols): Add comment.
12085
3327ccf7
L
120862010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12087
12088 * regcache.c (supply_register): Clear regcache if buf is NULL.
12089
0718675c 120902010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12091 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12092
12093 * inferiors.c (find_inferior): Add function documentation.
12094 (unloaded_dll): Handle the case where the unloaded dll has not
12095 been previously registered in the dll list.
12096
177321bd
DJ
120972010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12098
12099 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12100 (thumb2_breakpoint): New.
12101 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12102
2b009048
DJ
121032010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12104
12105 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12106 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12107 breakpoints.
12108
3be029c7
PA
121092010-01-21 Pedro Alves <pedro@codesourcery.com>
12110
12111 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12112
18f5de3b
JK
121132010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12114
12115 * linux-s390-low.c (s390_collect_ptrace_register)
12116 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12117
3743bb4f
DE
121182010-01-21 Doug Evans <dje@google.com>
12119
14ce3065
DE
12120 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12121 (PTRACE_ARG4_TYPE): New macro.
12122 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12123 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12124 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12125 (usr_store_inferior_registers): Ditto.
12126 (linux_read_memory, linux_write_memory): Ditto.
12127 (linux_test_for_tracefork): Ditto.
12128
3743bb4f
DE
12129 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12130 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12131
8b315be5
PA
121322010-01-21 Pedro Alves <pedro@codesourcery.com>
12133
12134 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12135 target.
12136
85492558
PA
121372010-01-21 Pedro Alves <pedro@codesourcery.com>
12138
12139 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12140 prototype to take a regcache. Adjust.
12141
442ea881
PA
121422010-01-20 Pedro Alves <pedro@codesourcery.com>
12143
12144 * regcache.h (struct thread_info): Forward declare.
12145 (struct regcache): New.
12146 (new_register_cache): Adjust prototype.
12147 (get_thread_regcache): Declare.
12148 (free_register_cache): Adjust prototype.
12149 (registers_to_string, registers_from_string): Ditto.
12150 (supply_register, supply_register_by_name, collect_register)
12151 (collect_register_as_string, collect_register_by_name): Ditto.
12152 * regcache.c (struct inferior_regcache_data): Delete.
12153 (get_regcache): Rename to ...
12154 (get_thread_regcache): ... this. Adjust. Switch inferior before
12155 fetching registers.
12156 (regcache_invalidate_one): Adjust.
12157 (regcache_invalidate): Fix prototype.
12158 (new_register_cache): Return the new register cache.
12159 (free_register_cache): Change prototype.
12160 (realloc_register_cache): Adjust.
12161 (registers_to_string): Change prototype to take a regcache. Adjust.
12162 (registers_from_string): Ditto.
12163 (register_data): Ditto.
12164 (supply_register): Ditto.
12165 (supply_register_by_name): Ditto.
12166 (collect_register): Ditto.
12167 (collect_register_as_string): Ditto.
12168 (collect_register_by_name): Ditto.
12169 * server.c (process_serial_event): Adjust.
12170 * linux-low.h (regset_fill_func, regset_store_func): Change
12171 prototype.
12172 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12173 Change prototype.
12174 * linux-low.c (get_stop_pc): Adjust.
12175 (check_removed_breakpoint): Adjust.
12176 (linux_wait_for_event): Adjust.
12177 (linux_resume_one_lwp): Adjust.
12178 (fetch_register): Add regcache parameter. Adjust.
12179 (usr_store_inferior_registers): Ditto.
12180 (regsets_fetch_inferior_registers): Ditto.
12181 (regsets_store_inferior_registers): Ditto.
12182 (linux_fetch_registers, linux_store_registers): Ditto.
12183 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12184 regcache. Adjust.
43aaf8b6
PA
12185 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12186 Ditto.
442ea881
PA
12187 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12188 prototype to take a regcache.
12189 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12190 * remote-utils.c (convert_ascii_to_int, outreg)
12191 (prepare_resume_reply): Change prototype to take a regcache.
12192 Adjust.
12193 * target.h (struct target_ops) <fetch_registers, store_registers>:
12194 Change prototype to take a regcache.
12195 (fetch_inferior_registers, store_inferior_registers): Change
12196 prototype to take a regcache. Adjust.
12197 * proc-service.c (ps_lgetregs): Adjust.
12198 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12199 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12200 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12201 take a regcache. Adjust.
12202 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12203 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12204 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12205 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12206 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12207 (cris_cannot_fetch_register):
12208 (cris_breakpoint_at): Change prototype to take a regcache.
12209 Adjust.
12210 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12211 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12212 to take a regcache. Adjust.
12213 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12214 Adjust.
12215 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12216 take a regcache. Adjust.
12217 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12218 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12219 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12220 * linux-mips-low.c (mips_get_pc):
12221 (mips_set_pc): Change prototype to take a regcache. Adjust.
12222 (mips_reinsert_addr): Adjust.
12223 (mips_collect_register): Change prototype to take a regcache.
12224 Adjust.
12225 (mips_supply_register):
12226 (mips_collect_register_32bit, mips_supply_register_32bit)
12227 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12228 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12229 * linux-ppc-low.c (ppc_supply_ptrace_register)
12230 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12231 (parse_spufs_run): Adjust.
12232 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12233 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12234 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12235 take a regcache. Adjust.
12236 * linux-s390-low.c (s390_collect_ptrace_register)
12237 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12238 (s390_set_pc): Change prototype to take a regcache. Adjust.
12239 (s390_arch_setup): Adjust.
12240 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12241 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12242 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12243 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12244 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12245 regcache. Adjust.
12246 (sparc_breakpoint_at): Adjust.
12247 * linux-xtensa-low.c (xtensa_fill_gregset):
12248 (xtensa_store_gregset):
12249 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12250 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12251 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12252 prototype to take a regcache. Adjust.
12253 * win32-arm-low.c (arm_fetch_inferior_register)
12254 (arm_store_inferior_register): Change prototype to take a
12255 regcache. Adjust.
12256 * win32-i386-low.c (i386_fetch_inferior_register)
12257 (i386_store_inferior_register): Change prototype to take a
12258 regcache. Adjust.
12259 * win32-low.c (child_fetch_inferior_registers)
12260 (child_store_inferior_registers): Change prototype to take a
12261 regcache. Adjust.
12262 (win32_wait): Adjust.
12263 (win32_fetch_inferior_registers): Change prototype to take a
12264 regcache. Adjust.
12265 (win32_store_inferior_registers): Adjust.
12266 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12267 store_inferior_register>: Change prototype to take a regcache.
12268
60c3d7b0
DE
122692010-01-20 Doug Evans <dje@google.com>
12270
12271 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12272 #ifdef.
12273 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12274 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12275
dc146f7c
VP
122762010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12277
12278 * linux-low.c (linux_core_of_thread): New.
12279 (compare_ints, show_process, list_threads): New.
12280 (linux_qxfer_osdata): Report threads and cores.
12281 (linux_target_op): Register linux_core_of_thread.
12282 * remote-utils.c (prepare_resume_reply): Report the core.
12283 (buffer_xml_printf): Support %d specifier.
12284 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12285 New.
12286 (handle_query): Handle qXfer:threads. Announce availability
12287 thereof.
12288 * target.h (struct target_ops): New field core_of_thread.
12289
7803799a
UW
122902010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12291
12292 * Makefile.in (clean): Remove new generated files.
12293 (reg-s390.o, reg-s390.c): Remove rules.
12294 (reg-s390x.o, reg-s390x.c): Likewise.
12295 (s390-linux32.o, s390-linux32.c): Add rules.
12296 (s390-linux64.o, s390-linux64.c): Likewise.
12297 (s390x-linux64.o, s390x-linux64.c): Likewise.
12298 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12299 * linux-s390-low.c: Include <elf.h>.
12300 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12301 (init_registers_s390): Remove prototype.
12302 (init_registers_s390x): Likewise.
12303 (init_registers_s390_linux32): Add prototype.
12304 (init_registers_s390_linux64): Likewise.
12305 (init_registers_s390x_linux64): Likewise.
12306 (s390_num_regs_3264): New define.
12307 (s390_regmap_3264): New global variable.
12308 (s390_cannot_fetch_register): Remove obsolete check.
12309 (s390_cannot_store_register): Likewise.
12310 (s390_collect_ptrace_register): Handle upper/lower register halves.
12311 (s390_supply_ptrace_register): Likewise.
12312 (s390_fill_gregset): Update to register number changes.
12313 (s390_get_hwcap): New routine.
12314 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12315 Install appropriate regmap and register set.
12316
6e7ffa39
JB
123172010-01-01 Joel Brobecker <brobecker@adacore.com>
12318
12319 * server.c (gdbserver_version): Update copyright year to 2010.
12320 * gdbreplay.c (gdbreplay_version): Likewise.
12321
957f3f49
DE
123222009-12-28 Doug Evans <dje@google.com>
12323
12324 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12325 elf/external.h. Include <elf.h> instead but only if necessary.
12326
ca5c370d
PA
123272009-12-28 Pedro Alves <pedro@codesourcery.com>
12328
12329 * linux-low.c (linux_remove_process): Remove `detaching'
12330 parameter. Don't release/detach from thread_db here.
12331 (linux_kill): Release/detach from thread_db here, ...
12332 (linux_detach): ... and here, before actually detaching.
12333 (linux_wait_1): ... and here, when a process exits.
12334 * thread-db.c (any_thread_of): New.
12335 (thread_db_free): Switch the current inferior to a thread of the
12336 passed in process.
12337
4ee62156
DE
123382009-12-21 Doug Evans <dje@google.com>
12339
d90e6a88
DE
12340 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12341
c5f62d5f
DE
12342 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12343 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12344 warning ifndef __NR_tkill. Move setting of errno there too.
12345 Delete unnecessary resetting of errno after syscall.
12346 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12347
10e86dd7
DE
12348 * configure.ac: Check for dladdr.
12349 * config.in: Regenerate.
12350 * configure: Regenerate.
12351 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12352 (try_thread_db_load): Update.
12353
4ee62156
DE
12354 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12355
00f515da
DE
123562009-12-18 Doug Evans <dje@google.com>
12357
e9464885
DE
12358 * event-loop.c: Include unistd.h if it exists.
12359
07d4f67e
DE
12360 * linux-low.c (my_waitpid): Move definition away from being in
12361 between linux_tracefork_child/linux_test_for_tracefork.
12362
00f515da
DE
12363 * gdb_proc_service.h (psaddr_t): Fix type.
12364 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12365 signature to match glibc.
12366
1de1badb
DE
123672009-12-16 Doug Evans <dje@google.com>
12368
12369 * linux-low.c (linux_read_memory): Fix argument to read.
12370
aeeb81d1
PA
123712009-11-26 Pedro Alves <pedro@codesourcery.com>
12372
12373 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12374 events, don't leave current_inferior pointing at null.
12375
10357975
PA
123762009-11-26 Pedro Alves <pedro@codesourcery.com>
12377
12378 * win32-low.c (LOG): Delete.
12379 (OUTMSG): Output to stderr.
12380 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12381 on compile time LOG macro.
12382 (win32_wait): Fix debug output.
12383
cf6e3471
PA
123842009-11-26 Pedro Alves <pedro@codesourcery.com>
12385
12386 * win32-low.c (win32_add_one_solib): If the dll name is
12387 "ntdll.dll", prepend the system directory to the dll path.
12388
0c85e18e
MK
123892009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12390
12391 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12392
9ac544ce 123932009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12394 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12395
12396 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12397 * configure.ac: Check for __mcoldfire__ and set
12398 gdb_cv_m68k_is_coldfire.
12399 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12400 reg-cf.o and reg-m68k.o.
12401 * configure: Regenerated.
12402
fd7dd3e6
PA
124032009-11-16 Pedro Alves <pedro@codesourcery.com>
12404
12405 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12406 Pass it to thread_db_free.
12407 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12408 proper `detaching' argument to linux_remove_process.
12409 * linux-low.h (thread_db_free): Add `detaching' parameter.
12410 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12411 to thread_db_free.
12412 (thread_db_free): Add `detaching' parameter. Only
12413 call td_ta_clear_event if detaching from process.
12414
75aa492e
MK
124152009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12416
12417 * thread-db.c (thread_db_free): Fix typo.
12418
21e1bee4
PP
124192009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12420
12421 PR gdb/10838
12422 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12423
8838b45e
NS
124242009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12425
12426 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12427 with an i686 compiler.
12428 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12429 needed.
12430 * configure: Rebuilt.
12431
8a35fb51
SL
124322009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12433
12434 PR gdb/10783
12435
12436 * server.c (handle_search_memory_1): Correct read_addr initialization
12437 in loop for searching subsequent chunks.
12438
96f15937
PP
124392009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12440
12441 * configure.ac: New --with-libthread-db option.
12442 * thread-db.c: Allow direct dependence on libthread_db.
12443 (thread_db_free): Adjust.
12444 * config.in: Regenerate.
12445 * configure: Likewise.
889bf7c5 12446
5f7d1694
PP
124472009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12448
12449 PR gdb/10757
12450 * thread-db.c (attach_thread): New function.
12451 (maybe_attach_thread): Return success/failure.
12452 (find_new_threads_callback): Adjust.
889bf7c5
PA
12453 (thread_db_find_new_threads): Loop until no new threads.
12454
88e3b899
PA
124552009-10-13 Pedro Alves <pedro@codesourcery.com>
12456
12457 * proc-service.c (ps_lgetregs): Formatting.
12458
cdbfd419
PP
124592009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12460
12461 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12462 * configure.ac: Adjust.
12463 * linux-low.h (struct process_info_private): Move members to struct
12464 thread_db.
12465 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12466 * linux-low.c (linux_remove_process): Adjust.
12467 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12468 * server.c (handle_query): Move code ...
12469 (handle_monitor_command): ... here. New function.
12470 * target.h (struct target_ops): New member.
12471 * thread-db.c (struct thread_db): New.
12472 (libthread_db_search_path): New variable.
12473 (thread_db_create_event, thread_db_enable_reporting)
12474 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12475 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12476 (try_thread_db_load_1, dladdr_to_soname): New functions.
12477 (try_thread_db_load, thread_db_load_search): New functions.
12478 (thread_db_init): Search for libthread_db.
12479 (thread_db_free): New function.
12480 (thread_db_handle_monitor_command): Likewise.
12481 * config.in: Regenerate.
12482 * configure: Regenerate.
889bf7c5 12483
4168d2d6
UW
124842009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12485
12486 * spu-low.c (spu_kill): Wait for inferior to terminate.
12487 Call clear_inferiors.
12488 (spu_detach): Call clear_inferiors.
12489
81ecdfbb
RW
124902009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12491
12492 * aclocal.m4: Regenerate.
12493 * config.in: Likewise.
12494 * configure: Likewise.
12495
0b9ff2c0
UW
124962009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12497
12498 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12499 (parse_spufs_run): New function.
12500 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12501 (ppc_breakpoint_at): Handle SPU breakpoints.
12502
efcbbd14
UW
125032009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12504
12505 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12506 (SPUFS_MAGIC): Define.
12507 (spu_enumerate_spu_ids): New function.
12508 (linux_qxfer_spu): New function.
12509 (linux_target_ops): Install linux_qxfer_spu.
12510
f4d9bade
UW
125112009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12512
12513 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12514 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12515 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12516 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12517 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12518 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12519 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12520 (init_registers_powerpc_cell32l): Add prototype.
12521 (init_registers_powerpc_cell64l): Likewise.
12522 (ppc_arch_setup): Detect Cell/B.E. architecture.
12523
96e946ca
RW
125242009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12525
12526 * Makefile.in (datarootdir): New variable.
12527
58d6951d
DJ
125282009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12529
12530 * linux-low.c (linux_write_memory): Update debugging output.
12531 * Makefile.in (clean): Add new descriptions.
12532 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12533 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12534 * configure.srv: Add new files for arm*-*-linux*.
12535 * linux-arm-low.c: Add new declarations.
12536 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12537 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12538 (HWCAP_VFPv3D16): New.
12539 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12540 instead of __IWMMXT__.
12541 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12542 (arm_arch_setup): New.
12543 (target_regsets): Remove #ifdef. Add VFP regset.
12544 (the_low_target): Use arm_arch_setup.
12545
12b42a12
DJ
125462009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12547
12548 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12549 the main thread again.
12550
ac8c974e
AR
125512009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12552
12553 Adding Neutrino gdbserver.
12554 * configure: Regenerated.
12555 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12556 * configure.srv (i[34567]86-*-nto*): New target.
12557 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12558 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12559 (nto_comctrl) [__QNX__]: New function.
12560 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12561
4424e0c3 125622009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12563
12564 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12565 srv_tgtobj.
12566
912cf4ba
PA
125672009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12568 Pedro Alves <pedro@codesourcery.com>
12569
12570 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12571 don't support CONTEXT_EXTENDED_REGISTERS.
12572 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12573 (the_low_target): Install them.
12574 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12575 failing with ERROR_PIPE_NOT_CONNECTED.
12576
aa5ca48f
DE
125772009-06-30 Doug Evans <dje@google.com>
12578 Pierre Muller <muller@ics.u-strasbg.fr>
12579
12580 Add h/w watchpoint support to x86-linux, win32-i386.
12581 * Makefile.in (SFILES): Add i386-low.c
12582 (i386_low_h): Define.
12583 (i386-low.o): Add dependencies.
12584 (linux-x86-low.o): Add i386-low.h dependency.
12585 (win32-i386-low.o): Ditto.
12586 * i386-low.c: New file.
12587 * i386-low.h: New file.
12588 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12589 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12590 * linux-low.c (linux_add_process): Initialize arch_private.
12591 (linux_remove_process): Free arch_private.
12592 (add_lwp): Initialize arch_private.
12593 (delete_lwp): Free arch_private.
12594 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12595 provided.
12596 * linux-low.h (process_info_private): New member arch_private.
12597 (lwp_info): New member arch_private.
12598 (linux_target_ops): New members new_process, new_thread,
12599 prepare_to_resume.
12600 (ptid_of): New macro.
12601 * linux-x86-low.c: Include stddef.h, i386-low.h.
12602 (arch_process_info): New struct.
12603 (arch_lwp_info): New struct.
12604 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12605 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12606 (i386_dr_low_get_status): New function.
12607 (x86_insert_point, x86_remove_point): New functions.
12608 (x86_stopped_by_watchpoint): New function.
12609 (x86_stopped_data_address): New function.
12610 (x86_linux_new_process, x86_linux_new_thread): New functions.
12611 (x86_linux_prepare_to_resume): New function.
12612 (the_low_target): Add entries for insert_point, remove_point,
12613 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12614 prepare_to_resume.
12615 * server.c (debug_hw_points): New global.
12616 (monitor_show_help): Document set debug-hw-points.
12617 (handle_query): Process "set debug-hw-points".
12618 * server.h (debug_hw_points): Declare.
12619 (paddress): Declare.
12620 * utils.c (NUMCELLS, CELLSIZE): New macros.
12621 (get_sell, xsnprintf, paddress): New functions.
12622 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12623 remove_point, stopped_by_watchpoint, stopped_data_address.
12624 * win32-i386-low.c: Include i386-low.h.
12625 (debug_reg_state): Replaces dr.
12626 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12627 (i386_dr_low_get_status): New function.
12628 (i386_insert_point, i386_remove_point): New functions.
12629 (i386_stopped_by_watchpoint): New function.
12630 (i386_stopped_data_address): New function.
12631 (i386_initial_stuff): Update.
12632 (get_thread_context,set_thread_context,i386_thread_added): Update.
12633 (the_low_target): Add entries for insert_point,
12634 remove_point, stopped_by_watchpoint, stopped_data_address.
12635 * win32-low.c (win32_insert_watchpoint): New function.
12636 (win32_remove_watchpoint): New function.
12637 (win32_stopped_by_watchpoint): New function.
12638 (win32_stopped_data_address): New function.
12639 (win32_target_ops): Add entries for insert_watchpoint,
12640 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12641 * win32-low.h (win32_target_ops): New members insert_point,
12642 remove_point, stopped_by_watchpoint, stopped_data_address.
12643
d993e290
PA
126442009-06-25 Pedro Alves <pedro@codesourcery.com>
12645
12646 * server.c (process_serial_event): Re-return unsupported, not
12647 error, if the type isn't recognized. Re-allow supporting only
12648 insert or remove packets. Also call require_running for
12649 breakpoints. Add missing break statement to default case. Tidy.
12650 * target.h (struct target_ops): Rename insert_watchpoint to
12651 insert_point, and remove_watchpoint to remove_point.
12652
12653 * linux-low.h (struct linux_target_ops): Likewise.
12654 * linux-low.c (linux_insert_watchpoint): Rename to ...
12655 (linux_insert_point): ... this. Adjust.
12656 (linux_remove_watchpoint): Rename to ...
12657 (linux_remove_point): ... this. Adjust.
12658 (linux_target_ops): Adjust.
12659 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12660 (cris_insert_point): ... this.
12661 (cris_remove_watchpoint): Rename to ...
12662 (cris_remove_point): ... this.
12663 (the_low_target): Adjust.
12664
0f54c268
PM
126652009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12666
12667 * server.c (handle_v_kill): Pass signal_pid to
12668 kill_inferior if multi_process is zero.
12669
c6314022
AR
126702009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12671
12672 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12673 * target.h (target_ops): Comment for *_watchpoint to make it clear
12674 the functions can get types '0' and '1'.
12675
4463ce24
AR
126762009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12677
12678 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12679 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12680 * regcache.c (get_regcache): Likewise.
12681 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12682 * win32-low.c (child_fetch_inferior_registers): Remove check for
12683 regno 0.
12684
cf8fd78b
PA
126852009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12686 Pedro Alves <pedro@codesourcery.com>
12687
12688 * target.h (struct target_ops) <supports_multi_process>: New
12689 callback.
12690 (target_supports_multi_process): New.
12691 * server.c (handle_query): Even if GDB reports support, only
12692 enable multi-process if the target also supports it. Report
12693 multi-process support only if the target backend supports it.
12694 * linux-low.c (linux_supports_multi_process): New function.
12695 (linux_target_ops): Install it as target_supports_multi_process
12696 callback.
12697
47c0c975
DE
126982009-05-24 Doug Evans <dje@google.com>
12699
e09875d4
DE
12700 Global renaming of find_thread_pid to find_thread_ptid.
12701 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12702 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12703 All callers updated.
12704
e27d73f6
DE
12705 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12706 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12707 directly.
12708
47c0c975
DE
12709 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12710 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12711 (linux_resume_one_lwp): Ditto.
12712
2acc282a
DE
127132009-05-23 Doug Evans <dje@google.com>
12714
12715 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12716 from struct inferior_list_entry * to struct lwp_info *.
12717 All callers updated.
12718
9f1036c1
DE
127192009-05-13 Doug Evans <dje@google.com>
12720
12721 * linux-x86-low.c: Don't include assert.h.
12722 (x86_siginfo_fixup): Use fatal, not assert.
12723 (x86_arch_setup): Fix comment.
12724
d0722149
DE
127252009-05-12 Doug Evans <dje@google.com>
12726
12727 Biarch support for i386/amd64 gdbserver.
12728 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12729 Add linux-x86-low.c.
12730 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12731 (linux-x86-low.o): Add.
12732 * linux-x86-64-low.c: Delete.
12733 * linux-i386-low.c: Delete.
12734 * linux-x86-low.c: New file.
12735 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12736 linux-x86-low.o.
12737 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12738 linux-x86-low.o.
12739 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12740 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12741 (linux_child_pid_to_exec_file): New function.
12742 (elf_64_header_p, elf_64_file_p): New functions.
12743 (siginfo_fixup): New function.
12744 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12745 give target a chance to convert layout.
12746 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12747 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12748
fdeb2a12
DE
127492009-05-07 Doug Evans <dje@google.com>
12750
12751 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12752 (regsets_store_inferior_registers): Ditto.
12753
a6dbe5df
PA
127542009-05-06 Pedro Alves <pedro@codesourcery.com>
12755
12756 PR server/10048
12757
12758 * linux-low.c (must_set_ptrace_flags): Delete.
12759 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12760 of the global.
12761 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12762 `lwp->must_set_ptrace_flags' instead.
ba42693b 12763 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12764 (linux_wait_1): ... not here.
12765
5091eb23
DE
127662009-04-30 Doug Evans <dje@google.com>
12767
9f767825
DE
12768 * inferiors.c (started_inferior_callback): New function.
12769 (attached_inferior_callback): New function.
12770 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12771 * server.c (print_started_pid, print_attached_pid): New functions.
12772 (detach_or_kill_for_exit): New function.
12773 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12774 * server.h (have_started_inferiors_p): Declare.
12775 (have_attached_inferiors_p): Declare.
12776
5091eb23
DE
12777 * inferiors.c (remove_process): Fix memory leak, free process.
12778 * linux-low.c (linux_remove_process): New function.
12779 (linux_kill): Call it instead of remove_process.
12780 (linux_detach, linux_wait_1): Ditto.
12781
155c8968
PA
127822009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12783
12784 * configure.srv: Add x86 Windows CE target.
12785
7fe519cb
UW
127862009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12787
12788 * inferiors.c (get_thread_process): Make global.
12789 * server.h (get_thread_process): Add prototype.
12790 * thread-db.c (find_one_thread): Use get_thread_process
12791 instead of current_process.
12792 (thread_db_get_tls_address): Do not crash if called when
12793 thread layer is not yet initialized.
12794
5472f405
UW
127952009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12796
12797 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12798 * spu-low.c (current_tid): Rename to ...
12799 (current_ptid): ... this.
12800 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12801 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12802 ptid_get_lwp (current_ptid) instead of current_tid.
12803 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12804 instead of current_tid. Use find_process_pid to verify pid
12805 argument is valid. Pass proper argument to remove_process.
12806 (spu_thread_alive): Compare current_ptid instead of current_tid.
12807 (spu_resume): Likewise.
12808
55ac2b99
PA
128092009-04-02 Pedro Alves <pedro@codesourcery.com>
12810
12811 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12812 variable.
12813
95954743
PA
128142009-04-01 Pedro Alves <pedro@codesourcery.com>
12815
12816 Implement the multiprocess extensions, and add linux multiprocess
12817 support.
12818
12819 * server.h (ULONGEST): Declare.
12820 (struct ptid, ptid_t): New.
12821 (minus_one_ptid, null_ptid): Declare.
12822 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12823 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12824 (struct inferior_list_entry): Change `id' type from unsigned from
12825 to ptid_t.
12826 (struct sym_cache, struct breakpoint, struct
12827 process_info_private): Forward declare.
12828 (struct process_info): Declare.
12829 (current_process): Declare.
12830 (all_processes): Declare.
12831 (initialize_inferiors): Declare.
12832 (add_thread): Adjust to use ptid_t.
12833 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12834 (add_process, remove_process, find_thread_pid): Declare.
12835 (find_inferior_id): Adjust to use ptid_t.
12836 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12837 (multi_process): Declare.
12838 (push_event): Adjust to use ptid_t.
12839 (read_ptid, write_ptid): Declare.
12840 (prepare_resume_reply): Adjust to use ptid_t.
12841 (clear_symbol_cache): Declare.
12842 * inferiors.c (all_processes): New.
12843 (null_ptid, minus_one_ptid): New.
12844 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12845 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12846 (add_thread): Change unsigned long to ptid. Remove gdb_id
12847 parameter. Adjust.
12848 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12849 (gdb_id_to_thread): Rename to ...
12850 (find_thread_pid): ... this. Change unsigned long to ptid.
12851 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12852 (loaded_dll, pull_pid_from_list): Adjust.
12853 (add_process, remove_process, find_process_pid)
12854 (get_thread_process, current_process, initialize_inferiors): New.
12855 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12856 (struct target_waitstatus) <related_pid>: Ditto.
12857 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12858 return type to int.
12859 (struct target_ops) <join>: Add `pid' argument.
12860 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12861 (struct target_ops) <wait>: Add `ptid' field. Change return type
12862 to ptid.
12863 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12864 (mywait): Add `ptid' argument. Change return type to ptid_t.
12865 (target_pid_to_str): Declare.
12866 * target.c (set_desired_inferior): Adjust to use ptids.
12867 (mywait): Add new `ptid' argument. Adjust.
12868 (target_pid_to_str): New.
12869 * mem-break.h (free_all_breakpoints): Declare.
12870 * mem-break.c (breakpoints): Delelete.
12871 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12872 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12873 to use per-process breakpoint list.
12874 (free_all_breakpoints): New.
12875 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12876 (symbol_cache, all_symbols_looked_up): Delete.
12877 (hexchars): New.
12878 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12879 read_ptid): New.
12880 (prepare_resume_reply): Change ptid argument's type from unsigned
12881 long to ptid_t. Adjust. Implement W;process and X;process.
12882 (free_sym_cache, clear_symbol_cache): New.
12883 (look_up_one_symbol): Adjust to per-process symbol cache. *
12884 * server.c (cont_thread, general_thread, step_thread): Change type
12885 to ptid_t.
12886 (attached): Delete.
12887 (multi_process): New.
12888 (last_ptid): Change type to ptid_t.
12889 (struct vstop_notif) <ptid>: Change type to ptid_t.
12890 (queue_stop_reply, push_event): Change `ptid' argument's type to
12891 ptid_t.
12892 (discard_queued_stop_replies): Add `pid' argument.
12893 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12894 changes. Don't reference the `attached' global.
12895 (attach_inferior): Adjust to mywait interface changes.
12896 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12897 features. Handle and report "multiprocess+". Handle
12898 "qAttached:PID".
12899 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12900 changes.
12901 (handle_v_kill): New.
12902 (handle_v_stopped): Adjust to use target_pid_to_str.
12903 (handle_v_requests): Allow multiple attaches and runs when
12904 multiprocess extensions are in effect. Handle "vKill".
12905 (myresume): Adjust to use ptids.
12906 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12907 (handle_status): Adjust to discard_queued_stop_replies interface
12908 change.
12909 (first_thread_of, kill_inferior_callback)
12910 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12911 (main): Call initialize_inferiors. Adjust to use ptids, killing
12912 and detaching from all inferiors. Handle multiprocess packet
12913 variants.
12914 * linux-low.h: Include gdb_proc_service.h.
12915 (struct process_info_private): New.
12916 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12917 <lwpid_of>: Use ptid_get_lwp.
12918 (get_lwp_thread): Adjust.
12919 (struct lwp_info): Add `dead' member.
12920 (find_lwp_pid): Declare.
12921 * linux-low.c (thread_db_active): Delete.
12922 (new_inferior): Adjust comment.
12923 (inferior_pid): Delete.
12924 (linux_add_process): New.
12925 (handle_extended_wait): Adjust.
12926 (add_lwp): Change unsigned long to ptid.
12927 (linux_create_inferior): Add process to processes table. Adjust
12928 to use ptids. Don't set new_inferior here.
12929 (linux_attach_lwp): Rename to ...
12930 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12931 it. Adjust to use ptids.
12932 (linux_attach_lwp): New.
12933 (linux_attach): Add process to processes table. Don't set
12934 new_inferior here.
12935 (struct counter): New.
12936 (second_thread_of_pid_p, last_thread_of_process_p): New.
12937 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12938 multiple processes.
12939 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12940 processes. Remove process from process table.
12941 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12942 to multiple processes.
12943 (any_thread_of): New.
12944 (linux_detach): Add `pid' argument, and handle it. Remove process
12945 from processes table.
12946 (linux_join): Add `pid' argument. Handle it.
12947 (linux_thread_alive): Change unsighed long argument to ptid_t.
12948 Consider dead lwps as not being alive.
12949 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12950 threads we're not interested in.
12951 (same_lwp, find_lwp_pid): New.
12952 (linux_wait_for_lwp): Change `pid' argument's type from int to
12953 ptid_t. Adjust.
12954 (linux_wait_for_event): Rename to ...
12955 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12956 from int to ptid_t. Adjust.
12957 (linux_wait_for_event): New.
12958 (linux_wait_1): Add `ptid' argument. Change return type to
12959 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12960 that exit from the process table.
12961 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12962 Adjust.
12963 (mark_lwp_dead): New.
12964 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12965 stopping all threads, mark its main lwp as dead.
12966 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12967 ptids.
12968 (fetch_register, usr_store_inferior_registers)
12969 (regsets_fetch_inferior_registers)
12970 (regsets_store_inferior_registers, linux_read_memory)
12971 (linux_write_memory): Inline `inferior_pid'.
12972 (linux_look_up_symbols): Adjust to use per-process
12973 `thread_db_active'.
12974 (linux_request_interrupt): Adjust to use ptids.
12975 (linux_read_auxv): Inline `inferior_pid'.
12976 (initialize_low): Don't reference thread_db_active.
12977 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12978 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12979 (ps_getpid): Return the pid of the current inferior.
12980 * thread-db.c (proc_handle, thread_agent): Delete.
12981 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12982 per-process data.
12983 (find_one_thread): Change argument type to ptid_t. Adjust to
12984 per-process data.
12985 (maybe_attach_thread): Adjust to per-process data and ptids.
12986 (thread_db_find_new_threads): Ditto.
12987 (thread_db_init): Ditto.
12988 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12989 processes table. Adjust to use ptids.
12990 (spu_kill, spu_detach): Adjust interface. Remove process from
12991 processes table.
12992 (spu_join, spu_thread_alive): Adjust interface.
12993 (spu_wait): Adjust interface. Remove process from processes
12994 table. Adjust to use ptids.
12995 * win32-low.c (current_inferior_tid): Delete.
12996 (current_inferior_ptid): New.
12997 (debug_event_ptid): New.
12998 (thread_rec): Take a ptid. Adjust.
12999 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13000 (child_delete_thread): Ditto.
13001 (do_initial_child_stuff): Add `attached' argument. Add process to
13002 processes table.
13003 (child_fetch_inferior_registers, child_store_inferior_registers):
13004 Adjust.
13005 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13006 (win32_attach): Pass 1 to do_initial_child_stuff.
13007 (win32_kill): Adjust interface. Remove process from processes
13008 table.
13009 (win32_detach): Ditto.
13010 (win32_join): Adjust interface.
13011 (win32_thread_alive): Take a ptid.
13012 (win32_resume): Adjust to use ptids.
13013 (get_child_debug_event): Ditto.
13014 (win32_wait): Adjust interface. Remove exiting process from
13015 processes table.
13016
bd99dc85
PA
130172009-04-01 Pedro Alves <pedro@codesourcery.com>
13018
13019 Non-stop mode support.
13020
13021 * server.h (non_stop): Declare.
13022 (gdb_client_data, handler_func): Declare.
13023 (delete_file_handler, add_file_handler, start_event_loop):
13024 Declare.
13025 (handle_serial_event, handle_target_event, push_event)
13026 (putpkt_notif): Declare.
13027 * target.h (enum resume_kind): New.
13028 (struct thread_resume): Replace `step' field by `kind' field.
13029 (TARGET_WNOHANG): Define.
13030 (struct target_ops) <wait>: Add `options' argument.
13031 <supports_non_stop, async, start_non_stop>: New fields.
13032 (target_supports_non_stop, target_async): New.
13033 (start_non_stop): Declare.
13034 (mywait): Add `options' argument.
13035 * target.c (mywait): Add `options' argument. Print child exit
13036 notifications here.
13037 (start_non_stop): New.
13038 * server.c (non_stop, own_buf, mem_buf): New globals.
13039 (struct vstop_notif): New.
13040 (notif_queue): New global.
13041 (queue_stop_reply, push_event, discard_queued_stop_replies)
13042 (send_next_stop_reply): New.
13043 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13044 interface changes.
13045 (attach_inferior): In non-stop mode, don't wait for the target
13046 here.
13047 (handle_general_set): Handle QNonStop.
13048 (handle_query): When handling qC, return the current general
13049 thread, instead of the first thread of the list.
13050 (handle_query): If the backend supports non-stop mode, include
13051 QNonStop+ in the qSupported query response.
13052 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13053 and non-stop mode.
13054 (handle_v_attach, handle_v_run): Handle non-stop mode.
13055 (handle_v_stopped): New.
13056 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13057 (myresume): Adjust to use resume_kind. Handle non-stop.
13058 (queue_stop_reply_callback): New.
13059 (handle_status): Handle non-stop mode.
13060 (main): Clear non_stop flag on reconnection. Use the event-loop.
13061 Refactor serial protocol handling from here ...
13062 (process_serial_event): ... to this new function. When GDB
13063 selects any thread, select one here. In non-stop mode, wait until
13064 GDB acks all pending events before exiting.
13065 (handle_serial_event, handle_target_event): New.
13066 * remote-utils.c (remote_open): Install remote_desc in the event
13067 loop.
13068 (remote_close): Remove remote_desc from the event loop.
13069 (putpkt_binary): Rename to...
13070 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13071 (putpkt_binary): New as wrapper around putpkt_binary_1.
13072 (putpkt_notif): New.
13073 (prepare_resume_reply): In non-stop mode, don't change the
13074 general_thread.
13075 * event-loop.c: New.
13076 * Makefile.in (OBJ): Add event-loop.o.
13077 (event-loop.o): New rule.
13078
13079 * linux-low.h (pid_of): Moved here.
13080 (lwpid_of): New.
13081 (get_lwp_thread): Use lwpid_of.
13082 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13083 * linux-low.c (pid_of): Delete.
13084 (inferior_pid): Use lwpid_of.
13085 (linux_event_pipe): New.
13086 (target_is_async_p): New.
13087 (delete_lwp): New.
13088 (handle_extended_wait): Use lwpid_of.
13089 (add_lwp): Don't set lwpid field.
13090 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13091 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13092 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13093 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13094 first. Adjust to linux_wait_for_event interface changes. Use
13095 lwpid_of.
13096 (linux_detach): Don't delete the main lwp here.
13097 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13098 (status_pending_p): Don't consider explicitly suspended lwps.
13099 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13100 pointer. Add OPTIONS argument. Change return type to int. Use
13101 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13102 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13103 pointer. Add status pointer argument. Return a pid instead of a
13104 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13105 changes. In non-stop mode, don't switch to a random thread.
13106 (linux_wait): Rename to...
13107 (linux_wait_1): ... this. Add target_options argument, and handle
13108 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13109 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13110 clean exit and signal exit code. Don't stop all threads in
13111 non-stop mode. In all-stop mode, only stop all threads when
13112 reporting a stop to GDB. Handle explicit thread stop requests.
13113 (async_file_flush, async_file_mark): New.
13114 (linux_wait): New.
13115 (send_sigstop): Use lwpid_of.
13116 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13117 interface changes. In non-stop mode, don't switch to a random
13118 thread.
13119 (linux_resume_one_lwp): Use lwpid_of.
13120 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13121 (linux_resume_one_thread): ... this. Handle resume_stop. In
13122 non-stop mode, don't look for pending flag in all threads.
13123 (resume_status_pending_p): Don't consider explicitly suspended
13124 threads.
13125 (my_waitpid): Reimplement. Emulate __WALL.
13126 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13127 Use lwpid_of.
13128 (sigchld_handler, linux_supports_non_stop, linux_async)
13129 (linux_start_non_stop): New.
13130 (linux_target_ops): Register linux_supports_non_stop, linux_async
13131 and linux_start_non_stop.
13132 (initialize_low): Install SIGCHLD handler.
13133 * thread-db.c (thread_db_create_event, find_one_thread)
13134 (thread_db_get_tls_address): Use lwpid_of.
13135 * win32-low.c (win32_detach): Adjust to use resume_kind.
13136 (win32_wait): Add `options' argument.
13137 * spu-low.c (spu_resume): Adjust to use resume_kind.
13138 (spu_wait): Add `options' argument.
13139
5b1c542e
PA
131402009-04-01 Pedro Alves <pedro@codesourcery.com>
13141
13142 Decouple target code from remote protocol.
13143
13144 * target.h (enum target_waitkind): New.
13145 (struct target_waitstatus): New.
13146 (struct target_ops) <wait>: Return an unsigned long. Take a
13147 target_waitstatus pointer instead of a char pointer.
13148 (mywait): Likewise.
13149 * target.c (mywait): Change prototype to return an unsigned long.
13150 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13151 * server.h (thread_from_wait, old_thread_from_wait): Delete
13152 declarations.
13153 (prepare_resume_reply): Change prototype to take a
13154 target_waitstatus.
13155 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13156 (last_status, last_ptid): New.
13157 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13158 pid instead of a signal.
13159 (attach_inferior): Remove "status" and "signal" parameters.
13160 Adjust.
13161 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13162 not as an address.
13163 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13164 (handle_v_requests, myresume): Remove "status" and "signal"
13165 parameters. Adjust.
13166 (handle_status): New.
13167 (main): Delete local `status'. Adjust.
13168 * remote-utils.c: Include target.h.
13169 (prepare_resume_reply): Change prototype to take a
13170 target_waitstatus. Adjust.
13171
13172 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13173 interface.
13174 * spu-low.c (spu_wait): Adjust.
13175 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13176 Delete.
13177 (win32_wait): Adjust.
13178
2bd7c093
PA
131792009-04-01 Pedro Alves <pedro@codesourcery.com>
13180
13181 * target.h (struct thread_resume): Delete leave_stopped member.
13182 (struct target_ops): Add a `n' argument to the `resume' callback.
13183 * server.c (start_inferior): Adjust.
13184 (handle_v_cont, myresume): Adjust.
13185 * linux-low.c (check_removed_breakpoint): Adjust to resume
13186 interface change, and to removed leave_stopped field.
13187 (resume_ptr): Delete.
13188 (struct thread_resume_array): New.
13189 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13190 resume interface change.
13191 (linux_continue_one_thread, linux_queue_one_thread)
13192 (resume_status_pending_p): Check if the resume field is NULL
13193 instead of checking the leave_stopped member.
13194 (linux_resume): Adjust to the target resume interface change.
13195 * spu-low.c (spu_resume): Adjust to the target resume interface
13196 change.
13197 * win32-low.c (win32_detach, win32_resume): Ditto.
13198
c35fafde
PA
131992009-04-01 Pedro Alves <pedro@codesourcery.com>
13200
13201 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13202 flag.
13203 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13204 pending.
13205 (linux_continue_one_thread): Only preserve the stepping flag if
13206 there's a pending breakpoint.
13207
0a59d50b
PA
132082009-03-31 Pedro Alves <pedro@codesourcery.com>
13209
13210 * server.c (main): After the inferior having exited, call
13211 remote_close before exiting gdbserver.
13212
f04c6d38
TJB
132132009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13214
13215 Fix size of FPSCR in Power 7 processors.
13216 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13217 (PPC_FEATURE_HAS_DFP): New #define.
13218 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13219 size of the FPSCR.
13220
78e5cee6
PA
132212009-03-23 Pedro Alves <pedro@codesourcery.com>
13222
13223 * server.c (handle_query) Whitespace and formatting.
13224
1b3f6016
PA
132252009-03-22 Pedro Alves <pedro@codesourcery.com>
13226
13227 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13228 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13229 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13230 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13231 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13232 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13233 Makefile.in, configure.ac: Fix whitespace throughout.
13234 * configure: Regenerate.
13235
a07b2135
PA
132362009-03-22 Pedro Alves <pedro@codesourcery.com>
13237
13238 * inferiors.c (find_inferior): Make it safe for the callback
13239 function to delete the currently iterated inferior.
13240
67cc2626
PA
132412009-03-22 Pedro Alves <pedro@codesourcery.com>
13242
13243 * Makefile.in (linuw_low_h): Move higher.
13244 (thread-db.o): Depend on $(linux_low_h).
13245
54a0b537
PA
132462009-03-17 Pedro Alves <pedro@codesourcery.com>
13247
13248 Rename "process" to "lwp" throughout.
13249
13250 * linux-low.c (all_processes): Rename to...
13251 (all_lwps): ... this.
13252 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13253 (add_process): Rename to ...
13254 (add_lwp): ... this. Adjust.
13255 (linux_create_inferior): Adjust.
13256 (linux_attach_lwp): Adjust.
13257 (linux_attach): Adjust.
13258 (linux_kill_one_process): Rename to ...
13259 (linux_kill_one_lwp): ... this. Adjust.
13260 (linux_kill): Adjust.
13261 (linux_detach_one_process): Rename to ...
13262 (linux_detach_one_lwp): ... this. Adjust.
13263 (linux_detach): Adjust.
13264 (check_removed_breakpoint): Adjust.
13265 (status_pending_p): Adjust.
13266 (linux_wait_for_process): Rename to ...
13267 (linux_wait_for_lwp): ... this. Adjust.
13268 (linux_wait_for_event): Adjust.
13269 (send_sigstop): Adjust.
13270 (wait_for_sigstop): Adjust.
13271 (stop_all_processes): Rename to ...
13272 (stop_all_lwps): ... this.
13273 (linux_resume_one_process): Rename to ...
13274 (linux_resume_one_lwp): ... this. Adjust.
13275 (linux_set_resume_request, linux_continue_one_thread)
13276 (linux_queue_one_thread, resume_status_pending_p)
13277 (usr_store_inferior_registers, regsets_store_inferior_registers)
13278 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13279 Adjust.
13280 * linux-low.h (get_process): Rename to ...
13281 (get_lwp): ... this. Adjust.
13282 (get_thread_process): Rename to ...
13283 (get_thread_lwp): ... this. Adjust.
13284 (get_process_thread): Rename to ...
13285 (get_lwp_thread): ... this. Adjust.
13286 (struct process_info): Rename to ...
13287 (struct lwp_info): ... this.
13288 (all_processes): Rename to ...
13289 (all_lwps): ... this.
13290 * proc-service.c (ps_lgetregs): Adjust.
13291 * thread-db.c (thread_db_create_event, find_one_thread)
13292 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13293
0b16c5cf
PA
132942009-03-14 Pedro Alves <pedro@codesourcery.com>
13295
13296 * server.c (handle_query): Handle "qAttached".
13297
32de4b9d
NS
132982009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13299
13300 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13301 GPLv3, update license URL.
13302
2aecd87f
DE
133032009-03-01 Doug Evans <dje@google.com>
13304
93efd302 13305 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13306 (server_h): Add gdb_signals.h.
13307 (signals.o): Update.
13308 * server.h (target_signal_from_host,target_signal_to_host_p)
13309 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13310
86b1f9c5
PM
133112009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13312
13313 * remote-utils.c (getpkt): Also generate remote-debug
13314 information if noack_mode is set.
13315
4aa995e1
PA
133162009-02-06 Pedro Alves <pedro@codesourcery.com>
13317
13318 * server.c (handle_query): Report qXfer:siginfo:read and
13319 qXfer:siginfo:write as supported and handle them.
13320 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13321 * linux-low.c (linux_xfer_siginfo): New.
13322 (linux_target_ops): Set it.
13323
62709adf
PA
133242009-01-26 Pedro Alves <pedro@codesourcery.com>
13325
13326 * server.c (gdbserver_usage): Mention --remote-debug.
13327 (main): Accept '--remote-debug' switch.
13328
aef93bd7
DE
133292009-01-18 Doug Evans <dje@google.com>
13330
13331 * regcache.c (new_register_cache): No need to check result of xcalloc.
13332 * server.c (handle_search_memory): Back out calls to xmalloc,
13333 result is checked and error is returned to user upon failure.
13334 (handle_query): Ditto. Add more checks for result of malloc.
13335 (handle_v_cont): Check result of malloc, report error back to
13336 user upon failure.
13337 (handle_v_run): Ditto. Call freeargv.
13338 * server.h (freeargv): Declare.
13339 * utils.c (freeargv): New fn.
13340
54363045
DE
133412009-01-15 Doug Evans <dje@google.com>
13342
f626972c
DE
13343 * gdbreplay.c (perror_with_name): Make arg const char *.
13344 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13345 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13346 * utils.c (perror_with_name): Make arg const char *.
54363045 13347
18aae699
PA
133482009-01-14 Pedro Alves <pedro@codesourcery.com>
13349
13350 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13351 when handling a EXIT_PROCESS_DEBUG_EVENT.
13352
ff703abe
JB
133532009-01-06 Joel Brobecker <brobecker@adacore.com>
13354
13355 * gdbreplay.c (gdbreplay_version): Update copyright year.
13356 * server.c (gdbserver_version): Likewise.
13357
f21cc1a2 133582009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13359
13360 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13361 (handle_extended_wait): Improve comment.
0e21c1ec 13362
bca929d3
DE
133632008-12-13 Doug Evans <dje@google.com>
13364
13365 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13366 * server.h (ATTR_MALLOC): New macro.
13367 (xmalloc,xcalloc,xstrdup): Declare.
13368 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13369 * inferiors.c: Ditto.
13370 * linux-low.c: Ditto.
13371 * mem-break.c: Ditto.
13372 * regcache.c: Ditto.
13373 * remote-utils.c: Ditto.
13374 * server.c: Ditto.
13375 * target.c: Ditto.
13376 * win32-low.c: Ditto.
13377
97438e3f
DE
133782008-12-12 Doug Evans <dje@google.com>
13379
896c7fbb
DE
13380 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13381 in debugging printf.
13382
97438e3f
DE
13383 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13384
e3b886f8
DE
133852008-12-09 Doug Evans <dje@google.com>
13386
13387 * linux-low.h (struct process_info): Delete member tid, unused.
13388 * thread-db.c (find_one_thread): Update.
13389 (maybe_attach_thread): Update.
13390
07e059b5
VP
133912008-12-02 Pedro Alves <pedro@codesourcery.com>
13392
889bf7c5
PA
13393 * target.h (struct target_ops): Add qxfer_osdata member.
13394 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13395 and dirent.h.
13396 (linux_qxfer_osdata): New functions.
13397 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13398 callback.
13399 * server.c (handle_query): Handle "qXfer:osdata:read:".
13400 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13401 (buffer_xml_printf): New functions.
13402 * server.h (struct buffer): New.
13403 (buffer_grow_str, buffer_grow_str0): New macros.
13404 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13405 (buffer_xml_printf): Declare.
07e059b5 13406
4cab47ab
DE
134072008-11-24 Doug Evans <dje@google.com>
13408
13409 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13410
f142445f
DJ
134112008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13412
13413 * server.c (handle_v_run): Always use the supplied argument list.
13414
d0107bb6 134152008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13416
d0107bb6
BW
13417 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13418 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13419
2c4ad781
TJB
134202008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13421
13422 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13423 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13424 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13425 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13426 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13427 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13428 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13429 XML target descriptions.
13430 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13431 when inferior is running on an ISA 2.05 or later processor. Add
13432 special case to return offset for full 64-bit slot of FPSCR when
13433 in 32-bits.
13434
dfb64f85
DJ
134352008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13436
13437 * Makefile.in (SFILES, clean): Added sparc64 files.
13438 (reg-sparc64.o, reg-sparc64.c): New.
13439 * configure.srv (sparc*-*-linux*): New configuration.
13440 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13441 syscall arguments for SPARC.
13442 (regsets_store_inferior_registers): Likewise.
13443 * linux-sparc-low.c: New file.
13444
66b6e1dd
DE
134452008-10-21 Doug Evans <dje@google.com>
13446
13447 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13448 (READLINE_DIR,READLINE_DEP): Delete.
13449 (INTERNAL_CFLAGS): Update.
13450 (LINTFLAGS): Update.
13451
9b710a42
PA
134522008-10-10 Pedro Alves <pedro@codesourcery.com>
13453
13454 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13455 whole argv from the last run, not just argv[0].
13456
5822d809
PA
134572008-09-08 Pedro Alves <pedro@codesourcery.com>
13458
13459 * regcache.c (new_register_cache): Return NULL if the register
13460 cache size isn't known yet.
13461 (free_register_cache): Avoid dereferencing a NULL regcache.
13462
74aac56f
DJ
134632008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13464
13465 * configure.srv: Merge MIPS and MIPS64.
13466
400b20f5
MR
134672008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13468
13469 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13470
677c5bb1
LM
134712008-08-18 Luis Machado <luisgpm@br.ibm.com>
13472
13473 * Makefile.in: Add required vsx dependencies.
13474
13475 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13476 Declare init_registers_powerpc_vsx32l.
13477 Declare init_registers_powerpc_vsx64l.
13478 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13479 (ppc_arch_setup): Check for VSX in hwcap.
13480 (ppc_fill_vsxregset): New function.
13481 (ppc_store_vsxregset): New function.
13482 Add new VSX entry in regset_info target_regsets.
13483
13484 * configure.srv: Add new VSX dependencies.
13485
a6f3e723
SL
134862008-08-12 Pedro Alves <pedro@codesourcery.com>
13487
13488 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13489 (remote_open): Set or clear transport_is_reliable.
13490 (putpkt_binary): Don't expect acks in noack mode.
13491 (getpkt): Don't send ack/nac in noack mode.
13492 * server.c (handle_general_set): Handle QStartNoAckMode.
13493 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13494 qSupported.
13495 (main): Reset noack_mode on every connection.
13496 * server.h (noack_mode): Declare.
13497
a417dc56
RW
134982008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13499
13500 * Makefile.in (GDBREPLAY_OBS): New variable.
13501 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13502
3221518c
UW
135032008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13504 Daniel Jacobowitz <dan@codesourcery.com>
13505
13506 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13507 (usr_store_inferior_registers): Likewise.
13508 (regsets_store_inferior_registers): Likewise.
13509
ec56be1b
PA
135102008-07-31 Rolf Jansen <rj@surtec.com>
13511 Pedro Alves <pedro@codesourcery.com>
13512
13513 * configure.ac: Check for memmem declaration.
13514 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13515 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13516 (disable_packet_qfThreadInfo): Unconditionally compile.
13517 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13518 * configure, config.in: Regenerate.
13519
2fe5e3ff
DE
135202008-07-28 Doug Kwan <dougkwan@google.com>
13521
13522 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13523 (linux_write_memory): Remove declaration of errno.
13524
836acd6d
UW
135252008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13526
13527 * linux-low.c (handle_extended_wait): Do not use "status"
13528 variable uninitialized.
13529
aeba519e
PA
135302008-07-07 Pedro Alves <pedro@codesourcery.com>
13531
13532 * server.c (handle_v_attach): Inhibit reporting dll changes.
13533
db42f210
PA
135342008-06-27 Pedro Alves <pedro@codesourcery.com>
13535
13536 * remote-utils.c (prepare_resume_reply): If requested, don't
13537 output "thread:TID" in the T stop reply.
13538
13539 * server.c (disable_packet_vCont, disable_packet_Tthread)
13540 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13541 (handle_query): If requested, disable support for qC, qfThreadInfo
13542 and qsThreadInfo.
13543 (handle_v_requests): If requested, disable support for vCont.
13544 (gdbserver_show_disableable): New.
13545 (main): Handle --disable-packet and --disable-packet=LIST.
13546
13547 * server.h (disable_packet_vCont, disable_packet_Tthread)
13548 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13549
8e4c5421
CD
135502008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13551
13552 * server.c (gdbserver_usage): Mention --version.
13553
6e23a804
DJ
135542008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13555
13556 * Makefile.in (gdbreplay.o): New rule.
13557
90aa6a40
JM
135582008-06-06 Joseph Myers <joseph@codesourcery.com>
13559
13560 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13561 message, not gdbserver.
13562
c16158bc 135632008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13564 Nathan Sidwell <nathan@codesourcery.com>
13565 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13566
13567 * acinclude.m4: Include ../../config/acx.m4.
13568 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13569 * configure, config.in: Regenerate.
13570 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13571 * server.c (gdbserver_version): Print PKGVERSION.
13572 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13573 (main): Adjust gdbserver_usage calls.
13574 * gdbreplay.c (version, host_name): Add declarations.
13575 (gdbreplay_version, gdbreplay_usage): New.
13576 (main): Accept --version and --help options.
13577
aeb75bf5
DJ
135782008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13579
13580 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13581 (arm_breakpoint_at): Handle Thumb.
13582 (the_low_target): Add comment.
13583
76b233dd
UW
135842008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13585
13586 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13587
08388c79
DE
135882008-05-09 Doug Evans <dje@google.com>
13589
a3c83fae
DE
13590 * server.h (decode_search_memory_packet): Declare.
13591 * remote-utils.c (decode_search_memory_packet): New fn.
13592 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13593 (handle_search_memory): New fn.
13594 (handle_query): Process qSearch:memory packets.
13595
bb9c3d36
UW
135962008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13597
13598 * regcache.c (registers_length): Remove.
13599 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13600 full register packet.
13601 * regcache.h (registers_length): Remove prototype.
13602 * server.h (PBUFSIZ): Define to 16384.
13603
7284e1be
UW
136042008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13605
13606 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13607 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13608 powerpc-64l.o, and powerpc-altivec64l.o.
13609 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13610 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13611 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13612 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13613 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13614 to srv_xmlfiles.
13615
13616 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13617 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13618 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13619 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13620 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13621 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13622 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13623 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13624 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13625 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13626 (clean): Update.
13627
13628 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13629 (init_registers_powerpc_32l): ... this new prototype.
13630 (init_registers_powerpc_32): Remove, replace by ...
13631 (init_registers_powerpc_altivec32l): ... this new prototype.
13632 (init_registers_powerpc_e500): Remove, replace by ...
13633 (init_registers_powerpc_e500l): ... this new prototype.
13634 (init_registers_ppc64): Remove, replace by ...
13635 (init_registers_powerpc_64l): ... this new prototype.
13636 (init_registers_powerpc_64): Remove, replace by ...
13637 (init_registers_powerpc_altivec64l): ... this new prototype.
13638 (ppc_num_regs): Set to 73.
13639 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13640 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13641 (ppc_cannot_store_register): Handle orig_r3 and trap.
13642 (ppc_arch_setup): Update init_registers_... calls.
13643 (ppc_fill_gregset): Handle orig_r3 and trap.
13644
13645 * inferiors.c (clear_inferiors): Reset current_inferior.
13646
fdc59709
PB
136472008-04-23 Paolo Bonzini <bonzini@gnu.org>
13648
889bf7c5
PA
13649 * acinclude.m4: Add override.m4.
13650 * configure: Regenerate.
fdc59709 13651
c9b2f845
UW
136522008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13653
13654 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13655 initial call to init_register_ppc64.
13656
550512b8
UW
136572008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13658
43aaf8b6
PA
13659 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13660 single powerpc*-*-linux* case.
550512b8
UW
13661 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13662
b6430ec3
UW
136632008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13664
13665 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13666 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13667 from reg_xmlfiles.
13668 * linux-ppc-low.c: Include <elf.h>.
13669 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13670 (ppc_hwcap): New global variable.
13671 (ppc_regmap): Remove __SPE__ #ifdef sections.
13672 (ppc_regmap_e500): New global variable.
13673 (ppc_cannot_store_register): Update __SPE__ special case.
13674 (ppc_get_hwcap): New function.
13675 (ppc_arch_setup): Use it to determine whether inferior supports
13676 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13677 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13678 Do not access registers if target does not support AltiVec.
13679 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13680 Do not access registers if target does not support SPE.
13681 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13682
52fa2412
UW
136832008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13684
13685 * linux-low.c (disabled_regsets, num_regsets): New.
13686 (use_regsets_p): Delete.
13687 (linux_wait_for_process): Clear disabled_regsets.
13688 (regsets_fetch_inferior_registers): Check and set it.
13689 (regsets_store_inferior_registers): Likewise.
13690 (linux_fetch_registers, linux_store_registers): Do not use
13691 use_regsets_p.
13692 (initialize_low): Allocate disabled_regsets.
13693
e28b3332
DJ
136942008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13695
13696 * Makefile.in (LIBOBJS): New.
13697 (OBS): Use LIBOBJS.
13698 (memmem.o): New rule.
13699 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13700 * configure: Regenerated.
13701
4536995d
UW
137022008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13703
13704 * server.c (handle_query): Never return "unsupported" for
13705 qXfer:features:read queries.
13706
221c031f
UW
137072008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13708
13709 * server.c (get_features_xml): Fix inverted condition.
13710 (handle_query): Always support qXfer:feature:read.
13711
ccd213ac
DJ
137122008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13713
13714 * server.c (wrapper_argv): New.
13715 (start_inferior): Handle wrapper_argv. If set, expect an extra
13716 trap.
13717 (gdbserver_usage): Document --wrapper.
13718 (main): Parse --wrapper.
13719
6fe305f7
UW
137202008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13721
13722 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13723 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13724 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13725 (ppc_set_pc): Likewise.
13726 (ppc_arch_setup): New function.
13727 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13728 of collect_register.
889bf7c5 13729 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13730
5b0a002e
UW
137312008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13732
13733 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13734 instead of linux-ppc64-low.o.
13735 * linux-ppc64-low.c: Remove file.
13736 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13737 (linux-ppc64-low.o): Remove rule.
13738
13739 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13740 (init_registers_powerpc_64): Likewise.
13741 (ppc_regmap): Conditionally define depending on __powerpc64__.
13742 (ppc_cannot_store_register): Do not special-case "fpscr" when
13743 compiled on __powerpc64__.
13744 (ppc_collect_ptrace_register): New function.
13745 (ppc_supply_ptrace_register): New function.
13746 (ppc_breakpoint): Change type to "unsigned int".
13747 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13748 (the_low_target): Conditionally provide initializers for the
889bf7c5 13749 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13750 collect_ptrace_register and supply_ptrace_register members.
13751
9b4b61c8
UW
137522008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13753
13754 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13755 * server.c (gdbserver_xmltarget): Define.
13756 (get_features_xml): Use it to replace "target.xml" and arch_string.
13757
13758 * configure.srv: Remove srv_xmltarget. Add XML files that were
13759 mentioned there to srv_xmlfiles instead. Remove conditional tests
13760 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13761 srv_xmlfiles and srv_regobj to include all possible choices.
13762 * configure.ac (srv_xmltarget): Remove.
13763 (srv_xmlfiles): Do not add "target.xml".
13764 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13765 checks for supplementary target information.
13766 * configure: Regenerate.
13767 * Makefile.in (XML_TARGET): Remove.
13768 (target.xml): Remove rule.
13769 (clean): Do not clean up target.xml.
13770 (.PRECIOUS): Do not mention target.xml.
13771
13772 * target.h (struct target_ops): Remove arch_string member.
13773 * linux-low.c (linux_arch_string): Remove.
13774 (linux_target_ops): Remove arch_string initializer.
13775 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13776 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13777 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13778 * spu-low.c (spu_arch_string): Remove.
13779 (spu_target_ops): Remove arch_string initializer.
13780 * win32-low.c (win32_arch_string): Remove.
13781 (win32_target_ops): Remove arch_string initializer.
13782 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13783 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13784 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13785
ee1a7ae4
UW
137862008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13787
13788 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13789 by collect_ptrace_register and supply_ptrace_register hooks.
13790 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13791 instead of checking for the_low_target.left_pad_xfer.
13792 (usr_store_inferior_registers): Use collect_ptrace_register callback
13793 instead of checking for the_low_target.left_pad_xfer.
13794
13795 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13796 (s390_supply_ptrace_register): Likewise.
13797 (s390_fill_gregset): Call s390_collect_ptrace_register.
13798 (the_low_target): Update.
13799
13800 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13801 (ppc_supply_ptrace_register): Likewise.
13802 (the_low_target): Update.
13803
13804 * linux-i386-low.c (the_low_target): Update.
13805 * linux-x86-64-low.c (the_low_target): Update.
13806
d61ddec4
UW
138072008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13808
13809 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13810 reg-s390.o and reg-s390x.o.
13811
13812 * linux-low.c (new_inferior): New global variable.
13813 (linux_create_inferior, linux_attach): Set it.
13814 (linux_wait_for_process): Call the_low_target.arch_setup after the
13815 target has stopped for the first time.
13816 (initialize_low): Do not call the_low_target.arch_setup.
13817
13818 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13819 (s390_set_pc): Likewise.
13820 (s390_arch_setup): New function.
13821 (the_low_target): Use s390_arch_setup as arch_setup routine.
13822
13823 * regcache.c (realloc_register_cache): New function.
13824 (set_register_cache): Call it for each existing regcache.
13825
d05b4ac3
UW
138262008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13827
13828 * server.h (init_registers): Remove prototype.
13829
13830 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13831 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13832 instead of init_registers ().
13833 * linux-arm-low.c (init_registers_arm): Add prototype.
13834 (init_registers_arm_with_iwmmxt): Likewise.
13835 (the_low_target): Add initializer for arch_setup field.
13836 * linux-cris-low.c (init_registers_cris): Add prototype.
13837 (the_low_target): Add initializer for arch_setup field.
13838 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13839 (the_low_target): Add initializer for arch_setup field.
13840 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13841 (the_low_target): Add initializer for arch_setup field.
13842 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13843 (the_low_target): Add initializer for arch_setup field.
13844 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13845 (the_low_target): Add initializer for arch_setup field.
13846 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13847 (the_low_target): Add initializer for arch_setup field.
13848 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13849 (init_registers_mips64_linux): Likewise.
13850 (the_low_target): Add initializer for arch_setup field.
13851 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13852 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13853 (the_low_target): Add initializer for arch_setup field.
13854 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13855 (init_registers_powerpc_64): Likewise.
13856 (the_low_target): Add initializer for arch_setup field.
13857 * linux-s390-low.c (init_registers_s390): Add prototype.
13858 (init_registers_s390x): Likewise.
13859 (the_low_target): Add initializer for arch_setup field.
13860 * linux-sh-low.c (init_registers_sh): Add prototype.
13861 (the_low_target): Add initializer for arch_setup field.
13862 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13863 (the_low_target): Add initializer for arch_setup field.
13864 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13865 (the_low_target): Add initializer for arch_setup field.
13866
13867 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13868 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13869 instead of init_registers ().
13870 * win32-arm-low.c (init_registers_arm): Add prototype.
13871 (the_low_target): Add initializer for arch_setup field.
13872 * win32-i386-low.c (init_registers_i386): Add prototype.
13873 (the_low_target): Add initializer for arch_setup field.
13874
13875 * spu-low.c (init_registers_spu): Add prototype.
13876 (initialize_low): Call initialie_registers_spu () instead of
13877 initialize_registers ().
13878
fd96d250
PA
138792008-02-19 Pedro Alves <pedro@codesourcery.com>
13880
13881 * server.c (handle_v_requests): When handling the vRun and vAttach
13882 packets, if already debugging a process, don't kill it. Return an
13883 error instead.
13884
d41b6bb4
DJ
138852008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13886
13887 * server.c (handle_query): Correct length check.
13888
5ac588cf
PA
138892008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13890
13891 * win32-low.c (do_initial_child_stuff): Add process handle
13892 parameter. Set current_process_handle and current_process_id from the
13893 parameters. Clear globals.
13894 (win32_create_inferior): Don't set current_process_handle and
13895 current_process_id here. Instead pass them on the call to
13896 do_initial_child_stuff.
13897 (win32_attach): Likewise.
13898 (win32_clear_inferiors): New.
13899 (win32_kill): Don't close the current process handle or the
13900 current thread handle here. Instead call win32_clear_inferiors.
13901 (win32_detach): Don't open a new handle to the process. Call
13902 win32_clear_inferiors.
13903 (win32_join): Don't rely on current_process_handle; open a new
13904 handle using the process id.
13905 (win32_wait): Call win32_clear_inferiors when the inferior process
13906 has exited.
13907
ecd7ecbc
DJ
139082008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13909
13910 * server.c (monitor_show_help): Add "exit".
13911
1525d545
MG
139122008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13913
ecd7ecbc 13914 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13915 (clean): Add reg-xtensa.c.
13916 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13917 * configure.srv (xtensa*-*-linux*) New target.
13918 * linux-xtensa-low.c: New.
13919 * xtensa-xtregs.c: New.
1525d545 13920
59a016f0
PA
139212008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13922
13923 * hostio.c: Don't include errno.h.
13924 (errno_to_fileio_errno): Move to hostio-errno.
13925 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13926 error number outputting to the target->hostio_last_error callback.
13927 (hostio_packet_error): Use FILEIO_EINVAL directly.
13928 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13929 calls to hostio_error.
13930 * hostio-errno.c: New.
13931 * server.h (hostio_last_error_from_errno): Declare.
13932 * target.h (target_ops): Add hostio_last_error member.
13933 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13934 as hostio_last_error handler.
889bf7c5 13935 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13936 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13937 (wince_hostio_last_error): New functions.
13938 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13939 as hostio_last_error handler.
13940 (win32_target_ops) [!_WIN32_WCE]: Register
13941 hostio_last_error_from_errno as hostio_last_error handler.
13942 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13943 (hostio-errno.o): New rule.
13944 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13945 * configure.srv (srv_hostio_err_objs): New variable. Default to
13946 hostio-errno.o.
13947 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13948 * configure: Regenerate.
13949
2d717e4f
DJ
139502008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13951
13952 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13953 (linux_kill, linux_detach): Clean up the process list.
13954 * remote-utils.c (remote_open): Improve port number parsing.
13955 (putpkt_binary, input_interrupt): Only send interrupts if the target
13956 is running.
13957 * server.c (extended_protocol): Make static.
13958 (attached): Define earlier.
13959 (exit_requested, response_needed, program_argv): New variables.
13960 (target_running): New.
13961 (start_inferior): Clear attached here.
13962 (attach_inferior): Set attached here.
13963 (require_running): Define.
13964 (handle_query): Use require_running and target_running. Implement
13965 "monitor exit".
13966 (handle_v_attach, handle_v_run): New.
13967 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13968 (gdbserver_usage): Update.
13969 (main): Redo argument parsing. Handle --debug and --multi. Handle
13970 --attach along with other options or after the port. Save
13971 program_argv. Support no initial program. Resynchronize
13972 communication with GDB after an error. Handle "monitor exit".
13973 Use require_running and target_running. Always allow the extended
13974 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13975 restart in extended mode.
13976 * README: Refer to the GDB manual. Update --attach usage.
13977
7407e2de
AS
139782007-12-20 Andreas Schwab <schwab@suse.de>
13979
13980 * linux-low.c (STACK_SIZE): Define.
13981 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13982 (linux_test_for_tracefork): Likewise.
13983
b65d95c5
DJ
139842007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13985
13986 * linux-low.c (linux_wait_for_event): Update messages. Do not
13987 reinsert auto-delete breakpoints.
13988 * mem-break.c (struct breakpoint): Change return type of handler to
13989 int.
13990 (set_breakpoint_at): Update handler type.
13991 (reinsert_breakpoint_handler): Return 1 instead of calling
13992 delete_breakpoint.
13993 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13994 setting a new one.
13995 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13996 * mem-break.h (set_breakpoint_at): Update handler type.
13997 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13998 * win32-low.c (auto_delete_breakpoint): New.
13999 (get_child_debug_event): Use it.
14000
4e799345
DJ
140012007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14002
14003 * configure.ac: Check for pread and pwrite.
14004 * hostio.c (handle_pread): Fall back to lseek and read.
14005 (handle_pwrite): Fall back to lseek and write.
14006 * config.in, configure: Regenerated.
14007
27524b67
DJ
140082007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14009
14010 * server.c (myresume): Add own_buf argument.
14011 (main): Update calls.
14012
a20d5e98
DJ
140132007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14014
14015 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14016 * remote-utils.c (remote_open): Do not call disable_async_io.
14017 (block_async_io): Delete.
14018 (unblock_async_io): Make static.
14019 (initialize_async_io): New.
14020 * server.c (handle_v_cont): Handle async I/O here.
14021 (myresume): Likewise. Move other common resume tasks here...
14022 (main): ... from here. Call initialize_async_io. Disable async
14023 I/O before the main loop.
14024 * server.h (initialize_async_io): Declare.
14025 (block_async_io, unblock_async_io): Delete prototypes.
14026 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14027
b79d787e
DJ
140282007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14029
14030 * remote-utils.c (readchar): Allow binary data in received messages.
14031
d97903b2
PA
140322007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14033
14034 * win32-low.c (attaching): New global.
14035 (win32_create_inferior): Clear the `attaching' global.
14036 (win32_attach): Set the `attaching' global.
14037 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14038 attaching. Only set a breakpoint at the entry point if not
14039 attaching.
14040
311de423
PA
140412007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14042
14043 * server.c (main): Don't report dll events on the initial
14044 connection on attaches.
14045
6c2d16d2
PA
140462007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14047
14048 * server.c (main): Relax numerical bases supported for the pid of
14049 the --attach command line argument.
14050
5ca906e6
PA
140512007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14052
14053 * win32-low.c (win32_attach): Call OpenProcess before
14054 DebugActiveProcess, not after. Add last error output to error
14055 call.
14056
9c6c8194
PA
140572007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14058
14059 * win32-low.c (win32_get_thread_context)
14060 (win32_set_thread_context): New functions.
14061 (thread_rec): Use win32_get_thread_context.
14062 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14063 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14064 field.
14065
4d5d1aaa
PA
140662007-12-03 Leo Zayas
14067 Pedro Alves <pedro_alves@portugalmail.pt>
14068
14069 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14070 global variables.
14071 (child_add_thread): Minor cleanup.
14072 (child_continue): Resume artificially suspended threads before
14073 calling ContinueDebugEvent.
14074 (suspend_one_thread): New.
14075 (fake_breakpoint_event): New.
14076 (get_child_debug_event): Change return type to int. Check here if
14077 gdb sent an interrupt request. If a soft interrupt was requested,
14078 fake a breakpoint event. Return 0 if there is no event to handle,
14079 and 1 otherwise.
14080 (win32_wait): Don't check here if gdb sent an interrupt request.
14081 Ensure there is a valid event to handle.
14082 (win32_request_interrupt): Add soft interruption method as last
14083 resort.
14084
c436e841
PA
140852007-12-03 Leo Zayas
14086 Pedro Alves <pedro_alves@portugalmail.pt>
14087
14088 * win32-low.h (win32_thread_info): Add descriptions to the
14089 structure members. Replace `suspend_count' counter by a
14090 `suspended' flag.
14091 * win32-low.c (thread_rec): Update condition of when to get the
14092 context from the inferior. Rely on ContextFlags being set if it
14093 has already been retrieved. Only suspend the inferior thread if
14094 we haven't already. Warn if that fails.
14095 (continue_one_thread): s/suspend_count/suspended/. Only call
14096 ResumeThread once. Warn if that fails.
14097
e7b5fa67
PA
140982007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14099
14100 * win32-low.c (win32_wait): Don't read from the inferior when it
14101 has already exited.
14102
a385171d
PA
141032007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14104
14105 * Makefile.in (win32_low_h): New variable.
14106 (win32-low.o): Add dependency on $(win32_low_h).
14107 (win32-arm-low.o, win32-i386-low.o): New rules.
14108
f80c84b3
DJ
141092007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14110
14111 * hostio.c: Correct copyright year.
14112
a6b151f1
DJ
141132007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14114
14115 * Makefile.in (OBS): Add hostio.o.
14116 (hostio.o): New rule.
14117 * server.h (handle_vFile): Declare.
14118 * hostio.c: New file.
14119 * server.c (handle_v_requests): Take packet_len and new_packet_len
14120 for binary packets. Call handle_vFile.
14121 (main): Update call to handle_v_requests.
14122
f9387fc3
DJ
141232007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14124
14125 * linux-low.c: Include <sched.h>.
14126
51c2684e
DJ
141272007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14128
14129 * linux-low.c (linux_tracefork_grandchild): New.
14130 (linux_tracefork_child): Use clone.
14131 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14132
75f83163
JB
141332007-10-31 Joel Brobecker <brobecker@adacore.com>
14134
14135 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14136
da5898ce
DJ
141372007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14138
14139 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14140
24a09b5f
DJ
141412007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14142
14143 * inferiors.c (change_inferior_id): Delete.
14144 (add_pid_to_list, pull_pid_from_list): New.
14145 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14146 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14147 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14148 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14149 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14150 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14151 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14152 (using_threads): Always set to 1.
14153 (handle_extended_wait): New.
14154 (add_process): Do not set TID.
14155 (linux_create_inferior): Set must_set_ptrace_flags.
14156 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14157 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14158 (linux_thread_alive): Rename TID argument to LWPID.
14159 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14160 (linux_wait_for_event): Do not use TID or check using_threads. Update
14161 call to dead_thread_notify. Call handle_extended_wait.
14162 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14163 (send_sigstop): Delete sigstop_sent.
14164 (wait_for_sigstop): Avoid TID.
14165 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14166 (linux_test_for_tracefork): New.
14167 (linux_lookup_signals): Use thread_db_active and
14168 linux_supports_tracefork_flag.
14169 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14170 * linux-low.h (get_process_thread): Avoid TID.
14171 (struct process_ifo): Move thread_known and tid to the end. Remove
14172 sigstop_sent.
14173 (linux_attach_lwp, thread_db_init): Update prototypes.
14174 * server.h (change_inferior_id): Delete prototype.
14175 (add_pid_to_list, pull_pid_from_list): New prototypes.
14176 * thread-db.c (thread_db_use_events): New.
14177 (find_first_thread): Rename to...
14178 (find_one_thread): ...this. Update callers and messages. Do not
14179 call fatal. Check thread_db_use_events. Do not call
14180 change_inferior_id or new_thread_notify.
14181 (maybe_attach_thread): Update. Do not call new_thread_notify.
14182 (thread_db_init): Set thread_db_use_events. Check use_events.
14183 * utils.c (fatal, warning): Correct message prefix.
14184
30ed0a8f
DJ
141852007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14186
14187 * Makefile.in (clean): Remove new files.
14188 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14189 (powerpc-64.o, powerpc-64.c): New rules.
14190 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14191 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14192 with SPE.
14193 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14194 SPE targets.
14195 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14196 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14197 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14198 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14199 (target_regsets): Add AltiVec and SPE register sets.
14200 * configure.ac: Check for AltiVec and SPE.
14201 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14202 (ppc_fill_vrregset, ppc_store_vrregset): New.
14203 (target_regsets): Add AltiVec register set.
14204 * configure: Regenerated.
14205
fd462a61
DJ
142062007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14207
14208 * linux-low.c (O_LARGEFILE): Define.
14209 (linux_read_memory): Use /proc/PID/mem.
14210 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14211 * configure, config.in: Regenerated.
14212
69f223ed
DJ
142132007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14214
14215 * linux-low.c (linux_wait_for_event): Do not pass signals while
14216 single-stepping.
14217
aec18585
PA
142182007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14219
14220 * win32-low.c (create_process): New.
14221 (win32_create_inferior): Use create_process instead of
14222 CreateProcess. If create_process failed retry appending an ".exe"
14223 suffix. Store the GetLastError result immediatelly after
14224 create_process calls and use it on the call to error.
14225
34d86ddd
PA
142262007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14227
14228 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14229
5a0e3bd0
JB
142302007-08-23 Joel Brobecker <brobecker@adacore.com>
14231
14232 * configure.ac: Switch license to GPLv3.
14233
f88c79e6
MS
142342007-08-01 Michael Snyder <msnyder@access-company.com>
14235
14236 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14237
6b3d9b83
PA
142382007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14239
14240 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14241 typedef.
14242 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14243 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14244 CloseToolhelp32Snapshot.
14245 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14246 CloseToolhelp32Snapshot.
14247
c588c53c
MS
142482007-07-27 Michael Snyder <michael.snyder@access-company.com>
14249
14250 * server.c (main): Check for inferior exit before main loop.
14251
aa0403d9
PA
142522007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14253
14254 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14255 instead of on tmp_desc.
14256
255e7678
DJ
142572007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14258 Daniel Jacobowitz <dan@codesourcery.com>
14259
14260 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14261 (add_thread): Minor cleanups.
14262 (clear_inferiors): Move lower in the file. Clear the DLL
14263 list.
14264 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14265 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14266 (xml_escape_text): New.
14267 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14268 for qSupported.
14269 (handle_v_cont): Report errors.
14270 (gdbserver_version): Update.
14271 (main): Correct size of own_buf. Do not report initial DLL events.
14272 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14273 (unloaded_dll, xml_escape_text): New.
14274 * win32-low.c (enum target_waitkind): Update comments.
14275 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14276 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14277 (win32_EnumProcessModules, win32_GetModuleInformation)
14278 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14279 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14280 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14281 (win32_Module32First, win32_Module32Next, load_toolhelp)
14282 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14283 (get_child_debug_event): Handle DLL events.
14284 (win32_wait): Likewise.
14285
0d37add9
DJ
142862007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14287
14288 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14289 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14290
45e2715e
PA
142912007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14292
14293 * win32-low.c (handle_output_debug_string): Ignore event if not
14294 waiting.
14295
c5674cf1
PA
142962007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14297
14298 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14299
2bbe3cc1
DJ
143002007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14301
14302 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14303
ae13219e
DJ
143042007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14305
14306 * inferiors.c (change_inferior_id): Add comment.
14307 * linux-low.c (check_removed_breakpoint): Add an early
14308 prototype. Improve debug output.
14309 (linux_attach): Doc update.
14310 (linux_detach_one_process, linux_detach): Clean up before releasing
14311 each process.
14312 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14313 * linux-low.h (struct process_info): Doc improvement.
14314 * mem-break.c (delete_all_breakpoints): New.
14315 * mem-break.h (delete_all_breakpoints): New prototype.
14316 * thread-db.c (find_first_thread): New.
14317 (thread_db_create_event): Call it instead of
14318 thread_db_find_new_threads. Clean up unused variables.
14319 (maybe_attach_thread): Remove first thread handling.
14320 (thread_db_find_new_threads): Use find_first_thread.
14321 (thread_db_get_tls_address): Likewise.
14322
4105de34
DJ
143232007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14324
14325 * thread-db.c (thread_db_find_new_threads): Add prototype.
14326 (thread_db_create_event): Check for the main thread before adding
14327 a new thread.
14328 (maybe_attach_thread): Only enable event reporting if TID == 0.
14329 (thread_db_get_tls_address): Check for new threads.
14330
2b876972
DJ
143312007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14332
14333 * linux-low.c (linux_create_inferior): Try execv before execvp.
14334 * spu-low.c (spu_create_inferior): Likewise.
14335
7a245884
DJ
143362007-06-13 Mike Frysinger <vapier@gentoo.org>
14337
14338 * linux-low.c (linux_create_inferior): Change execv to execvp.
14339 * spu-low.c (spu_create_inferior): Likewies.
14340
117ce543
DJ
143412007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14342
14343 * Makefile.in (clean): Clean new files instead of deleted ones.
14344 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14345 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14346 rules.
14347 * configure.srv: Specify XML files and new regformats for MIPS and
14348 MIPS64 GNU/Linux.
14349 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14350 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14351 an entry for the restart register.
14352 (mips_cannot_fetch_register, mips_cannot_store_register)
14353 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14354 register names to match the XML descriptions.
14355 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14356 restart register instead of $0.
14357
0e7f50da
UW
143582007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14359 Markus Deuling <deuling@de.ibm.com>
14360
14361 * remote-utils.c (decode_xfer_write): New function.
14362 * server.h (decode_xfer_write): Add prototype.
14363 * server.c (handle_query): Add PACKET_LEN argument. Support
14364 qXfer:spu:read and qXfer:spu:write packets.
14365 (main): Pass packet_len to handle_query.
14366 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14367 * target.h (target_ops): Add qxfer_spu.
14368
374c1d38
UW
143692007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14370
14371 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14372 accessing non-seekable spufs files.
14373
bb63802a
UW
143742007-05-16 Markus Deuling <deuling@de.ibm.com>
14375
889bf7c5 14376 * server.c (handle_query): Add reply for qC packet.
bb63802a 14377
7390519e
PA
143782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14379 Leo Zayas <lerele@champenstudios@com>
14380
14381 * server.h (check_remote_input_interrupt_request): New function.
14382 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14383 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14384 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14385 (check_remote_input_interrupt_request): New function.
14386 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14387 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14388 winapi_GenerateConsoleCtrlEvent): New typedefs.
14389 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14390 to 250 ms.
14391 (win32_wait): Check for remote interrupt request
14392 with check_remote_input_interrupt_request.
14393 (win32_request_interrupt): New function.
14394 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14395
34b34921
PA
143962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14397
14398 * win32-low.c (debug_registers_changed,
14399 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14400 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14401 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14402 (thread_rec): Get context using the low target.
14403 (child_add_thread): Call thread_added on the low target,
14404 which does the same thing.
14405 (regptr): Delete.
14406 (do_initial_child_stuff): Remove debug registers references.
14407 Set context using the low target. Resume threads after
14408 setting the contexts.
14409 (child_continue): Remove dead variable. Remove debug
14410 registers references.
14411 (child_fetch_inferior_registers): Go through the low target.
14412 (do_child_store_inferior_registers): Remove.
14413 (child_store_inferior_registers): Go through the low target.
14414 (win32_resume): Remove debug registers references.
14415 Set context using the low target.
14416 (handle_exception): Change return type to void. Don't record
14417 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14418 first chance exception.
889bf7c5 14419 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14420 goto loop. Always return after waiting for debug event.
14421 (win32_wait): Convert to switch statement. Handle spurious
14422 events.
14423
14424 * win32-i386-low.c (debug_registers_changed,
14425 debug_registers_used): New.
14426 (initial_stuff): Rename to ...
14427 (i386_initial_stuff): ... this. Clear debug registers
14428 state variables.
14429 (store_debug_registers): Delete.
14430 (i386_get_thread_context): New.
14431 (load_debug_registers): Delete.
14432 (i386_set_thread_context): New.
14433 (i386_thread_added): New.
14434 (single_step): Rename to ...
14435 (i386_single_step): ... this.
14436 (do_fetch_inferior_registers): Rename to ...
14437 (i386_fetch_inferior_register): ... this.
14438 (i386_store_inferior_register): New.
14439 (the_low_target): Adapt to new interface.
14440
14441 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14442 (arm_get_thread_context): New.
14443 (arm_set_thread_context): New.
14444 (regptr): New.
14445 (do_fetch_inferior_registers): Rename to ...
14446 (arm_fetch_inferior_register): ... this.
14447 (arm_store_inferior_register): New.
14448 (arm_wince_breakpoint): Reimplement as unsigned long.
14449 (arm_wince_breakpoint_len): Define.
14450 (the_low_target): Adapt to new interface.
14451
14452 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14453 load_debug_registers. Add get_thread_context, set_thread_context,
14454 thread_added and store_inferior_register. Rename
14455 fetch_inferior_registers to fetch_inferior_register.
14456 (regptr): Remove declaration.
14457
dd6953e1
PA
144582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14459
14460 * linux-low.c (linux_detach): Change return type to int. Return 0.
14461 * spu-low.c (spu_detach): Likewise.
14462
444d6139
PA
144632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14464
14465 * target.h (target_ops): Change return type of detach to int.
14466 Add join.
14467 (join_inferior): New.
14468 * server.c (main): Don't skip detach support on mingw32.
14469 If the inferior doesn't support detaching return error.
14470 Call join_inferior instead of using waitpid.
14471 * linux-low.c (linux_join): New.
14472 (linux_target_op): Add linux_join.
14473 * spu-low.c (spu_join): New.
14474 (spu_target_ops): Add spu_join.
14475 * win32-low.c (win32_detach): Adapt to new interface.
14476 Reopen current_process_handle before detaching. Issue a child
14477 resume before detaching.
14478 (win32_join): New.
14479 (win32_target_op): Add win32_join.
14480
1d5315fe
PA
144812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14482
14483 * win32-low.c (win32-attach): Fix return value.
14484 * target.h (target_ops): Describe ATTACH return values.
14485
bf914831
PA
144862007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14487
14488 * win32-low.c (GETPROCADDRESS): Define.
14489 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14490 (winapi_DebugSetProcessKillOnExit): Likewise.
14491 (win32_create_inferior): Force usage of ansi CreateProcessA.
14492 (win32_attach): Use GETPROCADDRESS.
14493 (win32_detach): Likewise.
14494
f72f3e60
PA
144952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14496
14497 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14498
ed50f18f
PA
144992007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14500
14501 * win32-low.c: Commit leftover changes from 2007-03-29.
14502
0c2ead7e
DJ
145032007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14504
14505 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14506 fields short instead of int. Add explicit padding.
14507 (i387_cache_to_fsave): Remove unnecessary casts.
14508 (i387_fsave_to_cache): Doc fix.
14509 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14510
73725ff3
DJ
145112007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14512
14513 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14514 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14515
d99f33d8
PA
145162007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14517
14518 * configure.srv (arm*-*-mingw32ce*): Move near the other
14519 arm targets.
14520
68070c10
PA
145212007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14522
2482afc6 14523 * configure.ac: Add errno checking.
68070c10
PA
14524 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14525 sys/file.h and malloc.h.
14526 (AC_CHECK_DECLS): Add perror.
14527 (srv_mingwce): Handle.
2482afc6 14528 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14529 win32-i386-low.o to srv_tgtobj.
14530 (i[34567]86-*-mingw*): Likewise.
14531 (arm*-*-mingw32ce*): Add case.
14532 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14533 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14534 [__MINGW32CE__] (strerror): New function.
14535 [__MINGW32CE__] (errno): Define to GetLastError.
14536 [__MINGW32CE__] (COUNTOF): New macro.
14537 (remote_open): Remove extra close call.
14538 * mem-break.c (delete_breakpoint_at): New function.
14539 * mem-break.h (delete_breakpoint_at): Declare.
14540 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14541 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14542 [USE_WIN32API] (read, write): Add char* casts.
14543 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14544 * server.h: Include wincecompat.h on Windows CE.
14545 [HAVE_ERRNO_H]: Check.
14546 (perror): Declare if not declared.
14547 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14548 (perror_with_name): Remove errno declaration.
14549 * wincecompat.h: New.
14550 * wincecompat.c: New.
14551 * win32-low.h: New.
14552 * win32-arm-low.c: New.
14553 * win32-i386-low.c: New.
14554 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14555 (OUTMSG2): Make it safe.
14556 (_T): New macro.
14557 (COUNTOF): New macro.
14558 (NUM_REGS): Get it from the low target.
14559 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14560 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14561 (thread_rec): Let low target handle debug registers.
14562 (child_add_thread): Likewise.
14563 (child_init_thread_list): Likewise.
14564 (continue_one_thread): Likewise.
14565 (regptr): New.
14566 (do_child_fetch_inferior_registers): Move to ...
14567 * win32-i386-low.c: ... here, and rename to ...
14568 (do_fetch_inferior_registers): ... this.
889bf7c5 14569 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14570 Go through the low target.
14571 (do_child_store_inferior_registers): Use regptr.
14572 (strwinerror): New function.
14573 (win32_create_inferior): Handle Windows CE.
14574 Use strwinerror instead of strerror on Windows error
14575 codes. Add program to the error output.
14576 Don't close the main thread handle on Windows CE.
14577 (win32_attach): Use coredll.dll on Windows CE.
14578 (win32_kill): Close current process and current
14579 thread handles.
14580 (win32_detach): Use coredll.dll on Windows CE.
14581 (win32_resume): Let low target handle debug registers, and
14582 step request.
14583 (handle_exception): Add/Remove initial breakpoint. Avoid
14584 non-existant WSTOPSIG on Windows CE.
14585 (win32_read_inferior_memory): Cast to remove warning.
14586 (win32_arch_string): Go through the low target.
14587 (initialize_low): Call set_breakpoint_data with the low
14588 target's breakpoint.
14589 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14590 FOP_REGNUM, mappings): Move to ...
14591 * win32-i386-low.c: ... here.
14592 * win32-low.c (win32_thread_info): Move to ...
14593 * win32-low.h: ... here.
14594 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14595 win32-arm-low.c and wincecompat.c.
14596 (all:): Add $EXEEXT.
14597 (install-only:): Likewise.
14598 (gdbserver:): Likewise.
14599 (gdbreplay:): Likewise.
14600 * config.in: Regenerate.
14601 * configure: Regenerate.
14602
41093d81
PA
146032007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14604
14605 * win32-low.c: Rename typedef thread_info to
14606 win32_thread_info throughout.
14607
544afa54
PA
146082007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14609
14610 * win32-i386-low.c: Rename to ...
14611 * win32-low.c: ... this.
14612 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14613 * Makefile.in: Likewise.
14614
bce7165d
PA
146152007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14616
14617 * remote-utils.c (monitor_output): Constify msg parameter.
14618 * server.h (monitor_output): Likewise.
14619 * win32-i386-low.c (handle_output_debug_string): New.
14620 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14621 handle_output_debug_string.
14622 (get_child_debug_event): Likewise.
14623
506c7aa0
DJ
146242007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14625
14626 * server.c (main): Correct strtoul check.
14627
42c81e2a
DJ
146282007-03-27 Jon Ringle <jon@ringle.org>
14629
14630 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14631
9453113a
DJ
146322007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14633
14634 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14635
64a69107
DJ
146362007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14637
14638 * terminal.h: Check HAVE_SGTTY_H.
14639
146402007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14641
14642 * remote-utils.c (remote_open): Print out the assigned port number.
14643
c74d0ad8
DJ
146442007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14645
14646 * remote-utils.c (monitor_output): New function.
14647 * server.c (debug_threads): Define here.
14648 (monitor_show_help): New function.
14649 (handle_query): Handle qRcmd.
14650 (main): Do not handle 'd' packet.
14651 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14652 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14653 of debug_threads.
14654
de7c3b4a
PA
146552007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14656
14657 * Makefile.in (EXEEXT): New.
14658 (clean): Use $(EXEEXT).
14659
ef57601b
PA
146602007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14661
14662 * target.h (target_ops): Rename send_signal to request_interrupt,
14663 and remove enum target_signal parameter.
14664 * linux-low.c (linux_request_interrupt): Rename from
14665 linux_send_signal, and always send SIGINT.
14666 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14667 and always send SIGINT.
14668 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14669 of send_signal.
14670 (input_interrupt): Likewise.
14671
820f2bda
PA
146722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14673
14674 * server.c (get_features_xml): Check if target implemented
14675 arch_string.
14676 * win32-i386-low.c (win32_arch_string): New.
14677 (win32_target_ops): Add win32_arch_string as arch_string member.
14678
ab39bf24
UW
146792007-02-22 Markus Deuling <deuling@de.ibm.com>
14680
14681 * spu-low.c (spu_arch_string): New.
14682 (spu_target_ops): Add spu_arch_string.
14683
61ff6e04
DJ
146842007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14685
14686 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14687 * configure.ac: Do not check for terminal.h.
14688 * configure, config.in: Regenerated.
14689
fb1e4ffc
DJ
146902007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14691
14692 * Makefile.in (OBS): Add $(XML_BUILTIN).
14693 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14694 (clean): Update.
14695 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14696 (arm-with-iwmmxt.c): New.
14697 * config.in, configure: Regenerate.
14698 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14699 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14700 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14701 (arm*-*-linux*): Add iWMMXt and regset support.
14702 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14703 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14704 (arm_store_wmmxregset, target_regsets): New.
14705 * server.c (get_features_xml): Take annex argument. Check builtin
14706 XML documents.
14707 (handle_query): Handle multiple annexes.
14708
0f48aa01
DJ
147092007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14710
14711 * remote-utils.c [USE_WIN32API] (read, write): Define.
14712 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14713 write.
14714
23181151
DJ
147152007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14716
14717 * linux-i386-low.c (the_low_target): Set arch_string.
14718 * linux-x86-64-low.c (the_low_target): Likewise.
14719 * linux-low.c (linux_arch_string): New.
14720 (linux_target_ops): Add it.
14721 * linux-low.h (struct linux_target_ops): Add arch_string.
14722 * server.c (write_qxfer_response): Use const void * for DATA.
14723 (get_features_xml): New.
14724 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14725 * target.h (struct target_ops): Add arch_string method.
14726
9d606399
DJ
147272007-01-03 Denis Pilat <denis.pilat@st.com>
14728 Daniel Jacobowitz <dan@codesourcery.com>
14729
14730 * linux-low.c (linux_kill): Handle being called with no threads.
14731 * win32-i386-low.c (win32_kill): Likewise.
14732 (get_child_debug_event): Clear current_process_handle.
14733
147342006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14735 Daniel Jacobowitz <dan@codesourcery.com>
14736
14737 * remote-utils.c (remote_open): Check the type of specified
14738 serial port devices before opening them.
14739 * server.c (main): Kill the inferior if an error occurs during
14740 the first remote_open.
14741
a5e13d24
DJ
147422006-12-05 Markus Deuling <deuling@de.ibm.com>
14743
14744 * README: Update supported targets.
14745
186947f7
DJ
147462006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14747
14748 * Makefile.in (clean): Remove reg-mips64.c.
14749 (reg-mips64.c, reg-mips64.o): New rules.
14750 * configure.srv: Handle mips64. Include regset support for mips.
14751 * linux-mips-low.c (union mips_register): New.
14752 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14753 (mips_breakpoint, mips_breakpoint_at): Use int.
14754 (mips_collect_register, mips_supply_register)
14755 (mips_collect_register_32bit, mips_supply_register_32bit)
14756 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14757 (mips_store_fpregset, target_regsets): New.
14758 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14759
a13e2c95
UW
147602006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14761
14762 * configure.srv: Add target "spu*-*-*".
14763 * Makefile.in (clean): Remove reg-spu.c.
14764 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14765 * spu-low.c: New file.
14766
cb7283db
DJ
147672006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14768
14769 * configure.ac: Correct td_thr_tls_get_addr test.
14770 * configure: Regenerated.
14771
89be2091
DJ
147722006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14773
14774 * linux-low.c (linux_wait_for_event): Reformat. Use the
14775 pass_signals array.
14776 * remote-utils.c (decode_address_to_semicolon): New.
14777 * server.c (pass_signals, handle_general_set): New.
14778 (handle_query): Mention QPassSignals for qSupported.
14779 (main): Call handle_general_set.
14780 * server.h (pass_signals, decode_address_to_semicolon): New.
14781
000ef4f0
DJ
147822006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14783
14784 * server.c (handle_query): Correct error handling for read_auxv.
14785
b7149293
UW
147862005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14787
14788 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14789 and srv_linux_thread_db to yes.
14790 * linux-s390-low.c (s390_fill_gregset): New function.
14791 (target_regsets): Define data structure.
14792
dae5f5cf
DJ
147932006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14794
14795 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14796 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14797 * config.in, configure: Regenerated.
14798 * inferiors.c (gdb_id_to_thread): New function.
14799 (gdb_id_to_thread_id): Use it.
14800 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14801 * linux-low.h (struct process_info): Add th member.
14802 (thread_db_get_tls_address): New prototype.
14803 * remote-utils.c (decode_address): Make non-static.
14804 * server.c (handle_query): Handle qGetTLSAddr.
14805 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14806 * target.h (struct target_ops): Add get_tls_address.
14807 * thread-db.c (maybe_attach_thread): Save the thread handle.
14808 (thread_db_get_tls_address): New.
14809
32ca6d61
DJ
148102006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14811
14812 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14813 (linux_resume_one_process): Take a siginfo_t *. Update all
14814 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14815 (struct pending_signals): Add a siginfo_t.
14816 (linux_wait_for_process): Always set last_status.
14817 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14818 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14819 * linux-low.h (struct process_info): Add last_status.
14820
5ffff7c1
DJ
148212006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14822
14823 * remote-utils.c (try_rle): New function.
14824 (putpkt_binary): Use it.
14825
8695c747
DJ
148262006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14827
14828 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14829 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14830 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14831 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14832 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14833 point registers.
14834
290fadea
RS
148352006-08-08 Richard Sandiford <richard@codesourcery.com>
14836
14837 * server.c (terminal_fd): New variable.
14838 (old_foreground_pgrp): Likewise.
14839 (restore_old_foreground_pgrp): New function.
14840 (start_inferior): Record the terminal file descriptor in terminal_fd
14841 and its original foreground group in old_foreground_pgrp. Register
14842 restore_old_foreground_pgrp with atexit().
14843
9f2e1e63
DJ
148442006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14845
14846 * server.c (handle_query): Correct qPart to qXfer.
14847
b80864fb
DJ
148482006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14849
14850 * configure.ac: Check for more headers which are missing on
14851 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14852 * configure.srv: Add Cygwin and mingw32.
14853 * remote-utils.c: Don't include headers unconditionally which
14854 are missing on mingw32. Include <winsock.h> for mingw32.
14855 (remote_open): Adjust for mingw32 support. Flush
14856 standard error after writing to it.
14857 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14858 (unblock_async_io, enable_async_io, disable_async_io)
14859 (readchar, getpkt): Update for Winsock support.
14860 (prepare_resume_reply): Expect a protocol signal number.
14861 * server.c: Disable <sys/wait.h> on mingw32.
14862 (start_inferior): Adjust for mingw32 support. Flush
14863 standard error after writing to it.
14864 (attach_inferior): Likewise. Use protocol signal
14865 numbers.
14866 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14867 and names.
14868 * win32-i386-low.c: New file.
14869 * Makefile.in (XM_CLIBS): Set.
14870 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14871 (win32-i386-low.o): New dependency rule.
14872 * linux-low.c (linux_wait): Use target signal numbers.
14873 * target.h (struct target_ops): Doc fix.
14874 * server.h (target_signal_to_name): New prototype.
14875 * gdbreplay.c: Don't include headers unconditionally which
14876 are missing on mingw32. Include <winsock.h> for mingw32.
14877 (remote_close, remote_open): Adjust for Winsock support.
14878 * configure, config.in: Regenerated.
14879
0876f84a
DJ
148802006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14881
14882 * server.c (decode_xfer_read, write_qxfer_response): New.
14883 (handle_query): Take a packet length argument. Handle
14884 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14885 the qSupported response.
14886 (main): Update call to handle_query.
14887
01f9e8fa
DJ
148882006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14889
14890 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14891 (putpkt_binary): Renamed from putpkt and adjusted for binary
14892 data.
14893 (putpkt): New wrapper for putpkt_binary.
14894 (readchar): Don't mask off the high bit.
14895 (decode_X_packet): New function.
14896 * server.c (main): Call putpkt_binary if a handler sets the packet
14897 length. Save the length of the incoming packet. Handle 'X'.
14898 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14899
be2a5f71
DJ
149002006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14901
14902 * server.c (handle_query): Handle qSupported.
14903
ea025f5f
DJ
149042006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14905
14906 * remote-utils.c (all_symbols_looked_up): New variable.
14907 (look_up_one_symbol): Check it.
14908 * server.h (look_up_one_symbol): New declaration.
14909 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14910
9308fc88
DJ
149112006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14912
14913 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14914 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14915 (PTRACE_GET_THREAD_AREA): Define.
14916 (ps_get_thread_area): New function.
14917
52fb6437
NS
149182006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14919
14920 * configure.srv (m68k*-*-uclinux*): New target.
14921 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14922 (linux_resume_one_process): Remove extraneous cast.
14923 (linux_read_offsets): New.
14924 (linux_target_op): Add linux_read_offsets on mmuless systems.
14925 * server.c (handle_query): Add qOffsets logic.
14926 * target.h (struct target_ops): Add read_offsets.
14927
21b0f40c
DJ
149282006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14929
14930 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14931 (PTRACE_GET_THREAD_AREA): Define.
14932 (ps_get_thread_area): New function.
14933 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14934 (linux-x86-64-low.o): Update.
14935
0050a760
DJ
149362006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14937
14938 * configure.ac: Remove checks for prfpregset_t.
14939 * gdb_proc_service.h: New file.
14940 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14941 new "gdb_proc_service.h".
14942 * proc-service.c: Likewise.
14943 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14944 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14945 * Makefile.in (gdb_proc_service_h): Updated.
14946 * configure, config.in: Regenerated.
14947
b92a518e
DJ
149482006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14949
14950 * remote-utils.c (prepare_resume_reply): Move declaration
14951 of gdb_id_from_wait to the top of the block.
14952
545587ee
DJ
149532006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14954
14955 * linux-low.c (regsets_store_inferior_registers): Read the regset
14956 from the target before filling it.
14957
9db87ebd
DJ
149582006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14959
14960 * server.c (attach_inferior): Return SIGTRAP for a successful
14961 attach.
14962
dd24457d
DJ
149632006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14964
14965 * Makefile.in (OBS): Add version.o.
14966 (STAGESTUFF): Delete.
14967 (version.o): Add dependencies.
14968 (version.c): Replace rule.
14969 (clean): Remove version.c.
14970 * server.c (gdbserver_version): New.
14971 (gdbserver_usage): Use printf.
14972 (main): Handle --version and --help.
14973 * server.h (version, host_name): Add declarations.
14974
6f0f660e
EZ
149752005-12-23 Eli Zaretskii <eliz@gnu.org>
14976
889bf7c5
PA
14977 * linux-arm-low.c:
14978 * linux-arm-low.c:
14979 * inferiors.c:
14980 * i387-fp.h:
14981 * i387-fp.c:
14982 * gdbreplay.c:
14983 * regcache.c:
14984 * proc-service.c:
14985 * mem-break.h:
14986 * mem-break.c:
14987 * linux-x86-64-low.c:
14988 * linux-sh-low.c:
14989 * linux-s390-low.c:
14990 * linux-ppc64-low.c:
14991 * linux-ppc-low.c:
14992 * linux-mips-low.c:
14993 * linux-m68k-low.c:
14994 * linux-m32r-low.c:
14995 * linux-low.h:
14996 * linux-low.c:
14997 * linux-ia64-low.c:
14998 * linux-i386-low.c:
14999 * linux-crisv32-low.c:
15000 * thread-db.c:
15001 * terminal.h:
15002 * target.h:
15003 * target.c:
15004 * server.h:
15005 * server.c:
15006 * remote-utils.c:
15007 * regcache.h:
15008 * utils.c:
15009 * Makefile.in:
15010 * configure.ac:
6f0f660e
EZ
15011 * gdbserver.1: Add (C) after Copyright. Update the FSF
15012 address.
15013
9d1fb177
DJ
150142005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15015
15016 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15017 (arm_breakpoint_at): Recognize both breakpoints.
15018 (the_low_target): Use the correct breakpoint instruction.
15019
011a70c2
DJ
150202005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15021
15022 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15023 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15024 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15025 (the_low_target): Update.
15026
7fb85e41
AS
150272005-10-25 Andreas Schwab <schwab@suse.de>
15028
15029 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15030
15031 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15032 (ia64_num_regs): Reduce to 462.
15033
3db0444b
DJ
150342005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15035
15036 * acinclude.m4: Correct quoting.
15037 * aclocal.m4: Regenerated.
15038
15039 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15040 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15041 (thread_db_init): Call thread_db_err_str.
15042 * configure.ac: Check for TD_VERSION.
15043 * config.in, configure: Regenerated.
15044
bee0189a
DJ
150452005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15046
15047 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15048
e9d25b98
DJ
150492005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15050
15051 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15052 is not available. Define HAVE_PTRACE_GETREGS if it is.
15053 * config.in, configure: Regenerated.
15054 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15055 * linux-i386-low.c, linux-m68k-low.c: Update to use
15056 HAVE_PTRACE_GETREGS.
15057 * linux-low.c (regsets_fetch_inferior_registers)
15058 (regsets_store_inferior_registers): Only return 0 if we processed
15059 GENERAL_REGS.
15060 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15061 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15062
a06660f7
DJ
150632005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15064
15065 * inferiors.c (struct thread_info): Add gdb_id.
15066 (add_thread): Add gdb_id argument.
15067 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15068 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15069 calls to add_thread.
15070 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15071 * server.c (handle_query): Use thread_to_gdb_id.
15072 (handle_v_cont, main): Use gdb_id_to_thread_id.
15073 * server.h (add_thread): Update prototype.
15074 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15075 prototypes.
15076
5a1f5858
DJ
150772005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15078
15079 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15080 left-padded registers.
15081 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15082 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15083
e122f1f5
SE
150842005-07-01 Steve Ellcey <sje@cup.hp.com>
15085
15086 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15087 * configure: Regenerate.
15088 * config.in: Regenerate.
15089 * server.h (NEED_DECLARATION_STRERROR):
15090 Replace with !HAVE_DECL_STRERROR.
15091
d592fa2f
DJ
150922005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15093
15094 * linux-low.c (linux_wait, linux_send_signal): Don't test
15095 an unsigned long variable for > 0 if it could be MAX_ULONG.
15096 * server.c (myresume): Likewise.
15097 * target.c (set_desired_inferior): Likewise.
15098
ccbd4912
MK
150992005-06-13 Mark Kettenis <kettenis@gnu.org>
15100
15101 * configure.ac: Simplify and improve check for socklen_t.
15102 * configure, config.in: Regenerate.
15103
f450004a
DJ
151042005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15105
15106 * acconfig.h: Remove.
15107 * configure.ac: Add a test for socklen_t. Use three-argument
15108 AC_DEFINE throughout.
15109 * config.in: Regenerated using autoheader 2.59.
15110 * configure: Regenerated.
15111
15112 * gdbreplay.c (socklen_t): Provide a default.
15113 (remote_open): Use socklen_t.
15114 * remote-utils.c (socklen_t): Provide a default.
15115 (remote_open): Use socklen_t.
15116 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15117 unsigned char.
15118
15119 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15120 char for buffers.
15121 * linux-low.c (linux_read_memory, linux_write_memory)
15122 (linux_read_auxv): Likewise.
15123 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15124 (check_mem_write): Likewise.
15125 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15126 Likewise.
15127 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15128 (registers_from_string, register_data): Likewise.
15129 * server.c (handle_query, main): Likewise.
15130 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15131 (decode_M_packet): Likewise.
15132 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15133 * target.h (struct target_ops): Update read_memory, write_memory,
15134 and read_auxv.
15135 (read_inferior_memory, write_inferior_memory): Update.
15136 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15137 to unsigned char *.
15138 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15139 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15140 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15141 linux-s390-low.c, linux-sh-low.c: Update for changes in
15142 read_inferior_memory and the_low_target->breakpoint.
15143
eee84df1
DJ
151442005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15145
15146 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15147 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15148 * configure.srv: Add powerpc64-*-linux*.
15149 * linux-ppc64-low.c: New file.
15150
45b134e5
OF
151512005-05-23 Orjan Friberg <orjanf@axis.com>
15152
15153 * linux-cris-low.c: New file with support for CRIS.
15154 * linux-crisv32-low.c: Ditto for CRISv32.
15155 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15156 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15157 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15158 reg-crisv32.o, and reg-crisv32.c to make rules.
15159 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15160 recognized targets.
15161
48d93c75
UW
151622005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15163
15164 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15165 of sizeof (PTRACE_XFER_TYPE).
15166 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15167
e013ee27
OF
151682005-05-12 Orjan Friberg <orjanf@axis.com>
15169
889bf7c5 15170 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15171 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15172 pointers for hardware watchpoint support.
15173 * linux-low.h (struct linux_target_ops): Ditto.
15174 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15175 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15176 to linux_target_ops.
15177 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15178 reply packet.
15179 * server.c (main): Recognize 'Z' and 'z' packets.
15180
b0ded00b
UW
151812005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15182
15183 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15184 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15185 (the_low_target): Add new members.
15186
8643e2ad
DJ
151872005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15188
15189 * proc-service.c (ps_lgetregs): Search all_processes instead of
15190 all_threads.
15191
fc620387
DJ
151922005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15193
15194 * server.c (start_inferior): Change return type to int.
15195 (attach_inferior): Change sigptr to int *.
15196 (handle_v_cont, handle_v_requests): Change signal to int *.
15197 (main): Change signal to int.
15198
151992005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15200
15201 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15202 * configure.srv: Add m32r*-*-linux*.
15203 * linux-m32r-low.c: New file.
15204
e0e76420
DJ
152052005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15206
15207 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15208
a1928bad
DJ
152092005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15210
15211 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15212 Take unsigned long arguments for PIDs.
15213 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15214 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15215 (wait_for_sigstop, linux_resume_one_process)
15216 (regsets_fetch_inferior_registers, linux_send_signal)
15217 (linux_read_auxv): Likewise. Update the types of variables holding
15218 PIDs. Update format string specifiers.
15219 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15220 * remote-utils.c (prepare_resume_reply): Likewise.
15221 * server.c (cont_thread, general_thread, step_thread)
15222 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15223 unsigned long.
15224 (handle_query): Update format specifiers.
15225 (handle_v_cont, main): Use strtoul for thread IDs.
15226 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15227 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15228 (general_thread, step_thread, thread_from_wait)
15229 (old_thread_from_wait): Update.
15230 * target.h (struct thread_resume): Use unsigned long for THREAD.
15231 (struct target_ops): Use unsigned long for arguments to attach and
15232 thread_alive.
15233
dcdb98d2
DJ
152342005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15235
15236 * acinclude.m4: Include bfd/bfd.m4 directly.
15237 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15238 <agriffis@toolchain.org>.
15239 * aclocal.m4, configure: Regenerated.
15240
bec39cab
AC
152412005-01-07 Andrew Cagney <cagney@gnu.org>
15242
15243 * configure.ac: Rename configure.in, require autoconf 2.59.
15244 * configure: Re-generate.
15245
434c4c77
DJ
152462004-12-08 Daniel Jacobowitz <dan@debian.org>
15247
15248 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15249 LIBS when finished.
15250 * aclocal.m4: Regenerated.
15251 * configure: Regenerated.
15252
db1d3e1b
AS
152532004-11-21 Andreas Schwab <schwab@suse.de>
15254
15255 * linux-m68k-low.c (m68k_num_gregs): Define.
15256 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15257 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15258 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15259 (m68k_breakpoint_at): New. Add to the_low_target.
15260
15261 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15262 srv_linux_thread_db to yes.
15263
43360365
JB
152642004-10-20 Joel Brobecker <brobecker@gnat.com>
15265
15266 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15267 (ARCH_SET_FS): Likewise.
15268 (ARCH_GET_FS): Likewise.
15269 (ARCH_GET_GS): Likewise.
15270
fd500816
DJ
152712004-10-16 Daniel Jacobowitz <dan@debian.org>
15272
15273 * linux-i386-low.c (ps_get_thread_area): New.
15274 * linux-x86-64-low.c (ps_get_thread_area): New.
15275 * linux-low.c: Include <sys/syscall.h>.
15276 (linux_kill_one_process): Don't kill the first thread here.
15277 (linux_kill): Kill the first thread here.
15278 (kill_lwp): New function.
15279 (send_sigstop, linux_send_signal): Use it.
15280 * proc-service.c: Clean up #ifdefs.
15281 (fpregset_info): Delete.
15282 (ps_lgetregs): Update and enable implementation.
15283 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15284 implementations.
15285 * remote-utils.c (struct sym_cache, symbol_cache): New.
15286 (input_interrupt): Print a clearer message.
15287 (async_io_enabled): New variable.
15288 (enable_async_io, disable_async_io): Use it. Update comments.
15289 (look_up_one_symbol): Use the symbol cache.
15290 * thread-db.c (thread_db_look_up_symbols): New function.
15291 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15292
f6de3c42
DJ
152932004-10-16 Daniel Jacobowitz <dan@debian.org>
15294
15295 * configure.in: Test for -rdynamic.
15296 * configure: Regenerated.
15297 * Makefile (INTERNAL_LDFLAGS): New.
15298 (gdbserver, gdbreplay): Use it.
15299
2c0fc042
AC
153002004-09-02 Andrew Cagney <cagney@gnu.org>
15301
15302 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15303
075b3282
DJ
153042004-03-23 Daniel Jacobowitz <drow@mvista.com>
15305
15306 * linux-low.c (linux_wait): Clear all_processes list also.
15307
fa6a77dc
DJ
153082004-03-12 Daniel Jacobowitz <drow@mvista.com>
15309
15310 * linux-low.c: Include <errno.h>. Remove extern declaration of
15311 errno.
15312
6d782a97
DJ
153132004-03-12 Daniel Jacobowitz <drow@mvista.com>
15314
15315 * gdbreplay.c, server.h, utils.c: Update copyright years.
15316
3a7fb99b
DJ
153172004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15318
15319 * server.c (main): Print child status or termination signal from
15320 variable 'signal', not 'sig'.
15321
c3e735a6
DJ
153222004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15323
15324 * linux-low.c (linux_read_memory): Change return type to
15325 int. Check for and return error from ptrace().
15326 * target.c (read_inferior_memory): Change return type to int. Pass
15327 back return status from the_target->read_memory().
15328 * target.h (struct target_ops): Adapt *read_memory() prototype.
15329 Update comment.
15330 (read_inferior_memory): Adapt prototype.
15331 * server.c (main): Return an error packet if
15332 read_inferior_memory() returns an error.
15333
a59d1c82
DJ
153342004-03-04 Daniel Jacobowitz <drow@mvista.com>
15335
15336 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15337 Unify with other clean targets.
15338
dc3f8883
DJ
153392004-02-29 Daniel Jacobowitz <drow@mvista.com>
15340
15341 * server.c (handle_v_cont): Call set_desired_inferior.
15342
89a208da
DJ
153432004-02-29 Daniel Jacobowitz <drow@mvista.com>
15344
15345 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15346
62ea82f5
DJ
153472004-02-29 Daniel Jacobowitz <drow@mvista.com>
15348
15349 * linux-low.c (linux_wait): Unblock async I/O.
15350 (linux_resume): Block and enable async I/O.
15351 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15352 * server.h (block_async_io, unblock_async_io): Add prototypes.
15353
6910d122
DJ
153542004-02-29 Daniel Jacobowitz <drow@mvista.com>
15355
15356 * remote-utils.c (remote_open): Print a status notice after
15357 opening a TCP port.
15358 * server.c (attach_inferior): Print a status notice after
15359 attaching.
15360
153612004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15362
15363 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15364
c89dc5d4
DJ
153652004-02-26 Daniel Jacobowitz <drow@mvista.com>
15366
15367 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15368 error packet.
15369 * server.c, target.h: Update copyright years.
15370
4b8dad4a
RM
153712004-02-25 Roland McGrath <roland@redhat.com>
15372
15373 * target.h (struct target_ops): New member `read_auxv'.
15374 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15375 * linux-low.c (linux_read_auxv): New function.
15376 (linux_target_ops): Initialize `read_auxv' member to that.
15377
d7446758
JB
153782004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15379
15380 Committed by Jim Blandy <jimb@redhat.com>.
15381
15382 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15383 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15384 instead of GPR_SIZE to distiguish s390 and s390x targets.
15385
5544ad89
DJ
153862004-01-31 Daniel Jacobowitz <drow@mvista.com>
15387
15388 * linux-low.c: Update copyright year.
15389 (check_removed_breakpoint): Clear pending_is_breakpoint.
15390 (linux_set_resume_request, linux_queue_one_thread)
15391 (resume_status_pending_p): New functions.
15392 (linux_continue_one_thread): Use process->resume.
15393 (linux_resume): Only resume threads if there are no pending events.
15394 * linux-low.h (struct process_info): Add resume request
15395 pointer.
15396
2a68b70e
DJ
153972004-01-30 Daniel Jacobowitz <drow@mvista.com>
15398
15399 * regcache.c (new_register_cache): Clear the allocated register
15400 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15401
64386c31
DJ
154022003-10-13 Daniel Jacobowitz <drow@mvista.com>
15403
15404 * linux-low.c (linux_resume): Take a struct thread_resume *
15405 argument.
15406 (linux_wait): Update call.
15407 (resume_ptr): New static variable.
15408 (linux_continue_one_thread): Renamed from
15409 linux_continue_one_process. Use resume_ptr.
15410 (linux_resume): Use linux_continue_one_thread.
15411 * server.c (handle_v_cont, handle_v_requests): New functions.
15412 (myresume): New function.
15413 (main): Handle 'v' case.
15414 * target.h (struct thread_resume): New type.
15415 (struct target_ops): Change argument of "resume" to struct
15416 thread_resume *.
15417 (myresume): Delete macro.
15418
c938e9b0
L
154192003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15420
15421 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15422 (uninstall): Support DESTDIR.
15423
7f313d07
BC
15424Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15425
15426 * configure.srv: Add xscale*linux copy of arm*linux entry.
15427
3b2fc2ea
DJ
154282003-07-24 Daniel Jacobowitz <drow@mvista.com>
15429
15430 * linux-arm-low.c (arm_reinsert_addr): New function.
15431 (the_low_target): Add arm_reinsert_addr.
15432
1c0a559e
MK
154332003-07-08 Mark Kettenis <kettenis@gnu.org>
15434
15435 * mem-break.c: Remove whitespace at end of file.
15436
43d5792c
DJ
154372003-06-28 Daniel Jacobowitz <drow@mvista.com>
15438
15439 * configure.in: Check whether we need to prototype strerror.
15440 * server.h: Optionally prototype strerror.
15441 * gdbreplay.c (perror_with_name): Use strerror.
15442 * linux-low.c (linux_attach_lwp): Use strerror.
15443 * utils.c (perror_with_name): Use strerror.
15444 * config.in, configure: Regenerated.
15445
c8a86edf
DJ
154462003-06-28 Daniel Jacobowitz <drow@mvista.com>
15447
15448 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15449 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15450
73d37363
DJ
154512003-06-20 Daniel Jacobowitz <drow@mvista.com>
15452
15453 * Makefile.in (SFILES): Update.
15454 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15455 low-sun3.c: Remove files.
15456
6ad8ae5c
DJ
154572003-06-17 Daniel Jacobowitz <drow@mvista.com>
15458
15459 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15460 (linux_detach_one_process, linux_detach): New functions.
15461 (linux_target_ops): Add linux_detach.
15462 * server.c (main): Handle 'D' packet.
15463 * target.h (struct target_ops): Add "detach" member.
15464 (detach_inferior): Define.
15465
1581182a
MK
154662003-06-13 Mark Kettenis <kettenis@gnu.org>
15467
15468 From Kelley Cook <kelleycook@wideopenwest.com>:
15469 * configure.srv: Accept i[34567]86 variants.
15470
e5379b03
DJ
154712003-06-05 Daniel Jacobowitz <drow@mvista.com>
15472
15473 * linux-low.c (linux_wait_for_event): Correct comment typos.
15474 (linux_resume_one_process): Call check_removed_breakpoint.
15475 (linux_send_signal): New function.
15476 (linux_target_ops): Add linux_send_signal.
15477 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15478 of kill.
15479 * target.h (struct target_ops): Add send_signal.
15480
2ff29de4
JB
154812003-05-29 Jim Blandy <jimb@redhat.com>
15482
15483 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15484 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15485 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15486 away part of the register's value.
15487
254787d4
DJ
154882003-03-26 Daniel Jacobowitz <drow@mvista.com>
15489
15490 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15491 (linux_wait_for_event, linux_init_signals): Likewise.
15492
94e10508
DJ
154932003-03-17 Daniel Jacobowitz <drow@mvista.com>
15494
15495 * configure.in: Check for stdlib.h.
15496 * configure: Regenerated.
15497 * config.in: Regenerated.
15498
4c0711e0
DJ
154992003-01-04 Andreas Schwab <schwab@suse.de>
15500
15501 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15502
ef66e766
AC
155032003-01-02 Andrew Cagney <ac131313@redhat.com>
15504
15505 * Makefile.in: Remove obsolete code.
15506
a1358604
DJ
155072002-11-20 Daniel Jacobowitz <drow@mvista.com>
15508
15509 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15510 defined(PT_FPR0_HI).
15511
23ce3b1c
DJ
155122002-11-17 Stuart Hughes <seh@zee2.com>
15513
15514 * linux-arm-low.c (arm_num_regs): Increase.
15515 (arm_regmap): Include status register.
15516
155172002-11-17 Daniel Jacobowitz <drow@mvista.com>
15518
15519 * linux-low.c (register_addr): Remove incorrect -1 check.
15520
a9fa9f7d
DJ
155212002-08-29 Daniel Jacobowitz <drow@mvista.com>
15522
15523 * linux-low.c (linux_create_inferior): Call setpgid. Return
15524 the new PID.
15525 (unstopped_p, linux_signal_pid): Remove.
15526 (linux_target_ops): Remove linux_signal_pid.
15527 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15528 global instead of target method.
15529 * target.h (struct target_ops): Remove signal_pid. Update comment
15530 for create_inferior.
15531 * server.c (signal_pid): New variable.
15532 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15533 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15534 (attach_inferior): Set signal_pid.
15535
17574093
DJ
155362002-08-23 Daniel Jacobowitz <drow@mvista.com>
15537
15538 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15539
155402002-08-20 Jim Blandy <jimb@redhat.com>
15541
15542 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15543 default for this.
15544
155452002-08-01 Andrew Cagney <cagney@redhat.com>
15546
15547 * Makefile.in: Make chill references obsolete.
15548
155492002-07-24 Kevin Buettner <kevinb@redhat.com>
15550
15551 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15552 * configure: Regenerate.
15553 * config.in: Regenerate.
15554
155552002-07-09 David O'Brien <obrien@FreeBSD.org>
15556
15557 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15558 (perror_with_name, remote_close, remote_open, expect, play): Static.
15559
155602002-07-04 Michal Ludvig <mludvig@suse.cz>
15561
4b8dad4a 15562 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15563 byte offsets instead of an array of indexes.
15564 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15565
155662002-06-13 Daniel Jacobowitz <drow@mvista.com>
15567
15568 * regcache.c: Add comment.
15569
155702002-06-11 Daniel Jacobowitz <drow@mvista.com>
15571
15572 * thread-db.c: New file.
15573 * proc-service.c: New file.
15574 * acinclude.m4: New file.
15575 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15576 proc-service.o, and thread-db.o.
15577 (linux-low.o): Add USE_THREAD_DB.
15578 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15579 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15580 * aclocal.m4: Regenerated.
15581 * config.in: Regenerated.
15582 * configure: Regenerated.
15583 * configure.in: Check for proc_service.h, sys/procfs.h,
15584 thread_db.h, and linux/elf.h headrs.
15585 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15586 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15587 Check for -lthread_db and thread support.
15588 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15589 PowerPC, and SuperH.
15590 * i387-fp.c: Constify arguments.
15591 * i387-fp.h: Likewise.
15592 * inferiors.c: (struct thread_info): Renamed from
15593 `struct inferior_info'. Remove PID member. Use generic inferior
15594 list header. All uses updated.
15595 (inferiors, signal_pid): Removed.
15596 (all_threads): New variable.
15597 (get_thread): Define.
15598 (add_inferior_to_list): New function.
15599 (for_each_inferior): New function.
15600 (change_inferior_id): New function.
15601 (add_inferior): Removed.
15602 (remove_inferior): New function.
15603 (add_thread): New function.
15604 (free_one_thread): New function.
15605 (remove_thread): New function.
15606 (clear_inferiors): Use for_each_inferior and free_one_thread.
15607 (find_inferior): New function.
15608 (find_inferior_id): New function.
15609 (inferior_target_data): Update argument type.
15610 (set_inferior_target_data): Likewise.
15611 (inferior_regcache_data): Likewise.
15612 (set_inferior_regcache_data): Likewise.
15613 * linux-low.c (linux_bp_reinsert): Remove.
15614 (all_processes, stopping_threads, using_thrads)
15615 (struct pending_signals, debug_threads, pid_of): New.
15616 (inferior_pid): Replace with macro.
15617 (struct inferior_linux_data): Remove.
15618 (get_stop_pc, add_process): New functions.
15619 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15620 Use add_process and add_thread.
15621 (linux_attach_lwp): New function, based on old linux_attach. Use
15622 add_process and add_thread. Set stop_expected for new threads.
15623 (linux_attach): New function.
15624 (linux_kill_one_process): New function.
15625 (linux_kill): Kill all LWPs.
15626 (linux_thread_alive): Use find_inferior_id.
15627 (check_removed_breakpoints, status_pending_p): New functions.
15628 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15629 Update. Use WNOHANG. Wait for cloned processes also. Update process
15630 struct for the found process.
15631 (linux_wait_for_event): New function.
15632 (linux_wait): Use it. Support LWPs.
15633 (send_sigstop, wait_for_sigstop, stop_all_processes)
15634 (linux_resume_one_process, linux_continue_one_process): New functions.
15635 (linux_resume): Support LWPs.
15636 (REGISTER_RAW_SIZE): Remove.
15637 (fetch_register): Use register_size instead. Call supply_register.
15638 (usr_store_inferior_registers): Likewise. Call collect_register.
15639 Fix recursive case.
15640 (regsets_fetch_inferior_registers): Improve error message.
15641 (regsets_store_inferior_registers): Add debugging.
15642 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15643 (unstopped_p, linux_signal_pid): New functions.
15644 (linux_target_ops): Add linux_signal_pid.
15645 (linux_init_signals): New function.
15646 (initialize_low): Call it. Initialize using_threads.
15647 * regcache.c (inferior_regcache_data): Add valid
15648 flag.
15649 (get_regcache): Fetch registers lazily. Add fetch argument
15650 and update all callers.
15651 (regcache_invalidate_one, regcache_invalidate): New
15652 functions.
15653 (new_register_cache): Renamed from create_register_cache.
15654 Return the new regcache.
15655 (free_register_cache): Change argument to a void *.
15656 (registers_to_string, registers_from_string): Call get_regcache
15657 with fetch flag set.
15658 (register_data): Make static. Pass fetch flag to get_regcache.
15659 (supply_register): Call get_regcache with fetch flag clear.
15660 (collect_register): Call get_regcache with fetch flag set.
15661 (collect_register_as_string): New function.
15662 * regcache.h: Update.
15663 * remote-utils.c (putpkt): Flush after debug output and use
15664 stderr.
15665 Handle input interrupts while waiting for an ACK.
15666 (input_interrupt): Use signal_pid method.
15667 (getpkt): Flush after debug output and use stderr.
15668 (outreg): Use collect_register_as_string.
15669 (new_thread_notify, dead_thread_notify): New functions.
15670 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15671 and general_thread.
15672 (look_up_one_symbol): Flush after debug output.
15673 * server.c (step_thread, server_waiting): New variables.
15674 (start_inferior): Don't use signal_pid. Update call to mywait.
15675 (attach_inferior): Update call to mywait.
15676 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15677 (main): Don't fetch/store registers explicitly. Use
15678 set_desired_inferior. Support proposed ``Hs'' packet. Update
15679 calls to mywait.
15680 * server.h: Update.
15681 (struct inferior_list, struct_inferior_list_entry): New.
15682 * target.c (set_desired_inferior): New.
15683 (write_inferior_memory): Constify.
15684 (mywait): New function.
15685 * target.h: Update.
15686 (struct target_ops): New signal_pid method.
15687 (mywait): Removed macro, added prototype.
15688
15689 * linux-low.h (regset_func): Removed.
15690 (regset_fill_func, regset_store_func): New.
15691 (enum regset_type): New.
15692 (struct regset_info): Add type field. Use new operation types.
15693 (struct linux_target_ops): stop_pc renamed to get_pc.
15694 Add decr_pc_after_break and breakpoint_at.
15695 (get_process, get_thread_proess, get_process_thread)
15696 (strut process_info, all_processes, linux_attach_lwp)
15697 (thread_db_init): New.
15698
15699 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15700 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15701 (the_low_target): Add new members.
15702 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15703 (i386_store_fpxregset): Constify.
15704 (target_regsets): Add new kind identifier.
15705 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15706 (i386_set_pc): Add debugging.
15707 (i386_breakpoint_at): New function.
15708 (the_low_target): Add new members.
15709 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15710 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15711 (mips_breakpoint_at): New.
15712 (the_low_target): Add new members.
15713 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15714 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15715 (the_low_target): Add new members.
15716 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15717 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15718 (the_low_target): Add new members.
15719 * linux-x86-64-low.c (target_regsets): Add new kind
15720 identifier.
15721
157222002-05-15 Daniel Jacobowitz <drow@mvista.com>
15723
15724 From Martin Pool <mbp@samba.org>:
15725 * server.c (gdbserver_usage): New function.
15726 (main): Call it.
15727
157282002-05-14 Daniel Jacobowitz <drow@mvista.com>
15729
15730 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15731 stop_at -> stop_pc.
15732
157332002-05-04 Andrew Cagney <ac131313@redhat.com>
15734
15735 * Makefile.in: Remove obsolete code.
15736
157372002-04-24 Michal Ludvig <mludvig@suse.cz>
15738
15739 * linux-low.c (regsets_fetch_inferior_registers),
15740 (regsets_store_inferior_registers): Removed cast to int from
15741 ptrace() calls.
15742 * regcache.h: Added declaration of struct inferior_info.
15743
157442002-04-20 Daniel Jacobowitz <drow@mvista.com>
15745
15746 * inferiors.c (struct inferior_info): Add regcache_data.
15747 (add_inferior): Call create_register_cache.
15748 (clear_inferiors): Call free_register_cache.
15749 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15750 * regcache.c (struct inferior_regcache_data): New.
15751 (registers): Remove.
15752 (get_regcache): New function.
15753 (create_register_cache, free_register_cache): New functions.
15754 (set_register_cache): Don't initialize the register cache here.
15755 (registers_to_string, registers_from_string, register_data): Call
15756 get_regcache.
15757 * regcache.h: Add prototypes.
15758 * server.h: Likewise.
15759
157602002-04-20 Daniel Jacobowitz <drow@mvista.com>
15761
15762 * mem-break.c: New file.
15763 * mem-break.h: New file.
15764 * Makefile.in: Add mem-break.o rule; update server.h
15765 dependencies.
15766 * inferiors.c (struct inferior_info): Add target_data
15767 member.
15768 (clear_inferiors): Free target_data member if set.
15769 (inferior_target_data, set_inferior_target_data): New functions.
15770 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15771 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15772 * linux-low.c (linux_bp_reinsert): New variable.
15773 (struct inferior_linux_data): New.
15774 (linux_create_inferior): Use set_inferior_target_data.
15775 (linux_attach): Likewise. Call add_inferior.
15776 (linux_wait_for_one_inferior): New function.
15777 (linux_wait): Call it.
15778 (linux_write_memory): Add const.
15779 (initialize_low): Call set_breakpoint_data.
15780 * linux-low.h (struct linux_target_ops): Add breakpoint
15781 handling members.
15782 * server.c (attach_inferior): Remove extra add_inferior
15783 call.
15784 * server.h: Include mem-break.h. Update inferior.c
15785 prototypes.
15786 * target.c (read_inferior_memory)
15787 (write_inferior_memory): New functions.
15788 * target.h (read_inferior_memory)
15789 (write_inferior_memory): Change macros to prototypes.
15790 (struct target_ops): Update comments. Add const to write_memory
15791 definition.
15792
157932002-04-11 Daniel Jacobowitz <drow@mvista.com>
15794
15795 * linux-low.c (usr_store_inferior_registers): Support
15796 registers which are allowed to fail to store.
15797 * linux-low.h (linux_target_ops): Likewise.
15798 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15799 (ppc_cannot_store_register): FPSCR may not be storable.
15800
158012002-04-09 Daniel Jacobowitz <drow@mvista.com>
15802
15803 * server.h: Include <string.h> if HAVE_STRING_H.
15804 * ChangeLog: Correct paths in last ChangeLog entry.
15805
158062002-04-09 Daniel Jacobowitz <drow@mvista.com>
15807
15808 * linux-low.h: Remove obsolete prototypes.
15809 (struct linux_target_ops): New.
15810 (extern the_low_target): New.
15811 * linux-low.c (num_regs, regmap): Remove declarations.
15812 (register_addr): Use the_low_target explicitly.
15813 (fetch_register): Likewise.
15814 (usr_fetch_inferior_registers): Likewise.
15815 (usr_store_inferior_registers): Likewise.
15816 * linux-arm-low.c (num_regs): Remove.
15817 (arm_num_regs): Define.
15818 (arm_regmap): Renamed from regmap, made static.
15819 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15820 made static.
15821 (arm_cannot_store_register): Renamed from cannot_store_register,
15822 made static.
15823 (the_low_target): New.
15824 * linux-i386-low.c (num_regs): Remove.
15825 (i386_num_regs): Define.
15826 (i386_regmap): Renamed from regmap, made static.
15827 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15828 made static.
15829 (i386_cannot_store_register): Renamed from cannot_store_register,
15830 made static.
15831 (the_low_target): New.
15832 * linux-ia64-low.c (num_regs): Remove.
15833 (ia64_num_regs): Define.
15834 (ia64_regmap): Renamed from regmap, made static.
15835 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15836 made static.
15837 (ia64_cannot_store_register): Renamed from cannot_store_register,
15838 made static.
15839 (the_low_target): New.
15840 * linux-m68k-low.c (num_regs): Remove.
15841 (m68k_num_regs): Define.
15842 (m68k_regmap): Renamed from regmap, made static.
15843 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15844 made static.
15845 (m68k_cannot_store_register): Renamed from cannot_store_register,
15846 made static.
15847 (the_low_target): New.
15848 * linux-mips-low.c (num_regs): Remove.
15849 (mips_num_regs): Define.
15850 (mips_regmap): Renamed from regmap, made static.
15851 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15852 made static.
15853 (mips_cannot_store_register): Renamed from cannot_store_register,
15854 made static.
15855 (the_low_target): New.
15856 * linux-ppc-low.c (num_regs): Remove.
15857 (ppc_num_regs): Define.
15858 (ppc_regmap): Renamed from regmap, made static.
15859 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15860 made static.
15861 (ppc_cannot_store_register): Renamed from cannot_store_register,
15862 made static.
15863 (the_low_target): New.
15864 * linux-s390-low.c (num_regs): Remove.
15865 (s390_num_regs): Define.
15866 (s390_regmap): Renamed from regmap, made static.
15867 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15868 made static.
15869 (s390_cannot_store_register): Renamed from cannot_store_register,
15870 made static.
15871 (the_low_target): New.
15872 * linux-sh-low.c (num_regs): Remove.
15873 (sh_num_regs): Define.
15874 (sh_regmap): Renamed from regmap, made static.
15875 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15876 made static.
15877 (sh_cannot_store_register): Renamed from cannot_store_register,
15878 made static.
15879 (the_low_target): New.
15880 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15881 (the_low_target): New.
15882
158832002-04-09 Daniel Jacobowitz <drow@mvista.com>
15884
15885 * Makefile.in: Add stamp-h target.
15886 * configure.in: Create stamp-h.
15887 * configure: Regenerated.
15888
158892002-04-09 Daniel Jacobowitz <drow@mvista.com>
15890
15891 * inferiors.c: New file.
15892 * target.c: New file.
15893 * target.h: New file.
15894 * Makefile.in: Add target.o and inferiors.o. Update
15895 dependencies.
15896 * linux-low.c (inferior_pid): New static variable,
15897 moved from server.c.
15898 (linux_create_inferior): Renamed from create_inferior.
15899 Call add_inferior. Return 0 on success instead of a PID.
15900 (linux_attach): Renamed from myattach.
15901 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15902 (linux_thread_alive): Renamed from mythread_alive.
15903 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15904 child dies.
15905 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15906 (regsets_store_inferior_registers): Correct error message.
15907 Add missing ``return 0''.
15908 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15909 (linux_store_registers): Renamed from store_inferior_registers.
15910 (linux_read_memory): Renamed from read_inferior_memory.
15911 (linux_write_memory): Renamed from write_inferior_memory.
15912 (linux_target_ops): New structure.
15913 (initialize_low): Call set_target_ops ().
15914 * remote-utils.c (unhexify): New function.
15915 (hexify): New function.
15916 (input_interrupt): Send signals to ``signal_pid''.
15917 * server.c (inferior_pid): Remove.
15918 (start_inferior): Update create_inferior call.
15919 (attach_inferior): Call add_inferior.
15920 (handle_query): New function.
15921 (main): Call handle_query for `q' packets.
15922 * server.h: Include "target.h". Remove obsolete prototypes.
15923 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15924
159252002-04-09 Daniel Jacobowitz <drow@mvista.com>
15926
15927 * Makefile.in: Add WARN_CFLAGS. Update configury
15928 dependencies.
15929 * configure.in: Check for <string.h>
15930 * configure: Regenerate.
15931 * config.in: Regenerate.
15932 * gdbreplay.c: Include needed system headers.
15933 (remote_open): Remove strchr prototype.
15934 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15935 * regcache.c (supply_register): Change buf argument to const void *.
15936 (supply_register_by_name): Likewise.
15937 (collect_register): Change buf argument to void *.
15938 (collect_register_by_name): Likewise.
15939 * regcache.h: Add missing prototypes.
15940 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15941 * server.c (handle_query): New function.
15942 (attached): New static variable, moved out of main.
15943 (main): Quiet longjmp clobber warnings.
15944 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15945 * utils.c (error): Remove NORETURN.
15946 (fatal): Likewise.