Remove usage of find_inferior in linux_detach
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
798a38e8
SM
12017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-low.c (linux_detach_lwp_callback): Return void, remove
4 args parameter, don't check for pid.
5 (linux_detach): Use for_each_thread.
6
e4eb0dec
SM
72017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
8
9 * linux-low.c (struct counter): Remove.
10 (second_thread_of_pid_p): Remove.
11 (last_thread_of_process_p): Use find_thread.
12
83e1b6c1
SM
132017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
14
15 * inferiors.c (find_inferior_in_random): Remove.
16 * inferiors.h (find_inferior_in_random): Remove.
17 * linux-low.c (status_pending_p_callback): Return bool, accept
18 parameter ptid directly.
19 (linux_wait_for_event_filtered): Use find_thread_in_random.
20 (linux_wait_1): Likewise.
21
8dc7b443
SM
222017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
23
24 * inferiors.c (find_inferior_id): Remove.
25 (find_thread_ptid): Move implemention from find_inferior_id to
26 here.
27 * inferiors.h (find_inferior_id): Remove.
28 * server.c (handle_status): Use find_thread_ptid.
29 (process_serial_event): Likewise.
30 * thread-db.c (find_one_thread): Likewise.
31 (thread_db_thread_handle): Likewise.
32 * win32-low.c (thread_rec): Likewise.
33 (child_delete_thread): Likewise.
34 (win32_thread_alive): Likewise.
35 (get_child_debug_event): Likewise.
36
da25033c
SM
372017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
38
39 * linux-mips-low.c (update_watch_registers_callback): Return
40 void, remove pid_p parameter, don't check for pid.
41 (mips_insert_point, mips_remove_point): Use for_each_thread.
42
c91bb56b
SM
432017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
44
45 * lynx.low (lynx_delete_thread_callback): Remove.
46 (lynx_mourn): Use for_each_thread.
47
634a3254
SM
482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
49
50 * regcache.c (regcache_invalidate_one): Remove.
51 (regcache_invalidate_pid): use for_each_thread.
52
41272101
TT
532017-11-26 Tom Tromey <tom@tromey.com>
54
55 * linux-low.c (linux_create_inferior): Update.
56
f5291a6f
UW
572017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
58
59 * spu-low.c (spu_create_inferior): Fix typo in argument name.
60
6654d750
AH
612017-11-24 Alan Hayward <alan.hayward@arm.com>
62
63 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
64 * linux-aarch64-low.c (initialize_low_arch): Call init func.
65 * linux-aarch64-tdesc-selftest.c: New file.
66 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
67
682017-11-24 Alan Hayward <alan.hayward@arm.com>
69
70 * configure.srv: Add new file.
71 * linux-aarch64-low.c (initialize_low_arch): Call init func.
72 * linux-aarch64-tdesc-selftest.c: New file.
73 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
74
49bdb7ee
AH
752017-11-24 Alan Hayward <alan.hayward@arm.com>
76
77 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
78 * linux-aarch64-low.c (initialize_low_arch): Remove init.
79 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
80
d6d7ce56
AH
812017-11-24 Alan Hayward <alan.hayward@arm.com>
82
83 * configure.srv: Add new files.
84 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
85 aarch64_linux_read_description.
86 * linux-aarch64-low.c (aarch64_linux_read_description):
87 Merge with aarch64_arch_setup.
88 (aarch64_arch_setup): Call aarch64_linux_read_description.
89 * linux-aarch64-tdesc.c: New file.
90 * linux-aarch64-tdesc.h: New file.
91
506fe5f4
YQ
922017-11-24 Yao Qi <yao.qi@linaro.org>
93
94 * configure.srv: Set $srv_regobj for tic6x-linux.
95 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
96 (tic6x_read_description): Move some code to tic6x_arch_setup.
97 (tic6x_tdesc_test): New function.
98 (initialize_low_arch): Call selftests::register_test.
99
29f9a567
YQ
1002017-11-22 Yao Qi <yao.qi@linaro.org>
101
102 * remote-utils.c (prepare_resume_reply): Use memcpy.
103
578290ec
SM
1042017-11-19 Simon Marchi <simon.marchi@ericsson.com>
105
106 * linux-low.c (kill_one_lwp_callback): Return void, take
107 argument directly, don't filter on pid.
108 (linux_kill): Use for_each_thread.
109
eca55aec
SM
1102017-11-19 Simon Marchi <simon.marchi@ericsson.com>
111
112 * linux-low.c (need_step_over_p): Return bool, remove dummy
113 argument.
114 (linux_resume, proceed_all_lwps): Use find_thread.
115
25c28b4d
SM
1162017-11-19 Simon Marchi <simon.marchi@ericsson.com>
117
118 * linux-low.c (resume_status_pending_p): Return bool, remove
119 flag_p argument.
120 (linux_resume): Use find_thread.
121
5fdda392
SM
1222017-11-19 Simon Marchi <simon.marchi@ericsson.com>
123
124 * linux-low.c (struct thread_resume_array): Remove.
125 (linux_set_resume_request): Return void, take arguments
126 directly.
127 (linux_resume): Use for_each_thread.
128
fcb056a5
SM
1292017-11-19 Simon Marchi <simon.marchi@ericsson.com>
130
131 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
132 return bool, remove data argument.
133 (linux_stabilize_threads): Use find_thread.
134
139720c5
SM
1352017-11-19 Simon Marchi <simon.marchi@ericsson.com>
136
137 * linux-low.c (unsuspend_one_lwp): Remove.
138 (unsuspend_all_lwps): Use for_each_thread, inline code from
139 unsuspend_one_lwp.
140
6d1e5673
SM
1412017-11-19 Simon Marchi <simon.marchi@ericsson.com>
142
143 * gdbthread.h (find_thread): Add overload with ptid_t filter.
144 * linux-low.c (struct iterate_over_lwps_args): Remove.
145 (iterate_over_lwps_filter): Remove.
146 (iterate_over_lwps): Use find_thread.
147
bbf550d5
SM
1482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
149
150 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
151 (linux_handle_new_gdb_connection): Use for_each_thread, inline
152 code from reset_lwp_ptrace_options_callback.
153
00192f77
SM
1542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
155
156 * linux-arm-low.c (struct update_registers_data): Remove.
157 (update_registers_callback): Return void, take arguments
158 directly, don't check thread's pid.
159 (arm_insert_point, arm_remove_point): Use for_each_thread.
160
2bee2b6c
SM
1612017-11-19 Simon Marchi <simon.marchi@ericsson.com>
162
163 * win32-low.c (continue_one_thread): Return void, take argument
164 directly.
165 (child_continue): Use for_each_thread.
166
0b360f19
SM
1672017-11-19 Simon Marchi <simon.marchi@ericsson.com>
168
169 * win32-i386-low.c (update_debug_registers_callback): Rename
170 to ...
171 (update_debug_registers): ... this, return void, remove pid_p arg.
172 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
173
f27866ba
SM
1742017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
175
176 * inferiors.h (struct process_info): Add constructor, initialize
177 fields..
178 <syscalls_to_catch>: Change type to std::vector<int>.
179 * inferiors.c (add_process): Allocate process_info with new.
180 (remove_process): Free process_info with delete.
181 * linux-low.c (handle_extended_wait): Adjust.
182 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
183 * server.c (handle_general_set): Adjust.
184
e849ea89
PA
1852017-11-16 Pedro Alves <palves@redhat.com>
186
187 * remote-utils.c (remote_close): Block SIGIO signals instead of
188 uninstalling the SIGIO handler.
189
1d0aa65c
AH
1902017-11-16 Alan Hayward <alan.hayward@arm.com>
191
192 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
193
3491a34c
YQ
1942017-11-16 Yao Qi <yao.qi@linaro.org>
195
196 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
197 (tic6x_store_gregset): Likewise.
198 (tic6x_usrregs_info): Move it up.
199
a602f924
AH
2002017-11-15 Alan Hayward <alan.hayward@arm.com>
201
202 * Makefile.in: Update arch rules.
203 * configure.srv: Explicitly mark arch/ files.
204
5616b6c3
AS
2052017-11-13 Andreas Schwab <schwab@suse.de>
206
207 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
208 function.
209 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
210
d1928160
PA
2112017-11-06 Pedro Alves <palves@redhat.com>
212
213 * config.in, configure: Regenerate.
214
bac608e7
SM
2152017-10-27 Simon Marchi <simon.marchi@ericsson.com>
216
217 * target.c (struct thread_search): Remove.
218 (thread_search_callback): Remove.
219 (prepare_to_access_memory): Use for_each_thread instead of
220 find_inferior. Inline code from thread_search_callback.
221
eaddb425
SM
2222017-10-27 Simon Marchi <simon.marchi@ericsson.com>
223
224 * server.c (struct visit_actioned_threads_data): Remove.
225 (visit_actioned_threads): Change prototype to take arguments
226 directly.
227 (resume): Use find_thread instead of find_inferior.
228
99078d34
SM
2292017-10-27 Simon Marchi <simon.marchi@ericsson.com>
230
231 * server.c (queue_stop_reply_callback): Change prototype, return
232 void.
233 (find_status_pending_thread_callback): Remove.
234 (handle_status): Replace find_inferior with find_thread and
235 for_each_thread.
236
cc628f3d
AH
2372017-10-25 Alan Hayward <alan.hayward@arm.com>
238
239 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
240 with REGNO.
241 (aarch64_store_gregset): Likewise.
242 (aarch64_fill_fpregset): Likewise.
243 (aarch64_store_fpregset): Likewise.
244
4d3bb80e
SM
2452017-10-21 Simon Marchi <simon.marchi@ericsson.com>
246
247 * gdbthread.h (find_thread, for_each_thread): New functions.
248 * inferiors.c (thread_of_pid): Remove.
249 (find_any_thread_of_pid): Use find_thread.
250 * linux-low.c (num_lwps): Use for_each_thread.
251
7a7cdfa0
YQ
2522017-10-17 Yao Qi <yao.qi@linaro.org>
253
254 * Makefile.in: Remove one rule.
255 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
256
e675d170
YQ
2572017-10-17 Yao Qi <yao.qi@linaro.org>
258
259 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
260 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
261
7eb4e0f9
YQ
2622017-10-17 Yao Qi <yao.qi@linaro.org>
263
264 * configure.srv: Rename arm.o with arch/arm.o.
265
60d6cfc9
YQ
2662017-10-17 Yao Qi <yao.qi@linaro.org>
267
268 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
269 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
270 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
271 (arch-i386.o, arch-amd64.o): Remove rules.
272 (arch/%.o): New rule.
273 Update POSTCOMPILE and COMPILE.pre.
274 * configure.ac: Invoke AC_CONFIG_COMMANDS.
275 * configure: Re-generated.
276 * configure.srv: Replace arch-i386.o with arch/i386.o.
277 Replace arch-amd64.o with arch/amd64.o.
278
5bfda255
YQ
2792017-10-16 Yao Qi <yao.qi@linaro.org>
280
281 * configure: Regenerated.
282
9c80ecd6
SM
2832017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
284
285 * inferiors.h: (struct inferior_list): Remove.
286 (struct inferior_list_entry); Remove.
287 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
288 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
289 get_first_inferior): Remove.
290 (for_each_inferior, for_each_inferior_with_data, find_inferior,
291 find_inferior_id, find_inferior_in_random): Change signature.
292 * inferiors.c (all_threads): Change type to
293 std::list<thread_info *>.
294 (get_thread): Remove macro.
295 (find_inferior, find_inferior_id): Change signature, implement
296 using find_thread.
297 (find_inferior_in_random): Change signature, implement using
298 find_thread_in_random.
299 (for_each_inferior, for_each_inferior_with_data): Change
300 signature, implement using for_each_thread.
301 (add_inferior_to_list, remove_inferior): Remove.
302 (add_thread, get_first_thread, thread_of_pid,
303 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
304 (get_first_inferior, one_inferior_p, clear_inferior_list):
305 Remove.
306 (clear_inferiors, get_thread_process): Update.
307 * gdbthread.h: Include <list>.
308 (struct thread_info) <entry>: Remove field.
309 <id>: New field.
310 (all_threads): Change type to std::list<thread_info *>.
311 (get_first_inferior): Add doc.
312 (find_thread, for_each_thread, find_thread_in_random): New
313 functions.
314 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
315 * linux-arm-low.c (update_registers_callback): Update.
316 * linux-low.c (second_thread_of_pid_p): Update.
317 (kill_one_lwp_callback, linux_detach_lwp_callback,
318 delete_lwp_callback, status_pending_p_callback, same_lwp,
319 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
320 iterate_over_lwps, not_stopped_callback,
321 resume_stopped_resumed_lwps, count_events_callback,
322 select_singlestep_lwp_callback, select_event_lwp_callback,
323 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
324 suspend_and_send_sigstop_callback, wait_for_sigstop,
325 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
326 lwp_running, linux_set_resume_request, resume_status_pending_p,
327 need_step_over_p, start_step_over, linux_resume_one_thread,
328 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
329 reset_lwp_ptrace_options_callback): Update.
330 * linux-mips-low.c (update_watch_registers_callback): Update.
331 * regcache.c (regcache_invalidate_one, regcache_invalidate):
332 Update.
333 (free_register_cache_thread_one): Remove.
334 (regcache_release): Update.
335 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
336 handle_qxfer_threads_worker): Update.
337 (handle_query): Update, use list iterator.
338 (visit_actioned_threads, handle_pending_status,
339 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
340 clear_pending_status_callback, set_pending_status_callback,
341 find_status_pending_thread_callback, handle_status,
342 process_serial_event): Update.
343 * target.c (thread_search_callback): Update.
344 * thread-db.c (thread_db_get_tls_address): Update.
345 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
346 Update.
347 * win32-i386-low.c (update_debug_registers_callback): Update.
348 * win32-low.c (delete_thread_info, child_delete_thread,
349 continue_one_thread, suspend_one_thread,
350 get_child_debug_event): Adjust.
351
9179355e
SM
3522017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
353
354 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
355 * inferiors.h: Include <list>.
356 (struct process_info) <entry>: Remove field.
357 <pid>: New field.
358 (pid_of): Change macro to function.
359 (ptid_of, lwpid_of): Remove macro.
360 (all_processes): Change type to std::list<process_info *>.
361 (ALL_PROCESSES): Remove macro.
362 (for_each_process, find_process): New function.
363 * inferiors.c (all_processes): Change type to
364 std::list<process_info *>.
365 (find_thread_process): Adjust.
366 (add_process): Likewise.
367 (remove_process): Likewise.
368 (find_process_pid): Likewise.
369 (get_first_process): Likewise.
370 (started_inferior_callback): Remove.
371 (have_started_inferiors_p): Adjust.
372 (attached_inferior_callback): Remove.
373 (have_attached_inferiors_p): Adjust.
374 * linux-low.c (check_zombie_leaders): Likewise.
375 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
376 (x86_linux_update_xmltarget): Adjust.
377 * server.c (handle_query): Likewise.
378 (gdb_reattached_process): Remove.
379 (handle_status): Adjust.
380 (kill_inferior_callback): Likewise.
381 (detach_or_kill_inferior): Remove.
382 (print_started_pid): Likewise.
383 (print_attached_pid): Likewise.
384 (detach_or_kill_for_exit): Update.
385 (process_serial_event): Likewise.
386 * linux-arm-low.c (arm_new_fork): Likewise.
387
c9cb8905
SM
3882017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
389
390 * dll.h: Include <list>.
391 (struct dll_info): Add constructor.
392 <entry>: Remove field.
393 (all_dlls): Change type to std::list<dll_info>.
394 * dll.c: Include <algorithm>.
395 (get_dll): Remove macro.
396 (all_dlls): Change type to std::list<dll_info *>.
397 (free_one_dll): Remove.
398 (match_dll): Likewise.
399 (loaded_dll): Adjust.
400 (unloaded_dll): Adjust to all_dlls type change, use
401 std::find_if. Inline code from match_dll.
402 (clear_dlls): Adjust to all_dlls type change.
403 * server.c (emit_dll_description): Remove.
404 (handle_qxfer_libraries): Adjust to all_dlls type change,
405 integrate emit_dll_description's functionality.
406
04ec7890
SM
4072017-10-12 Simon Marchi <simon.marchi@ericsson.com>
408
409 * linux-low.h (struct linux_target_ops) <delete_process>: New
410 field.
411 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
412 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
413 (struct linux_target_ops): Add delete_process callback.
414 * linux-arm-low.c (arm_delete_process): New.
415 (struct linux_target_ops): Add delete_process callback.
416 * linux-bfin-low.c (struct linux_target_ops): Likewise.
417 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
418 * linux-m32r-low.c (struct linux_target_ops): Likewise.
419 * linux-mips-low.c (mips_linux_delete_process): New.
420 (struct linux_target_ops): Add delete_process callback.
421 * linux-ppc-low.c (struct linux_target_ops): Likewise.
422 * linux-s390-low.c (struct linux_target_ops): Likewise.
423 * linux-sh-low.c (struct linux_target_ops): Likewise.
424 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
425 * linux-tile-low.c (struct linux_target_ops): Likewise.
426 * linux-x86-low.c (x86_linux_delete_process): New.
427 (struct linux_target_ops): Add delete_process callback.
428 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
429
466eecee
SM
4302017-10-12 Simon Marchi <simon.marchi@ericsson.com>
431
432 * linux-aarch64-low.c (the_low_target): Add thread delete
433 callback.
434 * linux-arm-low.c (arm_delete_thread): New function.
435 (the_low_target): Add thread delete callback.
436 * linux-bfin-low.c (the_low_target): Likewise.
437 * linux-crisv32-low.c (the_low_target): Likewise.
438 * linux-low.c (delete_lwp): Invoke delete_thread callback if
439 set.
440 * linux-low.h (struct linux_target_ops) <delete_thread>: New
441 field.
442 * linux-m32r-low.c (the_low_target): Add thread delete callback.
443 * linux-mips-low.c (mips_linux_delete_thread): New function.
444 (the_low_target): Add thread delete callback.
445 * linux-ppc-low.c (the_low_target): Likewise.
446 * linux-s390-low.c (the_low_target): Likewise.
447 * linux-sh-low.c (the_low_target): Likewise.
448 * linux-tic6x-low.c (the_low_target): Likewise.
449 * linux-tile-low.c (the_low_target): Likewise.
450 * linux-x86-low.c (the_low_target): Likewise.
451 * linux-xtensa-low.c (the_low_target): Likewise.
452
b79f7801
YZ
4532017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
454
455 * win32-low.c: Include "common-inferior.h".
456
bc3b087d
SDJ
4572017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
458
459 * inferiors.c (set_inferior_cwd): New function.
460 * server.c (handle_general_set): Handle QSetWorkingDir packet.
461 (handle_query): Inform that QSetWorkingDir is supported.
462 * win32-low.c (create_process): Pass the inferior's cwd to
463 CreateProcess.
464
d092c5a2
SDJ
4652017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
466
467 * inferiors.c (current_inferior_cwd): New global variable.
468 (get_inferior_cwd): New function.
469 * inferiors.h (struct process_info) <cwd>: New field.
470
7da0a886
SDJ
4712017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
472
473 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
474 (OBS): Add gdb_tilde_expand.o.
475
289a6840
SM
4762017-10-02 Simon Marchi <simon.marchi@ericsson.com>
477
478 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
479 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
480
256642e8
PA
4812017-09-29 Pedro Alves <palves@redhat.com>
482
483 * ax.c (gdb_parse_agent_expr): Constify.
484 * ax.h (gdb_parse_agent_expr): Constify.
485 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
486 Constify.
487 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
488 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
489 * remote-utils.h (read_ptid): Constify.
490 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
491 (process_point_options, process_serial_event): Constify.
492 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
493 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
494 (cmd_qtbuffer): Constify.
495
5b9ca4d4
PA
4962017-09-29 Pedro Alves <palves@redhat.com>
497
498 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
499 fails.
500
94c207e0
PA
5012017-09-29 Pedro Alves <palves@redhat.com>
502
503 * linux-low.c (handle_extended_wait): Pass parent thread instead
504 of process to thread_db_notice_clone.
505 * linux-low.h (thread_db_notice_clone): Replace parent process
506 parameter with parent thread parameter.
507 * thread-db.c (find_one_thread): Add comment.
508 (thread_db_notice_clone): Replace parent process parameter with
509 parent thread parameter. Temporarily switch to the parent thread.
510
75352e28
SDJ
5112017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
512
513 * gdbthread.h: Include "common-gdbthread.h".
514 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
515 "if" when validating the ptid.
516 * remote-utils.c: Include "gdbthread.h".
517 (prepare_resume_reply): Use "switch_to_thread".
518 * target.c (done_accessing_memory): Likewise.
519
ad339634
AA
5202017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
521
522 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
523 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
524 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
525 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
526 s390x-gs-linux64-ipa.o to ipa_obj.
527 * linux-s390-low.c (HWCAP_S390_GS): New define.
528 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
529 New functions.
530 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
531 (s390_arch_setup): Check for guarded-storage support and choose
532 appropriate tdesc.
533 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
534 init_registers_s390x_gs_linux64.
535 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
536 enum value.
537 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
538 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
539
cc4d742f
SM
5402017-09-22 Simon Marchi <simon.marchi@ericsson.com>
541
542 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
543
f6327dcb
KB
5442017-09-21 Kevin Buettner <kevinb@redhat.com>
545
546 * linux-low.h (struct lwp_info): Add new field, thread_handle.
547 (thread_db_thread_handle): Declare.
548 * linux-low.c (linux_target_ops): Initialize thread_handle.
549 * server.c (handle_qxfer_threads_worker): Add support for
550 "handle" attribute.
551 * target.h (struct target_ops): Add new function pointer,
552 thread_handle.
553 (target_thread_handle): Define.
554 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
555 field in lwp.
556 (thread_db_thread_handle): New function.
557
86299109
KB
5582017-09-21 Kevin Buettner <kevinb@redhat.com>
559
560 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
561 * linux-low.h (thread_db_notice_clone): Declare.
562 * thread-db.c (thread_db_notice_clone): New function.
563
f557a88a
PA
5642017-09-21 Pedro Alves <palves@redhat.com>
565
566 * server.c (gdb_read_memory, handle_status, process_serial_event)
567 (handle_serial_event, handle_target_event): Adjust to
568 set_desired_thread prototype change.
569 * target.c (set_desired_thread): Remove 'use_general' parameter
570 and adjust.
571 * target.h (set_desired_thread): Remove 'use_general' parameter.
572
223ffa71
TT
5732017-09-20 Tom Tromey <tom@tromey.com>
574
575 * target.c (target_terminal::terminal_state): Define.
576 (target_terminal::init): Rename from target_terminal_init.
577 (target_terminal::inferior): Rename from
578 target_terminal_inferior.
579 (target_terminal::ours): Rename from target_terminal_ours.
580 (target_terminal::ours_for_output, target_terminal::info): New.
581
04fd3ba9
SM
5822017-09-16 Simon Marchi <simon.marchi@ericsson.com>
583
584 * server.c (accumulate_file_name_length): Remove.
585 (emit_dll_description): Adjust to std::string change.
586 (handle_qxfer_libraries): Use std::string to hold document.
587
5e187554
SM
5882017-09-16 Simon Marchi <simon.marchi@ericsson.com>
589
590 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
591 return type of xml_escape_text.
592 * server.c (emit_dll_description): Likewise.
593
1526853e
SM
5942017-09-16 Simon Marchi <simon.marchi@ericsson.com>
595
596 * server.c (captured_main): Accept argument for --selftest.
597 Update run_tests call.
598 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
599 when registering selftests.
600
c4dfafab
SDJ
6012017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
602
603 * regcache.c (get_thread_regcache): Update code to use "std::vector"
604 instead of "VEC" for "target_desc.reg_defs".
605 (regcache_cpy): Likewise.
606 (registers_to_string): Likewise.
607 (registers_from_string): Likewise.
608 (find_regno): Likewise.
609 (supply_regblock): Likewise.
610 (regcache_raw_read_unsigned): Likewise.
611 * tdesc.c (init_target_desc): Likewise.
612 (tdesc_create_reg): Likewise.
613 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
614 (struct target_desc) <reg_defs>: Convert to "std::vector".
615 (target_desc): Do not initialize "reg_defs".
616 (~target_desc): Update code to use "std::vector" instead of "VEC"
617 for "target_desc.reg_defs".
618 (operator==): Likewise.
619
124aceb4
SM
6202017-09-15 Simon Marchi <simon.marchi@ericsson.com>
621
622 * inferiors.h (thread_to_gdb_id): Remove.
623 * inferiors.c (thread_to_gdb_id): Remove.
624 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
625 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
626 lynx_store_registers, lynx_read_memory, lynx_write_memory):
627 Likewise.
628 * nto-low.c (nto_fetch_registers, nto_store_registers,
629 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
630
96cde54f
SM
6312017-09-15 Simon Marchi <simon.marchi@ericsson.com>
632
633 * inferiors.h (gdb_id_to_thread_id): Remove.
634 * inferiors.c (gdb_id_to_thread_id): Remove.
635 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
636 removal. Move pid declaration closer to where it's used.
637
e8ca139e
SM
6382017-09-15 Simon Marchi <simon.marchi@ericsson.com>
639
640 * server.c (handle_detach): New function.
641 (process_serial_event): Move code out, call handle_detach.
642
f8a4e119
SM
6432017-09-15 Simon Marchi <simon.marchi@ericsson.com>
644
645 * server.c (require_running): Rename to ...
646 (require_running_or_return): ... this ...
647 (require_running_or_break): ... and this.
648 (handle_query, process_serial_event): Adjust.
649
0eb0a407
SM
6502017-09-15 Simon Marchi <simon.marchi@ericsson.com>
651
652 * linux-low.c (linux_set_resume_request): Remove unused
653 variables.
654
785922a5
SM
6552017-09-15 Simon Marchi <simon.marchi@ericsson.com>
656
657 * server.c (first_thread_of): Remove.
658 (process_serial_event): Replace usage of first_thread_of with
659 find_any_thread_of_pid.
660 * tracepoint.c (same_process_p): Remove.
661 (gdb_agent_about_to_close): Replace usage of same_process_p with
662 find_any_thread_of_pid.
663 * linux-x86-low.c (same_process_callback): Remove.
664 (x86_arch_setup_process_callback): Replace usage of
665 same_process_callback with find_any_thread_of_pid.
666 * thread-db.c (any_thread_of): Remove.
667 (switch_to_process): Replace usage of any_thread_of with
668 find_any_thread_of_pid.
669 * inferiors.c (thread_pid_matches_callback): Remove.
670 (find_thread_process): Adjust to use find_any_thread_of_pid.
671
a059f00c
SDJ
6722017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
673
674 * regcache.c (get_thread_regcache): Guard calls to "memset"
675 with "!VEC_empty".
676
cc397f3a
SDJ
6772017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
678
679 * linux-low.c (handle_extended_wait): Use
680 "allocate_target_description" instead of "XNEW".
681 * linux-x86-low.c (initialize_low_arch): Likewise.
682
22916b07
YQ
6832017-09-05 Yao Qi <yao.qi@linaro.org>
684
685 * configure.srv (srv_i386_regobj): Remove.
686 (srv_amd64_regobj): Remove.
687 (srv_regobj): Set it to "" for x86 non-linux targets.
688 * linux-x86-tdesc.c (i386_linux_read_description):
689 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
690 (init_registers_i386): Remove the declaration.
691 (tdesc_i386): Remove the declaration.
692 (lynx_i386_arch_setup): Call i386_create_target_description.
693 * nto-x86-low.c: Likewise.
694 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
695 [!__x86_64__]: include arch/i386.h.
696 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
697
38602d55
YQ
6982017-09-05 Yao Qi <yao.qi@linaro.org>
699
700 * configure.srv (srv_amd64_linux_xmlfiles): Remove
701 i386/amd64-XXX-linux from it.
702
44b886ff
YQ
7032017-09-05 Yao Qi <yao.qi@linaro.org>
704
705 * configure.srv: Empty srv_amd64_linux_regobj if $development is
706 false.
707 (ipa_amd64_linux_regobj): Remove.
708 (ipa_x32_linux_regobj): Remove.
709
b4570e4b
YQ
7102017-09-05 Yao Qi <yao.qi@linaro.org>
711
712 * Makefile.in (arch-amd64.o): New rule.
713 * configure.srv: Append arch-amd64.o.
714 * linux-amd64-ipa.c: Include common/x86-xstate.h.
715 (get_ipa_tdesc): Call amd64_linux_read_description.
716 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
717 and init_registers_amd64_XXX.
718 * linux-x86-low.c (x86_linux_read_description): Call
719 amd64_linux_read_description.
720 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
721 (initialize_low_arch): Don't call init_registers_x32_XXX and
722 init_registers_amd64_XXX.
723 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
724 and tdesc_amd64_XXX.
725 [__x86_64__] (amd64_tdesc_test): New function.
726 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
727 and init_registers_amd64_XXX.
728 * linux-x86-tdesc.c: Include arch/amd64.h.
729 (xcr0_to_tdesc_idx): New function.
730 (i386_linux_read_description): New function.
731 (amd64_get_ipa_tdesc_idx): New function.
732 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
733 (amd64_get_ipa_tdesc): Declare.
734
d1f28ea2
YQ
7352017-09-05 Yao Qi <yao.qi@linaro.org>
736
737 * configure.srv (srv_i386_linux_xmlfiles): Remove
738 i386/i386-XXX-linux.xml from it.
739
25a93583
YQ
7402017-09-05 Yao Qi <yao.qi@linaro.org>
741
742 * configure.srv: Set srv_i386_linux_regobj empty if $development
743 is false.
744 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
745 initialize_low_tdesc.
746 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
747 with #if initialize_low_tdesc.
748 * linux-x86-tdesc-selftest.c: New file.
749 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
750
5f035c07
YQ
7512017-09-05 Yao Qi <yao.qi@linaro.org>
752
753 * Makefile.in (arch-i386.o): New rule.
754 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
755 (x86_64-*-linux*): Likewise.
756 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
757 include arch/i386.h.
758 (i386_linux_read_description): Remove code and call
759 i386_create_target_description.
760 * tdesc.c (allocate_target_description): New function.
761 * tdesc.h (set_tdesc_architecture): Remove declaration.
762 (set_tdesc_osabi): Likewise.
763
0abe8a89
YQ
7642017-09-05 Yao Qi <yao.qi@linaro.org>
765
766 * linux-x86-tdesc.c: Don't include <inttypes.h>.
767 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
768 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
769 .xmltarget.
770 * server.c (get_features_xml): Call tdesc_get_features_xml.
771 * tdesc.c (set_tdesc_architecture): New function.
772 (set_tdesc_osabi): New function.
773 (tdesc_get_features_xml): New function.
774 (tdesc_create_feature): Add an argument.
775 * tdesc.h (struct target_desc) <features>: New field.
776 <arch, osabi>: New field.
777 (~target_desc): xfree features, arch, and osabi.
778 (target_desc::oerator==): Don't compare .xmltarget.
779 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
780 (set_tdesc_osabi): Likewise.
781 (tdesc_get_features_xml): Likewise.
782
0a188386
YQ
7832017-09-05 Yao Qi <yao.qi@linaro.org>
784
785 * linux-x86-tdesc.c: Include selftest.h.
786 (i386_tdesc_test): New function.
787 (initialize_low_tdesc): Call selftests::register_test.
788 * tdesc.h: Include regdef.h.
789 (target_desc): Override operator == and !=.
790
f49ff000
YQ
7912017-09-05 Yao Qi <yao.qi@linaro.org>
792
793 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
794 (ipa_obj): Likewise.
795 * linux-i386-ipa.c: Include common/x86-xstate.h
796 (get_ipa_tdesc): Call i386_linux_read_description.
797 (initialize_low_tracepoint): Don't call init_registers_XXX
798 functions, call initialize_low_tdesc instead.
799 * linux-x86-low.c (x86_linux_read_description): Call
800 i386_linux_read_description.
801 (initialize_low_arch): Don't call init_registers_i386_XXX
802 functions, call initialize_low_tdesc.
803 * linux-x86-tdesc.c: New file.
804 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
805 (i386_get_ipa_tdesc_idx): Declare.
806 (i386_get_ipa_tdesc): Declare.
807 (initialize_low_tdesc): Declare.
808
2b68ef2f
YQ
8092017-09-05 Yao Qi <yao.qi@linaro.org>
810
811 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
812 instead of 0.
813
f7000548
YQ
8142017-09-05 Yao Qi <yao.qi@linaro.org>
815
816 * Makefile.in (IPA_OBJS): Add vec-ipa.o
817 * regcache.c (get_thread_regcache): Use VEC_length.
818 (init_register_cache): Likewise.
819 (regcache_cpy): Likewise.
820 (registers_to_string): Iterate reg_defs via VEC_iterate.
821 (find_regno): Likewise.
822 (find_register_by_number): Use VEC_index.
823 (register_size): Call find_register_by_number.
824 (register_data): Call find_register_by_number.
825 (supply_regblock): Use VEC_length.
826 (regcache_raw_read_unsigned): Likewise.
827 * tdesc.c (init_target_desc): Iterate reg_defs via
828 VEC_iterate.
829 (default_description): Update initializer.
830 (copy_target_description): Don't update field num_registers.
831 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
832 <num_registers>: Remove.
833
50a421ac
SM
8342017-09-04 Simon Marchi <simon.marchi@ericsson.com>
835
836 * Makefile.in (.SECONDARY): Define target.
837
23fdd69e
SM
8382017-09-03 Simon Marchi <simon.marchi@ericsson.com>
839
840 * linux-low.c (linux_wait_1): Adjust.
841 * server.c (queue_stop_reply_callback): Adjust.
842
0a2dde4a
SDJ
8432017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
844
845 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
846 QEnvironmentUnset and QEnvironmentReset packets.
847 (handle_query): Inform remote that QEnvironmentHexEncoded,
848 QEnvironmentUnset and QEnvironmentReset are supported.
849
6afd337d
SM
8502017-08-25 Simon Marchi <simon.marchi@ericsson.com>
851
852 * inferiors.h (inferior_target_data): Rename to ...
853 (thread_target_data): ... this.
854 (inferior_regcache_data): Rename to ...
855 (thread_regcache_data): ... this.
856 (set_inferior_regcache_data): Rename to ...
857 (set_thread_regcache_data): ... this.
858 * inferiors.c (inferior_target_data): Rename to ...
859 (thread_target_data): ... this.
860 (inferior_regcache_data): Rename to ...
861 (thread_regcache_data): ... this.
862 (set_inferior_regcache_data): Rename to ...
863 (set_thread_regcache_data): ... this.
864 (free_one_thread): Update.
865 * linux-low.h (get_thread_lwp): Update.
866 * regcache.c (get_thread_regcache): Update.
867 (regcache_invalidate_thread): Update.
868 (free_register_cache_thread): Update.
869 * win32-i386-low.c (update_debug_registers_callback): Update.
870 (win32_get_current_dr): Update.
871 * win32-low.c (thread_rec): Update.
872 (delete_thread_info): Update.
873 (continue_one_thread): Update.
874 (suspend_one_thread): Update.
875
a160cc46
SM
8762017-08-24 Simon Marchi <simon.marchi@ericsson.com>
877
878 * inferiors.c (set_inferior_target_data): Remove.
879 * inferiors.h (set_inferior_target_data): Remove.
880
6d580b63
YQ
8812017-08-18 Yao Qi <yao.qi@linaro.org>
882
883 * Makefile.in (OBS): Add selftest.o.
884 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
885 * configure, config.in: Re-generated.
886 * server.c: Include common/sefltest.h.
887 (captured_main): Handle option --selftest.
888
f5a29eb0
YQ
8892017-08-09 Yao Qi <yao.qi@linaro.org>
890
891 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
892 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
893 i386-avx-mpx.o and i386-mmx.o.
894 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
895 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
896 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
897 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
898 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
899 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
900 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
901 i386/amd64-avx-mpx.xml.
902
57757c2f
YQ
9032017-08-09 Yao Qi <yao.qi@linaro.org>
904
905 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
906 and x32-avx-avx512.o.
907 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
908 i386/x32-avx-avx512.xml.
909
229d26fc
SM
9102017-07-26 Simon Marchi <simon.marchi@ericsson.com>
911
912 * tracepoint.h (enum class fast_tpoint_collect_result): New
913 enumeration.
914 (fast_tracepoint_collecting): Change return type to
915 fast_tpoint_collect_result.
916 * tracepoint.c (fast_tracepoint_collecting): Likewise.
917 * linux-low.h: Include tracepoint.h.
918 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
919 fast_tpoint_collect_result.
920 * linux-low.c (handle_tracepoints): Adjust.
921 (linux_fast_tracepoint_collecting): Change return type to
922 fast_tpoint_collect_result.
923 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
924 linux_wait_1, stuck_in_jump_pad_callback,
925 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
926 proceed_one_lwp): Adjust to type change.
927
2e1e43e1
YQ
9282017-07-10 Yao Qi <yao.qi@linaro.org>
929
930 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
931
adc764e7
YQ
9322017-06-29 Yao Qi <yao.qi@linaro.org>
933
934 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
935 Remove.
936 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
937
a206891a
SM
9382017-06-20 Simon Marchi <simon.marchi@ericsson.com>
939
940 * Makefile.in (IPA_OBJS): Sort and format one item per line.
941
9a6c7d9c
SDJ
9422017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
943
944 * linux-low.c (linux_create_inferior): Adjust code to access the
945 environment information via 'gdb_environ' class.
946 * lynx-low.c (lynx_create_inferior): Likewise.
947 * server.c (our_environ): Make it an instance of 'gdb_environ'.
948 (get_environ): Return a pointer to 'our_environ'.
949 (captured_main): Initialize 'our_environ'.
950 * server.h (get_environ): Adjust prototype.
951 * spu-low.c (spu_create_inferior): Adjust code to access the
952 environment information via 'gdb_environ' class.
953
ae3e2ccf
SM
9542017-06-17 Simon Marchi <simon.marchi@ericsson.com>
955
956 * linux-low.c (linux_read_memory, linux_write_memory): Remove
957 usage of "register" keyword.
958
3e019bdc
SM
9592017-06-17 Simon Marchi <simon.marchi@ericsson.com>
960
961 * configure: Re-generate.
962
8465943a
SM
9632017-06-17 Simon Marchi <simon.marchi@ericsson.com>
964
965 * configure: Re-generate.
966
cf0dd6f0
SM
9672017-06-17 Simon Marchi <simon.marchi@ericsson.com>
968
969 * Makefile.in (COMPILE.pre): Add "-x c++".
970
9845682b
SDJ
9712017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
972
973 * fork-child.c: Conditionally include <signal.h>.
974
aefd8b33
SDJ
9752017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
976
977 * server.c (handle_general_set): Handle new packet
978 "QStartupWithShell".
979 (handle_query): Add "QStartupWithShell" to the list of supported
980 packets.
981 (gdbserver_usage): Add help text explaining the
982 new "--startup-with-shell" and "--no-startup-with-shell" CLI
983 options.
984 (captured_main): Recognize and act upon the presence of the new
985 CLI options.
986
2090129c
SDJ
9872017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
988 Pedro Alves <palves@redhat.com>
989
990 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
991 * configure: Regenerate.
992 * configure.srv (srv_linux_obj): Add "fork-child.o" and
993 "fork-inferior.o".
994 (i[34567]86-*-lynxos*): Likewise.
995 (spu*-*-*): Likewise.
996 * fork-child.c: New file.
997 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
998 and "environ.h".
999 (linux_ptrace_fun): New function.
1000 (linux_create_inferior): Adjust function prototype to reflect
1001 change on "target.h". Adjust function code to use
1002 "fork_inferior".
1003 (linux_request_interrupt): Delete "signal_pid".
1004 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1005 (lynx_ptrace_fun): New function.
1006 (lynx_create_inferior): Adjust function prototype to reflect
1007 change on "target.h". Adjust function code to use
1008 "fork_inferior".
1009 * nto-low.c (nto_create_inferior): Adjust function prototype and
1010 code to reflect change on "target.h". Update comments.
1011 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1012 "common-terminal.h" and "environ.h".
1013 (terminal_fd): Moved to fork-child.c.
1014 (old_foreground_pgrp): Likewise.
1015 (restore_old_foreground_pgrp): Likewise.
1016 (last_status): Make it global.
1017 (last_ptid): Likewise.
1018 (our_environ): New variable.
1019 (startup_with_shell): Likewise.
1020 (program_name): Likewise.
1021 (program_argv): Rename to...
1022 (program_args): ...this.
1023 (wrapper_argv): New variable.
1024 (start_inferior): Delete function.
1025 (get_exec_wrapper): New function.
1026 (get_exec_file): Likewise.
1027 (get_environ): Likewise.
1028 (prefork_hook): Likewise.
1029 (post_fork_inferior): Likewise.
1030 (postfork_hook): Likewise.
1031 (postfork_child_hook): Likewise.
1032 (handle_v_run): Update code to deal with arguments coming from the
1033 remote host. Update calls from "start_inferior" to
1034 "create_inferior".
1035 (captured_main): Likewise. Initialize environment variable. Call
1036 "have_job_control".
1037 * server.h (post_fork_inferior): New prototype.
1038 (get_environ): Likewise.
1039 (last_status): Declare.
1040 (last_ptid): Likewise.
1041 (signal_pid): Likewise.
1042 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1043 (spu_ptrace_fun): New function.
1044 (spu_create_inferior): Adjust function prototype to reflect change
1045 on "target.h". Adjust function code to use "fork_inferior".
1046 * target.c (target_terminal_init): New function.
1047 (target_terminal_inferior): Likewise.
1048 (target_terminal_ours): Likewise.
1049 * target.h: Include <vector>.
1050 (struct target_ops) <create_inferior>: Update prototype.
1051 (create_inferior): Update macro.
1052 * utils.c (gdb_flush_out_err): New function.
1053 * win32-low.c (win32_create_inferior): Adjust function prototype
1054 and code to reflect change on "target.h".
1055
043a4934
SDJ
10562017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1057
1058 * inferiors.c (switch_to_thread): New function.
1059
15652511
SDJ
10602017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1061
1062 * Makefile.in (SFILE): Add "common/job-control.c".
1063 (OBS): Add "job-control.o".
1064
21ea5acd
SDJ
10652017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1066
1067 * Makefile: Remove "@host_makefile_frag@".
1068
e13cb306
PA
10692017-05-05 Pedro Alves <palves@redhat.com>
1070
1071 * configure: Regenerate.
1072
c94fee56
SDJ
10732017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1074
1075 * configure: Regenerate.
1076
a0ff9e1a
SM
10772017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1078
1079 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1080 software_single_step change of return type to
1081 std::vector<CORE_ADDR>.
1082 * linux-low.c (install_software_single_step_breakpoints):
1083 Likewise.
1084 * linux-low.h (install_software_single_step_breakpoints):
1085 Likewise.
1086
be628ab8
SDJ
10872017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1088
1089 * remote-utils.c: Include "gdb_termios.h" instead of
1090 "terminal.h".
1091 * terminal.h: Delete file.
1092
7c5ded6a
SDJ
10932017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1094
1095 * server.c: Include <vector>.
1096 <program_argv, wrapper_argv>: Convert to std::vector.
1097 (start_inferior): Rewrite function to use C++.
1098 (handle_v_run): Likewise. Update code that calculates the argv
1099 based on the vRun packet; use C++.
1100 (captured_main): Likewise.
1101
436252de
SM
11022017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1103
1104 * server.c (handle_v_cont): Initialize thread_resume::thread
1105 with null_ptid.
1106
9bf2a700
PA
11072017-04-05 Pedro Alves <palves@redhat.com>
1108
1109 * configure: Regenerate.
1110
a121b7c1
PA
11112017-04-05 Pedro Alves <palves@redhat.com>
1112
1113 * gdbreplay.c (sync_error): Constify.
1114 * linux-x86-low.c (push_opcode): Constify.
1115
21c8a587
PA
11162017-04-05 Pedro Alves <palves@redhat.com>
1117
1118 * win32-low.c (get_child_debug_event)
1119 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1120 Report TARGET_WAITKIND_SPURIOUS instead.
1121
fb32b4f7
PA
11222017-04-05 Pedro Alves <palves@redhat.com>
1123
1124 * remote-utils.c (remote_prepare, remote_open): Constify.
1125 * remote-utils.h (remote_prepare, remote_open): Constify.
1126 * server.c (captured_main): Constify 'port' handling.
1127
65dd1e59
SM
11282017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1129
1130 * Makefile.in (clean): Clear .deps.
1131
8fa5b777
SM
11322017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1133
1134 * .gitignore: Remove generated files, replace with wildcard.
1135 * (clean): Replace removal of generated files with wildcard.
1136 (version.c): Replace with...
1137 (version-generated.c): ...this.
1138 (xml-builtin.c): Replace with...
1139 (xml-builtin-generated.c): ...this.
1140 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1141 (%.c: *regformats*): Replace with...
1142 (%-generated.c: *regformats*): ...this.
1143
a12e714b
MF
11442017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1145
1146 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1147 (xtensa_fill_gregset): Call collect_register_by_name for
1148 threadptr register.
1149 (xtensa_store_gregset): Call supply_register_by_name for
1150 threadptr register.
1151
1a09b50a
MF
11522017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1153
1154 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1155 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1156 (xtensa_store_gregset): Call supply_register for all registers in
1157 a0_regnum..a0_regnum + C0_NREGS range.
1158
1a01e7c6
SM
11592017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1160
1161 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1162 (ax-ipa.o: ax.c): Remove.
1163 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1164 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1165 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1166 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1167 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1168
36bc18a8
SM
11692017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1170
1171 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1172 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1173 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1174 (errors-ipa.o: ../common/errors.c): Remove.
1175 (format-ipa.o: ../common/format.c): Remove.
1176 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1177
a8ebe3d5
SM
11782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1179
1180 * Makefile.in (%-ipa.o: %.c): New rule.
1181 (tracepoint-ipa.o: tracepoint.c): Remove.
1182 (utils-ipa.o: utils.c): Remove.
1183 (remote-utils-ipa.o: remote-utils.c): Remove.
1184 (regcache-ipa.o: regcache.c): Remove.
1185 (i386-linux-ipa.o: i386-linux.c): Remove.
1186 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1187 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1188 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1189 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1190 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1191 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1192 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1193 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1194 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1195 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1196 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1197 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1198 (aarch64-ipa.o: aarch64.c): Remove.
1199 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1200 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1201 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1202 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1203 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1204 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1205 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1206 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1207 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1208 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1209 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1210 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1211 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1212 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1213 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1214 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1215 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1216 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1217 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1218 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1219 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1220 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1221 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1222 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1223 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1224 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1225 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1226 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1227 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1228 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1229 (tdesc-ipa.o: tdesc.c): Remove.
1230 (x32-linux-ipa.o: x32-linux.c): Remove.
1231 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1232 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1233
50cfacb7
SM
12342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1235
1236 * Makefile.in (%.o: ../arch/%.c): New rule.
1237 (arm.o: ../arch/arm.c): Remove.
1238 (arm-linux.o: ../arch/arm-linux.c): Remove.
1239 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1240 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1241
c5a22423
SM
12422017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1243
1244 * Makefile.in (%.o: ../nat/%.c): New rule.
1245 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1246 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1247 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1248 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1249 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1250 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1251 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1252 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1253 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1254 (linux-personality.o: ../nat/linux-personality.c): Remove.
1255 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1256 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1257 (x86-linux.o: ../nat/x86-linux.c): Remove.
1258 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1259 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1260
6bda016b
SM
12612017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1262
1263 * Makefile.in (%.o: ../common/%.c): New rule.
1264 (signals.o: ../common/signals.c): Remove.
1265 (print-utils.o: ../common/print-utils.c): Remove.
1266 (rsp-low.o: ../common/rsp-low.c): Remove.
1267 (common-utils.o: ../common/common-utils.c): Remove.
1268 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1269 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1270 (vec.o: ../common/vec.c): Remove.
1271 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1272 (xml-utils.o: ../common/xml-utils.c): Remove.
1273 (ptid.o: ../common/ptid.c): Remove.
1274 (buffer.o: ../common/buffer.c): Remove.
1275 (format.o: ../common/format.c): Remove.
1276 (filestuff.o: ../common/filestuff.c): Remove.
1277 (agent.o: ../common/agent.c): Remove.
1278 (errors.o: ../common/errors.c): Remove.
1279 (environ.o: ../common/environ.c): Remove.
1280 (common-debug.o: ../common/common-debug.c): Remove.
1281 (cleanups.o: ../common/cleanups.c): Remove.
1282 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1283 (fileio.o: ../common/fileio.c): Remove.
1284 (common-regcache.o: ../common/common-regcache.c): Remove.
1285 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1286 (new-op.o: ../common/new-op.c): Remove.
1287 (btrace-common.o: ../common/btrace-common.c): Remove.
1288
21122961
SM
12892017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1290
1291 * Makefile.in (%.o: ../target/%.c): New rule.
1292 (waitstatus.o: ../target/waitstatus.c): Remove.
1293
c362e621
SM
12942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1295
1296 * Makefile.in
1297 (%.c: ../regformats/%.dat,
1298 (%.c: ../regformats/arm/%.dat,
1299 (%.c: ../regformats/i386/%.dat,
1300 (%.c: ../regformats/rs6000/%.dat): New rules.
1301 (aarch64.c): Remove.
1302 (reg-arm.c): Remove.
1303 (arm-with-iwmmxt.c): Remove.
1304 (arm-with-vfpv2.c): Remove.
1305 (arm-with-vfpv3.c): Remove.
1306 (arm-with-neon.c): Remove.
1307 (reg-bfin.c): Remove.
1308 (reg-cris.c): Remove.
1309 (reg-crisv32.c): Remove.
1310 (i386.c): Remove.
1311 (i386-linux.c): Remove.
1312 (i386-avx.c): Remove.
1313 (i386-avx-linux.c): Remove.
1314 (i386-avx-avx512.c): Remove.
1315 (i386-avx-avx512-linux.c): Remove.
1316 (i386-mpx.c): Remove.
1317 (i386-mpx-linux.c): Remove.
1318 (i386-avx-mpx-avx512-pku.c): Remove.
1319 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1320 (i386-avx-mpx.c): Remove.
1321 (i386-avx-mpx-linux.c): Remove.
1322 (i386-mmx.c): Remove.
1323 (i386-mmx-linux.c): Remove.
1324 (reg-ia64.c): Remove.
1325 (reg-m32r.c): Remove.
1326 (reg-m68k.c): Remove.
1327 (reg-cf.c): Remove.
1328 (mips-linux.c): Remove.
1329 (mips-dsp-linux.c): Remove.
1330 (mips64-linux.c): Remove.
1331 (mips64-dsp-linux.c): Remove.
1332 (nios2-linux.c): Remove.
1333 (powerpc-32.c): Remove.
1334 (powerpc-32l.c): Remove.
1335 (powerpc-altivec32l.c): Remove.
1336 (powerpc-cell32l.c): Remove.
1337 (powerpc-vsx32l.c): Remove.
1338 (powerpc-isa205-32l.c): Remove.
1339 (powerpc-isa205-altivec32l.c): Remove.
1340 (powerpc-isa205-vsx32l.c): Remove.
1341 (powerpc-e500l.c): Remove.
1342 (powerpc-64l.c): Remove.
1343 (powerpc-altivec64l.c): Remove.
1344 (powerpc-cell64l.c): Remove.
1345 (powerpc-vsx64l.c): Remove.
1346 (powerpc-isa205-64l.c): Remove.
1347 (powerpc-isa205-altivec64l.c): Remove.
1348 (powerpc-isa205-vsx64l.c): Remove.
1349 (s390-linux32.c): Remove.
1350 (s390-linux32v1.c): Remove.
1351 (s390-linux32v2.c): Remove.
1352 (s390-linux64.c): Remove.
1353 (s390-linux64v1.c): Remove.
1354 (s390-linux64v2.c): Remove.
1355 (s390-te-linux64.c): Remove.
1356 (s390-vx-linux64.c): Remove.
1357 (s390-tevx-linux64.c): Remove.
1358 (s390x-linux64.c): Remove.
1359 (s390x-linux64v1.c): Remove.
1360 (s390x-linux64v2.c): Remove.
1361 (s390x-te-linux64.c): Remove.
1362 (s390x-vx-linux64.c): Remove.
1363 (s390x-tevx-linux64.c): Remove.
1364 (tic6x-c64xp-linux.c): Remove.
1365 (tic6x-c64x-linux.c): Remove.
1366 (tic6x-c62x-linux.c): Remove.
1367 (reg-sh.c): Remove.
1368 (reg-sparc64.c): Remove.
1369 (reg-spu.c): Remove.
1370 (amd64.c): Remove.
1371 (amd64-linux.c): Remove.
1372 (amd64-avx.c): Remove.
1373 (amd64-avx-linux.c): Remove.
1374 (amd64-avx-avx512.c): Remove.
1375 (amd64-avx-avx512-linux.c): Remove.
1376 (amd64-mpx.c): Remove.
1377 (amd64-mpx-linux.c): Remove.
1378 (amd64-avx-mpx-avx512-pku.c): Remove.
1379 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1380 (amd64-avx-mpx.c): Remove.
1381 (amd64-avx-mpx-linux.c): Remove.
1382 (x32.c): Remove.
1383 (x32-linux.c): Remove.
1384 (x32-avx.c): Remove.
1385 (x32-avx-linux.c): Remove.
1386 (x32-avx-avx512.c): Remove.
1387 (x32-avx-avx512-linux.c): Remove.
1388 (reg-xtensa.c): Remove.
1389 (reg-tilegx.c): Remove.
1390 (reg-tilegx32.c): Remove.
1391
1672e0d9
SDJ
13922017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1393
1394 * Makefile.in (SFILES): Add "common/environ.c".
1395 (OBJS): Add "common/environ.h".
1396
239b6d10
WT
13972017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1398
1399 * configure.ac: Check if the fs_base and gs_base members of
1400 `struct user_regs_struct' exist.
1401 * config.in: Regenerated.
1402 * configure: Likewise.
1403
694b382c
AT
14042017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1405
1406 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1407 target_read_memory.
1408 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1409 (get_next_pcs_syscall_next_pc): Likewise.
1410
7dc53023
LM
14112016-12-23 Luis Machado <lgustavo@codesourcery.com>
1412
1413 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1414 * nto-x86-low.c: Likewise.
1415
ad02e4fe
SM
14162016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1417
1418 * Makefile.in: Include disable-implicit-rules.mk.
1419
dcb07cfa
PA
14202016-11-23 Pedro Alves <palves@redhat.com>
1421
1422 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1423 (debug_vprintf): Use std::chrono::steady_clock instead of
1424 gettimeofday. Use '.' instead of ':'.
1425 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1426 (get_timestamp): Use std::chrono::steady_clock instead of
1427 gettimeofday.
1428
8629c02c
SM
14292016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1430
1431 * Makefile.in: Fix whitespace formatting.
1432
b593ecca
SM
14332016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1434
1435 * Makefile.in (SFILES, OBS): Flatten list and order
1436 alphabetically.
1437
9986ba08
PA
14382016-11-23 Pedro Alves <palves@redhat.com>
1439
1440 * event-loop.c (handle_file_event): Use warning.
1441 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1442 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1443 Use warning.
1444
4eefa7bc
PA
14452016-11-23 Pedro Alves <palves@redhat.com>
1446
1447 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1448 output.
1449 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1450 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1451 debug_printf and debug_flush for debug output.
1452 * server.c (handle_general_set): Likewise.
1453 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1454 output.
1455
5443506e
SM
14562016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1457
1458 * Makefile.in (.c.o): Replace rule with ...
1459 (%.o: %.c): ... this one.
1460
3b165252
SM
14612016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1462
1463 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1464 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1465 make.
1466 * configure.ac: Remove checks for the make program.
1467 * configure: Re-generate.
1468
0bcda685
PA
14692016-10-28 Pedro Alves <palves@redhat.com>
1470
1471 * Makefile.in (CXX_DIALECT): Get from configure.
1472 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1473 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1474 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1475 * config.in: Regenerate.
1476 * configure: Regenerate.
1477
c3805894
YQ
14782016-10-27 Yao Qi <yao.qi@linaro.org>
1479
1480 * linux-low.c (linux_supports_range_stepping): Return true if
1481 can_software_single_step return true.
1482
89342618
YQ
14832016-10-27 Yao Qi <yao.qi@linaro.org>
1484
1485 * inferiors.c (find_inferior_in_random): New function.
1486 * inferiors.h (find_inferior_in_random): Declare.
1487 * linux-low.c (linux_wait_for_event_filtered): Call
1488 find_inferior_in_random instead of find_inferior.
1489
e3652c84
YQ
14902016-10-27 Yao Qi <yao.qi@linaro.org>
1491
1492 * linux-low.c (linux_wait_1): If single-step breakpoints are
1493 inserted, remove them.
1494
5a04c4cf
PA
14952016-10-26 Pedro Alves <palves@redhat.com>
1496
1497 * linux-low.c (handle_extended_wait): Link parent/child fork
1498 threads.
1499 (linux_wait_1): Unlink them.
1500 (linux_set_resume_request): Ignore resume requests for
1501 already-resumed and unhandled fork child threads.
1502 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1503 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1504 New functions.
1505 (handle_v_requests) <vCont>: Don't call require_running.
1506 * server.h (in_queued_stop_replies): New declaration.
1507
cb93dc7f
YQ
15082016-10-24 Yao Qi <yao.qi@linaro.org>
1509
1510 PR server/20733
1511 * linux-aarch64-low.c (append_insns): Cast the return value to
1512 'uint32_t *'.
1513
a1078bea
YQ
15142016-10-10 Yao Qi <yao.qi@linaro.org>
1515
1516 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1517
1fb77080
SDJ
15182016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1519
1520 * target.c (target_supports_multi_process): New function, moved
1521 from...
1522 * target.h (target_supports_multi_process): ... here. Remove
1523 macro.
1524
39b5a3b9
TT
15252016-10-05 Tom Tromey <tom@tromey.com>
1526
1527 PR remote/20655:
1528 * tracepoint.c (handle_tracepoint_bkpts): Check
1529 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1530
c1d0b70a
YQ
15312016-10-05 Yao Qi <yao.qi@linaro.org>
1532
1533 * configure.srv: Update the path of arm-*.xml files.
1534
0a69eedb
YQ
15352016-10-05 Terry Guo <terry.guo@arm.com>
1536 Yao Qi <yao.qi@linaro.org>
1537
1538 * Makefile.in: Adjust the path of rules.
1539 * configure.srv: Update the path of xml files.
1540 * regformats/arm-with-iwmmxt.dat: Regenerated.
1541 * regformats/arm-with-neon.dat: Likewise.
1542 * regformats/arm-with-vfpv2.dat: Likewise.
1543 * regformats/arm-with-vfpv3.dat Likewise.
1544
17e16485
YQ
15452016-09-30 Yao Qi <yao.qi@linaro.org>
1546
1547 PR gdbserver/20627
1548 * target.c (target_stop_and_wait): Don't call
1549 target_continue_no_signal, use resume_stop instead.
1550
edeeb602
YQ
15512016-09-26 Yao Qi <yao.qi@linaro.org>
1552
1553 * linux-low.c (linux_wait_1): Call debug_exit.
1554
503b1c39
PA
15552016-09-23 Pedro Alves <palves@redhat.com>
1556
1557 * Makefile.in (SFILES): Add common/new-op.c.
1558 (OBS): Add common/new-op.o.
1559 (new-op.o): New rule.
1560
74172ecf
SM
15612016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1562
1563 * .gitinore: Ignore more files.
1564
fc6cda2e
YQ
15652016-09-21 Yao Qi <yao.qi@linaro.org>
1566
1567 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1568 23.
1569
bc1e6c81
SDJ
15702016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1571
1572 * server.c (start_inferior): Call target_mourn_inferior instead of
1573 mourn_inferior; pass ptid_t argument to it.
1574 (resume): Likewise.
1575 (handle_target_event): Likewise.
1576 * target.c (target_mourn_inferior): New function.
1577 * target.h (mourn_inferior): Delete macro.
1578
0e00e962
AA
15792016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1580
1581 * linux-low.c (lwp_is_stepping): New function.
1582
1d8cb77d
CL
15832016-09-06 Carl Love <cel@us.ibm.com>
1584
1585 * server.c (start_inferior): Fixed comment, requested comment change
1586 didn't get updated correctly. Removed reference to ptrace () call as
1587 it is only true on Linux systems.
1588
7313bced
CL
15892016-09-06 Carl Love <cel@us.ibm.com>
1590
1591 * server.c (start_inferior): Do not call
1592 function target_post_create_inferior () if the
1593 inferior process has already exited.
1594
cf6de44d
PA
15952016-09-05 Pedro Alves <palves@redhat.com>
1596
1597 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1598 (COMPILE.pre, CC_LD): Use CXX directly.
1599 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1600 * acinclude.m4: Don't include build-with-cxx.m4.
1601 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1602 * configure: Regenerate.
1603
c1da6748
AT
16042016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1605
1606 PR gdb/19495
1607 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1608 call writing data to own_buf.
1609
f2b9e3df
SDJ
16102016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1611
1612 * target.c (mywait): Call target_wait instead of
1613 the_target->wait.
1614 (target_wait): New function.
1615
049a8570
SDJ
16162016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1617
1618 * server.c (start_inferior): New variable 'ptid'. Replace calls
1619 to the_target->resume by target_continue{,_no_signal}, depending
1620 on the case.
1621 * target.c (target_stop_and_wait): Call target_continue_no_signal
1622 instead of the_target->resume.
1623 (target_continue): New function.
1624
3aa5cfa0
AT
16252016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1626
1627 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1628
754653a7
AZ
16292016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1630
1631 PR server/20491
1632 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1633 ps_prochandle.
1634 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1635 * linux-arm-low.c (ps_get_thread_area): Likewise.
1636 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1637 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1638 * linux-mips-low.c (ps_get_thread_area): Likewise.
1639 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1640 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1641 * linux-x86-low.c (ps_get_thread_area): Likewise.
1642 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1643
ed036b40
PA
16442016-08-19 Pedro Alves <palves@redhat.com>
1645
1646 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1647
c8ef42ee
PA
16482016-08-19 Pedro Alves <palves@redhat.com>
1649
1650 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1651 comment. Use memcpy instead of casting through unsigned long.
1652
9c235a72
PA
16532016-08-19 Pedro Alves <palves@redhat.com>
1654
1655 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1656 allocating around 0x80000000.
1657
201506da
PA
16582016-08-19 Pedro Alves <palves@redhat.com>
1659
1660 PR gdb/20415
1661 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1662 (x32-avx512-linux-ipa.o): New rules.
1663 * configure.ac (x86_64-*-linux*): New x32 check.
1664 * configure.srv (ipa_x32_linux_regobj): New.
1665 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1666 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1667 descriptions.
1668 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1669 descriptions.
1670 * configure: Regenerate.
1671
f348d89a
PA
16722016-08-09 Pedro Alves <palves@redhat.com>
1673
1674 PR gdb/18653
1675 * Makefile.in (OBS): Add signals-state-save-restore.o.
1676 (signals-state-save-restore.o): New rule.
1677 * config.in: Regenerate.
1678 * configure: Regenerate.
1679 * linux-low.c: Include "signals-state-save-restore.h".
1680 (linux_create_inferior): Call
1681 restore_original_signals_state.
1682 * server.c: Include "dispositions-save-restore.h".
1683 (captured_main): Call save_original_signals_state.
1684
1baf5149
PA
16852016-08-05 Pedro Alves <palves@redhat.com>
1686
1687 * configure: Regenerate.
1688
fcd4a73d
YQ
16892016-08-04 Yao Qi <yao.qi@linaro.org>
1690
1691 * linux-low.c (regsets_fetch_inferior_registers): Check
1692 errno is ESRCH or not.
1693
979659d0
YQ
16942016-08-02 Yao Qi <yao.qi@linaro.org>
1695
1696 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1697 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1698 (thread_db_load_search): Update.
1699 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1700 td_ta_set_event and td_ta_event_getmsg.
1701
6598661d
PA
17022016-07-26 Pedro Alves <palves@redhat.com>
1703
1704 PR server/20414
1705 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1706 of unsigned long for 64-bit registers and use uint32_t instead of
1707 unsigned int for 32-bit registers.
1708
9cf12d57
PA
17092016-07-26 Pedro Alves <palves@redhat.com>
1710
1711 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1712 to 'ptrace'.
1713
305450ed
TT
17142016-07-21 Tom Tromey <tom@tromey.com>
1715
1716 * configure: Rebuild.
1717
2583da7c
YQ
17182016-07-21 Yao Qi <yao.qi@linaro.org>
1719
1720 * mem-break.c (find_gdb_breakpoint): Cast bp to
1721 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1722
21536b36
YQ
17232016-07-21 Yao Qi <yao.qi@linaro.org>
1724
1725 * server.c (handle_v_requests): Support s and S actions
1726 if target_supports_software_single_step return true.
1727
8901d193
YQ
17282016-07-21 Yao Qi <yao.qi@linaro.org>
1729
1730 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1731 is resume_step, call maybe_hw_step.
1732 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1733 and unstop them.
1734 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1735 breakpoints or not.
1736 (proceed_one_lwp): If resume request is resume_step, install
1737 reinsert breakpoints and call maybe_hw_step.
1738
0e9a339e
YQ
17392016-07-21 Yao Qi <yao.qi@linaro.org>
1740
1741 * linux-low.c (proceed_one_lwp): Declare.
1742 (linux_resume_one_thread): Remove local variable 'step'.
1743 Lift code enqueue signal. Call proceed_one_lwp instead of
1744 linux_resume_one_lwp.
1745
4281b351
YQ
17462016-07-21 Yao Qi <yao.qi@linaro.org>
1747
1748 * linux-low.c (linux_resume_one_thread): Call
1749 enqueue_pending_signal.
1750
984a2c04
YQ
17512016-07-21 Yao Qi <yao.qi@linaro.org>
1752
1753 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1754 * inferiors.c (do_restore_current_thread_cleanup): New function.
1755 (make_cleanup_restore_current_thread): Likewise.
1756 * linux-low.c (install_software_single_step_breakpoints): Call
1757 make_cleanup_restore_current_thread. Switch current_thread to
1758 thread.
1759
bec903c9
YQ
17602016-07-21 Yao Qi <yao.qi@linaro.org>
1761
1762 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1763 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1764 (clone_one_breakpoint): Likewise.
1765 (delete_reinsert_breakpoints): Change parameter to thread.
1766 Callers updated.
1767 (has_reinsert_breakpoints): Likewise.
1768 (uninsert_reinsert_breakpoints): Likewise.
1769 (reinsert_reinsert_breakpoints): Likewise.
1770 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1771 (delete_reinsert_breakpoints): Likewise.
1772 (reinsert_reinsert_breakpoints): Likewise.
1773 (uninsert_reinsert_breakpoints): Likewise.
1774 (has_reinsert_breakpoints): Likewise.
1775
63c40ec7
YQ
17762016-07-21 Yao Qi <yao.qi@linaro.org>
1777
1778 * inferiors.c (get_thread_process): Make parameter const.
1779 * inferiors.h (get_thread_process): Update declaration.
1780 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1781 Add new parameters child_thread and parent_thread. Callers
1782 updated.
1783 * mem-break.h (clone_all_breakpoints): Update declaration.
1784
9aa76cd0
YQ
17852016-07-21 Yao Qi <yao.qi@linaro.org>
1786
1787 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1788 <command_list, handler>: Remove.
1789 (struct gdb_breakpoint): New.
1790 (struct other_breakpoint): New.
1791 (struct reinsert_breakpoint): New.
1792 (is_gdb_breakpoint): New function.
1793 (any_persistent_commands): Update command_list if
1794 is_gdb_breakpoint returns true.
1795 (set_breakpoint): Create breakpoints according to their types.
1796 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1797 (set_gdb_breakpoint_1): Likewise.
1798 (set_gdb_breakpoint): Likewise.
1799 (clear_breakpoint_conditions): Change parameter type to
1800 'struct gdb_breakpoint *'.
1801 (clear_breakpoint_commands): Likewise.
1802 (clear_breakpoint_conditions_and_commands): Likewise.
1803 (add_condition_to_breakpoint): Likewise.
1804 (add_breakpoint_condition): Likewise.
1805 (add_commands_to_breakpoint): Likewise.
1806 (check_breakpoints): Check other_breakpoint.
1807 (clone_one_breakpoint): Clone breakpopint according to its type.
1808 * mem-break.h (struct gdb_breakpoint): Declare.
1809 (set_gdb_breakpoint): Update declaration.
1810 (clear_breakpoint_conditions_and_commands): Likewise.
1811 (add_breakpoint_condition): Likewise.
1812 (add_breakpoint_commands): Likewise.
1813 * server.c (process_point_options): Change parameter type to
1814 'struct gdb_breakpoint *'.
1815
811f8301
YQ
18162016-07-21 Yao Qi <yao.qi@linaro.org>
1817
1818 * mem-break.c (set_breakpoint_at): Rename it to ...
1819 (set_breakpoint_type_at): ... it.
1820 (set_breakpoint_at): Call set_breakpoint_type_at.
1821 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1822 * mem-break.h (set_breakpoint_at): Update comments.
1823
b1c51e36
CLT
18242016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1825
1826 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1827 to buf parameter.
1828 (nios2_store_gregset): Likewise.
1829
ced2dffb
PA
18302016-07-01 Pedro Alves <palves@redhat.com>
1831 Antoine Tremblay <antoine.tremblay@ericsson.com>
1832
1833 * linux-low.c: Change interface to take the target lwp_info
1834 pointer directly and return void. Handle detaching from a zombie
1835 thread.
1836 (linux_detach_lwp_callback): New function.
1837 (linux_detach): Detach from the leader thread after detaching from
1838 the clone threads.
1839
2ac09a5b
YQ
18402016-06-28 Yao Qi <yao.qi@linaro.org>
1841
1842 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1843 for variable new_offset.
1844 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1845 (aarch64_ftrace_insn_reloc_cb): Likewise.
1846 (aarch64_ftrace_insn_reloc_tb): Likewise.
1847 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1848 PRIx64 instead of PRIx32.
1849
79e7fd4f
YQ
18502016-06-28 Yao Qi <yao.qi@linaro.org>
1851
1852 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1853 (the_low_target): Install arm_get_syscall_trapinfo.
1854
061fc021
YQ
18552016-06-28 Yao Qi <yao.qi@linaro.org>
1856
1857 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1858 function.
1859 (the_low_target): Install aarch64_get_syscall_trapinfo.
1860
4cc32bec
YQ
18612016-06-28 Yao Qi <yao.qi@linaro.org>
1862
1863 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1864 Callers updated.
1865 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1866 Remove parameter sysno.
1867 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1868 sysret.
1869
782c1122
AA
18702016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1871
1872 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1873 (s390_emit_ne_goto): Likewise.
1874 (s390_emit_lt_goto): Likewise.
1875 (s390_emit_le_goto): Likewise.
1876 (s390_emit_gt_goto): Likewise.
1877 (s390_emit_ge_goto): Likewise.
1878 (s390x_emit_eq_goto): Likewise.
1879 (s390x_emit_ne_goto): Likewise.
1880 (s390x_emit_lt_goto): Likewise.
1881 (s390x_emit_le_goto): Likewise.
1882 (s390x_emit_gt_goto): Likewise.
1883 (s390x_emit_ge_goto): Likewise.
1884 (s390_emit_ops_impl): Mark variable static.
1885 (s390x_emit_ops): Likewise.
1886
2e7b624b
YQ
18872016-06-17 Yao Qi <yao.qi@linaro.org>
1888
1889 * linux-low.c (handle_extended_wait): Call
1890 uninsert_reinsert_breakpoints for the parent process. Remove
1891 reinsert breakpoints from the child process. Reinsert them to
1892 the parent process when vfork is done.
1893 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1894 (reinsert_reinsert_breakpoints): New function.
1895 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1896 (reinsert_reinsert_breakpoints): Declare.
1897
8a81c5d7
YQ
18982016-06-17 Yao Qi <yao.qi@linaro.org>
1899
1900 * linux-low.c (handle_extended_wait): If the parent is doing
1901 step-over, remove the reinsert breakpoints from the forked child.
1902
f50bf8e5
YQ
19032016-06-17 Yao Qi <yao.qi@linaro.org>
1904
1905 * linux-low.c (unsuspend_all_lwps): Declare.
1906 (linux_low_filter_event): If thread exited, call finish_step_over.
1907 If step-over is finished, unsuspend other threads.
1908
8376a3cb
YQ
19092016-06-17 Yao Qi <yao.qi@linaro.org>
1910
1911 * linux-low.c (linux_resume_one_lwp_throw): Assert
1912 has_reinsert_breakpoints returns false.
1913 * mem-break.c (delete_disabled_breakpoints): Assert
1914 bp type isn't reinsert_breakpoint.
1915
f79b145d
YQ
19162016-06-17 Yao Qi <yao.qi@linaro.org>
1917
1918 * linux-low.c (maybe_hw_step): New function.
1919 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1920 (finish_step_over): Switch current_thread to lwp temporarily,
1921 and assert has_reinsert_breakpoints returns true.
1922 (proceed_one_lwp): Call maybe_hw_step.
1923 * mem-break.c (has_reinsert_breakpoints): New function.
1924 * mem-break.h (has_reinsert_breakpoints): Declare.
1925
0ae534d2
JT
19262016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1927
1928 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1929
fcdad592
YQ
19302016-05-17 Yao Qi <yao.qi@linaro.org>
1931
1932 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1933 instead of find_inferior.
1934
9e784964
YQ
19352016-05-05 Yao Qi <yao.qi@linaro.org>
1936
1937 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1938 Initialize res to zero.
1939
cf2ebb6e
YQ
19402016-05-05 Yao Qi <yao.qi@linaro.org>
1941
1942 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1943 to uint32_t.
1944
c1aebf87
UW
19452016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1946
1947 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1948 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1949 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1950
35fd2deb 19512016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1952 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1953
1954 * tracepoint.c (write_inferior_int8): New function.
1955 (cmd_qtenable_disable): Write enable flag using
1956 write_inferior_int8.
1957
484b3c32
YQ
19582016-04-25 Yao Qi <yao.qi@linaro.org>
1959
1960 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1961 (need_step_over_p): Return zero if the LWP has pending signals
1962 can be delivered on software single step target.
1963
85ba7d86
YQ
19642016-04-25 Yao Qi <yao.qi@linaro.org>
1965
1966 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1967 return instead of error.
1968
3539aa13
YQ
19692016-04-22 Yao Qi <yao.qi@linaro.org>
1970
1971 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1972 to 23.
1973
5b061e98
YQ
19742016-04-22 Yao Qi <yao.qi@linaro.org>
1975
1976 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1977 signal when stepping over breakpoint with software single
1978 step.
1979
3451269c
PA
19802016-04-21 Pedro Alves <palves@redhat.com>
1981
1982 * linux-s390-low.c (s390_collect_ptrace_register)
1983 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1984 add casts.
1985 (s390_check_regset): Use void * instead of gdb_byte *.
1986
a2358508
PA
19872016-04-20 Pedro Alves <palves@redhat.com>
1988
1989 * configure: Renegerate.
1990
6885166d
YQ
19912016-04-20 Yao Qi <yao.qi@linaro.org>
1992
1993 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1994 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1995 number 16.
1996 (arm_store_gregset): Likewise.
1997
2b863f51
WT
19982016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1999
2000 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2001 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2002 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2003 (amd64-avx-mpx-linux.c): New rules.
2004 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2005 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2006 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2007 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2008 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2009 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2010 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2011 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2012 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2013 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2014 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2015 * linux-x86-low.c (x86_linux_read_description): Add case for
2016 X86_XSTATE_AVX_MPX_MASK.
2017 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2018 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2019 init_registers_i386_avx_mpx_linux.
2020 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2021 (initialize_low_tracepoint): Call
2022 init_registers_i386_avx_mpx_linux.
2023 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2024 (initialize_low_tracepoint): Call
2025 init_registers_amd64_avx_mpx_linux.
2026 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2027 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2028 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2029 declarations.
2030
9b30624b
PA
20312016-04-18 Pedro Alves <palves@redhat.com>
2032
2033 * configure: Regenerate.
2034
45e3745e
AT
20352016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2036
2037 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2038 (aarch64_emit_sub): Likewise.
2039
2afc13ff
PA
20402016-04-12 Pedro Alves <palves@redhat.com>
2041
2042 * utils.c (prepare_to_throw_exception): Delete.
2043
6e774b13
SM
20442016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2045
2046 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2047
4dca19f8
MK
20482016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2049
2050 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2051
d0a9981f
MK
20522016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2053
2054 * linux-aarch64-ipa.c: Add <elf.h> include.
2055 * linux-ppc-ipa.c: Add <elf.h> include.
2056 * linux-s390-ipa.c: Add <elf.h> include.
2057
252db07e
MK
20582016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2059
2060 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2061 (get_raw_reg_ptr): Likewise.
2062 (get_trace_state_variable_value_ptr): Likewise.
2063 (set_trace_state_variable_value_ptr): Likewise.
2064 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2065 char *.
2066
14e2b6d9
MK
20672016-03-31 Wei-cheng Wang <cole945@gmail.com>
2068 Marcin Kościelnicki <koriakin@0x04.net>
2069
2070 PR/17221
2071 * linux-ppc-low.c (emit_insns): New function.
2072 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2073 (ppc_emit_prologue): New function.
2074 (ppc_emit_epilogue): New function.
2075 (ppc_emit_add): New function.
2076 (ppc_emit_sub): New function.
2077 (ppc_emit_mul): New function.
2078 (ppc_emit_lsh): New function.
2079 (ppc_emit_rsh_signed): New function.
2080 (ppc_emit_rsh_unsigned): New function.
2081 (ppc_emit_ext): New function.
2082 (ppc_emit_zero_ext): New function.
2083 (ppc_emit_log_not): New function.
2084 (ppc_emit_bit_and): New function.
2085 (ppc_emit_bit_or): New function.
2086 (ppc_emit_bit_xor): New function.
2087 (ppc_emit_bit_not): New function.
2088 (ppc_emit_equal): New function.
2089 (ppc_emit_less_signed): New function.
2090 (ppc_emit_less_unsigned): New function.
2091 (ppc_emit_ref): New function.
2092 (ppc_emit_const): New function.
2093 (ppc_emit_reg): New function.
2094 (ppc_emit_pop): New function.
2095 (ppc_emit_stack_flush): New function.
2096 (ppc_emit_swap): New function.
2097 (ppc_emit_stack_adjust): New function.
2098 (ppc_emit_call): New function.
2099 (ppc_emit_int_call_1): New function.
2100 (ppc_emit_void_call_2): New function.
2101 (ppc_emit_if_goto): New function.
2102 (ppc_emit_goto): New function.
2103 (ppc_emit_eq_goto): New function.
2104 (ppc_emit_ne_goto): New function.
2105 (ppc_emit_lt_goto): New function.
2106 (ppc_emit_le_goto): New function.
2107 (ppc_emit_gt_goto): New function.
2108 (ppc_emit_ge_goto): New function.
2109 (ppc_write_goto_address): New function.
2110 (ppc_emit_ops_impl): New static variable.
2111 (ppc64v1_emit_prologue): New function.
2112 (ppc64v2_emit_prologue): New function.
2113 (ppc64_emit_epilogue): New function.
2114 (ppc64_emit_add): New function.
2115 (ppc64_emit_sub): New function.
2116 (ppc64_emit_mul): New function.
2117 (ppc64_emit_lsh): New function.
2118 (ppc64_emit_rsh_signed): New function.
2119 (ppc64_emit_rsh_unsigned): New function.
2120 (ppc64_emit_ext): New function.
2121 (ppc64_emit_zero_ext): New function.
2122 (ppc64_emit_log_not): New function.
2123 (ppc64_emit_bit_and): New function.
2124 (ppc64_emit_bit_or): New function.
2125 (ppc64_emit_bit_xor): New function.
2126 (ppc64_emit_bit_not): New function.
2127 (ppc64_emit_equal): New function.
2128 (ppc64_emit_less_signed): New function.
2129 (ppc64_emit_less_unsigned): New function.
2130 (ppc64_emit_ref): New function.
2131 (ppc64_emit_const): New function.
2132 (ppc64v1_emit_reg): New function.
2133 (ppc64v2_emit_reg): New function.
2134 (ppc64_emit_pop): New function.
2135 (ppc64_emit_stack_flush): New function.
2136 (ppc64_emit_swap): New function.
2137 (ppc64v1_emit_call): New function.
2138 (ppc64v2_emit_call): New function.
2139 (ppc64v1_emit_int_call_1): New function.
2140 (ppc64v2_emit_int_call_1): New function.
2141 (ppc64v1_emit_void_call_2): New function.
2142 (ppc64v2_emit_void_call_2): New function.
2143 (ppc64_emit_if_goto): New function.
2144 (ppc64_emit_eq_goto): New function.
2145 (ppc64_emit_ne_goto): New function.
2146 (ppc64_emit_lt_goto): New function.
2147 (ppc64_emit_le_goto): New function.
2148 (ppc64_emit_gt_goto): New function.
2149 (ppc64_emit_ge_goto): New function.
2150 (ppc64v1_emit_ops_impl): New static variable.
2151 (ppc64v2_emit_ops_impl): New static variable.
2152 (ppc_emit_ops): New function.
2153 (linux_low_target): Wire in ppc_emit_ops.
2154
a2174ba4
MK
21552016-03-31 Wei-cheng Wang <cole945@gmail.com>
2156 Marcin Kościelnicki <koriakin@0x04.net>
2157
2158 PR/17221
2159 * Makefile.in: Add powerpc-*-ipa.o
2160 * configure.srv: Add ipa_obj for powerpc*-linux.
2161 * linux-ppc-ipa.c: New file.
2162 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2163 includes.
2164 (PPC_FIELD): New macro.
2165 (PPC_SEXT): New macro.
2166 (PPC_OP6): New macro.
2167 (PPC_BO): New macro.
2168 (PPC_LI): New macro.
2169 (PPC_BD): New macro.
2170 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2171 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2172 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2173 (ppc_get_thread_area): New function.
2174 (is_elfv2_inferior): New function.
2175 (gen_ds_form): New function.
2176 (GEN_STD): New macro.
2177 (GEN_STDU): New macro.
2178 (GEN_LD): New macro.
2179 (GEN_LDU): New macro.
2180 (gen_d_form): New function.
2181 (GEN_ADDI): New macro.
2182 (GEN_ADDIS): New macro.
2183 (GEN_LI): New macro.
2184 (GEN_LIS): New macro.
2185 (GEN_ORI): New macro.
2186 (GEN_ORIS): New macro.
2187 (GEN_LWZ): New macro.
2188 (GEN_STW): New macro.
2189 (GEN_STWU): New macro.
2190 (gen_xfx_form): New function.
2191 (GEN_MFSPR): New macro.
2192 (GEN_MTSPR): New macro.
2193 (GEN_MFCR): New macro.
2194 (GEN_MTCR): New macro.
2195 (GEN_SYNC): New macro.
2196 (GEN_LWSYNC): New macro.
2197 (gen_x_form): New function.
2198 (GEN_OR): New macro.
2199 (GEN_MR): New macro.
2200 (GEN_LWARX): New macro.
2201 (GEN_STWCX): New macro.
2202 (GEN_CMPW): New macro.
2203 (gen_md_form): New function.
2204 (GEN_RLDICL): New macro.
2205 (GEN_RLDICR): New macro.
2206 (gen_i_form): New function.
2207 (GEN_B): New macro.
2208 (GEN_BL): New macro.
2209 (gen_b_form): New function.
2210 (GEN_BNE): New macro.
2211 (GEN_LOAD): New macro.
2212 (GEN_STORE): New macro.
2213 (gen_limm): New function.
2214 (gen_atomic_xchg): New function.
2215 (gen_call): New function.
2216 (ppc_relocate_instruction): New function.
2217 (ppc_install_fast_tracepoint_jump_pad): New function.
2218 (ppc_get_min_fast_tracepoint_insn_len): New function.
2219 (ppc_get_ipa_tdesc_idx): New function.
2220 (the_low_target): Wire in the new functions.
2221 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2222 tdescs.
2223 * linux-ppc-tdesc.h: New file.
2224
a13c4696
MK
22252016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2226
2227 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2228 (alloc_jump_pad_buffer): New function.
2229 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2230 (alloc_jump_pad_buffer): New function.
2231 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2232 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2233 (alloc_jump_pad_buffer): New function.
2234 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2235 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2236 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2237 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2238
1cda1512
MK
22392016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2240
2241 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2242 * linux-amd64-ipa.c: Likewise.
2243 * linux-i386-ipa.c: Likewise.
2244 * linux-s390-ipa.c: Likewise.
2245 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2246 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2247 set_trace_state_variable_value_ptr.
2248 (struct ipa_sym_addresses): Likewise.
2249 (symbol_list): Likewise.
2250 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2251 accessing gdb_collect directly.
2252 (gdb_collect_ptr_type): New typedef.
2253 (get_raw_reg_ptr_type): New typedef.
2254 (get_trace_state_variable_value_ptr_type): New typedef.
2255 (set_trace_state_variable_value_ptr_type): New typedef.
2256 (gdb_collect_ptr): New global.
2257 (get_raw_reg_ptr): New global.
2258 (get_trace_state_variable_value_ptr): New global.
2259 (set_trace_state_variable_value_ptr): New global.
2260 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2261 accessing get_raw_reg directly.
2262 (get_get_tsv_func_addr): Likewise for
2263 get_trace_state_variable_value_ptr.
2264 (get_set_tsv_func_addr): Likewise for
2265 set_trace_state_variable_value_ptr.
2266 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2267
72fb5488
SM
22682016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2269
2270 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2271
28170b88
MK
22722016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2273
2274 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2275 packets.
2276 (relocate_instruction): Remove own_buf.
2277 * server.c (own_buf): Make global.
2278 (handle_v_requests): Make global.
2279 * server.h (own_buf): New declaration.
2280 (handle_v_requests): New prototype.
2281
f39e8743
MK
22822016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2283
2284 PR 18377
2285 * linux-s390-low.c (add_insns): New function.
2286 (s390_emit_prologue): New function.
2287 (s390_emit_epilogue): New function.
2288 (s390_emit_add): New function.
2289 (s390_emit_sub): New function.
2290 (s390_emit_mul): New function.
2291 (s390_emit_lsh): New function.
2292 (s390_emit_rsh_signed): New function.
2293 (s390_emit_rsh_unsigned): New function.
2294 (s390_emit_ext): New function.
2295 (s390_emit_log_not): New function.
2296 (s390_emit_bit_and): New function.
2297 (s390_emit_bit_or): New function.
2298 (s390_emit_bit_xor): New function.
2299 (s390_emit_bit_not): New function.
2300 (s390_emit_equal): New function.
2301 (s390_emit_less_signed): New function.
2302 (s390_emit_less_unsigned): New function.
2303 (s390_emit_ref): New function.
2304 (s390_emit_if_goto): New function.
2305 (s390_emit_goto): New function.
2306 (s390_write_goto_address): New function.
2307 (s390_emit_litpool): New function.
2308 (s390_emit_const): New function.
2309 (s390_emit_call): New function.
2310 (s390_emit_reg): New function.
2311 (s390_emit_pop): New function.
2312 (s390_emit_stack_flush): New function.
2313 (s390_emit_zero_ext): New function.
2314 (s390_emit_swap): New function.
2315 (s390_emit_stack_adjust): New function.
2316 (s390_emit_set_r2): New function.
2317 (s390_emit_int_call_1): New function.
2318 (s390_emit_void_call_2): New function.
2319 (s390_emit_eq_goto): New function.
2320 (s390_emit_ne_goto): New function.
2321 (s390_emit_lt_goto): New function.
2322 (s390_emit_le_goto): New function.
2323 (s390_emit_gt_goto): New function.
2324 (s390_emit_ge_goto): New function.
2325 (s390x_emit_prologue): New function.
2326 (s390x_emit_epilogue): New function.
2327 (s390x_emit_add): New function.
2328 (s390x_emit_sub): New function.
2329 (s390x_emit_mul): New function.
2330 (s390x_emit_lsh): New function.
2331 (s390x_emit_rsh_signed): New function.
2332 (s390x_emit_rsh_unsigned): New function.
2333 (s390x_emit_ext): New function.
2334 (s390x_emit_log_not): New function.
2335 (s390x_emit_bit_and): New function.
2336 (s390x_emit_bit_or): New function.
2337 (s390x_emit_bit_xor): New function.
2338 (s390x_emit_bit_not): New function.
2339 (s390x_emit_equal): New function.
2340 (s390x_emit_less_signed): New function.
2341 (s390x_emit_less_unsigned): New function.
2342 (s390x_emit_ref): New function.
2343 (s390x_emit_if_goto): New function.
2344 (s390x_emit_const): New function.
2345 (s390x_emit_call): New function.
2346 (s390x_emit_reg): New function.
2347 (s390x_emit_pop): New function.
2348 (s390x_emit_stack_flush): New function.
2349 (s390x_emit_zero_ext): New function.
2350 (s390x_emit_swap): New function.
2351 (s390x_emit_stack_adjust): New function.
2352 (s390x_emit_int_call_1): New function.
2353 (s390x_emit_void_call_2): New function.
2354 (s390x_emit_eq_goto): New function.
2355 (s390x_emit_ne_goto): New function.
2356 (s390x_emit_lt_goto): New function.
2357 (s390x_emit_le_goto): New function.
2358 (s390x_emit_gt_goto): New function.
2359 (s390x_emit_ge_goto): New function.
2360 (s390_emit_ops): New function.
2361 (struct linux_target_ops): Fill in emit_ops hook.
2362
abd9baf9
MK
23632016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2364
2365 PR 18377
2366 * Makefile.in: Add s390 IPA files.
2367 * configure.srv: Build IPA for s390.
2368 * linux-s390-ipa.c: New file.
2369 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2370 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2371 (tdesc_s390_linux32): Likewise.
2372 (init_registers_s390_linux32v1): Likewise.
2373 (tdesc_s390_linux32v1): Likewise.
2374 (init_registers_s390_linux32v2): Likewise.
2375 (tdesc_s390_linux32v2): Likewise.
2376 (init_registers_s390_linux64): Likewise.
2377 (tdesc_s390_linux64): Likewise.
2378 (init_registers_s390_linux64v1): Likewise.
2379 (tdesc_s390_linux64v1): Likewise.
2380 (init_registers_s390_linux64v2): Likewise.
2381 (tdesc_s390_linux64v2): Likewise.
2382 (init_registers_s390_te_linux64): Likewise.
2383 (tdesc_s390_te_linux64): Likewise.
2384 (init_registers_s390_vx_linux64): Likewise.
2385 (tdesc_s390_vx_linux64): Likewise.
2386 (init_registers_s390_tevx_linux64): Likewise.
2387 (tdesc_s390_tevx_linux64): Likewise.
2388 (init_registers_s390x_linux64): Likewise.
2389 (tdesc_s390x_linux64): Likewise.
2390 (init_registers_s390x_linux64v1): Likewise.
2391 (tdesc_s390x_linux64v1): Likewise.
2392 (init_registers_s390x_linux64v2): Likewise.
2393 (tdesc_s390x_linux64v2): Likewise.
2394 (init_registers_s390x_te_linux64): Likewise.
2395 (tdesc_s390x_te_linux64): Likewise.
2396 (init_registers_s390x_vx_linux64): Likewise.
2397 (tdesc_s390x_vx_linux64): Likewise.
2398 (init_registers_s390x_tevx_linux64): Likewise.
2399 (tdesc_s390x_tevx_linux64): Likewise.
2400 (have_hwcap_s390_vx): New static variable.
2401 (s390_arch_setup): Fill have_hwcap_s390_vx.
2402 (s390_get_thread_area): New function.
2403 (s390_ft_entry_gpr_esa): New const.
2404 (s390_ft_entry_gpr_zarch): New const.
2405 (s390_ft_entry_misc): New const.
2406 (s390_ft_entry_fr): New const.
2407 (s390_ft_entry_vr): New const.
2408 (s390_ft_main_31): New const.
2409 (s390_ft_main_64): New const.
2410 (s390_ft_exit_fr): New const.
2411 (s390_ft_exit_vr): New const.
2412 (s390_ft_exit_misc): New const.
2413 (s390_ft_exit_gpr_esa): New const.
2414 (s390_ft_exit_gpr_zarch): New const.
2415 (append_insns): New function.
2416 (s390_relocate_instruction): New function.
2417 (s390_install_fast_tracepoint_jump_pad): New function.
2418 (s390_get_min_fast_tracepoint_insn_len): New function.
2419 (s390_get_ipa_tdesc_idx): New function.
2420 (struct linux_target_ops): Wire in the above functions.
2421 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2422 * linux-s390-tdesc.h: New file.
2423
a4105d04
MK
24242016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2425
2426 * linux-s390-low.c (s390_supports_tracepoints): New function.
2427 (struct linux_target_ops): Fill supports_tracepoints hook.
2428
35ac8b3e
YQ
24292016-03-18 Yao Qi <yao.qi@linaro.org>
2430
2431 * linux-low.c (lwp_signal_can_be_delivered): New function.
2432 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2433
94610ec4
YQ
24342016-03-18 Yao Qi <yao.qi@linaro.org>
2435
2436 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2437 0 if signal is enqueued. Remove 'signal' from one debugging
2438 message. Move one debugging message to some lines below.
2439 Remove code setting 'signal' to 0.
2440
80aea927
YQ
24412016-03-18 Yao Qi <yao.qi@linaro.org>
2442
2443 * linux-low.c (linux_low_filter_event): Remove redundant
2444 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2445
b04fd3be
MK
24462016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2447
2448 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2449 (struct linux_target_ops): Wire in the above.
2450
c40c8d4b
YQ
24512016-03-03 Yao Qi <yao.qi@linaro.org>
2452
2453 * linux-low.c: Update comments to start_step_over.
2454
0f8288ae
YQ
24552016-03-03 Yao Qi <yao.qi@linaro.org>
2456
2457 PR server/19736
2458 * linux-low.c (handle_extended_wait): Set child suspended
2459 if event_lwp->bp_reinsert isn't zero.
2460
fdbd04a8
YQ
24612016-03-02 Yao Qi <yao.qi@linaro.org>
2462
2463 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2464 enqueue_pending_signal.
2465
6896a8fa
MK
24662016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2467
2468 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2469 is actually loaded.
2470
ab503087
MK
24712016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2472
2473 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2474 (s390_regmap_3264) [!__s390x__]: New global.
2475 (s390_collect_ptrace_register): Skip map entries containing -1.
2476 (s390_supply_ptrace_register): Ditto.
2477 (s390_fill_gprs_high): New function.
2478 (s390_store_gprs_high): New function.
2479 (s390_regsets): Add NT_S390_HIGH_GPRS.
2480 (s390_get_hwcap): Enable on 31-bit.
2481 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2482 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2483 Detect NT_S390_HIGH_GPRS.
2484 (s390_usrregs_info_3264): Enable on 31-bit.
2485 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2486 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2487
ae91f625
MK
24882016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2489
2490 PR gdb/13808
2491 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2492 * configure.srv: Ditto.
2493 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2494 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2495 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2496 (init_registers_amd64_linux): Remove prototype.
2497 (tdesc_amd64_linux): Remove declaration.
2498 (get_ipa_tdesc): New function.
2499 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2500 initialize remaining tdescs.
2501 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2502 (init_registers_i386_linux): Remove prototype.
2503 (tdesc_i386_linux): Remove declaration.
2504 (get_ipa_tdesc): New function.
2505 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2506 initialize remaining tdescs.
2507 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2508 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2509 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2510 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2511 (x86_get_ipa_tdesc_idx): New function.
2512 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2513 * linux-x86-tdesc.h: New file.
2514 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2515 (target_get_ipa_tdesc_idx): New macro.
2516 * tracepoint.c (ipa_tdesc_idx): New macro.
2517 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2518 (symbol_list): Add ipa_tdesc_idx.
2519 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2520 (ipa_tdesc): Remove.
2521 (ipa_tdesc_idx): New variable.
2522 (get_context_regcache): Use get_ipa_tdesc.
2523 (gdb_collect): Ditto.
2524 (gdb_probe): Ditto.
2525 * tracepoint.h (get_ipa_tdesc): New prototype.
2526 (ipa_tdesc): Remove.
2527
e7ad2f14
PA
25282016-02-24 Pedro Alves <palves@redhat.com>
2529
2530 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2531 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2532 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2533 Factor out common code between the USE_SIGTRAP_SIGINFO and
2534 !USE_SIGTRAP_SIGINFO blocks.
2535 (linux_low_filter_event): Call save_stop_reason instead of
2536 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2537 Update comments.
2538 (linux_wait_1): Update comments.
2539
657f9cde
WW
25402016-02-24 Wei-cheng Wang <cole945@gmail.com>
2541
2542 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2543 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2544 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2545 ppc_insert_point, ppc_remove_point.
2546
b00b61e1
MK
25472016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2548
2549 * linux-s390-low.c (s390_supports_z_point_type): New function.
2550 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2551
553cb527
YQ
25522016-02-16 Yao Qi <yao.qi@linaro.org>
2553
2554 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2555 PC. Get pc from regcache_read_pc.
2556
a5652c21
YQ
25572016-02-12 Yao Qi <yao.qi@linaro.org>
2558
2559 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2560 or linux_get_pc_32bit.
2561 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2562
ed443b61
YQ
25632016-02-12 Yao Qi <yao.qi@linaro.org>
2564
2565 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2566 arm_linux_get_next_pcs_fixup.
2567
020ecd38
MK
25682016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2569
2570 * tracepoint.c (x_tracepoint_action_download): Change
2571 write_inferior_data_ptr to write_inferior_data_pointer.
2572 (cmd_qtstart): Likewise.
2573 (write_inferior_data_ptr): Remove.
2574 (download_agent_expr): Change write_inferior_data_ptr to
2575 write_inferior_data_pointer.
2576 (download_tracepoint_1): Likewise.
2577 (download_tracepoint): Likewise.
2578 (download_trace_state_variables): Likewise.
2579
7cae9051
WW
25802016-02-11 Wei-cheng Wang <cole945@gmail.com>
2581 Marcin Kościelnicki <koriakin@0x04.net>
2582
2583 * tracepoint.c (struct tracepoint_action_ops): Remove.
2584 (struct tracepoint_action): Remove ops.
2585 (m_tracepoint_action_download, r_tracepoint_action_download)
2586 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2587 size and offset accordingly.
2588 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2589 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2590 (tracepoint_action_send, tracepoint_action_download): New functions.
2591 Helpers for trace action handlers.
2592 (add_tracepoint_action): Remove setup actions ops.
2593 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2594
9f6a71b4
YQ
25952016-02-10 Yao Qi <yao.qi@linaro.org>
2596
2597 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2598
1e94266c
SM
25992016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2600
2601 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2602 to AC_OUTPUT.
2603 * configure: Regenerate.
2604
8adce034
SM
26052016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2606
2607 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2608 void * to gdb_byte *.
2609 * linux-low.c (siginfo_fixup): Likewise.
2610 (linux_xfer_siginfo): Likewise.
2611 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2612 Likewise.
2613 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2614
93813b37
WT
26152016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2616
2617 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2618 to srv_tgtobj.
2619 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2620 to srv_tgtobj.
2621 * linux-x86-low.c [__x86_64__]: Include
2622 "nat/amd64-linux-siginfo.h".
2623 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2624 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2625 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2626 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2627 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2628 (cpt_si_fd, si_timerid, si_overrun): Move from
2629 nat/amd64-linux-siginfo.c.
2630 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2631
8424cc97
SM
26322016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2633
2634 * server.c (skip_to_semicolon): Remove.
2635 (process_point_options): Use strchrnul instead of
2636 skip_to_semicolon.
2637
4d18591b
YQ
26382016-01-26 Yao Qi <yao.qi@linaro.org>
2639
2640 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2641 * linux-low.c (install_software_single_step_breakpoints): Don't
2642 call regcache_read_pc.
2643 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2644 argument pc.
2645
d8020970
YQ
26462016-01-26 Yao Qi <yao.qi@linaro.org>
2647
2648 * linux-low.c (install_software_single_step_breakpoints): Call
2649 regcache_read_pc instead of get_pc.
2650
8b207339
YQ
26512016-01-26 Yao Qi <yao.qi@linaro.org>
2652
2653 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2654 (unblock_async_io): Rename to ...
2655 (block_unblock_async_io): ... it. New function.
2656 (enable_async_io): Don't install SIGIO handler. Unblock it
2657 instead.
2658 (disable_async_io): Don't ignore SIGIO. Block it instead.
2659 (initialize_async_io): Install SIGIO handler. Don't call
2660 unblock_async_io.
2661
18879fef
YQ
26622016-01-26 Yao Qi <yao.qi@linaro.org>
2663
2664 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2665 first character is '\003', call *the_target->request_interrupt.
2666
a0f8e08a
YQ
26672016-01-25 Yao Qi <yao.qi@linaro.org>
2668
2669 * remote-utils.c (new_thread_notify): Remove.
2670 (dead_thread_notify): Likewise.
2671 * remote-utils.h (new_thread_notify): Remove declaration.
2672 (dead_thread_notify): Likewise.
2673
cc5fd9ab
MK
26742016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2675
2676 * gdb.trace/pending.exp: Fix expected message on continue.
2677
99e8eb11
MK
26782016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2679
2680 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2681 it works properly on big-endian machines where sizeof (CORE_ADDR)
2682 != sizeof (void *).
2683
a994041d
PA
26842016-01-21 Pedro Alves <palves@redhat.com>
2685
2686 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2687 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2688 * configure: Regenerate.
2689
f7a6a40d
YQ
26902016-01-21 Yao Qi <yao.qi@linaro.org>
2691
2692 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2693 is_thumb and set it according to CPSR saved on the stack.
2694 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2695 arm_sigreturn_next_pc.
2696
6f69e520
YQ
26972016-01-18 Yao Qi <yao.qi@linaro.org>
2698
2699 * linux-low.c (linux_set_pc_64bit): New function.
2700 (linux_get_pc_64bit): New function.
2701 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2702 Declare.
2703 * linux-sparc-low.c (debug_threads): Remove declaration.
2704 (sparc_get_pc): Remove.
2705 (the_low_target): Use linux_get_pc_64bit instead of
2706 sparc_get_pc.
2707 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2708 (the_low_target): Use linux_get_pc_64bit and
2709 linux_set_pc_64bit.
2710
276d4552
YQ
27112016-01-18 Yao Qi <yao.qi@linaro.org>
2712
2713 * linux-arm-low.c (debug_threads): Remove declaration.
2714 (arm_get_pc, arm_set_pc): Remove.
2715 (the_low_target): Use linux_get_pc_32bit and
2716 linux_set_pc_32bit.
2717 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2718 (the_low_target): Use linux_get_pc_32bit and
2719 linux_set_pc_32bit.
2720 * linux-cris-low.c (debug_threads): Remove declaration.
2721 (cris_get_pc, cris_set_pc,): Remove.
2722 (the_low_target): Use linux_get_pc_32bit and
2723 linux_set_pc_32bit.
2724 * linux-crisv32-low.c (debug_threads): Remove declaration.
2725 (cris_get_pc, cris_set_pc): Remove.
2726 (the_low_target): Use linux_get_pc_32bit and
2727 linux_set_pc_32bit.
2728 * linux-low.c: Include inttypes.h.
2729 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2730 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2731 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2732 (the_low_target): Use linux_get_pc_32bit and
2733 linux_set_pc_32bit.
2734 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2735 (the_low_target): Use linux_get_pc_32bit and
2736 linux_set_pc_32bit.
2737 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2738 (the_low_target): Use linux_get_pc_32bit and
2739 linux_set_pc_32bit.
2740 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2741 (the_low_target): Use linux_get_pc_32bit and
2742 linux_set_pc_32bit.
2743 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2744 (the_low_target): Use linux_get_pc_32bit and
2745 linux_set_pc_32bit.
2746
eb0edac8
GB
27472016-01-18 Gary Benson <gbenson@redhat.com>
2748
2749 * configure.ac (AC_FUNC_FORK): New check.
2750 * config.in: Regenerate.
2751 * configure: Likewise.
2752
1b451dda
YQ
27532016-01-14 Yao Qi <yao.qi@linaro.org>
2754
2755 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2756 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2757 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2758 arm_get_next_pcs_ctor.
2759
82075af2
JS
27602016-01-12 Josh Stone <jistone@redhat.com>
2761 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2762
2763 * inferiors.h: Include "gdb_vecs.h".
2764 (struct process_info): Add syscalls_to_catch.
2765 * inferiors.c (remove_process): Free syscalls_to_catch.
2766 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2767 syscall_return stops.
2768 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2769 * server.c (handle_general_set): Handle QCatchSyscalls.
2770 (handle_query): Report support for QCatchSyscalls.
2771 * target.h (struct target_ops): Add supports_catch_syscall.
2772 (target_supports_catch_syscall): New macro.
2773 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2774 (struct lwp_info): Add syscall_state.
2775 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2776 Maintain syscall_state and syscalls_to_catch across exec.
2777 (get_syscall_trapinfo): New function, proxy to the_low_target.
2778 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2779 (linux_low_filter_event): Toggle syscall_state entry/return for
2780 syscall traps, and set it ignored for all others.
2781 (gdb_catching_syscalls_p): New function.
2782 (gdb_catch_this_syscall_p): New function.
2783 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2784 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2785 (linux_supports_catch_syscall): New function.
2786 (linux_target_ops): Install it.
2787 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2788 (the_low_target): Install it.
2789
8f13a3ce
MF
27902016-01-12 Mike Frysinger <vapier@gentoo.org>
2791
2792 * acinclude.m4: Include new ../warning.m4 file.
2793 * configure: Regenerated.
2794 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2795
5b3da067
MF
27962016-01-12 Mike Frysinger <vapier@gentoo.org>
2797
2798 * ax.c (is_goto_target): Mark static.
2799 * linux-low.c (register_addr): Likewise.
2800 (linux_fetch_registers, linux_store_registers): Likewise.
2801 * mem-break.c (any_persistent_commands): Fix old prototype.
2802 (add_commands_to_breakpoint): Mark static.
2803 * regcache.c (find_register_by_name): Delete unused func.
2804 * remote-utils.c (hex_or_minus_one): Mark static.
2805 * server.c (monitor_show_help): Mark static.
2806 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2807 handle_v_requests): Likewise.
2808
bc504a31
PA
28092016-01-12 Pedro Alves <palves@redhat.com>
2810
2811 Remove use of the registered trademark symbol throughout.
2812
5a0dd67a
YQ
28132016-01-08 Yao Qi <yao.qi@linaro.org>
2814
2815 * remote-utils.c (getpkt): If c is '\003', call target hook
2816 request_interrupt.
2817
b2ca446f
YQ
28182016-01-06 Yao Qi <yao.qi@linaro.org>
2819
2820 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2821 linux-aarch32-low.c.
2822 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2823 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2824 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2825 (thumb2_breakpoint): Declare.
2826 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2827 linux-aarch32-low.h.
2828 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2829 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2830 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2831
edd88788
JB
28322016-01-01 Joel Brobecker <brobecker@adacore.com>
2833
2834 * gdbreplay.c (gdbreplay_version): Change copyright year in
2835 version message.
2836 * server.c (gdbserver_version): Likewise.
2837
65da7f14
PP
28382015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2839
2840 * server.c (crc32_table): Delete.
2841 (crc32): Use libiberty's xcrc32 function.
2842
4abd5ed2
JB
28432015-12-22 Joel Brobecker <brobecker@adacore.com>
2844
2845 * lynx-low.c (lynx_delete_thread_callback): New function.
2846 (lynx_mourn): Properly delete our process and all of its
2847 threads. Remove call to clear_inferiors.
2848
0e50fe5c
JB
28492015-12-22 Joel Brobecker <brobecker@adacore.com>
2850
2851 * target.c (thread_search_callback): Add check that
2852 the thread_stopped target callback is not NULL before
2853 calling it.
2854
35adc03f
YQ
28552015-12-21 Yao Qi <yao.qi@linaro.org>
2856
2857 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2858 arm breakpoint.
2859
bd2b2909
AT
28602015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2861
2862 * server.c (handle_query): Call target_supports_software_single_step.
2863
7fe5e27e
AT
28642015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2865
2866 * linux-low.c (single_step): New function.
2867 (linux_resume_one_lwp_throw): Call single_step.
2868 (start_step_over): Likewise.
2869
d9311bfa
AT
28702015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2871
2872 * Makefile.in (SFILES): Append arch/arm-linux.c,
2873 arch/arm-get-next-pcs.c.
2874 (arm-linux.o): New rule.
2875 (arm-get-next-pcs.o): New rule.
2876 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2877 arm-linux.o.
2878 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2879 to linux-aarch32-low.c.
2880 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2881 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2882 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2883 (thumb2_breakpoint_len): Likewise.
2884 (arm_is_thumb_mode): Make non-static.
2885 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2886 from linux-aarch32-low.c.
2887 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2888 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2889 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2890 (thumb2_breakpoint_len): Likewise.
2891 (arm_is_thumb_mode): New declaration.
2892 * linux-arm-low.c: Include arch/arm-linux.h
2893 aarch/arm-get-next-pcs.h, sys/syscall.h.
2894 (get_next_pcs_ops): New struct.
2895 (get_next_pcs_addr_bits_remove): New function.
2896 (get_next_pcs_is_thumb): New function.
2897 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2898 (arm_sigreturn_next_pc): Likewise.
2899 (get_next_pcs_syscall_next_pc): Likewise.
2900 (arm_gdbserver_get_next_pcs): Likewise.
2901 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2902 Initialize.
2903 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2904 * server.h: Include gdb_vecs.h.
2905
68ce2059
AT
29062015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2907
2908 * Makefile.in (SFILES): Append common/common-regcache.c.
2909 (OBS): Append common-regcache.o.
2910 (common-regcache.o): New rule.
2911 * regcache.c (init_register_cache): Initialize cache to
2912 REG_UNAVAILABLE.
2913 (regcache_raw_read_unsigned): New function.
2914 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2915 register_status enum.
2916
fa5308bd
AT
29172015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2918
2919 * linux-aarch64-low.c (the_low_targets): Rename
2920 breakpoint_reinsert_addr to get_next_pcs.
2921 * linux-arm-low.c (the_low_targets): Likewise.
2922 * linux-bfin-low.c (the_low_targets): Likewise.
2923 * linux-cris-low.c (the_low_targets): Likewise.
2924 * linux-crisv32-low.c (the_low_targets): Likewise.
2925 * linux-low.c (can_software_single_step): Likewise.
2926 (install_software_single_step_breakpoints): New function.
2927 (start_step_over): Use install_software_single_step_breakpoints.
2928 * linux-low.h: New CORE_ADDR vector.
2929 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2930 get_next_pcs.
2931 * linux-mips-low.c (the_low_targets): Likewise.
2932 * linux-nios2-low.c (the_low_targets): Likewise.
2933 * linux-sparc-low.c (the_low_targets): Likewise.
2934
4a6ed09b
PA
29352015-12-17 Pedro Alves <palves@redhat.com>
2936
2937 * linux-low.c (linux_kill_one_lwp): Remove references to
2938 LinuxThreads.
2939 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2940 to 'kill'.
2941 (linux_init_signals): Delete.
2942 (initialize_low): Adjust.
2943 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2944
7544db95
PA
29452015-12-16 Pedro Alves <palves@redhat.com>
2946
2947 * configure.ac (compiler warning flags): When testing a
2948 -Wno-foo option, check whether -Wfoo works instead.
2949 * configure: Regenerate.
2950
8020350c
DB
29512015-12-11 Don Breazeal <donb@codesourcery.com>
2952
2953 * server.c (process_serial_event): Don't exit from gdbserver
2954 in remote mode if there are still active inferiors.
2955
db91f502
YQ
29562015-12-11 Yao Qi <yao.qi@linaro.org>
2957
2958 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2959 arm_breakpoint_at if the process is 32-bit.
2960
b37a6290
YQ
29612015-12-11 Yao Qi <yao.qi@linaro.org>
2962
2963 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2964 arm breakpoint.
2965
17b1509a
YQ
29662015-12-07 Yao Qi <yao.qi@linaro.org>
2967
2968 * configure.srv: Append arm.o to srv_tgtobj for
2969 aarch64*-*-linux* target.
2970 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2971 from linux-arm-low.c.
2972 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2973 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2974 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2975 (thumb2_breakpoint_len): Likewise.
2976 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2977 (arm_breakpoint_kinds): Likewise.
2978 (arm_breakpoint_kind_from_pc): Likewise.
2979 (arm_sw_breakpoint_from_kind): Likewise.
2980 (arm_breakpoint_kind_from_current_state): Likewise.
2981 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2982 (arm_sw_breakpoint_from_kind): Declare.
2983 (arm_breakpoint_kind_from_current_state): Declare.
2984 (arm_breakpoint_at): Declare.
2985 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2986 arm_sw_breakpoint_from_kind if process is 32-bit.
2987 (aarch64_breakpoint_kind_from_pc): New function.
2988 (aarch64_breakpoint_kind_from_current_state): New function.
2989 (the_low_target): Initialize fields breakpoint_kind_from_pc
2990 and breakpoint_kind_from_current_state.
2991 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2992 linux-aarch32-low.c.
2993 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2994 (arm_breakpoint, arm_breakpoint_len): Likewise.
2995 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2996 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2997 (arm_is_thumb_mode): Likewise.
2998 (arm_breakpoint_at): Likewise.
2999 (arm_breakpoint_kind_from_pc): Likewise.
3000 (arm_sw_breakpoint_from_kind): Likewise.
3001 (arm_breakpoint_kind_from_current_state): Likewise.
3002
3003 Revert:
3004 2015-08-04 Yao Qi <yao.qi@linaro.org>
3005
3006 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3007 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3008 * server.c (extended_protocol): Remove "static".
3009 * server.h (extended_protocol): Declare it.
3010
ece66d65
JS
30112015-12-04 Josh Stone <jistone@redhat.com>
3012
3013 * target.h (struct target_ops) <arch_setup>: Rename to ...
3014 (struct target_ops) <post_create_inferior>: ... this.
3015 (target_arch_setup): Rename to ...
3016 (target_post_create_inferior): ... this, calling post_create_inferior.
3017 * server.c (start_inferior): Update target_arch_setup calls to
3018 target_post_create_inferior.
3019 * linux-low.c (linux_low_ptrace_options): Forward declare.
3020 (linux_arch_setup): Update its comment for general use.
3021 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3022 (struct linux_target_ops): Use linux_post_create_inferior.
3023 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3024 to post_create_inferior.
3025 * nto-low.c (struct nto_target_ops): Likewise.
3026 * spu-low.c (struct spu_target_ops): Likewise.
3027 * win32-low.c (struct win32_target_ops): Likewise.
3028
e58c48b4
AT
30292015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3030
3031 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3032
fbec8956
AT
30332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3034
3035 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3036 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3037 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3038 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3039 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3040 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3041 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3042 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3043 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3044 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3045 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3046 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3047
9b4c5f87
AT
30482015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3049
3050 * linux-low.c (linux_look_up_symbols): Don't call
3051 linux_supports_traceclone.
3052 * linux-low.h (thread_db_init): Remove use_events argument.
3053 * thread-db.c (thread_db_use_event): Remove global variable.
3054 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3055 (struct thread_db) <td_create_bp>: Remove field.
3056 (thread_db_create_event): Remove function.
3057 (thread_db_enable_reporting): Likewise.
3058 (find_one_thread): Don't check for thread_db_use_events.
3059 (attach_thread): Likewise.
3060 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3061 (try_thread_db_load_1): Don't check for thread_db_use_events.
3062 (thread_db_init): Remove use_events argument and thread events
3063 handling.
3064 (remove_thread_event_breakpoints): Remove function.
3065 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3066
7d00775e
AT
30672015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3068
3069 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3070 New function.
3071 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3072 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3073 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3074 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3075 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3076 Initialize.
3077 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3078 New function.
3079 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3080 * linux-low.c (can_hardware_single_step): Use
3081 supports_hardware_single_step.
3082 (can_software_single_step): New function.
3083 (start_step_over): Call can_software_single_step.
3084 (linux_supports_hardware_single_step): New function.
3085 (struct target_ops) <supports_software_single_step>: Initialize.
3086 * linux-low.h (struct linux_target_ops)
3087 <supports_hardware_single_step>: Initialize.
3088 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3089 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3090 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3091 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3092 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3093 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3094 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3095 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3096 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3097 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3098 Initialize.
3099 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3100 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3101 Initialize.
3102 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3103 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3104 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3105 New function.
3106 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3107 * target.h (struct target_ops): <supports_software_single_step>:
3108 New field.
3109 (target_supports_software_single_step): New macro.
3110
2d97cd35
AT
31112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3112
3113 * linux-low.c (linux_wait_1): Fix pc advance condition.
3114 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3115 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3116
769ef81f
AT
31172015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3118
3119 * linux-arm-low.c (arm_is_thumb_mode): New function.
3120 (arm_breakpoint_at): Use arm_is_thumb_mode.
3121 (arm_breakpoint_kind_from_current_state): New function.
3122 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3123 Initialize.
3124 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3125 (linux_breakpoint_kind_from_current_state): New function.
3126 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3127 * linux-low.h (struct linux_target_ops)
3128 <breakpoint_kind_from_current_state>: New field.
3129 * target.h (struct target_ops): Likewise.
3130 (target_breakpoint_kind_from_current_state): New macro.
3131
1bebeeca
PA
31322015-11-30 Pedro Alves <palves@redhat.com>
3133
3134 * linux-low.c (linux_resume): Wake up the event loop before
3135 returning.
3136
a67a9fae
PA
31372015-11-30 Pedro Alves <palves@redhat.com>
3138
3139 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3140 check.
3141 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3142 to -1.
3143 * target.c (struct thread_search): New structure.
3144 (thread_search_callback): New function.
3145 (prev_general_thread): New global.
3146 (prepare_to_access_memory, done_accessing_memory): New functions.
3147 * target.h (prepare_to_access_memory, done_accessing_memory):
3148 Replace macros with function declarations.
3149
f2faf941
PA
31502015-11-30 Pedro Alves <palves@redhat.com>
3151
3152 PR 14618
3153 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3154 report TARGET_WAITKIND_NO_RESUMED.
3155 * remote-utils.c (prepare_resume_reply): Handle
3156 TARGET_WAITKIND_NO_RESUMED.
3157 * server.c (report_no_resumed): New global.
3158 (handle_query) <qSupported>: Handle "no-resumed+". Report
3159 "no-resumed+" support.
3160 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3161 return error if the client doesn't support no-resumed events.
3162 (push_stop_notification): New function.
3163 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3164 events if the client supports them.
3165
a681f9c9
PA
31662015-11-30 Pedro Alves <palves@redhat.com>
3167
3168 * linux-low.c (thread_still_has_status_pending_p): Don't check
3169 vCont;t here.
3170 (lwp_resumed): New function.
3171 (status_pending_p_callback): Return early if the LWP is not
3172 supposed to be resumed.
3173
65706a29
PA
31742015-11-30 Pedro Alves <palves@redhat.com>
3175
3176 * linux-low.c (handle_extended_wait): Assert that the LWP's
3177 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3178 thread create events, leave the new child's status pending.
3179 (linux_low_filter_event): If GDB wants to hear about thread exit
3180 events, leave the LWP marked dead and don't delete it.
3181 (linux_wait_for_event_filtered): Don't check for thread exit.
3182 (filter_exit_event): New function.
3183 (linux_wait_1): Use it, when returning an exit event.
3184 (linux_resume_one_lwp_throw): Assert that the LWP's
3185 waitstatus is TARGET_WAITKIND_IGNORE.
3186 * remote-utils.c (prepare_resume_reply): Handle
3187 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3188 * server.c (report_thread_events): New global.
3189 (handle_general_set): Handle QThreadEvents.
3190 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3191 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3192 TARGET_WAITKIND_THREAD_EXITED.
3193 * server.h (report_thread_events): Declare.
3194
56cf4bed
PA
31952015-11-30 Pedro Alves <palves@redhat.com>
3196
3197 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3198 the thread's last_resume_kind was resume_stop.
3199
500c1d85
PA
32002015-11-30 Pedro Alves <palves@redhat.com>
3201
3202 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3203 before returning.
3204
de979965
PA
32052015-11-30 Pedro Alves <palves@redhat.com>
3206
3207 * server.c (handle_v_requests): Handle vCtrlC.
3208
34c65914
PA
32092015-11-30 Pedro Alves <palves@redhat.com>
3210
3211 * gdbthread.h (find_any_thread_of_pid): Declare.
3212 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3213 functions.
3214 * server.c (handle_query): If current_thread is NULL, look for
3215 another thread of the selected process.
3216
79efa585 32172015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3218 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3219
3220 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3221 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3222 name in reply.
3223 * target.h (struct target_ops) <thread_name>: New field.
3224 (target_thread_name): New macro.
3225
80d82c19
JB
32262015-11-23 Joel Brobecker <brobecker@adacore.com>
3227
3228 * regcache.h (regcache_invalidate_pid): Add declaration.
3229 * regcache.c (regcache_invalidate_pid): New function, extracted
3230 from regcache_invalidate.
3231 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3232 Add trivial documentation comment.
3233 * lynx-low.c: Use regcache_invalidate_pid instead of
3234 regcache_invalidate.
3235
64da5dd5
JB
32362015-11-23 Joel Brobecker <brobecker@adacore.com>
3237
3238 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3239 and Elf64_auxv_t if the target is Android.
3240
37ce4055
DE
32412015-11-22 Doug Evans <xdje42@gmail.com>
3242
3243 * target.h: #include <sys/types.h>.
3244
06e03fff
PA
32452015-11-19 Pedro Alves <palves@redhat.com>
3246
3247 * linux-low.c (linux_process_qsupported): Change prototype.
3248 Adjust.
3249 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3250 Change prototype.
3251 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3252 and adjust to loop over all features.
3253 * server.c (handle_query) <qSupported>: Adjust to call
3254 target_process_qsupported once, passing it a vector of unprocessed
3255 features.
3256 * target.h (struct target_ops) <process_qsupported>: Change
3257 prototype.
3258 (target_process_qsupported): Adjust.
3259
9a084706
PA
32602015-11-19 Pedro Alves <palves@redhat.com>
3261
3262 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3263 mode.
3264 * configure: Regenerate.
3265
dad44a1f
PA
32662015-11-19 Pedro Alves <palves@redhat.com>
3267
3268 * configure: Regenerate.
3269
231c0592
YQ
32702015-11-19 Yao Qi <yao.qi@linaro.org>
3271
3272 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3273 type to uint32_t.
3274
6c1c9a8b
YQ
32752015-11-19 Yao Qi <yao.qi@linaro.org>
3276
3277 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3278 (struct aarch64_operand): Move enum out.
3279
9caa3311
YQ
32802015-11-19 Yao Qi <yao.qi@linaro.org>
3281
3282 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3283 struct user_fpsimd_state *.
3284 (aarch64_store_fpregset): Likewise.
3285
6a69a054
YQ
32862015-11-19 Yao Qi <yao.qi@linaro.org>
3287
3288 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3289 struct user_pt_regs *.
3290 (aarch64_store_gregset): Likewise.
3291
1798301e
PA
32922015-11-18 Pedro Alves <palves@redhat.com>
3293
3294 * Makefile.in (all_object_files): Add $IPA_OBJS.
3295
ce7715e2
PA
32962015-11-17 Pedro Alves <palves@redhat.com>
3297
3298 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3299 GDB_SIGNAL_0 and gdb_signal_to_string.
3300
c0879059
PA
33012015-11-17 Pedro Alves <palves@redhat.com>
3302
3303 * win32-low.c (handle_output_debug_string): Remove parameter.
3304 (win32_kill): Remove our_status local and adjust call to
3305 handle_output_debug_string.
3306 (get_child_debug_event): Adjust call to
3307 handle_output_debug_string.
3308
1996e237
SM
33092015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3310
3311 * linux-mips-low.c (mips_fill_gregset): Add cast.
3312 (mips_store_gregset): Likewise.
3313 (mips_fill_fpregset): Likewise.
3314 (mips_store_fpregset): Likewise.
3315
cbec665b
SM
33162015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3317
3318 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3319 priv.
3320
eb3e3c67
SM
33212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3322
3323 * linux-mips-low.c (mips_linux_new_thread): Change type of
3324 watch_type to enum target_hw_bp_type.
3325
171de4b8
SM
33262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3327
3328 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3329 Change return type to arm_hwbp_type.
3330
04248ead
SM
33312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3332
3333 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3334 (arm_store_gregset): Likewise.
3335 * linux-arm-low.c (arm_get_hwcap): Likewise.
3336 (arm_read_description): Likewise.
3337
04b3479c
SM
33382015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3339
3340 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3341
2bc84e8a
SM
33422015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3343
3344 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3345 (ppc_fill_vsxregset): Likewise.
3346 (ppc_store_vsxregset): Likewise.
3347 (ppc_fill_vrregset): Likewise.
3348 (ppc_store_vrregset): Likewise.
3349 (ppc_fill_evrregset): Likewise.
3350 (ppc_store_evrregset): Likewise.
3351
e6c5bb05
SM
33522015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3353
3354 * linux-ppc-low.c (ppc_usrregs_info): Remove
3355 forward-declaration.
3356 (ppc_arch_setup): Move lower in file.
3357
7ea45d72
SM
33582015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3359
3360 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3361 (ps_pdwrite): Likewise.
3362
69291610
HW
33632015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3364
3365 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3366 to after assert checks.
3367
b42945fd
SM
33682015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3369
3370 * proc-service.c (ps_pdread): Add/adjust casts.
3371 (ps_pdwrite): Add/adjust casts.
3372
d6f85c84
SM
33732015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3374
3375 * server.c (handle_search_memory_1): Cast return value of
3376 memmem.
3377
f98cd059
SM
33782015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3379
3380 * server.c (write_qxfer_response): Change type of data to
3381 gdb_byte *.
3382
d2412fa5
PA
33832015-10-29 Pedro Alves <palves@redhat.com>
3384
3385 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3386
c17414a2
PA
33872015-10-29 Pedro Alves <palves@redhat.com>
3388
3389 * tracepoint.c (clear_installed_tracepoints): Add casts.
3390
e053fbc4
PA
33912015-10-29 Pedro Alves <palves@redhat.com>
3392
3393 * server.c (handle_v_cont, process_serial_event): Add enum
3394 gdb_signal casts to signal parsing code.
3395
add67df8
PA
33962015-10-29 Pedro Alves <palves@redhat.com>
3397
3398 * linux-low.h (NULL_REGSET): Define.
3399 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3400 * linux-arm-low.c (arm_regsets): Likewise.
3401 * linux-crisv32-low.c (cris_regsets): Likewise.
3402 * linux-m68k-low.c (m68k_regsets): Likewise.
3403 * linux-mips-low.c (mips_regsets): Likewise.
3404 * linux-nios2-low.c (nios2_regsets): Likewise.
3405 * linux-ppc-low.c (ppc_regsets): Likewise.
3406 * linux-s390-low.c (s390_regsets): Likewise.
3407 * linux-sh-low.c (sh_regsets): Likewise.
3408 * linux-sparc-low.c (sparc_regsets): Likewise.
3409 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3410 * linux-tile-low.c (tile_regsets): Likewise.
3411 * linux-x86-low.c (x86_regsets): Likewise.
3412 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3413
50bc912a
PA
34142015-10-29 Pedro Alves <palves@redhat.com>
3415
3416 * linux-low.h (NULL_REGSET): Define.
3417 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3418 * linux-arm-low.c (arm_regsets): Likewise.
3419 * linux-crisv32-low.c (cris_regsets): Likewise.
3420 * linux-m68k-low.c (m68k_regsets): Likewise.
3421 * linux-mips-low.c (mips_regsets): Likewise.
3422 * linux-nios2-low.c (nios2_regsets): Likewise.
3423 * linux-ppc-low.c (ppc_regsets): Likewise.
3424 * linux-s390-low.c (s390_regsets): Likewise.
3425 * linux-sh-low.c (sh_regsets): Likewise.
3426 * linux-sparc-low.c (sparc_regsets): Likewise.
3427 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3428 * linux-tile-low.c (tile_regsets): Likewise.
3429 * linux-x86-low.c (x86_regsets): Likewise.
3430 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3431
682b2546
DE
34322015-10-26 Doug Evans <dje@google.com>
3433
3434 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3435
963843d4
DE
34362015-10-26 Doug Evans <dje@google.com>
3437
3438 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3439
d41401ac
DE
34402015-10-26 Doug Evans <dje@google.com>
3441
3442 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3443 for debug_printf.
3444 (attach_thread, find_new_threads_callback): Ditto.
3445
3db28855
AT
34462015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3447
3448 * mem-break.h (set_breakpoint_data): Remove.
3449
fb78e89c
AT
34502015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3451
3452 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3453 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3454 (initialize_low): Remove set_breakpoint_data call.
3455 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3456 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3457 (initialize_low): Remove set_breakpoint_data call.
3458 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3459 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3460 (initialize_low): Remove set_breakpoint_data call.
3461
2e6ee069
AT
34622015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3463
3464 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3465 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3466 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3467 * target.h (target_breakpoint_kind_from_pc): New macro.
3468
1652a986
AT
34692015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3470
3471 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3472 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3473 the default breakpoint kind.
3474
abeead09
AT
34752015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3476
3477 * linux-arm-low.c (arm_supports_z_point_type): Add software
3478 breakpoint support.
3479
b0b4b501
AT
34802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3481
3482 * linux-arm-low.c: Refactor breakpoint definitions.
3483 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3484 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3485
8689682c
AT
34862015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3487
3488 * Makefile.in: Add arm.c/o.
3489 * configure.srv: Likewise.
3490 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3491 (arm_breakpoint_kind_from_pc): New function.
3492 (arm_sw_breakpoint_from_kind): Return proper kind.
3493 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3494
27165294
AT
34952015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3496
3497 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3498 removal.
3499 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3500 (struct raw_breakpoint) <size>: Remove.
3501 (struct raw_breakpoint) <kind>: Add.
3502 (bp_size): New function.
3503 (bp_opcode): Likewise.
3504 (find_raw_breakpoint_at): Adjust for kind.
3505 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3506 (remove_memory_breakpoint): Adjust for kind call bp_size.
3507 (set_raw_breakpoint_at): Adjust for kind.
3508 (set_breakpoint): Likewise.
3509 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3510 (delete_raw_breakpoint): Adjust for kind.
3511 (delete_breakpoint): Likewise.
3512 (find_gdb_breakpoint): Likewise.
3513 (set_gdb_breakpoint_1): Likewise.
3514 (set_gdb_breakpoint): Likewise.
3515 (delete_gdb_breakpoint_1): Likewise.
3516 (delete_gdb_breakpoint): Likewise.
3517 (uninsert_raw_breakpoint): Likewise.
3518 (reinsert_raw_breakpoint): Likewise.
3519 (set_breakpoint_data): Remove.
3520 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3521 (check_mem_read): Adjust for kind call bp_size.
3522 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3523 (clone_one_breakpoint): Adjust for kind.
3524 * mem-break.h (set_gdb_breakpoint): Likewise.
3525 (delete_gdb_breakpoint): Likewise.
3526 * server.c (process_serial_event): Likewise.
3527
dd373349
AT
35282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3529
3530 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3531 (struct linux_target_ops) <breakpoint>: Remove.
3532 (struct linux_target_ops) <breakpoint_len>: Remove.
3533 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3534 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3535 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3536 (arm_sw_breakpoint_from_kind): New function.
3537 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3538 (struct linux_target_ops) <breakpoint>: Remove.
3539 (struct linux_target_ops) <breakpoint_len>: Remove.
3540 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3541 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3542 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3543 (struct linux_target_ops) <breakpoint>: Remove.
3544 (struct linux_target_ops) <breakpoint_len>: Remove.
3545 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3546 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3547 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3548 (struct linux_target_ops) <breakpoint>: Remove.
3549 (struct linux_target_ops) <breakpoint_len>: Remove.
3550 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3551 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3552 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3553 and sw_breakpoint_from_kind to increment the pc.
3554 (linux_breakpoint_kind_from_pc): New function.
3555 (linux_sw_breakpoint_from_kind): New function.
3556 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3557 (initialize_low): Call breakpoint_kind_from_pc and
3558 sw_breakpoint_from_kind to replace breakpoint_data/len.
3559 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3560 New field.
3561 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3562 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3563 (struct linux_target_ops) <breakpoint>: Remove.
3564 (struct linux_target_ops) <breakpoint_len>: Remove.
3565 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3566 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3567 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3568 (struct linux_target_ops) <breakpoint>: Remove.
3569 (struct linux_target_ops) <breakpoint_len>: Remove.
3570 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3571 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3572 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3573 (struct linux_target_ops) <breakpoint>: Remove.
3574 (struct linux_target_ops) <breakpoint_len>: Remove.
3575 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3576 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3577 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3578 (struct linux_target_ops) <breakpoint>: Remove.
3579 (struct linux_target_ops) <breakpoint_len>: Remove.
3580 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3581 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3582 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3583 (struct linux_target_ops) <breakpoint>: Remove.
3584 (struct linux_target_ops) <breakpoint_len>: Remove.
3585 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3586 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3587 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3588 (struct linux_target_ops) <breakpoint>: Remove.
3589 (struct linux_target_ops) <breakpoint_len>: Remove.
3590 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3591 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3592 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3593 (struct linux_target_ops) <breakpoint>: Remove.
3594 (struct linux_target_ops) <breakpoint_len>: Remove.
3595 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3596 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3597 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3598 (struct linux_target_ops) <breakpoint>: Remove.
3599 (struct linux_target_ops) <breakpoint_len>: Remove.
3600 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3601 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3602 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3603 (struct linux_target_ops) <breakpoint>: Remove.
3604 (struct linux_target_ops) <breakpoint_len>: Remove.
3605 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3606 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3607 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3608 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3609 (struct linux_target_ops) <breakpoint>: Remove.
3610 (struct linux_target_ops) <breakpoint_len>: Remove.
3611 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3612 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3613 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3614 (struct linux_target_ops) <breakpoint>: Remove.
3615 (struct linux_target_ops) <breakpoint_len>: Remove.
3616 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3617 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3618
4cd98a19
AT
36192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3620
3621 * linux-cris-low.c (cris_get_pc): Remove void arg.
3622
774ee6d2
AR
36232015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3624
3625 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3626 variable name.
3627
833dcd29
AR
36282015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3629
3630 * inferiors.c (thread_pid_matches_callback): New function.
3631 (find_thread_process): New function.
3632 (remove_thread): Reset current_thread.
3633 (remove_process): Assert threads have been removed first.
3634
8d689ee5
YQ
36352015-10-15 Yao Qi <yao.qi@linaro.org>
3636
3637 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3638 if it is 3.
3639 (aarch64_remove_point): Likewise.
3640 * regcache.c (regcache_register_size): New function.
3641
1c2e1515
YQ
36422015-10-12 Yao Qi <yao.qi@linaro.org>
3643
3644 * linux-aarch64-low.c: Update all callers as emit_load_store
3645 is renamed to aarch64_emit_load_store.
3646
e1c587c3
YQ
36472015-10-12 Yao Qi <yao.qi@linaro.org>
3648
3649 * linux-aarch64-low.c: Update all callers of function renaming
3650 from emit_insn to aarch64_emit_insn.
3651
b6542f81
YQ
36522015-10-12 Yao Qi <yao.qi@linaro.org>
3653
3654 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3655 arch/aarch64-insn.h.
3656 (struct aarch64_memory_operand): Likewise.
3657 (ENCODE): Likewise.
3658 (emit_insn): Move to arch/aarch64-insn.c.
3659 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3660 (emit_load_store): Move to arch/aarch64-insn.c.
3661 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3662 (can_encode_int32): Remove.
3663
246994ce
YQ
36642015-10-12 Yao Qi <yao.qi@linaro.org>
3665
3666 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3667 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3668 (aarch64_relocate_instruction): Likewise.
3669 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3670 (struct aarch64_insn_visitor): Likewise.
3671
0badd99f
YQ
36722015-10-12 Yao Qi <yao.qi@linaro.org>
3673
3674 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3675 (struct aarch64_insn_visitor): New.
3676 (struct aarch64_insn_relocation_data): New.
3677 (aarch64_ftrace_insn_reloc_b): New function.
3678 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3679 (aarch64_ftrace_insn_reloc_cb): Likewise.
3680 (aarch64_ftrace_insn_reloc_tb): Likewise.
3681 (aarch64_ftrace_insn_reloc_adr): Likewise.
3682 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3683 (aarch64_ftrace_insn_reloc_others): Likewise.
3684 (visitor): New.
3685 (aarch64_relocate_instruction): Use visitor.
3686
dfaffe9d
YQ
36872015-10-12 Yao Qi <yao.qi@linaro.org>
3688
3689 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3690 int. Add argument buf.
3691 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3692 aarch64_relocate_instruction.
3693
70b439f0
YQ
36942015-10-12 Yao Qi <yao.qi@linaro.org>
3695
3696 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3697 argument insn. Remove local variable insn. Don't call
3698 target_read_uint32.
3699 (aarch64_install_fast_tracepoint_jump_pad): Call
3700 target_read_uint32.
3701
7781c06f
YQ
37022015-09-30 Yao Qi <yao.qi@linaro.org>
3703
3704 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3705 (emit_load_store_pair): Likewise.
3706
9a3c8263
SM
37072015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3708
3709 * dll.c (match_dll): Add cast(s).
3710 (unloaded_dll): Likewise.
3711 * linux-low.c (second_thread_of_pid_p): Likewise.
3712 (delete_lwp_callback): Likewise.
3713 (count_events_callback): Likewise.
3714 (select_event_lwp_callback): Likewise.
3715 (linux_set_resume_request): Likewise.
3716 * server.c (accumulate_file_name_length): Likewise.
3717 (emit_dll_description): Likewise.
3718 (handle_qxfer_threads_worker): Likewise.
3719 (visit_actioned_threads): Likewise.
3720 * thread-db.c (any_thread_of): Likewise.
3721 * tracepoint.c (same_process_p): Likewise.
3722 (match_blocktype): Likewise.
3723 (build_traceframe_info_xml): Likewise.
3724
224c3ddb
SM
37252015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3726
3727 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3728 assignment.
3729 (gdb_unparse_agent_expr): Likewise.
3730 * hostio.c (require_data): Likewise.
3731 (handle_pread): Likewise.
3732 * linux-low.c (disable_regset): Likewise.
3733 (fetch_register): Likewise.
3734 (store_register): Likewise.
3735 (get_dynamic): Likewise.
3736 (linux_qxfer_libraries_svr4): Likewise.
3737 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3738 (set_fast_tracepoint_jump): Likewise.
3739 (uninsert_fast_tracepoint_jumps_at): Likewise.
3740 (reinsert_fast_tracepoint_jumps_at): Likewise.
3741 (validate_inserted_breakpoint): Likewise.
3742 (clone_agent_expr): Likewise.
3743 * regcache.c (init_register_cache): Likewise.
3744 * remote-utils.c (putpkt_binary_1): Likewise.
3745 (decode_M_packet): Likewise.
3746 (decode_X_packet): Likewise.
3747 (look_up_one_symbol): Likewise.
3748 (relocate_instruction): Likewise.
3749 (monitor_output): Likewise.
3750 * server.c (handle_search_memory): Likewise.
3751 (handle_qxfer_exec_file): Likewise.
3752 (handle_qxfer_libraries): Likewise.
3753 (handle_qxfer): Likewise.
3754 (handle_query): Likewise.
3755 (handle_v_cont): Likewise.
3756 (handle_v_run): Likewise.
3757 (captured_main): Likewise.
3758 * target.c (write_inferior_memory): Likewise.
3759 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3760 * tracepoint.c (init_trace_buffer): Likewise.
3761 (add_tracepoint_action): Likewise.
3762 (add_traceframe): Likewise.
3763 (add_traceframe_block): Likewise.
3764 (cmd_qtdpsrc): Likewise.
3765 (cmd_qtdv): Likewise.
3766 (cmd_qtstatus): Likewise.
3767 (response_source): Likewise.
3768 (response_tsv): Likewise.
3769 (cmd_qtnotes): Likewise.
3770 (gdb_collect): Likewise.
3771 (initialize_tracepoint): Likewise.
3772
afbe19f8
PL
37732015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3774
3775 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3776 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3777 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3778 <NOP>: New.
3779 (enum aarch64_condition_codes): New enum.
3780 (w0): New static global.
3781 (fp): Likewise.
3782 (lr): Likewise.
3783 (struct aarch64_memory_operand) <type>: New
3784 MEMORY_OPERAND_POSTINDEX type.
3785 (postindex_memory_operand): New helper function.
3786 (emit_ret): New function.
3787 (emit_load_store_pair): New function, factored out of emit_stp
3788 with support for MEMORY_OPERAND_POSTINDEX.
3789 (emit_stp): Rewrite using emit_load_store_pair.
3790 (emit_ldp): New function.
3791 (emit_load_store): Likewise.
3792 (emit_ldr): Mention post-index instruction in comment.
3793 (emit_ldrh): New function.
3794 (emit_ldrb): New function.
3795 (emit_ldrsw): Mention post-index instruction in comment.
3796 (emit_str): Likewise.
3797 (emit_subs): New function.
3798 (emit_cmp): Likewise.
3799 (emit_and): Likewise.
3800 (emit_orr): Likewise.
3801 (emit_orn): Likewise.
3802 (emit_eor): Likewise.
3803 (emit_mvn): Likewise.
3804 (emit_lslv): Likewise.
3805 (emit_lsrv): Likewise.
3806 (emit_asrv): Likewise.
3807 (emit_mul): Likewise.
3808 (emit_sbfm): Likewise.
3809 (emit_sbfx): Likewise.
3810 (emit_ubfm): Likewise.
3811 (emit_ubfx): Likewise.
3812 (emit_csinc): Likewise.
3813 (emit_cset): Likewise.
3814 (emit_nop): Likewise.
3815 (emit_ops_insns): New helper function.
3816 (emit_pop): Likewise.
3817 (emit_push): Likewise.
3818 (aarch64_emit_prologue): New function.
3819 (aarch64_emit_epilogue): Likewise.
3820 (aarch64_emit_add): Likewise.
3821 (aarch64_emit_sub): Likewise.
3822 (aarch64_emit_mul): Likewise.
3823 (aarch64_emit_lsh): Likewise.
3824 (aarch64_emit_rsh_signed): Likewise.
3825 (aarch64_emit_rsh_unsigned): Likewise.
3826 (aarch64_emit_ext): Likewise.
3827 (aarch64_emit_log_not): Likewise.
3828 (aarch64_emit_bit_and): Likewise.
3829 (aarch64_emit_bit_or): Likewise.
3830 (aarch64_emit_bit_xor): Likewise.
3831 (aarch64_emit_bit_not): Likewise.
3832 (aarch64_emit_equal): Likewise.
3833 (aarch64_emit_less_signed): Likewise.
3834 (aarch64_emit_less_unsigned): Likewise.
3835 (aarch64_emit_ref): Likewise.
3836 (aarch64_emit_if_goto): Likewise.
3837 (aarch64_emit_goto): Likewise.
3838 (aarch64_write_goto_address): Likewise.
3839 (aarch64_emit_const): Likewise.
3840 (aarch64_emit_call): Likewise.
3841 (aarch64_emit_reg): Likewise.
3842 (aarch64_emit_pop): Likewise.
3843 (aarch64_emit_stack_flush): Likewise.
3844 (aarch64_emit_zero_ext): Likewise.
3845 (aarch64_emit_swap): Likewise.
3846 (aarch64_emit_stack_adjust): Likewise.
3847 (aarch64_emit_int_call_1): Likewise.
3848 (aarch64_emit_void_call_2): Likewise.
3849 (aarch64_emit_eq_goto): Likewise.
3850 (aarch64_emit_ne_goto): Likewise.
3851 (aarch64_emit_lt_goto): Likewise.
3852 (aarch64_emit_le_goto): Likewise.
3853 (aarch64_emit_gt_goto): Likewise.
3854 (aarch64_emit_ge_got): Likewise.
3855 (aarch64_emit_ops_impl): New static global variable.
3856 (aarch64_emit_ops): New target function, return
3857 &aarch64_emit_ops_impl.
3858 (struct linux_target_ops): Install it.
3859
bb903df0
PL
38602015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3861
3862 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3863 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3864 aarch64-ipa.o.
3865 * linux-aarch64-ipa.c: New file.
3866 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3867 and endian.h.
3868 (aarch64_get_thread_area): New target method.
3869 (extract_signed_bitfield): New helper function.
3870 (aarch64_decode_ldr_literal): New function.
3871 (enum aarch64_opcodes): New enum.
3872 (struct aarch64_register): New struct.
3873 (struct aarch64_operand): New struct.
3874 (x0): New static global.
3875 (x1): Likewise.
3876 (x2): Likewise.
3877 (x3): Likewise.
3878 (x4): Likewise.
3879 (w2): Likewise.
3880 (ip0): Likewise.
3881 (sp): Likewise.
3882 (xzr): Likewise.
3883 (aarch64_register): New helper function.
3884 (register_operand): Likewise.
3885 (immediate_operand): Likewise.
3886 (struct aarch64_memory_operand): New struct.
3887 (offset_memory_operand): New helper function.
3888 (preindex_memory_operand): Likewise.
3889 (enum aarch64_system_control_registers): New enum.
3890 (ENCODE): New macro.
3891 (emit_insn): New helper function.
3892 (emit_b): New function.
3893 (emit_bcond): Likewise.
3894 (emit_cb): Likewise.
3895 (emit_tb): Likewise.
3896 (emit_blr): Likewise.
3897 (emit_stp): Likewise.
3898 (emit_ldp_q_offset): Likewise.
3899 (emit_stp_q_offset): Likewise.
3900 (emit_load_store): Likewise.
3901 (emit_ldr): Likewise.
3902 (emit_ldrsw): Likewise.
3903 (emit_str): Likewise.
3904 (emit_ldaxr): Likewise.
3905 (emit_stxr): Likewise.
3906 (emit_stlr): Likewise.
3907 (emit_data_processing_reg): Likewise.
3908 (emit_data_processing): Likewise.
3909 (emit_add): Likewise.
3910 (emit_sub): Likewise.
3911 (emit_mov): Likewise.
3912 (emit_movk): Likewise.
3913 (emit_mov_addr): Likewise.
3914 (emit_mrs): Likewise.
3915 (emit_msr): Likewise.
3916 (emit_sevl): Likewise.
3917 (emit_wfe): Likewise.
3918 (append_insns): Likewise.
3919 (can_encode_int32_in): New helper function.
3920 (aarch64_relocate_instruction): New function.
3921 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3922 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3923 (struct linux_target_ops): Install aarch64_get_thread_area,
3924 aarch64_install_fast_tracepoint_jump_pad and
3925 aarch64_get_min_fast_tracepoint_insn_len.
3926
787749ea
PL
39272015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3928
3929 * Makefile.in (aarch64-insn.o): New rule.
3930 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3931
9812b2e6
YQ
39322015-09-21 Yao Qi <yao.qi@linaro.org>
3933
3934 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3935
18fe412b
YQ
39362015-09-21 Yao Qi <yao.qi@linaro.org>
3937
3938 * tracepoint.c (max_jump_pad_size): Remove.
3939
a0cc84cd
YQ
39402015-09-18 Yao Qi <yao.qi@linaro.org>
3941
3942 * linux-aarch64-low.c: Don't include sys/uio.h.
3943 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3944
d78908cf
WW
39452015-09-16 Wei-cheng Wang <cole945@gmail.com>
3946
3947 * tracepoint.c (eval_result_type): Change prototype.
3948 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3949
d57e0d50
PA
39502015-09-15 Pedro Alves <palves@redhat.com>
3951
3952 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3953 Check whether to report exec events instead of checking whether
3954 multiprocess is enabled.
3955
5a676acc
PA
39562015-09-15 Pedro Alves <palves@redhat.com>
3957
3958 PR remote/18965
3959 * remote-utils.c (prepare_resume_reply): Merge
3960 TARGET_WAITKIND_VFORK_DONE switch case with the
3961 TARGET_WAITKIND_FORKED case.
3962
7c5d0fad
YQ
39632015-09-15 Yao Qi <yao.qi@linaro.org>
3964
3965 * server.c (handle_query): Check string comparison using
3966 "else if" instead of "if".
3967
750ce8d1
YQ
39682015-09-15 Yao Qi <yao.qi@linaro.org>
3969
3970 * server.c (vCont_supported): New global variable.
3971 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3972 matches. Append ";vContSupported+" to own_buf.
3973 (handle_v_requests): Append ";s;S" to own_buf if target supports
3974 hardware single step or vCont_supported is false.
3975 (capture_main): Set vCont_supported to zero.
3976
70b90b91
YQ
39772015-09-15 Yao Qi <yao.qi@linaro.org>
3978
3979 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3980 it to ...
3981 (linux_supports_hardware_single_step): ... New function.
3982 (linux_target_ops): Update.
3983 * lynx-low.c (lynx_target_ops): Set field
3984 supports_hardware_single_step to target_can_do_hardware_single_step.
3985 * nto-low.c (nto_target_ops): Likewise.
3986 * spu-low.c (spu_target_ops): Likewise.
3987 * win32-low.c (win32_target_ops): Likewise.
3988 * target.c (target_can_do_hardware_single_step): New function.
3989 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3990 Remove. <supports_hardware_single_step>: New field.
3991 (target_supports_conditional_breakpoints): Remove.
3992 (target_supports_hardware_single_step): New macro.
3993 (target_can_do_hardware_single_step): Declare.
3994 * server.c (handle_query): Use target_supports_hardware_single_step
3995 instead of target_supports_conditional_breakpoints.
3996
ade90bde
YQ
39972015-09-15 Yao Qi <yao.qi@linaro.org>
3998
3999 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4000 function.
4001 (struct linux_target_ops the_low_target): Install
4002 aarch64_linux_siginfo_fixup.
4003
94585166
DB
40042015-09-11 Don Breazeal <donb@codesourcery.com>
4005 Luis Machado <lgustavo@codesourcery.com>
4006
4007 * linux-low.c (linux_mourn): Static declaration.
4008 (linux_arch_setup): Move in front of
4009 handle_extended_wait.
4010 (linux_arch_setup_thread): New function.
4011 (handle_extended_wait): Handle exec events. Call
4012 linux_arch_setup_thread. Make event_lwp argument a
4013 pointer-to-a-pointer.
4014 (check_zombie_leaders): Do not check stopped threads.
4015 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4016 (linux_low_filter_event): Add lwp and thread for exec'ing
4017 non-leader thread if leader thread has been deleted.
4018 Refactor code into linux_arch_setup_thread and call it.
4019 Pass child lwp pointer by reference to handle_extended_wait.
4020 (linux_wait_for_event_filtered): Update comment.
4021 (linux_wait_1): Prevent clobbering exec event status.
4022 (linux_supports_exec_events): New function.
4023 (linux_target_ops) <supports_exec_events>: Initialize new member.
4024 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4025 new member.
4026 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4027 * server.c (report_exec_events): New global variable.
4028 (handle_query): Handle qSupported query for exec-events feature.
4029 (captured_main): Initialize report_exec_events.
4030 * server.h (report_exec_events): Declare new global variable.
4031 * target.h (struct target_ops) <supports_exec_events>: New
4032 member.
4033 (target_supports_exec_events): New macro.
4034 * win32-low.c (win32_target_ops) <supports_exec_events>:
4035 Initialize new member.
4036
0568462b
MM
40372015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4038
4039 * linux-low.c (linux_low_enable_btrace): Remove.
4040 (linux_target_ops): Replace linux_low_enable_btrace with
4041 linux_enable_btrace.
4042
39edd165
YQ
40432015-09-03 Yao Qi <yao.qi@linaro.org>
4044
4045 * linux-aarch64-low.c (aarch64_insert_point): Call
4046 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4047 returns true.
4048
1db33b5a
UW
40492015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4050
4051 * linux-low.c (check_stopped_by_breakpoint): Use
4052 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4053
ab290430
PA
40542015-08-27 Pedro Alves <palves@redhat.com>
4055
4056 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4057
8d749320
SM
40582015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4059
6711b7f8
SM
4060 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4061 the XNEW-family equivalent.
8d749320
SM
4062 (compile_bytecodes): Likewise.
4063 * dll.c (loaded_dll): Likewise.
4064 * event-loop.c (append_callback_event): Likewise.
4065 (create_file_handler): Likewise.
4066 (create_file_event): Likewise.
4067 * hostio.c (handle_open): Likewise.
4068 * inferiors.c (add_thread): Likewise.
4069 (add_process): Likewise.
4070 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4071 * linux-arm-low.c (arm_new_process): Likewise.
4072 (arm_new_thread): Likewise.
4073 * linux-low.c (add_to_pid_list): Likewise.
4074 (linux_add_process): Likewise.
4075 (handle_extended_wait): Likewise.
4076 (add_lwp): Likewise.
4077 (enqueue_one_deferred_signal): Likewise.
4078 (enqueue_pending_signal): Likewise.
4079 (linux_resume_one_lwp_throw): Likewise.
4080 (linux_resume_one_thread): Likewise.
4081 (linux_read_memory): Likewise.
4082 (linux_write_memory): Likewise.
4083 * linux-mips-low.c (mips_linux_new_process): Likewise.
4084 (mips_linux_new_thread): Likewise.
4085 (mips_add_watchpoint): Likewise.
4086 * linux-x86-low.c (initialize_low_arch): Likewise.
4087 * lynx-low.c (lynx_add_process): Likewise.
4088 * mem-break.c (set_raw_breakpoint_at): Likewise.
4089 (set_breakpoint): Likewise.
4090 (add_condition_to_breakpoint): Likewise.
4091 (add_commands_to_breakpoint): Likewise.
4092 (clone_agent_expr): Likewise.
4093 (clone_one_breakpoint): Likewise.
4094 * regcache.c (new_register_cache): Likewise.
4095 * remote-utils.c (look_up_one_symbol): Likewise.
4096 * server.c (queue_stop_reply): Likewise.
4097 (start_inferior): Likewise.
4098 (queue_stop_reply_callback): Likewise.
4099 (handle_target_event): Likewise.
4100 * spu-low.c (fetch_ppc_memory): Likewise.
4101 (store_ppc_memory): Likewise.
4102 * target.c (set_target_ops): Likewise.
4103 * thread-db.c (thread_db_load_search): Likewise.
4104 (try_thread_db_load_1): Likewise.
4105 * tracepoint.c (add_tracepoint): Likewise.
4106 (add_tracepoint_action): Likewise.
4107 (create_trace_state_variable): Likewise.
4108 (cmd_qtdpsrc): Likewise.
4109 (cmd_qtro): Likewise.
4110 (add_while_stepping_state): Likewise.
4111 * win32-low.c (child_add_thread): Likewise.
4112 (get_image_name): Likewise.
4113
ed8b7b42
YQ
41142015-08-25 Yao Qi <yao.qi@linaro.org>
4115
4116 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4117
db3cb7cb
YQ
41182015-08-25 Yao Qi <yao.qi@linaro.org>
4119
4120 * Makefile.in (aarch64-linux.o): New rule.
4121 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4122 srv_tgtobj.
4123 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4124 (aarch64_init_debug_reg_state): Make it extern.
4125 (aarch64_linux_prepare_to_resume): Remove.
4126
f6011a1c
YQ
41272015-08-25 Yao Qi <yao.qi@linaro.org>
4128
4129 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4130 lwp_arch_private_info and ptid_of_lwp.
4131
88e2cf7e
YQ
41322015-08-25 Yao Qi <yao.qi@linaro.org>
4133
4134 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4135 Find proc_info by find_process_pid. All callers updated.
4136
5e35436e
YQ
41372015-08-25 Yao Qi <yao.qi@linaro.org>
4138
4139 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4140 Remove.
4141 (debug_reg_change_callback): Remove.
4142 (aarch64_notify_debug_reg_change): Remove.
4143
4a8a7965
YQ
41442015-08-25 Yao Qi <yao.qi@linaro.org>
4145
4146 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4147 Call current_lwp_ptid.
4148
32a271ee
YQ
41492015-08-25 Yao Qi <yao.qi@linaro.org>
4150
4151 * linux-aarch64-low.c (debug_reg_change_callback): Use
4152 debug_printf.
4153
0d51c8d7
YQ
41542015-08-25 Yao Qi <yao.qi@linaro.org>
4155
4156 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4157
31a43dd5
YQ
41582015-08-25 Yao Qi <yao.qi@linaro.org>
4159
4160 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4161
8ee52567
YQ
41622015-08-25 Yao Qi <yao.qi@linaro.org>
4163
4164 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4165 the code.
4166
ff3f0f45
YQ
41672015-08-25 Yao Qi <yao.qi@linaro.org>
4168
4169 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4170 Remove.
4171 (debug_reg_change_callback): Remove argument entry and add argument
4172 lwp. Remove local variable thread. Don't print thread id in the
4173 debugging output. Don't check whether pid of thread equals to pid.
4174 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4175 iterate_over_lwps instead find_inferior.
4176
3d40fbb5
PA
41772015-08-24 Pedro Alves <palves@redhat.com>
4178
4179 * inferiors.c (get_first_process): New function.
4180 * inferiors.h (get_first_process): New declaration.
4181 * remote-utils.c (read_ptid): Default to the first process in the
4182 list, instead of to the current thread's process.
4183
438e1e42
PA
41842015-08-24 Pedro Alves <palves@redhat.com>
4185
4186 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4187 * event-loop.c: Likewise.
4188 * remote-utils.c: Likewise.
4189 * tracepoint.c: Likewise.
4190
a8c6d4fc
PA
41912015-08-24 Pedro Alves <palves@redhat.com>
4192
4193 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4194 ptid_get_lwp.
4195
99b0bb12
PA
41962015-08-21 Pedro Alves <palves@redhat.com>
4197
4198 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4199 instead of literal 1.
4200
f8904751
PA
42012015-08-21 Pedro Alves <palves@redhat.com>
4202
4203 * tdesc.c (default_description): Explicitly zero-initialize.
4204
465a859e
PA
42052015-08-21 Pedro Alves <palves@redhat.com>
4206
4207 PR gdb/18749
4208 * inferiors.c (remove_thread): Discard any pending stop reply for
4209 this thread.
4210 * server.c (remove_all_on_match_pid): Rename to ...
4211 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4212 instead of a pid.
4213 (discard_queued_stop_replies): Change parameter to a ptid. Now
4214 extern.
4215 (handle_v_kill, kill_inferior_callback, captured_main)
4216 (process_serial_event): Adjust.
4217 * server.h (discard_queued_stop_replies): Declare.
4218
f0db101d
PA
42192015-08-21 Pedro Alves <palves@redhat.com>
4220
4221 * linux-low.c (wait_for_sigstop): Always switch to no thread
4222 selected if the previously current thread dies.
4223 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4224 process instead of the current thread's.
4225 * remote-utils.c (input_interrupt): Don't check if there's no
4226 current thread.
4227 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4228 current thread to the general thread fails, error out.
4229 (handle_qxfer_auxv, handle_qxfer_libraries)
4230 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4231 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4232 (handle_query): Check if there's a thread selected instead of
4233 checking whether there's any thread in the thread list.
4234 (handle_qxfer_threads, handle_qxfer_btrace)
4235 (handle_qxfer_btrace_conf): Don't error out early if there's no
4236 thread in the thread list.
4237 (handle_v_cont, myresume): Don't set the current thread to the
4238 continue thread.
4239 (process_serial_event) <Hg handling>: Also set thread_id if the
4240 previous general thread is still alive.
4241 (process_serial_event) <g/G handling>: If setting the current
4242 thread to the general thread fails, error out.
4243 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4244 thread's lwp instead of the current thread's.
4245 * target.c (set_desired_thread): If the desired thread was not
4246 found, leave the current thread pointing to NULL. Return an int
4247 (boolean) indicating success.
4248 * target.h (set_desired_thread): Change return type to int.
4249
40045d91
MF
42502015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4251
4252 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4253 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4254 #includes.
4255 (ps_get_thread_area): New function.
4256
45face3b
GB
42572015-08-19 Gary Benson <gbenson@redhat.com>
4258
4259 * hostio.c (handle_pread): Do not attempt to read more data
4260 than hostio_reply_with_data can fit in a packet.
4261
16d5f642
JB
42622015-08-18 Joel Brobecker <brobecker@adacore.com>
4263
4264 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4265
a738da3a
MF
42662015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4267
4268 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4269
33ebda9d
PA
42702015-08-06 Pedro Alves <palves@redhat.com>
4271
4272 * tracepoint.c (expr_eval_result): Now an int.
4273
a44892be
PA
42742015-08-06 Pedro Alves <palves@redhat.com>
4275
4276 * gdbthread.h (struct regcache): Forward declare.
4277 (struct thread_info) <regcache_data>: Now a struct regcache
4278 pointer.
4279 * inferiors.c (inferior_regcache_data)
4280 (set_inferior_regcache_data): Now work with struct regcache
4281 pointers.
4282 * inferiors.h (struct regcache): Forward declare.
4283 (inferior_regcache_data, set_inferior_regcache_data): Now work
4284 with struct regcache pointers.
4285 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4286 (free_register_cache_thread): Remove struct regcache pointer
4287 casts.
4288
608a1e46
PA
42892015-08-06 Pedro Alves <palves@redhat.com>
4290
4291 * server.c (captured_main): On error, print the exception message
4292 to stderr, and if run_once is set, throw a quit.
4293
f0ce0d3a
PA
42942015-08-06 Pedro Alves <palves@redhat.com>
4295
4296 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4297 the current thread.
4298
bf47e248
PA
42992015-08-06 Pedro Alves <palves@redhat.com>
4300
4301 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4302 reading beyond the passed in buffer length.
4303
b6b9ffcc
PL
43042015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4305
4306 * tracepoint.c (symbol_list) <required>: Remove.
4307
863d01bd
PA
43082015-08-06 Pedro Alves <palves@redhat.com>
4309
4310 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4311 count if stopping and suspending threads.
4312 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4313 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4314 (linux_detach): Complete an ongoing step-over.
4315 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4316 throughout.
4317 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4318 (linux_wait_1): If passing a signal to the inferior after
4319 finishing a step-over, unsuspend and re-resume all lwps. If we
4320 see a single-step event but the thread should be continuing, don't
4321 pass the trap to gdb.
4322 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4323 internal_error instead of gdb_assert.
4324 (enqueue_pending_signal): New function.
4325 (check_ptrace_stopped_lwp_gone): Add debug output.
4326 (start_step_over): Use internal_error instead of gdb_assert.
4327 (complete_ongoing_step_over): New function.
4328 (linux_resume_one_thread): Don't resume a suspended thread.
4329 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4330 it stepping.
4331
00db26fa
PA
43322015-08-06 Pedro Alves <palves@redhat.com>
4333
4334 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4335 (linux_thread_alive): Use lwp_is_marked_dead.
4336 (extended_event_reported): Delete.
4337 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4338 instead of extended_event_reported.
4339 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4340 as well.
4341 (lwp_is_marked_dead): New function.
4342 (lwp_running): Use lwp_is_marked_dead.
4343 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4344 comment.
4345
ad071a30
PA
43462015-08-06 Pedro Alves <palves@redhat.com>
4347
4348 * linux-low.c (linux_wait_1): Move fork event output out of the
4349 !report_to_gdb check. Pass event_child->waitstatus to
4350 target_waitstatus_to_string instead of ourstatus.
4351
524b57e6
YQ
43522015-08-04 Yao Qi <yao.qi@linaro.org>
4353
4354 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4355 if current_thread is 32 bit.
4356
6085d6f6
YQ
43572015-08-04 Yao Qi <yao.qi@linaro.org>
4358
4359 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4360 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4361 * server.c (extended_protocol): Remove "static".
4362 * server.h (extended_protocol): Declare it.
4363
8a7e4587
YQ
43642015-08-04 Yao Qi <yao.qi@linaro.org>
4365
4366 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4367 both aarch64 and aarch32.
4368 (aarch64_set_pc): Likewise.
4369
3b53ae99
YQ
43702015-08-04 Yao Qi <yao.qi@linaro.org>
4371
4372 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4373 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4374 arm-with-neon.xml to srv_xmlfiles.
4375 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4376 (is_64bit_tdesc): New function.
4377 (aarch64_linux_read_description): New function.
4378 (aarch64_arch_setup): Call aarch64_linux_read_description.
4379 (regs_info): Rename to regs_info_aarch64.
4380 (aarch64_regs_info): Return right regs_info.
4381 (initialize_low_arch): Call initialize_low_arch_aarch32.
4382
bd9e6534
YQ
43832015-08-04 Yao Qi <yao.qi@linaro.org>
4384
4385 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4386 * linux-aarch32-low.c: New file.
4387 * linux-aarch32-low.h: New file.
4388 * linux-arm-low.c (arm_fill_gregset): Move it to
4389 linux-aarch32-low.c.
4390 (arm_store_gregset): Likewise.
4391 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4392 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4393 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4394 (regs_info): Rename to regs_info_arm.
4395 (arm_regs_info): Return regs_info_aarch32 if
4396 have_ptrace_getregset is 1 and target description is
4397 arm_with_neon or arm_with_vfpv3.
4398 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4399 Call initialize_low_arch_aarch32 instead.
4400
ded48a5e
YQ
44012015-08-04 Yao Qi <yao.qi@linaro.org>
4402
4403 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4404 * linux-low.c: ... here.
4405 * linux-low.h (have_ptrace_getregset): Declare it.
4406
96e9210f
PA
44072015-08-04 Pedro Alves <palves@redhat.com>
4408
4409 * thread-db.c (struct thread_db): Use new typedefs.
4410 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4411 CHK calls.
4412 (disable_thread_event_reporting): Cast result of dlsym to
4413 destination function pointer type.
4414 (thread_db_mourn): Use td_ta_delete_ftype.
4415
af60a1ef
SL
44162015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4417
4418 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4419 arch variant.
4420 (CDX_BREAKPOINT): Define for R2.
4421 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4422 (the_low_target): Add comments.
4423
e8b41681
YQ
44242015-07-30 Yao Qi <yao.qi@linaro.org>
4425
4426 * linux-arm-low.c (arm_hwcap): Remove it.
4427 (arm_read_description): New local variable arm_hwcap. Don't
4428 set arm_hwcap to zero.
4429
89abb039
YQ
44302015-07-30 Yao Qi <yao.qi@linaro.org>
4431
4432 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4433 Use regcache->tdesc instead.
4434 (arm_store_wmmxregset): Likewise.
4435 (arm_fill_vfpregset): Likewise.
4436 (arm_store_vfpregset): Likewise.
4437
deca266c
YQ
44382015-07-30 Yao Qi <yao.qi@linaro.org>
4439
4440 * linux-arm-low.c: Include arch/arm.h.
4441 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4442 (arm_store_gregset): Likewise.
4443
aa58a496
SM
44442015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4445
4446 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4447 ptrace's 4th parameter.
4448
50904b25
YQ
44492015-07-27 Yao Qi <yao.qi@linaro.org>
4450
4451 * configure.srv (case aarch64*-*-linux*): Don't set
4452 srv_linux_usrregs.
4453
5826e159
PA
44542015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4455
4456 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4457 sys/ptrace.h.
4458 * linux-arm-low.c: Likewise.
4459 * linux-cris-low.c: Likewise.
4460 * linux-crisv32-low.c: Likewise.
4461 * linux-low.c: Likewise.
4462 * linux-m68k-low.c: Likewise.
4463 * linux-mips-low.c: Likewise.
4464 * linux-nios2-low.c: Likewise.
4465 * linux-s390-low.c: Likewise.
4466 * linux-sparc-low.c: Likewise.
4467 * linux-tic6x-low.c: Likewise.
4468 * linux-tile-low.c: Likewise.
4469 * linux-x86-low.c: Likewise.
4470
54019719
PA
44712015-07-24 Pedro Alves <palves@redhat.com>
4472
4473 * config.in: Regenerate.
4474 * configure: Regenerate.
4475
eb7aa561
PA
44762015-07-24 Pedro Alves <palves@redhat.com>
4477
4478 * acinclude.m4: Include ../ptrace.m4.
4479 * configure.ac: Call GDB_AC_PTRACE.
4480 * config.in, configure: Regenerate.
4481
55d7b841
YQ
44822015-07-24 Yao Qi <yao.qi@linaro.org>
4483
4484 * linux-low.c (linux_create_inferior): Remove setting to
4485 proc->priv->new_inferior.
4486 (linux_attach): Likewise.
4487 (linux_low_filter_event): Likewise.
4488 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4489
c06cbd92
YQ
44902015-07-24 Yao Qi <yao.qi@linaro.org>
4491
4492 * linux-low.c (linux_arch_setup): New function.
4493 (linux_low_filter_event): If proc->tdesc is NULL and
4494 proc->attached is true, call the_low_target.arch_setup.
4495 Otherwise, keep status pending, and return.
4496 (linux_resume_one_lwp_throw): Don't call get_pc if
4497 thread->while_stepping isn't NULL. Don't call
4498 get_thread_regcache if proc->tdesc is NULL.
4499 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4500 (linux_target_ops): Install arch_setup.
4501 * server.c (start_inferior): Call the_target->arch_setup.
4502 * target.h (struct target_ops) <arch_setup>: New field.
4503 (target_arch_setup): New marco.
4504 * lynx-low.c (lynx_target_ops): Update.
4505 * nto-low.c (nto_target_ops): Update.
4506 * spu-low.c (spu_target_ops): Update.
4507 * win32-low.c (win32_target_ops): Update.
4508
5ae3ebba
YQ
45092015-07-24 Yao Qi <yao.qi@linaro.org>
4510
4511 * linux-low.c (linux_add_process): Don't set
4512 proc->priv->new_inferior.
4513 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4514 (linux_attach): Likewise.
4515
eb97750b
YQ
45162015-07-24 Yao Qi <yao.qi@linaro.org>
4517
4518 * server.c (start_inferior): Code refactor.
4519
51aee833
YQ
45202015-07-24 Yao Qi <yao.qi@linaro.org>
4521
4522 * server.c (process_serial_event): Set general_thread.
4523
af1b22f3
YQ
45242015-07-21 Yao Qi <yao.qi@linaro.org>
4525
4526 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4527 aarch64_linux_get_debug_reg_capacity.
4528
554717a3
YQ
45292015-07-17 Yao Qi <yao.qi@linaro.org>
4530
4531 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4532 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4533 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4534 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4535 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4536 (AARCH64_HWP_ALIGNMENT): Likewise.
4537 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4538 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4539 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4540 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4541 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4542 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4543 (struct aarch64_debug_reg_state): Likewise.
4544 (struct arch_lwp_info): Likewise.
4545 (aarch64_align_watchpoint): Likewise.
4546 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4547 (aarch64_watchpoint_length): Likewise.
4548 (aarch64_point_encode_ctrl_reg): Likewise
4549 (aarch64_point_is_aligned): Likewise.
4550 (aarch64_align_watchpoint): Likewise.
4551 (aarch64_linux_set_debug_regs):
4552 (aarch64_dr_state_insert_one_point): Likewise.
4553 (aarch64_dr_state_remove_one_point): Likewise.
4554 (aarch64_handle_breakpoint): Likewise.
4555 (aarch64_handle_aligned_watchpoint): Likewise.
4556 (aarch64_handle_unaligned_watchpoint): Likewise.
4557 (aarch64_handle_watchpoint): Likewise.
4558
c67ca4de
YQ
45592015-07-17 Yao Qi <yao.qi@linaro.org>
4560
4561 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4562 and don't aarch64_get_debug_reg_state. All callers update.
4563 (aarch64_handle_aligned_watchpoint): Likewise.
4564 (aarch64_handle_unaligned_watchpoint): Likewise.
4565 (aarch64_handle_watchpoint): Likewise.
4566 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4567 (aarch64_remove_point): Likewise.
4568
25abf979
YQ
45692015-07-17 Yao Qi <yao.qi@linaro.org>
4570
4571 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4572 debug_printf.
4573 (aarch64_handle_unaligned_watchpoint): Likewise.
4574
db1ff28b
JK
45752015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4576
4577 Revert the previous 3 commits:
4578 Move gdb_regex* to common/
4579 Move linux_find_memory_regions_full & co.
4580 gdbserver build-id attribute generator
4581
700ca40f
JK
45822015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4583 Jan Kratochvil <jan.kratochvil@redhat.com>
4584
4585 gdbserver build-id attribute generator.
4586 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4587 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4588 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4589 (find_phdr): New.
4590 (get_dynamic): Use find_pdhr to traverse program headers.
4591 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4592 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4593 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4594 (get_hex_build_id): New.
4595 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4596 to reply XML document.
4597
9904185c
JK
45982015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4599 Jan Kratochvil <jan.kratochvil@redhat.com>
4600
4601 * target.c: Include target/target-utils.h and fcntl.h.
4602 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4603 (target_fileio_read_stralloc): New functions.
4604
6e5b4429
JK
46052015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4606
4607 * Makefile.in (OBS): Add gdb_regex.o.
4608 (gdb_regex.o): New.
4609 * config.in: Rebuilt.
4610 * configure: Rebuilt.
4611
ddc98fbf
JK
46122015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4613 Jan Kratochvil <jan.kratochvil@redhat.com>
4614
4615 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4616 * Makefile.in (OBS): Add target-utils.o.
4617 (linux-maps.o, target-utils.o): New.
4618 * configure.srv (srv_linux_obj): Add linux-maps.o.
4619
e57bb7a0
PL
46202015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4621
4622 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4623 function, return 1.
4624 (the_low_target): Install it.
4625
586b02a9
PA
46262015-07-14 Pedro Alves <palves@redhat.com>
4627
4628 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4629 Instead, ignore ECHILD, and throw an error for other errnos.
4630
58c1b36c
PA
46312015-07-10 Pedro Alves <palves@redhat.com>
4632
4633 * event-loop.c (struct callback_event) <data>: Change type to
4634 gdb_client_data instance instead of gdb_client_data pointer.
4635 (append_callback_event): Adjust.
4636
421530db
PL
46372015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4638
4639 * linux-aarch64-low.c: Add comments for each linux_target_ops
4640 method. Remove comments already covered in target_ops and
4641 linux_target_ops definitions.
4642 (the_low_target): Add comments for each unimplemented method.
4643
c2d65f38
YQ
46442015-07-09 Yao Qi <yao.qi@linaro.org>
4645
4646 * linux-aarch64-low.c (aarch64_regmap): Remove.
4647 (aarch64_usrregs_info): Remove.
4648 (regs_info): Set field usrregs to NULL.
4649
b20a6524
MM
46502015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4651
4652 * linux-low.c: Include "rsp-low.h"
4653 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4654 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4655 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4656 (handle_btrace_enable_pt): New.
4657 (handle_btrace_general_set): Support "pt".
4658 (handle_btrace_conf_general_set): Support "pt:size".
4659
96c97461
PL
46602015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4661
4662 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4663 Z_PACKET_SW_BP.
4664
37d66942
PL
46652015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4666
4667 * linux-aarch64-low.c: Remove comment about endianness.
4668 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4669 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4670 memcmp.
4671
dc06243f
GB
46722015-06-24 Gary Benson <gbenson@redhat.com>
4673
4674 * linux-i386-ipa.c (stdint.h): Do not include.
4675 * lynx-i386-low.c (stdint.h): Likewise.
4676 * lynx-ppc-low.c (stdint.h): Likewise.
4677 * mem-break.c (stdint.h): Likewise.
4678 * thread-db.c (stdint.h): Likewise.
4679 * tracepoint.c (stdint.h): Likewise.
4680 * win32-low.c (stdint.h): Likewise.
4681
124e13d9
SM
46822015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4683
4684 * server.c (write_qxfer_response): Update call to
4685 remote_escape_output.
4686
909c2cda
JK
46872015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4688 Jan Kratochvil <jan.kratochvil@redhat.com>
4689
4690 Merge multiple hex conversions.
4691 * gdbreplay.c (tohex): Rename to 'fromhex'.
4692 (logchar): Use fromhex.
4693
24c05f46
JK
46942015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4695
4696 * server.c (handle_qxfer_libraries): Set `version' attribute for
4697 <library-list>.
4698
14d2069a
GB
46992015-06-10 Gary Benson <gbenson@redhat.com>
4700
4701 * target.h (struct target_ops) <multifs_open>: New field.
4702 <multifs_unlink>: Likewise.
4703 <multifs_readlink>: Likewise.
4704 * linux-low.c (nat/linux-namespaces.h): New include.
4705 (linux_target_ops): Initialize the_target->multifs_open,
4706 the_target->multifs_unlink and the_target->multifs_readlink.
4707 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4708 * hostio.c (hostio_fs_pid): New static variable.
4709 (hostio_handle_new_gdb_connection): New function.
4710 (handle_setfs): Likewise.
4711 (handle_open): Use the_target->multifs_open as appropriate.
4712 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4713 (handle_readlink): Use the_target->multifs_readlink as
4714 appropriate.
4715 (handle_vFile): Handle vFile:setfs packets.
4716 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4717 after target_handle_new_gdb_connection.
4718
4b8b5e72
GB
47192015-06-10 Gary Benson <gbenson@redhat.com>
4720
4721 * configure.ac (AC_CHECK_FUNCS): Add setns.
4722 * config.in: Regenerate.
4723 * configure: Likewise.
4724 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4725 (linux-namespaces.o): New rule.
4726 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4727
3ac2e371
GB
47282015-06-09 Gary Benson <gbenson@redhat.com>
4729
4730 * hostio.c (handle_open): Process mode argument with
4731 fileio_to_host_mode.
4732
ca9b78ce
YQ
47332015-06-01 Yao Qi <yao.qi@linaro.org>
4734
4735 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4736 * linux-x86-low.c: Likewise.
4737
bfacd19d
DB
47382015-05-28 Don Breazeal <donb@codesourcery.com>
4739
4740 * linux-low.c (handle_extended_wait): Initialize
4741 thread_info.last_resume_kind for new fork children.
4742
452003ef
PA
47432015-05-15 Pedro Alves <palves@redhat.com>
4744
4745 * target.h (target_handle_new_gdb_connection): Rewrite using if
4746 wrapped in do/while.
4747
1041a03c
JB
47482015-05-14 Joel Brobecker <brobecker@adacore.com>
4749
4750 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4751 * configure, config.in: Regenerate.
4752 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4753 Declare typedef.
4754
c269dbdb
DB
47552015-05-12 Don Breazeal <donb@codesourcery.com>
4756
4757 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4758 PTRACE_EVENT_VFORK_DONE.
4759 (linux_low_ptrace_options, extended_event_reported): Add vfork
4760 events.
4761 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4762 and "vforkdone" for RSP 'T' Stop Reply Packet.
4763 * server.h (report_vfork_events): Declare
4764 global variable.
4765
3a8a0396
DB
47662015-05-12 Don Breazeal <donb@codesourcery.com>
4767
4768 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4769 (the_low_target) <new_fork>: Initialize new member.
4770 * linux-arm-low.c (arm_new_fork): New function.
4771 (the_low_target) <new_fork>: Initialize new member.
4772 * linux-low.c (handle_extended_wait): Call new target function
4773 new_fork.
4774 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4775 * linux-mips-low.c (mips_add_watchpoint): New function
4776 extracted from mips_insert_point.
4777 (the_low_target) <new_fork>: Initialize new member.
4778 (mips_linux_new_fork): New function.
4779 (mips_insert_point): Call mips_add_watchpoint.
4780 * linux-x86-low.c (x86_linux_new_fork): New function.
4781 (the_low_target) <new_fork>: Initialize new member.
4782
de0d863e
DB
47832015-05-12 Don Breazeal <donb@codesourcery.com>
4784
4785 * linux-low.c (handle_extended_wait): Implement return value,
4786 rename argument 'event_child' to 'event_lwp', handle
4787 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4788 (linux_low_ptrace_options): New function.
4789 (linux_low_filter_event): Call linux_low_ptrace_options,
4790 use different argument fo linux_enable_event_reporting,
4791 use return value from handle_extended_wait.
4792 (extended_event_reported): New function.
4793 (linux_wait_1): Call extended_event_reported and set
4794 status to report fork events.
4795 (linux_write_memory): Add pid to debug message.
4796 (reset_lwp_ptrace_options_callback): New function.
4797 (linux_handle_new_gdb_connection): New function.
4798 (linux_target_ops): Initialize new structure member.
4799 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4800 * lynx-low.c: Initialize new structure member.
4801 * remote-utils.c (prepare_resume_reply): Implement stop reason
4802 "fork" for "T" stop message.
4803 * server.c (handle_query): Call handle_new_gdb_connection.
4804 * server.h (report_fork_events): Declare global flag.
4805 * target.h (struct target_ops) <handle_new_gdb_connection>:
4806 New member.
4807 (target_handle_new_gdb_connection): New macro.
4808 * win32-low.c: Initialize new structure member.
4809
ddcbc397
DB
48102015-05-12 Don Breazeal <donb@codesourcery.com>
4811
4812 * mem-break.c (APPEND_TO_LIST): Define macro.
4813 (clone_agent_expr): New function.
4814 (clone_one_breakpoint): New function.
4815 (clone_all_breakpoints): New function.
4816 * mem-break.h: Declare new functions.
4817
89245bc0
DB
48182015-05-12 Don Breazeal <donb@codesourcery.com>
4819
4820 * linux-low.c (linux_supports_fork_events): New function.
4821 (linux_supports_vfork_events): New function.
4822 (linux_target_ops): Initialize new structure members.
4823 (initialize_low): Call linux_check_ptrace_features.
4824 * lynx-low.c (lynx_target_ops): Initialize new structure
4825 members.
4826 * server.c (report_fork_events, report_vfork_events):
4827 New global flags.
4828 (handle_query): Add new features to qSupported packet and
4829 response.
4830 (captured_main): Initialize new global variables.
4831 * target.h (struct target_ops) <supports_fork_events>:
4832 New member.
4833 <supports_vfork_events>: New member.
4834 (target_supports_fork_events): New macro.
4835 (target_supports_vfork_events): New macro.
4836 * win32-low.c (win32_target_ops): Initialize new structure
4837 members.
4838
835205d0
GB
48392015-05-12 Gary Benson <gbenson@redhat.com>
4840
4841 * server.c (handle_qxfer_exec_file): Use current process
4842 if annex is empty.
4843
21e94bd9
SL
48442015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4845
4846 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4847 Remove HAVE_PTRACE_GETREGS conditionals.
4848 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4849 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4850
45614f15
YQ
48512015-05-08 Yao Qi <yao.qi@linaro.org>
4852
4853 * linux-low.c (linux_supports_conditional_breakpoints): New
4854 function.
4855 (linux_target_ops): Install new target method.
4856 * lynx-low.c (lynx_target_ops): Install NULL hook for
4857 supports_conditional_breakpoints.
4858 * nto-low.c (nto_target_ops): Likewise.
4859 * spu-low.c (spu_target_ops): Likewise.
4860 * win32-low.c (win32_target_ops): Likewise.
4861 * server.c (handle_query): Check
4862 target_supports_conditional_breakpoints.
4863 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4864 New field.
4865 (target_supports_conditional_breakpoints): New macro.
4866
80ad801e
PA
48672015-05-06 Pedro Alves <palves@redhat.com>
4868
4869 PR server/18081
4870 * server.c (start_inferior): If the process exits, mourn it.
4871
819843c7
GB
48722015-04-21 Gary Benson <gbenson@redhat.com>
4873
4874 * hostio.c (fileio_open_flags_to_host): Factored out to
4875 fileio_to_host_openflags in common/fileio.c. Single use
4876 updated.
4877
a2d5a9d7
MF
48782015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4879
4880 * linux-xtensa-low.c (xtensa_fill_gregset)
4881 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4882 XCHAL_HAVE_LOOP.
4883
deb44829
MF
48842015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4885
4886 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4887 (regs_info): Replace usrregs pointer with NULL.
4888
e57f1de3
GB
48892015-04-17 Gary Benson <gbenson@redhat.com>
4890
4891 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4892 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4893 * server.c (handle_qxfer_exec_file): New function.
4894 (qxfer_packets): Add exec-file entry.
4895 (handle_query): Report qXfer:exec-file:read as supported packet.
4896
62828379
RN
48972015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4898
4899 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4900
b88bb450
GB
49012015-04-09 Gary Benson <gbenson@redhat.com>
4902
4903 * hostio-errno.c (errno_to_fileio_error): Remove function.
4904 Update caller to use remote_fileio_to_fio_error.
4905
c8f4bfdd
YQ
49062015-04-09 Yao Qi <yao.qi@linaro.org>
4907
4908 * linux-low.c (linux_insert_point): Call
4909 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4910 (linux_remove_point): Call remove_memory_breakpoint if type is
4911 raw_bkpt_type_sw.
4912 * linux-x86-low.c (x86_insert_point): Don't call
4913 insert_memory_breakpoint.
4914 (x86_remove_point): Don't call remove_memory_breakpoint.
4915
41f98f02
PA
49162015-04-01 Pedro Alves <palves@redhat.com>
4917 Cleber Rosa <crosa@redhat.com>
4918
4919 * server.c (gdbserver_usage): Reorganize and extend the usage
4920 message.
4921
2bf6fb9d
PA
49222015-03-24 Pedro Alves <palves@redhat.com>
4923
4924 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4925 output. Also dump TRAP_TRACE.
4926 (linux_low_filter_event): In debug output, distinguish a
4927 resume_stop SIGSTOP from a delayed SIGSTOP.
4928
369f6daa
GB
49292015-03-24 Gary Benson <gbenson@redhat.com>
4930
4931 * linux-x86-low.c (x86_linux_new_thread): Moved to
4932 nat/x86-linux.c.
4933 (x86_linux_prepare_to_resume): Likewise.
4934
8e5d4070
GB
49352015-03-24 Gary Benson <gbenson@redhat.com>
4936
4937 * Makefile.in (x86-linux-dregs.o): New rule.
4938 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4939 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4940 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4941 (x86_linux_dr_get): Likewise.
4942 (x86_linux_dr_set): Likewise.
4943 (update_debug_registers_callback): Likewise.
4944 (x86_linux_dr_set_addr): Likewise.
4945 (x86_linux_dr_get_addr): Likewise.
4946 (x86_linux_dr_set_control): Likewise.
4947 (x86_linux_dr_get_control): Likewise.
4948 (x86_linux_dr_get_status): Likewise.
4949 (x86_linux_update_debug_registers): Likewise.
4950
2b95d440
GB
49512015-03-24 Gary Benson <gbenson@redhat.com>
4952
4953 * linux-x86-low.c (x86_linux_update_debug_registers):
4954 New function, factored out from...
4955 (x86_linux_prepare_to_resume): ...this.
4956
14b0bc68
GB
49572015-03-24 Gary Benson <gbenson@redhat.com>
4958
4959 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4960 (x86_linux_dr_set): Likewise.
4961 (update_debug_registers_callback): Likewise.
4962 (x86_linux_dr_set_addr): Likewise.
4963 (x86_linux_dr_get_addr): Likewise.
4964 (x86_linux_dr_set_control): Likewise.
4965 (x86_linux_dr_get_control): Likewise.
4966 (x86_linux_dr_get_status): Likewise.
4967 (x86_linux_prepare_to_resume): Likewise.
4968
5dfe6ca8
GB
49692015-03-24 Gary Benson <gbenson@redhat.com>
4970
4971 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4972 Use perror_with_name. Pass string through gettext.
4973 (x86_linux_dr_set): Likewise.
4974
d33472ad
GB
49752015-03-24 Gary Benson <gbenson@redhat.com>
4976
4977 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4978 (x86_linux_dr_set_addr): ...this.
4979 (x86_dr_low_get_addr): Rename to...
4980 (x86_linux_dr_get_addr): ...this.
4981 (x86_dr_low_set_control): Rename to...
4982 (x86_linux_dr_set_control): ...this.
4983 (x86_dr_low_get_control): Rename to...
4984 (x86_linux_dr_get_control): ...this.
4985 (x86_dr_low_get_status): Rename to...
4986 (x86_linux_dr_get_status): ...this.
4987 (x86_dr_low): Update with new function names.
4988
4b134ca1
GB
49892015-03-24 Gary Benson <gbenson@redhat.com>
4990
4991 * Makefile.in (x86-linux.o): New rule.
4992 * configure.srv: Add x86-linux.o to relevant targets.
4993 * linux-low.c (lwp_set_arch_private_info): New function.
4994 (lwp_arch_private_info): Likewise.
4995 * linux-x86-low.c: Include nat/x86-linux.h.
4996 (arch_lwp_info): Removed structure.
4997 (update_debug_registers_callback):
4998 Use lwp_set_debug_registers_changed.
4999 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5000 and lwp_set_debug_registers_changed.
5001 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5002
34c703da
GB
50032015-03-24 Gary Benson <gbenson@redhat.com>
5004
5005 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5006 * linux-arm-low.c (arm_new_thread): Likewise.
5007 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5008 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5009 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5010 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5011
cff068da
GB
50122015-03-24 Gary Benson <gbenson@redhat.com>
5013
5014 * linux-low.c (ptid_of_lwp): New function.
5015 (lwp_is_stopped): Likewise.
5016 (lwp_stop_reason): Likewise.
5017 * linux-x86-low.c (update_debug_registers_callback):
5018 Use lwp_is_stopped.
5019 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5020 lwp_stop_reason.
5021
b2f7c7e8
GB
50222015-03-24 Gary Benson <gbenson@redhat.com>
5023
5024 * linux-low.h (linux_stop_lwp): Remove declaration.
5025
6d4ee8c6
GB
50262015-03-24 Gary Benson <gbenson@redhat.com>
5027
5028 * linux-low.h: Include nat/linux-nat.h.
5029 * linux-low.c (iterate_over_lwps_args): New structure.
5030 (iterate_over_lwps_filter): New function.
5031 (iterate_over_lwps): Likewise.
5032 * linux-x86-low.c (update_debug_registers_callback):
5033 Update signature to what iterate_over_lwps expects.
5034 Remove PID check that iterate_over_lwps now performs.
5035 (x86_dr_low_set_addr): Use iterate_over_lwps.
5036 (x86_dr_low_set_control): Likewise.
5037
70a0bb6b
GB
50382015-03-24 Gary Benson <gbenson@redhat.com>
5039
5040 * linux-x86-low.c (x86_debug_reg_state): New function.
5041 (x86_linux_prepare_to_resume): Use the above.
5042
7b669087
GB
50432015-03-24 Gary Benson <gbenson@redhat.com>
5044
5045 * linux-low.c (current_lwp_ptid): New function.
5046 * linux-x86-low.c: Include nat/linux-nat.h.
5047 (x86_dr_low_get_addr): Use current_lwp_ptid.
5048 (x86_dr_low_get_control): Likewise.
5049 (x86_dr_low_get_status): Likewise.
5050
eef49a3d
PA
50512015-03-20 Pedro Alves <palves@redhat.com>
5052
5053 * tracepoint.c (cmd_qtstatus): Make "str" const.
5054
b2333d22
PA
50552015-03-20 Pedro Alves <palves@redhat.com>
5056
5057 * server.c (handle_general_set): Make "req_str" const.
5058
23f238d3
PA
50592015-03-19 Pedro Alves <palves@redhat.com>
5060
5061 * linux-low.c (linux_resume_one_lwp): Rename to ...
5062 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5063 instead call perror_with_name.
5064 (check_ptrace_stopped_lwp_gone): New function.
5065 (linux_resume_one_lwp): Reimplement as wrapper around
5066 linux_resume_one_lwp_throw that swallows errors if the LWP is
5067 gone.
5068
91baf43f
PA
50692015-03-19 Pedro Alves <palves@redhat.com>
5070
5071 * linux-low.c (count_events_callback, select_event_lwp_callback):
5072 No longer check whether the thread has resume_stop as last resume
5073 kind.
5074
8bf3b159
PA
50752015-03-19 Pedro Alves <palves@redhat.com>
5076
5077 * linux-low.c (count_events_callback, select_event_lwp_callback):
5078 Use the lwp's status_pending_p field, not the thread's.
5079
b90fc188
PA
50802015-03-19 Pedro Alves <palves@redhat.com>
5081
5082 * linux-low.c (select_event_lwp_callback): Update comments to
5083 no longer mention SIGTRAP.
5084
464b0089
GB
50852015-03-18 Gary Benson <gbenson@redhat.com>
5086
5087 * server.c (handle_query): Do not report vFile:fstat as supported.
5088
aa9e327f
GB
50892015-03-11 Gary Benson <gbenson@redhat.com>
5090
5091 * hostio.c (sys/types.h): New include.
5092 (sys/stat.h): Likewise.
5093 (common-remote-fileio.h): Likewise.
5094 (handle_fstat): New function.
5095 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5096
791c0056
GB
50972015-03-11 Gary Benson <gbenson@redhat.com>
5098
5099 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5100 struct stat.st_blocks and struct stat.st_blksize.
5101 * configure: Regenerate.
5102 * config.in: Likewise.
5103 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5104 (OBS): Add common-remote-fileio.o.
5105 (common-remote-fileio.o): New rule.
5106
9a9df970
PA
51072015-03-09 Pedro Alves <palves@redhat.com>
5108
5109 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5110 'struct sockaddr' pointer in 'accept' call.
5111
9eb1356e
PA
51122015-03-09 Pedro Alves <palves@redhat.com>
5113
5114 Revert:
5115 2015-03-07 Pedro Alves <palves@redhat.com>
5116 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5117 or <winsock2.h> here. Instead include "gdb_socket.h".
5118 (remote_open): Use union gdb_sockaddr_u.
5119 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5120 or <winsock2.h> here. Instead include "gdb_socket.h".
5121 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5122 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5123 or <sys/un.h>.
5124 (init_named_socket, gdb_agent_helper_thread): Use union
5125 gdb_sockaddr_u.
5126
aac331e4
PA
51272015-03-07 Pedro Alves <palves@redhat.com>
5128
5129 * configure.ac (build_warnings): Move
5130 -Wdeclaration-after-statement to the C-specific set.
5131 * configure: Regenerate.
5132
366c75fc
PA
51332015-03-07 Pedro Alves <palves@redhat.com>
5134
5135 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5136 or <winsock2.h> here. Instead include "gdb_socket.h".
5137 (remote_open): Use union gdb_sockaddr_u.
5138 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5139 or <winsock2.h> here. Instead include "gdb_socket.h".
5140 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5141 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5142 or <sys/un.h>.
5143 (init_named_socket, gdb_agent_helper_thread): Use union
5144 gdb_sockaddr_u.
5145
492d29ea
PA
51462015-03-07 Pedro Alves <palves@redhat.com>
5147
5148 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5149 instead.
5150
60a191ed
YQ
51512015-03-06 Yao Qi <yao.qi@linaro.org>
5152
5153 * linux-aarch64-low.c (aarch64_insert_point): Use
5154 show_debug_regs as a boolean.
5155 (aarch64_remove_point): Likewise.
5156
f5771b1d
PA
51572015-03-05 Pedro Alves <palves@redhat.com>
5158
5159 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5160 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5161 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5162 * nto-low.c (nto_target_ops): Likewise.
5163 * spu-low.c (spu_target_ops): Likewise.
5164 * win32-low.c (win32_target_ops): Likewise.
5165
3e572f71
PA
51662015-03-04 Pedro Alves <palves@redhat.com>
5167
72f4393d 5168 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5169 Decide whether a breakpoint triggered based on the SIGTRAP's
5170 siginfo.si_code.
72f4393d
L
5171 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5172 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5173 (linux_low_filter_event): Check for breakpoints before checking
5174 watchpoints.
5175 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5176 siginfo.si_code.
72f4393d
L
5177 (linux_stopped_by_sw_breakpoint)
5178 (linux_supports_stopped_by_sw_breakpoint)
5179 (linux_stopped_by_hw_breakpoint)
5180 (linux_supports_stopped_by_hw_breakpoint): New functions.
5181 (linux_target_ops): Install new target methods.
3e572f71 5182
1ec68e26
PA
51832015-03-04 Pedro Alves <palves@redhat.com>
5184
5185 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5186 * server.c (swbreak_feature, hwbreak_feature): New globals.
5187 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5188 (captured_main): Clear swbreak_feature and hwbreak_feature.
5189 * server.h (swbreak_feature, hwbreak_feature): Declare.
5190 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5191 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5192 supports_stopped_by_hw_breakpoint>: New fields.
5193 (target_supports_stopped_by_sw_breakpoint)
5194 (target_stopped_by_sw_breakpoint)
5195 (target_supports_stopped_by_hw_breakpoint)
5196 (target_stopped_by_hw_breakpoint): Declare.
5197
15c66dd6
PA
51982015-03-04 Pedro Alves <palves@redhat.com>
5199
5200 enum lwp_stop_reason -> enum target_stop_reason
5201 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5202 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5203 (linux_wait_1, stuck_in_jump_pad_callback)
5204 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5205 (linux_stopped_by_watchpoint):
5206 * linux-low.h (enum lwp_stop_reason): Delete.
5207 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5208 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5209
98fc70d6
YQ
52102015-03-04 Yao Qi <yao.qi@linaro.org>
5211
5212 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5213
dd2ac174
GB
52142015-03-03 Gary Benson <gbenson@redhat.com>
5215
5216 * hostio.c (handle_vFile): Fix prefix lengths.
5217
d68e53f4
MM
52182015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5219
5220 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5221 ptr_bits.
5222
bf2d68ab
AA
52232015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5224
5225 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5226 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5227 (clean): Add "rm -f" for above C files.
5228 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5229 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5230 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5231 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5232 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5233 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5234 (init_registers_s390x_vx_linux64)
5235 (init_registers_s390x_tevx_linux64)
5236 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5237 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5238 declarations.
5239 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5240 (s390_store_vxrs_high): New functions.
5241 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5242 NT_S390_VXRS_HIGH.
5243 (s390_arch_setup): Add logic for selecting one of the new target
5244 descriptions. Activate the new vector regsets if applicable.
5245 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5246 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5247 and init_registers_s390x_tevx_linux64.
5248
c966a859
PA
52492015-03-01 Pedro Alves <palves@redhat.com>
5250
5251 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5252 parameter.
5253
4180215b
PA
52542015-02-27 Pedro Alves <palves@redhat.com>
5255
5256 * linux-x86-low.c (u_debugreg_offset): New function.
5257 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5258
749bab01
PA
52592015-02-27 Pedro Alves <palves@redhat.com>
5260
5261 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5262 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5263 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5264 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5265 (ps_lsetfpregs, ps_getpid)
5266 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5267 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5268 (ps_lsetxregs, ps_plog): Declare.
5269
3c14e5a3
PA
52702015-02-27 Pedro Alves <palves@redhat.com>
5271
5272 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5273 IP_AGENT_EXPORT_FUNC.
5274 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5275 IP_AGENT_EXPORT_FUNC.
5276 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5277 (IP_AGENT_EXPORT): Delete.
5278 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5279 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5280 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5281 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5282 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5283 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5284 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5285 (traceframe_read_count, traceframe_write_count)
5286 (traceframes_created, trace_state_variables, get_raw_reg)
5287 (get_trace_state_variable_value, set_trace_state_variable_value)
5288 (ust_loaded, helper_thread_id, cmd_buf): Use
5289 IPA_SYM_EXPORTED_NAME.
5290 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5291 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5292 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5293 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5294 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5295 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5296 EXTERN_C_PUSH/EXTERN_C_POP.
5297 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5298 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5299 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5300 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5301 (traceframe_write_count, traceframe_read_count)
5302 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5303 (about_to_request_buffer_space, get_trace_state_variable_value)
5304 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5305 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5306 EXTERN_C_PUSH/EXTERN_C_POP.
5307 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5308 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5309 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5310 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5311 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5312 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5313 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5314 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5315 Define.
5316 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5317 (IP_AGENT_EXPORT_VAR_DECL): Define.
5318 (tracing): Declare.
5319 (gdb_agent_get_raw_reg): Declare.
5320
fe978cb0
PA
53212015-02-27 Tom Tromey <tromey@redhat.com>
5322 Pedro Alves <palves@redhat.com>
5323
5324 Rename symbols whose names are reserved C++ keywords throughout.
5325
3bc3d82a
PA
53262015-02-27 Pedro Alves <palves@redhat.com>
5327
5328 * Makefile.in (COMPILER): New, get it from autoconf.
5329 (CXX): Get from autoconf instead.
5330 (COMPILE.pre): Use COMPILER.
5331 (CC-LD): Rename to ...
5332 (CC_LD): ... this. Use COMPILER.
5333 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5334 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5335 * acinclude.m4: Include build-with-cxx.m4.
5336 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5337 Disable -Werror by default if building in C++ mode.
5338 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5339 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5340 the C++ compiler. Save/restore CXXFLAGS too.
5341 * configure: Regenerate.
5342
07697489
PA
53432015-02-27 Pedro Alves <palves@redhat.com>
5344
5345 * acinclude.m4: Include libiberty.m4.
5346 * configure.ac: Call libiberty_INIT.
5347 * config.in, configure: Regenerate.
5348
9beb7c4e
PA
53492015-02-26 Pedro Alves <palves@redhat.com>
5350
5351 * linux-low.c (linux_wait_1): When incrementing the PC past a
5352 program breakpoint always use the_low_target.breakpoint_len as
5353 increment, rather than the maximum between that and
5354 the_low_target.decr_pc_after_break.
5355
8090aef2
PA
53562015-02-23 Pedro Alves <palves@redhat.com>
5357
5358 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5359 thread was doing a step-over; always adjust the PC if
5360 we stepped over a permanent breakpoint.
5361 (linux_wait_1): If we stepped over breakpoint that was on top of a
5362 permanent breakpoint, manually advance the PC past it.
5363
bc9540e8
PA
53642015-02-23 Pedro Alves <palves@redhat.com>
5365
5366 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5367 modes.
5368 (x86_fill_gregset, x86_store_gregset): Use it when handling
5369 $orig_eax.
5370
2db9a427
PA
53712015-02-20 Pedro Alves <palves@redhat.com>
5372
5373 * thread-db.c: Include "nat/linux-procfs.h".
5374 (thread_db_init): Skip listing new threads if the kernel supports
5375 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5376
afa8d396
PA
53772015-02-20 Pedro Alves <palves@redhat.com>
5378
5379 * linux-low.c (status_pending_p_callback): Use ptid_match.
5380
c9587f88
AT
53812015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5382
5383 PR breakpoints/16812
5384 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5385 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5386 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5387
b05ec7a5
AT
53882015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5389
5390 PR breakpoints/15956
5391 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5392
d33501a5
MM
53932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5394
5395 * linux-low.c (linux_low_btrace_conf): Print size.
5396 * server.c (handle_btrace_conf_general_set): New.
5397 (hanle_general_set): Call handle_btrace_conf_general_set.
5398 (handle_query): Report Qbtrace-conf:bts:size as supported.
5399
f4abbc16
MM
54002015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5401
5402 * linux-low.c (linux_low_enable_btrace): Update parameters.
5403 (linux_low_btrace_conf): New.
5404 (linux_target_ops)<to_btrace_conf>: Initialize.
5405 * server.c (current_btrace_conf): New.
5406 (handle_btrace_enable): Rename to ...
5407 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5408 to target_enable_btrace. Update comment. Update users.
5409 (handle_qxfer_btrace_conf): New.
5410 (qxfer_packets): Add btrace-conf entry.
5411 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5412 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5413 (target_ops)<read_btrace_conf>: New.
5414 (target_enable_btrace): Update parameters.
5415 (target_read_btrace_conf): New.
5416
043c3577
MM
54172015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5418
5419 * server.c (handle_btrace_general_set): Remove call to
5420 target_supports_btrace.
5421 (supported_btrace_packets): New.
5422 (handle_query): Call supported_btrace_packets.
5423 * target.h: include btrace-common.h.
5424 (btrace_target_info): Removed.
5425 (supports_btrace, target_supports_btrace): Update parameters.
5426
734b0e4b
MM
54272015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5428
5429 * Makefile.in (SFILES): Add common/btrace-common.c.
5430 (OBS): Add common/btrace-common.o.
5431 (btrace-common.o): Add build rules.
5432 * linux-low: Include btrace-common.h.
5433 (linux_low_read_btrace): Use struct btrace_data. Call
5434 btrace_data_init and btrace_data_fini.
5435
d6c146e9
PA
54362015-02-06 Pedro Alves <palves@redhat.com>
5437
5438 * thread-db.c (find_new_threads_callback): Add debug output.
5439
20ba1ce6
PA
54402015-02-04 Pedro Alves <palves@redhat.com>
5441
5442 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5443 (resume_stopped_resumed_lwps): New function.
5444 (linux_wait_for_event_filtered): Use it.
5445
8cc73a39
SDJ
54462015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5447
5448 * Makefile.in (SFILES): Add linux-personality.c.
5449 (linux-personality.o): New rule.
5450 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5451 list of objects to be built.
5452 * linux-low.c: Include nat/linux-personality.h.
5453 (linux_create_inferior): Remove code to disable address space
5454 randomization (moved to ../nat/linux-personality.c). Create
5455 cleanup to disable address space randomization.
5456
fb23d554
SDJ
54572015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5458
5459 * Makefile.in (posix-strerror.o): New rule.
5460 (mingw-strerror.o): Likewise.
5461 * configure: Regenerated.
5462 * configure.ac: Source file ../common/common.host. Initialize new
5463 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5464
cdf43629
YQ
54652015-01-14 Yao Qi <yao@codesourcery.com>
5466
5467 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5468 (ppc-linux.o): New rule.
5469 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5470 * configure.ac: AC_CHECK_FUNCS(getauxval).
5471 * config.in: Re-generated.
5472 * configure: Re-generated.
5473 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5474 ppc64_64bit_inferior_p
5475
514c5338
YQ
54762015-01-14 Yao Qi <yao@codesourcery.com>
5477
5478 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5479 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5480 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5481 (PT_ORIG_R3, PT_TRAP): Likewise.
5482 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5483 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5484 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5485
3368c1e5
JB
54862015-01-10 Joel Brobecker <brobecker@adacore.com>
5487
5488 * i387-fp.c (i387_cache_to_xsave): In look over
5489 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5490 zmmh_low_space field by use of zmmh_high_space.
5491
582511be
PA
54922015-01-09 Pedro Alves <palves@redhat.com>
5493
5494 * linux-low.c (step_over_bkpt): Move higher up in the file.
5495 (handle_extended_wait): Don't store the stop_pc here.
5496 (get_stop_pc): Adjust comments and rename to ...
5497 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5498 stopped for a software breakpoint or hardware breakpoint.
5499 (thread_still_has_status_pending_p): New function.
5500 (status_pending_p_callback): Use
5501 thread_still_has_status_pending_p. If the event is no longer
5502 interesting, resume the LWP.
5503 (handle_tracepoints): Add assert.
5504 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5505 (wstatus_maybe_breakpoint): New function.
5506 (cancel_breakpoint): Delete function.
5507 (check_stopped_by_watchpoint): New function, factored out from
5508 linux_low_filter_event.
5509 (lp_status_maybe_breakpoint): Delete function.
5510 (linux_low_filter_event): Remove filter_ptid argument.
5511 Leave thread group exits pending here. Store the LWP's stop PC.
5512 Always leave events pending.
5513 (linux_wait_for_event_filtered): Pull all events out of the
5514 kernel, and leave them all pending.
5515 (count_events_callback, select_event_lwp_callback): Consider all
5516 events.
5517 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5518 (select_event_lwp): Only give preference to the stepping LWP in
5519 all-stop mode. Adjust comments.
5520 (ignore_event): New function.
5521 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5522 references to cancel_breakpoints. Adjust to renames. Also give
5523 equal priority to all LWPs that have had events in non-stop mode.
5524 If reporting a software breakpoint event, unadjust the LWP's PC.
5525 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5526 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5527 Adjust.
5528 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5529 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5530 (linux_stopped_by_watchpoint): Adjust.
5531 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5532 * linux-low.h (enum lwp_stop_reason): New.
5533 (struct lwp_info) <stop_pc>: Adjust comment.
5534 <stopped_by_watchpoint>: Delete field.
5535 <stop_reason>: New field.
5536 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5537 * mem-break.c (software_breakpoint_inserted_here)
5538 (hardware_breakpoint_inserted_here): New function.
5539 * mem-break.h (software_breakpoint_inserted_here)
5540 (hardware_breakpoint_inserted_here): Declare.
5541 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5542 (cancel_breakpoints): Delete.
5543 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5544 (upload_fast_traceframes): Remove references to
5545 cancel_breakpoints.
5546
a33e3959
PA
55472015-01-09 Pedro Alves <palves@redhat.com>
5548
5549 * thread-db.c (find_new_threads_callback): Ignore thread if the
5550 kernel thread ID is -1.
5551
8784d563
PA
55522015-01-09 Pedro Alves <palves@redhat.com>
5553
5554 * linux-low.c (linux_attach_fail_reason_string): Move to
5555 nat/linux-ptrace.c, and rename.
5556 (linux_attach_lwp): Update comment.
5557 (attach_proc_task_lwp_callback): New function.
5558 (linux_attach): Adjust to rename and use
5559 linux_proc_attach_tgid_threads.
5560 (linux_attach_fail_reason_string): Delete declaration.
5561
76f2b779
JB
55622015-01-01 Joel Brobecker <brobecker@adacore.com>
5563
5564 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5565 * server.c (gdbserver_version): Likewise.
5566
fafcc06a
SDJ
55672014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5568
5569 * remote-utils.c: Include ctype.h.
5570 (input_interrupt): Explicitly handle the case when the char
5571 received is the NUL byte. Improve the printing of non-ASCII
5572 characters.
5573
beed38b8
JB
55742014-12-16 Joel Brobecker <brobecker@adacore.com>
5575
5576 * linux-low.c (linux_low_filter_event): Update call to
5577 linux_enable_event_reporting following the addition of
5578 a new parameter to that function.
5579
bf330350
CU
55802014-12-16 Catalin Udma <catalin.udma@freescale.com>
5581
5582 PR server/17457
5583 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5584 (AARCH64_FPCR_REGNO): Likewise.
5585 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5586 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5587 (aarch64_store_fpregset): Likewise.
5588
5227d625
JB
55892014-12-15 Joel Brobecker <brobecker@adacore.com>
5590
5591 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5592 Remove FIXME comment about assumption about N.
5593
f93b65a0
JB
55942014-12-13 Joel Brobecker <brobecker@adacore.com>
5595
5596 * configure.ac: If large-file support is disabled in GDBserver,
5597 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5598 * configure: Regenerate.
5599
e5a9158d
AA
56002014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5601
5602 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5603 warning upon ENODATA from ptrace.
5604 * linux-s390-low.c (s390_store_tdb): New.
5605 (s390_regsets): Add regset for NT_S390_TDB.
5606
feea5f36
AA
56072014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5608
5609 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5610 without a fill_function.
5611 * linux-s390-low.c (s390_fill_last_break): Remove.
5612 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5613 (s390_arch_setup): Use regset's size instead of fill_function for
5614 loop end condition.
5615
098dbe61
AA
56162014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5617
5618 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5619 the regset's store function when ptrace returned an error.
5620 * regcache.c (get_thread_regcache): Invalidate register cache
5621 before fetching inferior's registers.
5622
28eef672
AA
56232014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5624
5625 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5626 while-loop as for-loop.
5627 (regsets_store_inferior_registers): Likewise.
5628
bdca27a2
YQ
56292014-11-28 Yao Qi <yao@codesourcery.com>
5630
5631 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5632 * config.in, configure: Re-generate.
5633 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5634 is defined.
5635
9c232dda
YQ
56362014-11-21 Yao Qi <yao@codesourcery.com>
5637
5638 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5639 (AC_CHECK_HEADERS): Remove malloc.h.
5640 * configure: Re-generated.
5641 * config.in: Re-generated.
5642 * server.h: Don't include alloca.h and malloc.h.
5643 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5644 Don't include malloc.h.
5645
43968415
JB
56462014-11-17 Joel Brobecker <brobecker@adacore.com>
5647
5648 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5649 corresponding ERRNO check in same block.
5650
40e91bc7
PA
56512014-11-12 Pedro Alves <palves@redhat.com>
5652
5653 * server.c (cont_thread): Update comment.
5654 (start_inferior, attach_inferior): No longer clear cont_thread.
5655 (handle_v_cont): No longer set cont_thread.
5656 (captured_main): Clear cont_thread each time a GDB connects.
5657
c2c118cf
PA
56582014-11-12 Pedro Alves <palves@redhat.com>
5659
5660 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5661 thread, and don't resume all threads if the Hc thread has exited.
5662
78708b7c
PA
56632014-11-12 Pedro Alves <palves@redhat.com>
5664
5665 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5666 the process group instead of to a specific LWP.
5667
a2abc7de
PA
56682014-10-15 Pedro Alves <palves@redhat.com>
5669
5670 PR server/17487
5671 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5672 parameter.
5673 (arm_set_thread_context): Delete.
5674 (the_low_target): Adjust.
5675 * win32-i386-low.c (debug_registers_changed)
5676 (debug_registers_used): Delete.
5677 (update_debug_registers_callback): New function.
5678 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5679 needing to update their debug registers.
5680 (win32_get_current_dr): New function.
5681 (x86_dr_low_get_addr, x86_dr_low_get_control)
5682 (x86_dr_low_get_status): Fetch the debug register from the thread
5683 record's context.
5684 (i386_initial_stuff): Adjust.
5685 (i386_get_thread_context): Remove current_event parameter. Don't
5686 clear debug_registers_changed nor copy DR values to
5687 debug_reg_state.
5688 (i386_set_thread_context): Delete.
5689 (i386_prepare_to_resume): New function.
5690 (i386_thread_added): Mark the thread as needing to update irs
5691 debug registers.
5692 (the_low_target): Remove i386_set_thread_context and install
5693 i386_prepare_to_resume.
5694 * win32-low.c (win32_get_thread_context): Adjust.
5695 (win32_set_thread_context): Use SetThreadContext
5696 directly.
5697 (win32_prepare_to_resume): New function.
5698 (win32_require_context): New function, factored out from ...
5699 (thread_rec): ... this.
5700 (continue_one_thread): Call win32_prepare_to_resume on each thread
5701 we're about to continue.
5702 (win32_resume): Call win32_prepare_to_resume on the event thread.
5703 * win32-low.h (struct win32_thread_info)
5704 <debug_registers_changed>: New field.
5705 (struct win32_target_ops): Change prototype of set_thread_context,
5706 delete set_thread_context and add prepare_to_resume.
5707 (win32_require_context): New declaration.
5708
a442d071
GB
57092014-10-08 Gary Benson <gbenson@redhat.com>
5710
5711 * server.h: Do not include common-exceptions.h.
5712
6f1947e8
GB
57132014-10-08 Gary Benson <gbenson@redhat.com>
5714
5715 * server.h: Do not include cleanups.h.
5716
63b434a4
JH
57172014-09-30 James Hogan <james.hogan@imgtec.com>
5718
5719 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5720 mips64-dsp-linux.c.
5721
c4d9ceb6
YQ
57222014-09-23 Yao Qi <yao@codesourcery.com>
5723
5724 * linux-low.c (lp_status_maybe_breakpoint): New function.
5725 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5726 (count_events_callback): Likewise.
5727 (select_event_lwp_callback): Likewise.
5728 (cancel_breakpoints_callback): Likewise.
5729
89a5711c
DB
57302014-09-19 Don Breazeal <donb@codesourcery.com>
5731
5732 * linux-low.c (handle_extended_wait): Call
5733 linux_ptrace_get_extended_event.
5734 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5735 linux_is_extended_waitstatus.
5736
bffc0964
JB
57372014-09-16 Joel Brobecker <brobecker@adacore.com>
5738
5739 * Makefile.in (CPPFLAGS): Define.
5740 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5741 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5742
0bfdf32f
GB
57432014-09-16 Gary Benson <gbenson@redhat.com>
5744
5745 * inferiors.h (current_inferior): Renamed as...
5746 (current_thread): New variable. All uses updated.
5747 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5748 (maybe_move_out_of_jump_pad): Likewise.
5749 (cancel_breakpoint): Likewise.
5750 (linux_low_filter_event): Likewise.
5751 (wait_for_sigstop): Likewise.
5752 (linux_resume_one_lwp): Likewise.
5753 (need_step_over_p): Likewise.
5754 (start_step_over): Likewise.
5755 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5756 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5757 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5758 and save_inferior as saved_thread.
5759 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5760 saved_thread.
5761 (regcache_invalidate_thread): Likewise.
5762 * remote-utils.c (prepare_resume_reply): Likewise.
5763 * thread-db.c (thread_db_get_tls_address): Likewise.
5764 (disable_thread_event_reporting): Likewise.
5765 (remove_thread_event_breakpoints): Likewise.
5766 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5767 as saved_thread.
5768 * target.h (set_desired_inferior): Renamed as...
5769 (set_desired_thread): New declaration. All uses updated.
5770 * server.c (myresume): Updated comment to reference thread instead
5771 of inferior.
5772 (handle_serial_event): Likewise.
5773 (handle_target_event): Likewise.
5774
361c8ade
GB
57752014-09-12 Tom Tromey <tromey@redhat.com>
5776 Gary Benson <gbenson@redhat.com>
5777
5778 * regcache.h: Include common-regcache.h.
5779 (regcache_read_pc): Don't declare.
5780 * regcache.c (get_thread_regcache_for_ptid): New function.
5781
bd9269f7
GB
57822014-09-11 Tom Tromey <tromey@redhat.com>
5783 Gary Benson <gbenson@redhat.com>
5784
5785 * symbol.c: New file.
5786 * Makefile.in (SFILES): Add symbol.c.
5787 (OBS): Add symbol.o.
5788
f8c1d06b
GB
57892014-09-11 Gary Benson <gbenson@redhat.com>
5790
5791 * target.c (target_stop_ptid, target_continue_ptid): New
5792 functions.
5793
721ec300
GB
57942014-09-11 Tom Tromey <tromey@redhat.com>
5795 Gary Benson <gbenson@redhat.com>
5796
5797 * target.h: Include target/target.h.
5798 * target.c (target_read_memory, target_read_uint32)
5799 (target_write_memory): New functions.
5800
c5e92cca
GB
58012014-09-11 Gary Benson <gbenson@redhat.com>
5802
5803 * server.h (debug_hw_points): Don't declare.
5804 * server.c (debug_hw_points): Don't define. Replace all uses
5805 with show_debug_regs.
5806 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5807 all uses with show_debug_regs.
5808
2e4bb98a
EBM
58092014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5810
5811 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5812 endianness into account.
5813 (ppc_supply_ptrace_register): Likewise.
5814
ac740bc7
JH
58152014-09-03 James Hogan <james.hogan@imgtec.com>
5816
5817 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5818 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5819
97ea6506
GB
58202014-09-03 Gary Benson <gbenson@redhat.com>
5821
5822 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5823 ALL_DEBUG_ADDRESS_REGISTERS.
5824
df7e5265
GB
58252014-09-02 Gary Benson <gbenson@redhat.com>
5826
5827 * i386-low.h: Renamed as...
5828 * x86-low.h: New file. All type, function and variable name
5829 prefixes changed from "i386_" to "x86_". All references updated.
5830 * i386-low.c: Renamed as...
5831 * x86-low.c: New file. All type, function and variable name
5832 prefixes changed from "i386_" to "x86_". All references updated.
5833
ed859da7
GB
58342014-09-02 Gary Benson <gbenson@redhat.com>
5835
5836 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5837 (x86_linux_new_thread): Likewise.
5838
860789c7
GB
58392014-08-29 Gary Benson <gbenson@redhat.com>
5840
5841 * server.h (setjmp.h): Do not include.
5842 (toplevel): Do not declare.
5843 (common-exceptions.h): Include.
5844 (cleanups.h): Likewise.
5845 * server.c (toplevel): Do not define.
5846 (exit_code): New static global.
5847 (detach_or_kill_for_exit_cleanup): New function.
5848 (main): New function. Original main renamed to...
5849 (captured_main): New function.
5850 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5851
ff55e1b5
GB
58522014-08-29 Gary Benson <gbenson@redhat.com>
5853
5854 * Makefile.in (SFILES): Add common/common-exceptions.c.
5855 (OBS): Add common-exceptions.o.
5856 (common-exceptions.o): New rule.
5857 * utils.c (prepare_to_throw_exception): New function.
5858
e9bcb658
GB
58592014-08-29 Gary Benson <gbenson@redhat.com>
5860
5861 * config.in: Regenerate.
5862 * configure: Likewise.
5863
e3180625
GB
58642014-08-29 Gary Benson <gbenson@redhat.com>
5865
5866 * Makefile.in (SFILES): Add common/cleanups.c.
5867 (OBS): cleanups.o.
5868 (cleanups.o): New rule.
5869
e3d6ba5d
GB
58702014-08-29 Gary Benson <gbenson@redhat.com>
5871
5872 * utils.c (internal_vwarning): New function.
5873
7096e886
GB
58742014-08-28 Gary Benson <gbenson@redhat.com>
5875
5876 * utils.h (fatal): Remove declaration.
5877 * utils.c (fatal): Remove function.
5878
14ce3192
GB
58792014-08-28 Gary Benson <gbenson@redhat.com>
5880
5881 * tracepoint.c (gdb_agent_init): Replace fatal with
5882 perror_with_name.
5883 (initialize_tracepoint): Likewise.
5884
50278d59
GB
58852014-08-28 Gary Benson <gbenson@redhat.com>
5886
5887 * remote-utils.c (remote_prepare): Replace fatal with error.
5888
aa96c426
GB
58892014-08-28 Gary Benson <gbenson@redhat.com>
5890
5891 * linux-low.c (linux_async): Replace fatal with warning.
5892 Tidy up and return.
5893 (linux_start_non_stop): Return -1 if linux_async failed.
5894
f7160e97
GB
58952014-08-28 Gary Benson <gbenson@redhat.com>
5896
5897 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5898 gdb_assert.
5899 (i386_dr_low_get_addr): Remove vague comment.
5900 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5901 gdb_assert.
5902
38e08fca
GB
59032014-08-28 Gary Benson <gbenson@redhat.com>
5904
5905 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5906 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5907 internal_error.
5908 (linux_resume_one_lwp): Likewise.
5909 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5910 gdb_assert.
5911 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5912 with internal_error.
5913 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5914 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5915 (find_register_by_name): Replace fatal with internal_error.
5916 (find_regno): Likewise.
5917 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5918 * thread-db.c (thread_db_create_event): Likewise.
5919 (thread_db_load_search): Likewise.
5920 (try_thread_db_load_1): Likewise.
5921 * tracepoint.c (get_jump_space_head): Replace fatal with
5922 internal_error.
5923 (claim_trampoline_space): Likewise.
5924 (have_fast_tracepoint_trampoline_buffer): Likewise.
5925 (cmd_qtstart): Likewise.
5926 (stop_tracing): Likewise.
5927 (fast_tracepoint_collecting): Likewise.
5928 (target_malloc): Likewise.
5929 (download_tracepoint): Likewise.
5930 (download_trace_state_variables): Replace check with gdb_assert.
5931 (upload_fast_traceframes): Replace fatal with internal_error.
5932
34abf635
GB
59332014-08-19 Tom Tromey <tromey@redhat.com>
5934 Gary Benson <gbenson@redhat.com>
5935
5936 * Makefile.in (SFILES): Add common/common-debug.c.
5937 (OBS): Add common-debug.o.
5938 (common-debug.o): New rule.
5939 * debug.h (debug_printf): Don't declare.
5940 * debug.c (debug_printf): Renamed and rewritten as...
5941 (debug_vprintf): New function.
5942
f6e94d78
GB
59432014-08-19 Gary Benson <gbenson@redhat.com>
5944
5945 * utils.h: Do not include print-utils.h.
5946
9239eeab
GB
59472014-08-19 Tom Tromey <tromey@redhat.com>
5948 Gary Benson <gbenson@redhat.com>
5949
5950 * server.h: Add static assertion.
5951 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5952
ef87c8bb
GB
59532014-08-19 Tom Tromey <tromey@redhat.com>
5954 Gary Benson <gbenson@redhat.com>
5955
5956 * Makefile.in (SFILES): Add common/errors.c.
5957 (OBS): Add errors.o.
5958 (IPA_OBS): Add errors-ipa.o.
5959 (errors.o): New rule.
5960 (errors-ipa.o): Likewise.
5961 * utils.h (perror_with_name, error, warning): Don't declare.
5962 * utils.c (warning): Renamed and rewritten as...
5963 (vwarning): New function.
5964 (error): Renamed and rewritten as...
5965 (verror): New function.
5966 (internal_error): Renamed and rewritten as...
5967 (internal_verror): New function.
5968
bb974a24
GB
59692014-08-07 Gary Benson <gbenson@redhat.com>
5970
5971 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5972 * configure: Regenerate.
5973 * config.in: Likewise.
5974 * server.h: Do not include errno.h.
5975 * event-loop.c: Likewise.
5976 * hostio-errno.c: Likewise.
5977 * linux-low.c: Likewise.
5978 * remote-utils.c: Likewise.
5979 * spu-low.c: Likewise.
5980 * utils.c: Likewise.
5981 * gdbreplay.c: Unconditionally include errno.h.
5982
6d3d12eb
GB
59832014-08-07 Gary Benson <gbenson@redhat.com>
5984
5985 * server.h: Do not include string.h.
5986 * event-loop.c: Likewise.
5987 * linux-low.c: Likewise.
5988 * regcache.c: Likewise.
5989 * remote-utils.c: Likewise.
5990 * spu-low.c: Likewise.
5991 * utils.c: Likewise.
5992
dccbb609
GB
59932014-08-07 Gary Benson <gbenson@redhat.com>
5994
5995 * server.h: Do not include gdb_assert.h.
5996
e76df0d0
GB
59972014-08-07 Gary Benson <gbenson@redhat.com>
5998
5999 * server.h: Do not include common-utils.h.
6000
4cb9c816
GB
60012014-08-07 Gary Benson <gbenson@redhat.com>
6002
6003 * server.h: Do not include ptid.h.
6004 * notif.h: Likewise.
6005
3995eeee
GB
60062014-08-07 Gary Benson <gbenson@redhat.com>
6007
6008 * server.h: Do not include gdb_locale.h.
6009
cb9f1a9b
GB
60102014-08-07 Gary Benson <gbenson@redhat.com>
6011
6012 * server.h: Do not include gdb/signals.h.
6013 * win32-low.c: Likewise.
6014
a5fceff8
GB
60152014-08-07 Gary Benson <gbenson@redhat.com>
6016
6017 * server.h: Do not include pathmax.h.
6018
b9391142
GB
60192014-08-07 Gary Benson <gbenson@redhat.com>
6020
6021 * server.h: Do not include libiberty.h.
6022 * linux-bfin-low.c: Likewise.
6023
0e443c87
GB
60242014-08-07 Gary Benson <gbenson@redhat.com>
6025
6026 * server.h: Do not include ansidecl.h.
6027
8ebb3f56
GB
60282014-08-07 Gary Benson <gbenson@redhat.com>
6029
6030 * linux-x86-low.c: Do not include stddef.h.
6031 * lynx-ppc-low.c: Likewise.
6032 * tracepoint.c: Likewise.
6033
8980bdf6
GB
60342014-08-07 Gary Benson <gbenson@redhat.com>
6035
6036 * server.h: Do not include stdarg.h.
6037 * nto-low.c: Likewise.
6038
d7096f71
GB
60392014-08-07 Gary Benson <gbenson@redhat.com>
6040
6041 * server.h: Do not include stdlib.h.
6042 * inferiors.c: Likewise.
6043 * linux-low.c: Likewise.
6044 * regcache.c: Likewise.
6045 * spu-low.c: Likewise.
6046 * tracepoint.c: Likewise.
6047 * utils.c: Likewise.
6048
d02f550d
GB
60492014-08-07 Gary Benson <gbenson@redhat.com>
6050
6051 * server.h: Do not include stdio.h.
6052 * linux-low.c: Likewise.
6053 * remote-utils.c: Likewise.
6054 * spu-low.c: Likewise.
6055 * utils.c: Likewise.
6056 * wincecompat.c: Likewise.
6057
87f6c4e3
GB
60582014-08-06 Gary Benson <gbenson@redhat.com>
6059
6060 * regcache.c (init_register_cache): Move conditionals inside if.
6061
7089dca4
GB
60622014-08-06 Gary Benson <gbenson@redhat.com>
6063
6064 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6065
462f517e
GB
60662014-07-31 Gary Benson <gbenson@redhat.com>
6067
6068 * ax.h: Do not include server.h.
6069 * gdbthread.h: Likewise.
6070 * lynx-low.h: Likewise.
6071 * notif.h: Likewise.
6072
976411d6
GB
60732014-07-30 Gary Benson <gbenson@redhat.com>
6074
6075 * server.h: Include common-defs.h.
6076 Do not include config.h or build-gnulib-gdbserver/config.h.
6077
d41f6d8e
GB
60782014-07-30 Gary Benson <gbenson@redhat.com>
6079
6080 * hostio-errno.c: Move server.h to top of includes list.
6081 * inferiors.c: Likewise.
6082 * linux-x86-low.c: Likewise.
6083 * notif.c: Include server.h.
6084
314c6a35
TT
60852014-07-24 Tom Tromey <tromey@redhat.com>
6086 Gary Benson <gbenson@redhat.com>
6087
6088 * server.h (CORE_ADDR): Now unsigned.
6089
69ff6be5
PA
60902014-07-16 Pedro Alves <palves@redhat.com>
6091
6092 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6093
ce9e3fe7
PA
60942014-07-15 Pedro Alves <palves@redhat.com>
6095
6096 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6097 copy.
6098
e76126e8
PA
60992014-07-11 Pedro Alves <palves@redhat.com>
6100
6101 * linux-low.c (kill_wait_lwp): New function, based on
6102 kill_one_lwp_callback, but use my_waitpid directly.
6103 (kill_one_lwp_callback, linux_kill): Use it.
6104
8e9db26e
PA
61052014-06-23 Pedro Alves <palves@redhat.com>
6106
6107 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6108 before setting DR0..DR3.
6109
698b3e08
GB
61102014-06-20 Gary Benson <gbenson@redhat.com>
6111
6112 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6113 * configure: Regenerated.
6114 * config.in: Likewise.
6115
125f8a3d
GB
61162014-06-20 Gary Benson <gbenson@redhat.com>
6117
6118 * Makefile.in (SFILES): Update locations for files moved
6119 from common to nat.
6120 (object file files): Reordered.
6121
42995dbd
GB
61222014-06-20 Gary Benson <gbenson@redhat.com>
6123
6124 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6125 (i386_dr_low_set_addr): Likewise.
6126 (i386_dr_low_get_addr): Likewise.
6127 (i386_dr_low_can_set_control): Likewise.
6128 (i386_dr_low_set_control): Likewise.
6129 (i386_dr_low_get_control): Likewise.
6130 (i386_dr_low_get_status): Likewise.
6131 (i386_get_debug_register_length): Likewise.
6132 * linux-x86-low.c (i386_dr_low_set_addr):
6133 Changed signature. Made static.
6134 (i386_dr_low_get_addr): Likewise.
6135 (i386_dr_low_set_control): Likewise.
6136 (i386_dr_low_get_control): Likewise.
6137 (i386_dr_low_get_status): Likewise.
6138 (i386_dr_low): New global variable.
6139 * win32-i386-low.c (i386_dr_low_set_addr):
6140 Changed signature. Made static.
6141 (i386_dr_low_get_addr): Likewise.
6142 (i386_dr_low_set_control): Likewise.
6143 (i386_dr_low_get_control): Likewise.
6144 (i386_dr_low_get_status): Likewise.
6145 (i386_dr_low): New global variable.
6146
e1d2394b
MS
61472014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6148
6149 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6150 * Makefile.in (AR, AR_FLAGS): Define.
6151 * configure: Regenerate.
6152
3a8ee006
GB
61532014-06-19 Gary Benson <gbenson@redhat.com>
6154
6155 * Makefile.in (i386-dregs.o): New rule.
6156 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6157 * i386-low.c (target.h): Remove include.
6158 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6159 (DR_CONTROL_SHIFT): Likewise.
6160 (DR_CONTROL_SIZE): Likewise.
6161 (DR_RW_EXECUTE): Likewise.
6162 (DR_RW_WRITE): Likewise.
6163 (DR_RW_READ): Likewise.
6164 (DR_RW_IORW): Likewise.
6165 (DR_LEN_1): Likewise.
6166 (DR_LEN_2): Likewise.
6167 (DR_LEN_4): Likewise.
6168 (DR_LEN_8): Likewise.
6169 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6170 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6171 (DR_ENABLE_SIZE): Likewise.
6172 (DR_LOCAL_SLOWDOWN): Likewise.
6173 (DR_GLOBAL_SLOWDOWN): Likewise.
6174 (DR_CONTROL_RESERVED): Likewise.
6175 (I386_DR_CONTROL_MASK): Likewise.
6176 (I386_DR_VACANT): Likewise.
6177 (I386_DR_LOCAL_ENABLE): Likewise.
6178 (I386_DR_GLOBAL_ENABLE): Likewise.
6179 (I386_DR_DISABLE): Likewise.
6180 (I386_DR_SET_RW_LEN): Likewise.
6181 (I386_DR_GET_RW_LEN): Likewise.
6182 (I386_DR_WATCH_HIT): Likewise.
6183 (i386_wp_op_t): Likewise.
6184 (i386_show_dr): Likewise.
6185 (i386_length_and_rw_bits): Likewise.
6186 (i386_insert_aligned_watchpoint): Likewise.
6187 (i386_remove_aligned_watchpoint): Likewise.
6188 (i386_handle_nonaligned_watchpoint): Likewise.
6189 i386_update_inferior_debug_regs(): Likewise.
6190 (i386_dr_insert_watchpoint): Likewise.
6191 (i386_dr_remove_watchpoint): Likewise.
6192 (i386_dr_region_ok_for_watchpoint): Likewise.
6193 (i386_dr_stopped_data_address): Likewise.
6194 (i386_dr_stopped_by_watchpoint): Likewise.
6195
8f26655c
GB
61962014-06-19 Gary Benson <gbenson@redhat.com>
6197
6198 * i386-low.c (i386_dr_show): Renamed to
6199 i386_show_dr and made static. All uses updated.
6200 (i386_dr_length_and_rw_bits): Renamed to
6201 i386_length_and_rw_bits and made static.
6202 All uses updated.
6203 (i386_dr_insert_aligned_watchpoint): Renamed to
6204 i386_insert_aligned_watchpoint and made static.
6205 All uses updated.
6206 (i386_dr_remove_aligned_watchpoint): Renamed to
6207 i386_remove_aligned_watchpoint and made static.
6208 All uses updated.
6209 (i386_dr_update_inferior_debug_regs): Renamed to
6210 i386_update_inferior_debug_regs and made static.
6211 All uses updated.
6212
b9228891
GB
62132014-06-18 Gary Benson <gbenson@redhat.com>
6214
5171def3
GB
6215 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6216 (i386_dr_low_can_set_control): Likewise.
6217 (i386_get_debug_register_length): Likewise.
6218 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6219 (i386_dr_low_can_set_control): Likewise.
6220 (i386_get_debug_register_length): Likewise.
6221
62222014-06-17 Gary Benson <gbenson@redhat.com>
6223
b9228891
GB
6224 * i386-low.h (i386-dregs.h): New include.
6225 (DR_FIRSTADDR): Now in i386-dregs.h.
6226 (DR_LASTADDR): Likewise.
6227 (DR_NADDR): Likewise.
6228 (DR_STATUS): Likewise.
6229 (DR_CONTROL): Likewise.
6230 (i386_debug_reg_state): Likewise.
6231 (i386_dr_insert_watchpoint): Likewise.
6232 (i386_dr_remove_watchpoint): Likewise.
6233 (i386_dr_region_ok_for_watchpoint): Likewise.
6234 (i386_dr_stopped_data_address): Likewise.
6235 (i386_dr_stopped_by_watchpoint): Likewise.
6236 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6237
4be83cc2
GB
62382014-06-18 Gary Benson <gbenson@redhat.com>
6239
6240 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6241 i386_dr_insert_watchpoint.
6242 (i386_low_remove_watchpoint): Renamed to
6243 i386_dr_remove_watchpoint.
6244 (i386_low_region_ok_for_watchpoint): Renamed to
6245 i386_dr_region_ok_for_watchpoint.
6246 (i386_low_stopped_data_address): Renamed to
6247 i386_dr_stopped_data_address.
6248 (i386_low_stopped_by_watchpoint): Renamed to
6249 i386_dr_stopped_by_watchpoint.
6250 * i386-low.c (i386_show_dr): Renamed to
6251 i386_dr_show and made nonstatic. All uses updated.
6252 (i386_length_and_rw_bits): Renamed to
6253 i386_dr_length_and_rw_bits and made nonstatic.
6254 All uses updated.
6255 (i386_insert_aligned_watchpoint): Renamed to
6256 i386_dr_insert_aligned_watchpoint and made nonstatic.
6257 All uses updated.
6258 (i386_remove_aligned_watchpoint): Renamed to
6259 i386_dr_remove_aligned_watchpoint and made nonstatic.
6260 All uses updated.
6261 (i386_update_inferior_debug_regs): Renamed to
6262 i386_dr_update_inferior_debug_regs and made nonstatic.
6263 All uses updated.
6264 (i386_low_insert_watchpoint): Renamed to
6265 i386_dr_insert_watchpoint. All uses updated.
6266 (i386_low_remove_watchpoint): Renamed to
6267 i386_dr_remove_watchpoint. All uses updated.
6268 (i386_low_region_ok_for_watchpoint): Renamed to
6269 i386_dr_region_ok_for_watchpoint. All uses updated.
6270 (i386_low_stopped_data_address): Renamed to
6271 i386_dr_stopped_data_address. All uses updated.
6272 (i386_low_stopped_by_watchpoint): Renamed to
6273 i386_dr_stopped_by_watchpoint. All uses updated.
6274
131aa0d4
GB
62752014-06-18 Gary Benson <gbenson@redhat.com>
6276
6277 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6278 (i386_dr_low_can_set_control): Likewise.
6279 (i386_insert_aligned_watchpoint): New check.
6280
d9305f7f
GB
62812014-06-18 Gary Benson <gbenson@redhat.com>
6282
6283 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6284 Renamed to state.
6285
e927c9fc
GB
62862014-06-18 Gary Benson <gbenson@redhat.com>
6287
6288 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6289 instead of fatal and error.
6290 (i386_handle_nonaligned_watchpoint): Likewise.
6291
1b6d4134
GB
62922014-06-18 Gary Benson <gbenson@redhat.com>
6293
6294 * i386-low.c (i386_get_debug_register_length): New macro.
6295 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6296 (i386_show_dr): Use debug_printf instead of fprintf. Use
6297 phex to format values.
6298
6e62758f
GB
62992014-06-18 Gary Benson <gbenson@redhat.com>
6300
6301 * i386-low.h: Comment changes.
6302 * i386-low.c: Likewise.
6303
fc6e2f03
GB
63042014-06-18 Gary Benson <gbenson@redhat.com>
6305
6306 * i386-low.c: Whitespace changes.
6307
f9d1eeed
TT
63082014-06-12 Tom Tromey <tromey@redhat.com>
6309
6310 * utils.c (freeargv): Remove.
6311
0b04e523
TT
63122014-06-12 Tom Tromey <tromey@redhat.com>
6313
6314 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6315 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6316 (parse_debug_format_options): Likewise.
6317 (gdbserver_usage): Likewise.
6318 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6319 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6320 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6321 against libiberty.
6322 ($(LIBGNU)): Depend on libiberty.
6323 (all-lib): Recurse into all subdirs.
6324 (install-only): Invoke "install" target in subdirs.
6325 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6326 targets.
6327 * configure: Rebuild.
6328 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6329 for vasprintf, vsnprintf, or gettimeofday.
6330 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6331 srv_tgtobj.
6332
270c9937
JB
63332014-06-05 Joel Brobecker <brobecker@adacore.com>
6334
6335 * development.sh: Delete.
6336 * Makefile.in (config.status): Adjust dependency on development.sh.
6337 * configure.ac: Adjust development.sh source call.
6338 * configure: Regenerate.
6339
0a261ed8
PA
63402014-06-02 Pedro Alves <palves@redhat.com>
6341
6342 * ax.c (gdb_free_agent_expr): New function.
6343 * ax.h (gdb_free_agent_expr): New declaration.
6344 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6345 list.
6346 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6347 static.
6348 (clear_breakpoint_conditions_and_commands): New function.
6349 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6350 (clear_breakpoint_conditions_and_commands): New declaration.
6351
e9dae05e
RR
63522014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6353
6354 * linux-aarch64-low.c (asm/ptrace.h): Include.
6355
5876f503
JK
63562014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6357
6358 Fix TLS access for -static -pthread.
6359 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6360 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6361 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6362
802e8e6d
PA
63632014-05-20 Pedro Alves <palves@redhat.com>
6364
6365 * linux-aarch64-low.c (aarch64_insert_point)
6366 (aarch64_remove_point): No longer check whether the type is
6367 supported here. Adjust to new interface.
6368 (the_low_target): Install aarch64_supports_z_point_type as
6369 supports_z_point_type method.
6370 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6371 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6372 instead of a Z packet char. Adjust.
6373 (arm_supports_z_point_type): New function.
6374 (arm_insert_point, arm_remove_point): Adjust to new interface.
6375 (the_low_target): Install arm_supports_z_point_type.
6376 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6377 (cris_insert_point, cris_remove_point): Adjust to new interface.
6378 Don't check whether the type is supported here.
6379 (the_low_target): Install cris_supports_z_point_type.
6380 * linux-low.c (linux_supports_z_point_type): New function.
6381 (linux_insert_point, linux_remove_point): Adjust to new interface.
6382 * linux-low.h (struct linux_target_ops) <insert_point,
6383 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6384 raw_breakpoint pointer parameter.
6385 <supports_z_point_type>: New method.
6386 * linux-mips-low.c (mips_supports_z_point_type): New function.
6387 (mips_insert_point, mips_remove_point): Adjust to new interface.
6388 Use mips_supports_z_point_type.
6389 (the_low_target): Install mips_supports_z_point_type.
6390 * linux-ppc-low.c (the_low_target): Install NULL as
6391 supports_z_point_type method.
6392 * linux-s390-low.c (the_low_target): Install NULL as
6393 supports_z_point_type method.
6394 * linux-sparc-low.c (the_low_target): Install NULL as
6395 supports_z_point_type method.
6396 * linux-x86-low.c (x86_supports_z_point_type): New function.
6397 (x86_insert_point): Adjust to new insert_point interface. Use
6398 insert_memory_breakpoint. Adjust to new
6399 i386_low_insert_watchpoint interface.
6400 (x86_remove_point): Adjust to remove_point interface. Use
6401 remove_memory_breakpoint. Adjust to new
6402 i386_low_remove_watchpoint interface.
6403 (the_low_target): Install x86_supports_z_point_type.
6404 * lynx-low.c (lynx_target_ops): Install NULL as
6405 supports_z_point_type callback.
6406 * nto-low.c (nto_supports_z_point_type): New.
6407 (nto_insert_point, nto_remove_point): Adjust to new interface.
6408 (nto_target_ops): Install nto_supports_z_point_type.
6409 * mem-break.c: Adjust intro comment.
6410 (struct raw_breakpoint) <raw_type, size>: New fields.
6411 <inserted>: Update comment.
6412 <shlib_disabled>: Delete field.
6413 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6414 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6415 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6416 (raw_bkpt_type_to_target_hw_bp_type): New function.
6417 (find_enabled_raw_code_breakpoint_at): New function.
6418 (find_raw_breakpoint_at): New type and size parameters. Use them.
6419 (insert_memory_breakpoint): New function, based off
6420 set_raw_breakpoint_at.
6421 (remove_memory_breakpoint): New function.
6422 (set_raw_breakpoint_at): Reimplement.
6423 (set_breakpoint): New, based on set_breakpoint_at.
6424 (set_breakpoint_at): Reimplement.
6425 (delete_raw_breakpoint): Go through the_target->remove_point
6426 instead of assuming memory breakpoints.
6427 (find_gdb_breakpoint_at): Delete.
6428 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6429 (find_gdb_breakpoint): New function.
6430 (set_gdb_breakpoint_at): Delete.
6431 (z_type_supported): New function.
6432 (set_gdb_breakpoint_1): New function, loosely based off
6433 set_gdb_breakpoint_at.
6434 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6435 (delete_gdb_breakpoint_at): Delete.
6436 (delete_gdb_breakpoint_1): New function, loosely based off
6437 delete_gdb_breakpoint_at.
6438 (delete_gdb_breakpoint): New function.
6439 (clear_gdb_breakpoint_conditions): Rename to ...
6440 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6441 breakpoint.
6442 (add_condition_to_breakpoint): Make static.
6443 (add_breakpoint_condition): Take a struct breakpoint pointer
6444 instead of an address. Adjust.
6445 (gdb_condition_true_at_breakpoint): Rename to ...
6446 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6447 z_type parameter.
6448 (gdb_condition_true_at_breakpoint): Reimplement.
6449 (add_breakpoint_commands): Take a struct breakpoint pointer
6450 instead of an address. Adjust.
6451 (gdb_no_commands_at_breakpoint): Rename to ...
6452 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6453 parameter. Return true if no breakpoint was found. Change debug
6454 output.
6455 (gdb_no_commands_at_breakpoint): Reimplement.
6456 (run_breakpoint_commands): Rename to ...
6457 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6458 and change return type to boolean.
6459 (run_breakpoint_commands): New function.
6460 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6461 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6462 breakpoint. Go through the_target->remove_point instead of
6463 assuming memory breakpoint.
6464 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6465 software and hardware breakpoints.
6466 (reinsert_raw_breakpoint): Go through the_target->insert_point
6467 instead of assuming memory breakpoint.
6468 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6469 software and hardware breakpoints.
6470 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6471 Check both software and hardware breakpoints.
6472 (validate_inserted_breakpoint): Assert the breakpoint is a
6473 software breakpoint. Set the inserted flag to -1 instead of
6474 setting shlib_disabled.
6475 (delete_disabled_breakpoints): Adjust.
6476 (validate_breakpoints): Only validate software breakpoints.
6477 Adjust to inserted flag change.
6478 (check_mem_read, check_mem_write): Skip breakpoint types other
6479 than software breakpoints. Adjust to inserted flag change.
6480 * mem-break.h (enum raw_bkpt_type): New enum.
6481 (raw_breakpoint, struct process_info): Forward declare.
6482 (Z_packet_to_target_hw_bp_type): Delete declaration.
6483 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6484 (set_gdb_breakpoint, delete_gdb_breakpoint)
6485 (clear_breakpoint_conditions): New declarations.
6486 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6487 (breakpoint_inserted_here): Update comment.
6488 (add_breakpoint_condition, add_breakpoint_commands): Replace
6489 address parameter with a breakpoint pointer parameter.
6490 (gdb_breakpoint_here): Update comment.
6491 (delete_gdb_breakpoint_at): Delete.
6492 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6493 * server.c (process_point_options): Take a struct breakpoint
6494 pointer instead of an address. Adjust.
6495 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6496 delete_gdb_breakpoint.
6497 * spu-low.c (spu_target_ops): Install NULL as
6498 supports_z_point_type method.
6499 * target.h: Include mem-break.h.
6500 (struct target_ops) <prepare_to_access_memory>: Update comment.
6501 <supports_z_point_type>: New field.
6502 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6503 instead of a char. Also take a raw breakpoint pointer.
6504 * win32-arm-low.c (the_low_target): Install NULL as
6505 supports_z_point_type.
6506 * win32-i386-low.c (i386_supports_z_point_type): New function.
6507 (i386_insert_point, i386_remove_point): Adjust to new interface.
6508 (the_low_target): Install i386_supports_z_point_type.
6509 * win32-low.c (win32_supports_z_point_type): New function.
6510 (win32_insert_point, win32_remove_point): Adjust to new interface.
6511 (win32_target_ops): Install win32_supports_z_point_type.
6512 * win32-low.h (struct win32_target_ops):
6513 <supports_z_point_type>: New method.
6514 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6515 instead of a char. Also take a raw breakpoint pointer.
6516
932539e3
PA
65172014-05-20 Pedro Alves <palves@redhat.com>
6518
6519 * mem-break.h: Include break-common.h.
6520 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6521 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6522 (Z_packet_to_target_hw_bp_type): New declaration.
6523 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6524 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6525 (Z_PACKET_ACCESS_WP): Delete macros.
6526 (Z_packet_to_hw_type): Delete function.
6527 * i386-low.h: Don't include break-common.h here.
6528 (Z_packet_to_hw_type): Delete declaration.
6529 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6530 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6531 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6532 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6533 * linux-aarch64-low.c: Don't include break-common.h here.
6534 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6535 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6536 (Z_packet_to_target_hw_bp_type): Delete function.
6537 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6538 function.
6539 (mips_insert_point, mips_remove_point): Use
6540 Z_packet_to_target_hw_bp_type.
6541
4ff0d3d8
PA
65422014-05-20 Pedro Alves <palves@redhat.com>
6543
6544 * linux-aarch64-low.c: Include break-common.h.
6545 (enum target_point_type): Delete.
6546 (Z_packet_to_point_type): Rename to ...
6547 (Z_packet_to_target_hw_bp_type): ... this, and return a
6548 target_hw_bp_type instead.
6549 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6550 instead of an enum target_point_type.
6551 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6552 breakpoint type.
6553 (aarch64_dr_state_insert_one_point)
6554 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6555 (aarch64_handle_aligned_watchpoint)
6556 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6557 Take an enum target_hw_bp_type instead of an enum
6558 target_point_type.
6559 (aarch64_supports_z_point_type): New function.
6560 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6561 use Z_packet_to_target_hw_bp_type.
6562
786dc519
JB
65632014-05-20 Joel Brobecker <brobecker@adacore.com>
6564
6565 * configure.ac: Only use -Werror by default when DEVELOPMENT
6566 is true.
6567 * configure: Regenerate.
6568
9e0aa64f
JK
65692014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6570
6571 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6572 * linux-x86-low.c (X86_64_USER_REGS): New.
6573 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6574
2b577b92
YQ
65752014-04-28 Yao Qi <yao@codesourcery.com>
6576
6577 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6578 name.
6579
94611da2
PA
65802014-04-25 Pedro Alves <palves@redhat.com>
6581
6582 PR server/16255
6583 * linux-low.c (linux_attach_fail_reason_string): New function.
6584 (linux_attach_lwp): Delete.
6585 (linux_attach_lwp_1): Rename to ...
6586 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6587 argument. Remove "initial" parameter. Return int instead of
6588 void. Don't error or warn here.
6589 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6590 failure to attach to the tgid. Call warning when failing to
6591 attach to an lwp.
6592 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6593 argument. Remove "initial" parameter. Return int instead of
6594 void. Don't error or warn here.
6595 (linux_attach_fail_reason_string): New declaration.
6596 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6597 interface change. Use linux_attach_fail_reason_string.
6598
01f9f808
MS
65992014-04-24 Michael Sturm <michael.sturm@mintel.com>
6600 Walfred Tedeschi <walfred.tedeschi@intel.com>
6601
6602 * Makefile.in: Added rules to handle new files
6603 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6604 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6605 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6606 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6607 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6608 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6609 x32-avx512-linux.o.
6610 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6611 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6612 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6613 i386/x32-avx512.xml.
6614 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6615 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6616 i386/x32-avx512-linux.xml.
6617 * i387-fp.c (num_avx512_k_registers): New constant for number
6618 of K registers.
6619 (num_avx512_zmmh_low_registers): New constant for number of
6620 lower ZMM registers (0-15).
6621 (num_avx512_zmmh_high_registers): New constant for number of
6622 higher ZMM registers (16-31).
6623 (num_avx512_ymmh_registers): New contant for number of higher
6624 YMM registers (ymm16-31 added by avx521 on x86_64).
6625 (num_avx512_xmm_registers): New constant for number of higher
6626 XMM registers (xmm16-31 added by AVX512 on x86_64).
6627 (struct i387_xsave): Add space for AVX512 registers.
6628 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6629 Add code to handle AVX512 registers.
6630 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6631 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6632 prototypei from generated file.
6633 (tdesc_amd64_avx512_linux): Likewise.
6634 (init_registers_x32_avx512_linux): Likewise.
6635 (tdesc_x32_avx512_linux): Likewise.
6636 (init_registers_i386_avx512_linux): Likewise.
6637 (tdesc_i386_avx512_linux): Likewise.
6638 (x86_64_regmap): Add AVX512 registers.
6639 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6640 mask.
6641 (initialize_low_arch): Add code to initialize AVX512 registers.
6642
51aa91f9
PA
66432014-04-23 Pedro Alves <palves@redhat.com>
6644
6645 * mem-break.c (find_gdb_breakpoint_at): Make static.
6646 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6647
a4165e94
PA
66482014-04-23 Pedro Alves <palves@redhat.com>
6649
6650 * i386-low.c: Don't include break-common.h here.
6651 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6652 prototype to take target_hw_bp_type as argument instead of a Z
6653 packet char.
6654 * i386-low.h: Include break-common.h here.
6655 (Z_packet_to_hw_type): Declare.
6656 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6657 prototypes.
6658 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6659 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6660 (x86_remove_point): Convert the packet number to a
6661 target_hw_bp_type before calling i386_low_remove_watchpoint.
6662 * win32-i386-low.c (i386_insert_point): Convert the packet number
6663 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6664 (i386_remove_point): Convert the packet number to a
6665 target_hw_bp_type before calling i386_low_remove_watchpoint.
6666
b8acf843
PA
66672014-04-23 Pedro Alves <palves@redhat.com>
6668
6669 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6670
d708bcd1
PA
66712014-04-10 Pedro Alves <palves@redhat.com>
6672
6673 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6674 Check if the condition or command is NULL before checking if the
6675 breakpoint is known. On success, return true.
6676 * mem-break.h (add_breakpoint_condition): Document return.
6677 (add_breakpoint_commands): Add describing comment.
6678 * server.c (skip_to_semicolon): New function.
6679 (process_point_options): Use it.
6680
2eec7d5b
PA
66812014-04-09 Pedro Alves <palves@redhat.com>
6682
6683 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6684 to lwpid_of.
6685
fa96cb38
PA
66862014-02-27 Pedro Alves <palves@redhat.com>
6687
6688 PR 12702
6689 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6690 macros.
6691 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6692 output.
6693 (last_thread_of_process_p): Take a PID argument instead of a
6694 thread pointer.
6695 (linux_wait_for_lwp): Delete.
6696 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6697 functions.
6698 (linux_low_filter_event): New function, party factored out from
6699 linux_wait_for_event.
6700 (linux_wait_for_event): Rename to ...
6701 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6702 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6703 sigsuspend. Check for zombie leaders.
6704 (linux_wait_for_event): Reimplement as wrapper around
6705 linux_wait_for_event_filtered.
6706 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6707 a normal or signal exit is seen, it's the whole process exiting.
6708 (wait_for_sigstop): No longer a for_each_inferior callback.
6709 Rewrite on top of linux_wait_for_event_filtered.
6710 (stop_all_lwps): Call wait_for_sigstop directly.
6711 * server.c (resume, handle_target_event): Handle
6712 TARGET_WAITKIND_NO_RESUMED.
6713
d763de10
JB
67142014-02-26 Joel Brobecker <brobecker@adacore.com>
6715
6716 * win32-low.c (psapi_get_dll_name,
6717 * win32_CreateToolhelp32Snapshot): Delete.
6718 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6719 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6720 Delete.
6721 (handle_load_dll): Add function description.
6722 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6723
850a0f76
JB
67242014-02-26 Joel Brobecker <brobecker@adacore.com>
6725
6726 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6727 Add comment.
6728 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6729 base address when calling win32_add_one_solib.
6730 (handle_load_dll): Delete local variable load_addr.
6731 Remove 0x1000 offset applied to DLL base address when calling
6732 win32_add_one_solib.
6733 (handle_unload_dll): Add comment.
6734
f25b3fc3
JB
67352014-02-26 Joel Brobecker <brobecker@adacore.com>
6736
6737 * win32-low.c (win32_add_all_dlls): Renames
6738 win32_ensure_ntdll_loaded. Rewrite function documentation.
6739 Adjust implementation to always load all DLLs.
6740 Add 0x1000 offset to DLL base address when calling
6741 win32_add_one_solib.
6742 (child_initialization_done): New static global.
6743 (do_initial_child_stuff): Set child_initialization_done to
6744 zero during child initialization, and 1 after. Replace call
6745 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6746 Add comment.
6747 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6748 (handle_unload_dll): Add function documentation.
6749 (get_child_debug_event): Ignore load and unload DLL events
6750 during child initialization.
6751
d86d4aaf
DE
67522014-02-20 Doug Evans <dje@google.com>
6753
3bc32da3 6754 Remove global all_lwps.
d86d4aaf
DE
6755 * inferiors.h (ptid_of): Move here from linux-low.h.
6756 (pid_of, lwpid_of): Ditto.
6757 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6758 parameter is a struct thread_info * now.
6759 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6760 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6761 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6762 directly.
6763 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6764 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6765 * linux-arm-low.c (update_registers_callback): Update, "entry"
6766 parameter is a struct thread_info * now.
6767 Fetch lwpid from current_inferior directly.
6768 (arm_insert_point): Pass &all_threads to find_inferior instead of
6769 &all_lwps.
6770 (arm_remove_point): Ditto.
6771 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6772 (arm_prepare_to_resume): Fetch pid from thread.
6773 (arm_read_description): Fetch lwpid from current_inferior directly.
6774 * linux-low.c (all_lwps): Delete.
6775 (delete_lwp): Delete call to remove_inferior.
6776 (handle_extended_wait): Fetch lwpid from thread.
6777 (add_lwp): Don't set lwp->entry.id. Remove call to
6778 add_inferior_to_list.
6779 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6780 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6781 (kill_one_lwp_callback): Ditto.
6782 (linux_kill): Don't dereference NULL pointer.
6783 Fetch ptid,lwpid from thread.
6784 (get_detach_signal): Fetch ptid from thread.
6785 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6786 Simplify call to regcache_invalidate_thread.
6787 (delete_lwp_callback): Update, "entry" parameter is a
6788 struct thread_info * now. Fetch pid from thread.
6789 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6790 (status_pending_p_callback): Update, "entry" parameter is a
6791 struct thread_info * now. Fetch ptid from thread.
6792 (find_lwp_pid): Update, "entry" parameter is a
6793 struct thread_info * now.
6794 (linux_wait_for_lwp): Fetch pid from thread.
6795 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6796 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6797 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6798 (dequeue_one_deferred_signal): Ditto.
6799 (cancel_breakpoint): Fetch ptid from current_inferior.
6800 (linux_wait_for_event): Pass &all_threads to find_inferior,
6801 not &all_lwps. Fetch ptid, lwpid from thread.
6802 (count_events_callback): Update, "entry" parameter is a
6803 struct thread_info * now.
6804 (select_singlestep_lwp_callback): Ditto.
6805 (select_event_lwp_callback): Ditto.
6806 (cancel_breakpoints_callback): Ditto.
6807 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6808 not &all_lwps.
6809 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6810 (unsuspend_one_lwp): Update, "entry" parameter is a
6811 struct thread_info * now.
6812 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6813 not &all_lwps.
6814 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6815 Fetch lwpid from thread, not lwp.
6816 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6817 Pass &all_threads to find_inferior, not &all_lwps.
6818 (send_sigstop): Fetch lwpid from thread, not lwp.
6819 (send_sigstop_callback): Update, "entry" parameter is a
6820 struct thread_info * now.
6821 (suspend_and_send_sigstop_callback): Ditto.
6822 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6823 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6824 struct thread_info * now.
6825 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6826 from thread, lwp.
6827 (lwp_running): Update, "entry" parameter is a
6828 struct thread_info * now.
6829 (stop_all_lwps): Fetch ptid from thread.
6830 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6831 (linux_resume_one_lwp): Fetch lwpid from thread.
6832 (linux_set_resume_request): Update, "entry" parameter is a
6833 struct thread_info * now. Fetch pid, lwpid from thread.
6834 (resume_status_pending_p): Update, "entry" parameter is a
6835 struct thread_info * now.
6836 (need_step_over_p): Ditto. Fetch lwpid from thread.
6837 (start_step_over): Fetch lwpid from thread.
6838 (linux_resume_one_thread): Update, "entry" parameter is a
6839 struct thread_info * now. Fetch lwpid from thread.
6840 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6841 (proceed_one_lwp): Update, "entry" parameter is a
6842 struct thread_info * now. Fetch lwpid from thread.
6843 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6844 struct thread_info * now.
6845 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6846 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6847 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6848 directly.
6849 (regsets_store_inferior_registers): Ditto.
6850 (fetch_register, store_register): Ditto.
6851 (linux_read_memory, linux_write_memory): Ditto.
6852 (linux_request_interrupt): Ditto.
6853 (linux_read_auxv): Ditto.
6854 (linux_xfer_siginfo): Ditto.
6855 (linux_qxfer_spu): Ditto.
6856 (linux_qxfer_libraries_svr4): Ditto.
6857 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6858 moved to inferiors.h.
6859 (get_lwp): Delete.
6860 (get_thread_lwp): Update.
6861 (struct lwp_info): Delete member "entry". Simplify comment for
6862 member "thread".
6863 (all_lwps): Delete.
6864 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6865 current_inferior directly.
6866 (update_watch_registers_callback): Update, "entry" parameter is a
6867 struct thread_info * now. Fetch pid from thread.
6868 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6869 (mips_insert_point): Fetch lwpid from current_inferior.
6870 Pass &all_threads to find_inferior, not &all_lwps.
6871 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6872 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6873 directly.
6874 (mips_stopped_data_address): Ditto.
6875 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6876 directly.
6877 * linux-tile-low.c (tile_arch_setup): Ditto.
6878 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6879 (update_debug_registers_callback): Update, "entry" parameter is a
6880 struct thread_info * now. Fetch pid from thread.
6881 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6882 Pass &all_threads to find_inferior, not &all_lwps.
6883 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6884 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6885 Pass &all_threads to find_inferior, not &all_lwps.
6886 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6887 (i386_dr_low_get_status): Ditto.
6888 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6889 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6890 (x86_linux_read_description): Ditto.
6891 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6892
3b8361aa
DE
68932014-02-20 Doug Evans <dje@google.com>
6894
6895 * inferiors.c (get_first_inferior): Fix buglet.
6896
f7667f0d
DE
68972014-02-19 Doug Evans <dje@google.com>
6898
6899 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6900 * inferiors.c (add_thread): Change result type to struct thread_info *.
6901 All callers updated.
6902 (add_lwp): Call add_thread here instead of in callers.
6903 All callers updated.
6904 * linux-low.h (get_lwp_thread): Rewrite.
6905 (struct lwp_info): New member "thread".
6906
b3312d80
DE
69072014-02-19 Doug Evans <dje@google.com>
6908
6909 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6910 All callers updated.
6911
ecc6f45c
DE
69122014-02-19 Doug Evans <dje@google.com>
6913
6914 * inferiors.c (add_thread): Fix whitespace.
6915
649ebbca
DE
69162014-02-19 Doug Evans <dje@google.com>
6917
6918 * dll.c (clear_dlls): Replace accessing list implemention details
6919 with API function.
6920 * gdbthread.h (get_first_thread): Declare.
6921 * inferiors.c (for_each_inferior_with_data): New function.
6922 (get_first_thread): New function.
6923 (find_thread_ptid): Simplify.
6924 (get_first_inferior): New function.
6925 (clear_list): Delete.
6926 (one_inferior_p): New function.
6927 (clear_inferior_list): New function.
6928 (clear_inferiors): Update.
6929 * inferiors.h (for_each_inferior_with_data): Declare.
6930 (clear_inferior_list): Declare.
6931 (one_inferior_p): Declare.
6932 (get_first_inferior): Declare.
6933 * linux-low.c (linux_wait_for_event): Replace accessing list
6934 implemention details with API function.
6935 * server.c (target_running): Ditto.
6936 (accumulate_file_name_length): New function.
6937 (emit_dll_description): New function.
6938 (handle_qxfer_libraries): Replace accessing list implemention
6939 details with API function.
6940 (handle_qxfer_threads_worker): New function.
6941 (handle_qxfer_threads_proper): Replace accessing list implemention
6942 details with API function.
6943 (handle_query): Ditto.
6944 (visit_actioned_threads_callback_ftype): New typedef.
6945 (visit_actioned_threads_data): New struct.
6946 (visit_actioned_threads): Rewrite to be find_inferior callback.
6947 (resume): Call find_inferior.
6948 (handle_status): Replace accessing list implemention
6949 details with API function.
6950 (process_serial_event): Replace accessing list implemention details
6951 with API function.
6952 * target.c (set_desired_inferior): Replace accessing list implemention
6953 details with API function.
6954 * tracepoint.c (same_process_p): New function.
6955 (gdb_agent_about_to_close): Replace accessing list implemention
6956 details with API function.
6957 * win32-low.c (child_delete_thread): Replace accessing list
6958 implemention details with API function.
6959 (match_dll_by_basename): New function.
6960 (dll_is_loaded_by_basename): New function.
6961 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6962 details call to dll_is_loaded_by_basename.
6963
80894984
DE
69642014-02-19 Doug Evans <dje@google.com>
6965
6966 * dll.h (struct dll_info): Add comment.
6967 * gdbthread.h (struct thread_info): Add comment.
6968 (current_ptid): Simplify.
6969 * inferiors.c (add_process): Update.
6970 (remove_process): Update.
6971 * inferiors.h (struct process_info): Rename member "head" to "entry".
6972 * linux-low.c (delete_lwp): Update.
6973 (add_lwp): Update.
6974 (last_thread_of_process_p): Update.
6975 (kill_one_lwp_callback, linux_kill): Update.
6976 (status_pending_p_callback): Update.
6977 (wait_for_sigstop): Update. Simplify read of ptid.
6978 (start_step_over): Update.
6979 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6980 (get_lwp_thread): Update.
6981 (struct lwp_info): Rename member "head" to "entry".
6982 * regcache.h (inferior_list_entry): Delete.
6983 * server.c (kill_inferior_callback): Update.
6984 (detach_or_kill_inferior_callback): Update.
6985 (print_started_pid): Update.
6986 (print_attached_pid): Update.
6987 (process_serial_event): Simplify read of ptid.
6988 * thread-db.c (thread_db_create_event): Update.
6989 (thread_db_get_tls_address): Update.
6990 * win32-low.c (current_inferior_ptid): Simplify.
6991
46917d26
TT
69922014-02-19 Tom Tromey <tromey@redhat.com>
6993
6994 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6995 argument.
6996 (target_supports_btrace): Update.
6997
0759a81e
YQ
69982014-02-14 Yao Qi <yao@codesourcery.com>
6999
7000 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7001 (rsp-low-ipa.o): New target.
7002
a7191e8b
TT
70032014-02-12 Tom Tromey <tromey@redhat.com>
7004
7005 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7006 convert_ascii_to_int.
7007 * regcache.c (registers_to_string): Likewise.
7008 * remote-utils.c (decode_M_packet): Likewise.
7009 * server.c (process_serial_event): Likewise.
7010
ff0e980e
TT
70112014-02-12 Tom Tromey <tromey@redhat.com>
7012
7013 * server.c (handle_query, handle_v_run): Use hex2bin, not
7014 unhexify.
7015 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7016
e9371aff
TT
70172014-02-12 Tom Tromey <tromey@redhat.com>
7018
7019 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7020 convert_int_to_ascii.
7021 * regcache.c (registers_to_string, collect_register_as_string):
7022 Likewise.
7023 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7024 Likewise.
7025 * server.c (process_serial_event): Likewise.
7026 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7027 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7028
971dc0b8
TT
70292014-02-12 Tom Tromey <tromey@redhat.com>
7030
7031 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7032 bin2hex, not hexify.
7033 * tracepoint.c (cmd_qtstatus): Likewise.
7034
0a822afb
TT
70352014-02-12 Tom Tromey <tromey@redhat.com>
7036
7037 * remote-utils.c (monitor_output): Pass explicit length to
7038 hexify.
7039
9c3d6531
TT
70402014-02-12 Tom Tromey <tromey@redhat.com>
7041
7042 * tracepoint.c: Include rsp-low.h.
7043 * server.c: Include rsp-low.h.
7044 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7045 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7046 declare.
7047 * remote-utils.c: Include rsp-low.h.
7048 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7049 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7050 (convert_int_to_ascii, convert_ascii_to_int): Move to
7051 common/rsp-low.c.
7052 * regcache.c: Include rsp-low.h.
7053 * ax.c: Include rsp-low.h.
7054 * Makefile.in (SFILES): Add common/rsp-low.c.
7055 (OBS): Add rsp-low.o.
7056 (rsp-low.o): New target.
7057
01fd3ea5
TT
70582014-02-12 Tom Tromey <tromey@redhat.com>
7059
7060 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7061 Include print-utils.h.
7062 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7063 (plongest, thirty_two, phex_nz): Remove.
7064 * Makefile.in (SFILES): Add common/print-utils.c.
7065 (OBS): Add print-utils.o.
7066 (print-utils-ipa.o): New target.
7067 (print-utils.o): New target.
7068 (IPA_OBJS): Add print-utils-ipa.o.
7069
e99dc820
TT
70702014-02-06 Tom Tromey <tromey@redhat.com>
7071
7072 * Makefile.in (SFILES): Fix indentation.
7073
ee1e2d4f
DE
70742014-02-05 Doug Evans <dje@google.com>
7075
7076 * linux-low.c (linux_wait_for_event): Improve comment.
7077 (linux_wait_1): Keep current_inferior in sync with event_child.
7078
f5a02773
DE
70792014-01-22 Doug Evans <dje@google.com>
7080
7081 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7082
87ce2a04
DE
70832014-01-22 Doug Evans <dje@google.com>
7084
7085 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7086 * configure: Regenerate.
7087 * config.in: Regenerate.
7088 * Makefile.in (SFILES): Add debug.c.
7089 (OBS): Add debug.o.
7090 * debug.c: New file.
7091 * debug.h: New file.
7092 * linux-aarch64-low.c (*): Update all debugging printfs to use
7093 debug_printf instead of fprintf.
7094 * linux-arm-low.c (*): Ditto.
7095 * linux-cris-low.c (*): Ditto.
7096 * linux-crisv32-low.c (*): Ditto.
7097 * linux-m32r-low.c (*): Ditto.
7098 * linux-sparc-low.c (*): Ditto.
7099 * linux-x86.c (*): Ditto.
7100 * linux-low.c (*): Ditto.
7101 (linux_wait_1): Add calls to debug_enter, debug_exit.
7102 (linux_wait): Remove redundant debugging printf.
7103 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7104 (linux_resume, unstop_all_lwps): Ditto.
7105 * mem-break.c (*): Update all debugging printfs to use
7106 debug_printf instead of fprintf.
7107 * remote-utils.c (*): Ditto.
7108 * thread-db.c (*): Ditto.
7109 * server.c #include <ctype.h>, "gdb_vecs.h".
7110 (debug_threads): Moved to debug.c.
7111 (*): Update all debugging printfs to use debug_printf instead of
7112 fprintf.
7113 (start_inferior): Replace call to fflush with call to debug_flush.
7114 (monitor_show_help): Mention set debug-format.
7115 (parse_debug_format_options): New function.
7116 (handle_monitor_command): Handle "monitor set debug-format".
7117 (gdbserver_usage): Mention --debug-format.
7118 (main): Parse --debug-format.
7119 * server.h (debug_threads): Declaration moved to debug.h.
7120 #include "debug.h".
7121 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7122 trace_debug_1 that uses debug_printf.
7123 (tracepoint_look_up_symbols): Update all debugging printfs to use
7124 debug_printf instead of fprintf.
7125
e671835b
BS
71262014-01-20 Baruch Siach <baruch@tkos.co.il>
7127
7128 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7129 sys/ptrace.h.
7130
b5737fa9
PA
71312014-01-17 Pedro Alves <palves@redhat.com>
7132
ea38d2a9 7133 PR build/16445
c7faa97a
PA
7134 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7135 defined after including gdb_proc_service.h.
b5737fa9 7136
40ed484e
DE
71372014-01-16 Doug Evans <dje@google.com>
7138
7139 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7140 (match_dll): Use it.
7141
969c39fb
MM
71422014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7143
7144 * target.h (target_ops) <read_btrace>: Change parameters and
7145 return type to allow error reporting.
7146 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7147 trace reading errors on.
7148 * linux-low.c (linux_low_read_btrace): Pass trace reading
7149 errors on.
7150 (linux_low_disable_btrace): New.
7151
ab7f45ba
DE
71522014-01-15 Doug Evans <dje@google.com>
7153
7154 * inferiors.c (thread_id_to_gdb_id): Delete.
7155 * inferiors.h (thread_id_to_gdb_id): Delete.
7156
66af0f44
EZ
71572014-01-13 Eli Zaretskii <eliz@gnu.org>
7158
7159 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7160 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7161 versions.
7162
9939e131
PA
71632014-01-08 Pedro Alves <palves@redhat.com>
7164
7165 * server.c (handle_status): Don't discard previous queued stop
7166 replies or thread's pending status here.
7167 (main) <disconnection>: Do it here instead.
7168
b7ea362b
PA
71692014-01-08 Pedro Alves <palves@redhat.com>
7170
7171 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7172 * server.c (visit_actioned_threads, handle_pending_status): New
7173 function.
7174 (handle_v_cont): Factor out parts to ...
7175 (resume): ... this new function. If in all-stop, and a thread
7176 being resumed has a pending status, report it without actually
7177 resuming.
7178 (myresume): Adjust to use the new 'resume' function.
7179 (clear_pending_status_callback, set_pending_status_callback)
7180 (find_status_pending_thread_callback): New functions.
7181 (handle_status): Handle the case of multiple threads having
7182 interesting statuses to report. Report threads' real last signal
7183 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7184 with an interesting thread to report the status for, instead of
7185 always reporting the status of the first thread.
7186
28498c42
JB
71872014-01-01 Joel Brobecker <brobecker@adacore.com>
7188
7189 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7190 * gdbreplay.c (gdbreplay_version): Likewise.
7191
f45c82da
YZ
71922013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7193
7194 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7195 iov.iov_len with the real length in use.
7196
379a5e2d
JB
71972013-12-13 Joel Brobecker <brobecker@adacore.com>
7198
7199 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7200 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7201 for all targets that use win32-low.c.
7202 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7203 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7204
4210d83e
PA
72052013-12-13 Pedro Alves <palves@redhat.com>
7206
7207 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7208 if equal to TARGET_WAITKIND_LOADED.
7209 * win32-low.c (cached_status): New static global.
7210 (win32_wait): Add declaration.
7211 (do_initial_child_stuff): Flush all initial pending debug events
7212 up to the initial breakpoint.
7213 (win32_wait): If CACHED_STATUS was set, return that instead
7214 of doing a real wait. Remove the code resuming the execution
7215 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7216 during the initial phase. Also remove the code changing
7217 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7218 TARGET_WAITKIND_STOPPED.
7219
e7f0d979
YQ
72202013-12-11 Yao Qi <yao@codesourcery.com>
7221
7222 * notif.c (handle_notif_ack): Return 0 if no notification
7223 matches.
7224
ebcf782c
DE
72252013-11-20 Doug Evans <dje@google.com>
7226
7227 * linux-low.c (linux_set_resume_request): Fix comment.
7228
20ad9378
DE
72292013-11-20 Doug Evans <dje@google.com>
7230
7231 * linux-low.c (resume_status_pending_p): Tweak comment.
7232
a196ebeb
WT
72332013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7234
7235 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7236 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7237 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7238 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7239 (srv_amd64_regobj): Add amd64-mpx.o.
7240 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7241 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7242 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7243 * i387-fp.c (num_pl_bnd_register) Added constant.
7244 (num_pl_bnd_cfg_registers) Added constant.
7245 (struct i387_xsave) Added reserved area and MPX fields.
7246 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7247 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7248 function.
7249 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7250 (init_registers_amd64_mpx_linux): Declare new function.
7251 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7252 (x86_64_regmap): Add MPX registers.
7253 (x86_linux_read_description): Add MPX case.
7254 (initialize_low_arch): Initialize MPX targets.
7255
0080a2f6
TT
72562013-11-18 Tom Tromey <tromey@redhat.com>
7257
7258 * configure: Rebuild.
7259 * configure.ac: Don't check for stdlib.h.
7260 * gdbreplay.c: Unconditionally include stdlib.h.
7261
2978b111
TT
72622013-11-18 Tom Tromey <tromey@redhat.com>
7263
7264 * config.in: Rebuild.
7265 * configure: Rebuild.
7266 * configure.ac: Don't use AC_HEADER_DIRENT.
7267
a3d08894
TT
72682013-11-18 Tom Tromey <tromey@redhat.com>
7269
7270 * server.h: Don't check HAVE_STRING_H.
7271 * gdbreplay.c: Don't check HAVE_STRING_H.
7272 * configure: Rebuild.
7273
0a5dd17d
TT
72742013-11-18 Tom Tromey <tromey@redhat.com>
7275
7276 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7277 LIBGNU.
7278
1bd2f0ba
TT
72792013-11-08 Tom Tromey <tromey@redhat.com>
7280
7281 * configure, config.in: Rebuild.
7282 * configure.ac: Remove unused configury.
7283
3266f10b
TT
72842013-11-08 Tom Tromey <tromey@redhat.com>
7285
7286 * acinclude.m4: Include common.m4, codeset.m4.
7287 * configure, config.in: Rebuild.
7288 * configure.ac: Use GDB_AC_COMMON.
7289
6682d959
AA
72902013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7291
7292 * linux-s390-low.c (HWCAP_S390_TE): New define.
7293 (s390_arch_setup): Consider the TE field in the HWCAP for
7294 determining 'have_regset_tdb'.
7295
fd0a4d76
SDJ
72962013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7297
7298 PR gdb/16014
7299 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7300 call to sizeof.
7301
1a3d890b
PA
73022013-10-02 Pedro Alves <palves@redhat.com>
7303
7304 * server.c (process_serial_event): Don't output "GDBserver
7305 exiting" if GDB is connected through stdio.
7306 * target.c (mywait): Likewise, be silent if GDB is connected
7307 through stdio.
7308
97ad4581
JB
73092013-10-01 Joel Brobecker <brobecker@adacore.com>
7310
7311 * lynx-low.c (lynx_add_threads_after_attach): New function.
7312 (lynx_attach): Remove call to add_thread. Add call to
7313 lynx_add_threads_after_attach instead.
7314
5b4e221c
MF
73152013-09-28 Mike Frysinger <vapier@gentoo.org>
7316
7317 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7318 * config.in, configure: Regenerated.
7319
ee47b2f8
YQ
73202013-09-18 Yao Qi <yao@codesourcery.com>
7321
7322 PR server/15959
7323 * server.c (start_inferior): Clear 'resume_info'.
7324
d6707650 73252013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7326
d6707650
JW
7327 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7328 for each register.
7329
9243dd0e 73302013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7331
9243dd0e
JW
7332 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7333 linux-tile-low.o to srv_tgtobj.
7334
c623a6ef
WN
73352013-09-16 Will Newton <will.newton@linaro.org>
7336
7337 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7338 out regs.
7339
fb71d39e
PA
73402013-09-06 Pedro Alves <palves@redhat.com>
7341
7342 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7343 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7344 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7345 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7346 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7347 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7348
8e7e9910
PA
73492013-09-06 Pedro Alves <palves@redhat.com>
7350
7351 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7352 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7353
7c3a12ca
PA
73542013-09-06 Pedro Alves <palves@redhat.com>
7355
7356 * linux-amd64-ipa.c: Include tracepoint.h.
7357 * linux-i386-ipa.c: Include tracepoint.h.
7358
8eb3d7b6
RW
73592013-09-06 Ricard Wanderlof <ricardw@axis.com>
7360
7361 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7362 (ps_get_thread_area): New function.
7363
eddddb9d
RW
73642013-09-06 Ricard Wanderlof <ricardw@axis.com>
7365
7366 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7367 (initialize_low_arch): Call init_registers_crisv32 rather than
7368 init_register_crisv32.
7369
533b0600
PA
73702013-09-05 Pedro Alves <palves@redhat.com>
7371
7372 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7373 to ...
7374 * hostio.h: ... this new file.
7375 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7376 win32-low.c: Include hostio.h.
7377
0ce3d3b5
PA
73782013-09-05 Pedro Alves <palves@redhat.com>
7379
7380 * server.h (gdb_client_data, handler_func, callback_handler_func)
7381 (delete_file_handler, add_file_handler, append_callback_event)
7382 (delete_callback_event, start_event_loop, initialize_event_loop):
7383 Move to event-loop.h and include it.
7384 * event-loop.h: New file.
7385
799cdc37
PA
73862013-09-05 Pedro Alves <palves@redhat.com>
7387
7388 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7389 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7390 (loaded_dll, unloaded_dll): Move to ...
7391 * dll.h: ... this new file.
7392 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7393
6a6bbd9d
PA
73942013-09-05 Pedro Alves <palves@redhat.com>
7395
7396 * server.h (current_process, get_thread_process, all_processes)
7397 (add_inferior_to_list, for_each_inferior, current_inferior)
7398 (remove_inferior, add_process, remove_process, find_process_pid)
7399 (have_started_inferiors_p, have_attached_inferiors_p)
7400 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7401 (clear_inferiors, find_inferior, find_inferior_id)
7402 (inferior_target_data, set_inferior_target_data)
7403 (inferior_regcache_data, set_inferior_regcache_data): Move to
7404 inferiors.h, and include it.
7405 * inferiors.h: New file.
7406
f699aaba
PA
74072013-09-05 Pedro Alves <palves@redhat.com>
7408
7409 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7410 Move ...
72f4393d 7411 * ax.h: ... here.
f699aaba 7412
c144c7a0
PA
74132013-09-05 Pedro Alves <palves@redhat.com>
7414
7415 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7416 tracepoint.h.
7417 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7418 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7419 (handle_tracepoint_general_set, handle_tracepoint_query)
7420 (tracepoint_finished_step, tracepoint_was_hit)
7421 (release_while_stepping_state_list, current_traceframe)
7422 (in_readonly_region, traceframe_read_mem)
7423 (fetch_traceframe_registers, traceframe_read_sdata)
7424 (traceframe_read_info, struct fast_tpoint_collect_status)
7425 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7426 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7427 (supply_fast_tracepoint_registers)
7428 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7429 (ipa_tdesc, claim_trampoline_space)
7430 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7431 (agent_mem_read, agent_get_trace_state_variable_value)
7432 (agent_set_trace_state_variable_value, agent_tsv_read)
7433 (agent_mem_read_string, get_raw_reg_func_addr)
7434 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7435 * tracepoint.h: ... this new file.
7436
ff42e6ab
PA
74372013-09-05 Pedro Alves <palves@redhat.com>
7438
7439 * server.h (perror_with_name, error, fatal, warning, paddress)
7440 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7441 include it.
7442 * utils.h: New file.
7443
541af0f4
PA
74442013-09-05 Pedro Alves <palves@redhat.com>
7445
7446 * server.h (remote_debug, noack_mode, transport_is_reliable)
7447 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7448 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7449 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7450 (write_enn, initialize_async_io, enable_async_io)
7451 (disable_async_io, check_remote_input_interrupt_request)
7452 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7453 (dead_thread_notify, prepare_resume_reply)
7454 (decode_address_to_semicolon, decode_address, decode_m_packet)
7455 (decode_M_packet, decode_X_packet, decode_xfer_write)
7456 (decode_search_memory_packet, unhexify, hexify)
7457 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7458 (look_up_one_symbol, relocate_instruction)
7459 (monitor_output): Move to remote-utils.h, and include it.
7460 * remote-utils.h: New file.
7461
eebdf26b
PA
74622013-09-05 Pedro Alves <palves@redhat.com>
7463
7464 * server.h (_): Delete.
7465
3aafd2ff
PA
74662013-09-02 Pedro Alves <palves@redhat.com>
7467
7468 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7469 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7470 allocated.
7471 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7472
cee83bcb
PM
74732013-09-02 Pierre Muller <muller@sourceware.org>
7474
7475 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7476 or WriteProcessMemory complete successfully and handle
7477 ERROR_PARTIAL_COPY error.
7478
9a13b2fa
PA
74792013-09-02 Pedro Alves <palves@redhat.com>
7480
7481 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7482 error instead of EIO.
7483
602e3198
JK
74842013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7485
7486 PR server/15604
7487 * linux-low.c: Include filestuff.h.
7488 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7489 * lynx-low.c: Include filestuff.h.
7490 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7491 * server.c: Include filestuff.h.
7492 (main): Call notice_open_fds.
7493 * spu-low.c: Include filestuff.h.
7494 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7495
96d7229d
LM
74962013-08-22 Luis Machado <lgustavo@codesourcery.com>
7497
7498 * Makefile.in: Explain why ../target and ../nat are not
7499 listed as include file search paths.
7500 (linux-waitpid.o): New object file rule.
7501 * configure.srv (srv_native_linux_obj): New variable.
7502 Replace all occurrences of linux native object files with
7503 $srv_native_linux_obj.
7504 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7505 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7506 (linux_enable_event_reporting): Remove declaration.
7507 (my_waitpid): Moved to common/linux-waitpid.c.
7508 (linux_wait_for_event): Pass ptid when calling
7509 linux_enable_event_reporting.
7510 (linux_supports_tracefork_flag): Remove.
7511 (linux_enable_event_reporting): Likewise.
7512 (linux_tracefork_grandchild): Remove.
7513 (STACK_SIZE): Moved to common/linux-ptrace.c.
7514 (linux_tracefork_child): Remove.
7515 (linux_test_for_tracefork): Remove.
7516 (linux_look_up_symbols): Call linux_supports_traceclone.
7517 (initialize_low): Remove call to linux_test_for_tracefork.
7518 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7519 common/linux-ptrace.h.
7520 (PTRACE_TYPE_ARG4): Likewise.
7521 Include linux-ptrace.h.
7522
32940073
PA
75232013-08-21 Pedro Alves <palves@redhat.com>
7524
7525 * config.in: Renegerate.
7526
33b60d58 75272013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7528
33b60d58
LM
7529 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7530 (SFILES): Remove $(srcdir)/common/target-common.c and
7531 add $(srcdir)/target/waitstatus.c.
7532 (OBS): Remove target-common.o and add waitstatus.o.
7533 (server_h): Remove $(srcdir)/../common/target-common.h and
7534 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7535 and $(srcdir)/../target/waitstatus.h.
7536 (target-common.o): Remove.
7537 (waitstatus.o): New target object file.
7538 * target.h: Do not include target-common.h and
7539 include target/resume.h, target/wait.h and
7540 target/waitstatus.h.
7541
b8e1b30e
LM
75422013-08-13 Luis Machado <lgustavo@codesourcery.com>
7543
7544 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7545 to PTRACE_TYPE_ARG3.
7546 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7547 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7548 PTRACE_TYPE_ARG4.
7549 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7550 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7551
7a60ad40
YQ
75522013-07-27 Jie Zhang <jie@codesourcery.com>
7553 Daniel Jacobowitz <dan@codesourcery.com>
7554 Yao Qi <yao@codesourcery.com>
7555
7556 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7557 (mips-linux-watch.o): New rule.
7558 (mips_linux_watch_h): New variable.
7559 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7560 srv_tgtobj.
7561 * linux-mips-low.c: Include mips-linux-watch.h.
7562 (struct arch_process_info, struct arch_lwp_info): New.
7563 (update_watch_registers_callback): New function.
7564 (mips_linux_new_process, mips_linux_new_thread) New functions.
7565 (mips_linux_prepare_to_resume, mips_insert_point): New
7566 functions.
7567 (mips_remove_point, mips_stopped_by_watchpoint): New
7568 functions.
7569 (rsp_bp_type_to_target_hw_bp_type): New function.
7570 (mips_stopped_data_address): New function.
7571 (the_low_target): Add watchpoint support functions.
7572
de6f69ad
YQ
75732013-07-27 Yao Qi <yao@codesourcery.com>
7574
7575 * i386-low.c: Include break-common.h.
7576 (enum target_hw_bp_type): Remove.
7577
3360c0bf
LM
75782013-07-24 Luis Machado <lgustavo@codesourcery.com>
7579
7580 * Makefile.in (SFILES): /common/target-common.c.
7581 (OBS): Add target-common.o.
7582 (server_h): Add $(srcdir)/../common/target-common.h.
7583 (target-common.o): New target.
7584 * server.c (queue_stop_reply_callback): Free
7585 status string after use.
7586 * target.c (target_waitstatus_to_string): Remove.
7587 * target.h: Include target-common.h.
7588 (resume_kind): Likewise.
7589 (target_waitkind): Likewise.
7590 (target_waitstatus): Likewise.
7591 (TARGET_WNOHANG): Likewise.
7592
bd885420
YQ
75932013-07-04 Yao Qi <yao@codesourcery.com>
7594
7595 * Makefile.in (host_alias): Use @host_noncanonical@.
7596 (target_alias): Use @target_noncanonical@.
7597 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7598 ACX_NONCANONICAL_HOST.
7599 * configure: Regenerated.
7600
7601 Revert:
7602 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7603
7604 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7605 * configure: Rebuild.
7606 * Makefile.in (version_host, version_target): Get from configure.
7607 (version.c): Use $(version_host) and $(version_target).
7608
17ef446e
PA
76092013-07-03 Pedro Alves <palves@redhat.com>
7610
7611 * Makefile.in (config.status): Depend on development.sh.
7612 * acinclude.m4: Include libmcheck.m4.
7613 * configure: Regenerate.
7614
7a9a7487
MG
76152013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7616
7617 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7618 attribute inside the parentheses.
7619 (winapi_DebugSetProcessKillOnExit): Ditto.
7620 (winapi_DebugBreakProcess): Ditto.
7621 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7622
49b64de6
MG
76232013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7624
7625 * notif.h (notif_event): Add a dummy member to avoid compiler
7626 errors.
7627
d5749ee7
PA
76282013-07-01 Pedro Alves <palves@redhat.com>
7629
7630 * hostio.c (HOSTIO_PATH_MAX): Define.
7631 (require_filename, handle_open, handle_unlink, handle_readlink):
7632 Use it.
7633
d8d2a3ee
PA
76342013-07-01 Pedro Alves <palves@redhat.com>
7635
7636 * server.h: Include "pathmax.h".
7637 * linux-low.c: Don't include sys/param.h.
7638 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7639 MAXPATHLEN.
7640 * win32-low.c: Don't include sys/param.h.
7641 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7642
bc7dea8d
PA
76432013-07-01 Pedro Alves <palves@redhat.com>
7644
7645 * event-loop.c: Don't check HAVE_UNISTD_H before including
7646 <unistd.h>.
7647 * gdbreplay.c: Likewise.
7648 * remote-utils.c: Likewise.
7649 * server.c: Likewise.
7650 * configure.ac: Don't check for unistd.h.
7651 * configure: Regenerate.
7652
d6c2da54
TT
76532013-06-28 Tom Tromey <tromey@redhat.com>
7654
7655 * Makefile.in (version.c): Use version.in, not
7656 common/version.in.
7657
257b6bec
MG
76582013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7659
7660 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7661 * configure: Rebuild.
7662 * Makefile.in (version_host, version_target): Get from configure.
7663 (version.c): Use $(version_host) and $(version_target).
7664
86ebe149
DK
76652013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7666
7667 Fix trace-status to output user name without trailing colon.
7668 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7669
f30aa5af
DK
76702013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7671
7672 Fix trace-status to output proper start-time and stop-time.
7673 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7674 output start time and stop time in hex as gdb expects.
7675
28a93511
YQ
76762013-06-26 Pedro Alves <pedro@codesourcery.com>
7677
7678 * tracepoint.c (build_traceframe_info_xml): Output trace state
7679 variables present in the trace buffer.
7680
01208463
TT
76812013-06-24 Tom Tromey <tromey@redhat.com>
7682
7683 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7684 create-version.sh.
7685 (version.o): Remove.
7686 * gdbreplay.c: Include version.h.
7687 (version, host_name): Don't declare.
7688 * server.h: Include version.h.
7689 (version, host_name): Don't declare.
7690
760256f9
PA
76912013-06-12 Pedro Alves <palves@redhat.com>
7692
7693 * linux-x86-low.c (linux_is_elf64): Delete global.
7694 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7695 with local linux_pid_exe_is_elf_64_file use.
7696
030031ee
PA
76972013-06-11 Pedro Alves <palves@redhat.com>
7698
7699 * linux-low.c (regset_disabled, disable_regset): New functions.
7700 (regsets_fetch_inferior_registers)
7701 (regsets_store_inferior_registers): Use them.
7702 (initialize_regsets_info); Don't allocate the disabled_regsets
7703 array here.
7704 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7705 comment.
7706
5da6eb0a
PA
77072013-06-11 Pedro Alves <palves@redhat.com>
7708
7709 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7710 xmalloc.
7711
7e5aaa09
PA
77122013-06-11 Pedro Alves <palves@redhat.com>
7713
7714 * linux-x86-low.c (initialize_low_arch): Call
7715 init_registers_x32_avx_linux.
7716
d878444c
JK
77172013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7718
7719 Fix compatibility with Android Bionic.
7720 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7721 it is not empty.
7722
3aee8918
PA
77232013-06-07 Pedro Alves <palves@redhat.com>
7724
5f2b57b5 7725 PR server/14823
3aee8918
PA
7726 * Makefile.in (OBS): Add tdesc.o.
7727 (IPA_OBJS): Add tdesc-ipa.o.
7728 (tdesc-ipa.o): New rule.
7729 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7730 interface.
7731 * linux-low.c (new_inferior): Delete.
7732 (disabled_regsets, num_regsets): Delete.
7733 (linux_add_process): Adjust to set the new per-process
7734 new_inferior flag.
7735 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7736 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7737 was a stop. When calling arch_setup, switch the current inferior
7738 to the thread that got an event.
7739 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7740 (regsets_fetch_inferior_registers)
7741 (regsets_store_inferior_registers): New regsets_info parameter.
7742 Adjust to use it.
7743 (linux_register_in_regsets): New regs_info parameter. Adjust to
7744 use it.
7745 (register_addr, fetch_register, store_register): New usrregs_info
7746 parameter. Adjust to use it.
7747 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7748 parameter regs_info. Adjust to use it.
7749 (linux_fetch_registers): Get the current inferior's regs_info, and
7750 adjust to use it.
7751 (linux_store_registers): Ditto.
7752 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7753 (initialize_low): Don't initialize the target_regsets here. Call
7754 initialize_low_arch.
7755 * linux-low.h (target_regsets): Delete declaration.
7756 (struct regsets_info): New.
7757 (struct usrregs_info): New.
7758 (struct regs_info): New.
7759 (struct process_info_private) <new_inferior>: New field.
7760 (struct linux_target_ops): Delete the num_regs, regmap, and
7761 regset_bitmap fields. New field regs_info.
7762 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7763 * i387-fp.c (num_xmm_registers): Delete.
7764 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7765 calls to new interface.
7766 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7767 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7768 Infer the number of xmm registers from the regcache's target
7769 description.
7770 * i387-fp.h (num_xmm_registers): Delete.
7771 * inferiors.c (add_thread): Don't install the thread's regcache
7772 here.
7773 * proc-service.c (gregset_info): Fetch the current inferior's
7774 regs_info. Adjust to use it.
7775 * regcache.c: Include tdesc.h.
7776 (register_bytes, reg_defs, num_registers)
7777 (gdbserver_expedite_regs): Delete.
7778 (get_thread_regcache): If the thread doesn't have a regcache yet,
7779 create one, instead of aborting gdbserver.
7780 (regcache_invalidate_one): Rename to ...
7781 (regcache_invalidate_thread): ... this.
7782 (regcache_invalidate_one): New.
7783 (regcache_invalidate): Only invalidate registers of the current
7784 process.
7785 (init_register_cache): Add target_desc parameter, and use it.
7786 (new_register_cache): Ditto. Assert the target description has a
7787 non zero registers_size.
7788 (regcache_cpy): Add assertions. Adjust.
7789 (realloc_register_cache, set_register_cache): Delete.
7790 (registers_to_string, registers_from_string): Adjust.
7791 (find_register_by_name, find_regno, find_register_by_number)
7792 (register_cache_size): Add target_desc parameter, and use it.
7793 (free_register_cache_thread, free_register_cache_thread_one)
7794 (regcache_release, register_cache_size): New.
7795 (register_size): Add target_desc parameter, and use it.
7796 (register_data, supply_register, supply_register_zeroed)
7797 (supply_regblock, supply_register_by_name, collect_register)
7798 (collect_register_as_string, collect_register_by_name): Adjust.
7799 * regcache.h (struct target_desc): Forward declare.
7800 (struct regcache) <tdesc>: New field.
7801 (init_register_cache, new_register_cache): Add target_desc
7802 parameter.
7803 (regcache_invalidate_thread): Declare.
7804 (regcache_invalidate_one): Delete declaration.
7805 (regcache_release): Declare.
7806 (find_register_by_number, register_cache_size, register_size)
7807 (find_regno): Add target_desc parameter.
7808 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7809 declarations.
7810 * remote-utils.c: Include tdesc.h.
7811 (outreg, prepare_resume_reply): Adjust.
7812 * server.c: Include tdesc.h.
7813 (gdbserver_xmltarget): Delete declaration.
7814 (get_features_xml, process_serial_event): Adjust.
7815 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7816 declare.
7817 (struct process_info) <tdesc>: New field.
7818 (ipa_tdesc): Declare.
7819 * tdesc.c: New file.
7820 * tdesc.h: New file.
7821 * tracepoint.c: Include tdesc.h.
7822 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7823 (get_context_regcache): Adjust to pass ipa_tdesc down.
7824 (do_action_at_tracepoint): Adjust to get the register cache size
7825 from the context regcache's description.
7826 (traceframe_walk_blocks): Adjust to get the register cache size
7827 from the current trace frame's description.
7828 (traceframe_get_pc): Adjust to get current trace frame's
7829 description and pass it down.
7830 (gdb_collect): Adjust to get the register cache size from the
7831 IPA's description.
7832 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7833 (gdbserver_xmltarget): Delete.
7834 (initialize_low_tracepoint): Set the ipa's target description.
7835 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7836 (initialize_low_tracepoint): Set the ipa's target description.
7837 * linux-x86-low.c: Include tdesc.h.
7838 [__x86_64__] (is_64bit_tdesc): New.
7839 (ps_get_thread_area, x86_get_thread_area): Use it.
7840 (i386_cannot_store_register): Rename to ...
7841 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7842 (i386_cannot_fetch_register): Rename to ...
7843 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7844 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7845 to new interface.
7846 (target_regsets): Rename to ...
7847 (x86_regsets): ... this.
7848 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7849 interface.
7850 (x86_siginfo_fixup): Use is_64bit_tdesc.
7851 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7852 (tdesc_x32_avx_linux, tdesc_x32_linux)
7853 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7854 Declare.
7855 (x86_linux_update_xmltarget): Delete.
7856 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7857 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7858 (AMD64_LINUX_USER64_CS): New.
7859 (x86_linux_read_description): New, based on
7860 x86_linux_update_xmltarget.
7861 (same_process_callback): New.
7862 (x86_arch_setup_process_callback): New.
7863 (x86_linux_update_xmltarget): New.
7864 (x86_regsets_info): New.
7865 (amd64_linux_regs_info): New.
7866 (i386_linux_usrregs_info): New.
7867 (i386_linux_regs_info): New.
7868 (x86_linux_regs_info): New.
7869 (x86_arch_setup): Reimplement.
7870 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7871 (x86_emit_ops): Ditto.
7872 (the_low_target): Adjust. Install x86_linux_regs_info,
7873 x86_cannot_fetch_register, and x86_cannot_store_register.
7874 (initialize_low_arch): New.
7875 * linux-ia64-low.c (tdesc_ia64): Declare.
7876 (ia64_fetch_register): Adjust.
7877 (ia64_usrregs_info, regs_info): New globals.
7878 (ia64_regs_info): New function.
7879 (the_low_target): Adjust.
7880 (initialize_low_arch): New function.
7881 * linux-sparc-low.c (tdesc_sparc64): Declare.
7882 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7883 Adjust.
7884 (sparc_arch_setup): New function.
7885 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7886 (the_low_target): Adjust.
7887 (initialize_low_arch): New function.
7888 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7889 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7890 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7891 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7892 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7893 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7894 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7895 (tdesc_powerpc_isa205_vsx64l): Declare.
7896 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7897 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7898 (ppc_set_pc, ppc_get_hwcap): Adjust.
7899 (ppc_usrregs_info): Forward declare.
7900 (!__powerpc64__) ppc_regmap_adjusted: New global.
7901 (ppc_arch_setup): Adjust to the current process'es target
7902 description.
7903 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7904 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7905 (ppc_store_evrregset): Adjust.
7906 (target_regsets): Rename to ...
7907 (ppc_regsets): ... this, and make static.
7908 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7909 (ppc_regs_info): New function.
7910 (the_low_target): Adjust.
7911 (initialize_low_arch): New function.
7912 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7913 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7914 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7915 (tdesc_s390x_linux64v2): Declare.
7916 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7917 (s390_fill_gregset, s390_store_last_break): Adjust.
7918 (target_regsets): Rename to ...
7919 (s390_regsets): ... this, and make static.
7920 (s390_get_pc, s390_set_pc): Adjust.
7921 (s390_get_hwcap): New target_desc parameter, and use it.
7922 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7923 (s390_arch_setup): Adjust to set the current process'es target
7924 description. Don't adjust the regmap.
7925 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7926 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7927 (regs_info_3264): New globals.
7928 (s390_regs_info): New function.
7929 (the_low_target): Adjust.
7930 (initialize_low_arch): New function.
7931 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7932 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7933 [__mips64] (init_registers_mips_linux)
7934 (init_registers_mips_dsp_linux): Delete defines.
7935 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7936 (have_dsp): New global.
7937 (mips_read_description): New, based on mips_arch_setup.
7938 (mips_arch_setup): Reimplement.
7939 (get_usrregs_info): New function.
7940 (mips_cannot_fetch_register, mips_cannot_store_register)
7941 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7942 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7943 (target_regsets): Rename to ...
7944 (mips_regsets): ... this, and make static.
7945 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7946 (dsp_regs_info, regs_info): New globals.
7947 (mips_regs_info): New function.
7948 (the_low_target): Adjust.
7949 (initialize_low_arch): New function.
7950 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7951 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7952 Declare.
7953 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7954 (arm_read_description): New, with bits factored from
7955 arm_arch_setup.
7956 (arm_arch_setup): Reimplement.
7957 (target_regsets): Rename to ...
7958 (arm_regsets): ... this, and make static.
7959 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7960 (arm_regs_info): New function.
7961 (the_low_target): Adjust.
7962 (initialize_low_arch): New function.
7963 * linux-m68k-low.c (tdesc_m68k): Declare.
7964 (target_regsets): Rename to ...
7965 (m68k_regsets): ... this, and make static.
7966 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7967 (m68k_regs_info): New function.
7968 (m68k_arch_setup): New function.
7969 (the_low_target): Adjust.
7970 (initialize_low_arch): New function.
7971 * linux-sh-low.c (tdesc_sharch): Declare.
7972 (target_regsets): Rename to ...
7973 (sh_regsets): ... this, and make static.
7974 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7975 (sh_regs_info, sh_arch_setup): New functions.
7976 (the_low_target): Adjust.
7977 (initialize_low_arch): New function.
7978 * linux-bfin-low.c (tdesc_bfin): Declare.
7979 (bfin_arch_setup): New function.
7980 (bfin_usrregs_info, regs_info): New globals.
7981 (bfin_regs_info): New function.
7982 (the_low_target): Adjust.
7983 (initialize_low_arch): New function.
7984 * linux-cris-low.c (tdesc_cris): Declare.
7985 (cris_arch_setup): New function.
7986 (cris_usrregs_info, regs_info): New globals.
7987 (cris_regs_info): New function.
7988 (the_low_target): Adjust.
7989 (initialize_low_arch): New function.
7990 * linux-cris-low.c (tdesc_crisv32): Declare.
7991 (cris_arch_setup): New function.
7992 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7993 (cris_regs_info): New function.
7994 (the_low_target): Adjust.
7995 (initialize_low_arch): New function.
7996 * linux-m32r-low.c (tdesc_m32r): Declare.
7997 (m32r_arch_setup): New function.
7998 (m32r_usrregs_info, regs_info): New globals.
7999 (m32r_regs_info): Adjust.
8000 (initialize_low_arch): New function.
8001 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8002 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8003 (tic6x_usrregs_info): Forward declare.
8004 (tic6x_read_description): New function, based on ...
8005 (tic6x_arch_setup): ... this. Reimplement.
8006 (target_regsets): Rename to ...
8007 (tic6x_regsets): ... this, and make static.
8008 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8009 (tic6x_regs_info): New function.
8010 (the_low_target): Adjust.
8011 (initialize_low_arch): New function.
8012 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8013 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8014 (target_regsets): Rename to ...
8015 (xtensa_regsets): ... this, and make static.
8016 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8017 globals.
8018 (xtensa_arch_setup, xtensa_regs_info): New functions.
8019 (the_low_target): Adjust.
8020 (initialize_low_arch): New function.
8021 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8022 (nios2_arch_setup): Set the current process'es tdesc.
8023 (target_regsets): Rename to ...
8024 (nios2_regsets): ... this.
8025 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8026 (nios2_regs_info): New function.
8027 (the_low_target): Adjust.
8028 (initialize_low_arch): New function.
a261b8f5
PA
8029 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8030 (aarch64_arch_setup): Set the current process'es tdesc.
8031 (target_regsets): Rename to ...
8032 (aarch64_regsets): ... this.
8033 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8034 (aarch64_regs_info): New function.
8035 (the_low_target): Adjust.
8036 (initialize_low_arch): New function.
3aee8918
PA
8037 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8038 globals.
8039 (target_regsets): Rename to ...
8040 (tile_regsets): ... this.
8041 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8042 (tile_regs_info): New function.
8043 (tile_arch_setup): Set the current process'es tdesc.
8044 (the_low_target): Adjust.
8045 (initialize_low_arch): New function.
8046 * spu-low.c (tdesc_spu): Declare.
8047 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8048 * win32-arm-low.c (tdesc_arm): Declare.
8049 (arm_arch_setup): New function.
8050 (the_low_target): Install arm_arch_setup instead of
8051 init_registers_arm.
8052 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8053 (init_windows_x86): Rename to ...
8054 (i386_arch_setup): ... this. Set `win32_tdesc'.
8055 (the_low_target): Adjust.
8056 * win32-low.c (win32_tdesc): New global.
8057 (child_add_thread): Don't create the thread cache here.
8058 (do_initial_child_stuff): Set the new process'es tdesc.
8059 * win32-low.h (struct target_desc): Forward declare.
8060 (win32_tdesc): Declare.
8061 * lynx-i386-low.c (tdesc_i386): Declare global.
8062 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8063 * lynx-low.c (lynx_tdesc): New global.
8064 (lynx_add_process): Set the new process'es tdesc.
8065 * lynx-low.h (struct target_desc): Forward declare.
8066 (lynx_tdesc): Declare global.
8067 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8068 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8069 * nto-low.c (nto_tdesc): New global.
8070 (do_attach): Set the new process'es tdesc.
8071 * nto-low.h (struct target_desc): Forward declare.
8072 (nto_tdesc): Declare.
8073 * nto-x86-low.c (tdesc_i386): Declare.
8074 (nto_x86_arch_setup): Set `nto_tdesc'.
8075
b1fbec62
GB
80762013-06-04 Gary Benson <gbenson@redhat.com>
8077
8078 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8079 to qSupported response when appropriate.
8080 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8081 with nonzero-length annex.
8082 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8083 arguments supplied in annex.
8084
d1ec4ce7
DE
80852013-05-31 Doug Evans <dje@google.com>
8086
ac44adcb 8087 PR server/15594
d1ec4ce7
DE
8088 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8089 64 bits in 64-cross-32 environment.
8090
9b25f2d3
PA
80912013-05-28 Pedro Alves <palves@redhat.com>
8092
8093 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8094 (aarch64-without-fpu.c): Delete rule.
8095 * configure.srv (aarch64*-*-linux*): Remove references to
8096 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8097 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8098 declaration.
8099
6740dc9c
PA
81002013-05-24 Pedro Alves <palves@redhat.com>
8101
8102 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8103 instead of strchr/decode_address. Error if the range isn't split
8104 with a ','. Don't assume there's be a ':' in the action.
8105
c2d6af84
PA
81062013-05-23 Yao Qi <yao@codesourcery.com>
8107 Pedro Alves <palves@redhat.com>
8108
8109 * linux-low.c (lwp_in_step_range): New function.
8110 (linux_wait_1): If the thread was range stepping and stopped
8111 outside the stepping range, report the stop to GDB. Otherwise,
8112 continue stepping. Add range stepping debug output.
8113 (linux_set_resume_request): Copy the step range from the resume
8114 request to the lwp.
8115 (linux_supports_range_stepping): New.
8116 (linux_target_ops) <supports_range_stepping>: Set to
8117 linux_supports_range_stepping.
8118 * linux-low.h (struct linux_target_ops)
8119 <supports_range_stepping>: New field.
8120 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8121 * linux-x86-low.c (x86_supports_range_stepping): New.
8122 (the_low_target) <supports_range_stepping>: Set to
8123 x86_supports_range_stepping.
8124 * server.c (handle_v_cont): Handle 'r' action.
8125 (handle_v_requests): Append ";r" if the target supports range
8126 stepping.
8127 * target.h (struct thread_resume) <step_range_start,
8128 step_range_end>: New fields.
8129 (struct target_ops) <supports_range_stepping>:
8130 New field.
8131 (target_supports_range_stepping): New macro.
8132
58794e1a
JB
81332013-05-17 Joel Brobecker <brobecker@adacore.com>
8134
8135 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8136 confusion in comment.
8137
d631c5a7
JB
81382013-05-17 Joel Brobecker <brobecker@adacore.com>
8139
8140 * lynx-low.c (struct process_info_private): New type.
8141 (lynx_add_process): New function.
8142 (lynx_create_inferior, lynx_attach): Replace calls to
8143 add_process by calls to lynx_add_process.
8144 (lynx_resume): If PTID is null, then try using
8145 current_process()->private->last_wait_event_ptid.
8146 Add comments.
8147 (lynx_clear_inferiors): Delete. The contents of that function
8148 has been inlined in lynx_mourn;
8149 (lynx_wait_1): Save the ptid in the process's private data.
8150 (lynx_mourn): Free the process' private data. Replace call
8151 to lynx_clear_inferiors by call to clear_inferiors.
8152
96f7a20f
YQ
81532013-05-17 Yao Qi <yao@codesourcery.com>
8154
8155 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8156 the right place.
8157
db0dfaa0
LM
81582013-05-16 Luis Machado <lgustavo@codesourcery.com>
8159
8160 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8161 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8162 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8163 PT_TEXT_END_ADDR guards. Update comments.
8164 (linux_target_op) <read_offsets>: Conditionally define to
8165 linux_read_offsets if the target is UCLIBC and if it defines
8166 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8167
68f5f838
SL
81682013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8169 Andrew Jenner <andrew@codesourcery.com>
8170
8171 * Makefile.in (SFILES): Add linux-nios2-low.c.
8172 (clean): Add action to delete nios2-linux.c.
8173 (nios2-linux.c): New rule.
8174 * configure.srv: Add nios2*-*-linux*.
8175 * linux-nios2-low.c: New.
8176
1ebff1fd
HAQ
81772013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8178
8179 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8180
f6150862
HZ
81812013-04-25 Hui Zhu <hui@codesourcery.com>
8182
8183 PR gdb/15186
f6150862
HZ
8184 * ax.c (ax_printf): Add fflush.
8185
614c279d
TT
81862013-04-22 Tom Tromey <tromey@redhat.com>
8187
8188 * Makefile.in (SFILES): Add filestuff.c.
8189 (OBS): Add filestuff.o.
8190 (filestuff.o): New target.
8191 * config.in, configure: Rebuild.
8192 * configure.ac: Check for fdwalk, pipe2.
8193
7d4e5717
PA
81942013-04-17 Pedro Alves <palves@redhat.com>
8195
8196 * configure.ac (USE_THREAD_DB): Delete variable.
8197 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8198 Don't AC_SUBST USE_THREAD_DB.
8199 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8200 * config.in, configure: Regenerate.
8201
d5c93e41
PA
82022013-04-16 Pedro Alves <palves@redhat.com>
8203
8204 * linux-low.h (struct lwp_info) <thread_known>: Move under
8205 the USE_THREAD_DB #ifdef.
8206
04f5fe89
PA
82072013-04-16 Pedro Alves <palves@redhat.com>
8208
8209 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8210 (linux-low.o): Delete rule.
8211 * linux-low.h: Always include "gdb_thread_db.h" instead of
8212 conditionally including thread_db.h.
8213 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8214 HAVE_THREAD_DB_H.
8215
480b27bf
JK
82162013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8217
8218 * Makefile.in (install-only): Fix make install regression.
8219
43662968
JK
82202013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8221
8222 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8223 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8224 installation.
8225 * gdbserver.1: Remove.
8226
3e74e146
PA
82272013-03-22 Pedro Alves <palves@redhat.com>
8228
8229 * linux-low.c (handle_extended_wait): Don't call
8230 linux_enable_event_reporting.
8231
a8347a2a
TT
82322013-03-15 Tony Theodore <tonyt@logyst.com>
8233
8234 PR build/9098:
8235 * Makefile.in (SHELL): Use @SHELL@.
8236
eeb56fa7
SDJ
82372013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8238
8239 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8240 compiler warning.
8241
4fa7e2ff
JB
82422013-03-13 Joel Brobecker <brobecker@adacore.com>
8243
8244 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8245 Remove extraneous NULL element.
8246
8ddb1965
YQ
82472013-03-13 Yao Qi <yao@codesourcery.com>
8248
8249 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8250 'V' block in trace frame.
8251
9accd112
MM
82522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8253
8254 * target.h (struct target_ops): Add btrace ops.
8255 (target_supports_btrace): New macro.
8256 (target_enable_btrace): New macro.
8257 (target_disable_btrace): New macro.
8258 (target_read_btrace): New macro.
8259 * gdbthread.h (struct thread_info): Add btrace field.
8260 * server.c: Include btrace-common.h.
8261 (handle_btrace_general_set): New function.
8262 (handle_btrace_enable): New function.
8263 (handle_btrace_disable): New function.
8264 (handle_general_set): Call handle_btrace_general_set.
8265 (handle_qxfer_btrace): New function.
8266 (struct qxfer qxfer_packets[]): Add btrace entry.
8267 * inferiors.c (remove_thread): Disable btrace.
8268 * linux-low: Include linux-btrace.h.
8269 (linux_low_enable_btrace): New function.
8270 (linux_low_read_btrace): New function.
8271 (linux_target_ops): Add btrace ops.
8272 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8273 Add srv_linux_btrace=yes.
8274 (x86_64-*-linux*): Add linux-btrace.o.
8275 Add srv_linux_btrace=yes.
8276 * configure.ac: Define HAVE_LINUX_BTRACE.
8277 * config.in: Regenerated.
8278 * configure: Regenerated.
8279
5cc22e4c
MM
82802013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8281
8282 * server.c (handle_qxfer): Preserve error message if -3 is
8283 returned.
8284 (qxfer): Document the -3 return value.
8285
7c97f91e
MM
82862013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8287
8288 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8289 (linux_btrace_h): New variable.
8290 (linux-btrace.o): New rule.
8291
be9a119c 82922013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8293 Hafiz Abid Qadeer <abidh@codesourcery.com>
8294
8295 * tracepoint.c (trace_buffer_size): New global.
8296 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8297 (init_trace_buffer): Change to one-argument function. Allocate
8298 trace buffer memory.
8299 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8300 handle QTBuffer:size packet.
8301 (cmd_bigqtbuffer_size): New function.
8302 (initialize_tracepoint): Call init_trace_buffer with
8303 DEFAULT_TRACE_BUFFER_SIZE.
8304 * server.c (handle_query): Add QTBuffer:size in the
8305 supported packets.
8306
e64f7499
YQ
83072013-03-07 Yao Qi <yao@codesourcery.com>
8308
8309 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8310 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8311 of -1.
8312 (cmd_qtsp): Adjust condition. Do post increment.
8313 Set cur_action and cur_step_action back to 0.
8314
f0ae6fc3
PA
83152013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8316
8317 PR server/15236
8318 * linux-low.c (linux_write_memory): Return early success if LEN is
8319 zero.
8320
b5b0b0af
CV
83212013-03-05 Corinna Vinschen <vinschen@redhat.de>
8322
334ad4a8 8323 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8324
589bc927
TT
83252013-02-28 Tom Tromey <tromey@redhat.com>
8326
8327 * configure.ac: Invoke AC_SYS_LARGEFILE.
8328 * configure, config.in: Rebuild.
8329
dfe07582
CV
83302013-02-28 Corinna Vinschen <vinschen@redhat.com>
8331
8332 * win32-low.c: Throughout, fix format strings and casts of
8333 printf-like functions to avoid type related warnings on all
8334 platforms.
8335 (get_child_debug_event): Print dwDebugEventCode as hex since
8336 that's how it's usually documented.
8337
736cd585
YQ
83382013-02-28 Yao Qi <yao@codesourcery.com>
8339
8340 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8341 pulongest.
8342
e1f58301
JW
83432013-02-27 Jiong Wang <jiwang@tilera.com>
8344
8345 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8346 (reg-tilegx32.c): New rule.
8347 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8348 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8349 different register info initializer according to elf class.
8350 (init_registers_tilgx32): New function. The tilegx32 register info
8351 initializer.
8352 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8353 (tile_store_gregset): Likewise.
8354
d171ca78
YQ
83552013-02-27 Yao Qi <yao@codesourcery.com>
8356
8357 * server.c (process_point_options): Print debug message when
8358 debug_threads is true.
8359
282bbdf3
YQ
83602013-02-26 Yao Qi <yao@codesourcery.com>
8361
8362 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8363
aca22551
PA
83642013-02-19 Pedro Alves <palves@redhat.com>
8365 Kai Tietz <ktietz@redhat.com>
8366
8367 PR gdb/15161
8368
8369 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8370 instead of strtoul to extract address from packet.
8371 (process_serial_event) <'z'>: Likewise.
8372
4f3cee1c
YQ
83732013-02-18 Yao Qi <yao@codesourcery.com>
8374
8375 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8376
8e1d55a3
PA
83772013-02-14 Pedro Alves <palves@redhat.com>
8378
8379 Plug memory leak.
8380
8381 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8382 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8383
458820da
PA
83842013-02-14 Pedro Alves <palves@redhat.com>
8385
8386 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8387
baea0dae
PA
83882013-02-14 Pedro Alves <palves@redhat.com>
8389
8390 * tracepoint.c (save_string): Delete.
8391 (add_tracepoint_action): Use savestring instead of save_string.
8392
0b1afbb3
PA
83932013-02-12 Pedro Alves <palves@redhat.com>
8394
8395 * linux-xtensa-low.c: Ditto.
8396 * xtensa-xtregs.c: Ditto.
8397
8a4ac37e
PA
83982013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8399
8400 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8401 thread_db.
8402
148de6bb
MS
84032013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8404
8405 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8406 aarch64_num_wp_regs and aarch64_num_bp_regs to
8407 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8408
55fac6e0
MS
84092013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8410
8411 * linux-aarch64-low.c (ps_get_thread_area): Replace
8412 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8413
176eb98c
MS
84142013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8415 Marcus Shawcroft <marcus.shawcroft@arm.com>
8416 Nigel Stephens <nigel.stephens@arm.com>
8417 Yufeng Zhang <yufeng.zhang@arm.com>
8418
8419 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8420 (aarch64.c, aarch64-without-fpu.c): New targets.
8421 * configure.srv (aarch64*-*-linux*): New.
8422 * linux-aarch64-low.c: New file.
8423
56f7af9c
MS
84242013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8425
43aaf8b6 8426 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8427 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8428 (dequeue_one_deferred_signal, linux_resume_one_thread)
8429 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8430 (linux_tracefork_grandchild, linux_test_for_tracefork)
8431 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8432 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8433 where the argument is 0.
8434
60f662b0
YQ
84352013-01-25 Yao Qi <yao@codesourcery.com>
8436
8437 * event-loop.c: Include "queue.h".
8438 (gdb_event_p): New typedef.
8439 (struct gdb_event) <next_event>: Remove.
8440 (event_queue): Change to QUEUE(gdb_event_p).
8441 (async_queue_event): Remove.
8442 (gdb_event_xfree): New.
8443 (initialize_event_loop): New.
8444 (process_event): Use API from QUEUE.
8445 (wait_for_event): Likewise.
8446 * server.c (main): Call initialize_event_loop.
8447 * server.h (initialize_event_loop): Declare.
8448
5ae4861a
YQ
84492013-01-18 Yao Qi <yao@codesourcery.com>
8450
8451 * ax.h (struct eval_agent_expr_context): New.
8452 (gdb_eval_agent_expr): Update declaration.
8453 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8454 TFRAME. Add new argument CTX.
8455 * server.h (struct eval_agent_expr_context): Declare.
8456 (agent_mem_read, agent_tsv_read): Update declaration.
8457 (agent_mem_read_string): Likewise.
8458 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8459 (add_traceframe_block): Add new argument TPOINT.
8460 Increase TPOINT->traceframe_usage.
8461 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8462 eval_tracepoint_agent_expr.
8463 (condition_true_at_tracepoint): Likewise.
8464 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8465 (agent_mem_read_string, agent_tsv_read): Likewise.
8466
85e00e85
YQ
84672013-01-16 Yao Qi <yao@codesourcery.com>
8468
8469 * linux-low.c (linux_resume_one_lwp): Don't check
8470 'lwp->bp_reinsert != 0'.
8471
4039cf45
JB
84722013-01-07 Joel Brobecker <brobecker@adacore.com>
8473 Pedro Alves <palves@redhat.com>
8474
8475 * lynx-low.c (ptrace_request_to_str): Define a temporary
8476 macro and use it to simplify this function's implementation.
8477
9044dee2
JB
84782013-01-07 Joel Brobecker <brobecker@adacore.com>
8479
8480 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8481 sets errno.
8482
e6352c8f
JB
84832013-01-07 Joel Brobecker <brobecker@adacore.com>
8484
8485 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8486
50681a27
JB
84872013-01-07 Joel Brobecker <brobecker@adacore.com>
8488
8489 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8490
3f6e77ef
JB
84912013-01-07 Joel Brobecker <brobecker@adacore.com>
8492
8493 * lynx-low.c (lynx_resume): Use the resume_info parameter
8494 to determine the ptid for the lynx_ptrace call, unless
8495 it is equal to minus_one_ptid, in which case we use the
8496 ptid of the current_inferior.
8497 (lynx_wait_1): After having received a thread create/exit
8498 event, resume the inferior's execution using the signaling
8499 thread's ptid, rather than the old ptid.
8500
7fda33ae
JB
85012013-01-07 Joel Brobecker <brobecker@adacore.com>
8502
8503 * lynx-low.c (lynx_resume): Delete variable ret.
8504
b9786c74
JB
85052013-01-01 Joel Brobecker <brobecker@adacore.com>
8506
8507 * gdbreplay.c (gdbreplay_version): Update copyright year.
8508 * server.c (gdbserver_version): Likewise.
8509
8b93d60f
JB
85102012-12-17 Joel Brobecker <brobecker@adacore.com>
8511
8512 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8513 new thread.
8514
037335a7
JB
85152012-12-17 Joel Brobecker <brobecker@adacore.com>
8516
8517 * lynx-low.c (ptrace_request_to_str): Add handling for
8518 PTRACE_GETTRACESIG.
8519
52d4cbd8
JB
85202012-12-17 Joel Brobecker <brobecker@adacore.com>
8521
8522 * lynx-low.c (lynx_attach): Delete variable new_process.
8523
ab8f6ca9
JB
85242012-12-17 Joel Brobecker <brobecker@adacore.com>
8525
8526 * lynx-low.c (lynx_create_inferior): Delete variable
8527 new_process.
8528
78cbc024
JB
85292012-12-17 Joel Brobecker <brobecker@adacore.com>
8530
8531 * lynx-low.c (ptrace_request_to_str): Do not handle
8532 PTRACE_GETTHREADLIST if this macro does not exist.
8533
14a00470
YQ
85342012-12-15 Yao Qi <yao@codesourcery.com>
8535
8536 * Makefile.in (OBS): Add notif.o.
8537 * notif.c, notif.h: New.
8538 * server.c: Include "notif.h".
8539 (struct vstop_notif) <next>: Remove.
8540 <base>: New field.
8541 (queue_stop_reply): Update.
8542 (push_event, send_next_stop_reply): Remove.
8543 (discard_queued_stop_replies): Update.
8544 (notif_stop): New variable.
8545 (handle_v_stopped): Remove.
8546 (handle_v_requests): Don't call handle_v_stopped. Call
8547 handle_ack_notif instead.
8548 (queue_stop_reply_callback): Call notif_event_enque instead
8549 of queue_stop_reply.
8550 (handle_status): Don't call send_next_stop_reply, call
8551 notif_write_event instead.
8552 (kill_inferior_callback): Likewise.
8553 (detach_or_kill_inferior_callback): Likewise.
8554 (main): Call initialize_notif.
8555 (process_serial_event): Call QUEUE_is_empty.
8556 (handle_target_event): Call notif_push instead of push event.
8557 * server.h (push_event): Remove declaration.
8558
61c125b9
TT
85592012-12-10 Tom Tromey <tromey@redhat.com>
8560
8561 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8562 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8563 macros.
8564 (.c.o): Rewrite.
8565 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8566 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8567 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8568 (amd64-linux-ipa.o, ax.o): Rewrite.
8569 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8570 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8571 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8572 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8573 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8574 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8575 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8576 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8577 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8578 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8579 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8580 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8581 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8582 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8583 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8584 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8585 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8586 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8587 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8588 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8589 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8590 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8591 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8592 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8593 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8594 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8595 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8596 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8597 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8598 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8599 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8600 (reg-tilegx.o): Remove.
8601 (all_object_files): New macro.
8602 Include .deps files.
8603 * aclocal.m4, configure: Rebuild.
8604 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8605 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8606 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8607
e90e9ad9
TT
86082012-12-05 Tom Tromey <tromey@redhat.com>
8609
8610 PR gdb/14917:
8611 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8612
02d403bf 86132012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8614
8615 * configure.ac: Check for linux/perf_event.h.
8616 * config.in: Regenerated.
8617 * configure: Regenerated.
8618
0270a750
PA
86192012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8620
8621 * hostio.c (handle_readlink): Decrease buffer size
8622 parameter passed to readlink by one byte.
8623
8c29b58e
YQ
86242012-11-26 Yao Qi <yao@codesourcery.com>
8625
8626 * configure.ac (build_warnings): Append '-Wempty-body'.
8627 * configure: Regenerated.
8628 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8629 body.
8630
8bdce1ff
PM
86312012-11-15 Pierre Muller <muller@sourceware.org>
8632
8633 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8634 * config.in: Regenerate.
8635 * configure: Regenerate.
8636 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8637 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8638 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8639 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8640 header.
8641 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8642 instead of <sys/wait.h> header.
8643 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8644
02d403bf 86452012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8646
8647 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8648 (various make rules): Remove -DGDBSERVER
8649
fbd5db48
YQ
86502012-11-09 Yao Qi <yao@codesourcery.com>
8651
8652 * spu-low.c (current_ptid): Move it to ..
8653 * gdbthread.h: ... here. New.
8654 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8655 * server.c (myresume, process_serial_event): Likewise.
8656 * thread-db.c (thread_db_find_new_threads): Likewise.
8657 * tracepoint.c (run_inferior_command): Likewise.
8658
b3dc46ff
AB
86592012-10-01 Andrew Burgess <aburgess@broadcom.com>
8660
8661 * server.c (handle_search_memory_1): Include access length in
8662 warning message.
8663
07c04788
HPN
86642012-09-05 Michael Brandt <michael.brandt@axis.com>
8665
8666 * linux-crisv32-low.c: Fix compile errors.
8667
918d227b
YQ
86682012-09-04 Yao Qi <yao@codesourcery.com>
8669
8670 * tracepoint.c (cmd_qtsv): Adjust debug message.
8671 Don't check CUR_TPOINT.
8672
18c1b81a
YQ
86732012-08-28 Yao Qi <yao@codesourcery.com>
8674
8675 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8676 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8677 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8678 Remove declarations of xmalloc, xreallloc, xstrdup and
8679 freeargv.
8680 * Makefile.in (libiberty_h): New.
8681 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8682 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8683
dc82f37b
YQ
86842012-08-23 Yao Qi <yao@codesourcery.com>
8685
8686 * server.h: Remove declaration of 'xsnprintf'.
8687
406b1477
KS
86882012-08-22 Keith Seitz <keiths@redhat.com>
8689
8690 * server.h: Include build-gnulib-gbserver/config.h.
8691 * gdbreplay.c: Likewise.
8692
e6712ff1
DE
86932012-08-08 Doug Evans <dje@google.com>
8694
8695 * Makefile.in (SFILES): Add gdb_vecs.c.
8696 (OBS): Add gdb_vecs.o.
8697 (gdb_vecs_h, host_defs_h): New variables.
8698 (thread-db.o): Add $(gdb_vecs_h) dependency.
8699 (gdb_vecs.o): New rule.
8700 * thread-db.c: #include "gdb_vecs.h".
8701 (thread_db_load_search): Use a vector to iterate over path elements.
8702 Handle text appearing after "$pdir".
8703
8704 * configure.ac: Add check for strstr.
8705 * config.in: Regenerate.
8706 * configure: Regenerate.
8707
7c3270ae
UW
87082012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8709
8710 * hostio.c (handle_pread): If pread fails, fall back to attempting
8711 lseek/read.
8712 (handle_pwrite): Likewise for pwrite.
8713
b62e2b27
UW
87142012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8715
8716 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8717 between unsupported TYPE and unimplementable ADDR/LEN combination.
8718 (arm_insert_point): Act on new return value.
8719
78a99e91
PA
87202012-07-31 Pedro Alves <palves@redhat.com>
8721
8722 * server.c (process_point_options): Only skip tokens if we find
8723 one that is unrecognized. Don't treat 'X' specially while
8724 skipping unrecognized tokens.
8725
fcf303ab
UW
87262012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8727
8728 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8729 to 4-byte-align HW breakpoint addresses for Thumb.
8730
7255706c
YQ
87312012-07-27 Yao Qi <yao@codesourcery.com>
8732
8733 PR remote/14161.
8734
8735 * server.h: Declare gdb_agent_about_to_close.
8736 * target.c (kill_inferior): Include "agent.h".
8737 New. Send command 'kill'.
8738 * target.h (kill_inferior): Removed macro.
8739 * tracepoint.c (gdb_agent_about_to_close): New.
8740 (gdb_agent_helper_thread): Handle command 'close'.
8741 Wait endlessly until the inferior stops.
8742 Install gdb_agent_remove_socket to atexit hook.
8743 (agent_socket_name): New static variable.
8744 (gdb_agent_socket_init): Replace local variable 'name' with
8745 'agent_socket_name'.
8746 (gdb_agent_remove_socket): New.
8747
5a3f286f
YQ
87482012-07-27 Yao Qi <yao@codesourcery.com>
8749
8750 * server.c (process_point_options): Stop at 'X' when parsing.
8751
961bd387
ME
87522012-07-19 Michael Eager <eager@eagercon.com>
8753
a261b8f5 8754 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8755 to hw_execute.
8756 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8757 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8758 hardware breakpoint.
8759
aa7c7447
JK
87602012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8761
8762 * gdbserver/linux-low.c (initialize_low): Call
8763 linux_ptrace_init_warnings.
8764
7f216e7c
DE
87652012-07-02 Doug Evans <dje@google.com>
8766
8767 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8768 pointer to int.
8769
d3ce09f5
SS
87702012-07-02 Stan Shebs <stan@codesourcery.com>
8771
8772 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8773 (ax.o): Add it to build rule.
8774 (ax-ipa.o): Ditto.
8775 (OBS): Add format.o.
8776 (IPA_OBS): Add format.o.
8777 * server.c (handle_query): Claim support for breakpoint commands.
8778 (process_point_options): Add command case.
8779 (process_serial_event): Leave running if there are printfs in
8780 effect.
8781 * mem-break.h (any_persistent_commands): Declare.
8782 (add_breakpoint_commands): Declare.
8783 (gdb_no_commands_at_breakpoint): Declare.
8784 (run_breakpoint_commands): Declare.
8785 * mem-break.c (struct point_command_list): New struct.
8786 (struct breakpoint): New field command_list.
8787 (any_persistent_commands): New function.
8788 (add_commands_to_breakpoint): New function.
8789 (add_breakpoint_commands): New function.
8790 (gdb_no_commands_at_breakpoint): New function.
8791 (run_breakpoint_commands): New function.
8792 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8793 locally.
8794 * ax.c: Include format.h.
8795 (ax_printf): New function.
8796 (gdb_eval_agent_expr): Add printf opcode.
8797
2f8f6aed
YQ
87982012-06-13 Yao Qi <yao@codesourcery.com>
8799
8800 * server.c (start_inferior): Remove duplicated writes to fields
8801 'last_resume_kind' and 'last_status' of 'current_inferior'.
8802
0c9070b3
YQ
88032012-06-12 Yao Qi <yao@codesourcery.com>
8804 Pedro Alves <palves@redhat.com>
8805
8806 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8807 comment.
8808 * server.c (handle_v_cont): Extend comment.
8809
c52daf70
YQ
88102012-06-11 Yao Qi <yao@codesourcery.com>
8811
8812 * linux-low.c (linux_attach): Add 'static'.
8813
d38bbb0a
YQ
88142012-06-06 Yao Qi <yao@codesourcery.com>
8815
8816 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8817
89dc0afd
JK
88182012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8819
8820 Fix gcc -flto compilation warning.
8821 * server.c (main): Make variable multi_mode and attach volatile.
8822
75f62ce7
TJB
88232012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8824
8825 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8826 if the platform doesn't know about it.
8827
65f479b6
PA
88282012-05-30 Jeff Kenton <jkenton@tilera.com>
8829
8830 * Makefile.in (SFILES): Add linux-tile-low.c.
8831 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8832 * configure.srv: Handle tilegx-*-linux*.
8833 * linux-tile-low.c: New file.
8834
0c5bf5a9
JK
88352012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8836
8837 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8838
a493e3e2
PA
88392012-05-24 Pedro Alves <palves@redhat.com>
8840
8841 PR gdb/7205
8842
43aaf8b6 8843 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8844
2ea28649
PA
88452012-05-24 Pedro Alves <palves@redhat.com>
8846
8847 PR gdb/7205
8848
8849 Replace target_signal with gdb_signal throughout.
8850
8d409d16
MR
88512012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8852
8853 * linux-low.c (linux_store_registers): Avoid the copying sequence
8854 when no data has been retrieved by ptrace.
8855
23512c01
MGD
88562012-05-22 Will Deacon <will.deacon@arm.com>
8857
8858 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8859 Include asm/ptrace.h.
8860 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8861 already defined.
8862
4934b29e
MR
88632012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8864
8865 * linux-low.c (linux_store_registers): Don't re-retrieve data
8866 with ptrace that has already been obtained from /proc. Always
8867 copy any data retrieved with ptrace to the buffer supplied.
8868
bde24c0a
PA
88692012-05-11 Yao Qi <yao@codesourcery.com>
8870 Pedro Alves <palves@redhat.com>
8871
8872 * linux-low.c (enum stopping_threads_kind): New.
8873 (stopping_threads): Change type to `enum stopping_threads_kind'.
8874 (handle_extended_wait): If stopping and suspending threads, leave
8875 the new_lwp suspended too.
8876 (linux_wait_for_event): Adjust.
8877 (stop_all_lwps): Set `stopping_threads' to
8878 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8879 whether we're suspending threads or just stopping them. Assert no
8880 recursion happens.
8881
623b6bdf
YQ
88822012-04-29 Yao Qi <yao@codesourcery.com>
8883
8884 * server.h: Move some code to ...
8885 * gdbthread.h: ... here. New.
8886 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8887 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8888 (nto-low.o, win32-low.o): Likewise.
8889 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8890 * regcache.c, remote-utils.c, server.c: Likewise.
8891 * target.c, tracepoint.c, win32-low.c: Likewise.
8892
f15f9948
TJB
88932012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8894
8895 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8896 (PTRACE_ARG4_TYPE): Likewise.
8897 (PTRACE_XFER_TYPE): Likewise.
8898 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8899 ptrace to PTRACE_ARG3_TYPE.
8900 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8901 (PTRACE_ARG4_TYPE): Likewise.
8902 (PTRACE_XFER_TYPE): Likewise.
8903 (linux_detach_one_lwp): Cast fourth argument of
8904 ptrace to long then PTRACE_ARG4_TYPE.
8905 (regsets_fetch_inferior_registers): Cast third argument of
8906 ptrace to long then PTRACE_ARG3_TYPE.
8907 (regsets_store_inferior_registers): Likewise.
8908
38ea300a
PA
89092012-04-20 Pedro Alves <palves@redhat.com>
8910
8911 * configure: Regenerate.
8912
c971b7fa
PA
89132012-04-19 Pedro Alves <palves@redhat.com>
8914
43aaf8b6 8915 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8916 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8917 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8918 (all, install-only, uninstall, clean-info, all-lib, clean): No
8919 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8920 (maintainer-clean realclean distclean): Use subdir_do.
8921 (subdir_do): New.
8922 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8923 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8924 * acinclude.m4: Include acx_configure_dir.m4.
8925 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8926 calls. Call AC_PROG_RANLIB. Configure gnulib using
8927 ACX_CONFIGURE_DIR.
8928 (GNULIB): New.
8929 (GNULIB_STDINT_H): Adjust.
8930 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8931 * gdbreplay.c: Include build-gnulib/config.h.
8932 * server.h: Likewise.
8933 * aclocal.m4: Regenerate.
8934 * config.in: Regenerate.
8935 * configure: Regenerate.
c971b7fa 8936
809277f8
PA
89372012-04-19 Pedro Alves <palves@redhat.com>
8938
8939 * Makefile.in (LIBGNU, INCGNU): Adjust.
8940 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8941 (all, install-only, uninstall, clean-info, all-lib, clean)
8942 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8943 * configure.ac: Adjust AC_OUTPUT output.
8944 * aclocal.m4: Regenerate.
8945 * configure: Regenerate.
8946
fd9bb8b8
PA
89472012-04-19 Pedro Alves <palves@redhat.com>
8948
8949 * Makefile.in (generated_files): New.
8950 (server_h): Remove the explicit dependency on config.h, and depend
8951 on $generated_files.
8952
1c298c66
PA
89532012-04-19 Pedro Alves <palves@redhat.com>
8954
8955 * Makefile.in (INCGNU): Add -Ignulib.
8956
57c4b50b
PA
89572012-04-19 Pedro Alves <palves@redhat.com>
8958
8959 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8960 (INCGNU): ... this, and spell out -I here.
8961 (GNULIB_LIB): Rename to ...
8962 (LIBGNU): ... this.
8963 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8964
1030e047
PA
89652012-04-19 Pedro Alves <palves@redhat.com>
8966
8967 * config.in: Regenerate.
8968
447d4319
PA
89692012-04-19 Pedro Alves <palves@redhat.com>
8970
8971 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8972 * server.h (memmem): Remove declaration.
8973 * config.in: Regenerate.
8974 * configure: Regenerate.
8975
aad9eab9
YQ
89762012-04-19 Yao Qi <yao@codesourcery.com>
8977
8978 * Makefile.in (SFILES): Add common/vec.c.
8979 (OBS): Add vec.o.
8980 (vec.o): New rule.
8981
3e10640f
YQ
89822012-04-19 Yao Qi <yao@codesourcery.com>
8983
8984 * remote-utils.c (prepare_resume_reply): Replace with macro
8985 target_core_of_thread.
8986 * server.c (handle_qxfer_threads_proper): Likewise.
8987 * target.h (traget_core_of_thread): New macro.
8988
71622373
PA
89892012-04-18 Pedro Alves <palves@redhat.com>
8990
8991 * aclocal.m4: Regenerate.
8992 * configure: Regenerate.
8993
80d26939
YQ
89942012-04-16 Yao Qi <yao@codesourcery.com>
8995
8996 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8997 duplicated on address.
8998
42476b70
YQ
89992012-04-16 Yao Qi <yao@codesourcery.com>
9000
9001 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9002 (struct tracepoint_action_ops) <send>: New field.
9003 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9004 (agent_expr_send, x_tracepoint_action_send): New.
9005 (l_tracepoint_action_send): New.
9006 (cmd_qtdp): Download and install tracepoint
9007 according to `use_agent'.
9008 (run_inferior_command): Add one more parameter `len'.
9009 Update callers.
9010 (tracepoint_send_agent): New.
9011 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9012
7bc83639
YQ
90132012-04-16 Yao Qi <yao@codesourcery.com>
9014
9015 * tracepoint.c (download_tracepoints): Moved to ...
9016 (cmd_qtstart): ... here.
9017
5f18041e
YQ
90182012-04-14 Yao Qi <yao@codesourcery.com>
9019
9020 * tracepoint.c: Include inttypes.h.
9021 (struct collect_memory_action): Use sized types.
9022 (struct tracepoint): Likewise.
9023 (cmd_qtdp, stop_tracing): Update print specifiers.
9024 (cmd_qtp, response_tracepoint): Likewise.
9025 (collect_data_at_tracepoint): Likewise.
9026 (collect_data_at_step): Likewise.
9027
55a8c076
YQ
90282012-04-14 Yao Qi <yao@codesourcery.com>
9029
9030 Import gnulib module inttypes.
9031 * aclocal.m4, config.in, configure: Regenerated.
9032
dc750257
YQ
90332012-04-14 Yao Qi <yao@codesourcery.com>
9034
9035 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9036 Makefile and config.status at last.
9037
0ab5faf9
YQ
90382012-04-13 Yao Qi <yao@codesourcery.com>
9039
9040 * tracepoint.c: Include stdint.h unconditionally.
9041
18f5fd81
TJB
90422012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9043
9044 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9045 on BFD_HAVE_SYS_PROCFS_TYPE.
9046 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9047 * configure: Regenerate.
9048 * config.in: Likewise.
9049
4d47af5c
L
90502012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9051
9052 * Makefile.in (clean): Also remove x32.c x32-linux.c
9053 x32-avx.c x32-avx-linux.c.
9054 (x32.o): New target.
9055 (x32.c): Likewise.
9056 (x32-linux.o): Likewise.
9057 (x32-linux.c): Likewise.
9058 (x32-avx.o): Likewise.
9059 (x32-avx.c): Likewise.
9060 (x32-avx-linux.o): Likewise.
9061 (x32-avx-linux.c): Likewise.
9062
9063 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9064 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9065 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9066 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9067 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9068 i386/x32-avx-linux.xml.
9069
9070 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9071 (init_registers_x32_avx_linux): Likwise.
9072 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9073 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9074
ecedbe58
PA
90752012-04-13 Pedro Alves <palves@redhat.com>
9076
9077 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9078 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9079 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9080 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9081 the sub-make.
9082
c92b5177
L
90832012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9084
9085 * linux-x86-low.c (compat_x32_clock_t): New.
9086 (compat_x32_siginfo_t): Likewise.
9087 (compat_x32_siginfo_from_siginfo): Likewise.
9088 (siginfo_from_compat_x32_siginfo): Likewise.
9089 (linux_is_elf64): Likewise.
9090 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9091 and siginfo_from_compat_x32_siginfo for x32.
9092 (x86_arch_setup): Set linux_is_elf64.
9093
214d508e
L
90942012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9095
9096 PR gdb/13969
9097 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9098 e_machine field.
9099 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9100 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9101 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9102 compatible with process.
9103
c9a1864a
YQ
91042012-04-12 Yao Qi <yao@codesourcery.com>
9105
9106 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9107 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9108 (install-only, install-info, clean): Handle sub dir gnulib.
9109 (all-lib, am--refresh): New targets.
9110 (memmem.o): Remove target.
9111 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9112 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9113 (AC_REPLACE_FUNCS): Remove memmem.
9114 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9115 (AC_OUTPUT): Generate Makefile in gnulib/.
9116 * aclocal.m4, config.in, configure: Regenerated.
9117
367ba2c2
MR
91182012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9119
9120 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9121
9d236627
PA
91222012-04-05 Pedro Alves <palves@redhat.com>
9123
9124 -Werror=strict-aliasing
9125
9126 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9127 pointer.
9128
111217b3
PA
91292012-04-04 Pedro Alves <palves@redhat.com>
9130
9131 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9132 (sparc_store_gregset_from_stack, sparc_store_gregset)
9133 (sparc_breakpoint_at): Fix formatting.
9134
8365dcf5
TJB
91352012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9136
9137 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9138 are available.
9139 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9140 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9141 * config.in: Regenerate.
9142 * configure: Likewise.
9143
689cc2ae
PA
91442012-03-29 Pedro Alves <palves@redhat.com>
9145
9146 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9147 Correct ptrace arguments.
9148
c14dfd32
PA
91492012-03-28 Pedro Alves <palves@redhat.com>
9150
9151 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9152 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9153 (IA64_FR1_REGNUM): New defines.
9154 (ia64_fetch_register): New.
9155 (the_low_target): Install it.
9156 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9157 field.
9158 * linux-low.c (linux_fetch_registers): Try the
9159 the_low_target.fetch_register hook first.
9160
9161 * linux-arm-low.c (the_low_target): Adjust.
9162 * linux-bfin-low.c (the_low_target): Adjust.
9163 * linux-cris-low.c (the_low_target): Adjust.
9164 * linux-crisv32-low.c (the_low_target): Adjust.
9165 * linux-m32r-low.c (the_low_target): Adjust.
9166 * linux-m68k-low.c (the_low_target): Adjust.
9167 * linux-mips-low.c (the_low_target): Adjust.
9168 * linux-ppc-low.c (the_low_target): Adjust.
9169 * linux-s390-low.c (the_low_target): Adjust.
9170 * linux-sh-low.c (the_low_target): Adjust.
9171 * linux-sparc-low.c (the_low_target): Adjust.
9172 * linux-tic6x-low.c (the_low_target): Adjust.
9173 * linux-x86-low.c (the_low_target): Adjust.
9174 * linux-xtensa-low.c (the_low_target): Adjust.
9175
63c88e13
PA
91762012-03-26 Pedro Alves <palves@redhat.com>
9177
9178 * server.c (handle_qxfer_libraries): Don't bail early if
9179 the_target->qxfer_libraries_svr4 is not NULL.
9180
fb723180
PA
91812012-03-26 Pedro Alves <palves@redhat.com>
9182
9183 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9184
0afae3cf
PA
91852012-03-23 Pedro Alves <palves@redhat.com>
9186
9187 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9188 "library-list-svr4" element's start tag when the the DSO list is
9189 empty.
9190
485f1ee4
PA
91912012-03-23 Pedro Alves <palves@redhat.com>
9192
9193 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9194 a variable whose type size is the same as the inferior's pointer
9195 size.
9196
a5362b9a
TS
91972012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9198
9199 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9200 struct siginfo.
9201 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9202 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9203 * linux-low.h: Include <signal.h>.
9204 (struct siginfo): Remove forward declaration.
9205 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9206 struct siginfo.
9207
d226c142
MF
92082012-03-21 Mike Frysinger <vapier@gentoo.org>
9209
9210 * .gitignore: Ignore more files.
9211
122f36ef
PA
92122012-03-19 Pedro Alves <palves@redhat.com>
9213 Jan Kratochvil <jan.kratochvil@redhat.com>
9214
9215 * server.c (cont_thread, general_thread): Add describing comments.
9216 (start_inferior): Clear `cont_thread'.
9217 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9218 of a process.
9219
fc3e5175
YQ
92202012-03-15 Yao Qi <yao@codesourcery.com>
9221
9222 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9223 handling to ...
9224 (cmd_qtdp): ... here.
9225
8d0d92cd
YQ
92262012-03-15 Yao Qi <yao@codesourcery.com>
9227
9228 * tracepoint.c (struct tracepoint_action_ops): New.
9229 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9230 (m_tracepoint_action_download): New.
9231 (r_tracepoint_action_download): New.
9232 (x_tracepoint_action_download): New.
9233 (l_tracepoint_action_download): New.
9234 (add_tracepoint_action): Install `action->ops' according type.
9235 (download_tracepoint_1): Move code `download' function pointer
9236 of various tracepoint_action_ops.
9237
87b0bb13
JK
92382012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9239
9240 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9241 linux_ptrace_attach_warnings.
9242
5f572dec
JK
92432012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9244
9245 * Makefile.in (linux-ptrace.o): New.
9246 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9247 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9248 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9249 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9250 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9251 of these targets.
9252 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9253
f4647387
YQ
92542012-03-08 Yao Qi <yao@codesourcery.com>
9255 Pedro Alves <palves@redhat.com>
9256
9257 Fix PR server/13392.
9258 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9259 offset of JMP insn.
9260 * tracepoint.c (remove_tracepoint): New.
9261 (cmd_qtdp): Call remove_tracepoint when failed to install.
9262
9b224c5e
PA
92632012-03-07 Pedro Alves <palves@redhat.com>
9264
9265 * linux-low.c (get_detach_signal): New.
9266 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9267 Pass on pending signals to PTRACE_DETACH. Check the result of the
9268 ptrace call.
9269 * server.c (program_signals, program_signals_p): New.
9270 (handle_general_set): Handle QProgramSignals.
9271 * server.h (program_signals, program_signals_p): Declare.
9272
e237a7e2
JK
92732012-03-05 Pedro Alves <palves@redhat.com>
9274 Jan Kratochvil <jan.kratochvil@redhat.com>
9275
9276 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9277 New comment why.
9278
5808517f
YQ
92792012-03-03 Yao Qi <yao@codesourcery.com>
9280
9281 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9282 agent_look_up_symbols.
9283
58b4daa5
YQ
92842012-03-03 Yao Qi <yao@codesourcery.com>
9285
9286 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9287 (linux-x86-low.o): Likewise.
9288 * server.h: Remove in_process_agent_loaded.
9289 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9290 common/agent.c.
9291 Update callers.
9292
8ffcbaaf
YQ
92932012-03-03 Yao Qi <yao@codesourcery.com>
9294
9295 * tracepoint.c (gdb_agent_capability): New global.
9296 (in_process_agent_loaded_ust): Renamed to
9297 `in_process_agent_supports_ust'.
9298 Update callers.
9299 (in_process_agent_supports_ust): Call agent_capability_check.
9300 (clear_installed_tracepoints): Assert that agent supports
9301 agent.
9302
d1feda86
YQ
93032012-03-03 Yao Qi <yao@codesourcery.com>
9304
9305 * linux-low.c (linux_supports_agent): New.
9306 (linux_target_ops): Initialize field `supports_agent' with
9307 linux_supports_agent.
9308 * target.h (struct target_ops) <supports_agent>: New.
9309 (target_supports_agent): New macro.
9310 * server.c (handle_general_set): Handle packet 'QAgent'.
9311 (handle_query): Send `QAgent+'.
9312 * Makefile.in (server.o): Depends on agent.h.
9313
2fa291ac
YQ
93142012-03-03 Yao Qi <yao@codesourcery.com>
9315
9316 * Makefile.in (OBS): Add agent.o.
9317 Add new rule for agent.o.
9318 Track dependence of tracepoint.c on agent.h.
9319 * tracepoint.c (run_inferior_command_1):
9320 (run_inferior_command): Call agent_run_command.
9321 (gdb_ust_connect_sync_socket): Deleted. Move it to
9322 common/agent.c.
9323 (resume_thread, stop_thread): Likewise.
9324 (gdb_ust_socket_init): Renamed to ...
9325 (gdb_agent_socket_init): ... New.
9326 (gdb_ust_thread): Renamed to ...
9327 (gdb_agent_helper_thread): ... New.
9328 (gdb_ust_init): Move some code to ...
9329 (gdb_agent_init): ... here. New.
9330 [HAVE_UST]: Call gdb_ust_init.
9331 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9332 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9333 * config.in, configure: Regenerated.
9334
05044653
PA
93352012-03-02 Pedro Alves <palves@redhat.com>
9336
9337 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9338 * linux-low.c (struct simple_pid_list): New.
9339 (stopped_pids): New a struct simple_pid_list pointer.
9340 (add_to_pid_list, pull_pid_from_list): New.
9341 (handle_extended_wait): Don't assume the first signal new children
9342 report is SIGSTOP. Adjust call to pull_pid_from_list.
9343 (linux_wait_for_lwp): Adjust.
9344
8d00225b
YQ
93452012-03-02 Yao Qi <yao@codesourcery.com>
9346
9347 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9348 debug log.
9349
19560ba5
YQ
93502012-03-02 Yao Qi <yao@codesourcery.com>
9351
9352 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9353 `stop_pc' and `tpoint'. Update caller.
9354
1faeff08
MR
93552012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9356
9357 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9358 * linux-low.c (use_linux_regsets): New macro.
9359 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9360 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9361 (linux_register_in_regsets): New function.
9362 (usr_fetch_inferior_registers): Skip registers covered by
9363 regsets.
9364 (usr_store_inferior_registers): Likewise.
9365 (usr_fetch_inferior_registers): New macro.
9366 (usr_store_inferior_registers): Likewise.
9367 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9368 (linux_store_registers): Likewise.
9369 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9370 prototype.
9371 (init_registers_mips64_dsp_linux): Likewise.
9372 (init_registers_mips_linux): New macro.
9373 (init_registers_mips_dsp_linux): Likewise.
9374 (mips_dsp_num_regs): Likewise.
9375 (DSP_BASE, DSP_CONTROL): New fallback macros.
9376 (mips_base_regs): New macro.
9377 (mips_regmap): Use it. Fix the size.
9378 (mips_dsp_regmap): New variable.
9379 (mips_dsp_regset_bitmap): Likewise.
9380 (mips_arch_setup): New function.
9381 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9382 than mips_regmap.
9383 (mips_cannot_store_register): Likewise.
9384 (the_low_target): Update .arch_setup, .num_regs and .regmap
9385 initializers. Add .regset_bitmap initializer.
9386 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9387 initializer.
9388 * linux-bfin-low.c (the_low_target): Likewise.
9389 * linux-cris-low.c (the_low_target): Likewise.
9390 * linux-crisv32-low.c (the_low_target): Likewise.
9391 * linux-ia64-low.c (the_low_target): Likewise.
9392 * linux-m32r-low.c (the_low_target): Likewise.
9393 * linux-m68k-low.c (the_low_target): Likewise.
9394 * linux-ppc-low.c (the_low_target): Likewise.
9395 * linux-s390-low.c (the_low_target): Likewise.
9396 * linux-sh-low.c (the_low_target): Likewise.
9397 * linux-sparc-low.c (the_low_target): Likewise.
9398 * linux-tic6x-low.c (the_low_target): Likewise.
9399 * linux-x86-low.c (the_low_target): Likewise.
9400 * linux-xtensa-low.c (the_low_target): Likewise.
9401 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9402 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9403 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9404 srv_xmlfiles.
9405 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9406 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9407
c03e6ccc
YQ
94082012-02-29 Yao Qi <yao@codesourcery.com>
9409 Pedro Alves <palves@redhat.com>
9410
9411 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9412 `step_over_finished' is true.
9413
644cebc9
PA
94142012-02-27 Pedro Alves <palves@redhat.com>
9415
9416 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9417 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9418
c14d7ab2
PA
94192012-02-27 Pedro Alves <palves@redhat.com>
9420
9421 PR server/9684
9422 * linux-low.c (pid_is_stopped): New.
9423 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9424
412c89dd
LM
94252012-02-25 Luis Machado <lgustavo@codesourcery.com>
9426
9427 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9428 of conditions.
9429
b745defe
MR
94302012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9431
9432 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9433
9f3a5c85
LM
94342012-02-24 Luis Machado <lgustavo@codesourcery>
9435
9436 * server.c (handle_query): Advertise support for target-side
9437 breakpoint condition evaluation.
9438 (process_point_options): New function.
9439 (process_serial_event): When inserting a breakpoint, check for
9440 a target-side condition that should be evaluated.
9441
9442 * mem-break.c: Include regcache.h and ax.h.
9443 (point_cond_list_t): New data structure.
9444 (breakpoint) <cond_list>: New field.
9445 (find_gdb_breakpoint_at): Make non-static.
9446 (delete_gdb_breakpoint_at): Clear any target-side
9447 conditions.
9448 (clear_gdb_breakpoint_conditions): New function.
9449 (add_condition_to_breakpoint): Likewise.
9450 (add_breakpoint_condition): Likewise.
9451 (gdb_condition_true_at_breakpoint): Likewise.
9452 (gdb_breakpoint_here): Return result directly instead
9453 of going through a local variable.
9454
9455 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9456 (clear_gdb_breakpoint_conditions): Likewise.
9457 (add_breakpoint_condition): Likewise.
9458 (gdb_condition_true_at_breakpoint): Likewise.
9459
9460 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9461 (need_step_over_p): Take target-side breakpoint condition into
9462 consideration.
9463
5e1dc496
LM
94642012-02-24 Luis Machado <lgustavo@codesourcery>
9465
9466 * server.h: Include tracepoint.h.
9467 (agent_mem_read, agent_get_trace_state_variable_value,
9468 agent_set_trace_state_variable_value,
9469 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9470 get_set_tsv_func_addr): New prototypes.
9471
9472 * ax.h: New include file.
9473 * ax.c: New source file.
9474
9475 * tracepoint.c: Include ax.h.
9476 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9477 agent_expr, eval_result_type): Move to ax.h.
9478 (parse_agent_expr): Rename to ...
9479 (gdb_parse_agent_expr): ... this, make it non-static and move
9480 to ax.h.
9481 (unparse_agent_expr) Rename to ...
9482 (gdb_unparse_agent_expr): ... this, make it non-static and move
9483 to ax.h.
9484 (eval_agent_expr): Rename to ...
9485 (eval_tracepoint_agent_expr): ... this.
9486 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9487 forward declarations.
9488 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9489 (agent_get_trace_state_variable_value): New function.
9490 (agent_set_trace_state_variable_value): New function.
9491 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9492 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9493 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9494 (condition_true_at_tracepoint): Likewise.
9495 (parse_agent_expr): Rename to ...
9496 (gdb_parse_agent_expr): ... this and move to ax.c.
9497 (unparse_agent_expr): Rename to ...
9498 (gdb_unparse_agent_expr): ... this and move to ax.c.
9499 (gdb_agent_op_name): Move to ax.c.
9500 (eval_agent_expr): Rename to ...
9501 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9502 and move to ax.c.
9503 (eval_tracepoint_agent_expr): New function.
9504 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9505 non-static.
5e1dc496
LM
9506 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9507 ax.c.
9508 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9509 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9510 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9511 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9512 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9513 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9514 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9515 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9516 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9517 (compile_bytecodes): Remove forward declaration.
9518 (is_goto_target): Move to ax.c.
9519 (compile_bytecodes): Move to ax.c and call
9520 agent_get_trace_state_variable_value (...) and
9521 agent_set_trace_state_variable_value (...).
9522
9523 * Makefile.in: Update ax.c and IPA dependencies.
9524
277e4e52
PA
95252012-02-24 Pedro Alves <palves@redhat.com>
9526
9527 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9528 (cmd_bigqtbuffer_circular): ... this. Only handle
9529 'QTBuffer:circular:'.
9530 (handle_tracepoint_general_set): Adjust.
9531
bf4c19f7
YQ
95322012-02-16 Yao Qi <yao@codesourcery.com>
9533
9534 * inferiors.c: Move code to ...
9535 * dll.c: .... here. New.
9536 * server.h: Declare clear_dlls.
9537 * Makefile.in (SFILES): Add dll.c.
9538 (OBS): Add dll.o
9539 (dll.o): New rule.
9540
d73f2619
YQ
95412012-02-11 Yao Qi <yao@codesourcery.com>
9542
9543 * server.c: (handle_monitor_command): Add a new parameter
9544 `own_buf'.
9545 (handle_query): Update caller.
9546
f8255c2a
JB
95472012-02-09 Joel Brobecker <brobecker@adacore.com>
9548
9549 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9550 * configure, config.in: Regenerate.
9551 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9552 is not defined.
9553
da84f473
PA
95542012-02-02 Pedro Alves <palves@redhat.com>
9555
9556 Try SIGKILL first, then PTRACE_KILL.
9557 * linux-low.c (linux_kill_one_lwp): New.
9558 (linux_kill_one_lwp): Rename to ...
9559 (kill_one_lwp_callback): ... this. Use the new
9560 linux_kill_one_lwp.
9561
e886a173
PA
95622012-02-02 Pedro Alves <palves@redhat.com>
9563
9564 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9565 inferior.
9566
be07f1a2
PA
95672012-01-27 Pedro Alves <palves@redhat.com>
9568
9569 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9570 (elf_64_file_p): Make static.
9571 (linux_pid_exe_is_elf_64_file): New.
9572 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9573 Delete declarations.
9574 (linux_pid_exe_is_elf_64_file): Declare.
9575 * linux-x86-low.c (x86_arch_setup): Use
9576 linux_pid_exe_is_elf_64_file.
9577
d8301ad1
JK
95782012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9579
9580 * linux-low.c (linux_wait_for_event_1): Rename to ...
9581 (linux_wait_for_event): ... here and merge it with former
9582 linux_wait_for_event - new variable wait_ptid, use it.
9583 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9584
01b17894
PA
95852012-01-23 Pedro Alves <palves@redhat.com>
9586
9587 * server.c (main): Avoid yet another case of infinite loop while
9588 detaching/killing after a longjmp.
9589
e825046f
JK
95902012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9591
9592 Code cleanup.
9593 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9594
b9e7b9c3
UW
95952012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9596
9597 * hostio.c (handle_readlink): New function.
9598 (handle_vFile): Call it to handle "vFile:readlink" packets.
9599
901f9912
UW
96002012-01-20 Pedro Alves <palves@redhat.com>
9601 Ulrich Weigand <ulrich.weigand@linaro.org>
9602
9603 * server.c (handle_v_requests): Only support vAttach and vRun to
9604 start multiple processes when in extended protocol mode.
9605
fc1ab1a0
PA
96062012-01-17 Pedro Alves <palves@redhat.com>
9607
9608 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9609 memalign plus mprotect to allocate the scratch buffer.
9610
7d5d4e98
PA
96112012-01-13 Pedro Alves <palves@redhat.com>
9612
9613 * server.c (attach_inferior): Clear `cont_thread'.
9614
f128d5e9
PA
96152012-01-13 Pedro Alves <palves@redhat.com>
9616
9617 * server.c (main): Avoid infinite loop while detaching/killing
9618 after a longjmp.
9619
06db92f0
DE
96202012-01-09 Doug Evans <dje@google.com>
9621
9622 * server.c (start_inferior): Set last_ptid in --wrapper case.
9623
32d92999
YQ
96242012-01-06 Yao Qi <yao@codesourcery.com>
9625
9626 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9627 defined.
9628 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9629
5e0a92a9
YQ
96302012-01-04 Yao Qi <yao@codesourcery.com>
9631
9632 * tracepoint.c (cmd_qtdp): Print debug message
9633 for static tracepoint.
9634
ae639e8c
YQ
96352012-01-04 Yao Qi <yao@codesourcery.com>
9636
9637 * tracepoint.c (trace_vdebug): Differentiate debug message
9638 between gdbserver and IPA.
9639
f72429c5
YQ
96402012-01-03 Yao Qi <yao@codesourcery.com>
9641
9642 * tracepoint.c (tracepoint_was_hit): Don't collect for
9643 static tracepoint.
9644
12c3e59c
JB
96452012-01-02 Joel Brobecker <brobecker@adacore.com>
9646
9647 * terminal.h: Reformat copyright header.
9648
67827812
JB
96492012-01-02 Joel Brobecker <brobecker@adacore.com>
9650
9651 * server.c (gdbserver_version): Update copyright year.
9652 * gdbreplay.c (gdbreplay_version): Likewise.
9653
3e52c33d
JK
96542011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9655
9656 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9657
9658 Revert:
9659 2011-12-18 Hui Zhu <teawater@gmail.com>
9660 * linux-low.c (linux_create_inferior): Save return value to ret.
9661
66f1260e
HZ
96622011-12-18 Hui Zhu <teawater@gmail.com>
9663
9664 * linux-low.c (linux_create_inferior): Save return value to ret.
9665
e77616d7
DE
96662011-12-16 Doug Evans <dje@google.com>
9667
e7b06c57
DE
9668 * linux-low.c (linux_create_inferior): If stdio connection,
9669 redirect stdin from /dev/null, stdout to stderr.
9670 * remote-utils.c (remote_is_stdio): New static global.
9671 (remote_connection_is_stdio): New function.
9672 (remote_prepare): Handle stdio connection.
9673 (remote_open): Ditto.
9674 (remote_close): Don't close stdin for stdio connections.
9675 (read_prim,write_prim): New functions. Replace all calls to
9676 read/write to these.
9677 * server.c (main): Watch for "-" argument. Move call to
9678 remote_prepare before start_inferior.
9679 * server.h (STDIO_CONNECTION_NAME): New macro.
9680 (remote_connection_is_stdio): Declare.
9681
e77616d7
DE
9682 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9683 in debugging output.
9684
82067193
YQ
96852011-12-15 Yao Qi <yao@codesourcery.com>
9686
9687 * tracepoint.c: Include sys/syscall.h.
9688 (gdb_ust_thread): Remove preprocessor conditional.
9689
82bfbe7e
PA
96902011-12-14 Pedro Alves <pedro@codesourcery.com>
9691
9692 * linux-low.c (linux_detach_one_lwp): Call
9693 the_low_target.prepare_to_resume before detaching.
9694
712c6575
YQ
96952011-12-14 Yao Qi <yao@codesourcery.com>
9696
9697 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9698 of write.
9699
d54d1edf
YQ
97002011-12-14 Yao Qi <yao@codesourcery.com>
9701
9702 * i386-low.c (i386_low_stopped_data_address): Initialize local
9703 variable `control'.
9704
6210a125
PA
97052011-12-13 Pedro Alves <pedro@codesourcery.com>
9706
9707 PR remote/13492
9708
9709 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9710 DR_CONTROL unless necessary. Extend comments.
9711 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9712 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9713
2ece8244
YQ
97142011-12-13 Yao Qi <yao@codesourcery.com>
9715
9716 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9717 macros.
9718 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9719
784867a5
JK
97202011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9721
9722 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9723 Print new debug message for such case.
9724
6bf36717
JK
97252011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9726
9727 Fix overlapping memcpy.
9728 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9729 the read_inferior_memory transfer.
9730 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9731 write_inferior_memory transfer.
9732 (set_fast_tracepoint_jump): New variable buf. Use it for the
9733 read_inferior_memory and write_inferior_memory transfers.
9734 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9735 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9736 Use it for the write_inferior_memory transfer.
9737 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9738 buffers.
9739
50275556
MR
97402011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9741
9742 * linux-low.c (fetch_register, store_register): Make code
9743 consistent, fix formatting.
9744
7325beb4
MR
97452011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9746
9747 * linux-low.c (usr_store_inferior_registers): Factor out code
9748 to handle individual registers into...
9749 (store_register): ... this new function.
9750
c642a434
UW
97512011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9752
9753 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9754 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9755 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9756 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9757 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9758 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9759 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9760 (srv_xmlfiles): Add new XML files.
9761
9762 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9763 and <sys/uio.h>.
9764 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9765 (init_registers_s390_linux32v1): Add prototype.
9766 (init_registers_s390_linux32v2): Likewise.
9767 (init_registers_s390_linux64v1): Likewise.
9768 (init_registers_s390_linux64v2): Likewise.
9769 (init_registers_s390x_linux64v1): Likewise.
9770 (init_registers_s390x_linux64v2): Likewise.
9771 (s390_num_regs): Increment to 52.
9772 (s390_regmap): Add orig_r2 register.
9773 (s390_num_regs_3264): Increment to 68.
9774 (s390_regmap_3264): Add orig_r2 register.
9775 (s390_collect_ptrace_register): Handle orig_r2 register.
9776 (s390_supply_ptrace_register): Likewise.
9777 (s390_fill_last_break): New function.
9778 (s390_store_last_break): Likewise.
9779 (s390_fill_system_call): New function.
9780 (s390_store_system_call): Likewise.
9781 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9782 register sets.
9783 (s390_check_regset): New function.
9784 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9785 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9786 Update target_regsets for available register sets.
9787
2268b414
JK
97882011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9789 Jan Kratochvil <jan.kratochvil@redhat.com>
9790
9791 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9792 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9793 New.
9794 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9795 * linux-low.h (struct process_info_private): New member r_debug.
9796 * server.c (handle_qxfer_libraries): Call
9797 the_target->qxfer_libraries_svr4.
9798 (handle_qxfer_libraries_svr4): New function.
9799 (qxfer_packets): New entry "libraries-svr4".
9800 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9801 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9802 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9803 PACKET_qXfer_libraries_svr4.
9804
d6db1fab
UW
98052011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9806
9807 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9808 PSW address/mask between 8-byte and 16-byte formats.
9809 (s390_supply_ptrace_register): Likewise.
9810 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9811 basic addressing mode bit.
9812
242f5f1c
SS
98132011-11-24 Stan Shebs <stan@codesourcery.com>
9814
9815 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9816
f196051f
SS
98172011-11-17 Stan Shebs <stan@codesourcery.com>
9818
9819 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9820 (tracing_start_time): New global.
9821 (tracing_stop_time): New global.
9822 (tracing_user_name): New global.
9823 (tracing_notes): New global.
9824 (tracing_stop_note): New global.
9825 (cmd_qtstart): Set traceframe_usage, start_time.
9826 (stop_tracing): Set stop_time.
9827 (cmd_qtstatus): Report additional status.
9828 (cmd_qtp): New function.
9829 (handle_tracepoint_query): Call it.
9830 (cmd_qtnotes): New function.
9831 (handle_tracepoint_general_set): Call it.
9832 (get_timestamp): Rename from tsv_get_timestamp.
9833
405f8e94
SS
98342011-11-14 Stan Shebs <stan@codesourcery.com>
9835 Kwok Cheung Yeung <kcy@codesourcery.com>
9836
9837 * linux-x86-low.c (small_jump_insn): New.
9838 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9839 trampoline and error message, build a trampoline and issue a small
9840 jump instruction to it.
9841 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9842 trampoline and error message.
9843 (x86_get_min_fast_tracepoint_insn_len): New.
9844 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9845 * linux-low.h (struct linux_target_ops): Add arguments to
9846 install_fast_tracepoint_jump_pad operation, add new operation.
9847 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9848 arguments.
9849 (linux_get_min_fast_tracepoint_insn_len): New function.
9850 (linux_target_op): Add new operation.
9851 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9852 (gdb_trampoline_buffer_end): Ditto.
9853 (gdb_trampoline_buffer_error): Ditto.
9854 (struct ipa_sym_addresses): Add fields for new IPA variables.
9855 (symbol_list): Add entries for new IPA variables.
9856 (struct tracepoint): Add fields to hold the address range of the
9857 trampoline used by the tracepoint.
9858 (trampoline_buffer_head): New static variable.
9859 (trampoline_buffer_tail): Ditto.
9860 (claim_trampoline_space): New function.
9861 (have_fast_tracepoint_trampoline_buffer): New function.
9862 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9863 structure.
9864 (install_fast_tracepoint): Ditto, also add error buffer argument.
9865 (cmd_qtminftpilen): New function.
9866 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9867 (fast_tracepoint_from_trampoline_address): New function.
9868 (fast_tracepoint_collecting): Handle trampoline as part of jump
9869 pad space.
9870 (set_trampoline_buffer_space): New function.
9871 (initialize_tracepoint): Initialize new IPA variables.
9872 * target.h (struct target_ops): Add arguments to
9873 install_fast_tracepoint_jump_pad operation, add new
9874 get_min_fast_tracepoint_insn_len operation.
9875 (target_get_min_fast_tracepoint_insn_len): New.
9876 (install_fast_tracepoint_jump_pad): Add arguments.
9877 * server.h (IPA_BUFSIZ): Define.
9878 * linux-i386-ipa.c: Include extra header files.
9879 (initialize_fast_tracepoint_trampoline_buffer): New function.
9880 (initialize_low_tracepoint): Call it.
9881 * server.h (set_trampoline_buffer_space): Declare.
9882 (claim_trampoline_space): Ditto.
9883 (have_fast_tracepoint_trampoline_buffer): Ditto.
9884
1e4d1764
YQ
98852011-11-14 Yao Qi <yao@codesourcery.com>
9886
9887 * server.c (handle_query): Handle InstallInTrace for qSupported.
9888 * tracepoint.c (add_tracepoint): Sort list.
9889 (install_tracepoint, download_tracepoint): New.
9890 (cmd_qtdp): Call them to install and download tracepoints.
9891 (sort_tracepoints): Removed.
9892 (cmd_qtstart): Update.
9893
5c73ff4e
YQ
98942011-11-14 Yao Qi <yao@codesourcery.com>
9895
9896 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9897 * mem-break.h: Declare.
9898 * tracepoint.c (cmd_qtstart): Move some code to ...
9899 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9900 New.
9901 (download_tracepoints): Move some code to ...
9902 (download_tracepoint_1): ... here. New.
9903
86a30030
YQ
99042011-11-08 Yao Qi <yao@codesourcery.com>
9905
9906 * remote-utils.c (relocate_instruction): A comment fix.
9907
8d26e50c
JB
99082011-11-07 Joel Brobecker <brobecker@adacore.com>
9909
9910 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9911 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9912 dr_status_mirror and dr_control_mirror from debug_reg_state.
9913 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9914 (i386_initial_stuff): Remove use of deleted globals.
9915 (i386_get_thread_context, i386_set_thread_context,
9916 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9917 from debug_reg_state.
9918
a59306a3
YQ
99192011-11-05 Yao Qi <yao@codesourcery.com>
9920
9921 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9922 address as TPOINT's.
9923
3065dfb6
SS
99242011-11-02 Stan Shebs <stan@codesourcery.com>
9925
9926 * tracepoint.c (agent_mem_read_string): New function.
9927 (eval_agent_expr): Call it for tracenz.
9928 * server.c (handle_query): Report support for tracenz.
9929
fd0d8c7c
YQ
99302011-11-02 Yao Qi <yao@codesourcery.com>
9931
9932 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9933
609086b1
YQ
99342011-11-02 Yao Qi <yao@codesourcery.com>
9935
9936 * target.h: Fix a typo in comment.
9937
b9fd1791
PA
99382011-10-31 Pedro Alves <pedro@codesourcery.com>
9939
9940 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9941 clobber the breakpoints' shadows with fast tracepoint jumps.
9942 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9943 * target.c (write_inferior_memory): Also pass MYADDR down to
9944 check_mem_write.
9945
03583c20
UW
99462011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9947
9948 * configure.ac: Check support for personality routine.
9949 * configure: Regenerate.
9950 * config.in: Likewise.
9951 * linux-low.c: Include <sys/personality.h>.
9952 Define ADDR_NO_RANDOMIZE if necessary.
9953 (linux_create_inferior): Disable address space randomization when
9954 forking inferior, if requested.
9955 (linux_supports_disable_randomization): New function.
9956 (linux_target_ops): Install it.
9957 * server.h (disable_randomization): Declare.
9958 * server.c (disable_randomization): New global variable.
9959 (handle_general_set): Handle QDisableRandomization.
9960 (handle_query): Likewise for qSupported.
9961 (main): Support --disable-randomization and --no-disable-randomization
9962 command line arguments.
9963 * target.h (struct target_ops): Add supports_disable_randomization.
9964 (target_supports_disable_randomization): New macro.
9965
723b724b
MF
99662011-09-29 Mike Frysinger <vapier@gentoo.org>
9967
9968 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9969 ifdef check.
9970 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9971 [!PT_GETDSBT] (target_loadmap): New definition.
9972 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9973 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9974 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9975 and PT_GETDSBT to LINUX_LOADMAP.
9976 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9977 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9978
55329a5c 99792011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9980
9981 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9982 (arm_linux_hwbp_cap): New static variable.
9983 (arm_linux_get_hwbp_cap): Replace by ...
9984 (arm_linux_init_hwbp_cap): ... this new function.
9985 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9986 (arm_linux_get_hw_watchpoint_count): Likewise.
9987 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9988 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9989 (arm_prepare_to_resume): Use perror_with_name instead of error.
9990
55329a5c 99912011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9992
9993 * linux-arm-low.c: Include <signal.h>.
9994 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9995 (struct arm_linux_hwbp_cap): New data type.
9996 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9997 (struct arm_linux_hw_breakpoint): New data type.
9998 (MAX_BPTS, MAX_WPTS): Define.
9999 (struct arch_process_info, struct arch_lwp_info): New data types.
10000 (arm_linux_get_hwbp_cap): New function.
10001 (arm_linux_get_hw_breakpoint_count): Likewise.
10002 (arm_linux_get_hw_watchpoint_count): Likewise.
10003 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10004 (arm_hwbp_control_initialize): Likewise.
10005 (arm_hwbp_control_is_enabled): Likewise.
10006 (arm_hwbp_control_is_initialized): Likewise.
10007 (arm_hwbp_control_disable): Likewise.
10008 (arm_linux_hw_breakpoint_equal): Likewise.
10009 (arm_linux_hw_point_initialize): Likewise.
10010 (struct update_registers_data): New data structure.
10011 (update_registers_callback: New function.
10012 (arm_insert_point): Likewise.
10013 (arm_remove_point): Likewise.
10014 (arm_stopped_by_watchpoint): Likewise.
10015 (arm_stopped_data_address): Likewise.
10016 (arm_new_process): Likewise.
10017 (arm_new_thread): Likewise.
10018 (arm_prepare_to_resume): Likewise.
10019 (the_low_target): Register arm_insert_point, arm_remove_point,
10020 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10021 arm_new_thread, and arm_prepare_to_resume.
10022
6b9801d4
SS
100232011-09-15 Stan Shebs <stan@codesourcery.com>
10024
10025 * server.h (struct emit_ops): Add compare-goto fields.
10026 * tracepoint.c (gdb_agent_op_sizes): New table.
10027 (emit_eq_goto): New function.
10028 (emit_ne_goto): New function.
10029 (emit_lt_goto): New function.
10030 (emit_le_goto): New function.
10031 (emit_gt_goto): New function.
10032 (emit_ge_goto): New function.
10033 (is_goto_target): New function.
10034 (compile_bytecodes): Recognize special cases of compare-goto
10035 combinations and call specialized emitters for them.
10036 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10037 (amd64_emit_ne_goto): New function.
10038 (amd64_emit_lt_goto): New function.
10039 (amd64_emit_le_goto): New function.
10040 (amd64_emit_gt_goto): New function.
10041 (amd64_emit_ge_goto): New function.
10042 (amd64_emit_ops): Add the new functions.
10043 (i386_emit_eq_goto): New function.
10044 (i386_emit_ne_goto): New function.
10045 (i386_emit_lt_goto): New function.
10046 (i386_emit_le_goto): New function.
10047 (i386_emit_gt_goto): New function.
10048 (i386_emit_ge_goto): New function.
10049 (i386_emit_ops): Add the new functions.
10050
bf15cbda
SS
100512011-09-08 Stan Shebs <stan@codesourcery.com>
10052
10053 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10054 (i386_emit_epilogue): Restore %ebx.
10055
943ca1dd
JZ
100562011-08-31 Jie Zhang <jzhang918@gmail.com>
10057
10058 * server.c (step_thread): Remove definition.
10059 (process_serial_event): Don't handle Hs.
10060 * server.h (step_thread): Remove declaration.
10061 * target.c (set_desired_inferior): Remove use of step_thread.
10062
e3deef73
LM
100632011-08-24 Luis Machado <lgustavo@codesourcery.com>
10064
10065 * linux-low.c: Include linux-procfs.h.
10066 (linux_attach_lwp_1): Update comments.
10067 (linux_attach): Scan for existing threads when attaching to a
10068 process that is the tgid.
10069 * Makefile.in: Update dependencies.
10070
13da1c97
LM
100712011-08-24 Luis Machado <lgustavo@codesourcery.com>
10072
10073 * configure.srv: Add linux-procfs.o dependencies.
10074
881127c9
YQ
100752011-08-14 Yao Qi <yao@codesourcery.com>
10076
10077 * target.h (struct target_ops): Fix indent.
10078 * win32-low.c (win32_target_ops): Fix comment.
10079
58dbd541
YQ
100802011-08-14 Andrew Jenner <andrew@codesourcery.com>
10081 Yao Qi <yao@codesourcery.com>
10082
10083 * Makefile.in (clean): Remove tic6x-*.c files.
10084 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10085 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10086 (tic6x-c64xp-linux.c): Likewise.
10087 * configure.srv: Add support for tic6x-*-uclinux.
10088 * linux-tic6x-low.c: New.
10089 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10090
78d85199
YQ
100912011-08-14 Andrew Stubbs <ams@codesourcery.com>
10092 Yao Qi <yao@codesourcery.com>
10093
10094 * target.h (struct target_ops): Add read_loadmap.
10095 * linux-low.c (struct target_loadseg): New type.
10096 (struct target_loadmap): New type.
10097 (linux_read_loadmap): New function.
10098 (linux_target_ops): Add linux_read_loadmap.
10099 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10100 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10101 to NULL.
78d85199 10102
a959a88d
EZ
101032011-08-05 Eli Zaretskii <eliz@gnu.org>
10104
10105 * win32-low.c: Include <stdint.h>.
10106
1ced966e
PA
101072011-07-22 Pedro Alves <pedro@codesourcery.com>
10108
10109 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10110 to the inferior here.
10111 (i386_remove_aligned_watchpoint): Ditto.
10112 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10113 fit part of the watchpoint in the debug registers.
10114 (i386_update_inferior_debug_regs): New.
10115 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10116 registers, and only update the inferior on success.
10117 (i386_low_remove_watchpoint): Ditto.
10118
d26e3629
KY
101192011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10120
10121 * linux-low.c (compare_ints, unique, list_threads, show_process,
10122 linux_core_of_thread): Delete.
10123 (linux_target_ops): Change linux_core_of_thread to
10124 linux_common_core_of_thread.
10125 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10126 * utils.c (malloc_failure): Change type of argument.
10127 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10128 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10129 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10130 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10131 (IPA_OBJS): Add common-utils-ipa.o.
10132 (ptid_h, linux_osdata_h): New macros.
10133 (server_h): Add common/common-utils.h, common/xml-utils.h,
10134 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10135 common/ptid.h.
10136 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10137 ptid.o, buffer.o): New rules.
10138 (linux-low.o): Add common/linux-osdata.h as a dependency.
10139 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10140 * configure.ac: Add AC_HEADER_DIRENT check.
10141 * config.in: Regenerate.
10142 * configure: Regenerate.
10143 * remote-utils.c (xml_escape_text): Delete.
10144 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10145 buffer_xml_printf): Move to common/buffer.c.
10146 * server.c (main): Remove call to initialize_inferiors.
10147 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10148 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10149 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10150 internal_error, gdb_assert, gdb_assert_fail): Delete.
10151 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10152 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10153 common/buffer.h.
10154 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10155 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10156 initialize_inferiors): Delete.
10157
2275a1a7
PA
101582011-07-20 Pedro Alves <pedro@codesourcery.com>
10159
10160 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10161 symbol error.
10162
0a5b1e09
PA
101632011-05-31 Pedro Alves <pedro@codesourcery.com>
10164
10165 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10166 assertion.
10167 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10168
6938fd34
YQ
101692011-05-26 Yao Qi <yao@codesourcery.com>
10170
10171 * Makefile.in (thread-db.o): Track dependence to
10172 common/gdb_thread_db.h.
10173 * thread-db.c: include gdb_thread_db.h from right place.
10174
b481f9e0
TT
101752011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10176
10177 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10178 __FILE__ and __LINE__ to internal_error.
10179
98a5dd13
DE
101802011-05-13 Doug Evans <dje@google.com>
10181
10182 * thread-db.c (try_thread_db_load_from_sdir): New function.
10183 (try_thread_db_load_from_dir): New function.
10184 (thread_db_load_search): Handle $sdir, ignore $pdir.
10185 Remove trying of system directories if search of
10186 libthread-db-search-path fails, that is now done via $sdir.
10187
d248b706
KY
101882011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10189
10190 * server.c (handle_query): Add EnableDisableTracepoints to the list
10191 of supported features.
43aaf8b6 10192 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10193 tracepoints.
43aaf8b6
PA
10194 (cmd_qtenable_disable): New.
10195 (cmd_qtstart): Install tracepoints even if disabled.
10196 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10197 receiving a QTEnable or QTDisable packet.
10198 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10199 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10200 tracepoints.
10201 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10202
84e578fb
DE
102032011-05-10 Doug Evans <dje@google.com>
10204
10205 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10206
71f55dd8
DE
102072011-05-04 Doug Evans <dje@google.com>
10208
10209 * linux-low.c (linux_join): Skip process lookup.
10210 * spu-low.c (spu_join): Ditto.
10211 * server.c (join_inferiors_callback): Delete.
10212 (process_serial_event): For 'D' packet (detach) call join_inferior
10213 directly.
10214
4d393d60
JM
102152011-05-04 Joseph Myers <joseph@codesourcery.com>
10216
10217 * README: Don't mention xscale*-*-linux*.
10218 * configure.srv (xscale*-*-linux*): Don't handle target.
10219
b00ad6ff
NF
102202011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10221
10222 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10223 casting pointers.
10224 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10225 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10226 (i386_emit_void_call_2): Likewise.
10227
af96c192
YQ
102282011-04-26 Yao Qi <yao@codesourcery.com>
10229
43aaf8b6
PA
10230 * linux-low.c: Move common macros to linux-ptrace.h.
10231 Include linux-ptrace.h.
af96c192
YQ
10232 * Makefile.in (linux_ptrace_h): New.
10233 (linux-low.o): Depends on linux-ptrace.h.
10234
03f2bd59
JK
102352011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10236
10237 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10238 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10239 (remote_prepare): New function with most of the TCP code from ...
10240 (remote_open): ... here. Detect PORT here unconditionally. Move also
10241 setting transport_is_reliable.
10242 * server.c (run_once): New variable.
10243 (gdbserver_usage): Document it.
10244 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10245 the first run if RUN_ONCE.
10246 * server.h (run_once, remote_prepare): New declarations.
10247
7a9dd1b2
TT
102482011-04-19 Tom Tromey <tromey@redhat.com>
10249
10250 * win32-low.c (handle_load_dll): Remove duplicate "the".
10251
81239425
PM
102522011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10253
10254 Remove support for old Cygwin 1.5 versions.
10255 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10256 function to avoid warning.
10257 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10258 warning.
10259
9e0627f1
PM
102602011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10261
10262 * gdbserver/server.h (Macro _): Define it if not available.
10263
588eebee
MS
102642011-03-14 Michael Snyder <msnyder@vmware.com>
10265
348af9f7 10266 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10267
43f70d4c
JB
102682011-03-10 Joel Brobecker <brobecker@adacore.com>
10269
10270 * Makefile.in (maintainer-clean realclean distclean): Remove
10271 "make ... subdir_do" command.
10272
348af9f7
MS
102732011-03-10 Michael Snyder <msnyder@vmware.com>
10274
10275 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10276
10277 * server.c (handle_v_run): Free alloced buffer on early return.
10278
e637a4f5
YQ
102792011-03-09 Yao Qi <yao@codesourcery.com>
10280
10281 Revert:
10282 2011-03-04 Yao Qi <yao@codesourcery.com>
10283
10284 * Makefile.in: Remove GNU make feature --directory.
10285
10286 2011-03-05 Yao Qi <yao@codesourcery.com>
10287
10288 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10289 (subdir_do): New make target. Copied from gdb/Makefile.
10290 (maintainer-clean, realclean, distclean, clean): Call corresponding
10291 make targets in common/Makefile.
10292
10293 2011-02-11 Yao Qi <yao@codesourcery.com>
10294
10295 * configure.ac: Call AC_PROG_RANLIB.
10296 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10297 * configure: Regenerate.
10298
e6edda56
JK
102992011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10300
10301 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10302
e5141119
JB
103032011-03-06 Yao Qi <yao@codesourcery.com>
10304
10305 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10306
64794aa4
JB
103072011-03-05 Yao Qi <yao@codesourcery.com>
10308
10309 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10310 (subdir_do): New make target. Copied from gdb/Makefile.
10311 (maintainer-clean, realclean, distclean, clean): Call corresponding
10312 make targets in common/Makefile.
10313
7a762829
YQ
103142011-03-04 Yao Qi <yao@codesourcery.com>
10315
10316 * Makefile.in: Remove GNU make feature --directory.
10317
348af9f7
MS
103182011-03-04 Michael Snyder <msnyder@vmware.com>
10319
10320 * server.c (queue_stop_reply): Call xmalloc not malloc.
10321
103222011-03-02 Michael Snyder <msnyder@vmware.com>
10323
10324 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10325
9f72fee2
MS
103262011-02-28 Michael Snyder <msnyder@vmware.com>
10327
588eebee
MS
10328 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10329 (cmd_qtframe): Ditto.
10330 (cmd_qtbuffer): Ditto.
10331 (cmd_bigqtbuffer): Ditto.
10332
9f72fee2
MS
10333 * utils.c (decimal2str): Initialize 'width' to nine, then
10334 don't mess with it.
10335
8040bd49
UW
103362011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10337
10338 * hostio.c (require_data): Free *data, not data.
10339
7e52cbd0
JK
103402011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10341
10342 * hostio.c (require_data): Use free, not xfree.
10343
9130f83e
MS
103442011-02-27 Michael Snyder <msnyder@vmware.com>
10345
4b812f4e
MS
10346 * server.c (handle_query): Discard unused value.
10347
9130f83e
MS
10348 * hostio.c (require_data): Free malloc memory before returning
10349 error.
10350
69d37113
MS
103512011-02-26 Michael Snyder <msnyder@vmware.com>
10352
10353 * linux-low.c (list_threads): Call closedir for dirent.
10354
35f5825a
MS
103552011-02-27 Michael Snyder <msnyder@vmware.com>
10356
2a589cef
MS
10357 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10358 a case statement falls through.
10359
0adea5f7
MS
10360 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10361
35f5825a
MS
10362 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10363 in comparison.
10364
238f1c74
MS
103652011-02-26 Michael Snyder <msnyder@vmware.com>
10366
10367 * utils.c (decimal2str): Eliminate dead code and dead param.
10368 (pulongest): Drop dead param from call to decimal2str.
10369 (plongest): Ditto.
10370
633ff500
JB
103712011-02-24 Joel Brobecker <brobecker@adacore.com>
10372
10373 Revert the following patch (not approved yet):
10374 2011-02-21 Hui Zhu <teawater@gmail.com>
10375 * tracepoint.c (tp_printf): New function.
10376 (eval_agent_expr): Handle gdb_agent_op_printf.
10377
f9c6ff72
HZ
103782011-02-21 Hui Zhu <teawater@gmail.com>
10379
10380 * tracepoint.c (tp_printf): New function.
10381 (eval_agent_expr): Handle gdb_agent_op_printf.
10382
94d5e490
TT
103832011-02-18 Tom Tromey <tromey@redhat.com>
10384
10385 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10386 (tracepoint.o): Likewise.
10387 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10388 (gdb_agent_op_names): Likewise.
10389
c7f96d2b
TT
103902011-02-18 Tom Tromey <tromey@redhat.com>
10391
10392 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10393 gdb_agent_op_rot>: New constants.
10394 (gdb_agent_op_names): Add pick and roll.
10395 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10396 cases.
10397
0feedb2c
JK
103982011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10399
10400 * aclocal.m4: Regenerated with aclocal-1.11.1.
10401
b3b9301e
PA
104022011-02-14 Pedro Alves <pedro@codesourcery.com>
10403
10404 * server.c (handle_qxfer_traceframe_info): New.
10405 (qxfer_packets): Register "traceframe-info".
10406 (handle_query): Report support for qXfer:traceframe-info:read+.
10407 * tracepoint.c (match_blocktype): New.
10408 (traceframe_find_block_type): Rename to ...
10409 (traceframe_walk_blocks): ... this. Add callback filter argument,
10410 and use it.
10411 (traceframe_find_block_type): New, reimplemented on top of
10412 traceframe_walk_blocks.
10413 (build_traceframe_info_xml): New.
10414 (traceframe_read_info): New.
10415 * server.h (traceframe_read_info): Declare.
10416
4f3e6fb7
YQ
104172011-02-11 Yao Qi <yao@codesourcery.com>
10418
10419 * configure.ac: Call AC_PROG_RANLIB.
10420 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10421 * configure: Regenerate.
10422
764880b7
PA
104232011-02-07 Pedro Alves <pedro@codesourcery.com>
10424
10425 * server.c (gdb_read_memory): Change return semantics to allow
10426 partial transfers.
10427 (handle_search_memory_1): Adjust.
10428 (process_serial_event) <'m' packet>: Handle partial transfers.
10429 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10430
1c79eb8a
PA
104312011-01-28 Pedro Alves <pedro@codesourcery.com>
10432
10433 * regcache.c (init_register_cache): Initialize
10434 regcache->register_status.
10435 (free_register_cache): Release regcache->register_status.
10436 (regcache_cpy): Copy register_status.
10437 (registers_to_string): Print 'x's for unavailable registers.
10438 (supply_register): Mark the register's status valid or
10439 unavailable, depending on whether a buffer was passed in or not.
10440 (supply_register_zeroed): New.
10441 (supply_regblock): Mark the registers' status valid or
10442 unavailable, depending on whether a buffer was passed in or not.
10443 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10444 (struct regcache): New `register_status' field.
10445 (supply_register_zeroed): Declare.
10446 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10447 supply_register_zeroed, rather than passing a NULL buffer to
10448 supply_register.
10449 * tracepoint.c (fetch_traceframe_registers): Update comment.
10450
85724a0e
PA
104512011-01-28 Pedro Alves <pedro@codesourcery.com>
10452
10453 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10454 buffer explicit.
10455
d08aafef
PA
104562011-01-25 Pedro Alves <pedro@codesourcery.com>
10457
10458 * server.h (decode_xfer_write): Change prototype.
10459 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10460 and don't extract the annex here.
10461 * server.c (decode_xfer_read): Remove `annex' parameter,
10462 and don't extract the annex here.
10463 (decode_xfer): New.
10464 (struct qxfer): New.
10465 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10466 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10467 (handle_qxfer_statictrace): New functions, abstracted out from
10468 handle_query, and made to use the struct qxfer interface.
10469 (handle_threads_qxfer_proper): Rename to ...
10470 (handle_qxfer_threads_proper): ... this.
10471 (handle_threads_qxfer): Rename to ...
10472 (handle_qxfer_threads): ... this. Adjust.
10473 (qxfer_packets): New array.
10474 (handle_qxfer): New function.
10475 (handle_query): Use handle_qxfer.
10476
493e2a69
MS
104772011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10478
10479 * gdbreplay.c: Shorten lines of >= 80 columns.
10480 * linux-low.c: Ditto.
10481 * linux-ppc-low.c: Ditto.
10482 * linux-s390-low.c: Ditto.
10483 * linux-sparc-low.c: Ditto.
10484 * linux-x86-low.c: Ditto.
10485 * linux-xtensa-low.c: Ditto.
10486 * mem-break.c: Ditto.
10487 * nto-low.c: Ditto.
10488 * regcache.h: Ditto.
10489 * remote-utils.c: Ditto.
10490 * server.c: Ditto.
10491 * server.h: Ditto.
10492 * thread-db.c: Ditto.
10493 * tracepoint.c: Ditto.
10494 * utils.c: Ditto.
10495 * win32-low.h: Ditto.
10496
44944448
JB
104972011-01-05 Joel Brobecker <brobecker@adacore.com>
10498
10499 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10500 update.
10501
71ce852c
JB
105022011-01-01 Joel Brobecker <brobecker@adacore.com>
10503
10504 * server.c (gdbserver_version): Update copyright year in version
10505 output.
10506 * gdbreplay.c (gdbreplay_version): Ditto.
10507
eb826dc6
MF
105082010-12-29 Jie Zhang <jie.zhang@analog.com>
10509
10510 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10511 * linux-bfin-low.c: New file.
10512 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10513 PT_DATA_ADDR for BFIN targets.
10514 * Makefile.in (SFILES): Add linux-bfin-low.c.
10515 (clean): Remove reg-bfin.c.
10516 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10517 * README: Mention supported Blackfin targets.
10518
39ab222a
MF
105192010-12-23 Mike Frysinger <vapier@gentoo.org>
10520
10521 * .gitignore: New file.
10522
a1f2ce7d
MF
105232010-11-16 Mike Frysinger <vapier@gentoo.org>
10524
10525 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10526
f474844c
JZ
105272010-10-22 Jie Zhang <jie@codesourcery.com>
10528
10529 * Makefile.in: Add FLAGS_TO_PASS variable.
10530 (install): Remove dependency of install-only and recursively
10531 invoke make for install-only.
10532
f1048712
DE
105332010-10-04 Doug Evans <dje@google.com>
10534
10535 * Makefile.in (uninstall): Use $(DESTDIR).
10536
b53a1623
PA
105372010-09-24 Pedro Alves <pedro@codesourcery.com>
10538
e6ee044d
PA
10539 PR gdb/11842
10540
b53a1623
PA
10541 * linux-x86-low.c (compat_siginfo_from_siginfo)
10542 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10543 si_code is < 0. Check for si_code == SI_TIMER before checking for
10544 si_code < 0.
10545
fa1bd1e4
JB
105462010-09-13 Joel Brobecker <brobecker@adacore.com>
10547
10548 * lynx-i386-low.c: New file.
10549 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10550
47fac8f8
JB
105512010-09-13 Joel Brobecker <brobecker@adacore.com>
10552
10553 * lynx-low.c (ptrace_request_to_str): Remove handling for
10554 request values that have been removed in LynxOS 5.x.
10555
1adfc54d
JB
105562010-09-13 Joel Brobecker <brobecker@adacore.com>
10557
10558 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10559 <ptrace.h>
10560
c2a66c29
NS
105612010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10562
10563 * configure.ac: Add --enable-inprocess-agent option.
10564 * configure: Rebuilt.
10565
32fcada3
YQ
105662010-09-06 Yao Qi <yao@codesourcery.com>
10567
10568 * linux-low.c (linux_kill): Remove unused variable.
10569 (linux_stabilize_threads): Likewise.
10570 * server.c (start_inferior): Likewise.
10571 (queue_stop_reply_callback): Likewise.
10572 * tracepoint.c (do_action_at_tracepoint): Likewise.
10573
0cccb683
YQ
105742010-09-06 Yao Qi <yao@codesourcery.com>
10575
10576 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10577 on return.
10578
423ec54c
JK
105792010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10580
10581 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10582
12ac6819
PA
105832010-09-06 Pedro Alves <pedro@codesourcery.com>
10584
10585 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10586 "$(IPA_DEPFILES)".
10587
8ed54b31
JB
105882010-09-01 Joel Brobecker <brobecker@adacore.com>
10589
10590 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10591 gdbserver/lynx-ppc-low.c: New files.
10592 * Makefile.in (lynx_low_h): New variable.
10593 (lynx-low.o, lynx-ppc-low.o): New rules.
10594 * configure.ac: On LynxOS, link with -lnetinet.
10595 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10596 * configure: regenerate.
10597
bb0116a4
JB
105982010-09-01 Joel Brobecker <brobecker@adacore.com>
10599
10600 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10601 * configure.ac: Add check for vasprintf and vsnprintf.
10602 * configure, config.in: Regenerate.
10603 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10604
a778ab81 106052010-09-01 Joel Brobecker <brobecker@adacore.com>
10606
10607 * gdbreplay.c: Move include of alloca.h up, next to include of
10608 malloc.h.
10609 * server.h: Add include of malloc.h.
10610 * mem-break.c: Remove include of malloc.h.
10611 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10612
8b034a19 106132010-09-01 Joel Brobecker <brobecker@adacore.com>
10614
10615 * Makefile.in (memmem.o): Build with -Wno-error.
10616
106172010-09-01 Joel Brobecker <brobecker@adacore.com>
10618
10619 * utils.c (xsnprintf): Make non-static.
10620 * server.h: Add xsnprintf declaration.
10621 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10622 replace calls to snprintf by calls to xsnprintf throughout.
10623
106242010-09-01 Joel Brobecker <brobecker@adacore.com>
10625
10626 * configure.ac: Add configure check for alloca.
10627 * configure, config.in: Regenerate.
10628 * server.h: Include alloca.h if it exists.
10629 * gdbreplay.c: Include alloca.h if it exists.
10630
1a981360
PA
106312010-08-28 Pedro Alves <pedro@codesourcery.com>
10632
10633 * linux-low.c (__SIGRTMIN): Define if not already defined.
10634 (linux_create_inferior): Check for __ANDROID__ rather than
10635 __SIGRTMIN.
10636 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10637 are already deferred.
10638 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10639 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10640 stopped and already has a pending signal to report.
10641 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10642 a pending signal to report or is moving out of a jump pad.
10643 (linux_init_signals): Check for __ANDROID__ rather than
10644 __SIGRTMIN.
10645
b4d51a55
PA
106462010-08-28 Pedro Alves <pedro@codesourcery.com>
10647
10648 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10649 debug_threads check. Avoid a linear search when not doing debug
10650 output.
10651
ec48365d
PA
106522010-08-27 Pedro Alves <pedro@codesourcery.com>
10653
10654 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10655 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10656 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10657 (process_event): Change local fd's type to gdb_fildes_t.
10658 (create_file_handler): Adjust prototype.
10659 (delete_file_handler): Adjust prototype.
10660 (handle_file_event): Adjust prototype. Use pfildes.
10661 (create_file_event): Adjsut prototype.
10662 * remote-utils.c (remote_desc, listen_desc): Change type to
10663 gdb_fildes_t.
10664 * server.h: New gdb_fildes_t typedef.
10665 [USE_WIN32API]: Include winsock2.h.
10666 (delete_file_handler, add_file_handler): Adjust prototypes.
10667 (pfildes): Declare.
10668 * utils.c (pfildes): New.
10669
854d88f0
PA
106702010-08-27 Pedro Alves <pedro@codesourcery.com>
10671
10672 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10673 * configure: Regenerate.
10674
0146f85b
PA
106752010-08-27 Pedro Alves <pedro@codesourcery.com>
10676
10677 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10678 (linux_done_accessing_memory): ... this.
10679 (linux_target_ops): Adjust.
10680 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10681 * nto-low.c (nto_target_ops): Adjust comment.
10682 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10683 * spu-low.c (spu_target_ops): Adjust comment.
10684 * target.h (target_ops): Rename unprepare_to_access_memory field
10685 to done_accessing_memory.
10686 (unprepare_to_access_memory): Rename to ...
10687 (done_accessing_memory): ... this.
10688
90d74c30
PA
106892010-08-26 Pedro Alves <pedro@codesourcery.com>
10690
10691 * linux-low.c (linux_prepare_to_access_memory): New.
10692 (linux_unprepare_to_access_memory): New.
10693 (linux_target_ops): Install them.
10694 * server.c (read_memory): Rename to ...
10695 (gdb_read_memory): ... this. Use
10696 prepare_to_access_memory/prepare_to_access_memory.
10697 (write_memory): Rename to ...
10698 (gdb_write_memory): ... this. Use
10699 prepare_to_access_memory/prepare_to_access_memory.
10700 (handle_search_memory_1): Adjust.
10701 (process_serial_event): Adjust.
10702 * target.h (struct target_ops): New fields
10703 prepare_to_access_memory and unprepare_to_access_memory.
10704 (prepare_to_access_memory, unprepare_to_access_memory): New.
10705 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10706 prepare_to_access_memory/prepare_to_access_memory.
10707 * nto-low.c (nto_target_ops): Adjust.
10708 * spu-low.c (spu_target_ops): Adjust.
10709 * win32-low.c (win32_target_ops): Adjust.
10710
fd467969
PA
107112010-08-26 Pedro Alves <pedro@codesourcery.com>
10712
10713 * Makefile.in (WARN_CFLAGS): Get it from configure.
10714 (WERROR_CFLAGS): New.
10715 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10716 * configure.ac: Introduce --enable-werror, which adds -Werror to
10717 the compiler command line. Enabled by default. Disable with
10718 --disable-werror. Add -Wdeclaration-after-statement
10719 Wpointer-arith and -Wformat-nonliteral to warning flags.
10720 * configure: Regenerate.
10721
331e2f5f
PA
107222010-08-26 Pedro Alves <pedro@codesourcery.com>
10723
10724 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10725
e581f2b4
PA
107262010-08-26 Pedro Alves <pedro@codesourcery.com>
10727
10728 * gdbreplay.c (remote_error): New.
10729 (gdbchar): New.
10730 (expect): Use gdbchar. Check for error reading from GDB.
10731 Clarify sync error output.
10732 (play): Check for errors writing to GDB.
10733 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10734 * remote-utils.c (getpkt): Check for errors writing to the remote
10735 descriptor.
10736
3c11dd79
PA
107372010-08-25 Pedro Alves <pedro@codesourcery.com>
10738
10739 * linux-low.c (linux_wait_1): Move non-debugging code out of
10740 `debug_threads' control.
10741
d20a8ad9
PA
107422010-08-25 Pedro Alves <pedro@codesourcery.com>
10743
10744 * linux-low.c (linux_wait_1): Don't set last_status here.
10745 * server.c (push_event, queue_stop_reply_callback): Assert we're
10746 not pushing a TARGET_WAITKIND_IGNORE event.
10747 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10748 (myresume, handle_target_event): Set the thread's last_resume_kind
10749 and last_status from the target returned status.
10750
964e4306
PA
107512010-08-25 Pedro Alves <pedro@codesourcery.com>
10752
10753 PR threads/10729
10754
10755 * linux-x86-low.c (update_debug_registers_callback): New.
10756 (i386_dr_low_set_addr): Use it.
10757 (i386_dr_low_get_addr): New.
10758 (i386_dr_low_set_control): Use update_debug_registers_callback.
10759 (i386_dr_low_get_control): New.
10760 (i386_dr_low_get_status): Adjust.
10761 * linux-low.c (linux_stop_lwp): New.
10762 * linux-low.h (linux_stop_lwp): Declare.
10763
10764 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10765 argument instead of a i386_debug_reg_state.
10766 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10767 a i386_debug_reg_state.
10768 (i386_insert_aligned_watchpoint): Adjust.
10769 (i386_remove_aligned_watchpoint): Adjust.
10770 (i386_low_stopped_data_address): Read the debug registers from the
10771 inferior instead of from the mirrors.
10772 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10773 (i386_dr_low_get_addr): Declare.
10774 (i386_dr_low_get_control): Declare.
10775 (i386_dr_low_get_status): Change prototype.
10776
10777 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10778 (i386_dr_low_get_addr): New.
10779 (i386_dr_low_get_control): New.
10780 (i386_dr_low_get_status): Adjust prototype. Return
10781 dr_status_mirror.
10782 (i386_initial_stuff): Clear dr_status_mirror and
10783 dr_control_mirror.
10784 (i386_get_thread_context): Adjust.
10785 (i386_set_thread_context): Adjust.
10786 (i386_thread_added): Adjust.
10787
5f21a75b
PA
107882010-08-24 Pedro Alves <pedro@codesourcery.com>
10789
10790 * linux-low.h (linux_thread_area): Delete declaration.
10791
3e4c1235
TS
107922010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10793
10794 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10795 after its termination.
10796
1971b033
PA
107972010-08-09 Pedro Alves <pedro@codesourcery.com>
10798
10799 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10800 (gdb_wants_all_stopped): Delete.
10801 (linux_wait_1): Don't call them.
10802 * server.c (handle_v_cont): Tag all threads as want-stopped.
10803 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10804 stopped as "client-wants-stopped".
10805
310444ac
PA
108062010-07-31 Pedro Alves <pedro@codesourcery.com>
10807
10808 * Makefile.in (signals_h): New.
10809 (server_h): Depend on it.
10810 (server.o): Don't depend on $(signals_def).
10811 (signals.o): Depend on $(signals_def).
10812
a19cae16
JK
108132010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10814
10815 * Makefile.in (signals_def): New.
10816 (server_h): Append include/gdb/signals.h and signals_def.
10817 (server.o): Append signals_def.
10818
30d50328
JK
108192010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10820
10821 * server.c (handle_target_event): Use target_signal_to_host for
10822 resume_info.sig initialization.
10823 * target.h (struct thread_resume) <sig>: New comment.
10824
5c3216e2
OS
108252010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10826
c6f46ca0
OS
10827 * server.c (handle_query): strcpy() the returned string from paddress()
10828 instead of sprintf().
5c3216e2
OS
10829 * utils.c (paddress): Return phex_nz().
10830
6bd31874
JB
108312010-07-07 Joel Brobecker <brobecker@adacore.com>
10832
10833 * server.c (handle_v_cont): Call mourn_inferior if process
10834 just exited.
10835 (myresume): Likewise.
10836
0fb4aa4b
PA
108372010-07-01 Pedro Alves <pedro@codesourcery.com>
10838
10839 Static tracepoints, and integration with UST.
10840
10841 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10842 * mem-break.c (uninsert_all_breakpoints)
10843 (reinsert_all_breakpoints): New.
10844 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10845 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10846 (gdb_agent_ust_loaded, helper_thread_id)
10847 (gdb_agent_helper_thread_id): New macros.
10848 (struct ipa_sym_addresses): Add addr_ust_loaded,
10849 addr_helper_thread_id, addr_cmd_buf.
10850 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10851 (in_process_agent_loaded_ust): New.
10852 (write_e_ust_not_loaded): New.
10853 (maybe_write_ipa_ust_not_loaded): New.
10854 (struct collect_static_trace_data_action): New.
10855 (enum tracepoint_type) <static_tracepoint>: New.
10856 (struct tracepoint) <handle>: Mention static tracepoints.
10857 (struct static_tracepoint_ctx): New.
10858 (CMD_BUF_SIZE): New.
10859 (add_tracepoint_action): Handle static tracepoint actions.
10860 (unprobe_marker_at): New.
10861 (clear_installed_tracepoints): Handle static tracepoints.
10862 (cmd_qtdp): Handle static tracepoints.
10863 (probe_marker_at): New.
10864 (cmd_qtstart): Handle static tracepoints.
10865 (response_tracepoint): Handle static tracepoints.
10866 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10867 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10868 (get_context_regcache): Handle static tracepoints.
10869 (do_action_at_tracepoint): Handle static tracepoint actions.
10870 (traceframe_find_block_type): Handle static trace data blocks.
10871 (traceframe_read_sdata): New.
10872 (download_tracepoints): Download static tracepoint actions.
10873 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10874 (GDB_PROBE_NAME): New.
10875 (ust_ops): New.
10876 (GET_UST_SYM): New.
10877 (USTF): New.
10878 (dlsym_ust): New.
10879 (ust_marker_to_static_tracepoint): New.
10880 (gdb_probe): New.
10881 (collect_ust_data_at_tracepoint): New.
10882 (gdb_ust_probe): New.
10883 (UNIX_PATH_MAX, SOCK_DIR): New.
10884 (gdb_ust_connect_sync_socket): New.
10885 (resume_thread, stop_thread): New.
10886 (run_inferior_command): New.
10887 (init_named_socket): New.
10888 (gdb_ust_socket_init): New.
10889 (cstr_to_hexstr): New.
10890 (next_st): New.
10891 (first_marker, next_marker): New.
10892 (response_ust_marker): New.
10893 (cmd_qtfstm, cmd_qtsstm): New.
10894 (unprobe_marker_at, probe_marker_at): New.
10895 (cmd_qtstmat, gdb_ust_thread): New.
10896 (gdb_ust_init): New.
10897 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10898 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10899 (ST_REGENTRY): New.
10900 (x86_64_st_collect_regmap): New.
10901 (X86_64_NUM_ST_COLLECT_GREGS): New.
10902 (AMD64_RIP_REGNUM): New.
10903 (supply_static_tracepoint_registers): New.
10904 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10905 (ST_REGENTRY): New.
10906 (i386_st_collect_regmap): New.
10907 (i386_NUM_ST_COLLECT_GREGS): New.
10908 (supply_static_tracepoint_registers): New.
10909 * server.c (handle_query): Handle qXfer:statictrace:read.
10910 <qSupported>: Report support for StaticTracepoints, and
10911 qXfer:statictrace:read features.
10912 * server.h (traceframe_read_sdata)
10913 (supply_static_tracepoint_registers): Declare.
10914 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10915 (unpack_varlen_hex): Include in IPA build.
10916 * Makefile.in (ustlibs, ustinc): New.
10917 (IPA_OBJS): Add remote-utils-ipa.o.
10918 ($(IPA_LIB)): Link -ldl and -lpthread.
10919 (UST_CFLAGS): New.
10920 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10921 * config.in, configure: Regenerate.
10922
9e4344e5
PA
109232010-06-20 Ian Lance Taylor <iant@google.com>
10924 Pedro Alves <pedro@codesourcery.com>
10925
10926 * linux-x86-low.c (always_true): Delete.
10927 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10928 trying to fool the compiler with always_true.
10929
c6beb2cb
PA
109302010-06-20 Pedro Alves <pedro@codesourcery.com>
10931
10932 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10933 conditions in gdbserver.
10934
d2ed6730
UW
109352010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10936
10937 * spu-low.c (spu_read_memory): Wrap around local store limit.
10938 (spu_write_memory): Likewise.
10939
4e29fb54
PA
109402010-06-15 Pedro Alves <pedro@codesourcery.com>
10941
10942 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10943 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10944 LONGEST uses.
10945 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10946 uses.
10947 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10948 uses with LONGEST uses.
10949
6a271cae
PA
109502010-06-14 Stan Shebs <stan@codesourcery.com>
10951 Pedro Alves <pedro@codesourcery.com>
10952
10953 Bytecode compiler.
10954
10955 * linux-x86-low.c: Include limits.h.
10956 (add_insns): New.
10957 (always_true): New.
10958 (EMIT_ASM): New.
10959 (EMIT_ASM32): New.
10960 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10961 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10962 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10963 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10964 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10965 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10966 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10967 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10968 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10969 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10970 (amd64_emit_void_call_2): New.
10971 (amd64_emit_ops): New.
10972 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10973 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10974 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10975 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10976 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10977 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10978 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10979 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10980 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10981 (i386_emit_stack_adjust, i386_emit_int_call_1)
10982 (i386_emit_void_call_2): New.
10983 (i386_emit_ops): New.
10984 (x86_emit_ops): New.
10985 (the_low_target): Install x86_emit_ops.
10986 * server.h (struct emit_ops): New.
10987 (get_raw_reg_func_addr): Declare.
10988 (current_insn_ptr, emit_error): Declare.
10989 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10990 (set_trace_state_variable_value): New defines.
10991 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10992 addr_get_trace_state_variable_value and
10993 addr_set_trace_state_variable_value.
10994 (symbol_list): New fields for get_raw_reg,
10995 get_trace_state_variable_value and set_trace_state_variable_value.
10996 (condfn): New typedef.
10997 (struct tracepoint): New field `compiled_cond'.
10998 (do_action_at_tracepoint): Clear compiled_cond.
10999 (get_trace_state_variable_value, set_trace_state_variable_value):
11000 Export in the IPA.
11001 (condition_true_at_tracepoint): If there's a compiled condition,
11002 run that.
11003 (current_insn_ptr, emit_error): New globals.
11004 (struct bytecode_address): New.
11005 (get_raw_reg_func_addr): New.
11006 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11007 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11008 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11009 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11010 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11011 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11012 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11013 (compile_tracepoint_condition, compile_bytecodes): New.
11014 * target.h (emit_ops): Forward declare.
11015 (struct target_ops): New field emit_ops.
11016 (target_emit_ops): New.
11017 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11018 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11019 * linux-low.c (linux_emit_ops): New.
11020 (linux_target_ops): Install it.
11021 * linux-low.h (struct linux_target_ops): New field emit_ops.
11022
92b72907
UW
110232010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11024
11025 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11026 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11027
fa593d66
PA
110282010-06-01 Pedro Alves <pedro@codesourcery.com>
11029 Stan Shebs <stan@codesourcery.com>
11030
11031 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11032 (all): Depend on $(extra_libraries).
11033 (install-only): Install the IPA.
11034 (IPA_OBJS, IPA_LIB): New.
11035 (clean): Remove the IPA lib.
11036 (IPAGENT_CFLAGS): New.
11037 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11038 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11039 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11040 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11041 * configure.ac: Check for atomic builtins support in the compiler.
11042 (IPA_DEPFILES, extra_libraries): Define.
11043 * configure.srv (ipa_obj): Add description.
11044 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11045 (i[34567]86-*-linux*): Set ipa_obj.
11046 (x86_64-*-linux*): Set ipa_obj.
11047 * linux-low.c (stabilizing_threads): New.
11048 (supports_fast_tracepoints): New.
11049 (linux_detach): Stabilize threads before detaching.
11050 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11051 the lwp is either not stabilizing, or is moving out of a jump pad.
11052 (linux_fast_tracepoint_collecting): New.
11053 (maybe_move_out_of_jump_pad): New.
11054 (enqueue_one_deferred_signal): New.
11055 (dequeue_one_deferred_signal): New.
11056 (linux_wait_for_event_1): If moving out of a jump pad, defer
11057 pending signals to later.
11058 (linux_stabilize_threads): New.
11059 (linux_wait_1): Check if threads need moving out of jump pads, and
11060 do it if so.
11061 (stuck_in_jump_pad_callback): New.
11062 (move_out_of_jump_pad_callback): New.
11063 (lwp_running): New.
11064 (linux_resume_one_lwp): Handle moving out of jump pads.
11065 (linux_set_resume_request): Dequeue deferred signals.
11066 (need_step_over_p): Also step over fast tracepoint jumps.
11067 (start_step_over): Also uninsert fast tracepoint jumps.
11068 (finish_step_over): Also reinsert fast tracepoint jumps.
11069 (linux_install_fast_tracepoint_jump): New.
11070 (linux_target_ops): Install linux_stabilize_threads and
11071 linux_install_fast_tracepoint_jump_pad.
11072 * linux-low.h (linux_target_ops) <get_thread_area,
11073 install_fast_tracepoint_jump_pad>: New fields.
11074 (struct lwp_info) <collecting_fast_tracepoint,
11075 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11076 (linux_get_thread_area): Declare.
11077 * linux-x86-low.c (jump_insn): New.
11078 (x86_get_thread_area): New.
11079 (append_insns): New.
11080 (push_opcode): New.
11081 (amd64_install_fast_tracepoint_jump_pad): New.
11082 (i386_install_fast_tracepoint_jump_pad): New.
11083 (x86_install_fast_tracepoint_jump_pad): New.
11084 (the_low_target): Install x86_get_thread_area and
11085 x86_install_fast_tracepoint_jump_pad.
11086 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11087 (struct fast_tracepoint_jump): New.
11088 (fast_tracepoint_jump_insn): New.
11089 (fast_tracepoint_jump_shadow): New.
11090 (find_fast_tracepoint_jump_at): New.
11091 (fast_tracepoint_jump_here): New.
11092 (delete_fast_tracepoint_jump): New.
11093 (set_fast_tracepoint_jump): New.
11094 (uninsert_fast_tracepoint_jumps_at): New.
11095 (reinsert_fast_tracepoint_jumps_at): New.
11096 (set_breakpoint_at): Use write_inferior_memory.
11097 (uninsert_raw_breakpoint): Use write_inferior_memory.
11098 (check_mem_read): Mask out fast tracepoint jumps.
11099 (check_mem_write): Mask out fast tracepoint jumps.
11100 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11101 (set_fast_tracepoint_jump): Declare.
11102 (delete_fast_tracepoint_jump)
11103 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11104 (reinsert_fast_tracepoint_jumps_at): Declare.
11105 * regcache.c: Don't compile many functions when building the
11106 in-process agent library.
11107 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11108 the register buffer in the heap.
11109 (free_register_cache): If the register buffer isn't owned by the
11110 regcache, don't free it.
11111 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11112 pre-existing register caches.
11113 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11114 type.
11115 (convert_ascii_to_int): : Constify `from' parameter type.
11116 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11117 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11118 the needed buffer in-place.
11119 (relocate_instruction): New.
11120 * server.c (handle_query) <qSymbols>: If the target supports
11121 tracepoints, give it a chance of looking up symbols. Report
11122 support for fast tracepoints.
11123 (handle_status): Stabilize threads.
11124 (process_serial_event): Adjust.
11125 * server.h (struct fast_tracepoint_jump): Forward declare.
11126 (struct process_info) <fast_tracepoint_jumps>: New field.
11127 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11128 (decode_X_packet, decode_M_packet): Adjust.
11129 (relocate_instruction): Declare.
11130 (in_process_agent_loaded): Declare.
11131 (tracepoint_look_up_symbols): Declare.
11132 (struct fast_tpoint_collect_status): Declare.
11133 (fast_tracepoint_collecting): Declare.
11134 (force_unlock_trace_buffer): Declare.
11135 (handle_tracepoint_bkpts): Declare.
11136 (initialize_low_tracepoint)
11137 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11138 * target.h (struct target_ops) <stabilize_threads,
11139 install_fast_tracepoint_jump_pad>: New fields.
11140 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11141 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11142 [HAVE_STDINT_H]: Include stdint.h.
11143 (trace_debug_1): Rename to ...
11144 (trace_vdebug): ... this.
11145 (trace_debug): Rename to ...
11146 (trace_debug_1): ... this. Add `level' parameter.
11147 (trace_debug): New.
11148 (ATTR_USED, ATTR_NOINLINE): New.
11149 (IP_AGENT_EXPORT): New.
11150 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11151 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11152 (about_to_request_buffer_space, trace_buffer_is_full)
11153 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11154 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11155 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11156 (traceframe_write_count, traceframes_created)
11157 (trace_state_variables)
11158 New renaming defines.
11159 (struct ipa_sym_addresses): New.
11160 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11161 (symbol_list): New.
11162 (ipa_sym_addrs): New.
11163 (all_tracepoint_symbols_looked_up): New.
11164 (in_process_agent_loaded): New.
11165 (write_e_ipa_not_loaded): New.
11166 (maybe_write_ipa_not_loaded): New.
11167 (tracepoint_look_up_symbols): New.
11168 (debug_threads) [IN_PROCESS_AGENT]: New.
11169 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11170 (UNKNOWN_SIDE_EFFECTS): New.
11171 (stop_tracing): New.
11172 (flush_trace_buffer): New.
11173 (stop_tracing_bkpt): New.
11174 (flush_trace_buffer_bkpt): New.
11175 (read_inferior_integer): New.
11176 (read_inferior_uinteger): New.
11177 (read_inferior_data_pointer): New.
11178 (write_inferior_data_pointer): New.
11179 (write_inferior_integer): New.
11180 (write_inferior_uinteger): New.
11181 (struct collect_static_trace_data_action): Delete.
11182 (enum tracepoint_type): New.
11183 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11184 <actions_str, step_actions, step_actions_str>: Only include in
11185 GDBserver.
fa593d66
PA
11186 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11187 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11188 (tracepoints): Use IP_AGENT_EXPORT.
11189 (last_tracepoint): Don't include in the IPA.
11190 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11191 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11192 (alloced_trace_state_variables): New.
11193 (trace_state_variables): Use IP_AGENT_EXPORT.
11194 (traceframe_t): Delete unused variable.
11195 (circular_trace_buffer): Don't include in the IPA.
11196 (trace_buffer_start): Delete.
11197 (struct trace_buffer_control): New.
11198 (trace_buffer_free): Delete.
11199 (struct ipa_trace_buffer_control): New.
11200 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11201 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11202 New.
11203 (trace_buffer_ctrl): New.
11204 (TRACE_BUFFER_CTRL_CURR): New.
11205 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11206 Reimplement as macros.
11207 (trace_buffer_wrap): Delete.
11208 (traceframe_write_count, traceframe_read_count)
11209 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11210 (struct tracepoint_hit_ctx) <type>: New field.
11211 (struct fast_tracepoint_ctx): New.
11212 (memory_barrier): New.
11213 (cmpxchg): New.
11214 (record_tracepoint_error): Update atomically in the IPA.
11215 (clear_inferior_trace_buffer): New.
11216 (about_to_request_buffer_space): New.
11217 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11218 updating the same buffer.
11219 (add_tracepoint): Default the tracepoint's type to trap
11220 tracepoint, and orig_size to -1.
11221 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11222 internal variables.
11223 (create_trace_state_variable): New parameter `gdb'. Handle it.
11224 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11225 (cmd_qtdp): Handle fast tracepoints.
11226 (cmd_qtdv): Adjust.
11227 (max_jump_pad_size): New.
11228 (gdb_jump_pad_head): New.
11229 (get_jump_space_head): New.
11230 (claim_jump_space): New.
11231 (sort_tracepoints): New.
11232 (MAX_JUMP_SIZE): New.
11233 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11234 IPA.
11235 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11236 support. Upload fast traceframes, and delete internal IPA
11237 breakpoints.
11238 (stop_tracing_handler): New.
11239 (flush_trace_buffer_handler): New.
11240 (cmd_qtstop): Upload fast tracepoints.
11241 (response_tracepoint): Handle fast tracepoints.
11242 (tracepoint_finished_step): Upload fast traceframes. Set the
11243 tracepoint hit context's tracepoint type.
11244 (handle_tracepoint_bkpts): New.
11245 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11246 type. Add comment about fast tracepoints.
11247 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11248 non-existing action_str field.
11249 (get_context_regcache): Handle fast tracepoints.
11250 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11251 to the regcache.
11252 (fast_tracepoint_from_jump_pad_address): New.
11253 (fast_tracepoint_from_ipa_tpoint_address): New.
11254 (collecting_t): New.
11255 (force_unlock_trace_buffer): New.
11256 (fast_tracepoint_collecting): New.
11257 (collecting): New.
11258 (gdb_collect): New.
11259 (write_inferior_data_ptr): New.
11260 (target_tp_heap): New.
11261 (target_malloc): New.
11262 (download_agent_expr): New.
11263 (UALIGN): New.
11264 (download_tracepoints): New.
11265 (download_trace_state_variables): New.
11266 (upload_fast_traceframes): New.
11267 (IPA_FIRST_TRACEFRAME): New.
11268 (IPA_NEXT_TRACEFRAME_1): New.
11269 (IPA_NEXT_TRACEFRAME): New.
11270 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11271 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11272 (gdb_jump_pad_buffer_end): New.
11273 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11274 (initialize_tracepoint): Adjust.
11275 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11276 buffer. Initialize the low module.
11277 * utils.c (PREFIX, TOOLNAME): New.
11278 (malloc_failure): Use PREFIX.
11279 (error): In the IPA, an error causes an exit.
11280 (fatal, warning): Use PREFIX.
11281 (internal_error): Use TOOLNAME.
11282 (NUMCELLS): Increase to 10.
11283 * configure, config.in: Regenerate.
11284
d149dd1d
PA
112852010-06-01 Pedro Alves <pedro@codesourcery.com>
11286
11287 * server.c (handle_query) <qSupported>: Do two passes over the
11288 qSupported string to avoid nesting strtok.
11289
f6528abd
JK
112902010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11291
11292 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11293 (CDEPS): New.
11294 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11295 -Wl,--dynamic-list.
11296 * configure: Regenerate.
11297 * proc-service.list: New.
11298
ca2a87a0
JK
112992010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11300
11301 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11302 New comment.
11303
363a6e9f
OS
113042010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11305
11306 * gdbreplay.c (remote_open): Check error return from socket() call by
11307 its equality to -1 not by it being negative.
11308 * remote-utils.c (remote_open): Likewise.
11309
d23b6cb1
PA
113102010-05-23 Pedro Alves <pedro@codesourcery.com>
11311
11312 * config.h: Regenerate.
11313
28d3cf85
MK
113142010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11315
11316 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11317 doesn't provide PTRACE_GET_THREAD_AREA.
11318
fea36a59
MK
113192010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11320
11321 * linux-m68k-low.c: Include <asm/ptrace.h>
11322 (ps_get_thread_area): Implement.
11323
24b066ba
DE
113242010-05-03 Doug Evans <dje@google.com>
11325
11326 * event-loop.c (struct callback_event): New struct.
11327 (callback_list): New global.
11328 (append_callback_event, delete_callback_event): New functions.
11329 (process_callback): New function.
11330 (start_event_loop): Call it.
11331 * remote-utils.c (NOT_SCHEDULED): Define.
11332 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11333 moved out of readchar.
11334 (readchar): Rewrite. Call reschedule before returning.
11335 (reset_readchar): New function.
11336 (remote_close): Call it.
11337 (process_remaining, reschedule): New functions.
11338 * server.h (callback_handler_func): New typedef.
11339 (append_callback_event, delete_callback_event): Declare.
11340
9836d6ea
PA
113412010-05-03 Pedro Alves <pedro@codesourcery.com>
11342
11343 * proc-service.c (ps_pglobal_lookup): Use
11344 thread_db_look_up_one_symbol.
11345 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11346 parameter. Use it instead of all_symbols_looked_up.
11347 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11348 field.
11349 (all_symbols_looked_up): Don't declare.
11350 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11351 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11352 field.
11353 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11354 Set all_symbols_looked_up here.
11355 (thread_db_look_up_one_symbol): New.
11356 (thread_db_get_tls_address): Adjust.
11357 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11358 thread_db object on the heap, and tentatively set it in the
11359 process structure.
11360 (thread_db_init): Don't set all_symbols_looked_up here.
11361 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11362
7984d532
PA
113632010-05-03 Pedro Alves <pedro@codesourcery.com>
11364
11365 * linux-low.c (linux_kill, linux_detach): Adjust.
11366 (status_pending_p_callback): Remove redundant statement. Check
11367 for !TARGET_WAITIKIND_IGNORE, instead of
11368 TARGET_WAITKIND_STOPPED.
11369 (handle_tracepoints): Make sure LWP is locked. Adjust.
11370 (linux_wait_for_event_1): Adjust.
11371 (linux_cancel_breakpoints): New.
11372 (unsuspend_one_lwp): New.
11373 (unsuspend_all_lwps): New.
11374 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11375 (send_sigstop_callback): Change return type to int, add new
11376 `except' parameter and handle it.
11377 (suspend_and_send_sigstop_callback): New.
11378 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11379 pass them down. If SUSPEND, also increment the lwp's suspend
11380 count.
11381 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11382 (need_step_over_p): Don't consider suspended LWPs.
11383 (start_step_over): Adjust.
11384 (proceed_one_lwp): Change return type to int, add new `except'
11385 parameter and handle it.
11386 (unsuspend_and_proceed_one_lwp): New.
11387 (proceed_all_lwps): Use find_inferior instead of
11388 for_each_inferior.
11389 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11390 also decrement the suspend count of LWPs. Pass `except' down,
11391 instead of hacking its suspend count.
11392 (linux_pause_all): Add `freeze' parameter. Adjust.
11393 (linux_unpause_all): New.
11394 (linux_target_ops): Install linux_unpause_all.
11395 * server.c (handle_status): Adjust.
11396 * target.h (struct target_ops): New fields `unpause_all' and
11397 `cancel_breakpoints'. Add new parameter to `pause_all'.
11398 (pause_all): Add new `freeze' parameter.
11399 (unpause_all): New.
11400 (cancel_breakpoints): New.
11401 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11402 cancel breakpoints.
11403 (cmd_qtstart): Pause threads.
11404 (stop_tracing): Pause threads, and cancel breakpoints.
11405 * win32-low.c (win32_target_ops): Adjust.
11406
e471f25b
PA
114072010-05-03 Pedro Alves <pedro@codesourcery.com>
11408
11409 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11410 the inferior right away from here...
11411 (linux_wait_1): ... to here, and adjust to check the thread's
11412 last_resume_kind instead of the lwp's step or stop_expected flags.
11413
1915ef4f
PA
114142010-05-02 Pedro Alves <pedro@codesourcery.com>
11415
11416 * README: Use consistent `GDB' and `GDBserver' spellings.
11417
f9e39928
PA
114182010-05-02 Pedro Alves <pedro@codesourcery.com>
11419
11420 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11421 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11422 (linux_detach_one_lwp): Assume the lwp is stopped.
11423 (any_thread_of): Delete.
11424 (linux_detach): Stop all lwps here. Don't blindly delete all
11425 breakpoints.
11426 (delete_lwp_callback): New.
11427 (linux_mourn): Delete all lwps of the process that is gone.
11428 (linux_wait_1): Don't delete the last lwp of the process here.
11429 * mem-break.h (mark_breakpoints_out): Declare.
11430 * mem-break.c (mark_breakpoints_out): New.
11431 (free_all_breakpoints): Use it.
11432 * server.c (handle_target_event): If the process is gone, mark
11433 breakpoints out.
11434 * thread-db.c (struct thread_db) <create_bp>: New field.
11435 (thread_db_enable_reporting): Fix prototype. Store a thread event
11436 breakpoint reference in the thread_db struct.
11437 (thread_db_load_search): Clear the thread_db object.
11438 (try_thread_db_load_1): Ditto.
11439 (switch_to_process): New.
11440 (disable_thread_event_reporting): Use it.
11441 (remove_thread_event_breakpoints): New.
11442 (thread_db_detach, thread_db_mourn): Use it.
11443
1e7fc18c
PA
114442010-05-01 Pedro Alves <pedro@codesourcery.com>
11445
11446 * linux-low.c (linux_enable_event_reporting): New.
11447 (linux_wait_for_event_1, handle_extended_wait): Use it.
11448
02fc4de7
PA
114492010-04-30 Pedro Alves <pedro@codesourcery.com>
11450
11451 * linux-low.c (linux_kill_one_lwp, linux_kill)
11452 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11453 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11454 SIGSTOP even if the LWP is stopped.
11455 (send_sigstop_callback): New.
11456 (stop_all_lwps): Use send_sigstop_callback instead.
11457 (linux_resume_one_thread): Adjust.
11458 (proceed_one_lwp): Still proceed an LWP that the client has
11459 requested to stop, if we haven't reported it as stopped yet. Make
11460 sure that LWPs the client want stopped, have a pending SIGSTOP.
11461
bc3b5632
DE
114622010-04-26 Doug Evans <dje@google.com>
11463
ae1ada35
DE
11464 * server.c (handle_general_set): Make static.
11465
bc3b5632
DE
11466 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11467 Print received char after testing for error/eof instead of before.
11468 (input_interrupt): Tweak comment.
11469
65730243
DE
114702010-04-23 Doug Evans <dje@google.com>
11471
11472 * server.c (start_inferior): Print inferior argv if --debug.
11473
a8ae7dc0
AR
114742010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11475
11476 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11477 * nto-x86-low.c: Include server.h
11478
1c07cc19
PM
114792010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11480
11481 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11482 be consistent with other sources of this directory.
11483 (init_registers_amd64): Correct name of source file of this function
11484 in the comment.
11485
e0a61e09
PM
114862010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11487
11488 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11489 64-bit executables.
11490
54709339
PM
114912010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11492
11493 * win32-i386-low.c: Add 64-bit support.
11494 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11495 (init_registers_amd64): Declare.
11496 (mappings): Add 64-bit version of array.
11497 (init_windows_x86): New function.
11498 (the_low_target): Change init_arch field to init_windows_x86.
11499
e8f0053d
PM
115002010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11501
11502 * win32-low.c: Adapt to support also 64-bit architecture.
11503 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11504 (get_image_name): Use SIZE_T type for local variable `done'.
11505 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11506 (toolhelp_get_dll_name): Idem.
11507 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11508 Use uintptr_t typecast to avoid warning.
11509 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11510 (handle_exception): Use phex_nz to avoid warning.
11511 (win32_wait): Remove unused local variable `process'.
11512
c481e77e
PM
115132010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11514
11515 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11516 `amd64-avx.o'.
11517
12ea4b69
PM
115182010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11519
11520 * configure.ac: Use `ws2_32' library for srv_mingw.
11521 * configure: Regenerate.
11522 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11523 * remote-utils.c: Likewise.
11524
f6d1620c
L
115252010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11526
11527 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11528 if __x86_64__ is defined.
11529
8e642873
PM
115302010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11531
11532 * configure: Regenerate.
11533
711e434b
PM
115342010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11535
11536 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11537 * target.h (target_ops): New get_tib_address field.
11538 * win32-low.h (win32_thread_info): Add thread_local_base field.
11539 * win32-low.c (child_add_thread): Add tlb argument.
11540 Set thread_local_base field to TLB.
11541 (get_child_debug_event): Adapt to child_add_thread change.
11542 (win32_get_tib_address): New function.
11543 (win32_target_ops): Set get_tib_address field to
11544 win32_get_tib_address.
11545 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11546
505106cd
PA
115472010-04-12 Pedro Alves <pedro@codesourcery.com>
11548
505106cd
PA
11549 * linux-low.c (linux_mourn): Also remove the process.
11550 * server.c (handle_target_event): Don't remove the process here.
11551 * nto-low.c (nto_mourn): New.
11552 (nto_target_ops): Install it.
11553 * spu-low.c (spu_mourn): New.
11554 (spu_target_ops): Install it.
11555 * win32-low.c (win32_mourn): New.
11556 (win32_target_ops): Install it.
11557
e8470a06
PA
115582010-04-12 Pedro Alves <pedro@codesourcery.com>
11559
11560 * server.h (buffer_xml_printf): Remove redundant `;'.
11561
45ba0d02
PA
115622010-04-12 Pedro Alves <pedro@codesourcery.com>
11563
11564 * regcache.c (set_register_cache): Invalidate regcaches before
11565 changing the register cache layout.
11566 (regcache_invalidate_one): Allow a NULL regcache.
11567 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11568 regcaches before changing the register cache layout or the target
11569 regsets.
11570
59e04013
L
115712010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11572
11573 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11574 variable warning on Linux/x86-64.
11575
8336d594
PA
115762010-04-11 Pedro Alves <pedro@codesourcery.com>
11577
11578 GDBserver disconnected tracing support.
11579
11580 * linux-low.c (linux_remove_process): Delete.
11581 (add_lwp): Don't set last_resume_kind here.
11582 (linux_kill): Use `mourn'.
11583 (linux_detach): Use `thread_db_detach', and `mourn'.
11584 (linux_mourn): New.
11585 (linux_attach_lwp_1): Adjust comment.
11586 (linux_attach): last_resume_kind moved the thread_info; adjust.
11587 (status_pending_p_callback): Adjust.
11588 (linux_wait_for_event_1): Adjust.
11589 (count_events_callback, select_singlestep_lwp_callback)
11590 (select_event_lwp_callback, cancel_breakpoints_callback)
11591 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11592 (proceed_one_lwp): Adjust.
11593 (linux_async): Add debug output.
11594 (linux_thread_stopped): New.
11595 (linux_pause_all): New.
11596 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11597 linux_pause_all.
11598 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11599 (thread_db_free): Delete declaration.
11600 (thread_db_detach, thread_db_mourn): Declare.
11601 * thread-db.c (thread_db_init): Use thread_db_mourn.
11602 (thread_db_free): Delete, split in two.
11603 (disable_thread_event_reporting): New.
11604 (thread_db_detach): New.
11605 (thread_db_mourn): New.
11606
11607 * server.h (struct thread_info) <last_resume_kind>: New field.
11608 <attached>: Add comment.
11609 <gdb_detached>: New field.
11610 (handler_func): Change return type to int.
11611 (handle_serial_event, handle_target_event): Ditto.
11612 (gdb_connected): Declare.
11613 (tracing): Delete.
11614 (disconnected_tracing): Declare.
11615 (stop_tracing): Declare.
11616
11617 * server.c (handle_query) <qSupported>: Report support for
11618 disconnected tracing.
11619 (queue_stop_reply_callback): Account for running threads.
11620 (gdb_wants_thread_stopped): New.
11621 (gdb_wants_all_threads_stopped): New.
11622 (gdb_reattached_process): New.
11623 (handle_status): Clear the `gdb_detached' flag of all processes.
11624 In all-stop, stop all threads.
11625 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11626 (process_serial_event): If the remote connection breaks, or if an
11627 exit was forced with "monitor exit", force an event loop exit.
11628 Handle disconnected tracing on detach.
11629 (handle_serial_event): Adjust.
11630 (handle_target_event): If GDB isn't connected, forward events back
11631 to the inferior, unless the last process exited, in which case,
11632 exit gdbserver. Adjust interface.
11633
11634 * remote-utils.c (remote_open): Don't block in accept. Instead
11635 register an event loop source on the listen socket file
11636 descriptor. Refactor bits into ...
11637 (listen_desc): ... this new global.
11638 (gdb_connected): ... this new function.
11639 (enable_async_notification): ... this new function.
11640 (handle_accept_event): ... this new function.
11641 (remote_close): Clear remote_desc.
11642
11643 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11644
11645 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11646 New fields.
11647 (mourn_inferior): Define.
11648 (target_process_qsupported): Avoid the dangling else problem.
11649 (thread_stopped): Define.
11650 (pause_all): Define.
11651 (target_waitstatus_to_string): Declare.
11652 * target.c (target_waitstatus_to_string): New.
11653
11654 * tracepoint.c (tracing): Make extern.
11655 (disconnected_tracing): New.
11656 (stop_tracing): Make extern. Handle tracing stops due to GDB
11657 disconnecting.
11658 (cmd_qtdisconnected): New.
11659 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11660 (handle_tracepoint_general_set): Handle QTDisconnected.
11661
11662 * event-loop.c (event_handler_func): Change return type to int.
11663 (process_event): Bail out if the event handler wants the event
11664 loop to stop.
11665 (handle_file_event): Ditto.
11666 (start_event_loop): Bail out if the event handler wants the event
11667 loop to stop.
11668
11669 * nto-low.c (nto_target_ops): Adjust.
11670 * spu-low.c (spu_wait): Don't remove the process here.
11671 (spu_target_ops): Adjust.
11672 * win32-low.c (win32_wait): Don't remove the process here.
11673 (win32_target_ops): Adjust.
11674
5d267c4c
PA
116752010-04-11 Pedro Alves <pedro@codesourcery.com>
11676
11677 * regcache.c (realloc_register_cache): Invalidate inferior's
11678 regcache before recreating it.
11679
623ccd72
PA
116802010-04-09 Pedro Alves <pedro@codesourcery.com>
11681
11682 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11683
219f2f23
PA
116842010-04-09 Stan Shebs <stan@codesourcery.com>
11685 Pedro Alves <pedro@codesourcery.com>
11686
11687 * server.h (LONGEST): New.
11688 (struct thread_info) <while_stepping>: New field.
11689 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11690 Declare.
11691 (initialize_tracepoint, handle_tracepoint_general_set)
11692 (handle_tracepoint_query, tracepoint_finished_step)
11693 (tracepoint_was_hit, release_while_stepping_state_list):
11694 (current_traceframe): Declare.
11695 * server.c (handle_general_set): Handle tracepoint packets.
11696 (read_memory): New.
11697 (write_memory): New.
11698 (handle_search_memory_1): Use read_memory.
11699 (handle_query): Report support for conditional tracepoints, trace
11700 state variables, and tracepoint sources. Handle tracepoint
11701 queries.
11702 (main): Initialize the tracepoints module.
11703 (process_serial_event): Handle traceframe reads/writes.
11704
11705 * linux-low.c (handle_tracepoints): New.
11706 (linux_wait_1): Call it.
11707 (linux_resume_one_lwp): Handle while-stepping.
11708 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11709 (linux_target_ops): Install them.
11710 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11711 New field.
11712 * linux-x86-low.c (x86_supports_tracepoints): New.
11713 (the_low_target). Install it.
11714
11715 * mem-break.h (delete_breakpoint): Declare.
11716 * mem-break.c (delete_breakpoint): Make external.
11717
11718 * target.h (struct target_ops): Add `supports_tracepoints',
11719 `read_pc', and `write_pc' fields.
11720 (target_supports_tracepoints): Define.
11721 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11722 (phex_nz): New.
11723
11724 * regcache.h (struct regcache) <registers_owned>: New field.
11725 (init_register_cache, regcache_cpy): Declare.
11726 (regcache_read_pc, regcache_write_pc): Declare.
11727 (register_cache_size): Declare.
11728 (supply_regblock): Declare.
11729 * regcache.c (init_register_cache): New.
11730 (new_register_cache): Use it.
11731 (regcache_cpy): New.
11732 (register_cache_size): New.
11733 (supply_regblock): New.
11734 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11735
219f2f23
PA
11736 * tracepoint.c: New.
11737
11738 * Makefile.in (OBS): Add tracepoint.o.
11739 (tracepoint.o): New rule.
11740
3a13a53b
L
117412010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11742
11743 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11744 (i386-mmx.o): New.
11745 (i386-mmx.c): Likewise.
11746 (i386-mmx-linux.o): Likewise.
11747 (i386-mmx-linux.c): Likewise.
11748
11749 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11750 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11751 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11752 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11753
11754 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11755 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11756 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11757
1570b33e
L
117582010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11759
11760 * Makefile.in (clean): Updated.
11761 (i386-avx.o): New.
11762 (i386-avx.c): Likewise.
11763 (i386-avx-linux.o): Likewise.
11764 (i386-avx-linux.c): Likewise.
11765 (amd64-avx.o): Likewise.
11766 (amd64-avx.c): Likewise.
11767 (amd64-avx-linux.o): Likewise.
11768 (amd64-avx-linux.c): Likewise.
11769
11770 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11771 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11772 (srv_amd64_regobj): Add amd64-avx.o.
11773 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11774 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11775 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11776 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11777 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11778 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11779 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11780
11781 * i387-fp.c: Include "i386-xstate.h".
11782 (i387_xsave): New.
11783 (i387_cache_to_xsave): Likewise.
11784 (i387_xsave_to_cache): Likewise.
11785 (x86_xcr0): Likewise.
11786
11787 * i387-fp.h (i387_cache_to_xsave): Likewise.
11788 (i387_xsave_to_cache): Likewise.
11789 (x86_xcr0): Likewise.
11790
11791 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11792 * linux-crisv32-low.c (target_regsets): Likewise.
11793 * linux-m68k-low.c (target_regsets): Likewise.
11794 * linux-mips-low.c (target_regsets): Likewise.
11795 * linux-ppc-low.c (target_regsets): Likewise.
11796 * linux-s390-low.c (target_regsets): Likewise.
11797 * linux-sh-low.c (target_regsets): Likewise.
11798 * linux-sparc-low.c (target_regsets): Likewise.
11799 * linux-xtensa-low.c (target_regsets): Likewise.
11800
11801 * linux-low.c: Include <sys/uio.h>.
11802 (regsets_fetch_inferior_registers): Support nt_type.
11803 (regsets_store_inferior_registers): Likewise.
11804 (linux_process_qsupported): New.
11805 (linux_target_ops): Add linux_process_qsupported.
11806
11807 * linux-low.h (regset_info): Add nt_type.
11808 (linux_target_ops): Add process_qsupported.
11809
11810 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11811 and <sys/uio.h>.
11812 (init_registers_i386_avx_linux): New.
11813 (init_registers_amd64_avx_linux): Likewise.
11814 (xmltarget_i386_linux_no_xml): Likewise.
11815 (xmltarget_amd64_linux_no_xml): Likewise.
11816 (PTRACE_GETREGSET): Likewise.
11817 (PTRACE_SETREGSET): Likewise.
11818 (x86_fill_xstateregset): Likewise.
11819 (x86_store_xstateregset): Likewise.
11820 (use_xml): Likewise.
11821 (x86_linux_update_xmltarget): Likewise.
11822 (x86_linux_process_qsupported): Likewise.
11823 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11824 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11825 init_registers_i386_linux here. Call
11826 x86_linux_update_xmltarget.
11827 (the_low_target): Add x86_linux_process_qsupported.
11828
11829 * server.c (handle_query): Call target_process_qsupported.
11830
11831 * target.h (target_ops): Add process_qsupported.
11832 (target_process_qsupported): New.
11833
fc7238bb
PA
118342010-04-03 Pedro Alves <pedro@codesourcery.com>
11835
11836 * inferiors.c (add_thread): Set last_status kind to
11837 TARGET_WAITKIND_IGNORE.
11838 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11839 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11840 (linux_wait_1): Move `thread' local definition to block that uses
11841 it. Don't NULL initialize `event_child'.
11842 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11843 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11844 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11845
bdabb078
PA
118462010-04-01 Pedro Alves <pedro@codesourcery.com>
11847
11848 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11849 an extended waitstatus, or by a watchpoint.
11850 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11851 thread was stepping or has been stopped by a watchpoint.
11852
d3bbe7a0
PA
118532010-04-01 Pedro Alves <pedro@codesourcery.com>
11854
11855 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11856 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11857 of another, then delete the previous, and validate all
11858 breakpoints.
11859 (validate_inserted_breakpoint): New.
11860 (delete_disabled_breakpoints): New.
11861 (validate_breakpoints): New.
11862 (check_mem_read): Validate breakpoints before trusting their
11863 shadow. Delete disabled breakpoints.
11864 (check_mem_write): Validate breakpoints before trusting they
11865 should be inserted. Delete disabled breakpoints.
11866 * mem-break.h (validate_breakpoints):
11867 * server.c (handle_query): Validate breakpoints when we see a
11868 qSymbol query.
11869
8b07ae33
PA
118702010-04-01 Pedro Alves <pedro@codesourcery.com>
11871
11872 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11873 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11874 if we could tell there's a GDB breakpoint at stop_pc.
11875 (need_step_over_p): Don't do a step over if we find a GDB
11876 breakpoint at the resume PC.
11877
11878 * mem-break.c (struct raw_breakpoint): New.
11879 (enum bkpt_type): New type `gdb_breakpoint'.
11880 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11881 fields. New field `raw'.
11882 (find_raw_breakpoint_at): New.
11883 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11884 breakpoint instead.
11885 (set_breakpoint_at): Adjust.
11886 (delete_raw_breakpoint): New.
11887 (release_breakpoint): New.
11888 (delete_breakpoint): Rename to...
11889 (delete_breakpoint_1): ... this. Add proc parameter. Use
11890 release_breakpoint. Return ENOENT.
11891 (delete_breakpoint): Reimplement.
11892 (find_breakpoint_at): Delete.
11893 (find_gdb_breakpoint_at): New.
11894 (delete_breakpoint_at): Delete.
11895 (set_gdb_breakpoint_at): New.
11896 (delete_gdb_breakpoint_at): New.
11897 (gdb_breakpoint_here): New.
11898 (set_reinsert_breakpoint): Use release_breakpoint.
11899 (uninsert_breakpoint): Rename to ...
11900 (uninsert_raw_breakpoint): ... this.
11901 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11902 (reinsert_raw_breakpoint): Change parameter type to
11903 raw_breakpoint.
11904 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11905 instead.
11906 (check_breakpoints): Adjust. Use release_breakpoint.
11907 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11908 (breakpoint_inserted_here): Ditto.
11909 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11910 Don't trust the breakpoint's shadow if it is not inserted.
11911 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11912 (delete_all_breakpoints): Adjust.
11913 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11914 use delete_breakpoint_1.
11915
11916 * mem-break.h (breakpoints_supported): Delete declaration.
11917 (set_gdb_breakpoint_at): Declare.
11918 (gdb_breakpoint_here): Declare.
11919 (delete_breakpoint_at): Delete.
11920 (delete_gdb_breakpoint_at): Declare.
11921
11922 * server.h (struct raw_breakpoint): Forward declare.
11923 (struct process_info): New field `raw_breakpoints'.
11924
11925 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11926 breakpoints.
11927
6bf5e0ba
PA
119282010-03-24 Pedro Alves <pedro@codesourcery.com>
11929
11930 * linux-low.c (status_pending_p_callback): Fix comment.
11931 (linux_wait_for_event_1): Move most of the internal breakpoint
11932 handling from here...
11933 (linux_wait_1): ... to here.
11934 (count_events_callback): New.
11935 (select_singlestep_lwp_callback): New.
11936 (select_event_lwp_callback): New.
11937 (cancel_breakpoints_callback): New.
11938 (select_event_lwp): New.
11939 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11940 priority to all LWPs that have had events that should be reported
11941 to the client. Cancel breakpoints when about to reporting the
11942 event to the client, not while stopping lwps. No longer cancel
11943 finished single-steps here.
11944 (cancel_finished_single_step): Delete.
11945 (cancel_finished_single_steps): Delete.
11946
414a389f
PA
119472010-03-24 Pedro Alves <pedro@codesourcery.com>
11948
11949 * mem-break.c (enum bkpt_type): New.
11950 (struct breakpoint): New field `type'.
11951 (set_breakpoint_at): Change return type to struct breakpoint
11952 pointer. Set type to `other_breakpoint' by default.
11953 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11954 in the breakpoint list.
11955 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11956 (reinsert_breakpoint): Rename to ...
11957 (reinsert_raw_breakpoint): ... this.
11958 (reinsert_breakpoints_at): Adjust.
11959 * mem-break.h (struct breakpoint): Declare.
11960 (set_breakpoint_at): Change return type to struct breakpoint
11961 pointer.
11962
2280c721
PA
119632010-03-24 Pedro Alves <pedro@codesourcery.com>
11964
11965 * server.c (handle_query): Assign, not compare.
11966
d50171e4
PA
119672010-03-24 Pedro Alves <pedro@codesourcery.com>
11968
11969 Teach linux gdbserver to step-over-breakpoints.
11970
11971 * linux-low.c (can_hardware_single_step): New.
11972 (supports_breakpoints): New.
11973 (handle_extended_wait): If stopping threads, read the stop pc of
11974 the new cloned LWP.
11975 (get_pc): New.
11976 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11977 low target doesn't support retrieving the PC.
11978 (add_lwp): Set last_resume_kind to resume_continue.
11979 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11980 (linux_attach): Don't clear stop_expected. Set the lwp's
11981 last_resume_kind to resume_stop.
11982 (linux_detach_one_lwp): Don't check for removed breakpoints.
11983 (check_removed_breakpoint): Delete.
11984 (status_pending_p): Rename to ...
11985 (status_pending_p_callback): ... this. Don't check for removed
11986 breakpoints. Don't consider threads that are stopped from GDB's
11987 perspective.
11988 (linux_wait_for_lwp): Always read the stop_pc here.
11989 (cancel_breakpoint): New.
11990 (step_over_bkpt): New global.
11991 (linux_wait_for_event_1): Implement stepping over breakpoints.
11992 (gdb_wants_lwp_stopped): New.
11993 (gdb_wants_all_stopped): New.
11994 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11995 single-step traps here. Store the thread's last reported target
11996 wait status.
11997 (send_sigstop): Don't clear stop_expected. Always set it,
11998 instead.
11999 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12000 (cancel_finished_single_step): New.
12001 (cancel_finished_single_steps): New.
12002 (wait_for_sigstop): Don't cancel finished single-step traps here.
12003 (linux_resume_one_lwp): Don't check for removed breakpoints.
12004 Don't set `step' on non-hardware step archs.
12005 (linux_set_resume_request): Ignore resume_stop requests if already
12006 stopping or stopped. Set the lwp's last_resume_kind.
12007 (resume_status_pending_p): Don't check for removed breakpoints.
12008 (need_step_over_p): New.
12009 (start_step_over): New.
12010 (finish_step_over): New.
12011 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12012 requests. Clear the thread's last reported target waitstatus.
12013 Don't use the `suspended' flag. Don't consider pending breakpoints.
12014 (linux_resume): Start a step-over if necessary.
12015 (proceed_one_lwp): New.
12016 (proceed_all_lwps): New.
12017 (unstop_all_lwps): New.
12018 * linux-low.h (struct lwp_info): Rewrite comment for the
12019 `suspended' flag. Add the `stop_pc' field. Delete the
12020 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12021 Add `'last_resume_kind' and `need_step_over' fields.
12022 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12023 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12024 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12025 (set_raw_breakpoint_at): New.
12026 (set_breakpoint_at): Rewrite to use it.
12027 (reinsert_breakpoint_handler): Delete.
12028 (set_reinsert_breakpoint): New.
12029 (reinsert_breakpoint_by_bp): Delete.
12030 (delete_reinsert_breakpoints): New.
12031 (uninsert_breakpoint): Rewrite.
12032 (uninsert_breakpoints_at): New.
12033 (reinsert_breakpoint): Rewrite.
12034 (reinsert_breakpoints_at): New.
12035 (check_breakpoints): Rewrite.
12036 (breakpoint_here): New.
12037 (breakpoint_inserted_here): New.
12038 (check_mem_read): Adjust.
12039 * mem-break.h (breakpoints_supported, breakpoint_here)
12040 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12041 (reinsert_breakpoint_by_bp): Delete declaration.
12042 (delete_reinsert_breakpoints): Declare.
12043 (reinsert_breakpoint): Delete declaration.
12044 (reinsert_breakpoints_at): Declare.
12045 (uninsert_breakpoint): Delete declaration.
12046 (uninsert_breakpoints_at): Declare.
12047 (check_breakpoints): Adjust prototype.
12048 * server.h: Adjust include order.
12049 (struct thread_info): Declare here. Add a `last_status' field.
12050
30ba68cb
MS
120512010-03-23 Michael Snyder <msnyder@vmware.com>
12052
12053 * server.c (crc32): New function.
12054 (handle_query): Add handling for 'qCRC:' request.
12055
b9a881c2
PA
120562010-03-23 Pedro Alves <pedro@codesourcery.com>
12057
12058 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12059 lwp had been stopped by a watchpoint.
12060
e92d13d5
PA
120612010-03-16 Pedro Alves <pedro@codesourcery.com>
12062
12063 * server.h (internal_error): Declare.
12064 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12065 * utils.c (internal_error): New function.
12066
64daa791
AS
120672010-03-15 Andreas Schwab <schwab@redhat.com>
12068
12069 * configure.srv: Fix typo setting srv_regobj.
12070
f52cd8cd
PA
120712010-03-15 Pedro Alves <pedro@codesourcery.com>
12072
12073 * linux-low.c (fetch_register): Avoid passing a non string literal
12074 format to `error'.
12075 (usr_store_inferior_registers): Ditto.
12076
93ae6fdc
PA
120772010-03-14 Pedro Alves <pedro@codesourcery.com>
12078
12079 * linux-low.c (linux_write_memory): Bail out early if peeking
12080 memory failed.
12081
c3adc08c
PA
120822010-03-14 Pedro Alves <pedro@codesourcery.com>
12083
12084 * linux-low.h (struct lwp_info): New fields
12085 `stopped_by_watchpoint' and `stopped_data_address'.
12086 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12087 here, and cache them in the lwp object.
12088 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12089 directly.
12090 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12091 field.
12092 (linux_stopped_by_watchpoint): Rewrite.
12093 (linux_stopped_data_address): Rewrite.
12094
bce522a2
PA
120952010-03-06 Simo Melenius <simo.melenius@iki.fi>
12096
12097 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12098 switching the current inferior, not before.
12099
90884b2b
L
121002010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12101
12102 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12103 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12104 i386-linux.c and amd64-linux.c.
12105 (reg-i386.o): Removed.
12106 (reg-i386.c): Likewise.
12107 (reg-i386-linux.o): Likewise.
12108 (reg-i386-linux.c): Likewise.
12109 (reg-x86-64.o): Likewise.
12110 (reg-x86-64.c): Likewise.
12111 (reg-x86-64-linux.o): Likewise.
12112 (reg-x86-64-linux.c): Likewise.
12113 (i386.o): New.
12114 (i386.c): Likewise.
12115 (i386-linux.o): Likewise.
12116 (i386-linux.c): Likewise.
12117 (amd64.o): Likewise.
12118 (amd64.c): Likewise.
12119 (amd64-linux.o): Likewise.
12120 (amd64-linux.c): Likewise.
12121
12122 * configure.srv (srv_i386_regobj): New.
12123 (srv_i386_linux_regobj): Likewise.
12124 (srv_amd64_regobj): Likewise.
12125 (srv_amd64_linux_regobj): Likewise.
12126 (srv_i386_32bit_xmlfiles): Likewise.
12127 (srv_i386_64bit_xmlfiles): Likewise.
12128 (srv_i386_xmlfiles): Likewise.
12129 (srv_amd64_xmlfiles): Likewise.
12130 (srv_i386_linux_xmlfiles): Likewise.
12131 (srv_amd64_linux_xmlfiles): Likewise.
12132 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12133 srv_xmlfiles to $srv_i386_xmlfiles.
12134 (i[34567]86-*-mingw32ce*): Likewise.
12135 (i[34567]86-*-mingw*): Likewise.
12136 (i[34567]86-*-nto*): Likewise.
12137 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12138 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12139 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12140 (x86_64-*-linux*): Likewise.
12141
12142 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12143 (init_registers_amd64_linux): New.
12144 (x86_arch_setup): Replace init_registers_x86_64_linux with
12145 init_registers_amd64_linux.
12146
193f13e6
MK
121472010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12148
12149 * configure.ac: Check for libdl. If it is not available link against
12150 static libthread_db.
12151 * configure: Regenerate.
12152
85d721b8
PA
121532010-02-22 Pedro Alves <pedro@codesourcery.com>
12154
12155 PR9605
12156
12157 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12158 handing a read watchpoint.
12159 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12160
6076632b
DE
121612010-02-12 Doug Evans <dje@google.com>
12162
12163 * linux-low.c (linux_supports_tracefork_flag): Document.
12164 (linux_look_up_symbols): Add comment.
12165
3327ccf7
L
121662010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12167
12168 * regcache.c (supply_register): Clear regcache if buf is NULL.
12169
0718675c 121702010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12171 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12172
12173 * inferiors.c (find_inferior): Add function documentation.
12174 (unloaded_dll): Handle the case where the unloaded dll has not
12175 been previously registered in the dll list.
12176
177321bd
DJ
121772010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12178
12179 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12180 (thumb2_breakpoint): New.
12181 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12182
2b009048
DJ
121832010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12184
12185 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12186 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12187 breakpoints.
12188
3be029c7
PA
121892010-01-21 Pedro Alves <pedro@codesourcery.com>
12190
12191 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12192
18f5de3b
JK
121932010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12194
12195 * linux-s390-low.c (s390_collect_ptrace_register)
12196 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12197
3743bb4f
DE
121982010-01-21 Doug Evans <dje@google.com>
12199
14ce3065
DE
12200 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12201 (PTRACE_ARG4_TYPE): New macro.
12202 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12203 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12204 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12205 (usr_store_inferior_registers): Ditto.
12206 (linux_read_memory, linux_write_memory): Ditto.
12207 (linux_test_for_tracefork): Ditto.
12208
3743bb4f
DE
12209 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12210 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12211
8b315be5
PA
122122010-01-21 Pedro Alves <pedro@codesourcery.com>
12213
12214 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12215 target.
12216
85492558
PA
122172010-01-21 Pedro Alves <pedro@codesourcery.com>
12218
12219 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12220 prototype to take a regcache. Adjust.
12221
442ea881
PA
122222010-01-20 Pedro Alves <pedro@codesourcery.com>
12223
12224 * regcache.h (struct thread_info): Forward declare.
12225 (struct regcache): New.
12226 (new_register_cache): Adjust prototype.
12227 (get_thread_regcache): Declare.
12228 (free_register_cache): Adjust prototype.
12229 (registers_to_string, registers_from_string): Ditto.
12230 (supply_register, supply_register_by_name, collect_register)
12231 (collect_register_as_string, collect_register_by_name): Ditto.
12232 * regcache.c (struct inferior_regcache_data): Delete.
12233 (get_regcache): Rename to ...
12234 (get_thread_regcache): ... this. Adjust. Switch inferior before
12235 fetching registers.
12236 (regcache_invalidate_one): Adjust.
12237 (regcache_invalidate): Fix prototype.
12238 (new_register_cache): Return the new register cache.
12239 (free_register_cache): Change prototype.
12240 (realloc_register_cache): Adjust.
12241 (registers_to_string): Change prototype to take a regcache. Adjust.
12242 (registers_from_string): Ditto.
12243 (register_data): Ditto.
12244 (supply_register): Ditto.
12245 (supply_register_by_name): Ditto.
12246 (collect_register): Ditto.
12247 (collect_register_as_string): Ditto.
12248 (collect_register_by_name): Ditto.
12249 * server.c (process_serial_event): Adjust.
12250 * linux-low.h (regset_fill_func, regset_store_func): Change
12251 prototype.
12252 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12253 Change prototype.
12254 * linux-low.c (get_stop_pc): Adjust.
12255 (check_removed_breakpoint): Adjust.
12256 (linux_wait_for_event): Adjust.
12257 (linux_resume_one_lwp): Adjust.
12258 (fetch_register): Add regcache parameter. Adjust.
12259 (usr_store_inferior_registers): Ditto.
12260 (regsets_fetch_inferior_registers): Ditto.
12261 (regsets_store_inferior_registers): Ditto.
12262 (linux_fetch_registers, linux_store_registers): Ditto.
12263 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12264 regcache. Adjust.
43aaf8b6
PA
12265 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12266 Ditto.
442ea881
PA
12267 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12268 prototype to take a regcache.
12269 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12270 * remote-utils.c (convert_ascii_to_int, outreg)
12271 (prepare_resume_reply): Change prototype to take a regcache.
12272 Adjust.
12273 * target.h (struct target_ops) <fetch_registers, store_registers>:
12274 Change prototype to take a regcache.
12275 (fetch_inferior_registers, store_inferior_registers): Change
12276 prototype to take a regcache. Adjust.
12277 * proc-service.c (ps_lgetregs): Adjust.
12278 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12279 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12280 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12281 take a regcache. Adjust.
12282 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12283 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12284 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12285 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12286 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12287 (cris_cannot_fetch_register):
12288 (cris_breakpoint_at): Change prototype to take a regcache.
12289 Adjust.
12290 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12291 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12292 to take a regcache. Adjust.
12293 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12294 Adjust.
12295 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12296 take a regcache. Adjust.
12297 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12298 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12299 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12300 * linux-mips-low.c (mips_get_pc):
12301 (mips_set_pc): Change prototype to take a regcache. Adjust.
12302 (mips_reinsert_addr): Adjust.
12303 (mips_collect_register): Change prototype to take a regcache.
12304 Adjust.
12305 (mips_supply_register):
12306 (mips_collect_register_32bit, mips_supply_register_32bit)
12307 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12308 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12309 * linux-ppc-low.c (ppc_supply_ptrace_register)
12310 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12311 (parse_spufs_run): Adjust.
12312 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12313 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12314 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12315 take a regcache. Adjust.
12316 * linux-s390-low.c (s390_collect_ptrace_register)
12317 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12318 (s390_set_pc): Change prototype to take a regcache. Adjust.
12319 (s390_arch_setup): Adjust.
12320 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12321 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12322 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12323 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12324 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12325 regcache. Adjust.
12326 (sparc_breakpoint_at): Adjust.
12327 * linux-xtensa-low.c (xtensa_fill_gregset):
12328 (xtensa_store_gregset):
12329 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12330 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12331 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12332 prototype to take a regcache. Adjust.
12333 * win32-arm-low.c (arm_fetch_inferior_register)
12334 (arm_store_inferior_register): Change prototype to take a
12335 regcache. Adjust.
12336 * win32-i386-low.c (i386_fetch_inferior_register)
12337 (i386_store_inferior_register): Change prototype to take a
12338 regcache. Adjust.
12339 * win32-low.c (child_fetch_inferior_registers)
12340 (child_store_inferior_registers): Change prototype to take a
12341 regcache. Adjust.
12342 (win32_wait): Adjust.
12343 (win32_fetch_inferior_registers): Change prototype to take a
12344 regcache. Adjust.
12345 (win32_store_inferior_registers): Adjust.
12346 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12347 store_inferior_register>: Change prototype to take a regcache.
12348
60c3d7b0
DE
123492010-01-20 Doug Evans <dje@google.com>
12350
12351 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12352 #ifdef.
12353 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12354 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12355
dc146f7c
VP
123562010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12357
12358 * linux-low.c (linux_core_of_thread): New.
12359 (compare_ints, show_process, list_threads): New.
12360 (linux_qxfer_osdata): Report threads and cores.
12361 (linux_target_op): Register linux_core_of_thread.
12362 * remote-utils.c (prepare_resume_reply): Report the core.
12363 (buffer_xml_printf): Support %d specifier.
12364 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12365 New.
12366 (handle_query): Handle qXfer:threads. Announce availability
12367 thereof.
12368 * target.h (struct target_ops): New field core_of_thread.
12369
7803799a
UW
123702010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12371
12372 * Makefile.in (clean): Remove new generated files.
12373 (reg-s390.o, reg-s390.c): Remove rules.
12374 (reg-s390x.o, reg-s390x.c): Likewise.
12375 (s390-linux32.o, s390-linux32.c): Add rules.
12376 (s390-linux64.o, s390-linux64.c): Likewise.
12377 (s390x-linux64.o, s390x-linux64.c): Likewise.
12378 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12379 * linux-s390-low.c: Include <elf.h>.
12380 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12381 (init_registers_s390): Remove prototype.
12382 (init_registers_s390x): Likewise.
12383 (init_registers_s390_linux32): Add prototype.
12384 (init_registers_s390_linux64): Likewise.
12385 (init_registers_s390x_linux64): Likewise.
12386 (s390_num_regs_3264): New define.
12387 (s390_regmap_3264): New global variable.
12388 (s390_cannot_fetch_register): Remove obsolete check.
12389 (s390_cannot_store_register): Likewise.
12390 (s390_collect_ptrace_register): Handle upper/lower register halves.
12391 (s390_supply_ptrace_register): Likewise.
12392 (s390_fill_gregset): Update to register number changes.
12393 (s390_get_hwcap): New routine.
12394 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12395 Install appropriate regmap and register set.
12396
6e7ffa39
JB
123972010-01-01 Joel Brobecker <brobecker@adacore.com>
12398
12399 * server.c (gdbserver_version): Update copyright year to 2010.
12400 * gdbreplay.c (gdbreplay_version): Likewise.
12401
957f3f49
DE
124022009-12-28 Doug Evans <dje@google.com>
12403
12404 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12405 elf/external.h. Include <elf.h> instead but only if necessary.
12406
ca5c370d
PA
124072009-12-28 Pedro Alves <pedro@codesourcery.com>
12408
12409 * linux-low.c (linux_remove_process): Remove `detaching'
12410 parameter. Don't release/detach from thread_db here.
12411 (linux_kill): Release/detach from thread_db here, ...
12412 (linux_detach): ... and here, before actually detaching.
12413 (linux_wait_1): ... and here, when a process exits.
12414 * thread-db.c (any_thread_of): New.
12415 (thread_db_free): Switch the current inferior to a thread of the
12416 passed in process.
12417
4ee62156
DE
124182009-12-21 Doug Evans <dje@google.com>
12419
d90e6a88
DE
12420 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12421
c5f62d5f
DE
12422 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12423 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12424 warning ifndef __NR_tkill. Move setting of errno there too.
12425 Delete unnecessary resetting of errno after syscall.
12426 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12427
10e86dd7
DE
12428 * configure.ac: Check for dladdr.
12429 * config.in: Regenerate.
12430 * configure: Regenerate.
12431 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12432 (try_thread_db_load): Update.
12433
4ee62156
DE
12434 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12435
00f515da
DE
124362009-12-18 Doug Evans <dje@google.com>
12437
e9464885
DE
12438 * event-loop.c: Include unistd.h if it exists.
12439
07d4f67e
DE
12440 * linux-low.c (my_waitpid): Move definition away from being in
12441 between linux_tracefork_child/linux_test_for_tracefork.
12442
00f515da
DE
12443 * gdb_proc_service.h (psaddr_t): Fix type.
12444 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12445 signature to match glibc.
12446
1de1badb
DE
124472009-12-16 Doug Evans <dje@google.com>
12448
12449 * linux-low.c (linux_read_memory): Fix argument to read.
12450
aeeb81d1
PA
124512009-11-26 Pedro Alves <pedro@codesourcery.com>
12452
12453 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12454 events, don't leave current_inferior pointing at null.
12455
10357975
PA
124562009-11-26 Pedro Alves <pedro@codesourcery.com>
12457
12458 * win32-low.c (LOG): Delete.
12459 (OUTMSG): Output to stderr.
12460 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12461 on compile time LOG macro.
12462 (win32_wait): Fix debug output.
12463
cf6e3471
PA
124642009-11-26 Pedro Alves <pedro@codesourcery.com>
12465
12466 * win32-low.c (win32_add_one_solib): If the dll name is
12467 "ntdll.dll", prepend the system directory to the dll path.
12468
0c85e18e
MK
124692009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12470
12471 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12472
9ac544ce 124732009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12474 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12475
12476 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12477 * configure.ac: Check for __mcoldfire__ and set
12478 gdb_cv_m68k_is_coldfire.
12479 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12480 reg-cf.o and reg-m68k.o.
12481 * configure: Regenerated.
12482
fd7dd3e6
PA
124832009-11-16 Pedro Alves <pedro@codesourcery.com>
12484
12485 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12486 Pass it to thread_db_free.
12487 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12488 proper `detaching' argument to linux_remove_process.
12489 * linux-low.h (thread_db_free): Add `detaching' parameter.
12490 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12491 to thread_db_free.
12492 (thread_db_free): Add `detaching' parameter. Only
12493 call td_ta_clear_event if detaching from process.
12494
75aa492e
MK
124952009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12496
12497 * thread-db.c (thread_db_free): Fix typo.
12498
21e1bee4
PP
124992009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12500
12501 PR gdb/10838
12502 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12503
8838b45e
NS
125042009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12505
12506 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12507 with an i686 compiler.
12508 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12509 needed.
12510 * configure: Rebuilt.
12511
8a35fb51
SL
125122009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12513
12514 PR gdb/10783
12515
12516 * server.c (handle_search_memory_1): Correct read_addr initialization
12517 in loop for searching subsequent chunks.
12518
96f15937
PP
125192009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12520
12521 * configure.ac: New --with-libthread-db option.
12522 * thread-db.c: Allow direct dependence on libthread_db.
12523 (thread_db_free): Adjust.
12524 * config.in: Regenerate.
12525 * configure: Likewise.
889bf7c5 12526
5f7d1694
PP
125272009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12528
12529 PR gdb/10757
12530 * thread-db.c (attach_thread): New function.
12531 (maybe_attach_thread): Return success/failure.
12532 (find_new_threads_callback): Adjust.
889bf7c5
PA
12533 (thread_db_find_new_threads): Loop until no new threads.
12534
88e3b899
PA
125352009-10-13 Pedro Alves <pedro@codesourcery.com>
12536
12537 * proc-service.c (ps_lgetregs): Formatting.
12538
cdbfd419
PP
125392009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12540
12541 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12542 * configure.ac: Adjust.
12543 * linux-low.h (struct process_info_private): Move members to struct
12544 thread_db.
12545 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12546 * linux-low.c (linux_remove_process): Adjust.
12547 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12548 * server.c (handle_query): Move code ...
12549 (handle_monitor_command): ... here. New function.
12550 * target.h (struct target_ops): New member.
12551 * thread-db.c (struct thread_db): New.
12552 (libthread_db_search_path): New variable.
12553 (thread_db_create_event, thread_db_enable_reporting)
12554 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12555 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12556 (try_thread_db_load_1, dladdr_to_soname): New functions.
12557 (try_thread_db_load, thread_db_load_search): New functions.
12558 (thread_db_init): Search for libthread_db.
12559 (thread_db_free): New function.
12560 (thread_db_handle_monitor_command): Likewise.
12561 * config.in: Regenerate.
12562 * configure: Regenerate.
889bf7c5 12563
4168d2d6
UW
125642009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12565
12566 * spu-low.c (spu_kill): Wait for inferior to terminate.
12567 Call clear_inferiors.
12568 (spu_detach): Call clear_inferiors.
12569
81ecdfbb
RW
125702009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12571
12572 * aclocal.m4: Regenerate.
12573 * config.in: Likewise.
12574 * configure: Likewise.
12575
0b9ff2c0
UW
125762009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12577
12578 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12579 (parse_spufs_run): New function.
12580 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12581 (ppc_breakpoint_at): Handle SPU breakpoints.
12582
efcbbd14
UW
125832009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12584
12585 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12586 (SPUFS_MAGIC): Define.
12587 (spu_enumerate_spu_ids): New function.
12588 (linux_qxfer_spu): New function.
12589 (linux_target_ops): Install linux_qxfer_spu.
12590
f4d9bade
UW
125912009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12592
12593 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12594 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12595 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12596 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12597 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12598 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12599 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12600 (init_registers_powerpc_cell32l): Add prototype.
12601 (init_registers_powerpc_cell64l): Likewise.
12602 (ppc_arch_setup): Detect Cell/B.E. architecture.
12603
96e946ca
RW
126042009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12605
12606 * Makefile.in (datarootdir): New variable.
12607
58d6951d
DJ
126082009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12609
12610 * linux-low.c (linux_write_memory): Update debugging output.
12611 * Makefile.in (clean): Add new descriptions.
12612 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12613 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12614 * configure.srv: Add new files for arm*-*-linux*.
12615 * linux-arm-low.c: Add new declarations.
12616 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12617 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12618 (HWCAP_VFPv3D16): New.
12619 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12620 instead of __IWMMXT__.
12621 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12622 (arm_arch_setup): New.
12623 (target_regsets): Remove #ifdef. Add VFP regset.
12624 (the_low_target): Use arm_arch_setup.
12625
12b42a12
DJ
126262009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12627
12628 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12629 the main thread again.
12630
ac8c974e
AR
126312009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12632
12633 Adding Neutrino gdbserver.
12634 * configure: Regenerated.
12635 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12636 * configure.srv (i[34567]86-*-nto*): New target.
12637 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12638 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12639 (nto_comctrl) [__QNX__]: New function.
12640 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12641
4424e0c3 126422009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12643
12644 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12645 srv_tgtobj.
12646
912cf4ba
PA
126472009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12648 Pedro Alves <pedro@codesourcery.com>
12649
12650 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12651 don't support CONTEXT_EXTENDED_REGISTERS.
12652 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12653 (the_low_target): Install them.
12654 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12655 failing with ERROR_PIPE_NOT_CONNECTED.
12656
aa5ca48f
DE
126572009-06-30 Doug Evans <dje@google.com>
12658 Pierre Muller <muller@ics.u-strasbg.fr>
12659
12660 Add h/w watchpoint support to x86-linux, win32-i386.
12661 * Makefile.in (SFILES): Add i386-low.c
12662 (i386_low_h): Define.
12663 (i386-low.o): Add dependencies.
12664 (linux-x86-low.o): Add i386-low.h dependency.
12665 (win32-i386-low.o): Ditto.
12666 * i386-low.c: New file.
12667 * i386-low.h: New file.
12668 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12669 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12670 * linux-low.c (linux_add_process): Initialize arch_private.
12671 (linux_remove_process): Free arch_private.
12672 (add_lwp): Initialize arch_private.
12673 (delete_lwp): Free arch_private.
12674 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12675 provided.
12676 * linux-low.h (process_info_private): New member arch_private.
12677 (lwp_info): New member arch_private.
12678 (linux_target_ops): New members new_process, new_thread,
12679 prepare_to_resume.
12680 (ptid_of): New macro.
12681 * linux-x86-low.c: Include stddef.h, i386-low.h.
12682 (arch_process_info): New struct.
12683 (arch_lwp_info): New struct.
12684 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12685 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12686 (i386_dr_low_get_status): New function.
12687 (x86_insert_point, x86_remove_point): New functions.
12688 (x86_stopped_by_watchpoint): New function.
12689 (x86_stopped_data_address): New function.
12690 (x86_linux_new_process, x86_linux_new_thread): New functions.
12691 (x86_linux_prepare_to_resume): New function.
12692 (the_low_target): Add entries for insert_point, remove_point,
12693 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12694 prepare_to_resume.
12695 * server.c (debug_hw_points): New global.
12696 (monitor_show_help): Document set debug-hw-points.
12697 (handle_query): Process "set debug-hw-points".
12698 * server.h (debug_hw_points): Declare.
12699 (paddress): Declare.
12700 * utils.c (NUMCELLS, CELLSIZE): New macros.
12701 (get_sell, xsnprintf, paddress): New functions.
12702 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12703 remove_point, stopped_by_watchpoint, stopped_data_address.
12704 * win32-i386-low.c: Include i386-low.h.
12705 (debug_reg_state): Replaces dr.
12706 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12707 (i386_dr_low_get_status): New function.
12708 (i386_insert_point, i386_remove_point): New functions.
12709 (i386_stopped_by_watchpoint): New function.
12710 (i386_stopped_data_address): New function.
12711 (i386_initial_stuff): Update.
12712 (get_thread_context,set_thread_context,i386_thread_added): Update.
12713 (the_low_target): Add entries for insert_point,
12714 remove_point, stopped_by_watchpoint, stopped_data_address.
12715 * win32-low.c (win32_insert_watchpoint): New function.
12716 (win32_remove_watchpoint): New function.
12717 (win32_stopped_by_watchpoint): New function.
12718 (win32_stopped_data_address): New function.
12719 (win32_target_ops): Add entries for insert_watchpoint,
12720 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12721 * win32-low.h (win32_target_ops): New members insert_point,
12722 remove_point, stopped_by_watchpoint, stopped_data_address.
12723
d993e290
PA
127242009-06-25 Pedro Alves <pedro@codesourcery.com>
12725
12726 * server.c (process_serial_event): Re-return unsupported, not
12727 error, if the type isn't recognized. Re-allow supporting only
12728 insert or remove packets. Also call require_running for
12729 breakpoints. Add missing break statement to default case. Tidy.
12730 * target.h (struct target_ops): Rename insert_watchpoint to
12731 insert_point, and remove_watchpoint to remove_point.
12732
12733 * linux-low.h (struct linux_target_ops): Likewise.
12734 * linux-low.c (linux_insert_watchpoint): Rename to ...
12735 (linux_insert_point): ... this. Adjust.
12736 (linux_remove_watchpoint): Rename to ...
12737 (linux_remove_point): ... this. Adjust.
12738 (linux_target_ops): Adjust.
12739 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12740 (cris_insert_point): ... this.
12741 (cris_remove_watchpoint): Rename to ...
12742 (cris_remove_point): ... this.
12743 (the_low_target): Adjust.
12744
0f54c268
PM
127452009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12746
12747 * server.c (handle_v_kill): Pass signal_pid to
12748 kill_inferior if multi_process is zero.
12749
c6314022
AR
127502009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12751
12752 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12753 * target.h (target_ops): Comment for *_watchpoint to make it clear
12754 the functions can get types '0' and '1'.
12755
4463ce24
AR
127562009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12757
12758 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12759 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12760 * regcache.c (get_regcache): Likewise.
12761 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12762 * win32-low.c (child_fetch_inferior_registers): Remove check for
12763 regno 0.
12764
cf8fd78b
PA
127652009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12766 Pedro Alves <pedro@codesourcery.com>
12767
12768 * target.h (struct target_ops) <supports_multi_process>: New
12769 callback.
12770 (target_supports_multi_process): New.
12771 * server.c (handle_query): Even if GDB reports support, only
12772 enable multi-process if the target also supports it. Report
12773 multi-process support only if the target backend supports it.
12774 * linux-low.c (linux_supports_multi_process): New function.
12775 (linux_target_ops): Install it as target_supports_multi_process
12776 callback.
12777
47c0c975
DE
127782009-05-24 Doug Evans <dje@google.com>
12779
e09875d4
DE
12780 Global renaming of find_thread_pid to find_thread_ptid.
12781 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12782 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12783 All callers updated.
12784
e27d73f6
DE
12785 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12786 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12787 directly.
12788
47c0c975
DE
12789 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12790 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12791 (linux_resume_one_lwp): Ditto.
12792
2acc282a
DE
127932009-05-23 Doug Evans <dje@google.com>
12794
12795 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12796 from struct inferior_list_entry * to struct lwp_info *.
12797 All callers updated.
12798
9f1036c1
DE
127992009-05-13 Doug Evans <dje@google.com>
12800
12801 * linux-x86-low.c: Don't include assert.h.
12802 (x86_siginfo_fixup): Use fatal, not assert.
12803 (x86_arch_setup): Fix comment.
12804
d0722149
DE
128052009-05-12 Doug Evans <dje@google.com>
12806
12807 Biarch support for i386/amd64 gdbserver.
12808 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12809 Add linux-x86-low.c.
12810 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12811 (linux-x86-low.o): Add.
12812 * linux-x86-64-low.c: Delete.
12813 * linux-i386-low.c: Delete.
12814 * linux-x86-low.c: New file.
12815 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12816 linux-x86-low.o.
12817 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12818 linux-x86-low.o.
12819 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12820 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12821 (linux_child_pid_to_exec_file): New function.
12822 (elf_64_header_p, elf_64_file_p): New functions.
12823 (siginfo_fixup): New function.
12824 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12825 give target a chance to convert layout.
12826 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12827 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12828
fdeb2a12
DE
128292009-05-07 Doug Evans <dje@google.com>
12830
12831 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12832 (regsets_store_inferior_registers): Ditto.
12833
a6dbe5df
PA
128342009-05-06 Pedro Alves <pedro@codesourcery.com>
12835
12836 PR server/10048
12837
12838 * linux-low.c (must_set_ptrace_flags): Delete.
12839 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12840 of the global.
12841 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12842 `lwp->must_set_ptrace_flags' instead.
ba42693b 12843 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12844 (linux_wait_1): ... not here.
12845
5091eb23
DE
128462009-04-30 Doug Evans <dje@google.com>
12847
9f767825
DE
12848 * inferiors.c (started_inferior_callback): New function.
12849 (attached_inferior_callback): New function.
12850 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12851 * server.c (print_started_pid, print_attached_pid): New functions.
12852 (detach_or_kill_for_exit): New function.
12853 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12854 * server.h (have_started_inferiors_p): Declare.
12855 (have_attached_inferiors_p): Declare.
12856
5091eb23
DE
12857 * inferiors.c (remove_process): Fix memory leak, free process.
12858 * linux-low.c (linux_remove_process): New function.
12859 (linux_kill): Call it instead of remove_process.
12860 (linux_detach, linux_wait_1): Ditto.
12861
155c8968
PA
128622009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12863
12864 * configure.srv: Add x86 Windows CE target.
12865
7fe519cb
UW
128662009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12867
12868 * inferiors.c (get_thread_process): Make global.
12869 * server.h (get_thread_process): Add prototype.
12870 * thread-db.c (find_one_thread): Use get_thread_process
12871 instead of current_process.
12872 (thread_db_get_tls_address): Do not crash if called when
12873 thread layer is not yet initialized.
12874
5472f405
UW
128752009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12876
12877 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12878 * spu-low.c (current_tid): Rename to ...
12879 (current_ptid): ... this.
12880 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12881 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12882 ptid_get_lwp (current_ptid) instead of current_tid.
12883 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12884 instead of current_tid. Use find_process_pid to verify pid
12885 argument is valid. Pass proper argument to remove_process.
12886 (spu_thread_alive): Compare current_ptid instead of current_tid.
12887 (spu_resume): Likewise.
12888
55ac2b99
PA
128892009-04-02 Pedro Alves <pedro@codesourcery.com>
12890
12891 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12892 variable.
12893
95954743
PA
128942009-04-01 Pedro Alves <pedro@codesourcery.com>
12895
12896 Implement the multiprocess extensions, and add linux multiprocess
12897 support.
12898
12899 * server.h (ULONGEST): Declare.
12900 (struct ptid, ptid_t): New.
12901 (minus_one_ptid, null_ptid): Declare.
12902 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12903 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12904 (struct inferior_list_entry): Change `id' type from unsigned from
12905 to ptid_t.
12906 (struct sym_cache, struct breakpoint, struct
12907 process_info_private): Forward declare.
12908 (struct process_info): Declare.
12909 (current_process): Declare.
12910 (all_processes): Declare.
12911 (initialize_inferiors): Declare.
12912 (add_thread): Adjust to use ptid_t.
12913 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12914 (add_process, remove_process, find_thread_pid): Declare.
12915 (find_inferior_id): Adjust to use ptid_t.
12916 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12917 (multi_process): Declare.
12918 (push_event): Adjust to use ptid_t.
12919 (read_ptid, write_ptid): Declare.
12920 (prepare_resume_reply): Adjust to use ptid_t.
12921 (clear_symbol_cache): Declare.
12922 * inferiors.c (all_processes): New.
12923 (null_ptid, minus_one_ptid): New.
12924 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12925 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12926 (add_thread): Change unsigned long to ptid. Remove gdb_id
12927 parameter. Adjust.
12928 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12929 (gdb_id_to_thread): Rename to ...
12930 (find_thread_pid): ... this. Change unsigned long to ptid.
12931 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12932 (loaded_dll, pull_pid_from_list): Adjust.
12933 (add_process, remove_process, find_process_pid)
12934 (get_thread_process, current_process, initialize_inferiors): New.
12935 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12936 (struct target_waitstatus) <related_pid>: Ditto.
12937 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12938 return type to int.
12939 (struct target_ops) <join>: Add `pid' argument.
12940 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12941 (struct target_ops) <wait>: Add `ptid' field. Change return type
12942 to ptid.
12943 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12944 (mywait): Add `ptid' argument. Change return type to ptid_t.
12945 (target_pid_to_str): Declare.
12946 * target.c (set_desired_inferior): Adjust to use ptids.
12947 (mywait): Add new `ptid' argument. Adjust.
12948 (target_pid_to_str): New.
12949 * mem-break.h (free_all_breakpoints): Declare.
12950 * mem-break.c (breakpoints): Delelete.
12951 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12952 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12953 to use per-process breakpoint list.
12954 (free_all_breakpoints): New.
12955 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12956 (symbol_cache, all_symbols_looked_up): Delete.
12957 (hexchars): New.
12958 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12959 read_ptid): New.
12960 (prepare_resume_reply): Change ptid argument's type from unsigned
12961 long to ptid_t. Adjust. Implement W;process and X;process.
12962 (free_sym_cache, clear_symbol_cache): New.
12963 (look_up_one_symbol): Adjust to per-process symbol cache. *
12964 * server.c (cont_thread, general_thread, step_thread): Change type
12965 to ptid_t.
12966 (attached): Delete.
12967 (multi_process): New.
12968 (last_ptid): Change type to ptid_t.
12969 (struct vstop_notif) <ptid>: Change type to ptid_t.
12970 (queue_stop_reply, push_event): Change `ptid' argument's type to
12971 ptid_t.
12972 (discard_queued_stop_replies): Add `pid' argument.
12973 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12974 changes. Don't reference the `attached' global.
12975 (attach_inferior): Adjust to mywait interface changes.
12976 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12977 features. Handle and report "multiprocess+". Handle
12978 "qAttached:PID".
12979 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12980 changes.
12981 (handle_v_kill): New.
12982 (handle_v_stopped): Adjust to use target_pid_to_str.
12983 (handle_v_requests): Allow multiple attaches and runs when
12984 multiprocess extensions are in effect. Handle "vKill".
12985 (myresume): Adjust to use ptids.
12986 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12987 (handle_status): Adjust to discard_queued_stop_replies interface
12988 change.
12989 (first_thread_of, kill_inferior_callback)
12990 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12991 (main): Call initialize_inferiors. Adjust to use ptids, killing
12992 and detaching from all inferiors. Handle multiprocess packet
12993 variants.
12994 * linux-low.h: Include gdb_proc_service.h.
12995 (struct process_info_private): New.
12996 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12997 <lwpid_of>: Use ptid_get_lwp.
12998 (get_lwp_thread): Adjust.
12999 (struct lwp_info): Add `dead' member.
13000 (find_lwp_pid): Declare.
13001 * linux-low.c (thread_db_active): Delete.
13002 (new_inferior): Adjust comment.
13003 (inferior_pid): Delete.
13004 (linux_add_process): New.
13005 (handle_extended_wait): Adjust.
13006 (add_lwp): Change unsigned long to ptid.
13007 (linux_create_inferior): Add process to processes table. Adjust
13008 to use ptids. Don't set new_inferior here.
13009 (linux_attach_lwp): Rename to ...
13010 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13011 it. Adjust to use ptids.
13012 (linux_attach_lwp): New.
13013 (linux_attach): Add process to processes table. Don't set
13014 new_inferior here.
13015 (struct counter): New.
13016 (second_thread_of_pid_p, last_thread_of_process_p): New.
13017 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13018 multiple processes.
13019 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13020 processes. Remove process from process table.
13021 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13022 to multiple processes.
13023 (any_thread_of): New.
13024 (linux_detach): Add `pid' argument, and handle it. Remove process
13025 from processes table.
13026 (linux_join): Add `pid' argument. Handle it.
13027 (linux_thread_alive): Change unsighed long argument to ptid_t.
13028 Consider dead lwps as not being alive.
13029 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13030 threads we're not interested in.
13031 (same_lwp, find_lwp_pid): New.
13032 (linux_wait_for_lwp): Change `pid' argument's type from int to
13033 ptid_t. Adjust.
13034 (linux_wait_for_event): Rename to ...
13035 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13036 from int to ptid_t. Adjust.
13037 (linux_wait_for_event): New.
13038 (linux_wait_1): Add `ptid' argument. Change return type to
13039 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13040 that exit from the process table.
13041 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13042 Adjust.
13043 (mark_lwp_dead): New.
13044 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13045 stopping all threads, mark its main lwp as dead.
13046 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13047 ptids.
13048 (fetch_register, usr_store_inferior_registers)
13049 (regsets_fetch_inferior_registers)
13050 (regsets_store_inferior_registers, linux_read_memory)
13051 (linux_write_memory): Inline `inferior_pid'.
13052 (linux_look_up_symbols): Adjust to use per-process
13053 `thread_db_active'.
13054 (linux_request_interrupt): Adjust to use ptids.
13055 (linux_read_auxv): Inline `inferior_pid'.
13056 (initialize_low): Don't reference thread_db_active.
13057 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13058 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13059 (ps_getpid): Return the pid of the current inferior.
13060 * thread-db.c (proc_handle, thread_agent): Delete.
13061 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13062 per-process data.
13063 (find_one_thread): Change argument type to ptid_t. Adjust to
13064 per-process data.
13065 (maybe_attach_thread): Adjust to per-process data and ptids.
13066 (thread_db_find_new_threads): Ditto.
13067 (thread_db_init): Ditto.
13068 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13069 processes table. Adjust to use ptids.
13070 (spu_kill, spu_detach): Adjust interface. Remove process from
13071 processes table.
13072 (spu_join, spu_thread_alive): Adjust interface.
13073 (spu_wait): Adjust interface. Remove process from processes
13074 table. Adjust to use ptids.
13075 * win32-low.c (current_inferior_tid): Delete.
13076 (current_inferior_ptid): New.
13077 (debug_event_ptid): New.
13078 (thread_rec): Take a ptid. Adjust.
13079 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13080 (child_delete_thread): Ditto.
13081 (do_initial_child_stuff): Add `attached' argument. Add process to
13082 processes table.
13083 (child_fetch_inferior_registers, child_store_inferior_registers):
13084 Adjust.
13085 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13086 (win32_attach): Pass 1 to do_initial_child_stuff.
13087 (win32_kill): Adjust interface. Remove process from processes
13088 table.
13089 (win32_detach): Ditto.
13090 (win32_join): Adjust interface.
13091 (win32_thread_alive): Take a ptid.
13092 (win32_resume): Adjust to use ptids.
13093 (get_child_debug_event): Ditto.
13094 (win32_wait): Adjust interface. Remove exiting process from
13095 processes table.
13096
bd99dc85
PA
130972009-04-01 Pedro Alves <pedro@codesourcery.com>
13098
13099 Non-stop mode support.
13100
13101 * server.h (non_stop): Declare.
13102 (gdb_client_data, handler_func): Declare.
13103 (delete_file_handler, add_file_handler, start_event_loop):
13104 Declare.
13105 (handle_serial_event, handle_target_event, push_event)
13106 (putpkt_notif): Declare.
13107 * target.h (enum resume_kind): New.
13108 (struct thread_resume): Replace `step' field by `kind' field.
13109 (TARGET_WNOHANG): Define.
13110 (struct target_ops) <wait>: Add `options' argument.
13111 <supports_non_stop, async, start_non_stop>: New fields.
13112 (target_supports_non_stop, target_async): New.
13113 (start_non_stop): Declare.
13114 (mywait): Add `options' argument.
13115 * target.c (mywait): Add `options' argument. Print child exit
13116 notifications here.
13117 (start_non_stop): New.
13118 * server.c (non_stop, own_buf, mem_buf): New globals.
13119 (struct vstop_notif): New.
13120 (notif_queue): New global.
13121 (queue_stop_reply, push_event, discard_queued_stop_replies)
13122 (send_next_stop_reply): New.
13123 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13124 interface changes.
13125 (attach_inferior): In non-stop mode, don't wait for the target
13126 here.
13127 (handle_general_set): Handle QNonStop.
13128 (handle_query): When handling qC, return the current general
13129 thread, instead of the first thread of the list.
13130 (handle_query): If the backend supports non-stop mode, include
13131 QNonStop+ in the qSupported query response.
13132 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13133 and non-stop mode.
13134 (handle_v_attach, handle_v_run): Handle non-stop mode.
13135 (handle_v_stopped): New.
13136 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13137 (myresume): Adjust to use resume_kind. Handle non-stop.
13138 (queue_stop_reply_callback): New.
13139 (handle_status): Handle non-stop mode.
13140 (main): Clear non_stop flag on reconnection. Use the event-loop.
13141 Refactor serial protocol handling from here ...
13142 (process_serial_event): ... to this new function. When GDB
13143 selects any thread, select one here. In non-stop mode, wait until
13144 GDB acks all pending events before exiting.
13145 (handle_serial_event, handle_target_event): New.
13146 * remote-utils.c (remote_open): Install remote_desc in the event
13147 loop.
13148 (remote_close): Remove remote_desc from the event loop.
13149 (putpkt_binary): Rename to...
13150 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13151 (putpkt_binary): New as wrapper around putpkt_binary_1.
13152 (putpkt_notif): New.
13153 (prepare_resume_reply): In non-stop mode, don't change the
13154 general_thread.
13155 * event-loop.c: New.
13156 * Makefile.in (OBJ): Add event-loop.o.
13157 (event-loop.o): New rule.
13158
13159 * linux-low.h (pid_of): Moved here.
13160 (lwpid_of): New.
13161 (get_lwp_thread): Use lwpid_of.
13162 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13163 * linux-low.c (pid_of): Delete.
13164 (inferior_pid): Use lwpid_of.
13165 (linux_event_pipe): New.
13166 (target_is_async_p): New.
13167 (delete_lwp): New.
13168 (handle_extended_wait): Use lwpid_of.
13169 (add_lwp): Don't set lwpid field.
13170 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13171 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13172 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13173 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13174 first. Adjust to linux_wait_for_event interface changes. Use
13175 lwpid_of.
13176 (linux_detach): Don't delete the main lwp here.
13177 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13178 (status_pending_p): Don't consider explicitly suspended lwps.
13179 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13180 pointer. Add OPTIONS argument. Change return type to int. Use
13181 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13182 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13183 pointer. Add status pointer argument. Return a pid instead of a
13184 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13185 changes. In non-stop mode, don't switch to a random thread.
13186 (linux_wait): Rename to...
13187 (linux_wait_1): ... this. Add target_options argument, and handle
13188 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13189 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13190 clean exit and signal exit code. Don't stop all threads in
13191 non-stop mode. In all-stop mode, only stop all threads when
13192 reporting a stop to GDB. Handle explicit thread stop requests.
13193 (async_file_flush, async_file_mark): New.
13194 (linux_wait): New.
13195 (send_sigstop): Use lwpid_of.
13196 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13197 interface changes. In non-stop mode, don't switch to a random
13198 thread.
13199 (linux_resume_one_lwp): Use lwpid_of.
13200 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13201 (linux_resume_one_thread): ... this. Handle resume_stop. In
13202 non-stop mode, don't look for pending flag in all threads.
13203 (resume_status_pending_p): Don't consider explicitly suspended
13204 threads.
13205 (my_waitpid): Reimplement. Emulate __WALL.
13206 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13207 Use lwpid_of.
13208 (sigchld_handler, linux_supports_non_stop, linux_async)
13209 (linux_start_non_stop): New.
13210 (linux_target_ops): Register linux_supports_non_stop, linux_async
13211 and linux_start_non_stop.
13212 (initialize_low): Install SIGCHLD handler.
13213 * thread-db.c (thread_db_create_event, find_one_thread)
13214 (thread_db_get_tls_address): Use lwpid_of.
13215 * win32-low.c (win32_detach): Adjust to use resume_kind.
13216 (win32_wait): Add `options' argument.
13217 * spu-low.c (spu_resume): Adjust to use resume_kind.
13218 (spu_wait): Add `options' argument.
13219
5b1c542e
PA
132202009-04-01 Pedro Alves <pedro@codesourcery.com>
13221
13222 Decouple target code from remote protocol.
13223
13224 * target.h (enum target_waitkind): New.
13225 (struct target_waitstatus): New.
13226 (struct target_ops) <wait>: Return an unsigned long. Take a
13227 target_waitstatus pointer instead of a char pointer.
13228 (mywait): Likewise.
13229 * target.c (mywait): Change prototype to return an unsigned long.
13230 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13231 * server.h (thread_from_wait, old_thread_from_wait): Delete
13232 declarations.
13233 (prepare_resume_reply): Change prototype to take a
13234 target_waitstatus.
13235 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13236 (last_status, last_ptid): New.
13237 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13238 pid instead of a signal.
13239 (attach_inferior): Remove "status" and "signal" parameters.
13240 Adjust.
13241 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13242 not as an address.
13243 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13244 (handle_v_requests, myresume): Remove "status" and "signal"
13245 parameters. Adjust.
13246 (handle_status): New.
13247 (main): Delete local `status'. Adjust.
13248 * remote-utils.c: Include target.h.
13249 (prepare_resume_reply): Change prototype to take a
13250 target_waitstatus. Adjust.
13251
13252 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13253 interface.
13254 * spu-low.c (spu_wait): Adjust.
13255 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13256 Delete.
13257 (win32_wait): Adjust.
13258
2bd7c093
PA
132592009-04-01 Pedro Alves <pedro@codesourcery.com>
13260
13261 * target.h (struct thread_resume): Delete leave_stopped member.
13262 (struct target_ops): Add a `n' argument to the `resume' callback.
13263 * server.c (start_inferior): Adjust.
13264 (handle_v_cont, myresume): Adjust.
13265 * linux-low.c (check_removed_breakpoint): Adjust to resume
13266 interface change, and to removed leave_stopped field.
13267 (resume_ptr): Delete.
13268 (struct thread_resume_array): New.
13269 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13270 resume interface change.
13271 (linux_continue_one_thread, linux_queue_one_thread)
13272 (resume_status_pending_p): Check if the resume field is NULL
13273 instead of checking the leave_stopped member.
13274 (linux_resume): Adjust to the target resume interface change.
13275 * spu-low.c (spu_resume): Adjust to the target resume interface
13276 change.
13277 * win32-low.c (win32_detach, win32_resume): Ditto.
13278
c35fafde
PA
132792009-04-01 Pedro Alves <pedro@codesourcery.com>
13280
13281 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13282 flag.
13283 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13284 pending.
13285 (linux_continue_one_thread): Only preserve the stepping flag if
13286 there's a pending breakpoint.
13287
0a59d50b
PA
132882009-03-31 Pedro Alves <pedro@codesourcery.com>
13289
13290 * server.c (main): After the inferior having exited, call
13291 remote_close before exiting gdbserver.
13292
f04c6d38
TJB
132932009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13294
13295 Fix size of FPSCR in Power 7 processors.
13296 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13297 (PPC_FEATURE_HAS_DFP): New #define.
13298 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13299 size of the FPSCR.
13300
78e5cee6
PA
133012009-03-23 Pedro Alves <pedro@codesourcery.com>
13302
13303 * server.c (handle_query) Whitespace and formatting.
13304
1b3f6016
PA
133052009-03-22 Pedro Alves <pedro@codesourcery.com>
13306
13307 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13308 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13309 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13310 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13311 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13312 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13313 Makefile.in, configure.ac: Fix whitespace throughout.
13314 * configure: Regenerate.
13315
a07b2135
PA
133162009-03-22 Pedro Alves <pedro@codesourcery.com>
13317
13318 * inferiors.c (find_inferior): Make it safe for the callback
13319 function to delete the currently iterated inferior.
13320
67cc2626
PA
133212009-03-22 Pedro Alves <pedro@codesourcery.com>
13322
13323 * Makefile.in (linuw_low_h): Move higher.
13324 (thread-db.o): Depend on $(linux_low_h).
13325
54a0b537
PA
133262009-03-17 Pedro Alves <pedro@codesourcery.com>
13327
13328 Rename "process" to "lwp" throughout.
13329
13330 * linux-low.c (all_processes): Rename to...
13331 (all_lwps): ... this.
13332 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13333 (add_process): Rename to ...
13334 (add_lwp): ... this. Adjust.
13335 (linux_create_inferior): Adjust.
13336 (linux_attach_lwp): Adjust.
13337 (linux_attach): Adjust.
13338 (linux_kill_one_process): Rename to ...
13339 (linux_kill_one_lwp): ... this. Adjust.
13340 (linux_kill): Adjust.
13341 (linux_detach_one_process): Rename to ...
13342 (linux_detach_one_lwp): ... this. Adjust.
13343 (linux_detach): Adjust.
13344 (check_removed_breakpoint): Adjust.
13345 (status_pending_p): Adjust.
13346 (linux_wait_for_process): Rename to ...
13347 (linux_wait_for_lwp): ... this. Adjust.
13348 (linux_wait_for_event): Adjust.
13349 (send_sigstop): Adjust.
13350 (wait_for_sigstop): Adjust.
13351 (stop_all_processes): Rename to ...
13352 (stop_all_lwps): ... this.
13353 (linux_resume_one_process): Rename to ...
13354 (linux_resume_one_lwp): ... this. Adjust.
13355 (linux_set_resume_request, linux_continue_one_thread)
13356 (linux_queue_one_thread, resume_status_pending_p)
13357 (usr_store_inferior_registers, regsets_store_inferior_registers)
13358 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13359 Adjust.
13360 * linux-low.h (get_process): Rename to ...
13361 (get_lwp): ... this. Adjust.
13362 (get_thread_process): Rename to ...
13363 (get_thread_lwp): ... this. Adjust.
13364 (get_process_thread): Rename to ...
13365 (get_lwp_thread): ... this. Adjust.
13366 (struct process_info): Rename to ...
13367 (struct lwp_info): ... this.
13368 (all_processes): Rename to ...
13369 (all_lwps): ... this.
13370 * proc-service.c (ps_lgetregs): Adjust.
13371 * thread-db.c (thread_db_create_event, find_one_thread)
13372 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13373
0b16c5cf
PA
133742009-03-14 Pedro Alves <pedro@codesourcery.com>
13375
13376 * server.c (handle_query): Handle "qAttached".
13377
32de4b9d
NS
133782009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13379
13380 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13381 GPLv3, update license URL.
13382
2aecd87f
DE
133832009-03-01 Doug Evans <dje@google.com>
13384
93efd302 13385 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13386 (server_h): Add gdb_signals.h.
13387 (signals.o): Update.
13388 * server.h (target_signal_from_host,target_signal_to_host_p)
13389 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13390
86b1f9c5
PM
133912009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13392
13393 * remote-utils.c (getpkt): Also generate remote-debug
13394 information if noack_mode is set.
13395
4aa995e1
PA
133962009-02-06 Pedro Alves <pedro@codesourcery.com>
13397
13398 * server.c (handle_query): Report qXfer:siginfo:read and
13399 qXfer:siginfo:write as supported and handle them.
13400 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13401 * linux-low.c (linux_xfer_siginfo): New.
13402 (linux_target_ops): Set it.
13403
62709adf
PA
134042009-01-26 Pedro Alves <pedro@codesourcery.com>
13405
13406 * server.c (gdbserver_usage): Mention --remote-debug.
13407 (main): Accept '--remote-debug' switch.
13408
aef93bd7
DE
134092009-01-18 Doug Evans <dje@google.com>
13410
13411 * regcache.c (new_register_cache): No need to check result of xcalloc.
13412 * server.c (handle_search_memory): Back out calls to xmalloc,
13413 result is checked and error is returned to user upon failure.
13414 (handle_query): Ditto. Add more checks for result of malloc.
13415 (handle_v_cont): Check result of malloc, report error back to
13416 user upon failure.
13417 (handle_v_run): Ditto. Call freeargv.
13418 * server.h (freeargv): Declare.
13419 * utils.c (freeargv): New fn.
13420
54363045
DE
134212009-01-15 Doug Evans <dje@google.com>
13422
f626972c
DE
13423 * gdbreplay.c (perror_with_name): Make arg const char *.
13424 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13425 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13426 * utils.c (perror_with_name): Make arg const char *.
54363045 13427
18aae699
PA
134282009-01-14 Pedro Alves <pedro@codesourcery.com>
13429
13430 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13431 when handling a EXIT_PROCESS_DEBUG_EVENT.
13432
ff703abe
JB
134332009-01-06 Joel Brobecker <brobecker@adacore.com>
13434
13435 * gdbreplay.c (gdbreplay_version): Update copyright year.
13436 * server.c (gdbserver_version): Likewise.
13437
f21cc1a2 134382009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13439
13440 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13441 (handle_extended_wait): Improve comment.
0e21c1ec 13442
bca929d3
DE
134432008-12-13 Doug Evans <dje@google.com>
13444
13445 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13446 * server.h (ATTR_MALLOC): New macro.
13447 (xmalloc,xcalloc,xstrdup): Declare.
13448 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13449 * inferiors.c: Ditto.
13450 * linux-low.c: Ditto.
13451 * mem-break.c: Ditto.
13452 * regcache.c: Ditto.
13453 * remote-utils.c: Ditto.
13454 * server.c: Ditto.
13455 * target.c: Ditto.
13456 * win32-low.c: Ditto.
13457
97438e3f
DE
134582008-12-12 Doug Evans <dje@google.com>
13459
896c7fbb
DE
13460 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13461 in debugging printf.
13462
97438e3f
DE
13463 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13464
e3b886f8
DE
134652008-12-09 Doug Evans <dje@google.com>
13466
13467 * linux-low.h (struct process_info): Delete member tid, unused.
13468 * thread-db.c (find_one_thread): Update.
13469 (maybe_attach_thread): Update.
13470
07e059b5
VP
134712008-12-02 Pedro Alves <pedro@codesourcery.com>
13472
889bf7c5
PA
13473 * target.h (struct target_ops): Add qxfer_osdata member.
13474 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13475 and dirent.h.
13476 (linux_qxfer_osdata): New functions.
13477 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13478 callback.
13479 * server.c (handle_query): Handle "qXfer:osdata:read:".
13480 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13481 (buffer_xml_printf): New functions.
13482 * server.h (struct buffer): New.
13483 (buffer_grow_str, buffer_grow_str0): New macros.
13484 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13485 (buffer_xml_printf): Declare.
07e059b5 13486
4cab47ab
DE
134872008-11-24 Doug Evans <dje@google.com>
13488
13489 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13490
f142445f
DJ
134912008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13492
13493 * server.c (handle_v_run): Always use the supplied argument list.
13494
d0107bb6 134952008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13496
d0107bb6
BW
13497 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13498 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13499
2c4ad781
TJB
135002008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13501
13502 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13503 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13504 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13505 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13506 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13507 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13508 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13509 XML target descriptions.
13510 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13511 when inferior is running on an ISA 2.05 or later processor. Add
13512 special case to return offset for full 64-bit slot of FPSCR when
13513 in 32-bits.
13514
dfb64f85
DJ
135152008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13516
13517 * Makefile.in (SFILES, clean): Added sparc64 files.
13518 (reg-sparc64.o, reg-sparc64.c): New.
13519 * configure.srv (sparc*-*-linux*): New configuration.
13520 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13521 syscall arguments for SPARC.
13522 (regsets_store_inferior_registers): Likewise.
13523 * linux-sparc-low.c: New file.
13524
66b6e1dd
DE
135252008-10-21 Doug Evans <dje@google.com>
13526
13527 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13528 (READLINE_DIR,READLINE_DEP): Delete.
13529 (INTERNAL_CFLAGS): Update.
13530 (LINTFLAGS): Update.
13531
9b710a42
PA
135322008-10-10 Pedro Alves <pedro@codesourcery.com>
13533
13534 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13535 whole argv from the last run, not just argv[0].
13536
5822d809
PA
135372008-09-08 Pedro Alves <pedro@codesourcery.com>
13538
13539 * regcache.c (new_register_cache): Return NULL if the register
13540 cache size isn't known yet.
13541 (free_register_cache): Avoid dereferencing a NULL regcache.
13542
74aac56f
DJ
135432008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13544
13545 * configure.srv: Merge MIPS and MIPS64.
13546
400b20f5
MR
135472008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13548
13549 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13550
677c5bb1
LM
135512008-08-18 Luis Machado <luisgpm@br.ibm.com>
13552
13553 * Makefile.in: Add required vsx dependencies.
13554
13555 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13556 Declare init_registers_powerpc_vsx32l.
13557 Declare init_registers_powerpc_vsx64l.
13558 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13559 (ppc_arch_setup): Check for VSX in hwcap.
13560 (ppc_fill_vsxregset): New function.
13561 (ppc_store_vsxregset): New function.
13562 Add new VSX entry in regset_info target_regsets.
13563
13564 * configure.srv: Add new VSX dependencies.
13565
a6f3e723
SL
135662008-08-12 Pedro Alves <pedro@codesourcery.com>
13567
13568 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13569 (remote_open): Set or clear transport_is_reliable.
13570 (putpkt_binary): Don't expect acks in noack mode.
13571 (getpkt): Don't send ack/nac in noack mode.
13572 * server.c (handle_general_set): Handle QStartNoAckMode.
13573 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13574 qSupported.
13575 (main): Reset noack_mode on every connection.
13576 * server.h (noack_mode): Declare.
13577
a417dc56
RW
135782008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13579
13580 * Makefile.in (GDBREPLAY_OBS): New variable.
13581 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13582
3221518c
UW
135832008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13584 Daniel Jacobowitz <dan@codesourcery.com>
13585
13586 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13587 (usr_store_inferior_registers): Likewise.
13588 (regsets_store_inferior_registers): Likewise.
13589
ec56be1b
PA
135902008-07-31 Rolf Jansen <rj@surtec.com>
13591 Pedro Alves <pedro@codesourcery.com>
13592
13593 * configure.ac: Check for memmem declaration.
13594 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13595 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13596 (disable_packet_qfThreadInfo): Unconditionally compile.
13597 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13598 * configure, config.in: Regenerate.
13599
2fe5e3ff
DE
136002008-07-28 Doug Kwan <dougkwan@google.com>
13601
13602 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13603 (linux_write_memory): Remove declaration of errno.
13604
836acd6d
UW
136052008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13606
13607 * linux-low.c (handle_extended_wait): Do not use "status"
13608 variable uninitialized.
13609
aeba519e
PA
136102008-07-07 Pedro Alves <pedro@codesourcery.com>
13611
13612 * server.c (handle_v_attach): Inhibit reporting dll changes.
13613
db42f210
PA
136142008-06-27 Pedro Alves <pedro@codesourcery.com>
13615
13616 * remote-utils.c (prepare_resume_reply): If requested, don't
13617 output "thread:TID" in the T stop reply.
13618
13619 * server.c (disable_packet_vCont, disable_packet_Tthread)
13620 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13621 (handle_query): If requested, disable support for qC, qfThreadInfo
13622 and qsThreadInfo.
13623 (handle_v_requests): If requested, disable support for vCont.
13624 (gdbserver_show_disableable): New.
13625 (main): Handle --disable-packet and --disable-packet=LIST.
13626
13627 * server.h (disable_packet_vCont, disable_packet_Tthread)
13628 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13629
8e4c5421
CD
136302008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13631
13632 * server.c (gdbserver_usage): Mention --version.
13633
6e23a804
DJ
136342008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13635
13636 * Makefile.in (gdbreplay.o): New rule.
13637
90aa6a40
JM
136382008-06-06 Joseph Myers <joseph@codesourcery.com>
13639
13640 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13641 message, not gdbserver.
13642
c16158bc 136432008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13644 Nathan Sidwell <nathan@codesourcery.com>
13645 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13646
13647 * acinclude.m4: Include ../../config/acx.m4.
13648 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13649 * configure, config.in: Regenerate.
13650 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13651 * server.c (gdbserver_version): Print PKGVERSION.
13652 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13653 (main): Adjust gdbserver_usage calls.
13654 * gdbreplay.c (version, host_name): Add declarations.
13655 (gdbreplay_version, gdbreplay_usage): New.
13656 (main): Accept --version and --help options.
13657
aeb75bf5
DJ
136582008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13659
13660 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13661 (arm_breakpoint_at): Handle Thumb.
13662 (the_low_target): Add comment.
13663
76b233dd
UW
136642008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13665
13666 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13667
08388c79
DE
136682008-05-09 Doug Evans <dje@google.com>
13669
a3c83fae
DE
13670 * server.h (decode_search_memory_packet): Declare.
13671 * remote-utils.c (decode_search_memory_packet): New fn.
13672 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13673 (handle_search_memory): New fn.
13674 (handle_query): Process qSearch:memory packets.
13675
bb9c3d36
UW
136762008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13677
13678 * regcache.c (registers_length): Remove.
13679 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13680 full register packet.
13681 * regcache.h (registers_length): Remove prototype.
13682 * server.h (PBUFSIZ): Define to 16384.
13683
7284e1be
UW
136842008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13685
13686 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13687 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13688 powerpc-64l.o, and powerpc-altivec64l.o.
13689 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13690 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13691 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13692 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13693 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13694 to srv_xmlfiles.
13695
13696 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13697 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13698 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13699 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13700 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13701 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13702 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13703 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13704 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13705 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13706 (clean): Update.
13707
13708 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13709 (init_registers_powerpc_32l): ... this new prototype.
13710 (init_registers_powerpc_32): Remove, replace by ...
13711 (init_registers_powerpc_altivec32l): ... this new prototype.
13712 (init_registers_powerpc_e500): Remove, replace by ...
13713 (init_registers_powerpc_e500l): ... this new prototype.
13714 (init_registers_ppc64): Remove, replace by ...
13715 (init_registers_powerpc_64l): ... this new prototype.
13716 (init_registers_powerpc_64): Remove, replace by ...
13717 (init_registers_powerpc_altivec64l): ... this new prototype.
13718 (ppc_num_regs): Set to 73.
13719 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13720 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13721 (ppc_cannot_store_register): Handle orig_r3 and trap.
13722 (ppc_arch_setup): Update init_registers_... calls.
13723 (ppc_fill_gregset): Handle orig_r3 and trap.
13724
13725 * inferiors.c (clear_inferiors): Reset current_inferior.
13726
fdc59709
PB
137272008-04-23 Paolo Bonzini <bonzini@gnu.org>
13728
889bf7c5
PA
13729 * acinclude.m4: Add override.m4.
13730 * configure: Regenerate.
fdc59709 13731
c9b2f845
UW
137322008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13733
13734 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13735 initial call to init_register_ppc64.
13736
550512b8
UW
137372008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13738
43aaf8b6
PA
13739 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13740 single powerpc*-*-linux* case.
550512b8
UW
13741 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13742
b6430ec3
UW
137432008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13744
13745 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13746 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13747 from reg_xmlfiles.
13748 * linux-ppc-low.c: Include <elf.h>.
13749 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13750 (ppc_hwcap): New global variable.
13751 (ppc_regmap): Remove __SPE__ #ifdef sections.
13752 (ppc_regmap_e500): New global variable.
13753 (ppc_cannot_store_register): Update __SPE__ special case.
13754 (ppc_get_hwcap): New function.
13755 (ppc_arch_setup): Use it to determine whether inferior supports
13756 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13757 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13758 Do not access registers if target does not support AltiVec.
13759 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13760 Do not access registers if target does not support SPE.
13761 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13762
52fa2412
UW
137632008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13764
13765 * linux-low.c (disabled_regsets, num_regsets): New.
13766 (use_regsets_p): Delete.
13767 (linux_wait_for_process): Clear disabled_regsets.
13768 (regsets_fetch_inferior_registers): Check and set it.
13769 (regsets_store_inferior_registers): Likewise.
13770 (linux_fetch_registers, linux_store_registers): Do not use
13771 use_regsets_p.
13772 (initialize_low): Allocate disabled_regsets.
13773
e28b3332
DJ
137742008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13775
13776 * Makefile.in (LIBOBJS): New.
13777 (OBS): Use LIBOBJS.
13778 (memmem.o): New rule.
13779 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13780 * configure: Regenerated.
13781
4536995d
UW
137822008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13783
13784 * server.c (handle_query): Never return "unsupported" for
13785 qXfer:features:read queries.
13786
221c031f
UW
137872008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13788
13789 * server.c (get_features_xml): Fix inverted condition.
13790 (handle_query): Always support qXfer:feature:read.
13791
ccd213ac
DJ
137922008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13793
13794 * server.c (wrapper_argv): New.
13795 (start_inferior): Handle wrapper_argv. If set, expect an extra
13796 trap.
13797 (gdbserver_usage): Document --wrapper.
13798 (main): Parse --wrapper.
13799
6fe305f7
UW
138002008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13801
13802 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13803 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13804 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13805 (ppc_set_pc): Likewise.
13806 (ppc_arch_setup): New function.
13807 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13808 of collect_register.
889bf7c5 13809 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13810
5b0a002e
UW
138112008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13812
13813 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13814 instead of linux-ppc64-low.o.
13815 * linux-ppc64-low.c: Remove file.
13816 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13817 (linux-ppc64-low.o): Remove rule.
13818
13819 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13820 (init_registers_powerpc_64): Likewise.
13821 (ppc_regmap): Conditionally define depending on __powerpc64__.
13822 (ppc_cannot_store_register): Do not special-case "fpscr" when
13823 compiled on __powerpc64__.
13824 (ppc_collect_ptrace_register): New function.
13825 (ppc_supply_ptrace_register): New function.
13826 (ppc_breakpoint): Change type to "unsigned int".
13827 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13828 (the_low_target): Conditionally provide initializers for the
889bf7c5 13829 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13830 collect_ptrace_register and supply_ptrace_register members.
13831
9b4b61c8
UW
138322008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13833
13834 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13835 * server.c (gdbserver_xmltarget): Define.
13836 (get_features_xml): Use it to replace "target.xml" and arch_string.
13837
13838 * configure.srv: Remove srv_xmltarget. Add XML files that were
13839 mentioned there to srv_xmlfiles instead. Remove conditional tests
13840 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13841 srv_xmlfiles and srv_regobj to include all possible choices.
13842 * configure.ac (srv_xmltarget): Remove.
13843 (srv_xmlfiles): Do not add "target.xml".
13844 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13845 checks for supplementary target information.
13846 * configure: Regenerate.
13847 * Makefile.in (XML_TARGET): Remove.
13848 (target.xml): Remove rule.
13849 (clean): Do not clean up target.xml.
13850 (.PRECIOUS): Do not mention target.xml.
13851
13852 * target.h (struct target_ops): Remove arch_string member.
13853 * linux-low.c (linux_arch_string): Remove.
13854 (linux_target_ops): Remove arch_string initializer.
13855 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13856 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13857 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13858 * spu-low.c (spu_arch_string): Remove.
13859 (spu_target_ops): Remove arch_string initializer.
13860 * win32-low.c (win32_arch_string): Remove.
13861 (win32_target_ops): Remove arch_string initializer.
13862 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13863 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13864 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13865
ee1a7ae4
UW
138662008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13867
13868 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13869 by collect_ptrace_register and supply_ptrace_register hooks.
13870 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13871 instead of checking for the_low_target.left_pad_xfer.
13872 (usr_store_inferior_registers): Use collect_ptrace_register callback
13873 instead of checking for the_low_target.left_pad_xfer.
13874
13875 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13876 (s390_supply_ptrace_register): Likewise.
13877 (s390_fill_gregset): Call s390_collect_ptrace_register.
13878 (the_low_target): Update.
13879
13880 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13881 (ppc_supply_ptrace_register): Likewise.
13882 (the_low_target): Update.
13883
13884 * linux-i386-low.c (the_low_target): Update.
13885 * linux-x86-64-low.c (the_low_target): Update.
13886
d61ddec4
UW
138872008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13888
13889 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13890 reg-s390.o and reg-s390x.o.
13891
13892 * linux-low.c (new_inferior): New global variable.
13893 (linux_create_inferior, linux_attach): Set it.
13894 (linux_wait_for_process): Call the_low_target.arch_setup after the
13895 target has stopped for the first time.
13896 (initialize_low): Do not call the_low_target.arch_setup.
13897
13898 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13899 (s390_set_pc): Likewise.
13900 (s390_arch_setup): New function.
13901 (the_low_target): Use s390_arch_setup as arch_setup routine.
13902
13903 * regcache.c (realloc_register_cache): New function.
13904 (set_register_cache): Call it for each existing regcache.
13905
d05b4ac3
UW
139062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13907
13908 * server.h (init_registers): Remove prototype.
13909
13910 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13911 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13912 instead of init_registers ().
13913 * linux-arm-low.c (init_registers_arm): Add prototype.
13914 (init_registers_arm_with_iwmmxt): Likewise.
13915 (the_low_target): Add initializer for arch_setup field.
13916 * linux-cris-low.c (init_registers_cris): Add prototype.
13917 (the_low_target): Add initializer for arch_setup field.
13918 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13919 (the_low_target): Add initializer for arch_setup field.
13920 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13921 (the_low_target): Add initializer for arch_setup field.
13922 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13923 (the_low_target): Add initializer for arch_setup field.
13924 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13925 (the_low_target): Add initializer for arch_setup field.
13926 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13927 (the_low_target): Add initializer for arch_setup field.
13928 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13929 (init_registers_mips64_linux): Likewise.
13930 (the_low_target): Add initializer for arch_setup field.
13931 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13932 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13933 (the_low_target): Add initializer for arch_setup field.
13934 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13935 (init_registers_powerpc_64): Likewise.
13936 (the_low_target): Add initializer for arch_setup field.
13937 * linux-s390-low.c (init_registers_s390): Add prototype.
13938 (init_registers_s390x): Likewise.
13939 (the_low_target): Add initializer for arch_setup field.
13940 * linux-sh-low.c (init_registers_sh): Add prototype.
13941 (the_low_target): Add initializer for arch_setup field.
13942 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13943 (the_low_target): Add initializer for arch_setup field.
13944 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13945 (the_low_target): Add initializer for arch_setup field.
13946
13947 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13948 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13949 instead of init_registers ().
13950 * win32-arm-low.c (init_registers_arm): Add prototype.
13951 (the_low_target): Add initializer for arch_setup field.
13952 * win32-i386-low.c (init_registers_i386): Add prototype.
13953 (the_low_target): Add initializer for arch_setup field.
13954
13955 * spu-low.c (init_registers_spu): Add prototype.
13956 (initialize_low): Call initialie_registers_spu () instead of
13957 initialize_registers ().
13958
fd96d250
PA
139592008-02-19 Pedro Alves <pedro@codesourcery.com>
13960
13961 * server.c (handle_v_requests): When handling the vRun and vAttach
13962 packets, if already debugging a process, don't kill it. Return an
13963 error instead.
13964
d41b6bb4
DJ
139652008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13966
13967 * server.c (handle_query): Correct length check.
13968
5ac588cf
PA
139692008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13970
13971 * win32-low.c (do_initial_child_stuff): Add process handle
13972 parameter. Set current_process_handle and current_process_id from the
13973 parameters. Clear globals.
13974 (win32_create_inferior): Don't set current_process_handle and
13975 current_process_id here. Instead pass them on the call to
13976 do_initial_child_stuff.
13977 (win32_attach): Likewise.
13978 (win32_clear_inferiors): New.
13979 (win32_kill): Don't close the current process handle or the
13980 current thread handle here. Instead call win32_clear_inferiors.
13981 (win32_detach): Don't open a new handle to the process. Call
13982 win32_clear_inferiors.
13983 (win32_join): Don't rely on current_process_handle; open a new
13984 handle using the process id.
13985 (win32_wait): Call win32_clear_inferiors when the inferior process
13986 has exited.
13987
ecd7ecbc
DJ
139882008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13989
13990 * server.c (monitor_show_help): Add "exit".
13991
1525d545
MG
139922008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13993
ecd7ecbc 13994 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13995 (clean): Add reg-xtensa.c.
13996 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13997 * configure.srv (xtensa*-*-linux*) New target.
13998 * linux-xtensa-low.c: New.
13999 * xtensa-xtregs.c: New.
1525d545 14000
59a016f0
PA
140012008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14002
14003 * hostio.c: Don't include errno.h.
14004 (errno_to_fileio_errno): Move to hostio-errno.
14005 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14006 error number outputting to the target->hostio_last_error callback.
14007 (hostio_packet_error): Use FILEIO_EINVAL directly.
14008 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14009 calls to hostio_error.
14010 * hostio-errno.c: New.
14011 * server.h (hostio_last_error_from_errno): Declare.
14012 * target.h (target_ops): Add hostio_last_error member.
14013 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14014 as hostio_last_error handler.
889bf7c5 14015 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14016 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14017 (wince_hostio_last_error): New functions.
14018 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14019 as hostio_last_error handler.
14020 (win32_target_ops) [!_WIN32_WCE]: Register
14021 hostio_last_error_from_errno as hostio_last_error handler.
14022 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14023 (hostio-errno.o): New rule.
14024 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14025 * configure.srv (srv_hostio_err_objs): New variable. Default to
14026 hostio-errno.o.
14027 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14028 * configure: Regenerate.
14029
2d717e4f
DJ
140302008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14031
14032 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14033 (linux_kill, linux_detach): Clean up the process list.
14034 * remote-utils.c (remote_open): Improve port number parsing.
14035 (putpkt_binary, input_interrupt): Only send interrupts if the target
14036 is running.
14037 * server.c (extended_protocol): Make static.
14038 (attached): Define earlier.
14039 (exit_requested, response_needed, program_argv): New variables.
14040 (target_running): New.
14041 (start_inferior): Clear attached here.
14042 (attach_inferior): Set attached here.
14043 (require_running): Define.
14044 (handle_query): Use require_running and target_running. Implement
14045 "monitor exit".
14046 (handle_v_attach, handle_v_run): New.
14047 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14048 (gdbserver_usage): Update.
14049 (main): Redo argument parsing. Handle --debug and --multi. Handle
14050 --attach along with other options or after the port. Save
14051 program_argv. Support no initial program. Resynchronize
14052 communication with GDB after an error. Handle "monitor exit".
14053 Use require_running and target_running. Always allow the extended
14054 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14055 restart in extended mode.
14056 * README: Refer to the GDB manual. Update --attach usage.
14057
7407e2de
AS
140582007-12-20 Andreas Schwab <schwab@suse.de>
14059
14060 * linux-low.c (STACK_SIZE): Define.
14061 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14062 (linux_test_for_tracefork): Likewise.
14063
b65d95c5
DJ
140642007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14065
14066 * linux-low.c (linux_wait_for_event): Update messages. Do not
14067 reinsert auto-delete breakpoints.
14068 * mem-break.c (struct breakpoint): Change return type of handler to
14069 int.
14070 (set_breakpoint_at): Update handler type.
14071 (reinsert_breakpoint_handler): Return 1 instead of calling
14072 delete_breakpoint.
14073 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14074 setting a new one.
14075 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14076 * mem-break.h (set_breakpoint_at): Update handler type.
14077 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14078 * win32-low.c (auto_delete_breakpoint): New.
14079 (get_child_debug_event): Use it.
14080
4e799345
DJ
140812007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14082
14083 * configure.ac: Check for pread and pwrite.
14084 * hostio.c (handle_pread): Fall back to lseek and read.
14085 (handle_pwrite): Fall back to lseek and write.
14086 * config.in, configure: Regenerated.
14087
27524b67
DJ
140882007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14089
14090 * server.c (myresume): Add own_buf argument.
14091 (main): Update calls.
14092
a20d5e98
DJ
140932007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14094
14095 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14096 * remote-utils.c (remote_open): Do not call disable_async_io.
14097 (block_async_io): Delete.
14098 (unblock_async_io): Make static.
14099 (initialize_async_io): New.
14100 * server.c (handle_v_cont): Handle async I/O here.
14101 (myresume): Likewise. Move other common resume tasks here...
14102 (main): ... from here. Call initialize_async_io. Disable async
14103 I/O before the main loop.
14104 * server.h (initialize_async_io): Declare.
14105 (block_async_io, unblock_async_io): Delete prototypes.
14106 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14107
b79d787e
DJ
141082007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14109
14110 * remote-utils.c (readchar): Allow binary data in received messages.
14111
d97903b2
PA
141122007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14113
14114 * win32-low.c (attaching): New global.
14115 (win32_create_inferior): Clear the `attaching' global.
14116 (win32_attach): Set the `attaching' global.
14117 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14118 attaching. Only set a breakpoint at the entry point if not
14119 attaching.
14120
311de423
PA
141212007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14122
14123 * server.c (main): Don't report dll events on the initial
14124 connection on attaches.
14125
6c2d16d2
PA
141262007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14127
14128 * server.c (main): Relax numerical bases supported for the pid of
14129 the --attach command line argument.
14130
5ca906e6
PA
141312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14132
14133 * win32-low.c (win32_attach): Call OpenProcess before
14134 DebugActiveProcess, not after. Add last error output to error
14135 call.
14136
9c6c8194
PA
141372007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14138
14139 * win32-low.c (win32_get_thread_context)
14140 (win32_set_thread_context): New functions.
14141 (thread_rec): Use win32_get_thread_context.
14142 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14143 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14144 field.
14145
4d5d1aaa
PA
141462007-12-03 Leo Zayas
14147 Pedro Alves <pedro_alves@portugalmail.pt>
14148
14149 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14150 global variables.
14151 (child_add_thread): Minor cleanup.
14152 (child_continue): Resume artificially suspended threads before
14153 calling ContinueDebugEvent.
14154 (suspend_one_thread): New.
14155 (fake_breakpoint_event): New.
14156 (get_child_debug_event): Change return type to int. Check here if
14157 gdb sent an interrupt request. If a soft interrupt was requested,
14158 fake a breakpoint event. Return 0 if there is no event to handle,
14159 and 1 otherwise.
14160 (win32_wait): Don't check here if gdb sent an interrupt request.
14161 Ensure there is a valid event to handle.
14162 (win32_request_interrupt): Add soft interruption method as last
14163 resort.
14164
c436e841
PA
141652007-12-03 Leo Zayas
14166 Pedro Alves <pedro_alves@portugalmail.pt>
14167
14168 * win32-low.h (win32_thread_info): Add descriptions to the
14169 structure members. Replace `suspend_count' counter by a
14170 `suspended' flag.
14171 * win32-low.c (thread_rec): Update condition of when to get the
14172 context from the inferior. Rely on ContextFlags being set if it
14173 has already been retrieved. Only suspend the inferior thread if
14174 we haven't already. Warn if that fails.
14175 (continue_one_thread): s/suspend_count/suspended/. Only call
14176 ResumeThread once. Warn if that fails.
14177
e7b5fa67
PA
141782007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14179
14180 * win32-low.c (win32_wait): Don't read from the inferior when it
14181 has already exited.
14182
a385171d
PA
141832007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14184
14185 * Makefile.in (win32_low_h): New variable.
14186 (win32-low.o): Add dependency on $(win32_low_h).
14187 (win32-arm-low.o, win32-i386-low.o): New rules.
14188
f80c84b3
DJ
141892007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14190
14191 * hostio.c: Correct copyright year.
14192
a6b151f1
DJ
141932007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14194
14195 * Makefile.in (OBS): Add hostio.o.
14196 (hostio.o): New rule.
14197 * server.h (handle_vFile): Declare.
14198 * hostio.c: New file.
14199 * server.c (handle_v_requests): Take packet_len and new_packet_len
14200 for binary packets. Call handle_vFile.
14201 (main): Update call to handle_v_requests.
14202
f9387fc3
DJ
142032007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14204
14205 * linux-low.c: Include <sched.h>.
14206
51c2684e
DJ
142072007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14208
14209 * linux-low.c (linux_tracefork_grandchild): New.
14210 (linux_tracefork_child): Use clone.
14211 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14212
75f83163
JB
142132007-10-31 Joel Brobecker <brobecker@adacore.com>
14214
14215 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14216
da5898ce
DJ
142172007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14218
14219 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14220
24a09b5f
DJ
142212007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14222
14223 * inferiors.c (change_inferior_id): Delete.
14224 (add_pid_to_list, pull_pid_from_list): New.
14225 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14226 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14227 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14228 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14229 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14230 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14231 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14232 (using_threads): Always set to 1.
14233 (handle_extended_wait): New.
14234 (add_process): Do not set TID.
14235 (linux_create_inferior): Set must_set_ptrace_flags.
14236 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14237 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14238 (linux_thread_alive): Rename TID argument to LWPID.
14239 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14240 (linux_wait_for_event): Do not use TID or check using_threads. Update
14241 call to dead_thread_notify. Call handle_extended_wait.
14242 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14243 (send_sigstop): Delete sigstop_sent.
14244 (wait_for_sigstop): Avoid TID.
14245 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14246 (linux_test_for_tracefork): New.
14247 (linux_lookup_signals): Use thread_db_active and
14248 linux_supports_tracefork_flag.
14249 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14250 * linux-low.h (get_process_thread): Avoid TID.
14251 (struct process_ifo): Move thread_known and tid to the end. Remove
14252 sigstop_sent.
14253 (linux_attach_lwp, thread_db_init): Update prototypes.
14254 * server.h (change_inferior_id): Delete prototype.
14255 (add_pid_to_list, pull_pid_from_list): New prototypes.
14256 * thread-db.c (thread_db_use_events): New.
14257 (find_first_thread): Rename to...
14258 (find_one_thread): ...this. Update callers and messages. Do not
14259 call fatal. Check thread_db_use_events. Do not call
14260 change_inferior_id or new_thread_notify.
14261 (maybe_attach_thread): Update. Do not call new_thread_notify.
14262 (thread_db_init): Set thread_db_use_events. Check use_events.
14263 * utils.c (fatal, warning): Correct message prefix.
14264
30ed0a8f
DJ
142652007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14266
14267 * Makefile.in (clean): Remove new files.
14268 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14269 (powerpc-64.o, powerpc-64.c): New rules.
14270 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14271 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14272 with SPE.
14273 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14274 SPE targets.
14275 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14276 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14277 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14278 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14279 (target_regsets): Add AltiVec and SPE register sets.
14280 * configure.ac: Check for AltiVec and SPE.
14281 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14282 (ppc_fill_vrregset, ppc_store_vrregset): New.
14283 (target_regsets): Add AltiVec register set.
14284 * configure: Regenerated.
14285
fd462a61
DJ
142862007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14287
14288 * linux-low.c (O_LARGEFILE): Define.
14289 (linux_read_memory): Use /proc/PID/mem.
14290 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14291 * configure, config.in: Regenerated.
14292
69f223ed
DJ
142932007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14294
14295 * linux-low.c (linux_wait_for_event): Do not pass signals while
14296 single-stepping.
14297
aec18585
PA
142982007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14299
14300 * win32-low.c (create_process): New.
14301 (win32_create_inferior): Use create_process instead of
14302 CreateProcess. If create_process failed retry appending an ".exe"
14303 suffix. Store the GetLastError result immediatelly after
14304 create_process calls and use it on the call to error.
14305
34d86ddd
PA
143062007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14307
14308 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14309
5a0e3bd0
JB
143102007-08-23 Joel Brobecker <brobecker@adacore.com>
14311
14312 * configure.ac: Switch license to GPLv3.
14313
f88c79e6
MS
143142007-08-01 Michael Snyder <msnyder@access-company.com>
14315
14316 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14317
6b3d9b83
PA
143182007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14319
14320 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14321 typedef.
14322 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14323 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14324 CloseToolhelp32Snapshot.
14325 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14326 CloseToolhelp32Snapshot.
14327
c588c53c
MS
143282007-07-27 Michael Snyder <michael.snyder@access-company.com>
14329
14330 * server.c (main): Check for inferior exit before main loop.
14331
aa0403d9
PA
143322007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14333
14334 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14335 instead of on tmp_desc.
14336
255e7678
DJ
143372007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14338 Daniel Jacobowitz <dan@codesourcery.com>
14339
14340 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14341 (add_thread): Minor cleanups.
14342 (clear_inferiors): Move lower in the file. Clear the DLL
14343 list.
14344 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14345 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14346 (xml_escape_text): New.
14347 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14348 for qSupported.
14349 (handle_v_cont): Report errors.
14350 (gdbserver_version): Update.
14351 (main): Correct size of own_buf. Do not report initial DLL events.
14352 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14353 (unloaded_dll, xml_escape_text): New.
14354 * win32-low.c (enum target_waitkind): Update comments.
14355 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14356 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14357 (win32_EnumProcessModules, win32_GetModuleInformation)
14358 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14359 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14360 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14361 (win32_Module32First, win32_Module32Next, load_toolhelp)
14362 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14363 (get_child_debug_event): Handle DLL events.
14364 (win32_wait): Likewise.
14365
0d37add9
DJ
143662007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14367
14368 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14369 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14370
45e2715e
PA
143712007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14372
14373 * win32-low.c (handle_output_debug_string): Ignore event if not
14374 waiting.
14375
c5674cf1
PA
143762007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14377
14378 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14379
2bbe3cc1
DJ
143802007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14381
14382 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14383
ae13219e
DJ
143842007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14385
14386 * inferiors.c (change_inferior_id): Add comment.
14387 * linux-low.c (check_removed_breakpoint): Add an early
14388 prototype. Improve debug output.
14389 (linux_attach): Doc update.
14390 (linux_detach_one_process, linux_detach): Clean up before releasing
14391 each process.
14392 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14393 * linux-low.h (struct process_info): Doc improvement.
14394 * mem-break.c (delete_all_breakpoints): New.
14395 * mem-break.h (delete_all_breakpoints): New prototype.
14396 * thread-db.c (find_first_thread): New.
14397 (thread_db_create_event): Call it instead of
14398 thread_db_find_new_threads. Clean up unused variables.
14399 (maybe_attach_thread): Remove first thread handling.
14400 (thread_db_find_new_threads): Use find_first_thread.
14401 (thread_db_get_tls_address): Likewise.
14402
4105de34
DJ
144032007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14404
14405 * thread-db.c (thread_db_find_new_threads): Add prototype.
14406 (thread_db_create_event): Check for the main thread before adding
14407 a new thread.
14408 (maybe_attach_thread): Only enable event reporting if TID == 0.
14409 (thread_db_get_tls_address): Check for new threads.
14410
2b876972
DJ
144112007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14412
14413 * linux-low.c (linux_create_inferior): Try execv before execvp.
14414 * spu-low.c (spu_create_inferior): Likewise.
14415
7a245884
DJ
144162007-06-13 Mike Frysinger <vapier@gentoo.org>
14417
14418 * linux-low.c (linux_create_inferior): Change execv to execvp.
14419 * spu-low.c (spu_create_inferior): Likewies.
14420
117ce543
DJ
144212007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14422
14423 * Makefile.in (clean): Clean new files instead of deleted ones.
14424 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14425 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14426 rules.
14427 * configure.srv: Specify XML files and new regformats for MIPS and
14428 MIPS64 GNU/Linux.
14429 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14430 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14431 an entry for the restart register.
14432 (mips_cannot_fetch_register, mips_cannot_store_register)
14433 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14434 register names to match the XML descriptions.
14435 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14436 restart register instead of $0.
14437
0e7f50da
UW
144382007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14439 Markus Deuling <deuling@de.ibm.com>
14440
14441 * remote-utils.c (decode_xfer_write): New function.
14442 * server.h (decode_xfer_write): Add prototype.
14443 * server.c (handle_query): Add PACKET_LEN argument. Support
14444 qXfer:spu:read and qXfer:spu:write packets.
14445 (main): Pass packet_len to handle_query.
14446 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14447 * target.h (target_ops): Add qxfer_spu.
14448
374c1d38
UW
144492007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14450
14451 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14452 accessing non-seekable spufs files.
14453
bb63802a
UW
144542007-05-16 Markus Deuling <deuling@de.ibm.com>
14455
889bf7c5 14456 * server.c (handle_query): Add reply for qC packet.
bb63802a 14457
7390519e
PA
144582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14459 Leo Zayas <lerele@champenstudios@com>
14460
14461 * server.h (check_remote_input_interrupt_request): New function.
14462 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14463 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14464 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14465 (check_remote_input_interrupt_request): New function.
14466 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14467 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14468 winapi_GenerateConsoleCtrlEvent): New typedefs.
14469 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14470 to 250 ms.
14471 (win32_wait): Check for remote interrupt request
14472 with check_remote_input_interrupt_request.
14473 (win32_request_interrupt): New function.
14474 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14475
34b34921
PA
144762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14477
14478 * win32-low.c (debug_registers_changed,
14479 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14480 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14481 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14482 (thread_rec): Get context using the low target.
14483 (child_add_thread): Call thread_added on the low target,
14484 which does the same thing.
14485 (regptr): Delete.
14486 (do_initial_child_stuff): Remove debug registers references.
14487 Set context using the low target. Resume threads after
14488 setting the contexts.
14489 (child_continue): Remove dead variable. Remove debug
14490 registers references.
14491 (child_fetch_inferior_registers): Go through the low target.
14492 (do_child_store_inferior_registers): Remove.
14493 (child_store_inferior_registers): Go through the low target.
14494 (win32_resume): Remove debug registers references.
14495 Set context using the low target.
14496 (handle_exception): Change return type to void. Don't record
14497 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14498 first chance exception.
889bf7c5 14499 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14500 goto loop. Always return after waiting for debug event.
14501 (win32_wait): Convert to switch statement. Handle spurious
14502 events.
14503
14504 * win32-i386-low.c (debug_registers_changed,
14505 debug_registers_used): New.
14506 (initial_stuff): Rename to ...
14507 (i386_initial_stuff): ... this. Clear debug registers
14508 state variables.
14509 (store_debug_registers): Delete.
14510 (i386_get_thread_context): New.
14511 (load_debug_registers): Delete.
14512 (i386_set_thread_context): New.
14513 (i386_thread_added): New.
14514 (single_step): Rename to ...
14515 (i386_single_step): ... this.
14516 (do_fetch_inferior_registers): Rename to ...
14517 (i386_fetch_inferior_register): ... this.
14518 (i386_store_inferior_register): New.
14519 (the_low_target): Adapt to new interface.
14520
14521 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14522 (arm_get_thread_context): New.
14523 (arm_set_thread_context): New.
14524 (regptr): New.
14525 (do_fetch_inferior_registers): Rename to ...
14526 (arm_fetch_inferior_register): ... this.
14527 (arm_store_inferior_register): New.
14528 (arm_wince_breakpoint): Reimplement as unsigned long.
14529 (arm_wince_breakpoint_len): Define.
14530 (the_low_target): Adapt to new interface.
14531
14532 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14533 load_debug_registers. Add get_thread_context, set_thread_context,
14534 thread_added and store_inferior_register. Rename
14535 fetch_inferior_registers to fetch_inferior_register.
14536 (regptr): Remove declaration.
14537
dd6953e1
PA
145382007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14539
14540 * linux-low.c (linux_detach): Change return type to int. Return 0.
14541 * spu-low.c (spu_detach): Likewise.
14542
444d6139
PA
145432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14544
14545 * target.h (target_ops): Change return type of detach to int.
14546 Add join.
14547 (join_inferior): New.
14548 * server.c (main): Don't skip detach support on mingw32.
14549 If the inferior doesn't support detaching return error.
14550 Call join_inferior instead of using waitpid.
14551 * linux-low.c (linux_join): New.
14552 (linux_target_op): Add linux_join.
14553 * spu-low.c (spu_join): New.
14554 (spu_target_ops): Add spu_join.
14555 * win32-low.c (win32_detach): Adapt to new interface.
14556 Reopen current_process_handle before detaching. Issue a child
14557 resume before detaching.
14558 (win32_join): New.
14559 (win32_target_op): Add win32_join.
14560
1d5315fe
PA
145612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14562
14563 * win32-low.c (win32-attach): Fix return value.
14564 * target.h (target_ops): Describe ATTACH return values.
14565
bf914831
PA
145662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14567
14568 * win32-low.c (GETPROCADDRESS): Define.
14569 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14570 (winapi_DebugSetProcessKillOnExit): Likewise.
14571 (win32_create_inferior): Force usage of ansi CreateProcessA.
14572 (win32_attach): Use GETPROCADDRESS.
14573 (win32_detach): Likewise.
14574
f72f3e60
PA
145752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14576
14577 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14578
ed50f18f
PA
145792007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14580
14581 * win32-low.c: Commit leftover changes from 2007-03-29.
14582
0c2ead7e
DJ
145832007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14584
14585 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14586 fields short instead of int. Add explicit padding.
14587 (i387_cache_to_fsave): Remove unnecessary casts.
14588 (i387_fsave_to_cache): Doc fix.
14589 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14590
73725ff3
DJ
145912007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14592
14593 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14594 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14595
d99f33d8
PA
145962007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14597
14598 * configure.srv (arm*-*-mingw32ce*): Move near the other
14599 arm targets.
14600
68070c10
PA
146012007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14602
2482afc6 14603 * configure.ac: Add errno checking.
68070c10
PA
14604 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14605 sys/file.h and malloc.h.
14606 (AC_CHECK_DECLS): Add perror.
14607 (srv_mingwce): Handle.
2482afc6 14608 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14609 win32-i386-low.o to srv_tgtobj.
14610 (i[34567]86-*-mingw*): Likewise.
14611 (arm*-*-mingw32ce*): Add case.
14612 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14613 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14614 [__MINGW32CE__] (strerror): New function.
14615 [__MINGW32CE__] (errno): Define to GetLastError.
14616 [__MINGW32CE__] (COUNTOF): New macro.
14617 (remote_open): Remove extra close call.
14618 * mem-break.c (delete_breakpoint_at): New function.
14619 * mem-break.h (delete_breakpoint_at): Declare.
14620 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14621 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14622 [USE_WIN32API] (read, write): Add char* casts.
14623 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14624 * server.h: Include wincecompat.h on Windows CE.
14625 [HAVE_ERRNO_H]: Check.
14626 (perror): Declare if not declared.
14627 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14628 (perror_with_name): Remove errno declaration.
14629 * wincecompat.h: New.
14630 * wincecompat.c: New.
14631 * win32-low.h: New.
14632 * win32-arm-low.c: New.
14633 * win32-i386-low.c: New.
14634 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14635 (OUTMSG2): Make it safe.
14636 (_T): New macro.
14637 (COUNTOF): New macro.
14638 (NUM_REGS): Get it from the low target.
14639 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14640 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14641 (thread_rec): Let low target handle debug registers.
14642 (child_add_thread): Likewise.
14643 (child_init_thread_list): Likewise.
14644 (continue_one_thread): Likewise.
14645 (regptr): New.
14646 (do_child_fetch_inferior_registers): Move to ...
14647 * win32-i386-low.c: ... here, and rename to ...
14648 (do_fetch_inferior_registers): ... this.
889bf7c5 14649 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14650 Go through the low target.
14651 (do_child_store_inferior_registers): Use regptr.
14652 (strwinerror): New function.
14653 (win32_create_inferior): Handle Windows CE.
14654 Use strwinerror instead of strerror on Windows error
14655 codes. Add program to the error output.
14656 Don't close the main thread handle on Windows CE.
14657 (win32_attach): Use coredll.dll on Windows CE.
14658 (win32_kill): Close current process and current
14659 thread handles.
14660 (win32_detach): Use coredll.dll on Windows CE.
14661 (win32_resume): Let low target handle debug registers, and
14662 step request.
14663 (handle_exception): Add/Remove initial breakpoint. Avoid
14664 non-existant WSTOPSIG on Windows CE.
14665 (win32_read_inferior_memory): Cast to remove warning.
14666 (win32_arch_string): Go through the low target.
14667 (initialize_low): Call set_breakpoint_data with the low
14668 target's breakpoint.
14669 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14670 FOP_REGNUM, mappings): Move to ...
14671 * win32-i386-low.c: ... here.
14672 * win32-low.c (win32_thread_info): Move to ...
14673 * win32-low.h: ... here.
14674 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14675 win32-arm-low.c and wincecompat.c.
14676 (all:): Add $EXEEXT.
14677 (install-only:): Likewise.
14678 (gdbserver:): Likewise.
14679 (gdbreplay:): Likewise.
14680 * config.in: Regenerate.
14681 * configure: Regenerate.
14682
41093d81
PA
146832007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14684
14685 * win32-low.c: Rename typedef thread_info to
14686 win32_thread_info throughout.
14687
544afa54
PA
146882007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14689
14690 * win32-i386-low.c: Rename to ...
14691 * win32-low.c: ... this.
14692 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14693 * Makefile.in: Likewise.
14694
bce7165d
PA
146952007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14696
14697 * remote-utils.c (monitor_output): Constify msg parameter.
14698 * server.h (monitor_output): Likewise.
14699 * win32-i386-low.c (handle_output_debug_string): New.
14700 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14701 handle_output_debug_string.
14702 (get_child_debug_event): Likewise.
14703
506c7aa0
DJ
147042007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14705
14706 * server.c (main): Correct strtoul check.
14707
42c81e2a
DJ
147082007-03-27 Jon Ringle <jon@ringle.org>
14709
14710 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14711
9453113a
DJ
147122007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14713
14714 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14715
64a69107
DJ
147162007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14717
14718 * terminal.h: Check HAVE_SGTTY_H.
14719
147202007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14721
14722 * remote-utils.c (remote_open): Print out the assigned port number.
14723
c74d0ad8
DJ
147242007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14725
14726 * remote-utils.c (monitor_output): New function.
14727 * server.c (debug_threads): Define here.
14728 (monitor_show_help): New function.
14729 (handle_query): Handle qRcmd.
14730 (main): Do not handle 'd' packet.
14731 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14732 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14733 of debug_threads.
14734
de7c3b4a
PA
147352007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14736
14737 * Makefile.in (EXEEXT): New.
14738 (clean): Use $(EXEEXT).
14739
ef57601b
PA
147402007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14741
14742 * target.h (target_ops): Rename send_signal to request_interrupt,
14743 and remove enum target_signal parameter.
14744 * linux-low.c (linux_request_interrupt): Rename from
14745 linux_send_signal, and always send SIGINT.
14746 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14747 and always send SIGINT.
14748 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14749 of send_signal.
14750 (input_interrupt): Likewise.
14751
820f2bda
PA
147522007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14753
14754 * server.c (get_features_xml): Check if target implemented
14755 arch_string.
14756 * win32-i386-low.c (win32_arch_string): New.
14757 (win32_target_ops): Add win32_arch_string as arch_string member.
14758
ab39bf24
UW
147592007-02-22 Markus Deuling <deuling@de.ibm.com>
14760
14761 * spu-low.c (spu_arch_string): New.
14762 (spu_target_ops): Add spu_arch_string.
14763
61ff6e04
DJ
147642007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14765
14766 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14767 * configure.ac: Do not check for terminal.h.
14768 * configure, config.in: Regenerated.
14769
fb1e4ffc
DJ
147702007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14771
14772 * Makefile.in (OBS): Add $(XML_BUILTIN).
14773 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14774 (clean): Update.
14775 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14776 (arm-with-iwmmxt.c): New.
14777 * config.in, configure: Regenerate.
14778 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14779 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14780 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14781 (arm*-*-linux*): Add iWMMXt and regset support.
14782 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14783 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14784 (arm_store_wmmxregset, target_regsets): New.
14785 * server.c (get_features_xml): Take annex argument. Check builtin
14786 XML documents.
14787 (handle_query): Handle multiple annexes.
14788
0f48aa01
DJ
147892007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14790
14791 * remote-utils.c [USE_WIN32API] (read, write): Define.
14792 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14793 write.
14794
23181151
DJ
147952007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14796
14797 * linux-i386-low.c (the_low_target): Set arch_string.
14798 * linux-x86-64-low.c (the_low_target): Likewise.
14799 * linux-low.c (linux_arch_string): New.
14800 (linux_target_ops): Add it.
14801 * linux-low.h (struct linux_target_ops): Add arch_string.
14802 * server.c (write_qxfer_response): Use const void * for DATA.
14803 (get_features_xml): New.
14804 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14805 * target.h (struct target_ops): Add arch_string method.
14806
9d606399
DJ
148072007-01-03 Denis Pilat <denis.pilat@st.com>
14808 Daniel Jacobowitz <dan@codesourcery.com>
14809
14810 * linux-low.c (linux_kill): Handle being called with no threads.
14811 * win32-i386-low.c (win32_kill): Likewise.
14812 (get_child_debug_event): Clear current_process_handle.
14813
148142006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14815 Daniel Jacobowitz <dan@codesourcery.com>
14816
14817 * remote-utils.c (remote_open): Check the type of specified
14818 serial port devices before opening them.
14819 * server.c (main): Kill the inferior if an error occurs during
14820 the first remote_open.
14821
a5e13d24
DJ
148222006-12-05 Markus Deuling <deuling@de.ibm.com>
14823
14824 * README: Update supported targets.
14825
186947f7
DJ
148262006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14827
14828 * Makefile.in (clean): Remove reg-mips64.c.
14829 (reg-mips64.c, reg-mips64.o): New rules.
14830 * configure.srv: Handle mips64. Include regset support for mips.
14831 * linux-mips-low.c (union mips_register): New.
14832 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14833 (mips_breakpoint, mips_breakpoint_at): Use int.
14834 (mips_collect_register, mips_supply_register)
14835 (mips_collect_register_32bit, mips_supply_register_32bit)
14836 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14837 (mips_store_fpregset, target_regsets): New.
14838 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14839
a13e2c95
UW
148402006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14841
14842 * configure.srv: Add target "spu*-*-*".
14843 * Makefile.in (clean): Remove reg-spu.c.
14844 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14845 * spu-low.c: New file.
14846
cb7283db
DJ
148472006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14848
14849 * configure.ac: Correct td_thr_tls_get_addr test.
14850 * configure: Regenerated.
14851
89be2091
DJ
148522006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14853
14854 * linux-low.c (linux_wait_for_event): Reformat. Use the
14855 pass_signals array.
14856 * remote-utils.c (decode_address_to_semicolon): New.
14857 * server.c (pass_signals, handle_general_set): New.
14858 (handle_query): Mention QPassSignals for qSupported.
14859 (main): Call handle_general_set.
14860 * server.h (pass_signals, decode_address_to_semicolon): New.
14861
000ef4f0
DJ
148622006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14863
14864 * server.c (handle_query): Correct error handling for read_auxv.
14865
b7149293
UW
148662005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14867
14868 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14869 and srv_linux_thread_db to yes.
14870 * linux-s390-low.c (s390_fill_gregset): New function.
14871 (target_regsets): Define data structure.
14872
dae5f5cf
DJ
148732006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14874
14875 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14876 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14877 * config.in, configure: Regenerated.
14878 * inferiors.c (gdb_id_to_thread): New function.
14879 (gdb_id_to_thread_id): Use it.
14880 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14881 * linux-low.h (struct process_info): Add th member.
14882 (thread_db_get_tls_address): New prototype.
14883 * remote-utils.c (decode_address): Make non-static.
14884 * server.c (handle_query): Handle qGetTLSAddr.
14885 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14886 * target.h (struct target_ops): Add get_tls_address.
14887 * thread-db.c (maybe_attach_thread): Save the thread handle.
14888 (thread_db_get_tls_address): New.
14889
32ca6d61
DJ
148902006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14891
14892 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14893 (linux_resume_one_process): Take a siginfo_t *. Update all
14894 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14895 (struct pending_signals): Add a siginfo_t.
14896 (linux_wait_for_process): Always set last_status.
14897 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14898 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14899 * linux-low.h (struct process_info): Add last_status.
14900
5ffff7c1
DJ
149012006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14902
14903 * remote-utils.c (try_rle): New function.
14904 (putpkt_binary): Use it.
14905
8695c747
DJ
149062006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14907
14908 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14909 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14910 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14911 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14912 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14913 point registers.
14914
290fadea
RS
149152006-08-08 Richard Sandiford <richard@codesourcery.com>
14916
14917 * server.c (terminal_fd): New variable.
14918 (old_foreground_pgrp): Likewise.
14919 (restore_old_foreground_pgrp): New function.
14920 (start_inferior): Record the terminal file descriptor in terminal_fd
14921 and its original foreground group in old_foreground_pgrp. Register
14922 restore_old_foreground_pgrp with atexit().
14923
9f2e1e63
DJ
149242006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14925
14926 * server.c (handle_query): Correct qPart to qXfer.
14927
b80864fb
DJ
149282006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14929
14930 * configure.ac: Check for more headers which are missing on
14931 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14932 * configure.srv: Add Cygwin and mingw32.
14933 * remote-utils.c: Don't include headers unconditionally which
14934 are missing on mingw32. Include <winsock.h> for mingw32.
14935 (remote_open): Adjust for mingw32 support. Flush
14936 standard error after writing to it.
14937 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14938 (unblock_async_io, enable_async_io, disable_async_io)
14939 (readchar, getpkt): Update for Winsock support.
14940 (prepare_resume_reply): Expect a protocol signal number.
14941 * server.c: Disable <sys/wait.h> on mingw32.
14942 (start_inferior): Adjust for mingw32 support. Flush
14943 standard error after writing to it.
14944 (attach_inferior): Likewise. Use protocol signal
14945 numbers.
14946 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14947 and names.
14948 * win32-i386-low.c: New file.
14949 * Makefile.in (XM_CLIBS): Set.
14950 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14951 (win32-i386-low.o): New dependency rule.
14952 * linux-low.c (linux_wait): Use target signal numbers.
14953 * target.h (struct target_ops): Doc fix.
14954 * server.h (target_signal_to_name): New prototype.
14955 * gdbreplay.c: Don't include headers unconditionally which
14956 are missing on mingw32. Include <winsock.h> for mingw32.
14957 (remote_close, remote_open): Adjust for Winsock support.
14958 * configure, config.in: Regenerated.
14959
0876f84a
DJ
149602006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14961
14962 * server.c (decode_xfer_read, write_qxfer_response): New.
14963 (handle_query): Take a packet length argument. Handle
14964 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14965 the qSupported response.
14966 (main): Update call to handle_query.
14967
01f9e8fa
DJ
149682006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14969
14970 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14971 (putpkt_binary): Renamed from putpkt and adjusted for binary
14972 data.
14973 (putpkt): New wrapper for putpkt_binary.
14974 (readchar): Don't mask off the high bit.
14975 (decode_X_packet): New function.
14976 * server.c (main): Call putpkt_binary if a handler sets the packet
14977 length. Save the length of the incoming packet. Handle 'X'.
14978 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14979
be2a5f71
DJ
149802006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14981
14982 * server.c (handle_query): Handle qSupported.
14983
ea025f5f
DJ
149842006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14985
14986 * remote-utils.c (all_symbols_looked_up): New variable.
14987 (look_up_one_symbol): Check it.
14988 * server.h (look_up_one_symbol): New declaration.
14989 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14990
9308fc88
DJ
149912006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14992
14993 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14994 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14995 (PTRACE_GET_THREAD_AREA): Define.
14996 (ps_get_thread_area): New function.
14997
52fb6437
NS
149982006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14999
15000 * configure.srv (m68k*-*-uclinux*): New target.
15001 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15002 (linux_resume_one_process): Remove extraneous cast.
15003 (linux_read_offsets): New.
15004 (linux_target_op): Add linux_read_offsets on mmuless systems.
15005 * server.c (handle_query): Add qOffsets logic.
15006 * target.h (struct target_ops): Add read_offsets.
15007
21b0f40c
DJ
150082006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15009
15010 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15011 (PTRACE_GET_THREAD_AREA): Define.
15012 (ps_get_thread_area): New function.
15013 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15014 (linux-x86-64-low.o): Update.
15015
0050a760
DJ
150162006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15017
15018 * configure.ac: Remove checks for prfpregset_t.
15019 * gdb_proc_service.h: New file.
15020 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15021 new "gdb_proc_service.h".
15022 * proc-service.c: Likewise.
15023 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15024 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15025 * Makefile.in (gdb_proc_service_h): Updated.
15026 * configure, config.in: Regenerated.
15027
b92a518e
DJ
150282006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15029
15030 * remote-utils.c (prepare_resume_reply): Move declaration
15031 of gdb_id_from_wait to the top of the block.
15032
545587ee
DJ
150332006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15034
15035 * linux-low.c (regsets_store_inferior_registers): Read the regset
15036 from the target before filling it.
15037
9db87ebd
DJ
150382006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15039
15040 * server.c (attach_inferior): Return SIGTRAP for a successful
15041 attach.
15042
dd24457d
DJ
150432006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15044
15045 * Makefile.in (OBS): Add version.o.
15046 (STAGESTUFF): Delete.
15047 (version.o): Add dependencies.
15048 (version.c): Replace rule.
15049 (clean): Remove version.c.
15050 * server.c (gdbserver_version): New.
15051 (gdbserver_usage): Use printf.
15052 (main): Handle --version and --help.
15053 * server.h (version, host_name): Add declarations.
15054
6f0f660e
EZ
150552005-12-23 Eli Zaretskii <eliz@gnu.org>
15056
889bf7c5
PA
15057 * linux-arm-low.c:
15058 * linux-arm-low.c:
15059 * inferiors.c:
15060 * i387-fp.h:
15061 * i387-fp.c:
15062 * gdbreplay.c:
15063 * regcache.c:
15064 * proc-service.c:
15065 * mem-break.h:
15066 * mem-break.c:
15067 * linux-x86-64-low.c:
15068 * linux-sh-low.c:
15069 * linux-s390-low.c:
15070 * linux-ppc64-low.c:
15071 * linux-ppc-low.c:
15072 * linux-mips-low.c:
15073 * linux-m68k-low.c:
15074 * linux-m32r-low.c:
15075 * linux-low.h:
15076 * linux-low.c:
15077 * linux-ia64-low.c:
15078 * linux-i386-low.c:
15079 * linux-crisv32-low.c:
15080 * thread-db.c:
15081 * terminal.h:
15082 * target.h:
15083 * target.c:
15084 * server.h:
15085 * server.c:
15086 * remote-utils.c:
15087 * regcache.h:
15088 * utils.c:
15089 * Makefile.in:
15090 * configure.ac:
6f0f660e
EZ
15091 * gdbserver.1: Add (C) after Copyright. Update the FSF
15092 address.
15093
9d1fb177
DJ
150942005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15095
15096 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15097 (arm_breakpoint_at): Recognize both breakpoints.
15098 (the_low_target): Use the correct breakpoint instruction.
15099
011a70c2
DJ
151002005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15101
15102 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15103 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15104 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15105 (the_low_target): Update.
15106
7fb85e41
AS
151072005-10-25 Andreas Schwab <schwab@suse.de>
15108
15109 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15110
15111 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15112 (ia64_num_regs): Reduce to 462.
15113
3db0444b
DJ
151142005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15115
15116 * acinclude.m4: Correct quoting.
15117 * aclocal.m4: Regenerated.
15118
15119 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15120 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15121 (thread_db_init): Call thread_db_err_str.
15122 * configure.ac: Check for TD_VERSION.
15123 * config.in, configure: Regenerated.
15124
bee0189a
DJ
151252005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15126
15127 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15128
e9d25b98
DJ
151292005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15130
15131 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15132 is not available. Define HAVE_PTRACE_GETREGS if it is.
15133 * config.in, configure: Regenerated.
15134 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15135 * linux-i386-low.c, linux-m68k-low.c: Update to use
15136 HAVE_PTRACE_GETREGS.
15137 * linux-low.c (regsets_fetch_inferior_registers)
15138 (regsets_store_inferior_registers): Only return 0 if we processed
15139 GENERAL_REGS.
15140 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15141 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15142
a06660f7
DJ
151432005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15144
15145 * inferiors.c (struct thread_info): Add gdb_id.
15146 (add_thread): Add gdb_id argument.
15147 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15148 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15149 calls to add_thread.
15150 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15151 * server.c (handle_query): Use thread_to_gdb_id.
15152 (handle_v_cont, main): Use gdb_id_to_thread_id.
15153 * server.h (add_thread): Update prototype.
15154 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15155 prototypes.
15156
5a1f5858
DJ
151572005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15158
15159 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15160 left-padded registers.
15161 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15162 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15163
e122f1f5
SE
151642005-07-01 Steve Ellcey <sje@cup.hp.com>
15165
15166 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15167 * configure: Regenerate.
15168 * config.in: Regenerate.
15169 * server.h (NEED_DECLARATION_STRERROR):
15170 Replace with !HAVE_DECL_STRERROR.
15171
d592fa2f
DJ
151722005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15173
15174 * linux-low.c (linux_wait, linux_send_signal): Don't test
15175 an unsigned long variable for > 0 if it could be MAX_ULONG.
15176 * server.c (myresume): Likewise.
15177 * target.c (set_desired_inferior): Likewise.
15178
ccbd4912
MK
151792005-06-13 Mark Kettenis <kettenis@gnu.org>
15180
15181 * configure.ac: Simplify and improve check for socklen_t.
15182 * configure, config.in: Regenerate.
15183
f450004a
DJ
151842005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15185
15186 * acconfig.h: Remove.
15187 * configure.ac: Add a test for socklen_t. Use three-argument
15188 AC_DEFINE throughout.
15189 * config.in: Regenerated using autoheader 2.59.
15190 * configure: Regenerated.
15191
15192 * gdbreplay.c (socklen_t): Provide a default.
15193 (remote_open): Use socklen_t.
15194 * remote-utils.c (socklen_t): Provide a default.
15195 (remote_open): Use socklen_t.
15196 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15197 unsigned char.
15198
15199 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15200 char for buffers.
15201 * linux-low.c (linux_read_memory, linux_write_memory)
15202 (linux_read_auxv): Likewise.
15203 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15204 (check_mem_write): Likewise.
15205 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15206 Likewise.
15207 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15208 (registers_from_string, register_data): Likewise.
15209 * server.c (handle_query, main): Likewise.
15210 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15211 (decode_M_packet): Likewise.
15212 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15213 * target.h (struct target_ops): Update read_memory, write_memory,
15214 and read_auxv.
15215 (read_inferior_memory, write_inferior_memory): Update.
15216 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15217 to unsigned char *.
15218 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15219 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15220 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15221 linux-s390-low.c, linux-sh-low.c: Update for changes in
15222 read_inferior_memory and the_low_target->breakpoint.
15223
eee84df1
DJ
152242005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15225
15226 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15227 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15228 * configure.srv: Add powerpc64-*-linux*.
15229 * linux-ppc64-low.c: New file.
15230
45b134e5
OF
152312005-05-23 Orjan Friberg <orjanf@axis.com>
15232
15233 * linux-cris-low.c: New file with support for CRIS.
15234 * linux-crisv32-low.c: Ditto for CRISv32.
15235 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15236 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15237 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15238 reg-crisv32.o, and reg-crisv32.c to make rules.
15239 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15240 recognized targets.
15241
48d93c75
UW
152422005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15243
15244 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15245 of sizeof (PTRACE_XFER_TYPE).
15246 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15247
e013ee27
OF
152482005-05-12 Orjan Friberg <orjanf@axis.com>
15249
889bf7c5 15250 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15251 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15252 pointers for hardware watchpoint support.
15253 * linux-low.h (struct linux_target_ops): Ditto.
15254 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15255 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15256 to linux_target_ops.
15257 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15258 reply packet.
15259 * server.c (main): Recognize 'Z' and 'z' packets.
15260
b0ded00b
UW
152612005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15262
15263 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15264 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15265 (the_low_target): Add new members.
15266
8643e2ad
DJ
152672005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15268
15269 * proc-service.c (ps_lgetregs): Search all_processes instead of
15270 all_threads.
15271
fc620387
DJ
152722005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15273
15274 * server.c (start_inferior): Change return type to int.
15275 (attach_inferior): Change sigptr to int *.
15276 (handle_v_cont, handle_v_requests): Change signal to int *.
15277 (main): Change signal to int.
15278
152792005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15280
15281 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15282 * configure.srv: Add m32r*-*-linux*.
15283 * linux-m32r-low.c: New file.
15284
e0e76420
DJ
152852005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15286
15287 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15288
a1928bad
DJ
152892005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15290
15291 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15292 Take unsigned long arguments for PIDs.
15293 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15294 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15295 (wait_for_sigstop, linux_resume_one_process)
15296 (regsets_fetch_inferior_registers, linux_send_signal)
15297 (linux_read_auxv): Likewise. Update the types of variables holding
15298 PIDs. Update format string specifiers.
15299 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15300 * remote-utils.c (prepare_resume_reply): Likewise.
15301 * server.c (cont_thread, general_thread, step_thread)
15302 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15303 unsigned long.
15304 (handle_query): Update format specifiers.
15305 (handle_v_cont, main): Use strtoul for thread IDs.
15306 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15307 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15308 (general_thread, step_thread, thread_from_wait)
15309 (old_thread_from_wait): Update.
15310 * target.h (struct thread_resume): Use unsigned long for THREAD.
15311 (struct target_ops): Use unsigned long for arguments to attach and
15312 thread_alive.
15313
dcdb98d2
DJ
153142005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15315
15316 * acinclude.m4: Include bfd/bfd.m4 directly.
15317 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15318 <agriffis@toolchain.org>.
15319 * aclocal.m4, configure: Regenerated.
15320
bec39cab
AC
153212005-01-07 Andrew Cagney <cagney@gnu.org>
15322
15323 * configure.ac: Rename configure.in, require autoconf 2.59.
15324 * configure: Re-generate.
15325
434c4c77
DJ
153262004-12-08 Daniel Jacobowitz <dan@debian.org>
15327
15328 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15329 LIBS when finished.
15330 * aclocal.m4: Regenerated.
15331 * configure: Regenerated.
15332
db1d3e1b
AS
153332004-11-21 Andreas Schwab <schwab@suse.de>
15334
15335 * linux-m68k-low.c (m68k_num_gregs): Define.
15336 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15337 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15338 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15339 (m68k_breakpoint_at): New. Add to the_low_target.
15340
15341 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15342 srv_linux_thread_db to yes.
15343
43360365
JB
153442004-10-20 Joel Brobecker <brobecker@gnat.com>
15345
15346 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15347 (ARCH_SET_FS): Likewise.
15348 (ARCH_GET_FS): Likewise.
15349 (ARCH_GET_GS): Likewise.
15350
fd500816
DJ
153512004-10-16 Daniel Jacobowitz <dan@debian.org>
15352
15353 * linux-i386-low.c (ps_get_thread_area): New.
15354 * linux-x86-64-low.c (ps_get_thread_area): New.
15355 * linux-low.c: Include <sys/syscall.h>.
15356 (linux_kill_one_process): Don't kill the first thread here.
15357 (linux_kill): Kill the first thread here.
15358 (kill_lwp): New function.
15359 (send_sigstop, linux_send_signal): Use it.
15360 * proc-service.c: Clean up #ifdefs.
15361 (fpregset_info): Delete.
15362 (ps_lgetregs): Update and enable implementation.
15363 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15364 implementations.
15365 * remote-utils.c (struct sym_cache, symbol_cache): New.
15366 (input_interrupt): Print a clearer message.
15367 (async_io_enabled): New variable.
15368 (enable_async_io, disable_async_io): Use it. Update comments.
15369 (look_up_one_symbol): Use the symbol cache.
15370 * thread-db.c (thread_db_look_up_symbols): New function.
15371 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15372
f6de3c42
DJ
153732004-10-16 Daniel Jacobowitz <dan@debian.org>
15374
15375 * configure.in: Test for -rdynamic.
15376 * configure: Regenerated.
15377 * Makefile (INTERNAL_LDFLAGS): New.
15378 (gdbserver, gdbreplay): Use it.
15379
2c0fc042
AC
153802004-09-02 Andrew Cagney <cagney@gnu.org>
15381
15382 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15383
075b3282
DJ
153842004-03-23 Daniel Jacobowitz <drow@mvista.com>
15385
15386 * linux-low.c (linux_wait): Clear all_processes list also.
15387
fa6a77dc
DJ
153882004-03-12 Daniel Jacobowitz <drow@mvista.com>
15389
15390 * linux-low.c: Include <errno.h>. Remove extern declaration of
15391 errno.
15392
6d782a97
DJ
153932004-03-12 Daniel Jacobowitz <drow@mvista.com>
15394
15395 * gdbreplay.c, server.h, utils.c: Update copyright years.
15396
3a7fb99b
DJ
153972004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15398
15399 * server.c (main): Print child status or termination signal from
15400 variable 'signal', not 'sig'.
15401
c3e735a6
DJ
154022004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15403
15404 * linux-low.c (linux_read_memory): Change return type to
15405 int. Check for and return error from ptrace().
15406 * target.c (read_inferior_memory): Change return type to int. Pass
15407 back return status from the_target->read_memory().
15408 * target.h (struct target_ops): Adapt *read_memory() prototype.
15409 Update comment.
15410 (read_inferior_memory): Adapt prototype.
15411 * server.c (main): Return an error packet if
15412 read_inferior_memory() returns an error.
15413
a59d1c82
DJ
154142004-03-04 Daniel Jacobowitz <drow@mvista.com>
15415
15416 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15417 Unify with other clean targets.
15418
dc3f8883
DJ
154192004-02-29 Daniel Jacobowitz <drow@mvista.com>
15420
15421 * server.c (handle_v_cont): Call set_desired_inferior.
15422
89a208da
DJ
154232004-02-29 Daniel Jacobowitz <drow@mvista.com>
15424
15425 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15426
62ea82f5
DJ
154272004-02-29 Daniel Jacobowitz <drow@mvista.com>
15428
15429 * linux-low.c (linux_wait): Unblock async I/O.
15430 (linux_resume): Block and enable async I/O.
15431 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15432 * server.h (block_async_io, unblock_async_io): Add prototypes.
15433
6910d122
DJ
154342004-02-29 Daniel Jacobowitz <drow@mvista.com>
15435
15436 * remote-utils.c (remote_open): Print a status notice after
15437 opening a TCP port.
15438 * server.c (attach_inferior): Print a status notice after
15439 attaching.
15440
154412004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15442
15443 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15444
c89dc5d4
DJ
154452004-02-26 Daniel Jacobowitz <drow@mvista.com>
15446
15447 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15448 error packet.
15449 * server.c, target.h: Update copyright years.
15450
4b8dad4a
RM
154512004-02-25 Roland McGrath <roland@redhat.com>
15452
15453 * target.h (struct target_ops): New member `read_auxv'.
15454 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15455 * linux-low.c (linux_read_auxv): New function.
15456 (linux_target_ops): Initialize `read_auxv' member to that.
15457
d7446758
JB
154582004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15459
15460 Committed by Jim Blandy <jimb@redhat.com>.
15461
15462 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15463 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15464 instead of GPR_SIZE to distiguish s390 and s390x targets.
15465
5544ad89
DJ
154662004-01-31 Daniel Jacobowitz <drow@mvista.com>
15467
15468 * linux-low.c: Update copyright year.
15469 (check_removed_breakpoint): Clear pending_is_breakpoint.
15470 (linux_set_resume_request, linux_queue_one_thread)
15471 (resume_status_pending_p): New functions.
15472 (linux_continue_one_thread): Use process->resume.
15473 (linux_resume): Only resume threads if there are no pending events.
15474 * linux-low.h (struct process_info): Add resume request
15475 pointer.
15476
2a68b70e
DJ
154772004-01-30 Daniel Jacobowitz <drow@mvista.com>
15478
15479 * regcache.c (new_register_cache): Clear the allocated register
15480 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15481
64386c31
DJ
154822003-10-13 Daniel Jacobowitz <drow@mvista.com>
15483
15484 * linux-low.c (linux_resume): Take a struct thread_resume *
15485 argument.
15486 (linux_wait): Update call.
15487 (resume_ptr): New static variable.
15488 (linux_continue_one_thread): Renamed from
15489 linux_continue_one_process. Use resume_ptr.
15490 (linux_resume): Use linux_continue_one_thread.
15491 * server.c (handle_v_cont, handle_v_requests): New functions.
15492 (myresume): New function.
15493 (main): Handle 'v' case.
15494 * target.h (struct thread_resume): New type.
15495 (struct target_ops): Change argument of "resume" to struct
15496 thread_resume *.
15497 (myresume): Delete macro.
15498
c938e9b0
L
154992003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15500
15501 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15502 (uninstall): Support DESTDIR.
15503
7f313d07
BC
15504Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15505
15506 * configure.srv: Add xscale*linux copy of arm*linux entry.
15507
3b2fc2ea
DJ
155082003-07-24 Daniel Jacobowitz <drow@mvista.com>
15509
15510 * linux-arm-low.c (arm_reinsert_addr): New function.
15511 (the_low_target): Add arm_reinsert_addr.
15512
1c0a559e
MK
155132003-07-08 Mark Kettenis <kettenis@gnu.org>
15514
15515 * mem-break.c: Remove whitespace at end of file.
15516
43d5792c
DJ
155172003-06-28 Daniel Jacobowitz <drow@mvista.com>
15518
15519 * configure.in: Check whether we need to prototype strerror.
15520 * server.h: Optionally prototype strerror.
15521 * gdbreplay.c (perror_with_name): Use strerror.
15522 * linux-low.c (linux_attach_lwp): Use strerror.
15523 * utils.c (perror_with_name): Use strerror.
15524 * config.in, configure: Regenerated.
15525
c8a86edf
DJ
155262003-06-28 Daniel Jacobowitz <drow@mvista.com>
15527
15528 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15529 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15530
73d37363
DJ
155312003-06-20 Daniel Jacobowitz <drow@mvista.com>
15532
15533 * Makefile.in (SFILES): Update.
15534 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15535 low-sun3.c: Remove files.
15536
6ad8ae5c
DJ
155372003-06-17 Daniel Jacobowitz <drow@mvista.com>
15538
15539 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15540 (linux_detach_one_process, linux_detach): New functions.
15541 (linux_target_ops): Add linux_detach.
15542 * server.c (main): Handle 'D' packet.
15543 * target.h (struct target_ops): Add "detach" member.
15544 (detach_inferior): Define.
15545
1581182a
MK
155462003-06-13 Mark Kettenis <kettenis@gnu.org>
15547
15548 From Kelley Cook <kelleycook@wideopenwest.com>:
15549 * configure.srv: Accept i[34567]86 variants.
15550
e5379b03
DJ
155512003-06-05 Daniel Jacobowitz <drow@mvista.com>
15552
15553 * linux-low.c (linux_wait_for_event): Correct comment typos.
15554 (linux_resume_one_process): Call check_removed_breakpoint.
15555 (linux_send_signal): New function.
15556 (linux_target_ops): Add linux_send_signal.
15557 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15558 of kill.
15559 * target.h (struct target_ops): Add send_signal.
15560
2ff29de4
JB
155612003-05-29 Jim Blandy <jimb@redhat.com>
15562
15563 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15564 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15565 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15566 away part of the register's value.
15567
254787d4
DJ
155682003-03-26 Daniel Jacobowitz <drow@mvista.com>
15569
15570 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15571 (linux_wait_for_event, linux_init_signals): Likewise.
15572
94e10508
DJ
155732003-03-17 Daniel Jacobowitz <drow@mvista.com>
15574
15575 * configure.in: Check for stdlib.h.
15576 * configure: Regenerated.
15577 * config.in: Regenerated.
15578
4c0711e0
DJ
155792003-01-04 Andreas Schwab <schwab@suse.de>
15580
15581 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15582
ef66e766
AC
155832003-01-02 Andrew Cagney <ac131313@redhat.com>
15584
15585 * Makefile.in: Remove obsolete code.
15586
a1358604
DJ
155872002-11-20 Daniel Jacobowitz <drow@mvista.com>
15588
15589 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15590 defined(PT_FPR0_HI).
15591
23ce3b1c
DJ
155922002-11-17 Stuart Hughes <seh@zee2.com>
15593
15594 * linux-arm-low.c (arm_num_regs): Increase.
15595 (arm_regmap): Include status register.
15596
155972002-11-17 Daniel Jacobowitz <drow@mvista.com>
15598
15599 * linux-low.c (register_addr): Remove incorrect -1 check.
15600
a9fa9f7d
DJ
156012002-08-29 Daniel Jacobowitz <drow@mvista.com>
15602
15603 * linux-low.c (linux_create_inferior): Call setpgid. Return
15604 the new PID.
15605 (unstopped_p, linux_signal_pid): Remove.
15606 (linux_target_ops): Remove linux_signal_pid.
15607 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15608 global instead of target method.
15609 * target.h (struct target_ops): Remove signal_pid. Update comment
15610 for create_inferior.
15611 * server.c (signal_pid): New variable.
15612 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15613 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15614 (attach_inferior): Set signal_pid.
15615
17574093
DJ
156162002-08-23 Daniel Jacobowitz <drow@mvista.com>
15617
15618 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15619
156202002-08-20 Jim Blandy <jimb@redhat.com>
15621
15622 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15623 default for this.
15624
156252002-08-01 Andrew Cagney <cagney@redhat.com>
15626
15627 * Makefile.in: Make chill references obsolete.
15628
156292002-07-24 Kevin Buettner <kevinb@redhat.com>
15630
15631 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15632 * configure: Regenerate.
15633 * config.in: Regenerate.
15634
156352002-07-09 David O'Brien <obrien@FreeBSD.org>
15636
15637 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15638 (perror_with_name, remote_close, remote_open, expect, play): Static.
15639
156402002-07-04 Michal Ludvig <mludvig@suse.cz>
15641
4b8dad4a 15642 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15643 byte offsets instead of an array of indexes.
15644 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15645
156462002-06-13 Daniel Jacobowitz <drow@mvista.com>
15647
15648 * regcache.c: Add comment.
15649
156502002-06-11 Daniel Jacobowitz <drow@mvista.com>
15651
15652 * thread-db.c: New file.
15653 * proc-service.c: New file.
15654 * acinclude.m4: New file.
15655 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15656 proc-service.o, and thread-db.o.
15657 (linux-low.o): Add USE_THREAD_DB.
15658 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15659 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15660 * aclocal.m4: Regenerated.
15661 * config.in: Regenerated.
15662 * configure: Regenerated.
15663 * configure.in: Check for proc_service.h, sys/procfs.h,
15664 thread_db.h, and linux/elf.h headrs.
15665 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15666 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15667 Check for -lthread_db and thread support.
15668 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15669 PowerPC, and SuperH.
15670 * i387-fp.c: Constify arguments.
15671 * i387-fp.h: Likewise.
15672 * inferiors.c: (struct thread_info): Renamed from
15673 `struct inferior_info'. Remove PID member. Use generic inferior
15674 list header. All uses updated.
15675 (inferiors, signal_pid): Removed.
15676 (all_threads): New variable.
15677 (get_thread): Define.
15678 (add_inferior_to_list): New function.
15679 (for_each_inferior): New function.
15680 (change_inferior_id): New function.
15681 (add_inferior): Removed.
15682 (remove_inferior): New function.
15683 (add_thread): New function.
15684 (free_one_thread): New function.
15685 (remove_thread): New function.
15686 (clear_inferiors): Use for_each_inferior and free_one_thread.
15687 (find_inferior): New function.
15688 (find_inferior_id): New function.
15689 (inferior_target_data): Update argument type.
15690 (set_inferior_target_data): Likewise.
15691 (inferior_regcache_data): Likewise.
15692 (set_inferior_regcache_data): Likewise.
15693 * linux-low.c (linux_bp_reinsert): Remove.
15694 (all_processes, stopping_threads, using_thrads)
15695 (struct pending_signals, debug_threads, pid_of): New.
15696 (inferior_pid): Replace with macro.
15697 (struct inferior_linux_data): Remove.
15698 (get_stop_pc, add_process): New functions.
15699 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15700 Use add_process and add_thread.
15701 (linux_attach_lwp): New function, based on old linux_attach. Use
15702 add_process and add_thread. Set stop_expected for new threads.
15703 (linux_attach): New function.
15704 (linux_kill_one_process): New function.
15705 (linux_kill): Kill all LWPs.
15706 (linux_thread_alive): Use find_inferior_id.
15707 (check_removed_breakpoints, status_pending_p): New functions.
15708 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15709 Update. Use WNOHANG. Wait for cloned processes also. Update process
15710 struct for the found process.
15711 (linux_wait_for_event): New function.
15712 (linux_wait): Use it. Support LWPs.
15713 (send_sigstop, wait_for_sigstop, stop_all_processes)
15714 (linux_resume_one_process, linux_continue_one_process): New functions.
15715 (linux_resume): Support LWPs.
15716 (REGISTER_RAW_SIZE): Remove.
15717 (fetch_register): Use register_size instead. Call supply_register.
15718 (usr_store_inferior_registers): Likewise. Call collect_register.
15719 Fix recursive case.
15720 (regsets_fetch_inferior_registers): Improve error message.
15721 (regsets_store_inferior_registers): Add debugging.
15722 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15723 (unstopped_p, linux_signal_pid): New functions.
15724 (linux_target_ops): Add linux_signal_pid.
15725 (linux_init_signals): New function.
15726 (initialize_low): Call it. Initialize using_threads.
15727 * regcache.c (inferior_regcache_data): Add valid
15728 flag.
15729 (get_regcache): Fetch registers lazily. Add fetch argument
15730 and update all callers.
15731 (regcache_invalidate_one, regcache_invalidate): New
15732 functions.
15733 (new_register_cache): Renamed from create_register_cache.
15734 Return the new regcache.
15735 (free_register_cache): Change argument to a void *.
15736 (registers_to_string, registers_from_string): Call get_regcache
15737 with fetch flag set.
15738 (register_data): Make static. Pass fetch flag to get_regcache.
15739 (supply_register): Call get_regcache with fetch flag clear.
15740 (collect_register): Call get_regcache with fetch flag set.
15741 (collect_register_as_string): New function.
15742 * regcache.h: Update.
15743 * remote-utils.c (putpkt): Flush after debug output and use
15744 stderr.
15745 Handle input interrupts while waiting for an ACK.
15746 (input_interrupt): Use signal_pid method.
15747 (getpkt): Flush after debug output and use stderr.
15748 (outreg): Use collect_register_as_string.
15749 (new_thread_notify, dead_thread_notify): New functions.
15750 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15751 and general_thread.
15752 (look_up_one_symbol): Flush after debug output.
15753 * server.c (step_thread, server_waiting): New variables.
15754 (start_inferior): Don't use signal_pid. Update call to mywait.
15755 (attach_inferior): Update call to mywait.
15756 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15757 (main): Don't fetch/store registers explicitly. Use
15758 set_desired_inferior. Support proposed ``Hs'' packet. Update
15759 calls to mywait.
15760 * server.h: Update.
15761 (struct inferior_list, struct_inferior_list_entry): New.
15762 * target.c (set_desired_inferior): New.
15763 (write_inferior_memory): Constify.
15764 (mywait): New function.
15765 * target.h: Update.
15766 (struct target_ops): New signal_pid method.
15767 (mywait): Removed macro, added prototype.
15768
15769 * linux-low.h (regset_func): Removed.
15770 (regset_fill_func, regset_store_func): New.
15771 (enum regset_type): New.
15772 (struct regset_info): Add type field. Use new operation types.
15773 (struct linux_target_ops): stop_pc renamed to get_pc.
15774 Add decr_pc_after_break and breakpoint_at.
15775 (get_process, get_thread_proess, get_process_thread)
15776 (strut process_info, all_processes, linux_attach_lwp)
15777 (thread_db_init): New.
15778
15779 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15780 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15781 (the_low_target): Add new members.
15782 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15783 (i386_store_fpxregset): Constify.
15784 (target_regsets): Add new kind identifier.
15785 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15786 (i386_set_pc): Add debugging.
15787 (i386_breakpoint_at): New function.
15788 (the_low_target): Add new members.
15789 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15790 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15791 (mips_breakpoint_at): New.
15792 (the_low_target): Add new members.
15793 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15794 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15795 (the_low_target): Add new members.
15796 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15797 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15798 (the_low_target): Add new members.
15799 * linux-x86-64-low.c (target_regsets): Add new kind
15800 identifier.
15801
158022002-05-15 Daniel Jacobowitz <drow@mvista.com>
15803
15804 From Martin Pool <mbp@samba.org>:
15805 * server.c (gdbserver_usage): New function.
15806 (main): Call it.
15807
158082002-05-14 Daniel Jacobowitz <drow@mvista.com>
15809
15810 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15811 stop_at -> stop_pc.
15812
158132002-05-04 Andrew Cagney <ac131313@redhat.com>
15814
15815 * Makefile.in: Remove obsolete code.
15816
158172002-04-24 Michal Ludvig <mludvig@suse.cz>
15818
15819 * linux-low.c (regsets_fetch_inferior_registers),
15820 (regsets_store_inferior_registers): Removed cast to int from
15821 ptrace() calls.
15822 * regcache.h: Added declaration of struct inferior_info.
15823
158242002-04-20 Daniel Jacobowitz <drow@mvista.com>
15825
15826 * inferiors.c (struct inferior_info): Add regcache_data.
15827 (add_inferior): Call create_register_cache.
15828 (clear_inferiors): Call free_register_cache.
15829 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15830 * regcache.c (struct inferior_regcache_data): New.
15831 (registers): Remove.
15832 (get_regcache): New function.
15833 (create_register_cache, free_register_cache): New functions.
15834 (set_register_cache): Don't initialize the register cache here.
15835 (registers_to_string, registers_from_string, register_data): Call
15836 get_regcache.
15837 * regcache.h: Add prototypes.
15838 * server.h: Likewise.
15839
158402002-04-20 Daniel Jacobowitz <drow@mvista.com>
15841
15842 * mem-break.c: New file.
15843 * mem-break.h: New file.
15844 * Makefile.in: Add mem-break.o rule; update server.h
15845 dependencies.
15846 * inferiors.c (struct inferior_info): Add target_data
15847 member.
15848 (clear_inferiors): Free target_data member if set.
15849 (inferior_target_data, set_inferior_target_data): New functions.
15850 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15851 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15852 * linux-low.c (linux_bp_reinsert): New variable.
15853 (struct inferior_linux_data): New.
15854 (linux_create_inferior): Use set_inferior_target_data.
15855 (linux_attach): Likewise. Call add_inferior.
15856 (linux_wait_for_one_inferior): New function.
15857 (linux_wait): Call it.
15858 (linux_write_memory): Add const.
15859 (initialize_low): Call set_breakpoint_data.
15860 * linux-low.h (struct linux_target_ops): Add breakpoint
15861 handling members.
15862 * server.c (attach_inferior): Remove extra add_inferior
15863 call.
15864 * server.h: Include mem-break.h. Update inferior.c
15865 prototypes.
15866 * target.c (read_inferior_memory)
15867 (write_inferior_memory): New functions.
15868 * target.h (read_inferior_memory)
15869 (write_inferior_memory): Change macros to prototypes.
15870 (struct target_ops): Update comments. Add const to write_memory
15871 definition.
15872
158732002-04-11 Daniel Jacobowitz <drow@mvista.com>
15874
15875 * linux-low.c (usr_store_inferior_registers): Support
15876 registers which are allowed to fail to store.
15877 * linux-low.h (linux_target_ops): Likewise.
15878 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15879 (ppc_cannot_store_register): FPSCR may not be storable.
15880
158812002-04-09 Daniel Jacobowitz <drow@mvista.com>
15882
15883 * server.h: Include <string.h> if HAVE_STRING_H.
15884 * ChangeLog: Correct paths in last ChangeLog entry.
15885
158862002-04-09 Daniel Jacobowitz <drow@mvista.com>
15887
15888 * linux-low.h: Remove obsolete prototypes.
15889 (struct linux_target_ops): New.
15890 (extern the_low_target): New.
15891 * linux-low.c (num_regs, regmap): Remove declarations.
15892 (register_addr): Use the_low_target explicitly.
15893 (fetch_register): Likewise.
15894 (usr_fetch_inferior_registers): Likewise.
15895 (usr_store_inferior_registers): Likewise.
15896 * linux-arm-low.c (num_regs): Remove.
15897 (arm_num_regs): Define.
15898 (arm_regmap): Renamed from regmap, made static.
15899 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15900 made static.
15901 (arm_cannot_store_register): Renamed from cannot_store_register,
15902 made static.
15903 (the_low_target): New.
15904 * linux-i386-low.c (num_regs): Remove.
15905 (i386_num_regs): Define.
15906 (i386_regmap): Renamed from regmap, made static.
15907 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15908 made static.
15909 (i386_cannot_store_register): Renamed from cannot_store_register,
15910 made static.
15911 (the_low_target): New.
15912 * linux-ia64-low.c (num_regs): Remove.
15913 (ia64_num_regs): Define.
15914 (ia64_regmap): Renamed from regmap, made static.
15915 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15916 made static.
15917 (ia64_cannot_store_register): Renamed from cannot_store_register,
15918 made static.
15919 (the_low_target): New.
15920 * linux-m68k-low.c (num_regs): Remove.
15921 (m68k_num_regs): Define.
15922 (m68k_regmap): Renamed from regmap, made static.
15923 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15924 made static.
15925 (m68k_cannot_store_register): Renamed from cannot_store_register,
15926 made static.
15927 (the_low_target): New.
15928 * linux-mips-low.c (num_regs): Remove.
15929 (mips_num_regs): Define.
15930 (mips_regmap): Renamed from regmap, made static.
15931 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15932 made static.
15933 (mips_cannot_store_register): Renamed from cannot_store_register,
15934 made static.
15935 (the_low_target): New.
15936 * linux-ppc-low.c (num_regs): Remove.
15937 (ppc_num_regs): Define.
15938 (ppc_regmap): Renamed from regmap, made static.
15939 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15940 made static.
15941 (ppc_cannot_store_register): Renamed from cannot_store_register,
15942 made static.
15943 (the_low_target): New.
15944 * linux-s390-low.c (num_regs): Remove.
15945 (s390_num_regs): Define.
15946 (s390_regmap): Renamed from regmap, made static.
15947 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15948 made static.
15949 (s390_cannot_store_register): Renamed from cannot_store_register,
15950 made static.
15951 (the_low_target): New.
15952 * linux-sh-low.c (num_regs): Remove.
15953 (sh_num_regs): Define.
15954 (sh_regmap): Renamed from regmap, made static.
15955 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15956 made static.
15957 (sh_cannot_store_register): Renamed from cannot_store_register,
15958 made static.
15959 (the_low_target): New.
15960 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15961 (the_low_target): New.
15962
159632002-04-09 Daniel Jacobowitz <drow@mvista.com>
15964
15965 * Makefile.in: Add stamp-h target.
15966 * configure.in: Create stamp-h.
15967 * configure: Regenerated.
15968
159692002-04-09 Daniel Jacobowitz <drow@mvista.com>
15970
15971 * inferiors.c: New file.
15972 * target.c: New file.
15973 * target.h: New file.
15974 * Makefile.in: Add target.o and inferiors.o. Update
15975 dependencies.
15976 * linux-low.c (inferior_pid): New static variable,
15977 moved from server.c.
15978 (linux_create_inferior): Renamed from create_inferior.
15979 Call add_inferior. Return 0 on success instead of a PID.
15980 (linux_attach): Renamed from myattach.
15981 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15982 (linux_thread_alive): Renamed from mythread_alive.
15983 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15984 child dies.
15985 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15986 (regsets_store_inferior_registers): Correct error message.
15987 Add missing ``return 0''.
15988 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15989 (linux_store_registers): Renamed from store_inferior_registers.
15990 (linux_read_memory): Renamed from read_inferior_memory.
15991 (linux_write_memory): Renamed from write_inferior_memory.
15992 (linux_target_ops): New structure.
15993 (initialize_low): Call set_target_ops ().
15994 * remote-utils.c (unhexify): New function.
15995 (hexify): New function.
15996 (input_interrupt): Send signals to ``signal_pid''.
15997 * server.c (inferior_pid): Remove.
15998 (start_inferior): Update create_inferior call.
15999 (attach_inferior): Call add_inferior.
16000 (handle_query): New function.
16001 (main): Call handle_query for `q' packets.
16002 * server.h: Include "target.h". Remove obsolete prototypes.
16003 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16004
160052002-04-09 Daniel Jacobowitz <drow@mvista.com>
16006
16007 * Makefile.in: Add WARN_CFLAGS. Update configury
16008 dependencies.
16009 * configure.in: Check for <string.h>
16010 * configure: Regenerate.
16011 * config.in: Regenerate.
16012 * gdbreplay.c: Include needed system headers.
16013 (remote_open): Remove strchr prototype.
16014 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16015 * regcache.c (supply_register): Change buf argument to const void *.
16016 (supply_register_by_name): Likewise.
16017 (collect_register): Change buf argument to void *.
16018 (collect_register_by_name): Likewise.
16019 * regcache.h: Add missing prototypes.
16020 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16021 * server.c (handle_query): New function.
16022 (attached): New static variable, moved out of main.
16023 (main): Quiet longjmp clobber warnings.
16024 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16025 * utils.c (error): Remove NORETURN.
16026 (fatal): Likewise.
This page took 1.844244 seconds and 4 git commands to generate.