Remove usage of find_inferior in linux_mourn
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
6b2a85da
SM
12017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
2
3 * linux-low.c (delete_lwp_callback): Remove.
4 (linux_mourn): Use for_each_thread.
5
798a38e8
SM
62017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
7
8 * linux-low.c (linux_detach_lwp_callback): Return void, remove
9 args parameter, don't check for pid.
10 (linux_detach): Use for_each_thread.
11
e4eb0dec
SM
122017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
13
14 * linux-low.c (struct counter): Remove.
15 (second_thread_of_pid_p): Remove.
16 (last_thread_of_process_p): Use find_thread.
17
83e1b6c1
SM
182017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
19
20 * inferiors.c (find_inferior_in_random): Remove.
21 * inferiors.h (find_inferior_in_random): Remove.
22 * linux-low.c (status_pending_p_callback): Return bool, accept
23 parameter ptid directly.
24 (linux_wait_for_event_filtered): Use find_thread_in_random.
25 (linux_wait_1): Likewise.
26
8dc7b443
SM
272017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
28
29 * inferiors.c (find_inferior_id): Remove.
30 (find_thread_ptid): Move implemention from find_inferior_id to
31 here.
32 * inferiors.h (find_inferior_id): Remove.
33 * server.c (handle_status): Use find_thread_ptid.
34 (process_serial_event): Likewise.
35 * thread-db.c (find_one_thread): Likewise.
36 (thread_db_thread_handle): Likewise.
37 * win32-low.c (thread_rec): Likewise.
38 (child_delete_thread): Likewise.
39 (win32_thread_alive): Likewise.
40 (get_child_debug_event): Likewise.
41
da25033c
SM
422017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
43
44 * linux-mips-low.c (update_watch_registers_callback): Return
45 void, remove pid_p parameter, don't check for pid.
46 (mips_insert_point, mips_remove_point): Use for_each_thread.
47
c91bb56b
SM
482017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
49
50 * lynx.low (lynx_delete_thread_callback): Remove.
51 (lynx_mourn): Use for_each_thread.
52
634a3254
SM
532017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
54
55 * regcache.c (regcache_invalidate_one): Remove.
56 (regcache_invalidate_pid): use for_each_thread.
57
41272101
TT
582017-11-26 Tom Tromey <tom@tromey.com>
59
60 * linux-low.c (linux_create_inferior): Update.
61
f5291a6f
UW
622017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
63
64 * spu-low.c (spu_create_inferior): Fix typo in argument name.
65
6654d750
AH
662017-11-24 Alan Hayward <alan.hayward@arm.com>
67
68 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
69 * linux-aarch64-low.c (initialize_low_arch): Call init func.
70 * linux-aarch64-tdesc-selftest.c: New file.
71 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
72
732017-11-24 Alan Hayward <alan.hayward@arm.com>
74
75 * configure.srv: Add new file.
76 * linux-aarch64-low.c (initialize_low_arch): Call init func.
77 * linux-aarch64-tdesc-selftest.c: New file.
78 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
79
49bdb7ee
AH
802017-11-24 Alan Hayward <alan.hayward@arm.com>
81
82 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
83 * linux-aarch64-low.c (initialize_low_arch): Remove init.
84 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
85
d6d7ce56
AH
862017-11-24 Alan Hayward <alan.hayward@arm.com>
87
88 * configure.srv: Add new files.
89 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
90 aarch64_linux_read_description.
91 * linux-aarch64-low.c (aarch64_linux_read_description):
92 Merge with aarch64_arch_setup.
93 (aarch64_arch_setup): Call aarch64_linux_read_description.
94 * linux-aarch64-tdesc.c: New file.
95 * linux-aarch64-tdesc.h: New file.
96
506fe5f4
YQ
972017-11-24 Yao Qi <yao.qi@linaro.org>
98
99 * configure.srv: Set $srv_regobj for tic6x-linux.
100 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
101 (tic6x_read_description): Move some code to tic6x_arch_setup.
102 (tic6x_tdesc_test): New function.
103 (initialize_low_arch): Call selftests::register_test.
104
29f9a567
YQ
1052017-11-22 Yao Qi <yao.qi@linaro.org>
106
107 * remote-utils.c (prepare_resume_reply): Use memcpy.
108
578290ec
SM
1092017-11-19 Simon Marchi <simon.marchi@ericsson.com>
110
111 * linux-low.c (kill_one_lwp_callback): Return void, take
112 argument directly, don't filter on pid.
113 (linux_kill): Use for_each_thread.
114
eca55aec
SM
1152017-11-19 Simon Marchi <simon.marchi@ericsson.com>
116
117 * linux-low.c (need_step_over_p): Return bool, remove dummy
118 argument.
119 (linux_resume, proceed_all_lwps): Use find_thread.
120
25c28b4d
SM
1212017-11-19 Simon Marchi <simon.marchi@ericsson.com>
122
123 * linux-low.c (resume_status_pending_p): Return bool, remove
124 flag_p argument.
125 (linux_resume): Use find_thread.
126
5fdda392
SM
1272017-11-19 Simon Marchi <simon.marchi@ericsson.com>
128
129 * linux-low.c (struct thread_resume_array): Remove.
130 (linux_set_resume_request): Return void, take arguments
131 directly.
132 (linux_resume): Use for_each_thread.
133
fcb056a5
SM
1342017-11-19 Simon Marchi <simon.marchi@ericsson.com>
135
136 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
137 return bool, remove data argument.
138 (linux_stabilize_threads): Use find_thread.
139
139720c5
SM
1402017-11-19 Simon Marchi <simon.marchi@ericsson.com>
141
142 * linux-low.c (unsuspend_one_lwp): Remove.
143 (unsuspend_all_lwps): Use for_each_thread, inline code from
144 unsuspend_one_lwp.
145
6d1e5673
SM
1462017-11-19 Simon Marchi <simon.marchi@ericsson.com>
147
148 * gdbthread.h (find_thread): Add overload with ptid_t filter.
149 * linux-low.c (struct iterate_over_lwps_args): Remove.
150 (iterate_over_lwps_filter): Remove.
151 (iterate_over_lwps): Use find_thread.
152
bbf550d5
SM
1532017-11-19 Simon Marchi <simon.marchi@ericsson.com>
154
155 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
156 (linux_handle_new_gdb_connection): Use for_each_thread, inline
157 code from reset_lwp_ptrace_options_callback.
158
00192f77
SM
1592017-11-19 Simon Marchi <simon.marchi@ericsson.com>
160
161 * linux-arm-low.c (struct update_registers_data): Remove.
162 (update_registers_callback): Return void, take arguments
163 directly, don't check thread's pid.
164 (arm_insert_point, arm_remove_point): Use for_each_thread.
165
2bee2b6c
SM
1662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
167
168 * win32-low.c (continue_one_thread): Return void, take argument
169 directly.
170 (child_continue): Use for_each_thread.
171
0b360f19
SM
1722017-11-19 Simon Marchi <simon.marchi@ericsson.com>
173
174 * win32-i386-low.c (update_debug_registers_callback): Rename
175 to ...
176 (update_debug_registers): ... this, return void, remove pid_p arg.
177 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
178
f27866ba
SM
1792017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
180
181 * inferiors.h (struct process_info): Add constructor, initialize
182 fields..
183 <syscalls_to_catch>: Change type to std::vector<int>.
184 * inferiors.c (add_process): Allocate process_info with new.
185 (remove_process): Free process_info with delete.
186 * linux-low.c (handle_extended_wait): Adjust.
187 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
188 * server.c (handle_general_set): Adjust.
189
e849ea89
PA
1902017-11-16 Pedro Alves <palves@redhat.com>
191
192 * remote-utils.c (remote_close): Block SIGIO signals instead of
193 uninstalling the SIGIO handler.
194
1d0aa65c
AH
1952017-11-16 Alan Hayward <alan.hayward@arm.com>
196
197 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
198
3491a34c
YQ
1992017-11-16 Yao Qi <yao.qi@linaro.org>
200
201 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
202 (tic6x_store_gregset): Likewise.
203 (tic6x_usrregs_info): Move it up.
204
a602f924
AH
2052017-11-15 Alan Hayward <alan.hayward@arm.com>
206
207 * Makefile.in: Update arch rules.
208 * configure.srv: Explicitly mark arch/ files.
209
5616b6c3
AS
2102017-11-13 Andreas Schwab <schwab@suse.de>
211
212 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
213 function.
214 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
215
d1928160
PA
2162017-11-06 Pedro Alves <palves@redhat.com>
217
218 * config.in, configure: Regenerate.
219
bac608e7
SM
2202017-10-27 Simon Marchi <simon.marchi@ericsson.com>
221
222 * target.c (struct thread_search): Remove.
223 (thread_search_callback): Remove.
224 (prepare_to_access_memory): Use for_each_thread instead of
225 find_inferior. Inline code from thread_search_callback.
226
eaddb425
SM
2272017-10-27 Simon Marchi <simon.marchi@ericsson.com>
228
229 * server.c (struct visit_actioned_threads_data): Remove.
230 (visit_actioned_threads): Change prototype to take arguments
231 directly.
232 (resume): Use find_thread instead of find_inferior.
233
99078d34
SM
2342017-10-27 Simon Marchi <simon.marchi@ericsson.com>
235
236 * server.c (queue_stop_reply_callback): Change prototype, return
237 void.
238 (find_status_pending_thread_callback): Remove.
239 (handle_status): Replace find_inferior with find_thread and
240 for_each_thread.
241
cc628f3d
AH
2422017-10-25 Alan Hayward <alan.hayward@arm.com>
243
244 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
245 with REGNO.
246 (aarch64_store_gregset): Likewise.
247 (aarch64_fill_fpregset): Likewise.
248 (aarch64_store_fpregset): Likewise.
249
4d3bb80e
SM
2502017-10-21 Simon Marchi <simon.marchi@ericsson.com>
251
252 * gdbthread.h (find_thread, for_each_thread): New functions.
253 * inferiors.c (thread_of_pid): Remove.
254 (find_any_thread_of_pid): Use find_thread.
255 * linux-low.c (num_lwps): Use for_each_thread.
256
7a7cdfa0
YQ
2572017-10-17 Yao Qi <yao.qi@linaro.org>
258
259 * Makefile.in: Remove one rule.
260 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
261
e675d170
YQ
2622017-10-17 Yao Qi <yao.qi@linaro.org>
263
264 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
265 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
266
7eb4e0f9
YQ
2672017-10-17 Yao Qi <yao.qi@linaro.org>
268
269 * configure.srv: Rename arm.o with arch/arm.o.
270
60d6cfc9
YQ
2712017-10-17 Yao Qi <yao.qi@linaro.org>
272
273 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
274 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
275 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
276 (arch-i386.o, arch-amd64.o): Remove rules.
277 (arch/%.o): New rule.
278 Update POSTCOMPILE and COMPILE.pre.
279 * configure.ac: Invoke AC_CONFIG_COMMANDS.
280 * configure: Re-generated.
281 * configure.srv: Replace arch-i386.o with arch/i386.o.
282 Replace arch-amd64.o with arch/amd64.o.
283
5bfda255
YQ
2842017-10-16 Yao Qi <yao.qi@linaro.org>
285
286 * configure: Regenerated.
287
9c80ecd6
SM
2882017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
289
290 * inferiors.h: (struct inferior_list): Remove.
291 (struct inferior_list_entry); Remove.
292 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
293 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
294 get_first_inferior): Remove.
295 (for_each_inferior, for_each_inferior_with_data, find_inferior,
296 find_inferior_id, find_inferior_in_random): Change signature.
297 * inferiors.c (all_threads): Change type to
298 std::list<thread_info *>.
299 (get_thread): Remove macro.
300 (find_inferior, find_inferior_id): Change signature, implement
301 using find_thread.
302 (find_inferior_in_random): Change signature, implement using
303 find_thread_in_random.
304 (for_each_inferior, for_each_inferior_with_data): Change
305 signature, implement using for_each_thread.
306 (add_inferior_to_list, remove_inferior): Remove.
307 (add_thread, get_first_thread, thread_of_pid,
308 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
309 (get_first_inferior, one_inferior_p, clear_inferior_list):
310 Remove.
311 (clear_inferiors, get_thread_process): Update.
312 * gdbthread.h: Include <list>.
313 (struct thread_info) <entry>: Remove field.
314 <id>: New field.
315 (all_threads): Change type to std::list<thread_info *>.
316 (get_first_inferior): Add doc.
317 (find_thread, for_each_thread, find_thread_in_random): New
318 functions.
319 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
320 * linux-arm-low.c (update_registers_callback): Update.
321 * linux-low.c (second_thread_of_pid_p): Update.
322 (kill_one_lwp_callback, linux_detach_lwp_callback,
323 delete_lwp_callback, status_pending_p_callback, same_lwp,
324 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
325 iterate_over_lwps, not_stopped_callback,
326 resume_stopped_resumed_lwps, count_events_callback,
327 select_singlestep_lwp_callback, select_event_lwp_callback,
328 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
329 suspend_and_send_sigstop_callback, wait_for_sigstop,
330 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
331 lwp_running, linux_set_resume_request, resume_status_pending_p,
332 need_step_over_p, start_step_over, linux_resume_one_thread,
333 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
334 reset_lwp_ptrace_options_callback): Update.
335 * linux-mips-low.c (update_watch_registers_callback): Update.
336 * regcache.c (regcache_invalidate_one, regcache_invalidate):
337 Update.
338 (free_register_cache_thread_one): Remove.
339 (regcache_release): Update.
340 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
341 handle_qxfer_threads_worker): Update.
342 (handle_query): Update, use list iterator.
343 (visit_actioned_threads, handle_pending_status,
344 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
345 clear_pending_status_callback, set_pending_status_callback,
346 find_status_pending_thread_callback, handle_status,
347 process_serial_event): Update.
348 * target.c (thread_search_callback): Update.
349 * thread-db.c (thread_db_get_tls_address): Update.
350 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
351 Update.
352 * win32-i386-low.c (update_debug_registers_callback): Update.
353 * win32-low.c (delete_thread_info, child_delete_thread,
354 continue_one_thread, suspend_one_thread,
355 get_child_debug_event): Adjust.
356
9179355e
SM
3572017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
358
359 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
360 * inferiors.h: Include <list>.
361 (struct process_info) <entry>: Remove field.
362 <pid>: New field.
363 (pid_of): Change macro to function.
364 (ptid_of, lwpid_of): Remove macro.
365 (all_processes): Change type to std::list<process_info *>.
366 (ALL_PROCESSES): Remove macro.
367 (for_each_process, find_process): New function.
368 * inferiors.c (all_processes): Change type to
369 std::list<process_info *>.
370 (find_thread_process): Adjust.
371 (add_process): Likewise.
372 (remove_process): Likewise.
373 (find_process_pid): Likewise.
374 (get_first_process): Likewise.
375 (started_inferior_callback): Remove.
376 (have_started_inferiors_p): Adjust.
377 (attached_inferior_callback): Remove.
378 (have_attached_inferiors_p): Adjust.
379 * linux-low.c (check_zombie_leaders): Likewise.
380 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
381 (x86_linux_update_xmltarget): Adjust.
382 * server.c (handle_query): Likewise.
383 (gdb_reattached_process): Remove.
384 (handle_status): Adjust.
385 (kill_inferior_callback): Likewise.
386 (detach_or_kill_inferior): Remove.
387 (print_started_pid): Likewise.
388 (print_attached_pid): Likewise.
389 (detach_or_kill_for_exit): Update.
390 (process_serial_event): Likewise.
391 * linux-arm-low.c (arm_new_fork): Likewise.
392
c9cb8905
SM
3932017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
394
395 * dll.h: Include <list>.
396 (struct dll_info): Add constructor.
397 <entry>: Remove field.
398 (all_dlls): Change type to std::list<dll_info>.
399 * dll.c: Include <algorithm>.
400 (get_dll): Remove macro.
401 (all_dlls): Change type to std::list<dll_info *>.
402 (free_one_dll): Remove.
403 (match_dll): Likewise.
404 (loaded_dll): Adjust.
405 (unloaded_dll): Adjust to all_dlls type change, use
406 std::find_if. Inline code from match_dll.
407 (clear_dlls): Adjust to all_dlls type change.
408 * server.c (emit_dll_description): Remove.
409 (handle_qxfer_libraries): Adjust to all_dlls type change,
410 integrate emit_dll_description's functionality.
411
04ec7890
SM
4122017-10-12 Simon Marchi <simon.marchi@ericsson.com>
413
414 * linux-low.h (struct linux_target_ops) <delete_process>: New
415 field.
416 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
417 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
418 (struct linux_target_ops): Add delete_process callback.
419 * linux-arm-low.c (arm_delete_process): New.
420 (struct linux_target_ops): Add delete_process callback.
421 * linux-bfin-low.c (struct linux_target_ops): Likewise.
422 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
423 * linux-m32r-low.c (struct linux_target_ops): Likewise.
424 * linux-mips-low.c (mips_linux_delete_process): New.
425 (struct linux_target_ops): Add delete_process callback.
426 * linux-ppc-low.c (struct linux_target_ops): Likewise.
427 * linux-s390-low.c (struct linux_target_ops): Likewise.
428 * linux-sh-low.c (struct linux_target_ops): Likewise.
429 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
430 * linux-tile-low.c (struct linux_target_ops): Likewise.
431 * linux-x86-low.c (x86_linux_delete_process): New.
432 (struct linux_target_ops): Add delete_process callback.
433 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
434
466eecee
SM
4352017-10-12 Simon Marchi <simon.marchi@ericsson.com>
436
437 * linux-aarch64-low.c (the_low_target): Add thread delete
438 callback.
439 * linux-arm-low.c (arm_delete_thread): New function.
440 (the_low_target): Add thread delete callback.
441 * linux-bfin-low.c (the_low_target): Likewise.
442 * linux-crisv32-low.c (the_low_target): Likewise.
443 * linux-low.c (delete_lwp): Invoke delete_thread callback if
444 set.
445 * linux-low.h (struct linux_target_ops) <delete_thread>: New
446 field.
447 * linux-m32r-low.c (the_low_target): Add thread delete callback.
448 * linux-mips-low.c (mips_linux_delete_thread): New function.
449 (the_low_target): Add thread delete callback.
450 * linux-ppc-low.c (the_low_target): Likewise.
451 * linux-s390-low.c (the_low_target): Likewise.
452 * linux-sh-low.c (the_low_target): Likewise.
453 * linux-tic6x-low.c (the_low_target): Likewise.
454 * linux-tile-low.c (the_low_target): Likewise.
455 * linux-x86-low.c (the_low_target): Likewise.
456 * linux-xtensa-low.c (the_low_target): Likewise.
457
b79f7801
YZ
4582017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
459
460 * win32-low.c: Include "common-inferior.h".
461
bc3b087d
SDJ
4622017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
463
464 * inferiors.c (set_inferior_cwd): New function.
465 * server.c (handle_general_set): Handle QSetWorkingDir packet.
466 (handle_query): Inform that QSetWorkingDir is supported.
467 * win32-low.c (create_process): Pass the inferior's cwd to
468 CreateProcess.
469
d092c5a2
SDJ
4702017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
471
472 * inferiors.c (current_inferior_cwd): New global variable.
473 (get_inferior_cwd): New function.
474 * inferiors.h (struct process_info) <cwd>: New field.
475
7da0a886
SDJ
4762017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
477
478 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
479 (OBS): Add gdb_tilde_expand.o.
480
289a6840
SM
4812017-10-02 Simon Marchi <simon.marchi@ericsson.com>
482
483 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
484 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
485
256642e8
PA
4862017-09-29 Pedro Alves <palves@redhat.com>
487
488 * ax.c (gdb_parse_agent_expr): Constify.
489 * ax.h (gdb_parse_agent_expr): Constify.
490 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
491 Constify.
492 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
493 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
494 * remote-utils.h (read_ptid): Constify.
495 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
496 (process_point_options, process_serial_event): Constify.
497 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
498 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
499 (cmd_qtbuffer): Constify.
500
5b9ca4d4
PA
5012017-09-29 Pedro Alves <palves@redhat.com>
502
503 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
504 fails.
505
94c207e0
PA
5062017-09-29 Pedro Alves <palves@redhat.com>
507
508 * linux-low.c (handle_extended_wait): Pass parent thread instead
509 of process to thread_db_notice_clone.
510 * linux-low.h (thread_db_notice_clone): Replace parent process
511 parameter with parent thread parameter.
512 * thread-db.c (find_one_thread): Add comment.
513 (thread_db_notice_clone): Replace parent process parameter with
514 parent thread parameter. Temporarily switch to the parent thread.
515
75352e28
SDJ
5162017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
517
518 * gdbthread.h: Include "common-gdbthread.h".
519 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
520 "if" when validating the ptid.
521 * remote-utils.c: Include "gdbthread.h".
522 (prepare_resume_reply): Use "switch_to_thread".
523 * target.c (done_accessing_memory): Likewise.
524
ad339634
AA
5252017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
526
527 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
528 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
529 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
530 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
531 s390x-gs-linux64-ipa.o to ipa_obj.
532 * linux-s390-low.c (HWCAP_S390_GS): New define.
533 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
534 New functions.
535 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
536 (s390_arch_setup): Check for guarded-storage support and choose
537 appropriate tdesc.
538 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
539 init_registers_s390x_gs_linux64.
540 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
541 enum value.
542 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
543 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
544
cc4d742f
SM
5452017-09-22 Simon Marchi <simon.marchi@ericsson.com>
546
547 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
548
f6327dcb
KB
5492017-09-21 Kevin Buettner <kevinb@redhat.com>
550
551 * linux-low.h (struct lwp_info): Add new field, thread_handle.
552 (thread_db_thread_handle): Declare.
553 * linux-low.c (linux_target_ops): Initialize thread_handle.
554 * server.c (handle_qxfer_threads_worker): Add support for
555 "handle" attribute.
556 * target.h (struct target_ops): Add new function pointer,
557 thread_handle.
558 (target_thread_handle): Define.
559 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
560 field in lwp.
561 (thread_db_thread_handle): New function.
562
86299109
KB
5632017-09-21 Kevin Buettner <kevinb@redhat.com>
564
565 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
566 * linux-low.h (thread_db_notice_clone): Declare.
567 * thread-db.c (thread_db_notice_clone): New function.
568
f557a88a
PA
5692017-09-21 Pedro Alves <palves@redhat.com>
570
571 * server.c (gdb_read_memory, handle_status, process_serial_event)
572 (handle_serial_event, handle_target_event): Adjust to
573 set_desired_thread prototype change.
574 * target.c (set_desired_thread): Remove 'use_general' parameter
575 and adjust.
576 * target.h (set_desired_thread): Remove 'use_general' parameter.
577
223ffa71
TT
5782017-09-20 Tom Tromey <tom@tromey.com>
579
580 * target.c (target_terminal::terminal_state): Define.
581 (target_terminal::init): Rename from target_terminal_init.
582 (target_terminal::inferior): Rename from
583 target_terminal_inferior.
584 (target_terminal::ours): Rename from target_terminal_ours.
585 (target_terminal::ours_for_output, target_terminal::info): New.
586
04fd3ba9
SM
5872017-09-16 Simon Marchi <simon.marchi@ericsson.com>
588
589 * server.c (accumulate_file_name_length): Remove.
590 (emit_dll_description): Adjust to std::string change.
591 (handle_qxfer_libraries): Use std::string to hold document.
592
5e187554
SM
5932017-09-16 Simon Marchi <simon.marchi@ericsson.com>
594
595 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
596 return type of xml_escape_text.
597 * server.c (emit_dll_description): Likewise.
598
1526853e
SM
5992017-09-16 Simon Marchi <simon.marchi@ericsson.com>
600
601 * server.c (captured_main): Accept argument for --selftest.
602 Update run_tests call.
603 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
604 when registering selftests.
605
c4dfafab
SDJ
6062017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
607
608 * regcache.c (get_thread_regcache): Update code to use "std::vector"
609 instead of "VEC" for "target_desc.reg_defs".
610 (regcache_cpy): Likewise.
611 (registers_to_string): Likewise.
612 (registers_from_string): Likewise.
613 (find_regno): Likewise.
614 (supply_regblock): Likewise.
615 (regcache_raw_read_unsigned): Likewise.
616 * tdesc.c (init_target_desc): Likewise.
617 (tdesc_create_reg): Likewise.
618 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
619 (struct target_desc) <reg_defs>: Convert to "std::vector".
620 (target_desc): Do not initialize "reg_defs".
621 (~target_desc): Update code to use "std::vector" instead of "VEC"
622 for "target_desc.reg_defs".
623 (operator==): Likewise.
624
124aceb4
SM
6252017-09-15 Simon Marchi <simon.marchi@ericsson.com>
626
627 * inferiors.h (thread_to_gdb_id): Remove.
628 * inferiors.c (thread_to_gdb_id): Remove.
629 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
630 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
631 lynx_store_registers, lynx_read_memory, lynx_write_memory):
632 Likewise.
633 * nto-low.c (nto_fetch_registers, nto_store_registers,
634 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
635
96cde54f
SM
6362017-09-15 Simon Marchi <simon.marchi@ericsson.com>
637
638 * inferiors.h (gdb_id_to_thread_id): Remove.
639 * inferiors.c (gdb_id_to_thread_id): Remove.
640 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
641 removal. Move pid declaration closer to where it's used.
642
e8ca139e
SM
6432017-09-15 Simon Marchi <simon.marchi@ericsson.com>
644
645 * server.c (handle_detach): New function.
646 (process_serial_event): Move code out, call handle_detach.
647
f8a4e119
SM
6482017-09-15 Simon Marchi <simon.marchi@ericsson.com>
649
650 * server.c (require_running): Rename to ...
651 (require_running_or_return): ... this ...
652 (require_running_or_break): ... and this.
653 (handle_query, process_serial_event): Adjust.
654
0eb0a407
SM
6552017-09-15 Simon Marchi <simon.marchi@ericsson.com>
656
657 * linux-low.c (linux_set_resume_request): Remove unused
658 variables.
659
785922a5
SM
6602017-09-15 Simon Marchi <simon.marchi@ericsson.com>
661
662 * server.c (first_thread_of): Remove.
663 (process_serial_event): Replace usage of first_thread_of with
664 find_any_thread_of_pid.
665 * tracepoint.c (same_process_p): Remove.
666 (gdb_agent_about_to_close): Replace usage of same_process_p with
667 find_any_thread_of_pid.
668 * linux-x86-low.c (same_process_callback): Remove.
669 (x86_arch_setup_process_callback): Replace usage of
670 same_process_callback with find_any_thread_of_pid.
671 * thread-db.c (any_thread_of): Remove.
672 (switch_to_process): Replace usage of any_thread_of with
673 find_any_thread_of_pid.
674 * inferiors.c (thread_pid_matches_callback): Remove.
675 (find_thread_process): Adjust to use find_any_thread_of_pid.
676
a059f00c
SDJ
6772017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
678
679 * regcache.c (get_thread_regcache): Guard calls to "memset"
680 with "!VEC_empty".
681
cc397f3a
SDJ
6822017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
683
684 * linux-low.c (handle_extended_wait): Use
685 "allocate_target_description" instead of "XNEW".
686 * linux-x86-low.c (initialize_low_arch): Likewise.
687
22916b07
YQ
6882017-09-05 Yao Qi <yao.qi@linaro.org>
689
690 * configure.srv (srv_i386_regobj): Remove.
691 (srv_amd64_regobj): Remove.
692 (srv_regobj): Set it to "" for x86 non-linux targets.
693 * linux-x86-tdesc.c (i386_linux_read_description):
694 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
695 (init_registers_i386): Remove the declaration.
696 (tdesc_i386): Remove the declaration.
697 (lynx_i386_arch_setup): Call i386_create_target_description.
698 * nto-x86-low.c: Likewise.
699 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
700 [!__x86_64__]: include arch/i386.h.
701 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
702
38602d55
YQ
7032017-09-05 Yao Qi <yao.qi@linaro.org>
704
705 * configure.srv (srv_amd64_linux_xmlfiles): Remove
706 i386/amd64-XXX-linux from it.
707
44b886ff
YQ
7082017-09-05 Yao Qi <yao.qi@linaro.org>
709
710 * configure.srv: Empty srv_amd64_linux_regobj if $development is
711 false.
712 (ipa_amd64_linux_regobj): Remove.
713 (ipa_x32_linux_regobj): Remove.
714
b4570e4b
YQ
7152017-09-05 Yao Qi <yao.qi@linaro.org>
716
717 * Makefile.in (arch-amd64.o): New rule.
718 * configure.srv: Append arch-amd64.o.
719 * linux-amd64-ipa.c: Include common/x86-xstate.h.
720 (get_ipa_tdesc): Call amd64_linux_read_description.
721 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
722 and init_registers_amd64_XXX.
723 * linux-x86-low.c (x86_linux_read_description): Call
724 amd64_linux_read_description.
725 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
726 (initialize_low_arch): Don't call init_registers_x32_XXX and
727 init_registers_amd64_XXX.
728 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
729 and tdesc_amd64_XXX.
730 [__x86_64__] (amd64_tdesc_test): New function.
731 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
732 and init_registers_amd64_XXX.
733 * linux-x86-tdesc.c: Include arch/amd64.h.
734 (xcr0_to_tdesc_idx): New function.
735 (i386_linux_read_description): New function.
736 (amd64_get_ipa_tdesc_idx): New function.
737 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
738 (amd64_get_ipa_tdesc): Declare.
739
d1f28ea2
YQ
7402017-09-05 Yao Qi <yao.qi@linaro.org>
741
742 * configure.srv (srv_i386_linux_xmlfiles): Remove
743 i386/i386-XXX-linux.xml from it.
744
25a93583
YQ
7452017-09-05 Yao Qi <yao.qi@linaro.org>
746
747 * configure.srv: Set srv_i386_linux_regobj empty if $development
748 is false.
749 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
750 initialize_low_tdesc.
751 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
752 with #if initialize_low_tdesc.
753 * linux-x86-tdesc-selftest.c: New file.
754 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
755
5f035c07
YQ
7562017-09-05 Yao Qi <yao.qi@linaro.org>
757
758 * Makefile.in (arch-i386.o): New rule.
759 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
760 (x86_64-*-linux*): Likewise.
761 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
762 include arch/i386.h.
763 (i386_linux_read_description): Remove code and call
764 i386_create_target_description.
765 * tdesc.c (allocate_target_description): New function.
766 * tdesc.h (set_tdesc_architecture): Remove declaration.
767 (set_tdesc_osabi): Likewise.
768
0abe8a89
YQ
7692017-09-05 Yao Qi <yao.qi@linaro.org>
770
771 * linux-x86-tdesc.c: Don't include <inttypes.h>.
772 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
773 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
774 .xmltarget.
775 * server.c (get_features_xml): Call tdesc_get_features_xml.
776 * tdesc.c (set_tdesc_architecture): New function.
777 (set_tdesc_osabi): New function.
778 (tdesc_get_features_xml): New function.
779 (tdesc_create_feature): Add an argument.
780 * tdesc.h (struct target_desc) <features>: New field.
781 <arch, osabi>: New field.
782 (~target_desc): xfree features, arch, and osabi.
783 (target_desc::oerator==): Don't compare .xmltarget.
784 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
785 (set_tdesc_osabi): Likewise.
786 (tdesc_get_features_xml): Likewise.
787
0a188386
YQ
7882017-09-05 Yao Qi <yao.qi@linaro.org>
789
790 * linux-x86-tdesc.c: Include selftest.h.
791 (i386_tdesc_test): New function.
792 (initialize_low_tdesc): Call selftests::register_test.
793 * tdesc.h: Include regdef.h.
794 (target_desc): Override operator == and !=.
795
f49ff000
YQ
7962017-09-05 Yao Qi <yao.qi@linaro.org>
797
798 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
799 (ipa_obj): Likewise.
800 * linux-i386-ipa.c: Include common/x86-xstate.h
801 (get_ipa_tdesc): Call i386_linux_read_description.
802 (initialize_low_tracepoint): Don't call init_registers_XXX
803 functions, call initialize_low_tdesc instead.
804 * linux-x86-low.c (x86_linux_read_description): Call
805 i386_linux_read_description.
806 (initialize_low_arch): Don't call init_registers_i386_XXX
807 functions, call initialize_low_tdesc.
808 * linux-x86-tdesc.c: New file.
809 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
810 (i386_get_ipa_tdesc_idx): Declare.
811 (i386_get_ipa_tdesc): Declare.
812 (initialize_low_tdesc): Declare.
813
2b68ef2f
YQ
8142017-09-05 Yao Qi <yao.qi@linaro.org>
815
816 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
817 instead of 0.
818
f7000548
YQ
8192017-09-05 Yao Qi <yao.qi@linaro.org>
820
821 * Makefile.in (IPA_OBJS): Add vec-ipa.o
822 * regcache.c (get_thread_regcache): Use VEC_length.
823 (init_register_cache): Likewise.
824 (regcache_cpy): Likewise.
825 (registers_to_string): Iterate reg_defs via VEC_iterate.
826 (find_regno): Likewise.
827 (find_register_by_number): Use VEC_index.
828 (register_size): Call find_register_by_number.
829 (register_data): Call find_register_by_number.
830 (supply_regblock): Use VEC_length.
831 (regcache_raw_read_unsigned): Likewise.
832 * tdesc.c (init_target_desc): Iterate reg_defs via
833 VEC_iterate.
834 (default_description): Update initializer.
835 (copy_target_description): Don't update field num_registers.
836 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
837 <num_registers>: Remove.
838
50a421ac
SM
8392017-09-04 Simon Marchi <simon.marchi@ericsson.com>
840
841 * Makefile.in (.SECONDARY): Define target.
842
23fdd69e
SM
8432017-09-03 Simon Marchi <simon.marchi@ericsson.com>
844
845 * linux-low.c (linux_wait_1): Adjust.
846 * server.c (queue_stop_reply_callback): Adjust.
847
0a2dde4a
SDJ
8482017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
849
850 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
851 QEnvironmentUnset and QEnvironmentReset packets.
852 (handle_query): Inform remote that QEnvironmentHexEncoded,
853 QEnvironmentUnset and QEnvironmentReset are supported.
854
6afd337d
SM
8552017-08-25 Simon Marchi <simon.marchi@ericsson.com>
856
857 * inferiors.h (inferior_target_data): Rename to ...
858 (thread_target_data): ... this.
859 (inferior_regcache_data): Rename to ...
860 (thread_regcache_data): ... this.
861 (set_inferior_regcache_data): Rename to ...
862 (set_thread_regcache_data): ... this.
863 * inferiors.c (inferior_target_data): Rename to ...
864 (thread_target_data): ... this.
865 (inferior_regcache_data): Rename to ...
866 (thread_regcache_data): ... this.
867 (set_inferior_regcache_data): Rename to ...
868 (set_thread_regcache_data): ... this.
869 (free_one_thread): Update.
870 * linux-low.h (get_thread_lwp): Update.
871 * regcache.c (get_thread_regcache): Update.
872 (regcache_invalidate_thread): Update.
873 (free_register_cache_thread): Update.
874 * win32-i386-low.c (update_debug_registers_callback): Update.
875 (win32_get_current_dr): Update.
876 * win32-low.c (thread_rec): Update.
877 (delete_thread_info): Update.
878 (continue_one_thread): Update.
879 (suspend_one_thread): Update.
880
a160cc46
SM
8812017-08-24 Simon Marchi <simon.marchi@ericsson.com>
882
883 * inferiors.c (set_inferior_target_data): Remove.
884 * inferiors.h (set_inferior_target_data): Remove.
885
6d580b63
YQ
8862017-08-18 Yao Qi <yao.qi@linaro.org>
887
888 * Makefile.in (OBS): Add selftest.o.
889 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
890 * configure, config.in: Re-generated.
891 * server.c: Include common/sefltest.h.
892 (captured_main): Handle option --selftest.
893
f5a29eb0
YQ
8942017-08-09 Yao Qi <yao.qi@linaro.org>
895
896 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
897 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
898 i386-avx-mpx.o and i386-mmx.o.
899 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
900 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
901 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
902 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
903 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
904 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
905 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
906 i386/amd64-avx-mpx.xml.
907
57757c2f
YQ
9082017-08-09 Yao Qi <yao.qi@linaro.org>
909
910 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
911 and x32-avx-avx512.o.
912 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
913 i386/x32-avx-avx512.xml.
914
229d26fc
SM
9152017-07-26 Simon Marchi <simon.marchi@ericsson.com>
916
917 * tracepoint.h (enum class fast_tpoint_collect_result): New
918 enumeration.
919 (fast_tracepoint_collecting): Change return type to
920 fast_tpoint_collect_result.
921 * tracepoint.c (fast_tracepoint_collecting): Likewise.
922 * linux-low.h: Include tracepoint.h.
923 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
924 fast_tpoint_collect_result.
925 * linux-low.c (handle_tracepoints): Adjust.
926 (linux_fast_tracepoint_collecting): Change return type to
927 fast_tpoint_collect_result.
928 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
929 linux_wait_1, stuck_in_jump_pad_callback,
930 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
931 proceed_one_lwp): Adjust to type change.
932
2e1e43e1
YQ
9332017-07-10 Yao Qi <yao.qi@linaro.org>
934
935 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
936
adc764e7
YQ
9372017-06-29 Yao Qi <yao.qi@linaro.org>
938
939 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
940 Remove.
941 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
942
a206891a
SM
9432017-06-20 Simon Marchi <simon.marchi@ericsson.com>
944
945 * Makefile.in (IPA_OBJS): Sort and format one item per line.
946
9a6c7d9c
SDJ
9472017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
948
949 * linux-low.c (linux_create_inferior): Adjust code to access the
950 environment information via 'gdb_environ' class.
951 * lynx-low.c (lynx_create_inferior): Likewise.
952 * server.c (our_environ): Make it an instance of 'gdb_environ'.
953 (get_environ): Return a pointer to 'our_environ'.
954 (captured_main): Initialize 'our_environ'.
955 * server.h (get_environ): Adjust prototype.
956 * spu-low.c (spu_create_inferior): Adjust code to access the
957 environment information via 'gdb_environ' class.
958
ae3e2ccf
SM
9592017-06-17 Simon Marchi <simon.marchi@ericsson.com>
960
961 * linux-low.c (linux_read_memory, linux_write_memory): Remove
962 usage of "register" keyword.
963
3e019bdc
SM
9642017-06-17 Simon Marchi <simon.marchi@ericsson.com>
965
966 * configure: Re-generate.
967
8465943a
SM
9682017-06-17 Simon Marchi <simon.marchi@ericsson.com>
969
970 * configure: Re-generate.
971
cf0dd6f0
SM
9722017-06-17 Simon Marchi <simon.marchi@ericsson.com>
973
974 * Makefile.in (COMPILE.pre): Add "-x c++".
975
9845682b
SDJ
9762017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
977
978 * fork-child.c: Conditionally include <signal.h>.
979
aefd8b33
SDJ
9802017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
981
982 * server.c (handle_general_set): Handle new packet
983 "QStartupWithShell".
984 (handle_query): Add "QStartupWithShell" to the list of supported
985 packets.
986 (gdbserver_usage): Add help text explaining the
987 new "--startup-with-shell" and "--no-startup-with-shell" CLI
988 options.
989 (captured_main): Recognize and act upon the presence of the new
990 CLI options.
991
2090129c
SDJ
9922017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
993 Pedro Alves <palves@redhat.com>
994
995 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
996 * configure: Regenerate.
997 * configure.srv (srv_linux_obj): Add "fork-child.o" and
998 "fork-inferior.o".
999 (i[34567]86-*-lynxos*): Likewise.
1000 (spu*-*-*): Likewise.
1001 * fork-child.c: New file.
1002 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1003 and "environ.h".
1004 (linux_ptrace_fun): New function.
1005 (linux_create_inferior): Adjust function prototype to reflect
1006 change on "target.h". Adjust function code to use
1007 "fork_inferior".
1008 (linux_request_interrupt): Delete "signal_pid".
1009 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1010 (lynx_ptrace_fun): New function.
1011 (lynx_create_inferior): Adjust function prototype to reflect
1012 change on "target.h". Adjust function code to use
1013 "fork_inferior".
1014 * nto-low.c (nto_create_inferior): Adjust function prototype and
1015 code to reflect change on "target.h". Update comments.
1016 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1017 "common-terminal.h" and "environ.h".
1018 (terminal_fd): Moved to fork-child.c.
1019 (old_foreground_pgrp): Likewise.
1020 (restore_old_foreground_pgrp): Likewise.
1021 (last_status): Make it global.
1022 (last_ptid): Likewise.
1023 (our_environ): New variable.
1024 (startup_with_shell): Likewise.
1025 (program_name): Likewise.
1026 (program_argv): Rename to...
1027 (program_args): ...this.
1028 (wrapper_argv): New variable.
1029 (start_inferior): Delete function.
1030 (get_exec_wrapper): New function.
1031 (get_exec_file): Likewise.
1032 (get_environ): Likewise.
1033 (prefork_hook): Likewise.
1034 (post_fork_inferior): Likewise.
1035 (postfork_hook): Likewise.
1036 (postfork_child_hook): Likewise.
1037 (handle_v_run): Update code to deal with arguments coming from the
1038 remote host. Update calls from "start_inferior" to
1039 "create_inferior".
1040 (captured_main): Likewise. Initialize environment variable. Call
1041 "have_job_control".
1042 * server.h (post_fork_inferior): New prototype.
1043 (get_environ): Likewise.
1044 (last_status): Declare.
1045 (last_ptid): Likewise.
1046 (signal_pid): Likewise.
1047 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1048 (spu_ptrace_fun): New function.
1049 (spu_create_inferior): Adjust function prototype to reflect change
1050 on "target.h". Adjust function code to use "fork_inferior".
1051 * target.c (target_terminal_init): New function.
1052 (target_terminal_inferior): Likewise.
1053 (target_terminal_ours): Likewise.
1054 * target.h: Include <vector>.
1055 (struct target_ops) <create_inferior>: Update prototype.
1056 (create_inferior): Update macro.
1057 * utils.c (gdb_flush_out_err): New function.
1058 * win32-low.c (win32_create_inferior): Adjust function prototype
1059 and code to reflect change on "target.h".
1060
043a4934
SDJ
10612017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1062
1063 * inferiors.c (switch_to_thread): New function.
1064
15652511
SDJ
10652017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1066
1067 * Makefile.in (SFILE): Add "common/job-control.c".
1068 (OBS): Add "job-control.o".
1069
21ea5acd
SDJ
10702017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1071
1072 * Makefile: Remove "@host_makefile_frag@".
1073
e13cb306
PA
10742017-05-05 Pedro Alves <palves@redhat.com>
1075
1076 * configure: Regenerate.
1077
c94fee56
SDJ
10782017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1079
1080 * configure: Regenerate.
1081
a0ff9e1a
SM
10822017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1083
1084 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1085 software_single_step change of return type to
1086 std::vector<CORE_ADDR>.
1087 * linux-low.c (install_software_single_step_breakpoints):
1088 Likewise.
1089 * linux-low.h (install_software_single_step_breakpoints):
1090 Likewise.
1091
be628ab8
SDJ
10922017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1093
1094 * remote-utils.c: Include "gdb_termios.h" instead of
1095 "terminal.h".
1096 * terminal.h: Delete file.
1097
7c5ded6a
SDJ
10982017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1099
1100 * server.c: Include <vector>.
1101 <program_argv, wrapper_argv>: Convert to std::vector.
1102 (start_inferior): Rewrite function to use C++.
1103 (handle_v_run): Likewise. Update code that calculates the argv
1104 based on the vRun packet; use C++.
1105 (captured_main): Likewise.
1106
436252de
SM
11072017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1108
1109 * server.c (handle_v_cont): Initialize thread_resume::thread
1110 with null_ptid.
1111
9bf2a700
PA
11122017-04-05 Pedro Alves <palves@redhat.com>
1113
1114 * configure: Regenerate.
1115
a121b7c1
PA
11162017-04-05 Pedro Alves <palves@redhat.com>
1117
1118 * gdbreplay.c (sync_error): Constify.
1119 * linux-x86-low.c (push_opcode): Constify.
1120
21c8a587
PA
11212017-04-05 Pedro Alves <palves@redhat.com>
1122
1123 * win32-low.c (get_child_debug_event)
1124 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1125 Report TARGET_WAITKIND_SPURIOUS instead.
1126
fb32b4f7
PA
11272017-04-05 Pedro Alves <palves@redhat.com>
1128
1129 * remote-utils.c (remote_prepare, remote_open): Constify.
1130 * remote-utils.h (remote_prepare, remote_open): Constify.
1131 * server.c (captured_main): Constify 'port' handling.
1132
65dd1e59
SM
11332017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1134
1135 * Makefile.in (clean): Clear .deps.
1136
8fa5b777
SM
11372017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1138
1139 * .gitignore: Remove generated files, replace with wildcard.
1140 * (clean): Replace removal of generated files with wildcard.
1141 (version.c): Replace with...
1142 (version-generated.c): ...this.
1143 (xml-builtin.c): Replace with...
1144 (xml-builtin-generated.c): ...this.
1145 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1146 (%.c: *regformats*): Replace with...
1147 (%-generated.c: *regformats*): ...this.
1148
a12e714b
MF
11492017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1150
1151 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1152 (xtensa_fill_gregset): Call collect_register_by_name for
1153 threadptr register.
1154 (xtensa_store_gregset): Call supply_register_by_name for
1155 threadptr register.
1156
1a09b50a
MF
11572017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1158
1159 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1160 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1161 (xtensa_store_gregset): Call supply_register for all registers in
1162 a0_regnum..a0_regnum + C0_NREGS range.
1163
1a01e7c6
SM
11642017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1165
1166 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1167 (ax-ipa.o: ax.c): Remove.
1168 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1169 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1170 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1171 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1172 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1173
36bc18a8
SM
11742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1175
1176 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1177 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1178 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1179 (errors-ipa.o: ../common/errors.c): Remove.
1180 (format-ipa.o: ../common/format.c): Remove.
1181 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1182
a8ebe3d5
SM
11832017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1184
1185 * Makefile.in (%-ipa.o: %.c): New rule.
1186 (tracepoint-ipa.o: tracepoint.c): Remove.
1187 (utils-ipa.o: utils.c): Remove.
1188 (remote-utils-ipa.o: remote-utils.c): Remove.
1189 (regcache-ipa.o: regcache.c): Remove.
1190 (i386-linux-ipa.o: i386-linux.c): Remove.
1191 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1192 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1193 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1194 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1195 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1196 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1197 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1198 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1199 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1200 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1201 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1202 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1203 (aarch64-ipa.o: aarch64.c): Remove.
1204 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1205 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1206 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1207 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1208 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1209 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1210 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1211 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1212 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1213 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1214 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1215 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1216 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1217 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1218 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1219 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1220 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1221 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1222 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1223 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1224 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1225 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1226 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1227 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1228 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1229 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1230 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1231 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1232 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1233 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1234 (tdesc-ipa.o: tdesc.c): Remove.
1235 (x32-linux-ipa.o: x32-linux.c): Remove.
1236 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1237 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1238
50cfacb7
SM
12392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1240
1241 * Makefile.in (%.o: ../arch/%.c): New rule.
1242 (arm.o: ../arch/arm.c): Remove.
1243 (arm-linux.o: ../arch/arm-linux.c): Remove.
1244 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1245 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1246
c5a22423
SM
12472017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1248
1249 * Makefile.in (%.o: ../nat/%.c): New rule.
1250 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1251 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1252 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1253 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1254 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1255 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1256 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1257 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1258 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1259 (linux-personality.o: ../nat/linux-personality.c): Remove.
1260 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1261 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1262 (x86-linux.o: ../nat/x86-linux.c): Remove.
1263 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1264 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1265
6bda016b
SM
12662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1267
1268 * Makefile.in (%.o: ../common/%.c): New rule.
1269 (signals.o: ../common/signals.c): Remove.
1270 (print-utils.o: ../common/print-utils.c): Remove.
1271 (rsp-low.o: ../common/rsp-low.c): Remove.
1272 (common-utils.o: ../common/common-utils.c): Remove.
1273 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1274 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1275 (vec.o: ../common/vec.c): Remove.
1276 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1277 (xml-utils.o: ../common/xml-utils.c): Remove.
1278 (ptid.o: ../common/ptid.c): Remove.
1279 (buffer.o: ../common/buffer.c): Remove.
1280 (format.o: ../common/format.c): Remove.
1281 (filestuff.o: ../common/filestuff.c): Remove.
1282 (agent.o: ../common/agent.c): Remove.
1283 (errors.o: ../common/errors.c): Remove.
1284 (environ.o: ../common/environ.c): Remove.
1285 (common-debug.o: ../common/common-debug.c): Remove.
1286 (cleanups.o: ../common/cleanups.c): Remove.
1287 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1288 (fileio.o: ../common/fileio.c): Remove.
1289 (common-regcache.o: ../common/common-regcache.c): Remove.
1290 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1291 (new-op.o: ../common/new-op.c): Remove.
1292 (btrace-common.o: ../common/btrace-common.c): Remove.
1293
21122961
SM
12942017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1295
1296 * Makefile.in (%.o: ../target/%.c): New rule.
1297 (waitstatus.o: ../target/waitstatus.c): Remove.
1298
c362e621
SM
12992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1300
1301 * Makefile.in
1302 (%.c: ../regformats/%.dat,
1303 (%.c: ../regformats/arm/%.dat,
1304 (%.c: ../regformats/i386/%.dat,
1305 (%.c: ../regformats/rs6000/%.dat): New rules.
1306 (aarch64.c): Remove.
1307 (reg-arm.c): Remove.
1308 (arm-with-iwmmxt.c): Remove.
1309 (arm-with-vfpv2.c): Remove.
1310 (arm-with-vfpv3.c): Remove.
1311 (arm-with-neon.c): Remove.
1312 (reg-bfin.c): Remove.
1313 (reg-cris.c): Remove.
1314 (reg-crisv32.c): Remove.
1315 (i386.c): Remove.
1316 (i386-linux.c): Remove.
1317 (i386-avx.c): Remove.
1318 (i386-avx-linux.c): Remove.
1319 (i386-avx-avx512.c): Remove.
1320 (i386-avx-avx512-linux.c): Remove.
1321 (i386-mpx.c): Remove.
1322 (i386-mpx-linux.c): Remove.
1323 (i386-avx-mpx-avx512-pku.c): Remove.
1324 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1325 (i386-avx-mpx.c): Remove.
1326 (i386-avx-mpx-linux.c): Remove.
1327 (i386-mmx.c): Remove.
1328 (i386-mmx-linux.c): Remove.
1329 (reg-ia64.c): Remove.
1330 (reg-m32r.c): Remove.
1331 (reg-m68k.c): Remove.
1332 (reg-cf.c): Remove.
1333 (mips-linux.c): Remove.
1334 (mips-dsp-linux.c): Remove.
1335 (mips64-linux.c): Remove.
1336 (mips64-dsp-linux.c): Remove.
1337 (nios2-linux.c): Remove.
1338 (powerpc-32.c): Remove.
1339 (powerpc-32l.c): Remove.
1340 (powerpc-altivec32l.c): Remove.
1341 (powerpc-cell32l.c): Remove.
1342 (powerpc-vsx32l.c): Remove.
1343 (powerpc-isa205-32l.c): Remove.
1344 (powerpc-isa205-altivec32l.c): Remove.
1345 (powerpc-isa205-vsx32l.c): Remove.
1346 (powerpc-e500l.c): Remove.
1347 (powerpc-64l.c): Remove.
1348 (powerpc-altivec64l.c): Remove.
1349 (powerpc-cell64l.c): Remove.
1350 (powerpc-vsx64l.c): Remove.
1351 (powerpc-isa205-64l.c): Remove.
1352 (powerpc-isa205-altivec64l.c): Remove.
1353 (powerpc-isa205-vsx64l.c): Remove.
1354 (s390-linux32.c): Remove.
1355 (s390-linux32v1.c): Remove.
1356 (s390-linux32v2.c): Remove.
1357 (s390-linux64.c): Remove.
1358 (s390-linux64v1.c): Remove.
1359 (s390-linux64v2.c): Remove.
1360 (s390-te-linux64.c): Remove.
1361 (s390-vx-linux64.c): Remove.
1362 (s390-tevx-linux64.c): Remove.
1363 (s390x-linux64.c): Remove.
1364 (s390x-linux64v1.c): Remove.
1365 (s390x-linux64v2.c): Remove.
1366 (s390x-te-linux64.c): Remove.
1367 (s390x-vx-linux64.c): Remove.
1368 (s390x-tevx-linux64.c): Remove.
1369 (tic6x-c64xp-linux.c): Remove.
1370 (tic6x-c64x-linux.c): Remove.
1371 (tic6x-c62x-linux.c): Remove.
1372 (reg-sh.c): Remove.
1373 (reg-sparc64.c): Remove.
1374 (reg-spu.c): Remove.
1375 (amd64.c): Remove.
1376 (amd64-linux.c): Remove.
1377 (amd64-avx.c): Remove.
1378 (amd64-avx-linux.c): Remove.
1379 (amd64-avx-avx512.c): Remove.
1380 (amd64-avx-avx512-linux.c): Remove.
1381 (amd64-mpx.c): Remove.
1382 (amd64-mpx-linux.c): Remove.
1383 (amd64-avx-mpx-avx512-pku.c): Remove.
1384 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1385 (amd64-avx-mpx.c): Remove.
1386 (amd64-avx-mpx-linux.c): Remove.
1387 (x32.c): Remove.
1388 (x32-linux.c): Remove.
1389 (x32-avx.c): Remove.
1390 (x32-avx-linux.c): Remove.
1391 (x32-avx-avx512.c): Remove.
1392 (x32-avx-avx512-linux.c): Remove.
1393 (reg-xtensa.c): Remove.
1394 (reg-tilegx.c): Remove.
1395 (reg-tilegx32.c): Remove.
1396
1672e0d9
SDJ
13972017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1398
1399 * Makefile.in (SFILES): Add "common/environ.c".
1400 (OBJS): Add "common/environ.h".
1401
239b6d10
WT
14022017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1403
1404 * configure.ac: Check if the fs_base and gs_base members of
1405 `struct user_regs_struct' exist.
1406 * config.in: Regenerated.
1407 * configure: Likewise.
1408
694b382c
AT
14092017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1410
1411 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1412 target_read_memory.
1413 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1414 (get_next_pcs_syscall_next_pc): Likewise.
1415
7dc53023
LM
14162016-12-23 Luis Machado <lgustavo@codesourcery.com>
1417
1418 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1419 * nto-x86-low.c: Likewise.
1420
ad02e4fe
SM
14212016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1422
1423 * Makefile.in: Include disable-implicit-rules.mk.
1424
dcb07cfa
PA
14252016-11-23 Pedro Alves <palves@redhat.com>
1426
1427 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1428 (debug_vprintf): Use std::chrono::steady_clock instead of
1429 gettimeofday. Use '.' instead of ':'.
1430 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1431 (get_timestamp): Use std::chrono::steady_clock instead of
1432 gettimeofday.
1433
8629c02c
SM
14342016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1435
1436 * Makefile.in: Fix whitespace formatting.
1437
b593ecca
SM
14382016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1439
1440 * Makefile.in (SFILES, OBS): Flatten list and order
1441 alphabetically.
1442
9986ba08
PA
14432016-11-23 Pedro Alves <palves@redhat.com>
1444
1445 * event-loop.c (handle_file_event): Use warning.
1446 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1447 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1448 Use warning.
1449
4eefa7bc
PA
14502016-11-23 Pedro Alves <palves@redhat.com>
1451
1452 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1453 output.
1454 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1455 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1456 debug_printf and debug_flush for debug output.
1457 * server.c (handle_general_set): Likewise.
1458 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1459 output.
1460
5443506e
SM
14612016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1462
1463 * Makefile.in (.c.o): Replace rule with ...
1464 (%.o: %.c): ... this one.
1465
3b165252
SM
14662016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1467
1468 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1469 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1470 make.
1471 * configure.ac: Remove checks for the make program.
1472 * configure: Re-generate.
1473
0bcda685
PA
14742016-10-28 Pedro Alves <palves@redhat.com>
1475
1476 * Makefile.in (CXX_DIALECT): Get from configure.
1477 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1478 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1479 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1480 * config.in: Regenerate.
1481 * configure: Regenerate.
1482
c3805894
YQ
14832016-10-27 Yao Qi <yao.qi@linaro.org>
1484
1485 * linux-low.c (linux_supports_range_stepping): Return true if
1486 can_software_single_step return true.
1487
89342618
YQ
14882016-10-27 Yao Qi <yao.qi@linaro.org>
1489
1490 * inferiors.c (find_inferior_in_random): New function.
1491 * inferiors.h (find_inferior_in_random): Declare.
1492 * linux-low.c (linux_wait_for_event_filtered): Call
1493 find_inferior_in_random instead of find_inferior.
1494
e3652c84
YQ
14952016-10-27 Yao Qi <yao.qi@linaro.org>
1496
1497 * linux-low.c (linux_wait_1): If single-step breakpoints are
1498 inserted, remove them.
1499
5a04c4cf
PA
15002016-10-26 Pedro Alves <palves@redhat.com>
1501
1502 * linux-low.c (handle_extended_wait): Link parent/child fork
1503 threads.
1504 (linux_wait_1): Unlink them.
1505 (linux_set_resume_request): Ignore resume requests for
1506 already-resumed and unhandled fork child threads.
1507 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1508 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1509 New functions.
1510 (handle_v_requests) <vCont>: Don't call require_running.
1511 * server.h (in_queued_stop_replies): New declaration.
1512
cb93dc7f
YQ
15132016-10-24 Yao Qi <yao.qi@linaro.org>
1514
1515 PR server/20733
1516 * linux-aarch64-low.c (append_insns): Cast the return value to
1517 'uint32_t *'.
1518
a1078bea
YQ
15192016-10-10 Yao Qi <yao.qi@linaro.org>
1520
1521 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1522
1fb77080
SDJ
15232016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1524
1525 * target.c (target_supports_multi_process): New function, moved
1526 from...
1527 * target.h (target_supports_multi_process): ... here. Remove
1528 macro.
1529
39b5a3b9
TT
15302016-10-05 Tom Tromey <tom@tromey.com>
1531
1532 PR remote/20655:
1533 * tracepoint.c (handle_tracepoint_bkpts): Check
1534 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1535
c1d0b70a
YQ
15362016-10-05 Yao Qi <yao.qi@linaro.org>
1537
1538 * configure.srv: Update the path of arm-*.xml files.
1539
0a69eedb
YQ
15402016-10-05 Terry Guo <terry.guo@arm.com>
1541 Yao Qi <yao.qi@linaro.org>
1542
1543 * Makefile.in: Adjust the path of rules.
1544 * configure.srv: Update the path of xml files.
1545 * regformats/arm-with-iwmmxt.dat: Regenerated.
1546 * regformats/arm-with-neon.dat: Likewise.
1547 * regformats/arm-with-vfpv2.dat: Likewise.
1548 * regformats/arm-with-vfpv3.dat Likewise.
1549
17e16485
YQ
15502016-09-30 Yao Qi <yao.qi@linaro.org>
1551
1552 PR gdbserver/20627
1553 * target.c (target_stop_and_wait): Don't call
1554 target_continue_no_signal, use resume_stop instead.
1555
edeeb602
YQ
15562016-09-26 Yao Qi <yao.qi@linaro.org>
1557
1558 * linux-low.c (linux_wait_1): Call debug_exit.
1559
503b1c39
PA
15602016-09-23 Pedro Alves <palves@redhat.com>
1561
1562 * Makefile.in (SFILES): Add common/new-op.c.
1563 (OBS): Add common/new-op.o.
1564 (new-op.o): New rule.
1565
74172ecf
SM
15662016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1567
1568 * .gitinore: Ignore more files.
1569
fc6cda2e
YQ
15702016-09-21 Yao Qi <yao.qi@linaro.org>
1571
1572 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1573 23.
1574
bc1e6c81
SDJ
15752016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1576
1577 * server.c (start_inferior): Call target_mourn_inferior instead of
1578 mourn_inferior; pass ptid_t argument to it.
1579 (resume): Likewise.
1580 (handle_target_event): Likewise.
1581 * target.c (target_mourn_inferior): New function.
1582 * target.h (mourn_inferior): Delete macro.
1583
0e00e962
AA
15842016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1585
1586 * linux-low.c (lwp_is_stepping): New function.
1587
1d8cb77d
CL
15882016-09-06 Carl Love <cel@us.ibm.com>
1589
1590 * server.c (start_inferior): Fixed comment, requested comment change
1591 didn't get updated correctly. Removed reference to ptrace () call as
1592 it is only true on Linux systems.
1593
7313bced
CL
15942016-09-06 Carl Love <cel@us.ibm.com>
1595
1596 * server.c (start_inferior): Do not call
1597 function target_post_create_inferior () if the
1598 inferior process has already exited.
1599
cf6de44d
PA
16002016-09-05 Pedro Alves <palves@redhat.com>
1601
1602 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1603 (COMPILE.pre, CC_LD): Use CXX directly.
1604 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1605 * acinclude.m4: Don't include build-with-cxx.m4.
1606 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1607 * configure: Regenerate.
1608
c1da6748
AT
16092016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1610
1611 PR gdb/19495
1612 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1613 call writing data to own_buf.
1614
f2b9e3df
SDJ
16152016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1616
1617 * target.c (mywait): Call target_wait instead of
1618 the_target->wait.
1619 (target_wait): New function.
1620
049a8570
SDJ
16212016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1622
1623 * server.c (start_inferior): New variable 'ptid'. Replace calls
1624 to the_target->resume by target_continue{,_no_signal}, depending
1625 on the case.
1626 * target.c (target_stop_and_wait): Call target_continue_no_signal
1627 instead of the_target->resume.
1628 (target_continue): New function.
1629
3aa5cfa0
AT
16302016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1631
1632 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1633
754653a7
AZ
16342016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1635
1636 PR server/20491
1637 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1638 ps_prochandle.
1639 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1640 * linux-arm-low.c (ps_get_thread_area): Likewise.
1641 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1642 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1643 * linux-mips-low.c (ps_get_thread_area): Likewise.
1644 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1645 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1646 * linux-x86-low.c (ps_get_thread_area): Likewise.
1647 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1648
ed036b40
PA
16492016-08-19 Pedro Alves <palves@redhat.com>
1650
1651 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1652
c8ef42ee
PA
16532016-08-19 Pedro Alves <palves@redhat.com>
1654
1655 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1656 comment. Use memcpy instead of casting through unsigned long.
1657
9c235a72
PA
16582016-08-19 Pedro Alves <palves@redhat.com>
1659
1660 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1661 allocating around 0x80000000.
1662
201506da
PA
16632016-08-19 Pedro Alves <palves@redhat.com>
1664
1665 PR gdb/20415
1666 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1667 (x32-avx512-linux-ipa.o): New rules.
1668 * configure.ac (x86_64-*-linux*): New x32 check.
1669 * configure.srv (ipa_x32_linux_regobj): New.
1670 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1671 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1672 descriptions.
1673 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1674 descriptions.
1675 * configure: Regenerate.
1676
f348d89a
PA
16772016-08-09 Pedro Alves <palves@redhat.com>
1678
1679 PR gdb/18653
1680 * Makefile.in (OBS): Add signals-state-save-restore.o.
1681 (signals-state-save-restore.o): New rule.
1682 * config.in: Regenerate.
1683 * configure: Regenerate.
1684 * linux-low.c: Include "signals-state-save-restore.h".
1685 (linux_create_inferior): Call
1686 restore_original_signals_state.
1687 * server.c: Include "dispositions-save-restore.h".
1688 (captured_main): Call save_original_signals_state.
1689
1baf5149
PA
16902016-08-05 Pedro Alves <palves@redhat.com>
1691
1692 * configure: Regenerate.
1693
fcd4a73d
YQ
16942016-08-04 Yao Qi <yao.qi@linaro.org>
1695
1696 * linux-low.c (regsets_fetch_inferior_registers): Check
1697 errno is ESRCH or not.
1698
979659d0
YQ
16992016-08-02 Yao Qi <yao.qi@linaro.org>
1700
1701 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1702 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1703 (thread_db_load_search): Update.
1704 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1705 td_ta_set_event and td_ta_event_getmsg.
1706
6598661d
PA
17072016-07-26 Pedro Alves <palves@redhat.com>
1708
1709 PR server/20414
1710 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1711 of unsigned long for 64-bit registers and use uint32_t instead of
1712 unsigned int for 32-bit registers.
1713
9cf12d57
PA
17142016-07-26 Pedro Alves <palves@redhat.com>
1715
1716 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1717 to 'ptrace'.
1718
305450ed
TT
17192016-07-21 Tom Tromey <tom@tromey.com>
1720
1721 * configure: Rebuild.
1722
2583da7c
YQ
17232016-07-21 Yao Qi <yao.qi@linaro.org>
1724
1725 * mem-break.c (find_gdb_breakpoint): Cast bp to
1726 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1727
21536b36
YQ
17282016-07-21 Yao Qi <yao.qi@linaro.org>
1729
1730 * server.c (handle_v_requests): Support s and S actions
1731 if target_supports_software_single_step return true.
1732
8901d193
YQ
17332016-07-21 Yao Qi <yao.qi@linaro.org>
1734
1735 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1736 is resume_step, call maybe_hw_step.
1737 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1738 and unstop them.
1739 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1740 breakpoints or not.
1741 (proceed_one_lwp): If resume request is resume_step, install
1742 reinsert breakpoints and call maybe_hw_step.
1743
0e9a339e
YQ
17442016-07-21 Yao Qi <yao.qi@linaro.org>
1745
1746 * linux-low.c (proceed_one_lwp): Declare.
1747 (linux_resume_one_thread): Remove local variable 'step'.
1748 Lift code enqueue signal. Call proceed_one_lwp instead of
1749 linux_resume_one_lwp.
1750
4281b351
YQ
17512016-07-21 Yao Qi <yao.qi@linaro.org>
1752
1753 * linux-low.c (linux_resume_one_thread): Call
1754 enqueue_pending_signal.
1755
984a2c04
YQ
17562016-07-21 Yao Qi <yao.qi@linaro.org>
1757
1758 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1759 * inferiors.c (do_restore_current_thread_cleanup): New function.
1760 (make_cleanup_restore_current_thread): Likewise.
1761 * linux-low.c (install_software_single_step_breakpoints): Call
1762 make_cleanup_restore_current_thread. Switch current_thread to
1763 thread.
1764
bec903c9
YQ
17652016-07-21 Yao Qi <yao.qi@linaro.org>
1766
1767 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1768 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1769 (clone_one_breakpoint): Likewise.
1770 (delete_reinsert_breakpoints): Change parameter to thread.
1771 Callers updated.
1772 (has_reinsert_breakpoints): Likewise.
1773 (uninsert_reinsert_breakpoints): Likewise.
1774 (reinsert_reinsert_breakpoints): Likewise.
1775 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1776 (delete_reinsert_breakpoints): Likewise.
1777 (reinsert_reinsert_breakpoints): Likewise.
1778 (uninsert_reinsert_breakpoints): Likewise.
1779 (has_reinsert_breakpoints): Likewise.
1780
63c40ec7
YQ
17812016-07-21 Yao Qi <yao.qi@linaro.org>
1782
1783 * inferiors.c (get_thread_process): Make parameter const.
1784 * inferiors.h (get_thread_process): Update declaration.
1785 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1786 Add new parameters child_thread and parent_thread. Callers
1787 updated.
1788 * mem-break.h (clone_all_breakpoints): Update declaration.
1789
9aa76cd0
YQ
17902016-07-21 Yao Qi <yao.qi@linaro.org>
1791
1792 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1793 <command_list, handler>: Remove.
1794 (struct gdb_breakpoint): New.
1795 (struct other_breakpoint): New.
1796 (struct reinsert_breakpoint): New.
1797 (is_gdb_breakpoint): New function.
1798 (any_persistent_commands): Update command_list if
1799 is_gdb_breakpoint returns true.
1800 (set_breakpoint): Create breakpoints according to their types.
1801 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1802 (set_gdb_breakpoint_1): Likewise.
1803 (set_gdb_breakpoint): Likewise.
1804 (clear_breakpoint_conditions): Change parameter type to
1805 'struct gdb_breakpoint *'.
1806 (clear_breakpoint_commands): Likewise.
1807 (clear_breakpoint_conditions_and_commands): Likewise.
1808 (add_condition_to_breakpoint): Likewise.
1809 (add_breakpoint_condition): Likewise.
1810 (add_commands_to_breakpoint): Likewise.
1811 (check_breakpoints): Check other_breakpoint.
1812 (clone_one_breakpoint): Clone breakpopint according to its type.
1813 * mem-break.h (struct gdb_breakpoint): Declare.
1814 (set_gdb_breakpoint): Update declaration.
1815 (clear_breakpoint_conditions_and_commands): Likewise.
1816 (add_breakpoint_condition): Likewise.
1817 (add_breakpoint_commands): Likewise.
1818 * server.c (process_point_options): Change parameter type to
1819 'struct gdb_breakpoint *'.
1820
811f8301
YQ
18212016-07-21 Yao Qi <yao.qi@linaro.org>
1822
1823 * mem-break.c (set_breakpoint_at): Rename it to ...
1824 (set_breakpoint_type_at): ... it.
1825 (set_breakpoint_at): Call set_breakpoint_type_at.
1826 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1827 * mem-break.h (set_breakpoint_at): Update comments.
1828
b1c51e36
CLT
18292016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1830
1831 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1832 to buf parameter.
1833 (nios2_store_gregset): Likewise.
1834
ced2dffb
PA
18352016-07-01 Pedro Alves <palves@redhat.com>
1836 Antoine Tremblay <antoine.tremblay@ericsson.com>
1837
1838 * linux-low.c: Change interface to take the target lwp_info
1839 pointer directly and return void. Handle detaching from a zombie
1840 thread.
1841 (linux_detach_lwp_callback): New function.
1842 (linux_detach): Detach from the leader thread after detaching from
1843 the clone threads.
1844
2ac09a5b
YQ
18452016-06-28 Yao Qi <yao.qi@linaro.org>
1846
1847 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1848 for variable new_offset.
1849 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1850 (aarch64_ftrace_insn_reloc_cb): Likewise.
1851 (aarch64_ftrace_insn_reloc_tb): Likewise.
1852 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1853 PRIx64 instead of PRIx32.
1854
79e7fd4f
YQ
18552016-06-28 Yao Qi <yao.qi@linaro.org>
1856
1857 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1858 (the_low_target): Install arm_get_syscall_trapinfo.
1859
061fc021
YQ
18602016-06-28 Yao Qi <yao.qi@linaro.org>
1861
1862 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1863 function.
1864 (the_low_target): Install aarch64_get_syscall_trapinfo.
1865
4cc32bec
YQ
18662016-06-28 Yao Qi <yao.qi@linaro.org>
1867
1868 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1869 Callers updated.
1870 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1871 Remove parameter sysno.
1872 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1873 sysret.
1874
782c1122
AA
18752016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1876
1877 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1878 (s390_emit_ne_goto): Likewise.
1879 (s390_emit_lt_goto): Likewise.
1880 (s390_emit_le_goto): Likewise.
1881 (s390_emit_gt_goto): Likewise.
1882 (s390_emit_ge_goto): Likewise.
1883 (s390x_emit_eq_goto): Likewise.
1884 (s390x_emit_ne_goto): Likewise.
1885 (s390x_emit_lt_goto): Likewise.
1886 (s390x_emit_le_goto): Likewise.
1887 (s390x_emit_gt_goto): Likewise.
1888 (s390x_emit_ge_goto): Likewise.
1889 (s390_emit_ops_impl): Mark variable static.
1890 (s390x_emit_ops): Likewise.
1891
2e7b624b
YQ
18922016-06-17 Yao Qi <yao.qi@linaro.org>
1893
1894 * linux-low.c (handle_extended_wait): Call
1895 uninsert_reinsert_breakpoints for the parent process. Remove
1896 reinsert breakpoints from the child process. Reinsert them to
1897 the parent process when vfork is done.
1898 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1899 (reinsert_reinsert_breakpoints): New function.
1900 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1901 (reinsert_reinsert_breakpoints): Declare.
1902
8a81c5d7
YQ
19032016-06-17 Yao Qi <yao.qi@linaro.org>
1904
1905 * linux-low.c (handle_extended_wait): If the parent is doing
1906 step-over, remove the reinsert breakpoints from the forked child.
1907
f50bf8e5
YQ
19082016-06-17 Yao Qi <yao.qi@linaro.org>
1909
1910 * linux-low.c (unsuspend_all_lwps): Declare.
1911 (linux_low_filter_event): If thread exited, call finish_step_over.
1912 If step-over is finished, unsuspend other threads.
1913
8376a3cb
YQ
19142016-06-17 Yao Qi <yao.qi@linaro.org>
1915
1916 * linux-low.c (linux_resume_one_lwp_throw): Assert
1917 has_reinsert_breakpoints returns false.
1918 * mem-break.c (delete_disabled_breakpoints): Assert
1919 bp type isn't reinsert_breakpoint.
1920
f79b145d
YQ
19212016-06-17 Yao Qi <yao.qi@linaro.org>
1922
1923 * linux-low.c (maybe_hw_step): New function.
1924 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1925 (finish_step_over): Switch current_thread to lwp temporarily,
1926 and assert has_reinsert_breakpoints returns true.
1927 (proceed_one_lwp): Call maybe_hw_step.
1928 * mem-break.c (has_reinsert_breakpoints): New function.
1929 * mem-break.h (has_reinsert_breakpoints): Declare.
1930
0ae534d2
JT
19312016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1932
1933 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1934
fcdad592
YQ
19352016-05-17 Yao Qi <yao.qi@linaro.org>
1936
1937 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1938 instead of find_inferior.
1939
9e784964
YQ
19402016-05-05 Yao Qi <yao.qi@linaro.org>
1941
1942 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1943 Initialize res to zero.
1944
cf2ebb6e
YQ
19452016-05-05 Yao Qi <yao.qi@linaro.org>
1946
1947 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1948 to uint32_t.
1949
c1aebf87
UW
19502016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1951
1952 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1953 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1954 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1955
35fd2deb 19562016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1957 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1958
1959 * tracepoint.c (write_inferior_int8): New function.
1960 (cmd_qtenable_disable): Write enable flag using
1961 write_inferior_int8.
1962
484b3c32
YQ
19632016-04-25 Yao Qi <yao.qi@linaro.org>
1964
1965 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1966 (need_step_over_p): Return zero if the LWP has pending signals
1967 can be delivered on software single step target.
1968
85ba7d86
YQ
19692016-04-25 Yao Qi <yao.qi@linaro.org>
1970
1971 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1972 return instead of error.
1973
3539aa13
YQ
19742016-04-22 Yao Qi <yao.qi@linaro.org>
1975
1976 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1977 to 23.
1978
5b061e98
YQ
19792016-04-22 Yao Qi <yao.qi@linaro.org>
1980
1981 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1982 signal when stepping over breakpoint with software single
1983 step.
1984
3451269c
PA
19852016-04-21 Pedro Alves <palves@redhat.com>
1986
1987 * linux-s390-low.c (s390_collect_ptrace_register)
1988 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1989 add casts.
1990 (s390_check_regset): Use void * instead of gdb_byte *.
1991
a2358508
PA
19922016-04-20 Pedro Alves <palves@redhat.com>
1993
1994 * configure: Renegerate.
1995
6885166d
YQ
19962016-04-20 Yao Qi <yao.qi@linaro.org>
1997
1998 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1999 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2000 number 16.
2001 (arm_store_gregset): Likewise.
2002
2b863f51
WT
20032016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
2004
2005 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2006 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2007 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2008 (amd64-avx-mpx-linux.c): New rules.
2009 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2010 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2011 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2012 (srv_amd64_regobj): Add amd64-avx-mpx.o.
2013 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2014 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2015 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2016 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2017 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2018 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2019 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2020 * linux-x86-low.c (x86_linux_read_description): Add case for
2021 X86_XSTATE_AVX_MPX_MASK.
2022 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2023 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2024 init_registers_i386_avx_mpx_linux.
2025 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2026 (initialize_low_tracepoint): Call
2027 init_registers_i386_avx_mpx_linux.
2028 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2029 (initialize_low_tracepoint): Call
2030 init_registers_amd64_avx_mpx_linux.
2031 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2032 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2033 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2034 declarations.
2035
9b30624b
PA
20362016-04-18 Pedro Alves <palves@redhat.com>
2037
2038 * configure: Regenerate.
2039
45e3745e
AT
20402016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2041
2042 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2043 (aarch64_emit_sub): Likewise.
2044
2afc13ff
PA
20452016-04-12 Pedro Alves <palves@redhat.com>
2046
2047 * utils.c (prepare_to_throw_exception): Delete.
2048
6e774b13
SM
20492016-04-05 Simon Marchi <simon.marchi@ericsson.com>
2050
2051 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2052
4dca19f8
MK
20532016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2054
2055 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2056
d0a9981f
MK
20572016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2058
2059 * linux-aarch64-ipa.c: Add <elf.h> include.
2060 * linux-ppc-ipa.c: Add <elf.h> include.
2061 * linux-s390-ipa.c: Add <elf.h> include.
2062
252db07e
MK
20632016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2064
2065 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2066 (get_raw_reg_ptr): Likewise.
2067 (get_trace_state_variable_value_ptr): Likewise.
2068 (set_trace_state_variable_value_ptr): Likewise.
2069 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2070 char *.
2071
14e2b6d9
MK
20722016-03-31 Wei-cheng Wang <cole945@gmail.com>
2073 Marcin Kościelnicki <koriakin@0x04.net>
2074
2075 PR/17221
2076 * linux-ppc-low.c (emit_insns): New function.
2077 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2078 (ppc_emit_prologue): New function.
2079 (ppc_emit_epilogue): New function.
2080 (ppc_emit_add): New function.
2081 (ppc_emit_sub): New function.
2082 (ppc_emit_mul): New function.
2083 (ppc_emit_lsh): New function.
2084 (ppc_emit_rsh_signed): New function.
2085 (ppc_emit_rsh_unsigned): New function.
2086 (ppc_emit_ext): New function.
2087 (ppc_emit_zero_ext): New function.
2088 (ppc_emit_log_not): New function.
2089 (ppc_emit_bit_and): New function.
2090 (ppc_emit_bit_or): New function.
2091 (ppc_emit_bit_xor): New function.
2092 (ppc_emit_bit_not): New function.
2093 (ppc_emit_equal): New function.
2094 (ppc_emit_less_signed): New function.
2095 (ppc_emit_less_unsigned): New function.
2096 (ppc_emit_ref): New function.
2097 (ppc_emit_const): New function.
2098 (ppc_emit_reg): New function.
2099 (ppc_emit_pop): New function.
2100 (ppc_emit_stack_flush): New function.
2101 (ppc_emit_swap): New function.
2102 (ppc_emit_stack_adjust): New function.
2103 (ppc_emit_call): New function.
2104 (ppc_emit_int_call_1): New function.
2105 (ppc_emit_void_call_2): New function.
2106 (ppc_emit_if_goto): New function.
2107 (ppc_emit_goto): New function.
2108 (ppc_emit_eq_goto): New function.
2109 (ppc_emit_ne_goto): New function.
2110 (ppc_emit_lt_goto): New function.
2111 (ppc_emit_le_goto): New function.
2112 (ppc_emit_gt_goto): New function.
2113 (ppc_emit_ge_goto): New function.
2114 (ppc_write_goto_address): New function.
2115 (ppc_emit_ops_impl): New static variable.
2116 (ppc64v1_emit_prologue): New function.
2117 (ppc64v2_emit_prologue): New function.
2118 (ppc64_emit_epilogue): New function.
2119 (ppc64_emit_add): New function.
2120 (ppc64_emit_sub): New function.
2121 (ppc64_emit_mul): New function.
2122 (ppc64_emit_lsh): New function.
2123 (ppc64_emit_rsh_signed): New function.
2124 (ppc64_emit_rsh_unsigned): New function.
2125 (ppc64_emit_ext): New function.
2126 (ppc64_emit_zero_ext): New function.
2127 (ppc64_emit_log_not): New function.
2128 (ppc64_emit_bit_and): New function.
2129 (ppc64_emit_bit_or): New function.
2130 (ppc64_emit_bit_xor): New function.
2131 (ppc64_emit_bit_not): New function.
2132 (ppc64_emit_equal): New function.
2133 (ppc64_emit_less_signed): New function.
2134 (ppc64_emit_less_unsigned): New function.
2135 (ppc64_emit_ref): New function.
2136 (ppc64_emit_const): New function.
2137 (ppc64v1_emit_reg): New function.
2138 (ppc64v2_emit_reg): New function.
2139 (ppc64_emit_pop): New function.
2140 (ppc64_emit_stack_flush): New function.
2141 (ppc64_emit_swap): New function.
2142 (ppc64v1_emit_call): New function.
2143 (ppc64v2_emit_call): New function.
2144 (ppc64v1_emit_int_call_1): New function.
2145 (ppc64v2_emit_int_call_1): New function.
2146 (ppc64v1_emit_void_call_2): New function.
2147 (ppc64v2_emit_void_call_2): New function.
2148 (ppc64_emit_if_goto): New function.
2149 (ppc64_emit_eq_goto): New function.
2150 (ppc64_emit_ne_goto): New function.
2151 (ppc64_emit_lt_goto): New function.
2152 (ppc64_emit_le_goto): New function.
2153 (ppc64_emit_gt_goto): New function.
2154 (ppc64_emit_ge_goto): New function.
2155 (ppc64v1_emit_ops_impl): New static variable.
2156 (ppc64v2_emit_ops_impl): New static variable.
2157 (ppc_emit_ops): New function.
2158 (linux_low_target): Wire in ppc_emit_ops.
2159
a2174ba4
MK
21602016-03-31 Wei-cheng Wang <cole945@gmail.com>
2161 Marcin Kościelnicki <koriakin@0x04.net>
2162
2163 PR/17221
2164 * Makefile.in: Add powerpc-*-ipa.o
2165 * configure.srv: Add ipa_obj for powerpc*-linux.
2166 * linux-ppc-ipa.c: New file.
2167 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2168 includes.
2169 (PPC_FIELD): New macro.
2170 (PPC_SEXT): New macro.
2171 (PPC_OP6): New macro.
2172 (PPC_BO): New macro.
2173 (PPC_LI): New macro.
2174 (PPC_BD): New macro.
2175 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2176 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2177 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2178 (ppc_get_thread_area): New function.
2179 (is_elfv2_inferior): New function.
2180 (gen_ds_form): New function.
2181 (GEN_STD): New macro.
2182 (GEN_STDU): New macro.
2183 (GEN_LD): New macro.
2184 (GEN_LDU): New macro.
2185 (gen_d_form): New function.
2186 (GEN_ADDI): New macro.
2187 (GEN_ADDIS): New macro.
2188 (GEN_LI): New macro.
2189 (GEN_LIS): New macro.
2190 (GEN_ORI): New macro.
2191 (GEN_ORIS): New macro.
2192 (GEN_LWZ): New macro.
2193 (GEN_STW): New macro.
2194 (GEN_STWU): New macro.
2195 (gen_xfx_form): New function.
2196 (GEN_MFSPR): New macro.
2197 (GEN_MTSPR): New macro.
2198 (GEN_MFCR): New macro.
2199 (GEN_MTCR): New macro.
2200 (GEN_SYNC): New macro.
2201 (GEN_LWSYNC): New macro.
2202 (gen_x_form): New function.
2203 (GEN_OR): New macro.
2204 (GEN_MR): New macro.
2205 (GEN_LWARX): New macro.
2206 (GEN_STWCX): New macro.
2207 (GEN_CMPW): New macro.
2208 (gen_md_form): New function.
2209 (GEN_RLDICL): New macro.
2210 (GEN_RLDICR): New macro.
2211 (gen_i_form): New function.
2212 (GEN_B): New macro.
2213 (GEN_BL): New macro.
2214 (gen_b_form): New function.
2215 (GEN_BNE): New macro.
2216 (GEN_LOAD): New macro.
2217 (GEN_STORE): New macro.
2218 (gen_limm): New function.
2219 (gen_atomic_xchg): New function.
2220 (gen_call): New function.
2221 (ppc_relocate_instruction): New function.
2222 (ppc_install_fast_tracepoint_jump_pad): New function.
2223 (ppc_get_min_fast_tracepoint_insn_len): New function.
2224 (ppc_get_ipa_tdesc_idx): New function.
2225 (the_low_target): Wire in the new functions.
2226 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2227 tdescs.
2228 * linux-ppc-tdesc.h: New file.
2229
a13c4696
MK
22302016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2231
2232 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2233 (alloc_jump_pad_buffer): New function.
2234 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2235 (alloc_jump_pad_buffer): New function.
2236 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2237 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2238 (alloc_jump_pad_buffer): New function.
2239 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2240 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2241 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2242 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2243
1cda1512
MK
22442016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2245
2246 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2247 * linux-amd64-ipa.c: Likewise.
2248 * linux-i386-ipa.c: Likewise.
2249 * linux-s390-ipa.c: Likewise.
2250 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2251 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2252 set_trace_state_variable_value_ptr.
2253 (struct ipa_sym_addresses): Likewise.
2254 (symbol_list): Likewise.
2255 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2256 accessing gdb_collect directly.
2257 (gdb_collect_ptr_type): New typedef.
2258 (get_raw_reg_ptr_type): New typedef.
2259 (get_trace_state_variable_value_ptr_type): New typedef.
2260 (set_trace_state_variable_value_ptr_type): New typedef.
2261 (gdb_collect_ptr): New global.
2262 (get_raw_reg_ptr): New global.
2263 (get_trace_state_variable_value_ptr): New global.
2264 (set_trace_state_variable_value_ptr): New global.
2265 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2266 accessing get_raw_reg directly.
2267 (get_get_tsv_func_addr): Likewise for
2268 get_trace_state_variable_value_ptr.
2269 (get_set_tsv_func_addr): Likewise for
2270 set_trace_state_variable_value_ptr.
2271 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2272
72fb5488
SM
22732016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2274
2275 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2276
28170b88
MK
22772016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2278
2279 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2280 packets.
2281 (relocate_instruction): Remove own_buf.
2282 * server.c (own_buf): Make global.
2283 (handle_v_requests): Make global.
2284 * server.h (own_buf): New declaration.
2285 (handle_v_requests): New prototype.
2286
f39e8743
MK
22872016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2288
2289 PR 18377
2290 * linux-s390-low.c (add_insns): New function.
2291 (s390_emit_prologue): New function.
2292 (s390_emit_epilogue): New function.
2293 (s390_emit_add): New function.
2294 (s390_emit_sub): New function.
2295 (s390_emit_mul): New function.
2296 (s390_emit_lsh): New function.
2297 (s390_emit_rsh_signed): New function.
2298 (s390_emit_rsh_unsigned): New function.
2299 (s390_emit_ext): New function.
2300 (s390_emit_log_not): New function.
2301 (s390_emit_bit_and): New function.
2302 (s390_emit_bit_or): New function.
2303 (s390_emit_bit_xor): New function.
2304 (s390_emit_bit_not): New function.
2305 (s390_emit_equal): New function.
2306 (s390_emit_less_signed): New function.
2307 (s390_emit_less_unsigned): New function.
2308 (s390_emit_ref): New function.
2309 (s390_emit_if_goto): New function.
2310 (s390_emit_goto): New function.
2311 (s390_write_goto_address): New function.
2312 (s390_emit_litpool): New function.
2313 (s390_emit_const): New function.
2314 (s390_emit_call): New function.
2315 (s390_emit_reg): New function.
2316 (s390_emit_pop): New function.
2317 (s390_emit_stack_flush): New function.
2318 (s390_emit_zero_ext): New function.
2319 (s390_emit_swap): New function.
2320 (s390_emit_stack_adjust): New function.
2321 (s390_emit_set_r2): New function.
2322 (s390_emit_int_call_1): New function.
2323 (s390_emit_void_call_2): New function.
2324 (s390_emit_eq_goto): New function.
2325 (s390_emit_ne_goto): New function.
2326 (s390_emit_lt_goto): New function.
2327 (s390_emit_le_goto): New function.
2328 (s390_emit_gt_goto): New function.
2329 (s390_emit_ge_goto): New function.
2330 (s390x_emit_prologue): New function.
2331 (s390x_emit_epilogue): New function.
2332 (s390x_emit_add): New function.
2333 (s390x_emit_sub): New function.
2334 (s390x_emit_mul): New function.
2335 (s390x_emit_lsh): New function.
2336 (s390x_emit_rsh_signed): New function.
2337 (s390x_emit_rsh_unsigned): New function.
2338 (s390x_emit_ext): New function.
2339 (s390x_emit_log_not): New function.
2340 (s390x_emit_bit_and): New function.
2341 (s390x_emit_bit_or): New function.
2342 (s390x_emit_bit_xor): New function.
2343 (s390x_emit_bit_not): New function.
2344 (s390x_emit_equal): New function.
2345 (s390x_emit_less_signed): New function.
2346 (s390x_emit_less_unsigned): New function.
2347 (s390x_emit_ref): New function.
2348 (s390x_emit_if_goto): New function.
2349 (s390x_emit_const): New function.
2350 (s390x_emit_call): New function.
2351 (s390x_emit_reg): New function.
2352 (s390x_emit_pop): New function.
2353 (s390x_emit_stack_flush): New function.
2354 (s390x_emit_zero_ext): New function.
2355 (s390x_emit_swap): New function.
2356 (s390x_emit_stack_adjust): New function.
2357 (s390x_emit_int_call_1): New function.
2358 (s390x_emit_void_call_2): New function.
2359 (s390x_emit_eq_goto): New function.
2360 (s390x_emit_ne_goto): New function.
2361 (s390x_emit_lt_goto): New function.
2362 (s390x_emit_le_goto): New function.
2363 (s390x_emit_gt_goto): New function.
2364 (s390x_emit_ge_goto): New function.
2365 (s390_emit_ops): New function.
2366 (struct linux_target_ops): Fill in emit_ops hook.
2367
abd9baf9
MK
23682016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2369
2370 PR 18377
2371 * Makefile.in: Add s390 IPA files.
2372 * configure.srv: Build IPA for s390.
2373 * linux-s390-ipa.c: New file.
2374 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2375 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2376 (tdesc_s390_linux32): Likewise.
2377 (init_registers_s390_linux32v1): Likewise.
2378 (tdesc_s390_linux32v1): Likewise.
2379 (init_registers_s390_linux32v2): Likewise.
2380 (tdesc_s390_linux32v2): Likewise.
2381 (init_registers_s390_linux64): Likewise.
2382 (tdesc_s390_linux64): Likewise.
2383 (init_registers_s390_linux64v1): Likewise.
2384 (tdesc_s390_linux64v1): Likewise.
2385 (init_registers_s390_linux64v2): Likewise.
2386 (tdesc_s390_linux64v2): Likewise.
2387 (init_registers_s390_te_linux64): Likewise.
2388 (tdesc_s390_te_linux64): Likewise.
2389 (init_registers_s390_vx_linux64): Likewise.
2390 (tdesc_s390_vx_linux64): Likewise.
2391 (init_registers_s390_tevx_linux64): Likewise.
2392 (tdesc_s390_tevx_linux64): Likewise.
2393 (init_registers_s390x_linux64): Likewise.
2394 (tdesc_s390x_linux64): Likewise.
2395 (init_registers_s390x_linux64v1): Likewise.
2396 (tdesc_s390x_linux64v1): Likewise.
2397 (init_registers_s390x_linux64v2): Likewise.
2398 (tdesc_s390x_linux64v2): Likewise.
2399 (init_registers_s390x_te_linux64): Likewise.
2400 (tdesc_s390x_te_linux64): Likewise.
2401 (init_registers_s390x_vx_linux64): Likewise.
2402 (tdesc_s390x_vx_linux64): Likewise.
2403 (init_registers_s390x_tevx_linux64): Likewise.
2404 (tdesc_s390x_tevx_linux64): Likewise.
2405 (have_hwcap_s390_vx): New static variable.
2406 (s390_arch_setup): Fill have_hwcap_s390_vx.
2407 (s390_get_thread_area): New function.
2408 (s390_ft_entry_gpr_esa): New const.
2409 (s390_ft_entry_gpr_zarch): New const.
2410 (s390_ft_entry_misc): New const.
2411 (s390_ft_entry_fr): New const.
2412 (s390_ft_entry_vr): New const.
2413 (s390_ft_main_31): New const.
2414 (s390_ft_main_64): New const.
2415 (s390_ft_exit_fr): New const.
2416 (s390_ft_exit_vr): New const.
2417 (s390_ft_exit_misc): New const.
2418 (s390_ft_exit_gpr_esa): New const.
2419 (s390_ft_exit_gpr_zarch): New const.
2420 (append_insns): New function.
2421 (s390_relocate_instruction): New function.
2422 (s390_install_fast_tracepoint_jump_pad): New function.
2423 (s390_get_min_fast_tracepoint_insn_len): New function.
2424 (s390_get_ipa_tdesc_idx): New function.
2425 (struct linux_target_ops): Wire in the above functions.
2426 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2427 * linux-s390-tdesc.h: New file.
2428
a4105d04
MK
24292016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2430
2431 * linux-s390-low.c (s390_supports_tracepoints): New function.
2432 (struct linux_target_ops): Fill supports_tracepoints hook.
2433
35ac8b3e
YQ
24342016-03-18 Yao Qi <yao.qi@linaro.org>
2435
2436 * linux-low.c (lwp_signal_can_be_delivered): New function.
2437 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2438
94610ec4
YQ
24392016-03-18 Yao Qi <yao.qi@linaro.org>
2440
2441 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2442 0 if signal is enqueued. Remove 'signal' from one debugging
2443 message. Move one debugging message to some lines below.
2444 Remove code setting 'signal' to 0.
2445
80aea927
YQ
24462016-03-18 Yao Qi <yao.qi@linaro.org>
2447
2448 * linux-low.c (linux_low_filter_event): Remove redundant
2449 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2450
b04fd3be
MK
24512016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2452
2453 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2454 (struct linux_target_ops): Wire in the above.
2455
c40c8d4b
YQ
24562016-03-03 Yao Qi <yao.qi@linaro.org>
2457
2458 * linux-low.c: Update comments to start_step_over.
2459
0f8288ae
YQ
24602016-03-03 Yao Qi <yao.qi@linaro.org>
2461
2462 PR server/19736
2463 * linux-low.c (handle_extended_wait): Set child suspended
2464 if event_lwp->bp_reinsert isn't zero.
2465
fdbd04a8
YQ
24662016-03-02 Yao Qi <yao.qi@linaro.org>
2467
2468 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2469 enqueue_pending_signal.
2470
6896a8fa
MK
24712016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2472
2473 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2474 is actually loaded.
2475
ab503087
MK
24762016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2477
2478 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2479 (s390_regmap_3264) [!__s390x__]: New global.
2480 (s390_collect_ptrace_register): Skip map entries containing -1.
2481 (s390_supply_ptrace_register): Ditto.
2482 (s390_fill_gprs_high): New function.
2483 (s390_store_gprs_high): New function.
2484 (s390_regsets): Add NT_S390_HIGH_GPRS.
2485 (s390_get_hwcap): Enable on 31-bit.
2486 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2487 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2488 Detect NT_S390_HIGH_GPRS.
2489 (s390_usrregs_info_3264): Enable on 31-bit.
2490 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2491 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2492
ae91f625
MK
24932016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2494
2495 PR gdb/13808
2496 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2497 * configure.srv: Ditto.
2498 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2499 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2500 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2501 (init_registers_amd64_linux): Remove prototype.
2502 (tdesc_amd64_linux): Remove declaration.
2503 (get_ipa_tdesc): New function.
2504 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2505 initialize remaining tdescs.
2506 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2507 (init_registers_i386_linux): Remove prototype.
2508 (tdesc_i386_linux): Remove declaration.
2509 (get_ipa_tdesc): New function.
2510 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2511 initialize remaining tdescs.
2512 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2513 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2514 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2515 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2516 (x86_get_ipa_tdesc_idx): New function.
2517 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2518 * linux-x86-tdesc.h: New file.
2519 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2520 (target_get_ipa_tdesc_idx): New macro.
2521 * tracepoint.c (ipa_tdesc_idx): New macro.
2522 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2523 (symbol_list): Add ipa_tdesc_idx.
2524 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2525 (ipa_tdesc): Remove.
2526 (ipa_tdesc_idx): New variable.
2527 (get_context_regcache): Use get_ipa_tdesc.
2528 (gdb_collect): Ditto.
2529 (gdb_probe): Ditto.
2530 * tracepoint.h (get_ipa_tdesc): New prototype.
2531 (ipa_tdesc): Remove.
2532
e7ad2f14
PA
25332016-02-24 Pedro Alves <palves@redhat.com>
2534
2535 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2536 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2537 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2538 Factor out common code between the USE_SIGTRAP_SIGINFO and
2539 !USE_SIGTRAP_SIGINFO blocks.
2540 (linux_low_filter_event): Call save_stop_reason instead of
2541 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2542 Update comments.
2543 (linux_wait_1): Update comments.
2544
657f9cde
WW
25452016-02-24 Wei-cheng Wang <cole945@gmail.com>
2546
2547 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2548 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2549 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2550 ppc_insert_point, ppc_remove_point.
2551
b00b61e1
MK
25522016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2553
2554 * linux-s390-low.c (s390_supports_z_point_type): New function.
2555 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2556
553cb527
YQ
25572016-02-16 Yao Qi <yao.qi@linaro.org>
2558
2559 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2560 PC. Get pc from regcache_read_pc.
2561
a5652c21
YQ
25622016-02-12 Yao Qi <yao.qi@linaro.org>
2563
2564 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2565 or linux_get_pc_32bit.
2566 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2567
ed443b61
YQ
25682016-02-12 Yao Qi <yao.qi@linaro.org>
2569
2570 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2571 arm_linux_get_next_pcs_fixup.
2572
020ecd38
MK
25732016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2574
2575 * tracepoint.c (x_tracepoint_action_download): Change
2576 write_inferior_data_ptr to write_inferior_data_pointer.
2577 (cmd_qtstart): Likewise.
2578 (write_inferior_data_ptr): Remove.
2579 (download_agent_expr): Change write_inferior_data_ptr to
2580 write_inferior_data_pointer.
2581 (download_tracepoint_1): Likewise.
2582 (download_tracepoint): Likewise.
2583 (download_trace_state_variables): Likewise.
2584
7cae9051
WW
25852016-02-11 Wei-cheng Wang <cole945@gmail.com>
2586 Marcin Kościelnicki <koriakin@0x04.net>
2587
2588 * tracepoint.c (struct tracepoint_action_ops): Remove.
2589 (struct tracepoint_action): Remove ops.
2590 (m_tracepoint_action_download, r_tracepoint_action_download)
2591 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2592 size and offset accordingly.
2593 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2594 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2595 (tracepoint_action_send, tracepoint_action_download): New functions.
2596 Helpers for trace action handlers.
2597 (add_tracepoint_action): Remove setup actions ops.
2598 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2599
9f6a71b4
YQ
26002016-02-10 Yao Qi <yao.qi@linaro.org>
2601
2602 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2603
1e94266c
SM
26042016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2605
2606 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2607 to AC_OUTPUT.
2608 * configure: Regenerate.
2609
8adce034
SM
26102016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2611
2612 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2613 void * to gdb_byte *.
2614 * linux-low.c (siginfo_fixup): Likewise.
2615 (linux_xfer_siginfo): Likewise.
2616 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2617 Likewise.
2618 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2619
93813b37
WT
26202016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2621
2622 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2623 to srv_tgtobj.
2624 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2625 to srv_tgtobj.
2626 * linux-x86-low.c [__x86_64__]: Include
2627 "nat/amd64-linux-siginfo.h".
2628 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2629 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2630 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2631 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2632 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2633 (cpt_si_fd, si_timerid, si_overrun): Move from
2634 nat/amd64-linux-siginfo.c.
2635 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2636
8424cc97
SM
26372016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2638
2639 * server.c (skip_to_semicolon): Remove.
2640 (process_point_options): Use strchrnul instead of
2641 skip_to_semicolon.
2642
4d18591b
YQ
26432016-01-26 Yao Qi <yao.qi@linaro.org>
2644
2645 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2646 * linux-low.c (install_software_single_step_breakpoints): Don't
2647 call regcache_read_pc.
2648 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2649 argument pc.
2650
d8020970
YQ
26512016-01-26 Yao Qi <yao.qi@linaro.org>
2652
2653 * linux-low.c (install_software_single_step_breakpoints): Call
2654 regcache_read_pc instead of get_pc.
2655
8b207339
YQ
26562016-01-26 Yao Qi <yao.qi@linaro.org>
2657
2658 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2659 (unblock_async_io): Rename to ...
2660 (block_unblock_async_io): ... it. New function.
2661 (enable_async_io): Don't install SIGIO handler. Unblock it
2662 instead.
2663 (disable_async_io): Don't ignore SIGIO. Block it instead.
2664 (initialize_async_io): Install SIGIO handler. Don't call
2665 unblock_async_io.
2666
18879fef
YQ
26672016-01-26 Yao Qi <yao.qi@linaro.org>
2668
2669 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2670 first character is '\003', call *the_target->request_interrupt.
2671
a0f8e08a
YQ
26722016-01-25 Yao Qi <yao.qi@linaro.org>
2673
2674 * remote-utils.c (new_thread_notify): Remove.
2675 (dead_thread_notify): Likewise.
2676 * remote-utils.h (new_thread_notify): Remove declaration.
2677 (dead_thread_notify): Likewise.
2678
cc5fd9ab
MK
26792016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2680
2681 * gdb.trace/pending.exp: Fix expected message on continue.
2682
99e8eb11
MK
26832016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2684
2685 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2686 it works properly on big-endian machines where sizeof (CORE_ADDR)
2687 != sizeof (void *).
2688
a994041d
PA
26892016-01-21 Pedro Alves <palves@redhat.com>
2690
2691 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2692 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2693 * configure: Regenerate.
2694
f7a6a40d
YQ
26952016-01-21 Yao Qi <yao.qi@linaro.org>
2696
2697 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2698 is_thumb and set it according to CPSR saved on the stack.
2699 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2700 arm_sigreturn_next_pc.
2701
6f69e520
YQ
27022016-01-18 Yao Qi <yao.qi@linaro.org>
2703
2704 * linux-low.c (linux_set_pc_64bit): New function.
2705 (linux_get_pc_64bit): New function.
2706 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2707 Declare.
2708 * linux-sparc-low.c (debug_threads): Remove declaration.
2709 (sparc_get_pc): Remove.
2710 (the_low_target): Use linux_get_pc_64bit instead of
2711 sparc_get_pc.
2712 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2713 (the_low_target): Use linux_get_pc_64bit and
2714 linux_set_pc_64bit.
2715
276d4552
YQ
27162016-01-18 Yao Qi <yao.qi@linaro.org>
2717
2718 * linux-arm-low.c (debug_threads): Remove declaration.
2719 (arm_get_pc, arm_set_pc): Remove.
2720 (the_low_target): Use linux_get_pc_32bit and
2721 linux_set_pc_32bit.
2722 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2723 (the_low_target): Use linux_get_pc_32bit and
2724 linux_set_pc_32bit.
2725 * linux-cris-low.c (debug_threads): Remove declaration.
2726 (cris_get_pc, cris_set_pc,): Remove.
2727 (the_low_target): Use linux_get_pc_32bit and
2728 linux_set_pc_32bit.
2729 * linux-crisv32-low.c (debug_threads): Remove declaration.
2730 (cris_get_pc, cris_set_pc): Remove.
2731 (the_low_target): Use linux_get_pc_32bit and
2732 linux_set_pc_32bit.
2733 * linux-low.c: Include inttypes.h.
2734 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2735 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2736 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2737 (the_low_target): Use linux_get_pc_32bit and
2738 linux_set_pc_32bit.
2739 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2740 (the_low_target): Use linux_get_pc_32bit and
2741 linux_set_pc_32bit.
2742 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2743 (the_low_target): Use linux_get_pc_32bit and
2744 linux_set_pc_32bit.
2745 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2746 (the_low_target): Use linux_get_pc_32bit and
2747 linux_set_pc_32bit.
2748 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2749 (the_low_target): Use linux_get_pc_32bit and
2750 linux_set_pc_32bit.
2751
eb0edac8
GB
27522016-01-18 Gary Benson <gbenson@redhat.com>
2753
2754 * configure.ac (AC_FUNC_FORK): New check.
2755 * config.in: Regenerate.
2756 * configure: Likewise.
2757
1b451dda
YQ
27582016-01-14 Yao Qi <yao.qi@linaro.org>
2759
2760 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2761 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2762 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2763 arm_get_next_pcs_ctor.
2764
82075af2
JS
27652016-01-12 Josh Stone <jistone@redhat.com>
2766 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2767
2768 * inferiors.h: Include "gdb_vecs.h".
2769 (struct process_info): Add syscalls_to_catch.
2770 * inferiors.c (remove_process): Free syscalls_to_catch.
2771 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2772 syscall_return stops.
2773 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2774 * server.c (handle_general_set): Handle QCatchSyscalls.
2775 (handle_query): Report support for QCatchSyscalls.
2776 * target.h (struct target_ops): Add supports_catch_syscall.
2777 (target_supports_catch_syscall): New macro.
2778 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2779 (struct lwp_info): Add syscall_state.
2780 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2781 Maintain syscall_state and syscalls_to_catch across exec.
2782 (get_syscall_trapinfo): New function, proxy to the_low_target.
2783 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2784 (linux_low_filter_event): Toggle syscall_state entry/return for
2785 syscall traps, and set it ignored for all others.
2786 (gdb_catching_syscalls_p): New function.
2787 (gdb_catch_this_syscall_p): New function.
2788 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2789 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2790 (linux_supports_catch_syscall): New function.
2791 (linux_target_ops): Install it.
2792 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2793 (the_low_target): Install it.
2794
8f13a3ce
MF
27952016-01-12 Mike Frysinger <vapier@gentoo.org>
2796
2797 * acinclude.m4: Include new ../warning.m4 file.
2798 * configure: Regenerated.
2799 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2800
5b3da067
MF
28012016-01-12 Mike Frysinger <vapier@gentoo.org>
2802
2803 * ax.c (is_goto_target): Mark static.
2804 * linux-low.c (register_addr): Likewise.
2805 (linux_fetch_registers, linux_store_registers): Likewise.
2806 * mem-break.c (any_persistent_commands): Fix old prototype.
2807 (add_commands_to_breakpoint): Mark static.
2808 * regcache.c (find_register_by_name): Delete unused func.
2809 * remote-utils.c (hex_or_minus_one): Mark static.
2810 * server.c (monitor_show_help): Mark static.
2811 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2812 handle_v_requests): Likewise.
2813
bc504a31
PA
28142016-01-12 Pedro Alves <palves@redhat.com>
2815
2816 Remove use of the registered trademark symbol throughout.
2817
5a0dd67a
YQ
28182016-01-08 Yao Qi <yao.qi@linaro.org>
2819
2820 * remote-utils.c (getpkt): If c is '\003', call target hook
2821 request_interrupt.
2822
b2ca446f
YQ
28232016-01-06 Yao Qi <yao.qi@linaro.org>
2824
2825 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2826 linux-aarch32-low.c.
2827 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2828 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2829 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2830 (thumb2_breakpoint): Declare.
2831 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2832 linux-aarch32-low.h.
2833 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2834 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2835 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2836
edd88788
JB
28372016-01-01 Joel Brobecker <brobecker@adacore.com>
2838
2839 * gdbreplay.c (gdbreplay_version): Change copyright year in
2840 version message.
2841 * server.c (gdbserver_version): Likewise.
2842
65da7f14
PP
28432015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2844
2845 * server.c (crc32_table): Delete.
2846 (crc32): Use libiberty's xcrc32 function.
2847
4abd5ed2
JB
28482015-12-22 Joel Brobecker <brobecker@adacore.com>
2849
2850 * lynx-low.c (lynx_delete_thread_callback): New function.
2851 (lynx_mourn): Properly delete our process and all of its
2852 threads. Remove call to clear_inferiors.
2853
0e50fe5c
JB
28542015-12-22 Joel Brobecker <brobecker@adacore.com>
2855
2856 * target.c (thread_search_callback): Add check that
2857 the thread_stopped target callback is not NULL before
2858 calling it.
2859
35adc03f
YQ
28602015-12-21 Yao Qi <yao.qi@linaro.org>
2861
2862 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2863 arm breakpoint.
2864
bd2b2909
AT
28652015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2866
2867 * server.c (handle_query): Call target_supports_software_single_step.
2868
7fe5e27e
AT
28692015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2870
2871 * linux-low.c (single_step): New function.
2872 (linux_resume_one_lwp_throw): Call single_step.
2873 (start_step_over): Likewise.
2874
d9311bfa
AT
28752015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2876
2877 * Makefile.in (SFILES): Append arch/arm-linux.c,
2878 arch/arm-get-next-pcs.c.
2879 (arm-linux.o): New rule.
2880 (arm-get-next-pcs.o): New rule.
2881 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2882 arm-linux.o.
2883 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2884 to linux-aarch32-low.c.
2885 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2886 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2887 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2888 (thumb2_breakpoint_len): Likewise.
2889 (arm_is_thumb_mode): Make non-static.
2890 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2891 from linux-aarch32-low.c.
2892 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2893 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2894 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2895 (thumb2_breakpoint_len): Likewise.
2896 (arm_is_thumb_mode): New declaration.
2897 * linux-arm-low.c: Include arch/arm-linux.h
2898 aarch/arm-get-next-pcs.h, sys/syscall.h.
2899 (get_next_pcs_ops): New struct.
2900 (get_next_pcs_addr_bits_remove): New function.
2901 (get_next_pcs_is_thumb): New function.
2902 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2903 (arm_sigreturn_next_pc): Likewise.
2904 (get_next_pcs_syscall_next_pc): Likewise.
2905 (arm_gdbserver_get_next_pcs): Likewise.
2906 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2907 Initialize.
2908 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2909 * server.h: Include gdb_vecs.h.
2910
68ce2059
AT
29112015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2912
2913 * Makefile.in (SFILES): Append common/common-regcache.c.
2914 (OBS): Append common-regcache.o.
2915 (common-regcache.o): New rule.
2916 * regcache.c (init_register_cache): Initialize cache to
2917 REG_UNAVAILABLE.
2918 (regcache_raw_read_unsigned): New function.
2919 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2920 register_status enum.
2921
fa5308bd
AT
29222015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2923
2924 * linux-aarch64-low.c (the_low_targets): Rename
2925 breakpoint_reinsert_addr to get_next_pcs.
2926 * linux-arm-low.c (the_low_targets): Likewise.
2927 * linux-bfin-low.c (the_low_targets): Likewise.
2928 * linux-cris-low.c (the_low_targets): Likewise.
2929 * linux-crisv32-low.c (the_low_targets): Likewise.
2930 * linux-low.c (can_software_single_step): Likewise.
2931 (install_software_single_step_breakpoints): New function.
2932 (start_step_over): Use install_software_single_step_breakpoints.
2933 * linux-low.h: New CORE_ADDR vector.
2934 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2935 get_next_pcs.
2936 * linux-mips-low.c (the_low_targets): Likewise.
2937 * linux-nios2-low.c (the_low_targets): Likewise.
2938 * linux-sparc-low.c (the_low_targets): Likewise.
2939
4a6ed09b
PA
29402015-12-17 Pedro Alves <palves@redhat.com>
2941
2942 * linux-low.c (linux_kill_one_lwp): Remove references to
2943 LinuxThreads.
2944 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2945 to 'kill'.
2946 (linux_init_signals): Delete.
2947 (initialize_low): Adjust.
2948 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2949
7544db95
PA
29502015-12-16 Pedro Alves <palves@redhat.com>
2951
2952 * configure.ac (compiler warning flags): When testing a
2953 -Wno-foo option, check whether -Wfoo works instead.
2954 * configure: Regenerate.
2955
8020350c
DB
29562015-12-11 Don Breazeal <donb@codesourcery.com>
2957
2958 * server.c (process_serial_event): Don't exit from gdbserver
2959 in remote mode if there are still active inferiors.
2960
db91f502
YQ
29612015-12-11 Yao Qi <yao.qi@linaro.org>
2962
2963 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2964 arm_breakpoint_at if the process is 32-bit.
2965
b37a6290
YQ
29662015-12-11 Yao Qi <yao.qi@linaro.org>
2967
2968 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2969 arm breakpoint.
2970
17b1509a
YQ
29712015-12-07 Yao Qi <yao.qi@linaro.org>
2972
2973 * configure.srv: Append arm.o to srv_tgtobj for
2974 aarch64*-*-linux* target.
2975 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2976 from linux-arm-low.c.
2977 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2978 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2979 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2980 (thumb2_breakpoint_len): Likewise.
2981 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2982 (arm_breakpoint_kinds): Likewise.
2983 (arm_breakpoint_kind_from_pc): Likewise.
2984 (arm_sw_breakpoint_from_kind): Likewise.
2985 (arm_breakpoint_kind_from_current_state): Likewise.
2986 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2987 (arm_sw_breakpoint_from_kind): Declare.
2988 (arm_breakpoint_kind_from_current_state): Declare.
2989 (arm_breakpoint_at): Declare.
2990 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2991 arm_sw_breakpoint_from_kind if process is 32-bit.
2992 (aarch64_breakpoint_kind_from_pc): New function.
2993 (aarch64_breakpoint_kind_from_current_state): New function.
2994 (the_low_target): Initialize fields breakpoint_kind_from_pc
2995 and breakpoint_kind_from_current_state.
2996 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2997 linux-aarch32-low.c.
2998 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2999 (arm_breakpoint, arm_breakpoint_len): Likewise.
3000 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3001 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3002 (arm_is_thumb_mode): Likewise.
3003 (arm_breakpoint_at): Likewise.
3004 (arm_breakpoint_kind_from_pc): Likewise.
3005 (arm_sw_breakpoint_from_kind): Likewise.
3006 (arm_breakpoint_kind_from_current_state): Likewise.
3007
3008 Revert:
3009 2015-08-04 Yao Qi <yao.qi@linaro.org>
3010
3011 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3012 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3013 * server.c (extended_protocol): Remove "static".
3014 * server.h (extended_protocol): Declare it.
3015
ece66d65
JS
30162015-12-04 Josh Stone <jistone@redhat.com>
3017
3018 * target.h (struct target_ops) <arch_setup>: Rename to ...
3019 (struct target_ops) <post_create_inferior>: ... this.
3020 (target_arch_setup): Rename to ...
3021 (target_post_create_inferior): ... this, calling post_create_inferior.
3022 * server.c (start_inferior): Update target_arch_setup calls to
3023 target_post_create_inferior.
3024 * linux-low.c (linux_low_ptrace_options): Forward declare.
3025 (linux_arch_setup): Update its comment for general use.
3026 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3027 (struct linux_target_ops): Use linux_post_create_inferior.
3028 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3029 to post_create_inferior.
3030 * nto-low.c (struct nto_target_ops): Likewise.
3031 * spu-low.c (struct spu_target_ops): Likewise.
3032 * win32-low.c (struct win32_target_ops): Likewise.
3033
e58c48b4
AT
30342015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
3035
3036 * linux-arm-low.c: Remove duplicate arch/arm.h include.
3037
fbec8956
AT
30382015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3039
3040 * linux-arm-low.c (arm_reinsert_addr): Remove function.
3041 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3042 * linux-cris-low.c (cris_reinsert_addr> Remove function.
3043 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3044 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3045 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3046 * linux-mips-low.c (mips_reinsert_addr): Remove function.
3047 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3048 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3049 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3050 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3051 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3052
9b4c5f87
AT
30532015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3054
3055 * linux-low.c (linux_look_up_symbols): Don't call
3056 linux_supports_traceclone.
3057 * linux-low.h (thread_db_init): Remove use_events argument.
3058 * thread-db.c (thread_db_use_event): Remove global variable.
3059 (struct thread_db) <td_thr_event_enable_p>: Remove field.
3060 (struct thread_db) <td_create_bp>: Remove field.
3061 (thread_db_create_event): Remove function.
3062 (thread_db_enable_reporting): Likewise.
3063 (find_one_thread): Don't check for thread_db_use_events.
3064 (attach_thread): Likewise.
3065 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3066 (try_thread_db_load_1): Don't check for thread_db_use_events.
3067 (thread_db_init): Remove use_events argument and thread events
3068 handling.
3069 (remove_thread_event_breakpoints): Remove function.
3070 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3071
7d00775e
AT
30722015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3073
3074 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3075 New function.
3076 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3077 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3078 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3079 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3080 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3081 Initialize.
3082 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3083 New function.
3084 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3085 * linux-low.c (can_hardware_single_step): Use
3086 supports_hardware_single_step.
3087 (can_software_single_step): New function.
3088 (start_step_over): Call can_software_single_step.
3089 (linux_supports_hardware_single_step): New function.
3090 (struct target_ops) <supports_software_single_step>: Initialize.
3091 * linux-low.h (struct linux_target_ops)
3092 <supports_hardware_single_step>: Initialize.
3093 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3094 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3095 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3096 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3097 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3098 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3099 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3100 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3101 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3102 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3103 Initialize.
3104 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3105 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3106 Initialize.
3107 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3108 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3109 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3110 New function.
3111 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3112 * target.h (struct target_ops): <supports_software_single_step>:
3113 New field.
3114 (target_supports_software_single_step): New macro.
3115
2d97cd35
AT
31162015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3117
3118 * linux-low.c (linux_wait_1): Fix pc advance condition.
3119 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3120 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3121
769ef81f
AT
31222015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3123
3124 * linux-arm-low.c (arm_is_thumb_mode): New function.
3125 (arm_breakpoint_at): Use arm_is_thumb_mode.
3126 (arm_breakpoint_kind_from_current_state): New function.
3127 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3128 Initialize.
3129 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3130 (linux_breakpoint_kind_from_current_state): New function.
3131 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3132 * linux-low.h (struct linux_target_ops)
3133 <breakpoint_kind_from_current_state>: New field.
3134 * target.h (struct target_ops): Likewise.
3135 (target_breakpoint_kind_from_current_state): New macro.
3136
1bebeeca
PA
31372015-11-30 Pedro Alves <palves@redhat.com>
3138
3139 * linux-low.c (linux_resume): Wake up the event loop before
3140 returning.
3141
a67a9fae
PA
31422015-11-30 Pedro Alves <palves@redhat.com>
3143
3144 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3145 check.
3146 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3147 to -1.
3148 * target.c (struct thread_search): New structure.
3149 (thread_search_callback): New function.
3150 (prev_general_thread): New global.
3151 (prepare_to_access_memory, done_accessing_memory): New functions.
3152 * target.h (prepare_to_access_memory, done_accessing_memory):
3153 Replace macros with function declarations.
3154
f2faf941
PA
31552015-11-30 Pedro Alves <palves@redhat.com>
3156
3157 PR 14618
3158 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3159 report TARGET_WAITKIND_NO_RESUMED.
3160 * remote-utils.c (prepare_resume_reply): Handle
3161 TARGET_WAITKIND_NO_RESUMED.
3162 * server.c (report_no_resumed): New global.
3163 (handle_query) <qSupported>: Handle "no-resumed+". Report
3164 "no-resumed+" support.
3165 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3166 return error if the client doesn't support no-resumed events.
3167 (push_stop_notification): New function.
3168 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3169 events if the client supports them.
3170
a681f9c9
PA
31712015-11-30 Pedro Alves <palves@redhat.com>
3172
3173 * linux-low.c (thread_still_has_status_pending_p): Don't check
3174 vCont;t here.
3175 (lwp_resumed): New function.
3176 (status_pending_p_callback): Return early if the LWP is not
3177 supposed to be resumed.
3178
65706a29
PA
31792015-11-30 Pedro Alves <palves@redhat.com>
3180
3181 * linux-low.c (handle_extended_wait): Assert that the LWP's
3182 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3183 thread create events, leave the new child's status pending.
3184 (linux_low_filter_event): If GDB wants to hear about thread exit
3185 events, leave the LWP marked dead and don't delete it.
3186 (linux_wait_for_event_filtered): Don't check for thread exit.
3187 (filter_exit_event): New function.
3188 (linux_wait_1): Use it, when returning an exit event.
3189 (linux_resume_one_lwp_throw): Assert that the LWP's
3190 waitstatus is TARGET_WAITKIND_IGNORE.
3191 * remote-utils.c (prepare_resume_reply): Handle
3192 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3193 * server.c (report_thread_events): New global.
3194 (handle_general_set): Handle QThreadEvents.
3195 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3196 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3197 TARGET_WAITKIND_THREAD_EXITED.
3198 * server.h (report_thread_events): Declare.
3199
56cf4bed
PA
32002015-11-30 Pedro Alves <palves@redhat.com>
3201
3202 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3203 the thread's last_resume_kind was resume_stop.
3204
500c1d85
PA
32052015-11-30 Pedro Alves <palves@redhat.com>
3206
3207 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3208 before returning.
3209
de979965
PA
32102015-11-30 Pedro Alves <palves@redhat.com>
3211
3212 * server.c (handle_v_requests): Handle vCtrlC.
3213
34c65914
PA
32142015-11-30 Pedro Alves <palves@redhat.com>
3215
3216 * gdbthread.h (find_any_thread_of_pid): Declare.
3217 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3218 functions.
3219 * server.c (handle_query): If current_thread is NULL, look for
3220 another thread of the selected process.
3221
79efa585 32222015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3223 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3224
3225 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3226 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3227 name in reply.
3228 * target.h (struct target_ops) <thread_name>: New field.
3229 (target_thread_name): New macro.
3230
80d82c19
JB
32312015-11-23 Joel Brobecker <brobecker@adacore.com>
3232
3233 * regcache.h (regcache_invalidate_pid): Add declaration.
3234 * regcache.c (regcache_invalidate_pid): New function, extracted
3235 from regcache_invalidate.
3236 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3237 Add trivial documentation comment.
3238 * lynx-low.c: Use regcache_invalidate_pid instead of
3239 regcache_invalidate.
3240
64da5dd5
JB
32412015-11-23 Joel Brobecker <brobecker@adacore.com>
3242
3243 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3244 and Elf64_auxv_t if the target is Android.
3245
37ce4055
DE
32462015-11-22 Doug Evans <xdje42@gmail.com>
3247
3248 * target.h: #include <sys/types.h>.
3249
06e03fff
PA
32502015-11-19 Pedro Alves <palves@redhat.com>
3251
3252 * linux-low.c (linux_process_qsupported): Change prototype.
3253 Adjust.
3254 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3255 Change prototype.
3256 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3257 and adjust to loop over all features.
3258 * server.c (handle_query) <qSupported>: Adjust to call
3259 target_process_qsupported once, passing it a vector of unprocessed
3260 features.
3261 * target.h (struct target_ops) <process_qsupported>: Change
3262 prototype.
3263 (target_process_qsupported): Adjust.
3264
9a084706
PA
32652015-11-19 Pedro Alves <palves@redhat.com>
3266
3267 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3268 mode.
3269 * configure: Regenerate.
3270
dad44a1f
PA
32712015-11-19 Pedro Alves <palves@redhat.com>
3272
3273 * configure: Regenerate.
3274
231c0592
YQ
32752015-11-19 Yao Qi <yao.qi@linaro.org>
3276
3277 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3278 type to uint32_t.
3279
6c1c9a8b
YQ
32802015-11-19 Yao Qi <yao.qi@linaro.org>
3281
3282 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3283 (struct aarch64_operand): Move enum out.
3284
9caa3311
YQ
32852015-11-19 Yao Qi <yao.qi@linaro.org>
3286
3287 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3288 struct user_fpsimd_state *.
3289 (aarch64_store_fpregset): Likewise.
3290
6a69a054
YQ
32912015-11-19 Yao Qi <yao.qi@linaro.org>
3292
3293 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3294 struct user_pt_regs *.
3295 (aarch64_store_gregset): Likewise.
3296
1798301e
PA
32972015-11-18 Pedro Alves <palves@redhat.com>
3298
3299 * Makefile.in (all_object_files): Add $IPA_OBJS.
3300
ce7715e2
PA
33012015-11-17 Pedro Alves <palves@redhat.com>
3302
3303 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3304 GDB_SIGNAL_0 and gdb_signal_to_string.
3305
c0879059
PA
33062015-11-17 Pedro Alves <palves@redhat.com>
3307
3308 * win32-low.c (handle_output_debug_string): Remove parameter.
3309 (win32_kill): Remove our_status local and adjust call to
3310 handle_output_debug_string.
3311 (get_child_debug_event): Adjust call to
3312 handle_output_debug_string.
3313
1996e237
SM
33142015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3315
3316 * linux-mips-low.c (mips_fill_gregset): Add cast.
3317 (mips_store_gregset): Likewise.
3318 (mips_fill_fpregset): Likewise.
3319 (mips_store_fpregset): Likewise.
3320
cbec665b
SM
33212015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3322
3323 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3324 priv.
3325
eb3e3c67
SM
33262015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3327
3328 * linux-mips-low.c (mips_linux_new_thread): Change type of
3329 watch_type to enum target_hw_bp_type.
3330
171de4b8
SM
33312015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3332
3333 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3334 Change return type to arm_hwbp_type.
3335
04248ead
SM
33362015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3337
3338 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3339 (arm_store_gregset): Likewise.
3340 * linux-arm-low.c (arm_get_hwcap): Likewise.
3341 (arm_read_description): Likewise.
3342
04b3479c
SM
33432015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3344
3345 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3346
2bc84e8a
SM
33472015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3348
3349 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3350 (ppc_fill_vsxregset): Likewise.
3351 (ppc_store_vsxregset): Likewise.
3352 (ppc_fill_vrregset): Likewise.
3353 (ppc_store_vrregset): Likewise.
3354 (ppc_fill_evrregset): Likewise.
3355 (ppc_store_evrregset): Likewise.
3356
e6c5bb05
SM
33572015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3358
3359 * linux-ppc-low.c (ppc_usrregs_info): Remove
3360 forward-declaration.
3361 (ppc_arch_setup): Move lower in file.
3362
7ea45d72
SM
33632015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3364
3365 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3366 (ps_pdwrite): Likewise.
3367
69291610
HW
33682015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3369
3370 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3371 to after assert checks.
3372
b42945fd
SM
33732015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3374
3375 * proc-service.c (ps_pdread): Add/adjust casts.
3376 (ps_pdwrite): Add/adjust casts.
3377
d6f85c84
SM
33782015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3379
3380 * server.c (handle_search_memory_1): Cast return value of
3381 memmem.
3382
f98cd059
SM
33832015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3384
3385 * server.c (write_qxfer_response): Change type of data to
3386 gdb_byte *.
3387
d2412fa5
PA
33882015-10-29 Pedro Alves <palves@redhat.com>
3389
3390 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3391
c17414a2
PA
33922015-10-29 Pedro Alves <palves@redhat.com>
3393
3394 * tracepoint.c (clear_installed_tracepoints): Add casts.
3395
e053fbc4
PA
33962015-10-29 Pedro Alves <palves@redhat.com>
3397
3398 * server.c (handle_v_cont, process_serial_event): Add enum
3399 gdb_signal casts to signal parsing code.
3400
add67df8
PA
34012015-10-29 Pedro Alves <palves@redhat.com>
3402
3403 * linux-low.h (NULL_REGSET): Define.
3404 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3405 * linux-arm-low.c (arm_regsets): Likewise.
3406 * linux-crisv32-low.c (cris_regsets): Likewise.
3407 * linux-m68k-low.c (m68k_regsets): Likewise.
3408 * linux-mips-low.c (mips_regsets): Likewise.
3409 * linux-nios2-low.c (nios2_regsets): Likewise.
3410 * linux-ppc-low.c (ppc_regsets): Likewise.
3411 * linux-s390-low.c (s390_regsets): Likewise.
3412 * linux-sh-low.c (sh_regsets): Likewise.
3413 * linux-sparc-low.c (sparc_regsets): Likewise.
3414 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3415 * linux-tile-low.c (tile_regsets): Likewise.
3416 * linux-x86-low.c (x86_regsets): Likewise.
3417 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3418
50bc912a
PA
34192015-10-29 Pedro Alves <palves@redhat.com>
3420
3421 * linux-low.h (NULL_REGSET): Define.
3422 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3423 * linux-arm-low.c (arm_regsets): Likewise.
3424 * linux-crisv32-low.c (cris_regsets): Likewise.
3425 * linux-m68k-low.c (m68k_regsets): Likewise.
3426 * linux-mips-low.c (mips_regsets): Likewise.
3427 * linux-nios2-low.c (nios2_regsets): Likewise.
3428 * linux-ppc-low.c (ppc_regsets): Likewise.
3429 * linux-s390-low.c (s390_regsets): Likewise.
3430 * linux-sh-low.c (sh_regsets): Likewise.
3431 * linux-sparc-low.c (sparc_regsets): Likewise.
3432 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3433 * linux-tile-low.c (tile_regsets): Likewise.
3434 * linux-x86-low.c (x86_regsets): Likewise.
3435 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3436
682b2546
DE
34372015-10-26 Doug Evans <dje@google.com>
3438
3439 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3440
963843d4
DE
34412015-10-26 Doug Evans <dje@google.com>
3442
3443 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3444
d41401ac
DE
34452015-10-26 Doug Evans <dje@google.com>
3446
3447 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3448 for debug_printf.
3449 (attach_thread, find_new_threads_callback): Ditto.
3450
3db28855
AT
34512015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3452
3453 * mem-break.h (set_breakpoint_data): Remove.
3454
fb78e89c
AT
34552015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3456
3457 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3458 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3459 (initialize_low): Remove set_breakpoint_data call.
3460 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3461 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3462 (initialize_low): Remove set_breakpoint_data call.
3463 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3464 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3465 (initialize_low): Remove set_breakpoint_data call.
3466
2e6ee069
AT
34672015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3468
3469 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3470 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3471 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3472 * target.h (target_breakpoint_kind_from_pc): New macro.
3473
1652a986
AT
34742015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3475
3476 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3477 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3478 the default breakpoint kind.
3479
abeead09
AT
34802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3481
3482 * linux-arm-low.c (arm_supports_z_point_type): Add software
3483 breakpoint support.
3484
b0b4b501
AT
34852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3486
3487 * linux-arm-low.c: Refactor breakpoint definitions.
3488 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3489 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3490
8689682c
AT
34912015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3492
3493 * Makefile.in: Add arm.c/o.
3494 * configure.srv: Likewise.
3495 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3496 (arm_breakpoint_kind_from_pc): New function.
3497 (arm_sw_breakpoint_from_kind): Return proper kind.
3498 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3499
27165294
AT
35002015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3501
3502 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3503 removal.
3504 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3505 (struct raw_breakpoint) <size>: Remove.
3506 (struct raw_breakpoint) <kind>: Add.
3507 (bp_size): New function.
3508 (bp_opcode): Likewise.
3509 (find_raw_breakpoint_at): Adjust for kind.
3510 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3511 (remove_memory_breakpoint): Adjust for kind call bp_size.
3512 (set_raw_breakpoint_at): Adjust for kind.
3513 (set_breakpoint): Likewise.
3514 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3515 (delete_raw_breakpoint): Adjust for kind.
3516 (delete_breakpoint): Likewise.
3517 (find_gdb_breakpoint): Likewise.
3518 (set_gdb_breakpoint_1): Likewise.
3519 (set_gdb_breakpoint): Likewise.
3520 (delete_gdb_breakpoint_1): Likewise.
3521 (delete_gdb_breakpoint): Likewise.
3522 (uninsert_raw_breakpoint): Likewise.
3523 (reinsert_raw_breakpoint): Likewise.
3524 (set_breakpoint_data): Remove.
3525 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3526 (check_mem_read): Adjust for kind call bp_size.
3527 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3528 (clone_one_breakpoint): Adjust for kind.
3529 * mem-break.h (set_gdb_breakpoint): Likewise.
3530 (delete_gdb_breakpoint): Likewise.
3531 * server.c (process_serial_event): Likewise.
3532
dd373349
AT
35332015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3534
3535 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3536 (struct linux_target_ops) <breakpoint>: Remove.
3537 (struct linux_target_ops) <breakpoint_len>: Remove.
3538 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3539 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3540 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3541 (arm_sw_breakpoint_from_kind): New function.
3542 * linux-bfin-low.c (bfin_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-cris-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-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3553 (struct linux_target_ops) <breakpoint>: Remove.
3554 (struct linux_target_ops) <breakpoint_len>: Remove.
3555 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3556 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3557 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3558 and sw_breakpoint_from_kind to increment the pc.
3559 (linux_breakpoint_kind_from_pc): New function.
3560 (linux_sw_breakpoint_from_kind): New function.
3561 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3562 (initialize_low): Call breakpoint_kind_from_pc and
3563 sw_breakpoint_from_kind to replace breakpoint_data/len.
3564 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3565 New field.
3566 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3567 * linux-m32r-low.c (m32r_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-m68k-low.c (m68k_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-mips-low.c (mips_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-nios2-low.c (nios2_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-ppc-low.c (ppc_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-s390-low.c (s390_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-sh-low.c (sh_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-sparc-low.c (sparc_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-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3608 (struct linux_target_ops) <breakpoint>: Remove.
3609 (struct linux_target_ops) <breakpoint_len>: Remove.
3610 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3611 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3612 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3613 * linux-x86-low.c (x86_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 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3619 (struct linux_target_ops) <breakpoint>: Remove.
3620 (struct linux_target_ops) <breakpoint_len>: Remove.
3621 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3622 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3623
4cd98a19
AT
36242015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3625
3626 * linux-cris-low.c (cris_get_pc): Remove void arg.
3627
774ee6d2
AR
36282015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3629
3630 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3631 variable name.
3632
833dcd29
AR
36332015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3634
3635 * inferiors.c (thread_pid_matches_callback): New function.
3636 (find_thread_process): New function.
3637 (remove_thread): Reset current_thread.
3638 (remove_process): Assert threads have been removed first.
3639
8d689ee5
YQ
36402015-10-15 Yao Qi <yao.qi@linaro.org>
3641
3642 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3643 if it is 3.
3644 (aarch64_remove_point): Likewise.
3645 * regcache.c (regcache_register_size): New function.
3646
1c2e1515
YQ
36472015-10-12 Yao Qi <yao.qi@linaro.org>
3648
3649 * linux-aarch64-low.c: Update all callers as emit_load_store
3650 is renamed to aarch64_emit_load_store.
3651
e1c587c3
YQ
36522015-10-12 Yao Qi <yao.qi@linaro.org>
3653
3654 * linux-aarch64-low.c: Update all callers of function renaming
3655 from emit_insn to aarch64_emit_insn.
3656
b6542f81
YQ
36572015-10-12 Yao Qi <yao.qi@linaro.org>
3658
3659 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3660 arch/aarch64-insn.h.
3661 (struct aarch64_memory_operand): Likewise.
3662 (ENCODE): Likewise.
3663 (emit_insn): Move to arch/aarch64-insn.c.
3664 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3665 (emit_load_store): Move to arch/aarch64-insn.c.
3666 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3667 (can_encode_int32): Remove.
3668
246994ce
YQ
36692015-10-12 Yao Qi <yao.qi@linaro.org>
3670
3671 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3672 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3673 (aarch64_relocate_instruction): Likewise.
3674 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3675 (struct aarch64_insn_visitor): Likewise.
3676
0badd99f
YQ
36772015-10-12 Yao Qi <yao.qi@linaro.org>
3678
3679 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3680 (struct aarch64_insn_visitor): New.
3681 (struct aarch64_insn_relocation_data): New.
3682 (aarch64_ftrace_insn_reloc_b): New function.
3683 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3684 (aarch64_ftrace_insn_reloc_cb): Likewise.
3685 (aarch64_ftrace_insn_reloc_tb): Likewise.
3686 (aarch64_ftrace_insn_reloc_adr): Likewise.
3687 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3688 (aarch64_ftrace_insn_reloc_others): Likewise.
3689 (visitor): New.
3690 (aarch64_relocate_instruction): Use visitor.
3691
dfaffe9d
YQ
36922015-10-12 Yao Qi <yao.qi@linaro.org>
3693
3694 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3695 int. Add argument buf.
3696 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3697 aarch64_relocate_instruction.
3698
70b439f0
YQ
36992015-10-12 Yao Qi <yao.qi@linaro.org>
3700
3701 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3702 argument insn. Remove local variable insn. Don't call
3703 target_read_uint32.
3704 (aarch64_install_fast_tracepoint_jump_pad): Call
3705 target_read_uint32.
3706
7781c06f
YQ
37072015-09-30 Yao Qi <yao.qi@linaro.org>
3708
3709 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3710 (emit_load_store_pair): Likewise.
3711
9a3c8263
SM
37122015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3713
3714 * dll.c (match_dll): Add cast(s).
3715 (unloaded_dll): Likewise.
3716 * linux-low.c (second_thread_of_pid_p): Likewise.
3717 (delete_lwp_callback): Likewise.
3718 (count_events_callback): Likewise.
3719 (select_event_lwp_callback): Likewise.
3720 (linux_set_resume_request): Likewise.
3721 * server.c (accumulate_file_name_length): Likewise.
3722 (emit_dll_description): Likewise.
3723 (handle_qxfer_threads_worker): Likewise.
3724 (visit_actioned_threads): Likewise.
3725 * thread-db.c (any_thread_of): Likewise.
3726 * tracepoint.c (same_process_p): Likewise.
3727 (match_blocktype): Likewise.
3728 (build_traceframe_info_xml): Likewise.
3729
224c3ddb
SM
37302015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3731
3732 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3733 assignment.
3734 (gdb_unparse_agent_expr): Likewise.
3735 * hostio.c (require_data): Likewise.
3736 (handle_pread): Likewise.
3737 * linux-low.c (disable_regset): Likewise.
3738 (fetch_register): Likewise.
3739 (store_register): Likewise.
3740 (get_dynamic): Likewise.
3741 (linux_qxfer_libraries_svr4): Likewise.
3742 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3743 (set_fast_tracepoint_jump): Likewise.
3744 (uninsert_fast_tracepoint_jumps_at): Likewise.
3745 (reinsert_fast_tracepoint_jumps_at): Likewise.
3746 (validate_inserted_breakpoint): Likewise.
3747 (clone_agent_expr): Likewise.
3748 * regcache.c (init_register_cache): Likewise.
3749 * remote-utils.c (putpkt_binary_1): Likewise.
3750 (decode_M_packet): Likewise.
3751 (decode_X_packet): Likewise.
3752 (look_up_one_symbol): Likewise.
3753 (relocate_instruction): Likewise.
3754 (monitor_output): Likewise.
3755 * server.c (handle_search_memory): Likewise.
3756 (handle_qxfer_exec_file): Likewise.
3757 (handle_qxfer_libraries): Likewise.
3758 (handle_qxfer): Likewise.
3759 (handle_query): Likewise.
3760 (handle_v_cont): Likewise.
3761 (handle_v_run): Likewise.
3762 (captured_main): Likewise.
3763 * target.c (write_inferior_memory): Likewise.
3764 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3765 * tracepoint.c (init_trace_buffer): Likewise.
3766 (add_tracepoint_action): Likewise.
3767 (add_traceframe): Likewise.
3768 (add_traceframe_block): Likewise.
3769 (cmd_qtdpsrc): Likewise.
3770 (cmd_qtdv): Likewise.
3771 (cmd_qtstatus): Likewise.
3772 (response_source): Likewise.
3773 (response_tsv): Likewise.
3774 (cmd_qtnotes): Likewise.
3775 (gdb_collect): Likewise.
3776 (initialize_tracepoint): Likewise.
3777
afbe19f8
PL
37782015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3779
3780 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3781 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3782 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3783 <NOP>: New.
3784 (enum aarch64_condition_codes): New enum.
3785 (w0): New static global.
3786 (fp): Likewise.
3787 (lr): Likewise.
3788 (struct aarch64_memory_operand) <type>: New
3789 MEMORY_OPERAND_POSTINDEX type.
3790 (postindex_memory_operand): New helper function.
3791 (emit_ret): New function.
3792 (emit_load_store_pair): New function, factored out of emit_stp
3793 with support for MEMORY_OPERAND_POSTINDEX.
3794 (emit_stp): Rewrite using emit_load_store_pair.
3795 (emit_ldp): New function.
3796 (emit_load_store): Likewise.
3797 (emit_ldr): Mention post-index instruction in comment.
3798 (emit_ldrh): New function.
3799 (emit_ldrb): New function.
3800 (emit_ldrsw): Mention post-index instruction in comment.
3801 (emit_str): Likewise.
3802 (emit_subs): New function.
3803 (emit_cmp): Likewise.
3804 (emit_and): Likewise.
3805 (emit_orr): Likewise.
3806 (emit_orn): Likewise.
3807 (emit_eor): Likewise.
3808 (emit_mvn): Likewise.
3809 (emit_lslv): Likewise.
3810 (emit_lsrv): Likewise.
3811 (emit_asrv): Likewise.
3812 (emit_mul): Likewise.
3813 (emit_sbfm): Likewise.
3814 (emit_sbfx): Likewise.
3815 (emit_ubfm): Likewise.
3816 (emit_ubfx): Likewise.
3817 (emit_csinc): Likewise.
3818 (emit_cset): Likewise.
3819 (emit_nop): Likewise.
3820 (emit_ops_insns): New helper function.
3821 (emit_pop): Likewise.
3822 (emit_push): Likewise.
3823 (aarch64_emit_prologue): New function.
3824 (aarch64_emit_epilogue): Likewise.
3825 (aarch64_emit_add): Likewise.
3826 (aarch64_emit_sub): Likewise.
3827 (aarch64_emit_mul): Likewise.
3828 (aarch64_emit_lsh): Likewise.
3829 (aarch64_emit_rsh_signed): Likewise.
3830 (aarch64_emit_rsh_unsigned): Likewise.
3831 (aarch64_emit_ext): Likewise.
3832 (aarch64_emit_log_not): Likewise.
3833 (aarch64_emit_bit_and): Likewise.
3834 (aarch64_emit_bit_or): Likewise.
3835 (aarch64_emit_bit_xor): Likewise.
3836 (aarch64_emit_bit_not): Likewise.
3837 (aarch64_emit_equal): Likewise.
3838 (aarch64_emit_less_signed): Likewise.
3839 (aarch64_emit_less_unsigned): Likewise.
3840 (aarch64_emit_ref): Likewise.
3841 (aarch64_emit_if_goto): Likewise.
3842 (aarch64_emit_goto): Likewise.
3843 (aarch64_write_goto_address): Likewise.
3844 (aarch64_emit_const): Likewise.
3845 (aarch64_emit_call): Likewise.
3846 (aarch64_emit_reg): Likewise.
3847 (aarch64_emit_pop): Likewise.
3848 (aarch64_emit_stack_flush): Likewise.
3849 (aarch64_emit_zero_ext): Likewise.
3850 (aarch64_emit_swap): Likewise.
3851 (aarch64_emit_stack_adjust): Likewise.
3852 (aarch64_emit_int_call_1): Likewise.
3853 (aarch64_emit_void_call_2): Likewise.
3854 (aarch64_emit_eq_goto): Likewise.
3855 (aarch64_emit_ne_goto): Likewise.
3856 (aarch64_emit_lt_goto): Likewise.
3857 (aarch64_emit_le_goto): Likewise.
3858 (aarch64_emit_gt_goto): Likewise.
3859 (aarch64_emit_ge_got): Likewise.
3860 (aarch64_emit_ops_impl): New static global variable.
3861 (aarch64_emit_ops): New target function, return
3862 &aarch64_emit_ops_impl.
3863 (struct linux_target_ops): Install it.
3864
bb903df0
PL
38652015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3866
3867 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3868 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3869 aarch64-ipa.o.
3870 * linux-aarch64-ipa.c: New file.
3871 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3872 and endian.h.
3873 (aarch64_get_thread_area): New target method.
3874 (extract_signed_bitfield): New helper function.
3875 (aarch64_decode_ldr_literal): New function.
3876 (enum aarch64_opcodes): New enum.
3877 (struct aarch64_register): New struct.
3878 (struct aarch64_operand): New struct.
3879 (x0): New static global.
3880 (x1): Likewise.
3881 (x2): Likewise.
3882 (x3): Likewise.
3883 (x4): Likewise.
3884 (w2): Likewise.
3885 (ip0): Likewise.
3886 (sp): Likewise.
3887 (xzr): Likewise.
3888 (aarch64_register): New helper function.
3889 (register_operand): Likewise.
3890 (immediate_operand): Likewise.
3891 (struct aarch64_memory_operand): New struct.
3892 (offset_memory_operand): New helper function.
3893 (preindex_memory_operand): Likewise.
3894 (enum aarch64_system_control_registers): New enum.
3895 (ENCODE): New macro.
3896 (emit_insn): New helper function.
3897 (emit_b): New function.
3898 (emit_bcond): Likewise.
3899 (emit_cb): Likewise.
3900 (emit_tb): Likewise.
3901 (emit_blr): Likewise.
3902 (emit_stp): Likewise.
3903 (emit_ldp_q_offset): Likewise.
3904 (emit_stp_q_offset): Likewise.
3905 (emit_load_store): Likewise.
3906 (emit_ldr): Likewise.
3907 (emit_ldrsw): Likewise.
3908 (emit_str): Likewise.
3909 (emit_ldaxr): Likewise.
3910 (emit_stxr): Likewise.
3911 (emit_stlr): Likewise.
3912 (emit_data_processing_reg): Likewise.
3913 (emit_data_processing): Likewise.
3914 (emit_add): Likewise.
3915 (emit_sub): Likewise.
3916 (emit_mov): Likewise.
3917 (emit_movk): Likewise.
3918 (emit_mov_addr): Likewise.
3919 (emit_mrs): Likewise.
3920 (emit_msr): Likewise.
3921 (emit_sevl): Likewise.
3922 (emit_wfe): Likewise.
3923 (append_insns): Likewise.
3924 (can_encode_int32_in): New helper function.
3925 (aarch64_relocate_instruction): New function.
3926 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3927 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3928 (struct linux_target_ops): Install aarch64_get_thread_area,
3929 aarch64_install_fast_tracepoint_jump_pad and
3930 aarch64_get_min_fast_tracepoint_insn_len.
3931
787749ea
PL
39322015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3933
3934 * Makefile.in (aarch64-insn.o): New rule.
3935 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3936
9812b2e6
YQ
39372015-09-21 Yao Qi <yao.qi@linaro.org>
3938
3939 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3940
18fe412b
YQ
39412015-09-21 Yao Qi <yao.qi@linaro.org>
3942
3943 * tracepoint.c (max_jump_pad_size): Remove.
3944
a0cc84cd
YQ
39452015-09-18 Yao Qi <yao.qi@linaro.org>
3946
3947 * linux-aarch64-low.c: Don't include sys/uio.h.
3948 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3949
d78908cf
WW
39502015-09-16 Wei-cheng Wang <cole945@gmail.com>
3951
3952 * tracepoint.c (eval_result_type): Change prototype.
3953 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3954
d57e0d50
PA
39552015-09-15 Pedro Alves <palves@redhat.com>
3956
3957 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3958 Check whether to report exec events instead of checking whether
3959 multiprocess is enabled.
3960
5a676acc
PA
39612015-09-15 Pedro Alves <palves@redhat.com>
3962
3963 PR remote/18965
3964 * remote-utils.c (prepare_resume_reply): Merge
3965 TARGET_WAITKIND_VFORK_DONE switch case with the
3966 TARGET_WAITKIND_FORKED case.
3967
7c5d0fad
YQ
39682015-09-15 Yao Qi <yao.qi@linaro.org>
3969
3970 * server.c (handle_query): Check string comparison using
3971 "else if" instead of "if".
3972
750ce8d1
YQ
39732015-09-15 Yao Qi <yao.qi@linaro.org>
3974
3975 * server.c (vCont_supported): New global variable.
3976 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3977 matches. Append ";vContSupported+" to own_buf.
3978 (handle_v_requests): Append ";s;S" to own_buf if target supports
3979 hardware single step or vCont_supported is false.
3980 (capture_main): Set vCont_supported to zero.
3981
70b90b91
YQ
39822015-09-15 Yao Qi <yao.qi@linaro.org>
3983
3984 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3985 it to ...
3986 (linux_supports_hardware_single_step): ... New function.
3987 (linux_target_ops): Update.
3988 * lynx-low.c (lynx_target_ops): Set field
3989 supports_hardware_single_step to target_can_do_hardware_single_step.
3990 * nto-low.c (nto_target_ops): Likewise.
3991 * spu-low.c (spu_target_ops): Likewise.
3992 * win32-low.c (win32_target_ops): Likewise.
3993 * target.c (target_can_do_hardware_single_step): New function.
3994 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3995 Remove. <supports_hardware_single_step>: New field.
3996 (target_supports_conditional_breakpoints): Remove.
3997 (target_supports_hardware_single_step): New macro.
3998 (target_can_do_hardware_single_step): Declare.
3999 * server.c (handle_query): Use target_supports_hardware_single_step
4000 instead of target_supports_conditional_breakpoints.
4001
ade90bde
YQ
40022015-09-15 Yao Qi <yao.qi@linaro.org>
4003
4004 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4005 function.
4006 (struct linux_target_ops the_low_target): Install
4007 aarch64_linux_siginfo_fixup.
4008
94585166
DB
40092015-09-11 Don Breazeal <donb@codesourcery.com>
4010 Luis Machado <lgustavo@codesourcery.com>
4011
4012 * linux-low.c (linux_mourn): Static declaration.
4013 (linux_arch_setup): Move in front of
4014 handle_extended_wait.
4015 (linux_arch_setup_thread): New function.
4016 (handle_extended_wait): Handle exec events. Call
4017 linux_arch_setup_thread. Make event_lwp argument a
4018 pointer-to-a-pointer.
4019 (check_zombie_leaders): Do not check stopped threads.
4020 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4021 (linux_low_filter_event): Add lwp and thread for exec'ing
4022 non-leader thread if leader thread has been deleted.
4023 Refactor code into linux_arch_setup_thread and call it.
4024 Pass child lwp pointer by reference to handle_extended_wait.
4025 (linux_wait_for_event_filtered): Update comment.
4026 (linux_wait_1): Prevent clobbering exec event status.
4027 (linux_supports_exec_events): New function.
4028 (linux_target_ops) <supports_exec_events>: Initialize new member.
4029 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4030 new member.
4031 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4032 * server.c (report_exec_events): New global variable.
4033 (handle_query): Handle qSupported query for exec-events feature.
4034 (captured_main): Initialize report_exec_events.
4035 * server.h (report_exec_events): Declare new global variable.
4036 * target.h (struct target_ops) <supports_exec_events>: New
4037 member.
4038 (target_supports_exec_events): New macro.
4039 * win32-low.c (win32_target_ops) <supports_exec_events>:
4040 Initialize new member.
4041
0568462b
MM
40422015-09-09 Markus Metzger <markus.t.metzger@intel.com>
4043
4044 * linux-low.c (linux_low_enable_btrace): Remove.
4045 (linux_target_ops): Replace linux_low_enable_btrace with
4046 linux_enable_btrace.
4047
39edd165
YQ
40482015-09-03 Yao Qi <yao.qi@linaro.org>
4049
4050 * linux-aarch64-low.c (aarch64_insert_point): Call
4051 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4052 returns true.
4053
1db33b5a
UW
40542015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4055
4056 * linux-low.c (check_stopped_by_breakpoint): Use
4057 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4058
ab290430
PA
40592015-08-27 Pedro Alves <palves@redhat.com>
4060
4061 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4062
8d749320
SM
40632015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4064
6711b7f8
SM
4065 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4066 the XNEW-family equivalent.
8d749320
SM
4067 (compile_bytecodes): Likewise.
4068 * dll.c (loaded_dll): Likewise.
4069 * event-loop.c (append_callback_event): Likewise.
4070 (create_file_handler): Likewise.
4071 (create_file_event): Likewise.
4072 * hostio.c (handle_open): Likewise.
4073 * inferiors.c (add_thread): Likewise.
4074 (add_process): Likewise.
4075 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4076 * linux-arm-low.c (arm_new_process): Likewise.
4077 (arm_new_thread): Likewise.
4078 * linux-low.c (add_to_pid_list): Likewise.
4079 (linux_add_process): Likewise.
4080 (handle_extended_wait): Likewise.
4081 (add_lwp): Likewise.
4082 (enqueue_one_deferred_signal): Likewise.
4083 (enqueue_pending_signal): Likewise.
4084 (linux_resume_one_lwp_throw): Likewise.
4085 (linux_resume_one_thread): Likewise.
4086 (linux_read_memory): Likewise.
4087 (linux_write_memory): Likewise.
4088 * linux-mips-low.c (mips_linux_new_process): Likewise.
4089 (mips_linux_new_thread): Likewise.
4090 (mips_add_watchpoint): Likewise.
4091 * linux-x86-low.c (initialize_low_arch): Likewise.
4092 * lynx-low.c (lynx_add_process): Likewise.
4093 * mem-break.c (set_raw_breakpoint_at): Likewise.
4094 (set_breakpoint): Likewise.
4095 (add_condition_to_breakpoint): Likewise.
4096 (add_commands_to_breakpoint): Likewise.
4097 (clone_agent_expr): Likewise.
4098 (clone_one_breakpoint): Likewise.
4099 * regcache.c (new_register_cache): Likewise.
4100 * remote-utils.c (look_up_one_symbol): Likewise.
4101 * server.c (queue_stop_reply): Likewise.
4102 (start_inferior): Likewise.
4103 (queue_stop_reply_callback): Likewise.
4104 (handle_target_event): Likewise.
4105 * spu-low.c (fetch_ppc_memory): Likewise.
4106 (store_ppc_memory): Likewise.
4107 * target.c (set_target_ops): Likewise.
4108 * thread-db.c (thread_db_load_search): Likewise.
4109 (try_thread_db_load_1): Likewise.
4110 * tracepoint.c (add_tracepoint): Likewise.
4111 (add_tracepoint_action): Likewise.
4112 (create_trace_state_variable): Likewise.
4113 (cmd_qtdpsrc): Likewise.
4114 (cmd_qtro): Likewise.
4115 (add_while_stepping_state): Likewise.
4116 * win32-low.c (child_add_thread): Likewise.
4117 (get_image_name): Likewise.
4118
ed8b7b42
YQ
41192015-08-25 Yao Qi <yao.qi@linaro.org>
4120
4121 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4122
db3cb7cb
YQ
41232015-08-25 Yao Qi <yao.qi@linaro.org>
4124
4125 * Makefile.in (aarch64-linux.o): New rule.
4126 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4127 srv_tgtobj.
4128 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4129 (aarch64_init_debug_reg_state): Make it extern.
4130 (aarch64_linux_prepare_to_resume): Remove.
4131
f6011a1c
YQ
41322015-08-25 Yao Qi <yao.qi@linaro.org>
4133
4134 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4135 lwp_arch_private_info and ptid_of_lwp.
4136
88e2cf7e
YQ
41372015-08-25 Yao Qi <yao.qi@linaro.org>
4138
4139 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4140 Find proc_info by find_process_pid. All callers updated.
4141
5e35436e
YQ
41422015-08-25 Yao Qi <yao.qi@linaro.org>
4143
4144 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4145 Remove.
4146 (debug_reg_change_callback): Remove.
4147 (aarch64_notify_debug_reg_change): Remove.
4148
4a8a7965
YQ
41492015-08-25 Yao Qi <yao.qi@linaro.org>
4150
4151 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4152 Call current_lwp_ptid.
4153
32a271ee
YQ
41542015-08-25 Yao Qi <yao.qi@linaro.org>
4155
4156 * linux-aarch64-low.c (debug_reg_change_callback): Use
4157 debug_printf.
4158
0d51c8d7
YQ
41592015-08-25 Yao Qi <yao.qi@linaro.org>
4160
4161 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4162
31a43dd5
YQ
41632015-08-25 Yao Qi <yao.qi@linaro.org>
4164
4165 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4166
8ee52567
YQ
41672015-08-25 Yao Qi <yao.qi@linaro.org>
4168
4169 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4170 the code.
4171
ff3f0f45
YQ
41722015-08-25 Yao Qi <yao.qi@linaro.org>
4173
4174 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4175 Remove.
4176 (debug_reg_change_callback): Remove argument entry and add argument
4177 lwp. Remove local variable thread. Don't print thread id in the
4178 debugging output. Don't check whether pid of thread equals to pid.
4179 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4180 iterate_over_lwps instead find_inferior.
4181
3d40fbb5
PA
41822015-08-24 Pedro Alves <palves@redhat.com>
4183
4184 * inferiors.c (get_first_process): New function.
4185 * inferiors.h (get_first_process): New declaration.
4186 * remote-utils.c (read_ptid): Default to the first process in the
4187 list, instead of to the current thread's process.
4188
438e1e42
PA
41892015-08-24 Pedro Alves <palves@redhat.com>
4190
4191 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4192 * event-loop.c: Likewise.
4193 * remote-utils.c: Likewise.
4194 * tracepoint.c: Likewise.
4195
a8c6d4fc
PA
41962015-08-24 Pedro Alves <palves@redhat.com>
4197
4198 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4199 ptid_get_lwp.
4200
99b0bb12
PA
42012015-08-21 Pedro Alves <palves@redhat.com>
4202
4203 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4204 instead of literal 1.
4205
f8904751
PA
42062015-08-21 Pedro Alves <palves@redhat.com>
4207
4208 * tdesc.c (default_description): Explicitly zero-initialize.
4209
465a859e
PA
42102015-08-21 Pedro Alves <palves@redhat.com>
4211
4212 PR gdb/18749
4213 * inferiors.c (remove_thread): Discard any pending stop reply for
4214 this thread.
4215 * server.c (remove_all_on_match_pid): Rename to ...
4216 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4217 instead of a pid.
4218 (discard_queued_stop_replies): Change parameter to a ptid. Now
4219 extern.
4220 (handle_v_kill, kill_inferior_callback, captured_main)
4221 (process_serial_event): Adjust.
4222 * server.h (discard_queued_stop_replies): Declare.
4223
f0db101d
PA
42242015-08-21 Pedro Alves <palves@redhat.com>
4225
4226 * linux-low.c (wait_for_sigstop): Always switch to no thread
4227 selected if the previously current thread dies.
4228 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4229 process instead of the current thread's.
4230 * remote-utils.c (input_interrupt): Don't check if there's no
4231 current thread.
4232 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4233 current thread to the general thread fails, error out.
4234 (handle_qxfer_auxv, handle_qxfer_libraries)
4235 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4236 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4237 (handle_query): Check if there's a thread selected instead of
4238 checking whether there's any thread in the thread list.
4239 (handle_qxfer_threads, handle_qxfer_btrace)
4240 (handle_qxfer_btrace_conf): Don't error out early if there's no
4241 thread in the thread list.
4242 (handle_v_cont, myresume): Don't set the current thread to the
4243 continue thread.
4244 (process_serial_event) <Hg handling>: Also set thread_id if the
4245 previous general thread is still alive.
4246 (process_serial_event) <g/G handling>: If setting the current
4247 thread to the general thread fails, error out.
4248 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4249 thread's lwp instead of the current thread's.
4250 * target.c (set_desired_thread): If the desired thread was not
4251 found, leave the current thread pointing to NULL. Return an int
4252 (boolean) indicating success.
4253 * target.h (set_desired_thread): Change return type to int.
4254
40045d91
MF
42552015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4256
4257 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4258 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4259 #includes.
4260 (ps_get_thread_area): New function.
4261
45face3b
GB
42622015-08-19 Gary Benson <gbenson@redhat.com>
4263
4264 * hostio.c (handle_pread): Do not attempt to read more data
4265 than hostio_reply_with_data can fit in a packet.
4266
16d5f642
JB
42672015-08-18 Joel Brobecker <brobecker@adacore.com>
4268
4269 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4270
a738da3a
MF
42712015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4272
4273 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4274
33ebda9d
PA
42752015-08-06 Pedro Alves <palves@redhat.com>
4276
4277 * tracepoint.c (expr_eval_result): Now an int.
4278
a44892be
PA
42792015-08-06 Pedro Alves <palves@redhat.com>
4280
4281 * gdbthread.h (struct regcache): Forward declare.
4282 (struct thread_info) <regcache_data>: Now a struct regcache
4283 pointer.
4284 * inferiors.c (inferior_regcache_data)
4285 (set_inferior_regcache_data): Now work with struct regcache
4286 pointers.
4287 * inferiors.h (struct regcache): Forward declare.
4288 (inferior_regcache_data, set_inferior_regcache_data): Now work
4289 with struct regcache pointers.
4290 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4291 (free_register_cache_thread): Remove struct regcache pointer
4292 casts.
4293
608a1e46
PA
42942015-08-06 Pedro Alves <palves@redhat.com>
4295
4296 * server.c (captured_main): On error, print the exception message
4297 to stderr, and if run_once is set, throw a quit.
4298
f0ce0d3a
PA
42992015-08-06 Pedro Alves <palves@redhat.com>
4300
4301 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4302 the current thread.
4303
bf47e248
PA
43042015-08-06 Pedro Alves <palves@redhat.com>
4305
4306 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4307 reading beyond the passed in buffer length.
4308
b6b9ffcc
PL
43092015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4310
4311 * tracepoint.c (symbol_list) <required>: Remove.
4312
863d01bd
PA
43132015-08-06 Pedro Alves <palves@redhat.com>
4314
4315 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4316 count if stopping and suspending threads.
4317 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4318 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4319 (linux_detach): Complete an ongoing step-over.
4320 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4321 throughout.
4322 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4323 (linux_wait_1): If passing a signal to the inferior after
4324 finishing a step-over, unsuspend and re-resume all lwps. If we
4325 see a single-step event but the thread should be continuing, don't
4326 pass the trap to gdb.
4327 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4328 internal_error instead of gdb_assert.
4329 (enqueue_pending_signal): New function.
4330 (check_ptrace_stopped_lwp_gone): Add debug output.
4331 (start_step_over): Use internal_error instead of gdb_assert.
4332 (complete_ongoing_step_over): New function.
4333 (linux_resume_one_thread): Don't resume a suspended thread.
4334 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4335 it stepping.
4336
00db26fa
PA
43372015-08-06 Pedro Alves <palves@redhat.com>
4338
4339 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4340 (linux_thread_alive): Use lwp_is_marked_dead.
4341 (extended_event_reported): Delete.
4342 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4343 instead of extended_event_reported.
4344 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4345 as well.
4346 (lwp_is_marked_dead): New function.
4347 (lwp_running): Use lwp_is_marked_dead.
4348 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4349 comment.
4350
ad071a30
PA
43512015-08-06 Pedro Alves <palves@redhat.com>
4352
4353 * linux-low.c (linux_wait_1): Move fork event output out of the
4354 !report_to_gdb check. Pass event_child->waitstatus to
4355 target_waitstatus_to_string instead of ourstatus.
4356
524b57e6
YQ
43572015-08-04 Yao Qi <yao.qi@linaro.org>
4358
4359 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4360 if current_thread is 32 bit.
4361
6085d6f6
YQ
43622015-08-04 Yao Qi <yao.qi@linaro.org>
4363
4364 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4365 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4366 * server.c (extended_protocol): Remove "static".
4367 * server.h (extended_protocol): Declare it.
4368
8a7e4587
YQ
43692015-08-04 Yao Qi <yao.qi@linaro.org>
4370
4371 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4372 both aarch64 and aarch32.
4373 (aarch64_set_pc): Likewise.
4374
3b53ae99
YQ
43752015-08-04 Yao Qi <yao.qi@linaro.org>
4376
4377 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4378 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4379 arm-with-neon.xml to srv_xmlfiles.
4380 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4381 (is_64bit_tdesc): New function.
4382 (aarch64_linux_read_description): New function.
4383 (aarch64_arch_setup): Call aarch64_linux_read_description.
4384 (regs_info): Rename to regs_info_aarch64.
4385 (aarch64_regs_info): Return right regs_info.
4386 (initialize_low_arch): Call initialize_low_arch_aarch32.
4387
bd9e6534
YQ
43882015-08-04 Yao Qi <yao.qi@linaro.org>
4389
4390 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4391 * linux-aarch32-low.c: New file.
4392 * linux-aarch32-low.h: New file.
4393 * linux-arm-low.c (arm_fill_gregset): Move it to
4394 linux-aarch32-low.c.
4395 (arm_store_gregset): Likewise.
4396 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4397 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4398 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4399 (regs_info): Rename to regs_info_arm.
4400 (arm_regs_info): Return regs_info_aarch32 if
4401 have_ptrace_getregset is 1 and target description is
4402 arm_with_neon or arm_with_vfpv3.
4403 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4404 Call initialize_low_arch_aarch32 instead.
4405
ded48a5e
YQ
44062015-08-04 Yao Qi <yao.qi@linaro.org>
4407
4408 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4409 * linux-low.c: ... here.
4410 * linux-low.h (have_ptrace_getregset): Declare it.
4411
96e9210f
PA
44122015-08-04 Pedro Alves <palves@redhat.com>
4413
4414 * thread-db.c (struct thread_db): Use new typedefs.
4415 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4416 CHK calls.
4417 (disable_thread_event_reporting): Cast result of dlsym to
4418 destination function pointer type.
4419 (thread_db_mourn): Use td_ta_delete_ftype.
4420
af60a1ef
SL
44212015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4422
4423 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4424 arch variant.
4425 (CDX_BREAKPOINT): Define for R2.
4426 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4427 (the_low_target): Add comments.
4428
e8b41681
YQ
44292015-07-30 Yao Qi <yao.qi@linaro.org>
4430
4431 * linux-arm-low.c (arm_hwcap): Remove it.
4432 (arm_read_description): New local variable arm_hwcap. Don't
4433 set arm_hwcap to zero.
4434
89abb039
YQ
44352015-07-30 Yao Qi <yao.qi@linaro.org>
4436
4437 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4438 Use regcache->tdesc instead.
4439 (arm_store_wmmxregset): Likewise.
4440 (arm_fill_vfpregset): Likewise.
4441 (arm_store_vfpregset): Likewise.
4442
deca266c
YQ
44432015-07-30 Yao Qi <yao.qi@linaro.org>
4444
4445 * linux-arm-low.c: Include arch/arm.h.
4446 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4447 (arm_store_gregset): Likewise.
4448
aa58a496
SM
44492015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4450
4451 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4452 ptrace's 4th parameter.
4453
50904b25
YQ
44542015-07-27 Yao Qi <yao.qi@linaro.org>
4455
4456 * configure.srv (case aarch64*-*-linux*): Don't set
4457 srv_linux_usrregs.
4458
5826e159
PA
44592015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4460
4461 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4462 sys/ptrace.h.
4463 * linux-arm-low.c: Likewise.
4464 * linux-cris-low.c: Likewise.
4465 * linux-crisv32-low.c: Likewise.
4466 * linux-low.c: Likewise.
4467 * linux-m68k-low.c: Likewise.
4468 * linux-mips-low.c: Likewise.
4469 * linux-nios2-low.c: Likewise.
4470 * linux-s390-low.c: Likewise.
4471 * linux-sparc-low.c: Likewise.
4472 * linux-tic6x-low.c: Likewise.
4473 * linux-tile-low.c: Likewise.
4474 * linux-x86-low.c: Likewise.
4475
54019719
PA
44762015-07-24 Pedro Alves <palves@redhat.com>
4477
4478 * config.in: Regenerate.
4479 * configure: Regenerate.
4480
eb7aa561
PA
44812015-07-24 Pedro Alves <palves@redhat.com>
4482
4483 * acinclude.m4: Include ../ptrace.m4.
4484 * configure.ac: Call GDB_AC_PTRACE.
4485 * config.in, configure: Regenerate.
4486
55d7b841
YQ
44872015-07-24 Yao Qi <yao.qi@linaro.org>
4488
4489 * linux-low.c (linux_create_inferior): Remove setting to
4490 proc->priv->new_inferior.
4491 (linux_attach): Likewise.
4492 (linux_low_filter_event): Likewise.
4493 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4494
c06cbd92
YQ
44952015-07-24 Yao Qi <yao.qi@linaro.org>
4496
4497 * linux-low.c (linux_arch_setup): New function.
4498 (linux_low_filter_event): If proc->tdesc is NULL and
4499 proc->attached is true, call the_low_target.arch_setup.
4500 Otherwise, keep status pending, and return.
4501 (linux_resume_one_lwp_throw): Don't call get_pc if
4502 thread->while_stepping isn't NULL. Don't call
4503 get_thread_regcache if proc->tdesc is NULL.
4504 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4505 (linux_target_ops): Install arch_setup.
4506 * server.c (start_inferior): Call the_target->arch_setup.
4507 * target.h (struct target_ops) <arch_setup>: New field.
4508 (target_arch_setup): New marco.
4509 * lynx-low.c (lynx_target_ops): Update.
4510 * nto-low.c (nto_target_ops): Update.
4511 * spu-low.c (spu_target_ops): Update.
4512 * win32-low.c (win32_target_ops): Update.
4513
5ae3ebba
YQ
45142015-07-24 Yao Qi <yao.qi@linaro.org>
4515
4516 * linux-low.c (linux_add_process): Don't set
4517 proc->priv->new_inferior.
4518 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4519 (linux_attach): Likewise.
4520
eb97750b
YQ
45212015-07-24 Yao Qi <yao.qi@linaro.org>
4522
4523 * server.c (start_inferior): Code refactor.
4524
51aee833
YQ
45252015-07-24 Yao Qi <yao.qi@linaro.org>
4526
4527 * server.c (process_serial_event): Set general_thread.
4528
af1b22f3
YQ
45292015-07-21 Yao Qi <yao.qi@linaro.org>
4530
4531 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4532 aarch64_linux_get_debug_reg_capacity.
4533
554717a3
YQ
45342015-07-17 Yao Qi <yao.qi@linaro.org>
4535
4536 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4537 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4538 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4539 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4540 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4541 (AARCH64_HWP_ALIGNMENT): Likewise.
4542 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4543 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4544 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4545 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4546 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4547 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4548 (struct aarch64_debug_reg_state): Likewise.
4549 (struct arch_lwp_info): Likewise.
4550 (aarch64_align_watchpoint): Likewise.
4551 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4552 (aarch64_watchpoint_length): Likewise.
4553 (aarch64_point_encode_ctrl_reg): Likewise
4554 (aarch64_point_is_aligned): Likewise.
4555 (aarch64_align_watchpoint): Likewise.
4556 (aarch64_linux_set_debug_regs):
4557 (aarch64_dr_state_insert_one_point): Likewise.
4558 (aarch64_dr_state_remove_one_point): Likewise.
4559 (aarch64_handle_breakpoint): Likewise.
4560 (aarch64_handle_aligned_watchpoint): Likewise.
4561 (aarch64_handle_unaligned_watchpoint): Likewise.
4562 (aarch64_handle_watchpoint): Likewise.
4563
c67ca4de
YQ
45642015-07-17 Yao Qi <yao.qi@linaro.org>
4565
4566 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4567 and don't aarch64_get_debug_reg_state. All callers update.
4568 (aarch64_handle_aligned_watchpoint): Likewise.
4569 (aarch64_handle_unaligned_watchpoint): Likewise.
4570 (aarch64_handle_watchpoint): Likewise.
4571 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4572 (aarch64_remove_point): Likewise.
4573
25abf979
YQ
45742015-07-17 Yao Qi <yao.qi@linaro.org>
4575
4576 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4577 debug_printf.
4578 (aarch64_handle_unaligned_watchpoint): Likewise.
4579
db1ff28b
JK
45802015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4581
4582 Revert the previous 3 commits:
4583 Move gdb_regex* to common/
4584 Move linux_find_memory_regions_full & co.
4585 gdbserver build-id attribute generator
4586
700ca40f
JK
45872015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4588 Jan Kratochvil <jan.kratochvil@redhat.com>
4589
4590 gdbserver build-id attribute generator.
4591 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4592 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4593 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4594 (find_phdr): New.
4595 (get_dynamic): Use find_pdhr to traverse program headers.
4596 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4597 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4598 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4599 (get_hex_build_id): New.
4600 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4601 to reply XML document.
4602
9904185c
JK
46032015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4604 Jan Kratochvil <jan.kratochvil@redhat.com>
4605
4606 * target.c: Include target/target-utils.h and fcntl.h.
4607 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4608 (target_fileio_read_stralloc): New functions.
4609
6e5b4429
JK
46102015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4611
4612 * Makefile.in (OBS): Add gdb_regex.o.
4613 (gdb_regex.o): New.
4614 * config.in: Rebuilt.
4615 * configure: Rebuilt.
4616
ddc98fbf
JK
46172015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4618 Jan Kratochvil <jan.kratochvil@redhat.com>
4619
4620 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4621 * Makefile.in (OBS): Add target-utils.o.
4622 (linux-maps.o, target-utils.o): New.
4623 * configure.srv (srv_linux_obj): Add linux-maps.o.
4624
e57bb7a0
PL
46252015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4626
4627 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4628 function, return 1.
4629 (the_low_target): Install it.
4630
586b02a9
PA
46312015-07-14 Pedro Alves <palves@redhat.com>
4632
4633 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4634 Instead, ignore ECHILD, and throw an error for other errnos.
4635
58c1b36c
PA
46362015-07-10 Pedro Alves <palves@redhat.com>
4637
4638 * event-loop.c (struct callback_event) <data>: Change type to
4639 gdb_client_data instance instead of gdb_client_data pointer.
4640 (append_callback_event): Adjust.
4641
421530db
PL
46422015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4643
4644 * linux-aarch64-low.c: Add comments for each linux_target_ops
4645 method. Remove comments already covered in target_ops and
4646 linux_target_ops definitions.
4647 (the_low_target): Add comments for each unimplemented method.
4648
c2d65f38
YQ
46492015-07-09 Yao Qi <yao.qi@linaro.org>
4650
4651 * linux-aarch64-low.c (aarch64_regmap): Remove.
4652 (aarch64_usrregs_info): Remove.
4653 (regs_info): Set field usrregs to NULL.
4654
b20a6524
MM
46552015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4656
4657 * linux-low.c: Include "rsp-low.h"
4658 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4659 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4660 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4661 (handle_btrace_enable_pt): New.
4662 (handle_btrace_general_set): Support "pt".
4663 (handle_btrace_conf_general_set): Support "pt:size".
4664
96c97461
PL
46652015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4666
4667 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4668 Z_PACKET_SW_BP.
4669
37d66942
PL
46702015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4671
4672 * linux-aarch64-low.c: Remove comment about endianness.
4673 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4674 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4675 memcmp.
4676
dc06243f
GB
46772015-06-24 Gary Benson <gbenson@redhat.com>
4678
4679 * linux-i386-ipa.c (stdint.h): Do not include.
4680 * lynx-i386-low.c (stdint.h): Likewise.
4681 * lynx-ppc-low.c (stdint.h): Likewise.
4682 * mem-break.c (stdint.h): Likewise.
4683 * thread-db.c (stdint.h): Likewise.
4684 * tracepoint.c (stdint.h): Likewise.
4685 * win32-low.c (stdint.h): Likewise.
4686
124e13d9
SM
46872015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4688
4689 * server.c (write_qxfer_response): Update call to
4690 remote_escape_output.
4691
909c2cda
JK
46922015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4693 Jan Kratochvil <jan.kratochvil@redhat.com>
4694
4695 Merge multiple hex conversions.
4696 * gdbreplay.c (tohex): Rename to 'fromhex'.
4697 (logchar): Use fromhex.
4698
24c05f46
JK
46992015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4700
4701 * server.c (handle_qxfer_libraries): Set `version' attribute for
4702 <library-list>.
4703
14d2069a
GB
47042015-06-10 Gary Benson <gbenson@redhat.com>
4705
4706 * target.h (struct target_ops) <multifs_open>: New field.
4707 <multifs_unlink>: Likewise.
4708 <multifs_readlink>: Likewise.
4709 * linux-low.c (nat/linux-namespaces.h): New include.
4710 (linux_target_ops): Initialize the_target->multifs_open,
4711 the_target->multifs_unlink and the_target->multifs_readlink.
4712 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4713 * hostio.c (hostio_fs_pid): New static variable.
4714 (hostio_handle_new_gdb_connection): New function.
4715 (handle_setfs): Likewise.
4716 (handle_open): Use the_target->multifs_open as appropriate.
4717 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4718 (handle_readlink): Use the_target->multifs_readlink as
4719 appropriate.
4720 (handle_vFile): Handle vFile:setfs packets.
4721 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4722 after target_handle_new_gdb_connection.
4723
4b8b5e72
GB
47242015-06-10 Gary Benson <gbenson@redhat.com>
4725
4726 * configure.ac (AC_CHECK_FUNCS): Add setns.
4727 * config.in: Regenerate.
4728 * configure: Likewise.
4729 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4730 (linux-namespaces.o): New rule.
4731 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4732
3ac2e371
GB
47332015-06-09 Gary Benson <gbenson@redhat.com>
4734
4735 * hostio.c (handle_open): Process mode argument with
4736 fileio_to_host_mode.
4737
ca9b78ce
YQ
47382015-06-01 Yao Qi <yao.qi@linaro.org>
4739
4740 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4741 * linux-x86-low.c: Likewise.
4742
bfacd19d
DB
47432015-05-28 Don Breazeal <donb@codesourcery.com>
4744
4745 * linux-low.c (handle_extended_wait): Initialize
4746 thread_info.last_resume_kind for new fork children.
4747
452003ef
PA
47482015-05-15 Pedro Alves <palves@redhat.com>
4749
4750 * target.h (target_handle_new_gdb_connection): Rewrite using if
4751 wrapped in do/while.
4752
1041a03c
JB
47532015-05-14 Joel Brobecker <brobecker@adacore.com>
4754
4755 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4756 * configure, config.in: Regenerate.
4757 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4758 Declare typedef.
4759
c269dbdb
DB
47602015-05-12 Don Breazeal <donb@codesourcery.com>
4761
4762 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4763 PTRACE_EVENT_VFORK_DONE.
4764 (linux_low_ptrace_options, extended_event_reported): Add vfork
4765 events.
4766 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4767 and "vforkdone" for RSP 'T' Stop Reply Packet.
4768 * server.h (report_vfork_events): Declare
4769 global variable.
4770
3a8a0396
DB
47712015-05-12 Don Breazeal <donb@codesourcery.com>
4772
4773 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4774 (the_low_target) <new_fork>: Initialize new member.
4775 * linux-arm-low.c (arm_new_fork): New function.
4776 (the_low_target) <new_fork>: Initialize new member.
4777 * linux-low.c (handle_extended_wait): Call new target function
4778 new_fork.
4779 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4780 * linux-mips-low.c (mips_add_watchpoint): New function
4781 extracted from mips_insert_point.
4782 (the_low_target) <new_fork>: Initialize new member.
4783 (mips_linux_new_fork): New function.
4784 (mips_insert_point): Call mips_add_watchpoint.
4785 * linux-x86-low.c (x86_linux_new_fork): New function.
4786 (the_low_target) <new_fork>: Initialize new member.
4787
de0d863e
DB
47882015-05-12 Don Breazeal <donb@codesourcery.com>
4789
4790 * linux-low.c (handle_extended_wait): Implement return value,
4791 rename argument 'event_child' to 'event_lwp', handle
4792 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4793 (linux_low_ptrace_options): New function.
4794 (linux_low_filter_event): Call linux_low_ptrace_options,
4795 use different argument fo linux_enable_event_reporting,
4796 use return value from handle_extended_wait.
4797 (extended_event_reported): New function.
4798 (linux_wait_1): Call extended_event_reported and set
4799 status to report fork events.
4800 (linux_write_memory): Add pid to debug message.
4801 (reset_lwp_ptrace_options_callback): New function.
4802 (linux_handle_new_gdb_connection): New function.
4803 (linux_target_ops): Initialize new structure member.
4804 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4805 * lynx-low.c: Initialize new structure member.
4806 * remote-utils.c (prepare_resume_reply): Implement stop reason
4807 "fork" for "T" stop message.
4808 * server.c (handle_query): Call handle_new_gdb_connection.
4809 * server.h (report_fork_events): Declare global flag.
4810 * target.h (struct target_ops) <handle_new_gdb_connection>:
4811 New member.
4812 (target_handle_new_gdb_connection): New macro.
4813 * win32-low.c: Initialize new structure member.
4814
ddcbc397
DB
48152015-05-12 Don Breazeal <donb@codesourcery.com>
4816
4817 * mem-break.c (APPEND_TO_LIST): Define macro.
4818 (clone_agent_expr): New function.
4819 (clone_one_breakpoint): New function.
4820 (clone_all_breakpoints): New function.
4821 * mem-break.h: Declare new functions.
4822
89245bc0
DB
48232015-05-12 Don Breazeal <donb@codesourcery.com>
4824
4825 * linux-low.c (linux_supports_fork_events): New function.
4826 (linux_supports_vfork_events): New function.
4827 (linux_target_ops): Initialize new structure members.
4828 (initialize_low): Call linux_check_ptrace_features.
4829 * lynx-low.c (lynx_target_ops): Initialize new structure
4830 members.
4831 * server.c (report_fork_events, report_vfork_events):
4832 New global flags.
4833 (handle_query): Add new features to qSupported packet and
4834 response.
4835 (captured_main): Initialize new global variables.
4836 * target.h (struct target_ops) <supports_fork_events>:
4837 New member.
4838 <supports_vfork_events>: New member.
4839 (target_supports_fork_events): New macro.
4840 (target_supports_vfork_events): New macro.
4841 * win32-low.c (win32_target_ops): Initialize new structure
4842 members.
4843
835205d0
GB
48442015-05-12 Gary Benson <gbenson@redhat.com>
4845
4846 * server.c (handle_qxfer_exec_file): Use current process
4847 if annex is empty.
4848
21e94bd9
SL
48492015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4850
4851 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4852 Remove HAVE_PTRACE_GETREGS conditionals.
4853 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4854 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4855
45614f15
YQ
48562015-05-08 Yao Qi <yao.qi@linaro.org>
4857
4858 * linux-low.c (linux_supports_conditional_breakpoints): New
4859 function.
4860 (linux_target_ops): Install new target method.
4861 * lynx-low.c (lynx_target_ops): Install NULL hook for
4862 supports_conditional_breakpoints.
4863 * nto-low.c (nto_target_ops): Likewise.
4864 * spu-low.c (spu_target_ops): Likewise.
4865 * win32-low.c (win32_target_ops): Likewise.
4866 * server.c (handle_query): Check
4867 target_supports_conditional_breakpoints.
4868 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4869 New field.
4870 (target_supports_conditional_breakpoints): New macro.
4871
80ad801e
PA
48722015-05-06 Pedro Alves <palves@redhat.com>
4873
4874 PR server/18081
4875 * server.c (start_inferior): If the process exits, mourn it.
4876
819843c7
GB
48772015-04-21 Gary Benson <gbenson@redhat.com>
4878
4879 * hostio.c (fileio_open_flags_to_host): Factored out to
4880 fileio_to_host_openflags in common/fileio.c. Single use
4881 updated.
4882
a2d5a9d7
MF
48832015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4884
4885 * linux-xtensa-low.c (xtensa_fill_gregset)
4886 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4887 XCHAL_HAVE_LOOP.
4888
deb44829
MF
48892015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4890
4891 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4892 (regs_info): Replace usrregs pointer with NULL.
4893
e57f1de3
GB
48942015-04-17 Gary Benson <gbenson@redhat.com>
4895
4896 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4897 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4898 * server.c (handle_qxfer_exec_file): New function.
4899 (qxfer_packets): Add exec-file entry.
4900 (handle_query): Report qXfer:exec-file:read as supported packet.
4901
62828379
RN
49022015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4903
4904 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4905
b88bb450
GB
49062015-04-09 Gary Benson <gbenson@redhat.com>
4907
4908 * hostio-errno.c (errno_to_fileio_error): Remove function.
4909 Update caller to use remote_fileio_to_fio_error.
4910
c8f4bfdd
YQ
49112015-04-09 Yao Qi <yao.qi@linaro.org>
4912
4913 * linux-low.c (linux_insert_point): Call
4914 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4915 (linux_remove_point): Call remove_memory_breakpoint if type is
4916 raw_bkpt_type_sw.
4917 * linux-x86-low.c (x86_insert_point): Don't call
4918 insert_memory_breakpoint.
4919 (x86_remove_point): Don't call remove_memory_breakpoint.
4920
41f98f02
PA
49212015-04-01 Pedro Alves <palves@redhat.com>
4922 Cleber Rosa <crosa@redhat.com>
4923
4924 * server.c (gdbserver_usage): Reorganize and extend the usage
4925 message.
4926
2bf6fb9d
PA
49272015-03-24 Pedro Alves <palves@redhat.com>
4928
4929 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4930 output. Also dump TRAP_TRACE.
4931 (linux_low_filter_event): In debug output, distinguish a
4932 resume_stop SIGSTOP from a delayed SIGSTOP.
4933
369f6daa
GB
49342015-03-24 Gary Benson <gbenson@redhat.com>
4935
4936 * linux-x86-low.c (x86_linux_new_thread): Moved to
4937 nat/x86-linux.c.
4938 (x86_linux_prepare_to_resume): Likewise.
4939
8e5d4070
GB
49402015-03-24 Gary Benson <gbenson@redhat.com>
4941
4942 * Makefile.in (x86-linux-dregs.o): New rule.
4943 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4944 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4945 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4946 (x86_linux_dr_get): Likewise.
4947 (x86_linux_dr_set): Likewise.
4948 (update_debug_registers_callback): Likewise.
4949 (x86_linux_dr_set_addr): Likewise.
4950 (x86_linux_dr_get_addr): Likewise.
4951 (x86_linux_dr_set_control): Likewise.
4952 (x86_linux_dr_get_control): Likewise.
4953 (x86_linux_dr_get_status): Likewise.
4954 (x86_linux_update_debug_registers): Likewise.
4955
2b95d440
GB
49562015-03-24 Gary Benson <gbenson@redhat.com>
4957
4958 * linux-x86-low.c (x86_linux_update_debug_registers):
4959 New function, factored out from...
4960 (x86_linux_prepare_to_resume): ...this.
4961
14b0bc68
GB
49622015-03-24 Gary Benson <gbenson@redhat.com>
4963
4964 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4965 (x86_linux_dr_set): Likewise.
4966 (update_debug_registers_callback): Likewise.
4967 (x86_linux_dr_set_addr): Likewise.
4968 (x86_linux_dr_get_addr): Likewise.
4969 (x86_linux_dr_set_control): Likewise.
4970 (x86_linux_dr_get_control): Likewise.
4971 (x86_linux_dr_get_status): Likewise.
4972 (x86_linux_prepare_to_resume): Likewise.
4973
5dfe6ca8
GB
49742015-03-24 Gary Benson <gbenson@redhat.com>
4975
4976 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4977 Use perror_with_name. Pass string through gettext.
4978 (x86_linux_dr_set): Likewise.
4979
d33472ad
GB
49802015-03-24 Gary Benson <gbenson@redhat.com>
4981
4982 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4983 (x86_linux_dr_set_addr): ...this.
4984 (x86_dr_low_get_addr): Rename to...
4985 (x86_linux_dr_get_addr): ...this.
4986 (x86_dr_low_set_control): Rename to...
4987 (x86_linux_dr_set_control): ...this.
4988 (x86_dr_low_get_control): Rename to...
4989 (x86_linux_dr_get_control): ...this.
4990 (x86_dr_low_get_status): Rename to...
4991 (x86_linux_dr_get_status): ...this.
4992 (x86_dr_low): Update with new function names.
4993
4b134ca1
GB
49942015-03-24 Gary Benson <gbenson@redhat.com>
4995
4996 * Makefile.in (x86-linux.o): New rule.
4997 * configure.srv: Add x86-linux.o to relevant targets.
4998 * linux-low.c (lwp_set_arch_private_info): New function.
4999 (lwp_arch_private_info): Likewise.
5000 * linux-x86-low.c: Include nat/x86-linux.h.
5001 (arch_lwp_info): Removed structure.
5002 (update_debug_registers_callback):
5003 Use lwp_set_debug_registers_changed.
5004 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5005 and lwp_set_debug_registers_changed.
5006 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5007
34c703da
GB
50082015-03-24 Gary Benson <gbenson@redhat.com>
5009
5010 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5011 * linux-arm-low.c (arm_new_thread): Likewise.
5012 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5013 * linux-mips-low.c (mips_linux_new_thread): Likewise.
5014 * linux-x86-low.c (x86_linux_new_thread): Likewise.
5015 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5016
cff068da
GB
50172015-03-24 Gary Benson <gbenson@redhat.com>
5018
5019 * linux-low.c (ptid_of_lwp): New function.
5020 (lwp_is_stopped): Likewise.
5021 (lwp_stop_reason): Likewise.
5022 * linux-x86-low.c (update_debug_registers_callback):
5023 Use lwp_is_stopped.
5024 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5025 lwp_stop_reason.
5026
b2f7c7e8
GB
50272015-03-24 Gary Benson <gbenson@redhat.com>
5028
5029 * linux-low.h (linux_stop_lwp): Remove declaration.
5030
6d4ee8c6
GB
50312015-03-24 Gary Benson <gbenson@redhat.com>
5032
5033 * linux-low.h: Include nat/linux-nat.h.
5034 * linux-low.c (iterate_over_lwps_args): New structure.
5035 (iterate_over_lwps_filter): New function.
5036 (iterate_over_lwps): Likewise.
5037 * linux-x86-low.c (update_debug_registers_callback):
5038 Update signature to what iterate_over_lwps expects.
5039 Remove PID check that iterate_over_lwps now performs.
5040 (x86_dr_low_set_addr): Use iterate_over_lwps.
5041 (x86_dr_low_set_control): Likewise.
5042
70a0bb6b
GB
50432015-03-24 Gary Benson <gbenson@redhat.com>
5044
5045 * linux-x86-low.c (x86_debug_reg_state): New function.
5046 (x86_linux_prepare_to_resume): Use the above.
5047
7b669087
GB
50482015-03-24 Gary Benson <gbenson@redhat.com>
5049
5050 * linux-low.c (current_lwp_ptid): New function.
5051 * linux-x86-low.c: Include nat/linux-nat.h.
5052 (x86_dr_low_get_addr): Use current_lwp_ptid.
5053 (x86_dr_low_get_control): Likewise.
5054 (x86_dr_low_get_status): Likewise.
5055
eef49a3d
PA
50562015-03-20 Pedro Alves <palves@redhat.com>
5057
5058 * tracepoint.c (cmd_qtstatus): Make "str" const.
5059
b2333d22
PA
50602015-03-20 Pedro Alves <palves@redhat.com>
5061
5062 * server.c (handle_general_set): Make "req_str" const.
5063
23f238d3
PA
50642015-03-19 Pedro Alves <palves@redhat.com>
5065
5066 * linux-low.c (linux_resume_one_lwp): Rename to ...
5067 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5068 instead call perror_with_name.
5069 (check_ptrace_stopped_lwp_gone): New function.
5070 (linux_resume_one_lwp): Reimplement as wrapper around
5071 linux_resume_one_lwp_throw that swallows errors if the LWP is
5072 gone.
5073
91baf43f
PA
50742015-03-19 Pedro Alves <palves@redhat.com>
5075
5076 * linux-low.c (count_events_callback, select_event_lwp_callback):
5077 No longer check whether the thread has resume_stop as last resume
5078 kind.
5079
8bf3b159
PA
50802015-03-19 Pedro Alves <palves@redhat.com>
5081
5082 * linux-low.c (count_events_callback, select_event_lwp_callback):
5083 Use the lwp's status_pending_p field, not the thread's.
5084
b90fc188
PA
50852015-03-19 Pedro Alves <palves@redhat.com>
5086
5087 * linux-low.c (select_event_lwp_callback): Update comments to
5088 no longer mention SIGTRAP.
5089
464b0089
GB
50902015-03-18 Gary Benson <gbenson@redhat.com>
5091
5092 * server.c (handle_query): Do not report vFile:fstat as supported.
5093
aa9e327f
GB
50942015-03-11 Gary Benson <gbenson@redhat.com>
5095
5096 * hostio.c (sys/types.h): New include.
5097 (sys/stat.h): Likewise.
5098 (common-remote-fileio.h): Likewise.
5099 (handle_fstat): New function.
5100 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5101
791c0056
GB
51022015-03-11 Gary Benson <gbenson@redhat.com>
5103
5104 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5105 struct stat.st_blocks and struct stat.st_blksize.
5106 * configure: Regenerate.
5107 * config.in: Likewise.
5108 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5109 (OBS): Add common-remote-fileio.o.
5110 (common-remote-fileio.o): New rule.
5111
9a9df970
PA
51122015-03-09 Pedro Alves <palves@redhat.com>
5113
5114 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5115 'struct sockaddr' pointer in 'accept' call.
5116
9eb1356e
PA
51172015-03-09 Pedro Alves <palves@redhat.com>
5118
5119 Revert:
5120 2015-03-07 Pedro Alves <palves@redhat.com>
5121 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5122 or <winsock2.h> here. Instead include "gdb_socket.h".
5123 (remote_open): Use union gdb_sockaddr_u.
5124 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5125 or <winsock2.h> here. Instead include "gdb_socket.h".
5126 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5127 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5128 or <sys/un.h>.
5129 (init_named_socket, gdb_agent_helper_thread): Use union
5130 gdb_sockaddr_u.
5131
aac331e4
PA
51322015-03-07 Pedro Alves <palves@redhat.com>
5133
5134 * configure.ac (build_warnings): Move
5135 -Wdeclaration-after-statement to the C-specific set.
5136 * configure: Regenerate.
5137
366c75fc
PA
51382015-03-07 Pedro Alves <palves@redhat.com>
5139
5140 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5141 or <winsock2.h> here. Instead include "gdb_socket.h".
5142 (remote_open): Use union gdb_sockaddr_u.
5143 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5144 or <winsock2.h> here. Instead include "gdb_socket.h".
5145 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5146 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5147 or <sys/un.h>.
5148 (init_named_socket, gdb_agent_helper_thread): Use union
5149 gdb_sockaddr_u.
5150
492d29ea
PA
51512015-03-07 Pedro Alves <palves@redhat.com>
5152
5153 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5154 instead.
5155
60a191ed
YQ
51562015-03-06 Yao Qi <yao.qi@linaro.org>
5157
5158 * linux-aarch64-low.c (aarch64_insert_point): Use
5159 show_debug_regs as a boolean.
5160 (aarch64_remove_point): Likewise.
5161
f5771b1d
PA
51622015-03-05 Pedro Alves <palves@redhat.com>
5163
5164 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5165 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5166 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5167 * nto-low.c (nto_target_ops): Likewise.
5168 * spu-low.c (spu_target_ops): Likewise.
5169 * win32-low.c (win32_target_ops): Likewise.
5170
3e572f71
PA
51712015-03-04 Pedro Alves <palves@redhat.com>
5172
72f4393d 5173 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5174 Decide whether a breakpoint triggered based on the SIGTRAP's
5175 siginfo.si_code.
72f4393d
L
5176 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5177 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5178 (linux_low_filter_event): Check for breakpoints before checking
5179 watchpoints.
5180 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5181 siginfo.si_code.
72f4393d
L
5182 (linux_stopped_by_sw_breakpoint)
5183 (linux_supports_stopped_by_sw_breakpoint)
5184 (linux_stopped_by_hw_breakpoint)
5185 (linux_supports_stopped_by_hw_breakpoint): New functions.
5186 (linux_target_ops): Install new target methods.
3e572f71 5187
1ec68e26
PA
51882015-03-04 Pedro Alves <palves@redhat.com>
5189
5190 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5191 * server.c (swbreak_feature, hwbreak_feature): New globals.
5192 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5193 (captured_main): Clear swbreak_feature and hwbreak_feature.
5194 * server.h (swbreak_feature, hwbreak_feature): Declare.
5195 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5196 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5197 supports_stopped_by_hw_breakpoint>: New fields.
5198 (target_supports_stopped_by_sw_breakpoint)
5199 (target_stopped_by_sw_breakpoint)
5200 (target_supports_stopped_by_hw_breakpoint)
5201 (target_stopped_by_hw_breakpoint): Declare.
5202
15c66dd6
PA
52032015-03-04 Pedro Alves <palves@redhat.com>
5204
5205 enum lwp_stop_reason -> enum target_stop_reason
5206 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5207 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5208 (linux_wait_1, stuck_in_jump_pad_callback)
5209 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5210 (linux_stopped_by_watchpoint):
5211 * linux-low.h (enum lwp_stop_reason): Delete.
5212 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5213 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5214
98fc70d6
YQ
52152015-03-04 Yao Qi <yao.qi@linaro.org>
5216
5217 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5218
dd2ac174
GB
52192015-03-03 Gary Benson <gbenson@redhat.com>
5220
5221 * hostio.c (handle_vFile): Fix prefix lengths.
5222
d68e53f4
MM
52232015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5224
5225 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5226 ptr_bits.
5227
bf2d68ab
AA
52282015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5229
5230 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5231 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5232 (clean): Add "rm -f" for above C files.
5233 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5234 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5235 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5236 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5237 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5238 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5239 (init_registers_s390x_vx_linux64)
5240 (init_registers_s390x_tevx_linux64)
5241 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5242 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5243 declarations.
5244 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5245 (s390_store_vxrs_high): New functions.
5246 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5247 NT_S390_VXRS_HIGH.
5248 (s390_arch_setup): Add logic for selecting one of the new target
5249 descriptions. Activate the new vector regsets if applicable.
5250 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5251 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5252 and init_registers_s390x_tevx_linux64.
5253
c966a859
PA
52542015-03-01 Pedro Alves <palves@redhat.com>
5255
5256 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5257 parameter.
5258
4180215b
PA
52592015-02-27 Pedro Alves <palves@redhat.com>
5260
5261 * linux-x86-low.c (u_debugreg_offset): New function.
5262 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5263
749bab01
PA
52642015-02-27 Pedro Alves <palves@redhat.com>
5265
5266 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5267 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5268 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5269 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5270 (ps_lsetfpregs, ps_getpid)
5271 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5272 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5273 (ps_lsetxregs, ps_plog): Declare.
5274
3c14e5a3
PA
52752015-02-27 Pedro Alves <palves@redhat.com>
5276
5277 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5278 IP_AGENT_EXPORT_FUNC.
5279 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5280 IP_AGENT_EXPORT_FUNC.
5281 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5282 (IP_AGENT_EXPORT): Delete.
5283 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5284 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5285 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5286 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5287 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5288 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5289 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5290 (traceframe_read_count, traceframe_write_count)
5291 (traceframes_created, trace_state_variables, get_raw_reg)
5292 (get_trace_state_variable_value, set_trace_state_variable_value)
5293 (ust_loaded, helper_thread_id, cmd_buf): Use
5294 IPA_SYM_EXPORTED_NAME.
5295 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5296 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5297 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5298 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5299 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5300 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5301 EXTERN_C_PUSH/EXTERN_C_POP.
5302 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5303 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5304 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5305 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5306 (traceframe_write_count, traceframe_read_count)
5307 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5308 (about_to_request_buffer_space, get_trace_state_variable_value)
5309 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5310 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5311 EXTERN_C_PUSH/EXTERN_C_POP.
5312 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5313 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5314 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5315 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5316 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5317 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5318 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5319 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5320 Define.
5321 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5322 (IP_AGENT_EXPORT_VAR_DECL): Define.
5323 (tracing): Declare.
5324 (gdb_agent_get_raw_reg): Declare.
5325
fe978cb0
PA
53262015-02-27 Tom Tromey <tromey@redhat.com>
5327 Pedro Alves <palves@redhat.com>
5328
5329 Rename symbols whose names are reserved C++ keywords throughout.
5330
3bc3d82a
PA
53312015-02-27 Pedro Alves <palves@redhat.com>
5332
5333 * Makefile.in (COMPILER): New, get it from autoconf.
5334 (CXX): Get from autoconf instead.
5335 (COMPILE.pre): Use COMPILER.
5336 (CC-LD): Rename to ...
5337 (CC_LD): ... this. Use COMPILER.
5338 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5339 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5340 * acinclude.m4: Include build-with-cxx.m4.
5341 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5342 Disable -Werror by default if building in C++ mode.
5343 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5344 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5345 the C++ compiler. Save/restore CXXFLAGS too.
5346 * configure: Regenerate.
5347
07697489
PA
53482015-02-27 Pedro Alves <palves@redhat.com>
5349
5350 * acinclude.m4: Include libiberty.m4.
5351 * configure.ac: Call libiberty_INIT.
5352 * config.in, configure: Regenerate.
5353
9beb7c4e
PA
53542015-02-26 Pedro Alves <palves@redhat.com>
5355
5356 * linux-low.c (linux_wait_1): When incrementing the PC past a
5357 program breakpoint always use the_low_target.breakpoint_len as
5358 increment, rather than the maximum between that and
5359 the_low_target.decr_pc_after_break.
5360
8090aef2
PA
53612015-02-23 Pedro Alves <palves@redhat.com>
5362
5363 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5364 thread was doing a step-over; always adjust the PC if
5365 we stepped over a permanent breakpoint.
5366 (linux_wait_1): If we stepped over breakpoint that was on top of a
5367 permanent breakpoint, manually advance the PC past it.
5368
bc9540e8
PA
53692015-02-23 Pedro Alves <palves@redhat.com>
5370
5371 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5372 modes.
5373 (x86_fill_gregset, x86_store_gregset): Use it when handling
5374 $orig_eax.
5375
2db9a427
PA
53762015-02-20 Pedro Alves <palves@redhat.com>
5377
5378 * thread-db.c: Include "nat/linux-procfs.h".
5379 (thread_db_init): Skip listing new threads if the kernel supports
5380 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5381
afa8d396
PA
53822015-02-20 Pedro Alves <palves@redhat.com>
5383
5384 * linux-low.c (status_pending_p_callback): Use ptid_match.
5385
c9587f88
AT
53862015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5387
5388 PR breakpoints/16812
5389 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5390 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5391 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5392
b05ec7a5
AT
53932015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5394
5395 PR breakpoints/15956
5396 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5397
d33501a5
MM
53982015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5399
5400 * linux-low.c (linux_low_btrace_conf): Print size.
5401 * server.c (handle_btrace_conf_general_set): New.
5402 (hanle_general_set): Call handle_btrace_conf_general_set.
5403 (handle_query): Report Qbtrace-conf:bts:size as supported.
5404
f4abbc16
MM
54052015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5406
5407 * linux-low.c (linux_low_enable_btrace): Update parameters.
5408 (linux_low_btrace_conf): New.
5409 (linux_target_ops)<to_btrace_conf>: Initialize.
5410 * server.c (current_btrace_conf): New.
5411 (handle_btrace_enable): Rename to ...
5412 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5413 to target_enable_btrace. Update comment. Update users.
5414 (handle_qxfer_btrace_conf): New.
5415 (qxfer_packets): Add btrace-conf entry.
5416 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5417 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5418 (target_ops)<read_btrace_conf>: New.
5419 (target_enable_btrace): Update parameters.
5420 (target_read_btrace_conf): New.
5421
043c3577
MM
54222015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5423
5424 * server.c (handle_btrace_general_set): Remove call to
5425 target_supports_btrace.
5426 (supported_btrace_packets): New.
5427 (handle_query): Call supported_btrace_packets.
5428 * target.h: include btrace-common.h.
5429 (btrace_target_info): Removed.
5430 (supports_btrace, target_supports_btrace): Update parameters.
5431
734b0e4b
MM
54322015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5433
5434 * Makefile.in (SFILES): Add common/btrace-common.c.
5435 (OBS): Add common/btrace-common.o.
5436 (btrace-common.o): Add build rules.
5437 * linux-low: Include btrace-common.h.
5438 (linux_low_read_btrace): Use struct btrace_data. Call
5439 btrace_data_init and btrace_data_fini.
5440
d6c146e9
PA
54412015-02-06 Pedro Alves <palves@redhat.com>
5442
5443 * thread-db.c (find_new_threads_callback): Add debug output.
5444
20ba1ce6
PA
54452015-02-04 Pedro Alves <palves@redhat.com>
5446
5447 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5448 (resume_stopped_resumed_lwps): New function.
5449 (linux_wait_for_event_filtered): Use it.
5450
8cc73a39
SDJ
54512015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5452
5453 * Makefile.in (SFILES): Add linux-personality.c.
5454 (linux-personality.o): New rule.
5455 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5456 list of objects to be built.
5457 * linux-low.c: Include nat/linux-personality.h.
5458 (linux_create_inferior): Remove code to disable address space
5459 randomization (moved to ../nat/linux-personality.c). Create
5460 cleanup to disable address space randomization.
5461
fb23d554
SDJ
54622015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5463
5464 * Makefile.in (posix-strerror.o): New rule.
5465 (mingw-strerror.o): Likewise.
5466 * configure: Regenerated.
5467 * configure.ac: Source file ../common/common.host. Initialize new
5468 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5469
cdf43629
YQ
54702015-01-14 Yao Qi <yao@codesourcery.com>
5471
5472 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5473 (ppc-linux.o): New rule.
5474 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5475 * configure.ac: AC_CHECK_FUNCS(getauxval).
5476 * config.in: Re-generated.
5477 * configure: Re-generated.
5478 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5479 ppc64_64bit_inferior_p
5480
514c5338
YQ
54812015-01-14 Yao Qi <yao@codesourcery.com>
5482
5483 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5484 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5485 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5486 (PT_ORIG_R3, PT_TRAP): Likewise.
5487 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5488 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5489 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5490
3368c1e5
JB
54912015-01-10 Joel Brobecker <brobecker@adacore.com>
5492
5493 * i387-fp.c (i387_cache_to_xsave): In look over
5494 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5495 zmmh_low_space field by use of zmmh_high_space.
5496
582511be
PA
54972015-01-09 Pedro Alves <palves@redhat.com>
5498
5499 * linux-low.c (step_over_bkpt): Move higher up in the file.
5500 (handle_extended_wait): Don't store the stop_pc here.
5501 (get_stop_pc): Adjust comments and rename to ...
5502 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5503 stopped for a software breakpoint or hardware breakpoint.
5504 (thread_still_has_status_pending_p): New function.
5505 (status_pending_p_callback): Use
5506 thread_still_has_status_pending_p. If the event is no longer
5507 interesting, resume the LWP.
5508 (handle_tracepoints): Add assert.
5509 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5510 (wstatus_maybe_breakpoint): New function.
5511 (cancel_breakpoint): Delete function.
5512 (check_stopped_by_watchpoint): New function, factored out from
5513 linux_low_filter_event.
5514 (lp_status_maybe_breakpoint): Delete function.
5515 (linux_low_filter_event): Remove filter_ptid argument.
5516 Leave thread group exits pending here. Store the LWP's stop PC.
5517 Always leave events pending.
5518 (linux_wait_for_event_filtered): Pull all events out of the
5519 kernel, and leave them all pending.
5520 (count_events_callback, select_event_lwp_callback): Consider all
5521 events.
5522 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5523 (select_event_lwp): Only give preference to the stepping LWP in
5524 all-stop mode. Adjust comments.
5525 (ignore_event): New function.
5526 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5527 references to cancel_breakpoints. Adjust to renames. Also give
5528 equal priority to all LWPs that have had events in non-stop mode.
5529 If reporting a software breakpoint event, unadjust the LWP's PC.
5530 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5531 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5532 Adjust.
5533 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5534 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5535 (linux_stopped_by_watchpoint): Adjust.
5536 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5537 * linux-low.h (enum lwp_stop_reason): New.
5538 (struct lwp_info) <stop_pc>: Adjust comment.
5539 <stopped_by_watchpoint>: Delete field.
5540 <stop_reason>: New field.
5541 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5542 * mem-break.c (software_breakpoint_inserted_here)
5543 (hardware_breakpoint_inserted_here): New function.
5544 * mem-break.h (software_breakpoint_inserted_here)
5545 (hardware_breakpoint_inserted_here): Declare.
5546 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5547 (cancel_breakpoints): Delete.
5548 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5549 (upload_fast_traceframes): Remove references to
5550 cancel_breakpoints.
5551
a33e3959
PA
55522015-01-09 Pedro Alves <palves@redhat.com>
5553
5554 * thread-db.c (find_new_threads_callback): Ignore thread if the
5555 kernel thread ID is -1.
5556
8784d563
PA
55572015-01-09 Pedro Alves <palves@redhat.com>
5558
5559 * linux-low.c (linux_attach_fail_reason_string): Move to
5560 nat/linux-ptrace.c, and rename.
5561 (linux_attach_lwp): Update comment.
5562 (attach_proc_task_lwp_callback): New function.
5563 (linux_attach): Adjust to rename and use
5564 linux_proc_attach_tgid_threads.
5565 (linux_attach_fail_reason_string): Delete declaration.
5566
76f2b779
JB
55672015-01-01 Joel Brobecker <brobecker@adacore.com>
5568
5569 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5570 * server.c (gdbserver_version): Likewise.
5571
fafcc06a
SDJ
55722014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5573
5574 * remote-utils.c: Include ctype.h.
5575 (input_interrupt): Explicitly handle the case when the char
5576 received is the NUL byte. Improve the printing of non-ASCII
5577 characters.
5578
beed38b8
JB
55792014-12-16 Joel Brobecker <brobecker@adacore.com>
5580
5581 * linux-low.c (linux_low_filter_event): Update call to
5582 linux_enable_event_reporting following the addition of
5583 a new parameter to that function.
5584
bf330350
CU
55852014-12-16 Catalin Udma <catalin.udma@freescale.com>
5586
5587 PR server/17457
5588 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5589 (AARCH64_FPCR_REGNO): Likewise.
5590 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5591 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5592 (aarch64_store_fpregset): Likewise.
5593
5227d625
JB
55942014-12-15 Joel Brobecker <brobecker@adacore.com>
5595
5596 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5597 Remove FIXME comment about assumption about N.
5598
f93b65a0
JB
55992014-12-13 Joel Brobecker <brobecker@adacore.com>
5600
5601 * configure.ac: If large-file support is disabled in GDBserver,
5602 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5603 * configure: Regenerate.
5604
e5a9158d
AA
56052014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5606
5607 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5608 warning upon ENODATA from ptrace.
5609 * linux-s390-low.c (s390_store_tdb): New.
5610 (s390_regsets): Add regset for NT_S390_TDB.
5611
feea5f36
AA
56122014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5613
5614 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5615 without a fill_function.
5616 * linux-s390-low.c (s390_fill_last_break): Remove.
5617 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5618 (s390_arch_setup): Use regset's size instead of fill_function for
5619 loop end condition.
5620
098dbe61
AA
56212014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5622
5623 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5624 the regset's store function when ptrace returned an error.
5625 * regcache.c (get_thread_regcache): Invalidate register cache
5626 before fetching inferior's registers.
5627
28eef672
AA
56282014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5629
5630 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5631 while-loop as for-loop.
5632 (regsets_store_inferior_registers): Likewise.
5633
bdca27a2
YQ
56342014-11-28 Yao Qi <yao@codesourcery.com>
5635
5636 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5637 * config.in, configure: Re-generate.
5638 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5639 is defined.
5640
9c232dda
YQ
56412014-11-21 Yao Qi <yao@codesourcery.com>
5642
5643 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5644 (AC_CHECK_HEADERS): Remove malloc.h.
5645 * configure: Re-generated.
5646 * config.in: Re-generated.
5647 * server.h: Don't include alloca.h and malloc.h.
5648 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5649 Don't include malloc.h.
5650
43968415
JB
56512014-11-17 Joel Brobecker <brobecker@adacore.com>
5652
5653 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5654 corresponding ERRNO check in same block.
5655
40e91bc7
PA
56562014-11-12 Pedro Alves <palves@redhat.com>
5657
5658 * server.c (cont_thread): Update comment.
5659 (start_inferior, attach_inferior): No longer clear cont_thread.
5660 (handle_v_cont): No longer set cont_thread.
5661 (captured_main): Clear cont_thread each time a GDB connects.
5662
c2c118cf
PA
56632014-11-12 Pedro Alves <palves@redhat.com>
5664
5665 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5666 thread, and don't resume all threads if the Hc thread has exited.
5667
78708b7c
PA
56682014-11-12 Pedro Alves <palves@redhat.com>
5669
5670 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5671 the process group instead of to a specific LWP.
5672
a2abc7de
PA
56732014-10-15 Pedro Alves <palves@redhat.com>
5674
5675 PR server/17487
5676 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5677 parameter.
5678 (arm_set_thread_context): Delete.
5679 (the_low_target): Adjust.
5680 * win32-i386-low.c (debug_registers_changed)
5681 (debug_registers_used): Delete.
5682 (update_debug_registers_callback): New function.
5683 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5684 needing to update their debug registers.
5685 (win32_get_current_dr): New function.
5686 (x86_dr_low_get_addr, x86_dr_low_get_control)
5687 (x86_dr_low_get_status): Fetch the debug register from the thread
5688 record's context.
5689 (i386_initial_stuff): Adjust.
5690 (i386_get_thread_context): Remove current_event parameter. Don't
5691 clear debug_registers_changed nor copy DR values to
5692 debug_reg_state.
5693 (i386_set_thread_context): Delete.
5694 (i386_prepare_to_resume): New function.
5695 (i386_thread_added): Mark the thread as needing to update irs
5696 debug registers.
5697 (the_low_target): Remove i386_set_thread_context and install
5698 i386_prepare_to_resume.
5699 * win32-low.c (win32_get_thread_context): Adjust.
5700 (win32_set_thread_context): Use SetThreadContext
5701 directly.
5702 (win32_prepare_to_resume): New function.
5703 (win32_require_context): New function, factored out from ...
5704 (thread_rec): ... this.
5705 (continue_one_thread): Call win32_prepare_to_resume on each thread
5706 we're about to continue.
5707 (win32_resume): Call win32_prepare_to_resume on the event thread.
5708 * win32-low.h (struct win32_thread_info)
5709 <debug_registers_changed>: New field.
5710 (struct win32_target_ops): Change prototype of set_thread_context,
5711 delete set_thread_context and add prepare_to_resume.
5712 (win32_require_context): New declaration.
5713
a442d071
GB
57142014-10-08 Gary Benson <gbenson@redhat.com>
5715
5716 * server.h: Do not include common-exceptions.h.
5717
6f1947e8
GB
57182014-10-08 Gary Benson <gbenson@redhat.com>
5719
5720 * server.h: Do not include cleanups.h.
5721
63b434a4
JH
57222014-09-30 James Hogan <james.hogan@imgtec.com>
5723
5724 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5725 mips64-dsp-linux.c.
5726
c4d9ceb6
YQ
57272014-09-23 Yao Qi <yao@codesourcery.com>
5728
5729 * linux-low.c (lp_status_maybe_breakpoint): New function.
5730 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5731 (count_events_callback): Likewise.
5732 (select_event_lwp_callback): Likewise.
5733 (cancel_breakpoints_callback): Likewise.
5734
89a5711c
DB
57352014-09-19 Don Breazeal <donb@codesourcery.com>
5736
5737 * linux-low.c (handle_extended_wait): Call
5738 linux_ptrace_get_extended_event.
5739 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5740 linux_is_extended_waitstatus.
5741
bffc0964
JB
57422014-09-16 Joel Brobecker <brobecker@adacore.com>
5743
5744 * Makefile.in (CPPFLAGS): Define.
5745 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5746 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5747
0bfdf32f
GB
57482014-09-16 Gary Benson <gbenson@redhat.com>
5749
5750 * inferiors.h (current_inferior): Renamed as...
5751 (current_thread): New variable. All uses updated.
5752 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5753 (maybe_move_out_of_jump_pad): Likewise.
5754 (cancel_breakpoint): Likewise.
5755 (linux_low_filter_event): Likewise.
5756 (wait_for_sigstop): Likewise.
5757 (linux_resume_one_lwp): Likewise.
5758 (need_step_over_p): Likewise.
5759 (start_step_over): Likewise.
5760 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5761 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5762 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5763 and save_inferior as saved_thread.
5764 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5765 saved_thread.
5766 (regcache_invalidate_thread): Likewise.
5767 * remote-utils.c (prepare_resume_reply): Likewise.
5768 * thread-db.c (thread_db_get_tls_address): Likewise.
5769 (disable_thread_event_reporting): Likewise.
5770 (remove_thread_event_breakpoints): Likewise.
5771 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5772 as saved_thread.
5773 * target.h (set_desired_inferior): Renamed as...
5774 (set_desired_thread): New declaration. All uses updated.
5775 * server.c (myresume): Updated comment to reference thread instead
5776 of inferior.
5777 (handle_serial_event): Likewise.
5778 (handle_target_event): Likewise.
5779
361c8ade
GB
57802014-09-12 Tom Tromey <tromey@redhat.com>
5781 Gary Benson <gbenson@redhat.com>
5782
5783 * regcache.h: Include common-regcache.h.
5784 (regcache_read_pc): Don't declare.
5785 * regcache.c (get_thread_regcache_for_ptid): New function.
5786
bd9269f7
GB
57872014-09-11 Tom Tromey <tromey@redhat.com>
5788 Gary Benson <gbenson@redhat.com>
5789
5790 * symbol.c: New file.
5791 * Makefile.in (SFILES): Add symbol.c.
5792 (OBS): Add symbol.o.
5793
f8c1d06b
GB
57942014-09-11 Gary Benson <gbenson@redhat.com>
5795
5796 * target.c (target_stop_ptid, target_continue_ptid): New
5797 functions.
5798
721ec300
GB
57992014-09-11 Tom Tromey <tromey@redhat.com>
5800 Gary Benson <gbenson@redhat.com>
5801
5802 * target.h: Include target/target.h.
5803 * target.c (target_read_memory, target_read_uint32)
5804 (target_write_memory): New functions.
5805
c5e92cca
GB
58062014-09-11 Gary Benson <gbenson@redhat.com>
5807
5808 * server.h (debug_hw_points): Don't declare.
5809 * server.c (debug_hw_points): Don't define. Replace all uses
5810 with show_debug_regs.
5811 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5812 all uses with show_debug_regs.
5813
2e4bb98a
EBM
58142014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5815
5816 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5817 endianness into account.
5818 (ppc_supply_ptrace_register): Likewise.
5819
ac740bc7
JH
58202014-09-03 James Hogan <james.hogan@imgtec.com>
5821
5822 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5823 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5824
97ea6506
GB
58252014-09-03 Gary Benson <gbenson@redhat.com>
5826
5827 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5828 ALL_DEBUG_ADDRESS_REGISTERS.
5829
df7e5265
GB
58302014-09-02 Gary Benson <gbenson@redhat.com>
5831
5832 * i386-low.h: Renamed as...
5833 * x86-low.h: New file. All type, function and variable name
5834 prefixes changed from "i386_" to "x86_". All references updated.
5835 * i386-low.c: Renamed as...
5836 * x86-low.c: New file. All type, function and variable name
5837 prefixes changed from "i386_" to "x86_". All references updated.
5838
ed859da7
GB
58392014-09-02 Gary Benson <gbenson@redhat.com>
5840
5841 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5842 (x86_linux_new_thread): Likewise.
5843
860789c7
GB
58442014-08-29 Gary Benson <gbenson@redhat.com>
5845
5846 * server.h (setjmp.h): Do not include.
5847 (toplevel): Do not declare.
5848 (common-exceptions.h): Include.
5849 (cleanups.h): Likewise.
5850 * server.c (toplevel): Do not define.
5851 (exit_code): New static global.
5852 (detach_or_kill_for_exit_cleanup): New function.
5853 (main): New function. Original main renamed to...
5854 (captured_main): New function.
5855 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5856
ff55e1b5
GB
58572014-08-29 Gary Benson <gbenson@redhat.com>
5858
5859 * Makefile.in (SFILES): Add common/common-exceptions.c.
5860 (OBS): Add common-exceptions.o.
5861 (common-exceptions.o): New rule.
5862 * utils.c (prepare_to_throw_exception): New function.
5863
e9bcb658
GB
58642014-08-29 Gary Benson <gbenson@redhat.com>
5865
5866 * config.in: Regenerate.
5867 * configure: Likewise.
5868
e3180625
GB
58692014-08-29 Gary Benson <gbenson@redhat.com>
5870
5871 * Makefile.in (SFILES): Add common/cleanups.c.
5872 (OBS): cleanups.o.
5873 (cleanups.o): New rule.
5874
e3d6ba5d
GB
58752014-08-29 Gary Benson <gbenson@redhat.com>
5876
5877 * utils.c (internal_vwarning): New function.
5878
7096e886
GB
58792014-08-28 Gary Benson <gbenson@redhat.com>
5880
5881 * utils.h (fatal): Remove declaration.
5882 * utils.c (fatal): Remove function.
5883
14ce3192
GB
58842014-08-28 Gary Benson <gbenson@redhat.com>
5885
5886 * tracepoint.c (gdb_agent_init): Replace fatal with
5887 perror_with_name.
5888 (initialize_tracepoint): Likewise.
5889
50278d59
GB
58902014-08-28 Gary Benson <gbenson@redhat.com>
5891
5892 * remote-utils.c (remote_prepare): Replace fatal with error.
5893
aa96c426
GB
58942014-08-28 Gary Benson <gbenson@redhat.com>
5895
5896 * linux-low.c (linux_async): Replace fatal with warning.
5897 Tidy up and return.
5898 (linux_start_non_stop): Return -1 if linux_async failed.
5899
f7160e97
GB
59002014-08-28 Gary Benson <gbenson@redhat.com>
5901
5902 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5903 gdb_assert.
5904 (i386_dr_low_get_addr): Remove vague comment.
5905 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5906 gdb_assert.
5907
38e08fca
GB
59082014-08-28 Gary Benson <gbenson@redhat.com>
5909
5910 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5911 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5912 internal_error.
5913 (linux_resume_one_lwp): Likewise.
5914 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5915 gdb_assert.
5916 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5917 with internal_error.
5918 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5919 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5920 (find_register_by_name): Replace fatal with internal_error.
5921 (find_regno): Likewise.
5922 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5923 * thread-db.c (thread_db_create_event): Likewise.
5924 (thread_db_load_search): Likewise.
5925 (try_thread_db_load_1): Likewise.
5926 * tracepoint.c (get_jump_space_head): Replace fatal with
5927 internal_error.
5928 (claim_trampoline_space): Likewise.
5929 (have_fast_tracepoint_trampoline_buffer): Likewise.
5930 (cmd_qtstart): Likewise.
5931 (stop_tracing): Likewise.
5932 (fast_tracepoint_collecting): Likewise.
5933 (target_malloc): Likewise.
5934 (download_tracepoint): Likewise.
5935 (download_trace_state_variables): Replace check with gdb_assert.
5936 (upload_fast_traceframes): Replace fatal with internal_error.
5937
34abf635
GB
59382014-08-19 Tom Tromey <tromey@redhat.com>
5939 Gary Benson <gbenson@redhat.com>
5940
5941 * Makefile.in (SFILES): Add common/common-debug.c.
5942 (OBS): Add common-debug.o.
5943 (common-debug.o): New rule.
5944 * debug.h (debug_printf): Don't declare.
5945 * debug.c (debug_printf): Renamed and rewritten as...
5946 (debug_vprintf): New function.
5947
f6e94d78
GB
59482014-08-19 Gary Benson <gbenson@redhat.com>
5949
5950 * utils.h: Do not include print-utils.h.
5951
9239eeab
GB
59522014-08-19 Tom Tromey <tromey@redhat.com>
5953 Gary Benson <gbenson@redhat.com>
5954
5955 * server.h: Add static assertion.
5956 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5957
ef87c8bb
GB
59582014-08-19 Tom Tromey <tromey@redhat.com>
5959 Gary Benson <gbenson@redhat.com>
5960
5961 * Makefile.in (SFILES): Add common/errors.c.
5962 (OBS): Add errors.o.
5963 (IPA_OBS): Add errors-ipa.o.
5964 (errors.o): New rule.
5965 (errors-ipa.o): Likewise.
5966 * utils.h (perror_with_name, error, warning): Don't declare.
5967 * utils.c (warning): Renamed and rewritten as...
5968 (vwarning): New function.
5969 (error): Renamed and rewritten as...
5970 (verror): New function.
5971 (internal_error): Renamed and rewritten as...
5972 (internal_verror): New function.
5973
bb974a24
GB
59742014-08-07 Gary Benson <gbenson@redhat.com>
5975
5976 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5977 * configure: Regenerate.
5978 * config.in: Likewise.
5979 * server.h: Do not include errno.h.
5980 * event-loop.c: Likewise.
5981 * hostio-errno.c: Likewise.
5982 * linux-low.c: Likewise.
5983 * remote-utils.c: Likewise.
5984 * spu-low.c: Likewise.
5985 * utils.c: Likewise.
5986 * gdbreplay.c: Unconditionally include errno.h.
5987
6d3d12eb
GB
59882014-08-07 Gary Benson <gbenson@redhat.com>
5989
5990 * server.h: Do not include string.h.
5991 * event-loop.c: Likewise.
5992 * linux-low.c: Likewise.
5993 * regcache.c: Likewise.
5994 * remote-utils.c: Likewise.
5995 * spu-low.c: Likewise.
5996 * utils.c: Likewise.
5997
dccbb609
GB
59982014-08-07 Gary Benson <gbenson@redhat.com>
5999
6000 * server.h: Do not include gdb_assert.h.
6001
e76df0d0
GB
60022014-08-07 Gary Benson <gbenson@redhat.com>
6003
6004 * server.h: Do not include common-utils.h.
6005
4cb9c816
GB
60062014-08-07 Gary Benson <gbenson@redhat.com>
6007
6008 * server.h: Do not include ptid.h.
6009 * notif.h: Likewise.
6010
3995eeee
GB
60112014-08-07 Gary Benson <gbenson@redhat.com>
6012
6013 * server.h: Do not include gdb_locale.h.
6014
cb9f1a9b
GB
60152014-08-07 Gary Benson <gbenson@redhat.com>
6016
6017 * server.h: Do not include gdb/signals.h.
6018 * win32-low.c: Likewise.
6019
a5fceff8
GB
60202014-08-07 Gary Benson <gbenson@redhat.com>
6021
6022 * server.h: Do not include pathmax.h.
6023
b9391142
GB
60242014-08-07 Gary Benson <gbenson@redhat.com>
6025
6026 * server.h: Do not include libiberty.h.
6027 * linux-bfin-low.c: Likewise.
6028
0e443c87
GB
60292014-08-07 Gary Benson <gbenson@redhat.com>
6030
6031 * server.h: Do not include ansidecl.h.
6032
8ebb3f56
GB
60332014-08-07 Gary Benson <gbenson@redhat.com>
6034
6035 * linux-x86-low.c: Do not include stddef.h.
6036 * lynx-ppc-low.c: Likewise.
6037 * tracepoint.c: Likewise.
6038
8980bdf6
GB
60392014-08-07 Gary Benson <gbenson@redhat.com>
6040
6041 * server.h: Do not include stdarg.h.
6042 * nto-low.c: Likewise.
6043
d7096f71
GB
60442014-08-07 Gary Benson <gbenson@redhat.com>
6045
6046 * server.h: Do not include stdlib.h.
6047 * inferiors.c: Likewise.
6048 * linux-low.c: Likewise.
6049 * regcache.c: Likewise.
6050 * spu-low.c: Likewise.
6051 * tracepoint.c: Likewise.
6052 * utils.c: Likewise.
6053
d02f550d
GB
60542014-08-07 Gary Benson <gbenson@redhat.com>
6055
6056 * server.h: Do not include stdio.h.
6057 * linux-low.c: Likewise.
6058 * remote-utils.c: Likewise.
6059 * spu-low.c: Likewise.
6060 * utils.c: Likewise.
6061 * wincecompat.c: Likewise.
6062
87f6c4e3
GB
60632014-08-06 Gary Benson <gbenson@redhat.com>
6064
6065 * regcache.c (init_register_cache): Move conditionals inside if.
6066
7089dca4
GB
60672014-08-06 Gary Benson <gbenson@redhat.com>
6068
6069 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6070
462f517e
GB
60712014-07-31 Gary Benson <gbenson@redhat.com>
6072
6073 * ax.h: Do not include server.h.
6074 * gdbthread.h: Likewise.
6075 * lynx-low.h: Likewise.
6076 * notif.h: Likewise.
6077
976411d6
GB
60782014-07-30 Gary Benson <gbenson@redhat.com>
6079
6080 * server.h: Include common-defs.h.
6081 Do not include config.h or build-gnulib-gdbserver/config.h.
6082
d41f6d8e
GB
60832014-07-30 Gary Benson <gbenson@redhat.com>
6084
6085 * hostio-errno.c: Move server.h to top of includes list.
6086 * inferiors.c: Likewise.
6087 * linux-x86-low.c: Likewise.
6088 * notif.c: Include server.h.
6089
314c6a35
TT
60902014-07-24 Tom Tromey <tromey@redhat.com>
6091 Gary Benson <gbenson@redhat.com>
6092
6093 * server.h (CORE_ADDR): Now unsigned.
6094
69ff6be5
PA
60952014-07-16 Pedro Alves <palves@redhat.com>
6096
6097 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6098
ce9e3fe7
PA
60992014-07-15 Pedro Alves <palves@redhat.com>
6100
6101 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6102 copy.
6103
e76126e8
PA
61042014-07-11 Pedro Alves <palves@redhat.com>
6105
6106 * linux-low.c (kill_wait_lwp): New function, based on
6107 kill_one_lwp_callback, but use my_waitpid directly.
6108 (kill_one_lwp_callback, linux_kill): Use it.
6109
8e9db26e
PA
61102014-06-23 Pedro Alves <palves@redhat.com>
6111
6112 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6113 before setting DR0..DR3.
6114
698b3e08
GB
61152014-06-20 Gary Benson <gbenson@redhat.com>
6116
6117 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6118 * configure: Regenerated.
6119 * config.in: Likewise.
6120
125f8a3d
GB
61212014-06-20 Gary Benson <gbenson@redhat.com>
6122
6123 * Makefile.in (SFILES): Update locations for files moved
6124 from common to nat.
6125 (object file files): Reordered.
6126
42995dbd
GB
61272014-06-20 Gary Benson <gbenson@redhat.com>
6128
6129 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6130 (i386_dr_low_set_addr): Likewise.
6131 (i386_dr_low_get_addr): Likewise.
6132 (i386_dr_low_can_set_control): Likewise.
6133 (i386_dr_low_set_control): Likewise.
6134 (i386_dr_low_get_control): Likewise.
6135 (i386_dr_low_get_status): Likewise.
6136 (i386_get_debug_register_length): Likewise.
6137 * linux-x86-low.c (i386_dr_low_set_addr):
6138 Changed signature. Made static.
6139 (i386_dr_low_get_addr): Likewise.
6140 (i386_dr_low_set_control): Likewise.
6141 (i386_dr_low_get_control): Likewise.
6142 (i386_dr_low_get_status): Likewise.
6143 (i386_dr_low): New global variable.
6144 * win32-i386-low.c (i386_dr_low_set_addr):
6145 Changed signature. Made static.
6146 (i386_dr_low_get_addr): Likewise.
6147 (i386_dr_low_set_control): Likewise.
6148 (i386_dr_low_get_control): Likewise.
6149 (i386_dr_low_get_status): Likewise.
6150 (i386_dr_low): New global variable.
6151
e1d2394b
MS
61522014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6153
6154 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6155 * Makefile.in (AR, AR_FLAGS): Define.
6156 * configure: Regenerate.
6157
3a8ee006
GB
61582014-06-19 Gary Benson <gbenson@redhat.com>
6159
6160 * Makefile.in (i386-dregs.o): New rule.
6161 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6162 * i386-low.c (target.h): Remove include.
6163 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6164 (DR_CONTROL_SHIFT): Likewise.
6165 (DR_CONTROL_SIZE): Likewise.
6166 (DR_RW_EXECUTE): Likewise.
6167 (DR_RW_WRITE): Likewise.
6168 (DR_RW_READ): Likewise.
6169 (DR_RW_IORW): Likewise.
6170 (DR_LEN_1): Likewise.
6171 (DR_LEN_2): Likewise.
6172 (DR_LEN_4): Likewise.
6173 (DR_LEN_8): Likewise.
6174 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6175 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6176 (DR_ENABLE_SIZE): Likewise.
6177 (DR_LOCAL_SLOWDOWN): Likewise.
6178 (DR_GLOBAL_SLOWDOWN): Likewise.
6179 (DR_CONTROL_RESERVED): Likewise.
6180 (I386_DR_CONTROL_MASK): Likewise.
6181 (I386_DR_VACANT): Likewise.
6182 (I386_DR_LOCAL_ENABLE): Likewise.
6183 (I386_DR_GLOBAL_ENABLE): Likewise.
6184 (I386_DR_DISABLE): Likewise.
6185 (I386_DR_SET_RW_LEN): Likewise.
6186 (I386_DR_GET_RW_LEN): Likewise.
6187 (I386_DR_WATCH_HIT): Likewise.
6188 (i386_wp_op_t): Likewise.
6189 (i386_show_dr): Likewise.
6190 (i386_length_and_rw_bits): Likewise.
6191 (i386_insert_aligned_watchpoint): Likewise.
6192 (i386_remove_aligned_watchpoint): Likewise.
6193 (i386_handle_nonaligned_watchpoint): Likewise.
6194 i386_update_inferior_debug_regs(): Likewise.
6195 (i386_dr_insert_watchpoint): Likewise.
6196 (i386_dr_remove_watchpoint): Likewise.
6197 (i386_dr_region_ok_for_watchpoint): Likewise.
6198 (i386_dr_stopped_data_address): Likewise.
6199 (i386_dr_stopped_by_watchpoint): Likewise.
6200
8f26655c
GB
62012014-06-19 Gary Benson <gbenson@redhat.com>
6202
6203 * i386-low.c (i386_dr_show): Renamed to
6204 i386_show_dr and made static. All uses updated.
6205 (i386_dr_length_and_rw_bits): Renamed to
6206 i386_length_and_rw_bits and made static.
6207 All uses updated.
6208 (i386_dr_insert_aligned_watchpoint): Renamed to
6209 i386_insert_aligned_watchpoint and made static.
6210 All uses updated.
6211 (i386_dr_remove_aligned_watchpoint): Renamed to
6212 i386_remove_aligned_watchpoint and made static.
6213 All uses updated.
6214 (i386_dr_update_inferior_debug_regs): Renamed to
6215 i386_update_inferior_debug_regs and made static.
6216 All uses updated.
6217
b9228891
GB
62182014-06-18 Gary Benson <gbenson@redhat.com>
6219
5171def3
GB
6220 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6221 (i386_dr_low_can_set_control): Likewise.
6222 (i386_get_debug_register_length): Likewise.
6223 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6224 (i386_dr_low_can_set_control): Likewise.
6225 (i386_get_debug_register_length): Likewise.
6226
62272014-06-17 Gary Benson <gbenson@redhat.com>
6228
b9228891
GB
6229 * i386-low.h (i386-dregs.h): New include.
6230 (DR_FIRSTADDR): Now in i386-dregs.h.
6231 (DR_LASTADDR): Likewise.
6232 (DR_NADDR): Likewise.
6233 (DR_STATUS): Likewise.
6234 (DR_CONTROL): Likewise.
6235 (i386_debug_reg_state): Likewise.
6236 (i386_dr_insert_watchpoint): Likewise.
6237 (i386_dr_remove_watchpoint): Likewise.
6238 (i386_dr_region_ok_for_watchpoint): Likewise.
6239 (i386_dr_stopped_data_address): Likewise.
6240 (i386_dr_stopped_by_watchpoint): Likewise.
6241 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6242
4be83cc2
GB
62432014-06-18 Gary Benson <gbenson@redhat.com>
6244
6245 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6246 i386_dr_insert_watchpoint.
6247 (i386_low_remove_watchpoint): Renamed to
6248 i386_dr_remove_watchpoint.
6249 (i386_low_region_ok_for_watchpoint): Renamed to
6250 i386_dr_region_ok_for_watchpoint.
6251 (i386_low_stopped_data_address): Renamed to
6252 i386_dr_stopped_data_address.
6253 (i386_low_stopped_by_watchpoint): Renamed to
6254 i386_dr_stopped_by_watchpoint.
6255 * i386-low.c (i386_show_dr): Renamed to
6256 i386_dr_show and made nonstatic. All uses updated.
6257 (i386_length_and_rw_bits): Renamed to
6258 i386_dr_length_and_rw_bits and made nonstatic.
6259 All uses updated.
6260 (i386_insert_aligned_watchpoint): Renamed to
6261 i386_dr_insert_aligned_watchpoint and made nonstatic.
6262 All uses updated.
6263 (i386_remove_aligned_watchpoint): Renamed to
6264 i386_dr_remove_aligned_watchpoint and made nonstatic.
6265 All uses updated.
6266 (i386_update_inferior_debug_regs): Renamed to
6267 i386_dr_update_inferior_debug_regs and made nonstatic.
6268 All uses updated.
6269 (i386_low_insert_watchpoint): Renamed to
6270 i386_dr_insert_watchpoint. All uses updated.
6271 (i386_low_remove_watchpoint): Renamed to
6272 i386_dr_remove_watchpoint. All uses updated.
6273 (i386_low_region_ok_for_watchpoint): Renamed to
6274 i386_dr_region_ok_for_watchpoint. All uses updated.
6275 (i386_low_stopped_data_address): Renamed to
6276 i386_dr_stopped_data_address. All uses updated.
6277 (i386_low_stopped_by_watchpoint): Renamed to
6278 i386_dr_stopped_by_watchpoint. All uses updated.
6279
131aa0d4
GB
62802014-06-18 Gary Benson <gbenson@redhat.com>
6281
6282 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6283 (i386_dr_low_can_set_control): Likewise.
6284 (i386_insert_aligned_watchpoint): New check.
6285
d9305f7f
GB
62862014-06-18 Gary Benson <gbenson@redhat.com>
6287
6288 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6289 Renamed to state.
6290
e927c9fc
GB
62912014-06-18 Gary Benson <gbenson@redhat.com>
6292
6293 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6294 instead of fatal and error.
6295 (i386_handle_nonaligned_watchpoint): Likewise.
6296
1b6d4134
GB
62972014-06-18 Gary Benson <gbenson@redhat.com>
6298
6299 * i386-low.c (i386_get_debug_register_length): New macro.
6300 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6301 (i386_show_dr): Use debug_printf instead of fprintf. Use
6302 phex to format values.
6303
6e62758f
GB
63042014-06-18 Gary Benson <gbenson@redhat.com>
6305
6306 * i386-low.h: Comment changes.
6307 * i386-low.c: Likewise.
6308
fc6e2f03
GB
63092014-06-18 Gary Benson <gbenson@redhat.com>
6310
6311 * i386-low.c: Whitespace changes.
6312
f9d1eeed
TT
63132014-06-12 Tom Tromey <tromey@redhat.com>
6314
6315 * utils.c (freeargv): Remove.
6316
0b04e523
TT
63172014-06-12 Tom Tromey <tromey@redhat.com>
6318
6319 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6320 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6321 (parse_debug_format_options): Likewise.
6322 (gdbserver_usage): Likewise.
6323 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6324 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6325 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6326 against libiberty.
6327 ($(LIBGNU)): Depend on libiberty.
6328 (all-lib): Recurse into all subdirs.
6329 (install-only): Invoke "install" target in subdirs.
6330 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6331 targets.
6332 * configure: Rebuild.
6333 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6334 for vasprintf, vsnprintf, or gettimeofday.
6335 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6336 srv_tgtobj.
6337
270c9937
JB
63382014-06-05 Joel Brobecker <brobecker@adacore.com>
6339
6340 * development.sh: Delete.
6341 * Makefile.in (config.status): Adjust dependency on development.sh.
6342 * configure.ac: Adjust development.sh source call.
6343 * configure: Regenerate.
6344
0a261ed8
PA
63452014-06-02 Pedro Alves <palves@redhat.com>
6346
6347 * ax.c (gdb_free_agent_expr): New function.
6348 * ax.h (gdb_free_agent_expr): New declaration.
6349 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6350 list.
6351 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6352 static.
6353 (clear_breakpoint_conditions_and_commands): New function.
6354 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6355 (clear_breakpoint_conditions_and_commands): New declaration.
6356
e9dae05e
RR
63572014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6358
6359 * linux-aarch64-low.c (asm/ptrace.h): Include.
6360
5876f503
JK
63612014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6362
6363 Fix TLS access for -static -pthread.
6364 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6365 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6366 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6367
802e8e6d
PA
63682014-05-20 Pedro Alves <palves@redhat.com>
6369
6370 * linux-aarch64-low.c (aarch64_insert_point)
6371 (aarch64_remove_point): No longer check whether the type is
6372 supported here. Adjust to new interface.
6373 (the_low_target): Install aarch64_supports_z_point_type as
6374 supports_z_point_type method.
6375 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6376 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6377 instead of a Z packet char. Adjust.
6378 (arm_supports_z_point_type): New function.
6379 (arm_insert_point, arm_remove_point): Adjust to new interface.
6380 (the_low_target): Install arm_supports_z_point_type.
6381 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6382 (cris_insert_point, cris_remove_point): Adjust to new interface.
6383 Don't check whether the type is supported here.
6384 (the_low_target): Install cris_supports_z_point_type.
6385 * linux-low.c (linux_supports_z_point_type): New function.
6386 (linux_insert_point, linux_remove_point): Adjust to new interface.
6387 * linux-low.h (struct linux_target_ops) <insert_point,
6388 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6389 raw_breakpoint pointer parameter.
6390 <supports_z_point_type>: New method.
6391 * linux-mips-low.c (mips_supports_z_point_type): New function.
6392 (mips_insert_point, mips_remove_point): Adjust to new interface.
6393 Use mips_supports_z_point_type.
6394 (the_low_target): Install mips_supports_z_point_type.
6395 * linux-ppc-low.c (the_low_target): Install NULL as
6396 supports_z_point_type method.
6397 * linux-s390-low.c (the_low_target): Install NULL as
6398 supports_z_point_type method.
6399 * linux-sparc-low.c (the_low_target): Install NULL as
6400 supports_z_point_type method.
6401 * linux-x86-low.c (x86_supports_z_point_type): New function.
6402 (x86_insert_point): Adjust to new insert_point interface. Use
6403 insert_memory_breakpoint. Adjust to new
6404 i386_low_insert_watchpoint interface.
6405 (x86_remove_point): Adjust to remove_point interface. Use
6406 remove_memory_breakpoint. Adjust to new
6407 i386_low_remove_watchpoint interface.
6408 (the_low_target): Install x86_supports_z_point_type.
6409 * lynx-low.c (lynx_target_ops): Install NULL as
6410 supports_z_point_type callback.
6411 * nto-low.c (nto_supports_z_point_type): New.
6412 (nto_insert_point, nto_remove_point): Adjust to new interface.
6413 (nto_target_ops): Install nto_supports_z_point_type.
6414 * mem-break.c: Adjust intro comment.
6415 (struct raw_breakpoint) <raw_type, size>: New fields.
6416 <inserted>: Update comment.
6417 <shlib_disabled>: Delete field.
6418 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6419 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6420 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6421 (raw_bkpt_type_to_target_hw_bp_type): New function.
6422 (find_enabled_raw_code_breakpoint_at): New function.
6423 (find_raw_breakpoint_at): New type and size parameters. Use them.
6424 (insert_memory_breakpoint): New function, based off
6425 set_raw_breakpoint_at.
6426 (remove_memory_breakpoint): New function.
6427 (set_raw_breakpoint_at): Reimplement.
6428 (set_breakpoint): New, based on set_breakpoint_at.
6429 (set_breakpoint_at): Reimplement.
6430 (delete_raw_breakpoint): Go through the_target->remove_point
6431 instead of assuming memory breakpoints.
6432 (find_gdb_breakpoint_at): Delete.
6433 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6434 (find_gdb_breakpoint): New function.
6435 (set_gdb_breakpoint_at): Delete.
6436 (z_type_supported): New function.
6437 (set_gdb_breakpoint_1): New function, loosely based off
6438 set_gdb_breakpoint_at.
6439 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6440 (delete_gdb_breakpoint_at): Delete.
6441 (delete_gdb_breakpoint_1): New function, loosely based off
6442 delete_gdb_breakpoint_at.
6443 (delete_gdb_breakpoint): New function.
6444 (clear_gdb_breakpoint_conditions): Rename to ...
6445 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6446 breakpoint.
6447 (add_condition_to_breakpoint): Make static.
6448 (add_breakpoint_condition): Take a struct breakpoint pointer
6449 instead of an address. Adjust.
6450 (gdb_condition_true_at_breakpoint): Rename to ...
6451 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6452 z_type parameter.
6453 (gdb_condition_true_at_breakpoint): Reimplement.
6454 (add_breakpoint_commands): Take a struct breakpoint pointer
6455 instead of an address. Adjust.
6456 (gdb_no_commands_at_breakpoint): Rename to ...
6457 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6458 parameter. Return true if no breakpoint was found. Change debug
6459 output.
6460 (gdb_no_commands_at_breakpoint): Reimplement.
6461 (run_breakpoint_commands): Rename to ...
6462 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6463 and change return type to boolean.
6464 (run_breakpoint_commands): New function.
6465 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6466 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6467 breakpoint. Go through the_target->remove_point instead of
6468 assuming memory breakpoint.
6469 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6470 software and hardware breakpoints.
6471 (reinsert_raw_breakpoint): Go through the_target->insert_point
6472 instead of assuming memory breakpoint.
6473 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6474 software and hardware breakpoints.
6475 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6476 Check both software and hardware breakpoints.
6477 (validate_inserted_breakpoint): Assert the breakpoint is a
6478 software breakpoint. Set the inserted flag to -1 instead of
6479 setting shlib_disabled.
6480 (delete_disabled_breakpoints): Adjust.
6481 (validate_breakpoints): Only validate software breakpoints.
6482 Adjust to inserted flag change.
6483 (check_mem_read, check_mem_write): Skip breakpoint types other
6484 than software breakpoints. Adjust to inserted flag change.
6485 * mem-break.h (enum raw_bkpt_type): New enum.
6486 (raw_breakpoint, struct process_info): Forward declare.
6487 (Z_packet_to_target_hw_bp_type): Delete declaration.
6488 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6489 (set_gdb_breakpoint, delete_gdb_breakpoint)
6490 (clear_breakpoint_conditions): New declarations.
6491 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6492 (breakpoint_inserted_here): Update comment.
6493 (add_breakpoint_condition, add_breakpoint_commands): Replace
6494 address parameter with a breakpoint pointer parameter.
6495 (gdb_breakpoint_here): Update comment.
6496 (delete_gdb_breakpoint_at): Delete.
6497 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6498 * server.c (process_point_options): Take a struct breakpoint
6499 pointer instead of an address. Adjust.
6500 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6501 delete_gdb_breakpoint.
6502 * spu-low.c (spu_target_ops): Install NULL as
6503 supports_z_point_type method.
6504 * target.h: Include mem-break.h.
6505 (struct target_ops) <prepare_to_access_memory>: Update comment.
6506 <supports_z_point_type>: New field.
6507 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6508 instead of a char. Also take a raw breakpoint pointer.
6509 * win32-arm-low.c (the_low_target): Install NULL as
6510 supports_z_point_type.
6511 * win32-i386-low.c (i386_supports_z_point_type): New function.
6512 (i386_insert_point, i386_remove_point): Adjust to new interface.
6513 (the_low_target): Install i386_supports_z_point_type.
6514 * win32-low.c (win32_supports_z_point_type): New function.
6515 (win32_insert_point, win32_remove_point): Adjust to new interface.
6516 (win32_target_ops): Install win32_supports_z_point_type.
6517 * win32-low.h (struct win32_target_ops):
6518 <supports_z_point_type>: New method.
6519 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6520 instead of a char. Also take a raw breakpoint pointer.
6521
932539e3
PA
65222014-05-20 Pedro Alves <palves@redhat.com>
6523
6524 * mem-break.h: Include break-common.h.
6525 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6526 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6527 (Z_packet_to_target_hw_bp_type): New declaration.
6528 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6529 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6530 (Z_PACKET_ACCESS_WP): Delete macros.
6531 (Z_packet_to_hw_type): Delete function.
6532 * i386-low.h: Don't include break-common.h here.
6533 (Z_packet_to_hw_type): Delete declaration.
6534 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6535 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6536 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6537 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6538 * linux-aarch64-low.c: Don't include break-common.h here.
6539 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6540 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6541 (Z_packet_to_target_hw_bp_type): Delete function.
6542 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6543 function.
6544 (mips_insert_point, mips_remove_point): Use
6545 Z_packet_to_target_hw_bp_type.
6546
4ff0d3d8
PA
65472014-05-20 Pedro Alves <palves@redhat.com>
6548
6549 * linux-aarch64-low.c: Include break-common.h.
6550 (enum target_point_type): Delete.
6551 (Z_packet_to_point_type): Rename to ...
6552 (Z_packet_to_target_hw_bp_type): ... this, and return a
6553 target_hw_bp_type instead.
6554 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6555 instead of an enum target_point_type.
6556 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6557 breakpoint type.
6558 (aarch64_dr_state_insert_one_point)
6559 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6560 (aarch64_handle_aligned_watchpoint)
6561 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6562 Take an enum target_hw_bp_type instead of an enum
6563 target_point_type.
6564 (aarch64_supports_z_point_type): New function.
6565 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6566 use Z_packet_to_target_hw_bp_type.
6567
786dc519
JB
65682014-05-20 Joel Brobecker <brobecker@adacore.com>
6569
6570 * configure.ac: Only use -Werror by default when DEVELOPMENT
6571 is true.
6572 * configure: Regenerate.
6573
9e0aa64f
JK
65742014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6575
6576 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6577 * linux-x86-low.c (X86_64_USER_REGS): New.
6578 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6579
2b577b92
YQ
65802014-04-28 Yao Qi <yao@codesourcery.com>
6581
6582 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6583 name.
6584
94611da2
PA
65852014-04-25 Pedro Alves <palves@redhat.com>
6586
6587 PR server/16255
6588 * linux-low.c (linux_attach_fail_reason_string): New function.
6589 (linux_attach_lwp): Delete.
6590 (linux_attach_lwp_1): Rename to ...
6591 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6592 argument. Remove "initial" parameter. Return int instead of
6593 void. Don't error or warn here.
6594 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6595 failure to attach to the tgid. Call warning when failing to
6596 attach to an lwp.
6597 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6598 argument. Remove "initial" parameter. Return int instead of
6599 void. Don't error or warn here.
6600 (linux_attach_fail_reason_string): New declaration.
6601 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6602 interface change. Use linux_attach_fail_reason_string.
6603
01f9f808
MS
66042014-04-24 Michael Sturm <michael.sturm@mintel.com>
6605 Walfred Tedeschi <walfred.tedeschi@intel.com>
6606
6607 * Makefile.in: Added rules to handle new files
6608 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6609 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6610 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6611 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6612 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6613 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6614 x32-avx512-linux.o.
6615 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6616 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6617 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6618 i386/x32-avx512.xml.
6619 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6620 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6621 i386/x32-avx512-linux.xml.
6622 * i387-fp.c (num_avx512_k_registers): New constant for number
6623 of K registers.
6624 (num_avx512_zmmh_low_registers): New constant for number of
6625 lower ZMM registers (0-15).
6626 (num_avx512_zmmh_high_registers): New constant for number of
6627 higher ZMM registers (16-31).
6628 (num_avx512_ymmh_registers): New contant for number of higher
6629 YMM registers (ymm16-31 added by avx521 on x86_64).
6630 (num_avx512_xmm_registers): New constant for number of higher
6631 XMM registers (xmm16-31 added by AVX512 on x86_64).
6632 (struct i387_xsave): Add space for AVX512 registers.
6633 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6634 Add code to handle AVX512 registers.
6635 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6636 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6637 prototypei from generated file.
6638 (tdesc_amd64_avx512_linux): Likewise.
6639 (init_registers_x32_avx512_linux): Likewise.
6640 (tdesc_x32_avx512_linux): Likewise.
6641 (init_registers_i386_avx512_linux): Likewise.
6642 (tdesc_i386_avx512_linux): Likewise.
6643 (x86_64_regmap): Add AVX512 registers.
6644 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6645 mask.
6646 (initialize_low_arch): Add code to initialize AVX512 registers.
6647
51aa91f9
PA
66482014-04-23 Pedro Alves <palves@redhat.com>
6649
6650 * mem-break.c (find_gdb_breakpoint_at): Make static.
6651 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6652
a4165e94
PA
66532014-04-23 Pedro Alves <palves@redhat.com>
6654
6655 * i386-low.c: Don't include break-common.h here.
6656 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6657 prototype to take target_hw_bp_type as argument instead of a Z
6658 packet char.
6659 * i386-low.h: Include break-common.h here.
6660 (Z_packet_to_hw_type): Declare.
6661 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6662 prototypes.
6663 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6664 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6665 (x86_remove_point): Convert the packet number to a
6666 target_hw_bp_type before calling i386_low_remove_watchpoint.
6667 * win32-i386-low.c (i386_insert_point): Convert the packet number
6668 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6669 (i386_remove_point): Convert the packet number to a
6670 target_hw_bp_type before calling i386_low_remove_watchpoint.
6671
b8acf843
PA
66722014-04-23 Pedro Alves <palves@redhat.com>
6673
6674 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6675
d708bcd1
PA
66762014-04-10 Pedro Alves <palves@redhat.com>
6677
6678 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6679 Check if the condition or command is NULL before checking if the
6680 breakpoint is known. On success, return true.
6681 * mem-break.h (add_breakpoint_condition): Document return.
6682 (add_breakpoint_commands): Add describing comment.
6683 * server.c (skip_to_semicolon): New function.
6684 (process_point_options): Use it.
6685
2eec7d5b
PA
66862014-04-09 Pedro Alves <palves@redhat.com>
6687
6688 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6689 to lwpid_of.
6690
fa96cb38
PA
66912014-02-27 Pedro Alves <palves@redhat.com>
6692
6693 PR 12702
6694 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6695 macros.
6696 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6697 output.
6698 (last_thread_of_process_p): Take a PID argument instead of a
6699 thread pointer.
6700 (linux_wait_for_lwp): Delete.
6701 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6702 functions.
6703 (linux_low_filter_event): New function, party factored out from
6704 linux_wait_for_event.
6705 (linux_wait_for_event): Rename to ...
6706 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6707 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6708 sigsuspend. Check for zombie leaders.
6709 (linux_wait_for_event): Reimplement as wrapper around
6710 linux_wait_for_event_filtered.
6711 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6712 a normal or signal exit is seen, it's the whole process exiting.
6713 (wait_for_sigstop): No longer a for_each_inferior callback.
6714 Rewrite on top of linux_wait_for_event_filtered.
6715 (stop_all_lwps): Call wait_for_sigstop directly.
6716 * server.c (resume, handle_target_event): Handle
6717 TARGET_WAITKIND_NO_RESUMED.
6718
d763de10
JB
67192014-02-26 Joel Brobecker <brobecker@adacore.com>
6720
6721 * win32-low.c (psapi_get_dll_name,
6722 * win32_CreateToolhelp32Snapshot): Delete.
6723 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6724 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6725 Delete.
6726 (handle_load_dll): Add function description.
6727 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6728
850a0f76
JB
67292014-02-26 Joel Brobecker <brobecker@adacore.com>
6730
6731 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6732 Add comment.
6733 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6734 base address when calling win32_add_one_solib.
6735 (handle_load_dll): Delete local variable load_addr.
6736 Remove 0x1000 offset applied to DLL base address when calling
6737 win32_add_one_solib.
6738 (handle_unload_dll): Add comment.
6739
f25b3fc3
JB
67402014-02-26 Joel Brobecker <brobecker@adacore.com>
6741
6742 * win32-low.c (win32_add_all_dlls): Renames
6743 win32_ensure_ntdll_loaded. Rewrite function documentation.
6744 Adjust implementation to always load all DLLs.
6745 Add 0x1000 offset to DLL base address when calling
6746 win32_add_one_solib.
6747 (child_initialization_done): New static global.
6748 (do_initial_child_stuff): Set child_initialization_done to
6749 zero during child initialization, and 1 after. Replace call
6750 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6751 Add comment.
6752 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6753 (handle_unload_dll): Add function documentation.
6754 (get_child_debug_event): Ignore load and unload DLL events
6755 during child initialization.
6756
d86d4aaf
DE
67572014-02-20 Doug Evans <dje@google.com>
6758
3bc32da3 6759 Remove global all_lwps.
d86d4aaf
DE
6760 * inferiors.h (ptid_of): Move here from linux-low.h.
6761 (pid_of, lwpid_of): Ditto.
6762 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6763 parameter is a struct thread_info * now.
6764 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6765 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6766 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6767 directly.
6768 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6769 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6770 * linux-arm-low.c (update_registers_callback): Update, "entry"
6771 parameter is a struct thread_info * now.
6772 Fetch lwpid from current_inferior directly.
6773 (arm_insert_point): Pass &all_threads to find_inferior instead of
6774 &all_lwps.
6775 (arm_remove_point): Ditto.
6776 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6777 (arm_prepare_to_resume): Fetch pid from thread.
6778 (arm_read_description): Fetch lwpid from current_inferior directly.
6779 * linux-low.c (all_lwps): Delete.
6780 (delete_lwp): Delete call to remove_inferior.
6781 (handle_extended_wait): Fetch lwpid from thread.
6782 (add_lwp): Don't set lwp->entry.id. Remove call to
6783 add_inferior_to_list.
6784 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6785 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6786 (kill_one_lwp_callback): Ditto.
6787 (linux_kill): Don't dereference NULL pointer.
6788 Fetch ptid,lwpid from thread.
6789 (get_detach_signal): Fetch ptid from thread.
6790 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6791 Simplify call to regcache_invalidate_thread.
6792 (delete_lwp_callback): Update, "entry" parameter is a
6793 struct thread_info * now. Fetch pid from thread.
6794 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6795 (status_pending_p_callback): Update, "entry" parameter is a
6796 struct thread_info * now. Fetch ptid from thread.
6797 (find_lwp_pid): Update, "entry" parameter is a
6798 struct thread_info * now.
6799 (linux_wait_for_lwp): Fetch pid from thread.
6800 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6801 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6802 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6803 (dequeue_one_deferred_signal): Ditto.
6804 (cancel_breakpoint): Fetch ptid from current_inferior.
6805 (linux_wait_for_event): Pass &all_threads to find_inferior,
6806 not &all_lwps. Fetch ptid, lwpid from thread.
6807 (count_events_callback): Update, "entry" parameter is a
6808 struct thread_info * now.
6809 (select_singlestep_lwp_callback): Ditto.
6810 (select_event_lwp_callback): Ditto.
6811 (cancel_breakpoints_callback): Ditto.
6812 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6813 not &all_lwps.
6814 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6815 (unsuspend_one_lwp): Update, "entry" parameter is a
6816 struct thread_info * now.
6817 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6818 not &all_lwps.
6819 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6820 Fetch lwpid from thread, not lwp.
6821 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6822 Pass &all_threads to find_inferior, not &all_lwps.
6823 (send_sigstop): Fetch lwpid from thread, not lwp.
6824 (send_sigstop_callback): Update, "entry" parameter is a
6825 struct thread_info * now.
6826 (suspend_and_send_sigstop_callback): Ditto.
6827 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6828 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6829 struct thread_info * now.
6830 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6831 from thread, lwp.
6832 (lwp_running): Update, "entry" parameter is a
6833 struct thread_info * now.
6834 (stop_all_lwps): Fetch ptid from thread.
6835 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6836 (linux_resume_one_lwp): Fetch lwpid from thread.
6837 (linux_set_resume_request): Update, "entry" parameter is a
6838 struct thread_info * now. Fetch pid, lwpid from thread.
6839 (resume_status_pending_p): Update, "entry" parameter is a
6840 struct thread_info * now.
6841 (need_step_over_p): Ditto. Fetch lwpid from thread.
6842 (start_step_over): Fetch lwpid from thread.
6843 (linux_resume_one_thread): Update, "entry" parameter is a
6844 struct thread_info * now. Fetch lwpid from thread.
6845 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6846 (proceed_one_lwp): Update, "entry" parameter is a
6847 struct thread_info * now. Fetch lwpid from thread.
6848 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6849 struct thread_info * now.
6850 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6851 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6852 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6853 directly.
6854 (regsets_store_inferior_registers): Ditto.
6855 (fetch_register, store_register): Ditto.
6856 (linux_read_memory, linux_write_memory): Ditto.
6857 (linux_request_interrupt): Ditto.
6858 (linux_read_auxv): Ditto.
6859 (linux_xfer_siginfo): Ditto.
6860 (linux_qxfer_spu): Ditto.
6861 (linux_qxfer_libraries_svr4): Ditto.
6862 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6863 moved to inferiors.h.
6864 (get_lwp): Delete.
6865 (get_thread_lwp): Update.
6866 (struct lwp_info): Delete member "entry". Simplify comment for
6867 member "thread".
6868 (all_lwps): Delete.
6869 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6870 current_inferior directly.
6871 (update_watch_registers_callback): Update, "entry" parameter is a
6872 struct thread_info * now. Fetch pid from thread.
6873 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6874 (mips_insert_point): Fetch lwpid from current_inferior.
6875 Pass &all_threads to find_inferior, not &all_lwps.
6876 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6877 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6878 directly.
6879 (mips_stopped_data_address): Ditto.
6880 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6881 directly.
6882 * linux-tile-low.c (tile_arch_setup): Ditto.
6883 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6884 (update_debug_registers_callback): Update, "entry" parameter is a
6885 struct thread_info * now. Fetch pid from thread.
6886 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6887 Pass &all_threads to find_inferior, not &all_lwps.
6888 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6889 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6890 Pass &all_threads to find_inferior, not &all_lwps.
6891 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6892 (i386_dr_low_get_status): Ditto.
6893 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6894 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6895 (x86_linux_read_description): Ditto.
6896 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6897
3b8361aa
DE
68982014-02-20 Doug Evans <dje@google.com>
6899
6900 * inferiors.c (get_first_inferior): Fix buglet.
6901
f7667f0d
DE
69022014-02-19 Doug Evans <dje@google.com>
6903
6904 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6905 * inferiors.c (add_thread): Change result type to struct thread_info *.
6906 All callers updated.
6907 (add_lwp): Call add_thread here instead of in callers.
6908 All callers updated.
6909 * linux-low.h (get_lwp_thread): Rewrite.
6910 (struct lwp_info): New member "thread".
6911
b3312d80
DE
69122014-02-19 Doug Evans <dje@google.com>
6913
6914 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6915 All callers updated.
6916
ecc6f45c
DE
69172014-02-19 Doug Evans <dje@google.com>
6918
6919 * inferiors.c (add_thread): Fix whitespace.
6920
649ebbca
DE
69212014-02-19 Doug Evans <dje@google.com>
6922
6923 * dll.c (clear_dlls): Replace accessing list implemention details
6924 with API function.
6925 * gdbthread.h (get_first_thread): Declare.
6926 * inferiors.c (for_each_inferior_with_data): New function.
6927 (get_first_thread): New function.
6928 (find_thread_ptid): Simplify.
6929 (get_first_inferior): New function.
6930 (clear_list): Delete.
6931 (one_inferior_p): New function.
6932 (clear_inferior_list): New function.
6933 (clear_inferiors): Update.
6934 * inferiors.h (for_each_inferior_with_data): Declare.
6935 (clear_inferior_list): Declare.
6936 (one_inferior_p): Declare.
6937 (get_first_inferior): Declare.
6938 * linux-low.c (linux_wait_for_event): Replace accessing list
6939 implemention details with API function.
6940 * server.c (target_running): Ditto.
6941 (accumulate_file_name_length): New function.
6942 (emit_dll_description): New function.
6943 (handle_qxfer_libraries): Replace accessing list implemention
6944 details with API function.
6945 (handle_qxfer_threads_worker): New function.
6946 (handle_qxfer_threads_proper): Replace accessing list implemention
6947 details with API function.
6948 (handle_query): Ditto.
6949 (visit_actioned_threads_callback_ftype): New typedef.
6950 (visit_actioned_threads_data): New struct.
6951 (visit_actioned_threads): Rewrite to be find_inferior callback.
6952 (resume): Call find_inferior.
6953 (handle_status): Replace accessing list implemention
6954 details with API function.
6955 (process_serial_event): Replace accessing list implemention details
6956 with API function.
6957 * target.c (set_desired_inferior): Replace accessing list implemention
6958 details with API function.
6959 * tracepoint.c (same_process_p): New function.
6960 (gdb_agent_about_to_close): Replace accessing list implemention
6961 details with API function.
6962 * win32-low.c (child_delete_thread): Replace accessing list
6963 implemention details with API function.
6964 (match_dll_by_basename): New function.
6965 (dll_is_loaded_by_basename): New function.
6966 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6967 details call to dll_is_loaded_by_basename.
6968
80894984
DE
69692014-02-19 Doug Evans <dje@google.com>
6970
6971 * dll.h (struct dll_info): Add comment.
6972 * gdbthread.h (struct thread_info): Add comment.
6973 (current_ptid): Simplify.
6974 * inferiors.c (add_process): Update.
6975 (remove_process): Update.
6976 * inferiors.h (struct process_info): Rename member "head" to "entry".
6977 * linux-low.c (delete_lwp): Update.
6978 (add_lwp): Update.
6979 (last_thread_of_process_p): Update.
6980 (kill_one_lwp_callback, linux_kill): Update.
6981 (status_pending_p_callback): Update.
6982 (wait_for_sigstop): Update. Simplify read of ptid.
6983 (start_step_over): Update.
6984 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6985 (get_lwp_thread): Update.
6986 (struct lwp_info): Rename member "head" to "entry".
6987 * regcache.h (inferior_list_entry): Delete.
6988 * server.c (kill_inferior_callback): Update.
6989 (detach_or_kill_inferior_callback): Update.
6990 (print_started_pid): Update.
6991 (print_attached_pid): Update.
6992 (process_serial_event): Simplify read of ptid.
6993 * thread-db.c (thread_db_create_event): Update.
6994 (thread_db_get_tls_address): Update.
6995 * win32-low.c (current_inferior_ptid): Simplify.
6996
46917d26
TT
69972014-02-19 Tom Tromey <tromey@redhat.com>
6998
6999 * target.h (struct target_ops) <supports_btrace>: Add target_ops
7000 argument.
7001 (target_supports_btrace): Update.
7002
0759a81e
YQ
70032014-02-14 Yao Qi <yao@codesourcery.com>
7004
7005 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7006 (rsp-low-ipa.o): New target.
7007
a7191e8b
TT
70082014-02-12 Tom Tromey <tromey@redhat.com>
7009
7010 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7011 convert_ascii_to_int.
7012 * regcache.c (registers_to_string): Likewise.
7013 * remote-utils.c (decode_M_packet): Likewise.
7014 * server.c (process_serial_event): Likewise.
7015
ff0e980e
TT
70162014-02-12 Tom Tromey <tromey@redhat.com>
7017
7018 * server.c (handle_query, handle_v_run): Use hex2bin, not
7019 unhexify.
7020 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7021
e9371aff
TT
70222014-02-12 Tom Tromey <tromey@redhat.com>
7023
7024 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7025 convert_int_to_ascii.
7026 * regcache.c (registers_to_string, collect_register_as_string):
7027 Likewise.
7028 * remote-utils.c (look_up_one_symbol, relocate_instruction):
7029 Likewise.
7030 * server.c (process_serial_event): Likewise.
7031 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7032 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7033
971dc0b8
TT
70342014-02-12 Tom Tromey <tromey@redhat.com>
7035
7036 * remote-utils.c (look_up_one_symbol, monitor_output): Use
7037 bin2hex, not hexify.
7038 * tracepoint.c (cmd_qtstatus): Likewise.
7039
0a822afb
TT
70402014-02-12 Tom Tromey <tromey@redhat.com>
7041
7042 * remote-utils.c (monitor_output): Pass explicit length to
7043 hexify.
7044
9c3d6531
TT
70452014-02-12 Tom Tromey <tromey@redhat.com>
7046
7047 * tracepoint.c: Include rsp-low.h.
7048 * server.c: Include rsp-low.h.
7049 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7050 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7051 declare.
7052 * remote-utils.c: Include rsp-low.h.
7053 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7054 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7055 (convert_int_to_ascii, convert_ascii_to_int): Move to
7056 common/rsp-low.c.
7057 * regcache.c: Include rsp-low.h.
7058 * ax.c: Include rsp-low.h.
7059 * Makefile.in (SFILES): Add common/rsp-low.c.
7060 (OBS): Add rsp-low.o.
7061 (rsp-low.o): New target.
7062
01fd3ea5
TT
70632014-02-12 Tom Tromey <tromey@redhat.com>
7064
7065 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7066 Include print-utils.h.
7067 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7068 (plongest, thirty_two, phex_nz): Remove.
7069 * Makefile.in (SFILES): Add common/print-utils.c.
7070 (OBS): Add print-utils.o.
7071 (print-utils-ipa.o): New target.
7072 (print-utils.o): New target.
7073 (IPA_OBJS): Add print-utils-ipa.o.
7074
e99dc820
TT
70752014-02-06 Tom Tromey <tromey@redhat.com>
7076
7077 * Makefile.in (SFILES): Fix indentation.
7078
ee1e2d4f
DE
70792014-02-05 Doug Evans <dje@google.com>
7080
7081 * linux-low.c (linux_wait_for_event): Improve comment.
7082 (linux_wait_1): Keep current_inferior in sync with event_child.
7083
f5a02773
DE
70842014-01-22 Doug Evans <dje@google.com>
7085
7086 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7087
87ce2a04
DE
70882014-01-22 Doug Evans <dje@google.com>
7089
7090 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7091 * configure: Regenerate.
7092 * config.in: Regenerate.
7093 * Makefile.in (SFILES): Add debug.c.
7094 (OBS): Add debug.o.
7095 * debug.c: New file.
7096 * debug.h: New file.
7097 * linux-aarch64-low.c (*): Update all debugging printfs to use
7098 debug_printf instead of fprintf.
7099 * linux-arm-low.c (*): Ditto.
7100 * linux-cris-low.c (*): Ditto.
7101 * linux-crisv32-low.c (*): Ditto.
7102 * linux-m32r-low.c (*): Ditto.
7103 * linux-sparc-low.c (*): Ditto.
7104 * linux-x86.c (*): Ditto.
7105 * linux-low.c (*): Ditto.
7106 (linux_wait_1): Add calls to debug_enter, debug_exit.
7107 (linux_wait): Remove redundant debugging printf.
7108 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7109 (linux_resume, unstop_all_lwps): Ditto.
7110 * mem-break.c (*): Update all debugging printfs to use
7111 debug_printf instead of fprintf.
7112 * remote-utils.c (*): Ditto.
7113 * thread-db.c (*): Ditto.
7114 * server.c #include <ctype.h>, "gdb_vecs.h".
7115 (debug_threads): Moved to debug.c.
7116 (*): Update all debugging printfs to use debug_printf instead of
7117 fprintf.
7118 (start_inferior): Replace call to fflush with call to debug_flush.
7119 (monitor_show_help): Mention set debug-format.
7120 (parse_debug_format_options): New function.
7121 (handle_monitor_command): Handle "monitor set debug-format".
7122 (gdbserver_usage): Mention --debug-format.
7123 (main): Parse --debug-format.
7124 * server.h (debug_threads): Declaration moved to debug.h.
7125 #include "debug.h".
7126 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7127 trace_debug_1 that uses debug_printf.
7128 (tracepoint_look_up_symbols): Update all debugging printfs to use
7129 debug_printf instead of fprintf.
7130
e671835b
BS
71312014-01-20 Baruch Siach <baruch@tkos.co.il>
7132
7133 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7134 sys/ptrace.h.
7135
b5737fa9
PA
71362014-01-17 Pedro Alves <palves@redhat.com>
7137
ea38d2a9 7138 PR build/16445
c7faa97a
PA
7139 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7140 defined after including gdb_proc_service.h.
b5737fa9 7141
40ed484e
DE
71422014-01-16 Doug Evans <dje@google.com>
7143
7144 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7145 (match_dll): Use it.
7146
969c39fb
MM
71472014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7148
7149 * target.h (target_ops) <read_btrace>: Change parameters and
7150 return type to allow error reporting.
7151 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7152 trace reading errors on.
7153 * linux-low.c (linux_low_read_btrace): Pass trace reading
7154 errors on.
7155 (linux_low_disable_btrace): New.
7156
ab7f45ba
DE
71572014-01-15 Doug Evans <dje@google.com>
7158
7159 * inferiors.c (thread_id_to_gdb_id): Delete.
7160 * inferiors.h (thread_id_to_gdb_id): Delete.
7161
66af0f44
EZ
71622014-01-13 Eli Zaretskii <eliz@gnu.org>
7163
7164 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7165 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7166 versions.
7167
9939e131
PA
71682014-01-08 Pedro Alves <palves@redhat.com>
7169
7170 * server.c (handle_status): Don't discard previous queued stop
7171 replies or thread's pending status here.
7172 (main) <disconnection>: Do it here instead.
7173
b7ea362b
PA
71742014-01-08 Pedro Alves <palves@redhat.com>
7175
7176 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7177 * server.c (visit_actioned_threads, handle_pending_status): New
7178 function.
7179 (handle_v_cont): Factor out parts to ...
7180 (resume): ... this new function. If in all-stop, and a thread
7181 being resumed has a pending status, report it without actually
7182 resuming.
7183 (myresume): Adjust to use the new 'resume' function.
7184 (clear_pending_status_callback, set_pending_status_callback)
7185 (find_status_pending_thread_callback): New functions.
7186 (handle_status): Handle the case of multiple threads having
7187 interesting statuses to report. Report threads' real last signal
7188 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7189 with an interesting thread to report the status for, instead of
7190 always reporting the status of the first thread.
7191
28498c42
JB
71922014-01-01 Joel Brobecker <brobecker@adacore.com>
7193
7194 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7195 * gdbreplay.c (gdbreplay_version): Likewise.
7196
f45c82da
YZ
71972013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7198
7199 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7200 iov.iov_len with the real length in use.
7201
379a5e2d
JB
72022013-12-13 Joel Brobecker <brobecker@adacore.com>
7203
7204 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7205 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7206 for all targets that use win32-low.c.
7207 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7208 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7209
4210d83e
PA
72102013-12-13 Pedro Alves <palves@redhat.com>
7211
7212 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7213 if equal to TARGET_WAITKIND_LOADED.
7214 * win32-low.c (cached_status): New static global.
7215 (win32_wait): Add declaration.
7216 (do_initial_child_stuff): Flush all initial pending debug events
7217 up to the initial breakpoint.
7218 (win32_wait): If CACHED_STATUS was set, return that instead
7219 of doing a real wait. Remove the code resuming the execution
7220 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7221 during the initial phase. Also remove the code changing
7222 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7223 TARGET_WAITKIND_STOPPED.
7224
e7f0d979
YQ
72252013-12-11 Yao Qi <yao@codesourcery.com>
7226
7227 * notif.c (handle_notif_ack): Return 0 if no notification
7228 matches.
7229
ebcf782c
DE
72302013-11-20 Doug Evans <dje@google.com>
7231
7232 * linux-low.c (linux_set_resume_request): Fix comment.
7233
20ad9378
DE
72342013-11-20 Doug Evans <dje@google.com>
7235
7236 * linux-low.c (resume_status_pending_p): Tweak comment.
7237
a196ebeb
WT
72382013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7239
7240 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7241 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7242 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7243 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7244 (srv_amd64_regobj): Add amd64-mpx.o.
7245 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7246 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7247 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7248 * i387-fp.c (num_pl_bnd_register) Added constant.
7249 (num_pl_bnd_cfg_registers) Added constant.
7250 (struct i387_xsave) Added reserved area and MPX fields.
7251 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7252 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7253 function.
7254 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7255 (init_registers_amd64_mpx_linux): Declare new function.
7256 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7257 (x86_64_regmap): Add MPX registers.
7258 (x86_linux_read_description): Add MPX case.
7259 (initialize_low_arch): Initialize MPX targets.
7260
0080a2f6
TT
72612013-11-18 Tom Tromey <tromey@redhat.com>
7262
7263 * configure: Rebuild.
7264 * configure.ac: Don't check for stdlib.h.
7265 * gdbreplay.c: Unconditionally include stdlib.h.
7266
2978b111
TT
72672013-11-18 Tom Tromey <tromey@redhat.com>
7268
7269 * config.in: Rebuild.
7270 * configure: Rebuild.
7271 * configure.ac: Don't use AC_HEADER_DIRENT.
7272
a3d08894
TT
72732013-11-18 Tom Tromey <tromey@redhat.com>
7274
7275 * server.h: Don't check HAVE_STRING_H.
7276 * gdbreplay.c: Don't check HAVE_STRING_H.
7277 * configure: Rebuild.
7278
0a5dd17d
TT
72792013-11-18 Tom Tromey <tromey@redhat.com>
7280
7281 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7282 LIBGNU.
7283
1bd2f0ba
TT
72842013-11-08 Tom Tromey <tromey@redhat.com>
7285
7286 * configure, config.in: Rebuild.
7287 * configure.ac: Remove unused configury.
7288
3266f10b
TT
72892013-11-08 Tom Tromey <tromey@redhat.com>
7290
7291 * acinclude.m4: Include common.m4, codeset.m4.
7292 * configure, config.in: Rebuild.
7293 * configure.ac: Use GDB_AC_COMMON.
7294
6682d959
AA
72952013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7296
7297 * linux-s390-low.c (HWCAP_S390_TE): New define.
7298 (s390_arch_setup): Consider the TE field in the HWCAP for
7299 determining 'have_regset_tdb'.
7300
fd0a4d76
SDJ
73012013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7302
7303 PR gdb/16014
7304 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7305 call to sizeof.
7306
1a3d890b
PA
73072013-10-02 Pedro Alves <palves@redhat.com>
7308
7309 * server.c (process_serial_event): Don't output "GDBserver
7310 exiting" if GDB is connected through stdio.
7311 * target.c (mywait): Likewise, be silent if GDB is connected
7312 through stdio.
7313
97ad4581
JB
73142013-10-01 Joel Brobecker <brobecker@adacore.com>
7315
7316 * lynx-low.c (lynx_add_threads_after_attach): New function.
7317 (lynx_attach): Remove call to add_thread. Add call to
7318 lynx_add_threads_after_attach instead.
7319
5b4e221c
MF
73202013-09-28 Mike Frysinger <vapier@gentoo.org>
7321
7322 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7323 * config.in, configure: Regenerated.
7324
ee47b2f8
YQ
73252013-09-18 Yao Qi <yao@codesourcery.com>
7326
7327 PR server/15959
7328 * server.c (start_inferior): Clear 'resume_info'.
7329
d6707650 73302013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7331
d6707650
JW
7332 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7333 for each register.
7334
9243dd0e 73352013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7336
9243dd0e
JW
7337 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7338 linux-tile-low.o to srv_tgtobj.
7339
c623a6ef
WN
73402013-09-16 Will Newton <will.newton@linaro.org>
7341
7342 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7343 out regs.
7344
fb71d39e
PA
73452013-09-06 Pedro Alves <palves@redhat.com>
7346
7347 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7348 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7349 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7350 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7351 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7352 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7353
8e7e9910
PA
73542013-09-06 Pedro Alves <palves@redhat.com>
7355
7356 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7357 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7358
7c3a12ca
PA
73592013-09-06 Pedro Alves <palves@redhat.com>
7360
7361 * linux-amd64-ipa.c: Include tracepoint.h.
7362 * linux-i386-ipa.c: Include tracepoint.h.
7363
8eb3d7b6
RW
73642013-09-06 Ricard Wanderlof <ricardw@axis.com>
7365
7366 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7367 (ps_get_thread_area): New function.
7368
eddddb9d
RW
73692013-09-06 Ricard Wanderlof <ricardw@axis.com>
7370
7371 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7372 (initialize_low_arch): Call init_registers_crisv32 rather than
7373 init_register_crisv32.
7374
533b0600
PA
73752013-09-05 Pedro Alves <palves@redhat.com>
7376
7377 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7378 to ...
7379 * hostio.h: ... this new file.
7380 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7381 win32-low.c: Include hostio.h.
7382
0ce3d3b5
PA
73832013-09-05 Pedro Alves <palves@redhat.com>
7384
7385 * server.h (gdb_client_data, handler_func, callback_handler_func)
7386 (delete_file_handler, add_file_handler, append_callback_event)
7387 (delete_callback_event, start_event_loop, initialize_event_loop):
7388 Move to event-loop.h and include it.
7389 * event-loop.h: New file.
7390
799cdc37
PA
73912013-09-05 Pedro Alves <palves@redhat.com>
7392
7393 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7394 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7395 (loaded_dll, unloaded_dll): Move to ...
7396 * dll.h: ... this new file.
7397 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7398
6a6bbd9d
PA
73992013-09-05 Pedro Alves <palves@redhat.com>
7400
7401 * server.h (current_process, get_thread_process, all_processes)
7402 (add_inferior_to_list, for_each_inferior, current_inferior)
7403 (remove_inferior, add_process, remove_process, find_process_pid)
7404 (have_started_inferiors_p, have_attached_inferiors_p)
7405 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7406 (clear_inferiors, find_inferior, find_inferior_id)
7407 (inferior_target_data, set_inferior_target_data)
7408 (inferior_regcache_data, set_inferior_regcache_data): Move to
7409 inferiors.h, and include it.
7410 * inferiors.h: New file.
7411
f699aaba
PA
74122013-09-05 Pedro Alves <palves@redhat.com>
7413
7414 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7415 Move ...
72f4393d 7416 * ax.h: ... here.
f699aaba 7417
c144c7a0
PA
74182013-09-05 Pedro Alves <palves@redhat.com>
7419
7420 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7421 tracepoint.h.
7422 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7423 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7424 (handle_tracepoint_general_set, handle_tracepoint_query)
7425 (tracepoint_finished_step, tracepoint_was_hit)
7426 (release_while_stepping_state_list, current_traceframe)
7427 (in_readonly_region, traceframe_read_mem)
7428 (fetch_traceframe_registers, traceframe_read_sdata)
7429 (traceframe_read_info, struct fast_tpoint_collect_status)
7430 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7431 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7432 (supply_fast_tracepoint_registers)
7433 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7434 (ipa_tdesc, claim_trampoline_space)
7435 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7436 (agent_mem_read, agent_get_trace_state_variable_value)
7437 (agent_set_trace_state_variable_value, agent_tsv_read)
7438 (agent_mem_read_string, get_raw_reg_func_addr)
7439 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7440 * tracepoint.h: ... this new file.
7441
ff42e6ab
PA
74422013-09-05 Pedro Alves <palves@redhat.com>
7443
7444 * server.h (perror_with_name, error, fatal, warning, paddress)
7445 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7446 include it.
7447 * utils.h: New file.
7448
541af0f4
PA
74492013-09-05 Pedro Alves <palves@redhat.com>
7450
7451 * server.h (remote_debug, noack_mode, transport_is_reliable)
7452 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7453 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7454 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7455 (write_enn, initialize_async_io, enable_async_io)
7456 (disable_async_io, check_remote_input_interrupt_request)
7457 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7458 (dead_thread_notify, prepare_resume_reply)
7459 (decode_address_to_semicolon, decode_address, decode_m_packet)
7460 (decode_M_packet, decode_X_packet, decode_xfer_write)
7461 (decode_search_memory_packet, unhexify, hexify)
7462 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7463 (look_up_one_symbol, relocate_instruction)
7464 (monitor_output): Move to remote-utils.h, and include it.
7465 * remote-utils.h: New file.
7466
eebdf26b
PA
74672013-09-05 Pedro Alves <palves@redhat.com>
7468
7469 * server.h (_): Delete.
7470
3aafd2ff
PA
74712013-09-02 Pedro Alves <palves@redhat.com>
7472
7473 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7474 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7475 allocated.
7476 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7477
cee83bcb
PM
74782013-09-02 Pierre Muller <muller@sourceware.org>
7479
7480 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7481 or WriteProcessMemory complete successfully and handle
7482 ERROR_PARTIAL_COPY error.
7483
9a13b2fa
PA
74842013-09-02 Pedro Alves <palves@redhat.com>
7485
7486 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7487 error instead of EIO.
7488
602e3198
JK
74892013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7490
7491 PR server/15604
7492 * linux-low.c: Include filestuff.h.
7493 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7494 * lynx-low.c: Include filestuff.h.
7495 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7496 * server.c: Include filestuff.h.
7497 (main): Call notice_open_fds.
7498 * spu-low.c: Include filestuff.h.
7499 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7500
96d7229d
LM
75012013-08-22 Luis Machado <lgustavo@codesourcery.com>
7502
7503 * Makefile.in: Explain why ../target and ../nat are not
7504 listed as include file search paths.
7505 (linux-waitpid.o): New object file rule.
7506 * configure.srv (srv_native_linux_obj): New variable.
7507 Replace all occurrences of linux native object files with
7508 $srv_native_linux_obj.
7509 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7510 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7511 (linux_enable_event_reporting): Remove declaration.
7512 (my_waitpid): Moved to common/linux-waitpid.c.
7513 (linux_wait_for_event): Pass ptid when calling
7514 linux_enable_event_reporting.
7515 (linux_supports_tracefork_flag): Remove.
7516 (linux_enable_event_reporting): Likewise.
7517 (linux_tracefork_grandchild): Remove.
7518 (STACK_SIZE): Moved to common/linux-ptrace.c.
7519 (linux_tracefork_child): Remove.
7520 (linux_test_for_tracefork): Remove.
7521 (linux_look_up_symbols): Call linux_supports_traceclone.
7522 (initialize_low): Remove call to linux_test_for_tracefork.
7523 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7524 common/linux-ptrace.h.
7525 (PTRACE_TYPE_ARG4): Likewise.
7526 Include linux-ptrace.h.
7527
32940073
PA
75282013-08-21 Pedro Alves <palves@redhat.com>
7529
7530 * config.in: Renegerate.
7531
33b60d58 75322013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7533
33b60d58
LM
7534 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7535 (SFILES): Remove $(srcdir)/common/target-common.c and
7536 add $(srcdir)/target/waitstatus.c.
7537 (OBS): Remove target-common.o and add waitstatus.o.
7538 (server_h): Remove $(srcdir)/../common/target-common.h and
7539 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7540 and $(srcdir)/../target/waitstatus.h.
7541 (target-common.o): Remove.
7542 (waitstatus.o): New target object file.
7543 * target.h: Do not include target-common.h and
7544 include target/resume.h, target/wait.h and
7545 target/waitstatus.h.
7546
b8e1b30e
LM
75472013-08-13 Luis Machado <lgustavo@codesourcery.com>
7548
7549 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7550 to PTRACE_TYPE_ARG3.
7551 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7552 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7553 PTRACE_TYPE_ARG4.
7554 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7555 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7556
7a60ad40
YQ
75572013-07-27 Jie Zhang <jie@codesourcery.com>
7558 Daniel Jacobowitz <dan@codesourcery.com>
7559 Yao Qi <yao@codesourcery.com>
7560
7561 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7562 (mips-linux-watch.o): New rule.
7563 (mips_linux_watch_h): New variable.
7564 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7565 srv_tgtobj.
7566 * linux-mips-low.c: Include mips-linux-watch.h.
7567 (struct arch_process_info, struct arch_lwp_info): New.
7568 (update_watch_registers_callback): New function.
7569 (mips_linux_new_process, mips_linux_new_thread) New functions.
7570 (mips_linux_prepare_to_resume, mips_insert_point): New
7571 functions.
7572 (mips_remove_point, mips_stopped_by_watchpoint): New
7573 functions.
7574 (rsp_bp_type_to_target_hw_bp_type): New function.
7575 (mips_stopped_data_address): New function.
7576 (the_low_target): Add watchpoint support functions.
7577
de6f69ad
YQ
75782013-07-27 Yao Qi <yao@codesourcery.com>
7579
7580 * i386-low.c: Include break-common.h.
7581 (enum target_hw_bp_type): Remove.
7582
3360c0bf
LM
75832013-07-24 Luis Machado <lgustavo@codesourcery.com>
7584
7585 * Makefile.in (SFILES): /common/target-common.c.
7586 (OBS): Add target-common.o.
7587 (server_h): Add $(srcdir)/../common/target-common.h.
7588 (target-common.o): New target.
7589 * server.c (queue_stop_reply_callback): Free
7590 status string after use.
7591 * target.c (target_waitstatus_to_string): Remove.
7592 * target.h: Include target-common.h.
7593 (resume_kind): Likewise.
7594 (target_waitkind): Likewise.
7595 (target_waitstatus): Likewise.
7596 (TARGET_WNOHANG): Likewise.
7597
bd885420
YQ
75982013-07-04 Yao Qi <yao@codesourcery.com>
7599
7600 * Makefile.in (host_alias): Use @host_noncanonical@.
7601 (target_alias): Use @target_noncanonical@.
7602 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7603 ACX_NONCANONICAL_HOST.
7604 * configure: Regenerated.
7605
7606 Revert:
7607 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7608
7609 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7610 * configure: Rebuild.
7611 * Makefile.in (version_host, version_target): Get from configure.
7612 (version.c): Use $(version_host) and $(version_target).
7613
17ef446e
PA
76142013-07-03 Pedro Alves <palves@redhat.com>
7615
7616 * Makefile.in (config.status): Depend on development.sh.
7617 * acinclude.m4: Include libmcheck.m4.
7618 * configure: Regenerate.
7619
7a9a7487
MG
76202013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7621
7622 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7623 attribute inside the parentheses.
7624 (winapi_DebugSetProcessKillOnExit): Ditto.
7625 (winapi_DebugBreakProcess): Ditto.
7626 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7627
49b64de6
MG
76282013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7629
7630 * notif.h (notif_event): Add a dummy member to avoid compiler
7631 errors.
7632
d5749ee7
PA
76332013-07-01 Pedro Alves <palves@redhat.com>
7634
7635 * hostio.c (HOSTIO_PATH_MAX): Define.
7636 (require_filename, handle_open, handle_unlink, handle_readlink):
7637 Use it.
7638
d8d2a3ee
PA
76392013-07-01 Pedro Alves <palves@redhat.com>
7640
7641 * server.h: Include "pathmax.h".
7642 * linux-low.c: Don't include sys/param.h.
7643 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7644 MAXPATHLEN.
7645 * win32-low.c: Don't include sys/param.h.
7646 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7647
bc7dea8d
PA
76482013-07-01 Pedro Alves <palves@redhat.com>
7649
7650 * event-loop.c: Don't check HAVE_UNISTD_H before including
7651 <unistd.h>.
7652 * gdbreplay.c: Likewise.
7653 * remote-utils.c: Likewise.
7654 * server.c: Likewise.
7655 * configure.ac: Don't check for unistd.h.
7656 * configure: Regenerate.
7657
d6c2da54
TT
76582013-06-28 Tom Tromey <tromey@redhat.com>
7659
7660 * Makefile.in (version.c): Use version.in, not
7661 common/version.in.
7662
257b6bec
MG
76632013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7664
7665 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7666 * configure: Rebuild.
7667 * Makefile.in (version_host, version_target): Get from configure.
7668 (version.c): Use $(version_host) and $(version_target).
7669
86ebe149
DK
76702013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7671
7672 Fix trace-status to output user name without trailing colon.
7673 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7674
f30aa5af
DK
76752013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7676
7677 Fix trace-status to output proper start-time and stop-time.
7678 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7679 output start time and stop time in hex as gdb expects.
7680
28a93511
YQ
76812013-06-26 Pedro Alves <pedro@codesourcery.com>
7682
7683 * tracepoint.c (build_traceframe_info_xml): Output trace state
7684 variables present in the trace buffer.
7685
01208463
TT
76862013-06-24 Tom Tromey <tromey@redhat.com>
7687
7688 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7689 create-version.sh.
7690 (version.o): Remove.
7691 * gdbreplay.c: Include version.h.
7692 (version, host_name): Don't declare.
7693 * server.h: Include version.h.
7694 (version, host_name): Don't declare.
7695
760256f9
PA
76962013-06-12 Pedro Alves <palves@redhat.com>
7697
7698 * linux-x86-low.c (linux_is_elf64): Delete global.
7699 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7700 with local linux_pid_exe_is_elf_64_file use.
7701
030031ee
PA
77022013-06-11 Pedro Alves <palves@redhat.com>
7703
7704 * linux-low.c (regset_disabled, disable_regset): New functions.
7705 (regsets_fetch_inferior_registers)
7706 (regsets_store_inferior_registers): Use them.
7707 (initialize_regsets_info); Don't allocate the disabled_regsets
7708 array here.
7709 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7710 comment.
7711
5da6eb0a
PA
77122013-06-11 Pedro Alves <palves@redhat.com>
7713
7714 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7715 xmalloc.
7716
7e5aaa09
PA
77172013-06-11 Pedro Alves <palves@redhat.com>
7718
7719 * linux-x86-low.c (initialize_low_arch): Call
7720 init_registers_x32_avx_linux.
7721
d878444c
JK
77222013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7723
7724 Fix compatibility with Android Bionic.
7725 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7726 it is not empty.
7727
3aee8918
PA
77282013-06-07 Pedro Alves <palves@redhat.com>
7729
5f2b57b5 7730 PR server/14823
3aee8918
PA
7731 * Makefile.in (OBS): Add tdesc.o.
7732 (IPA_OBJS): Add tdesc-ipa.o.
7733 (tdesc-ipa.o): New rule.
7734 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7735 interface.
7736 * linux-low.c (new_inferior): Delete.
7737 (disabled_regsets, num_regsets): Delete.
7738 (linux_add_process): Adjust to set the new per-process
7739 new_inferior flag.
7740 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7741 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7742 was a stop. When calling arch_setup, switch the current inferior
7743 to the thread that got an event.
7744 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7745 (regsets_fetch_inferior_registers)
7746 (regsets_store_inferior_registers): New regsets_info parameter.
7747 Adjust to use it.
7748 (linux_register_in_regsets): New regs_info parameter. Adjust to
7749 use it.
7750 (register_addr, fetch_register, store_register): New usrregs_info
7751 parameter. Adjust to use it.
7752 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7753 parameter regs_info. Adjust to use it.
7754 (linux_fetch_registers): Get the current inferior's regs_info, and
7755 adjust to use it.
7756 (linux_store_registers): Ditto.
7757 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7758 (initialize_low): Don't initialize the target_regsets here. Call
7759 initialize_low_arch.
7760 * linux-low.h (target_regsets): Delete declaration.
7761 (struct regsets_info): New.
7762 (struct usrregs_info): New.
7763 (struct regs_info): New.
7764 (struct process_info_private) <new_inferior>: New field.
7765 (struct linux_target_ops): Delete the num_regs, regmap, and
7766 regset_bitmap fields. New field regs_info.
7767 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7768 * i387-fp.c (num_xmm_registers): Delete.
7769 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7770 calls to new interface.
7771 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7772 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7773 Infer the number of xmm registers from the regcache's target
7774 description.
7775 * i387-fp.h (num_xmm_registers): Delete.
7776 * inferiors.c (add_thread): Don't install the thread's regcache
7777 here.
7778 * proc-service.c (gregset_info): Fetch the current inferior's
7779 regs_info. Adjust to use it.
7780 * regcache.c: Include tdesc.h.
7781 (register_bytes, reg_defs, num_registers)
7782 (gdbserver_expedite_regs): Delete.
7783 (get_thread_regcache): If the thread doesn't have a regcache yet,
7784 create one, instead of aborting gdbserver.
7785 (regcache_invalidate_one): Rename to ...
7786 (regcache_invalidate_thread): ... this.
7787 (regcache_invalidate_one): New.
7788 (regcache_invalidate): Only invalidate registers of the current
7789 process.
7790 (init_register_cache): Add target_desc parameter, and use it.
7791 (new_register_cache): Ditto. Assert the target description has a
7792 non zero registers_size.
7793 (regcache_cpy): Add assertions. Adjust.
7794 (realloc_register_cache, set_register_cache): Delete.
7795 (registers_to_string, registers_from_string): Adjust.
7796 (find_register_by_name, find_regno, find_register_by_number)
7797 (register_cache_size): Add target_desc parameter, and use it.
7798 (free_register_cache_thread, free_register_cache_thread_one)
7799 (regcache_release, register_cache_size): New.
7800 (register_size): Add target_desc parameter, and use it.
7801 (register_data, supply_register, supply_register_zeroed)
7802 (supply_regblock, supply_register_by_name, collect_register)
7803 (collect_register_as_string, collect_register_by_name): Adjust.
7804 * regcache.h (struct target_desc): Forward declare.
7805 (struct regcache) <tdesc>: New field.
7806 (init_register_cache, new_register_cache): Add target_desc
7807 parameter.
7808 (regcache_invalidate_thread): Declare.
7809 (regcache_invalidate_one): Delete declaration.
7810 (regcache_release): Declare.
7811 (find_register_by_number, register_cache_size, register_size)
7812 (find_regno): Add target_desc parameter.
7813 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7814 declarations.
7815 * remote-utils.c: Include tdesc.h.
7816 (outreg, prepare_resume_reply): Adjust.
7817 * server.c: Include tdesc.h.
7818 (gdbserver_xmltarget): Delete declaration.
7819 (get_features_xml, process_serial_event): Adjust.
7820 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7821 declare.
7822 (struct process_info) <tdesc>: New field.
7823 (ipa_tdesc): Declare.
7824 * tdesc.c: New file.
7825 * tdesc.h: New file.
7826 * tracepoint.c: Include tdesc.h.
7827 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7828 (get_context_regcache): Adjust to pass ipa_tdesc down.
7829 (do_action_at_tracepoint): Adjust to get the register cache size
7830 from the context regcache's description.
7831 (traceframe_walk_blocks): Adjust to get the register cache size
7832 from the current trace frame's description.
7833 (traceframe_get_pc): Adjust to get current trace frame's
7834 description and pass it down.
7835 (gdb_collect): Adjust to get the register cache size from the
7836 IPA's description.
7837 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7838 (gdbserver_xmltarget): Delete.
7839 (initialize_low_tracepoint): Set the ipa's target description.
7840 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7841 (initialize_low_tracepoint): Set the ipa's target description.
7842 * linux-x86-low.c: Include tdesc.h.
7843 [__x86_64__] (is_64bit_tdesc): New.
7844 (ps_get_thread_area, x86_get_thread_area): Use it.
7845 (i386_cannot_store_register): Rename to ...
7846 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7847 (i386_cannot_fetch_register): Rename to ...
7848 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7849 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7850 to new interface.
7851 (target_regsets): Rename to ...
7852 (x86_regsets): ... this.
7853 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7854 interface.
7855 (x86_siginfo_fixup): Use is_64bit_tdesc.
7856 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7857 (tdesc_x32_avx_linux, tdesc_x32_linux)
7858 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7859 Declare.
7860 (x86_linux_update_xmltarget): Delete.
7861 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7862 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7863 (AMD64_LINUX_USER64_CS): New.
7864 (x86_linux_read_description): New, based on
7865 x86_linux_update_xmltarget.
7866 (same_process_callback): New.
7867 (x86_arch_setup_process_callback): New.
7868 (x86_linux_update_xmltarget): New.
7869 (x86_regsets_info): New.
7870 (amd64_linux_regs_info): New.
7871 (i386_linux_usrregs_info): New.
7872 (i386_linux_regs_info): New.
7873 (x86_linux_regs_info): New.
7874 (x86_arch_setup): Reimplement.
7875 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7876 (x86_emit_ops): Ditto.
7877 (the_low_target): Adjust. Install x86_linux_regs_info,
7878 x86_cannot_fetch_register, and x86_cannot_store_register.
7879 (initialize_low_arch): New.
7880 * linux-ia64-low.c (tdesc_ia64): Declare.
7881 (ia64_fetch_register): Adjust.
7882 (ia64_usrregs_info, regs_info): New globals.
7883 (ia64_regs_info): New function.
7884 (the_low_target): Adjust.
7885 (initialize_low_arch): New function.
7886 * linux-sparc-low.c (tdesc_sparc64): Declare.
7887 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7888 Adjust.
7889 (sparc_arch_setup): New function.
7890 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7891 (the_low_target): Adjust.
7892 (initialize_low_arch): New function.
7893 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7894 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7895 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7896 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7897 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7898 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7899 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7900 (tdesc_powerpc_isa205_vsx64l): Declare.
7901 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7902 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7903 (ppc_set_pc, ppc_get_hwcap): Adjust.
7904 (ppc_usrregs_info): Forward declare.
7905 (!__powerpc64__) ppc_regmap_adjusted: New global.
7906 (ppc_arch_setup): Adjust to the current process'es target
7907 description.
7908 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7909 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7910 (ppc_store_evrregset): Adjust.
7911 (target_regsets): Rename to ...
7912 (ppc_regsets): ... this, and make static.
7913 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7914 (ppc_regs_info): New function.
7915 (the_low_target): Adjust.
7916 (initialize_low_arch): New function.
7917 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7918 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7919 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7920 (tdesc_s390x_linux64v2): Declare.
7921 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7922 (s390_fill_gregset, s390_store_last_break): Adjust.
7923 (target_regsets): Rename to ...
7924 (s390_regsets): ... this, and make static.
7925 (s390_get_pc, s390_set_pc): Adjust.
7926 (s390_get_hwcap): New target_desc parameter, and use it.
7927 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7928 (s390_arch_setup): Adjust to set the current process'es target
7929 description. Don't adjust the regmap.
7930 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7931 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7932 (regs_info_3264): New globals.
7933 (s390_regs_info): New function.
7934 (the_low_target): Adjust.
7935 (initialize_low_arch): New function.
7936 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7937 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7938 [__mips64] (init_registers_mips_linux)
7939 (init_registers_mips_dsp_linux): Delete defines.
7940 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7941 (have_dsp): New global.
7942 (mips_read_description): New, based on mips_arch_setup.
7943 (mips_arch_setup): Reimplement.
7944 (get_usrregs_info): New function.
7945 (mips_cannot_fetch_register, mips_cannot_store_register)
7946 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7947 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7948 (target_regsets): Rename to ...
7949 (mips_regsets): ... this, and make static.
7950 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7951 (dsp_regs_info, regs_info): New globals.
7952 (mips_regs_info): New function.
7953 (the_low_target): Adjust.
7954 (initialize_low_arch): New function.
7955 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7956 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7957 Declare.
7958 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7959 (arm_read_description): New, with bits factored from
7960 arm_arch_setup.
7961 (arm_arch_setup): Reimplement.
7962 (target_regsets): Rename to ...
7963 (arm_regsets): ... this, and make static.
7964 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7965 (arm_regs_info): New function.
7966 (the_low_target): Adjust.
7967 (initialize_low_arch): New function.
7968 * linux-m68k-low.c (tdesc_m68k): Declare.
7969 (target_regsets): Rename to ...
7970 (m68k_regsets): ... this, and make static.
7971 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7972 (m68k_regs_info): New function.
7973 (m68k_arch_setup): New function.
7974 (the_low_target): Adjust.
7975 (initialize_low_arch): New function.
7976 * linux-sh-low.c (tdesc_sharch): Declare.
7977 (target_regsets): Rename to ...
7978 (sh_regsets): ... this, and make static.
7979 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7980 (sh_regs_info, sh_arch_setup): New functions.
7981 (the_low_target): Adjust.
7982 (initialize_low_arch): New function.
7983 * linux-bfin-low.c (tdesc_bfin): Declare.
7984 (bfin_arch_setup): New function.
7985 (bfin_usrregs_info, regs_info): New globals.
7986 (bfin_regs_info): New function.
7987 (the_low_target): Adjust.
7988 (initialize_low_arch): New function.
7989 * linux-cris-low.c (tdesc_cris): Declare.
7990 (cris_arch_setup): New function.
7991 (cris_usrregs_info, regs_info): New globals.
7992 (cris_regs_info): New function.
7993 (the_low_target): Adjust.
7994 (initialize_low_arch): New function.
7995 * linux-cris-low.c (tdesc_crisv32): Declare.
7996 (cris_arch_setup): New function.
7997 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7998 (cris_regs_info): New function.
7999 (the_low_target): Adjust.
8000 (initialize_low_arch): New function.
8001 * linux-m32r-low.c (tdesc_m32r): Declare.
8002 (m32r_arch_setup): New function.
8003 (m32r_usrregs_info, regs_info): New globals.
8004 (m32r_regs_info): Adjust.
8005 (initialize_low_arch): New function.
8006 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8007 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8008 (tic6x_usrregs_info): Forward declare.
8009 (tic6x_read_description): New function, based on ...
8010 (tic6x_arch_setup): ... this. Reimplement.
8011 (target_regsets): Rename to ...
8012 (tic6x_regsets): ... this, and make static.
8013 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8014 (tic6x_regs_info): New function.
8015 (the_low_target): Adjust.
8016 (initialize_low_arch): New function.
8017 * linux-xtensa-low.c (tdesc_xtensa): Declare.
8018 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8019 (target_regsets): Rename to ...
8020 (xtensa_regsets): ... this, and make static.
8021 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8022 globals.
8023 (xtensa_arch_setup, xtensa_regs_info): New functions.
8024 (the_low_target): Adjust.
8025 (initialize_low_arch): New function.
8026 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8027 (nios2_arch_setup): Set the current process'es tdesc.
8028 (target_regsets): Rename to ...
8029 (nios2_regsets): ... this.
8030 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8031 (nios2_regs_info): New function.
8032 (the_low_target): Adjust.
8033 (initialize_low_arch): New function.
a261b8f5
PA
8034 * linux-aarch64-low.c (tdesc_aarch64): Declare.
8035 (aarch64_arch_setup): Set the current process'es tdesc.
8036 (target_regsets): Rename to ...
8037 (aarch64_regsets): ... this.
8038 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8039 (aarch64_regs_info): New function.
8040 (the_low_target): Adjust.
8041 (initialize_low_arch): New function.
3aee8918
PA
8042 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8043 globals.
8044 (target_regsets): Rename to ...
8045 (tile_regsets): ... this.
8046 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8047 (tile_regs_info): New function.
8048 (tile_arch_setup): Set the current process'es tdesc.
8049 (the_low_target): Adjust.
8050 (initialize_low_arch): New function.
8051 * spu-low.c (tdesc_spu): Declare.
8052 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8053 * win32-arm-low.c (tdesc_arm): Declare.
8054 (arm_arch_setup): New function.
8055 (the_low_target): Install arm_arch_setup instead of
8056 init_registers_arm.
8057 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8058 (init_windows_x86): Rename to ...
8059 (i386_arch_setup): ... this. Set `win32_tdesc'.
8060 (the_low_target): Adjust.
8061 * win32-low.c (win32_tdesc): New global.
8062 (child_add_thread): Don't create the thread cache here.
8063 (do_initial_child_stuff): Set the new process'es tdesc.
8064 * win32-low.h (struct target_desc): Forward declare.
8065 (win32_tdesc): Declare.
8066 * lynx-i386-low.c (tdesc_i386): Declare global.
8067 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8068 * lynx-low.c (lynx_tdesc): New global.
8069 (lynx_add_process): Set the new process'es tdesc.
8070 * lynx-low.h (struct target_desc): Forward declare.
8071 (lynx_tdesc): Declare global.
8072 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8073 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8074 * nto-low.c (nto_tdesc): New global.
8075 (do_attach): Set the new process'es tdesc.
8076 * nto-low.h (struct target_desc): Forward declare.
8077 (nto_tdesc): Declare.
8078 * nto-x86-low.c (tdesc_i386): Declare.
8079 (nto_x86_arch_setup): Set `nto_tdesc'.
8080
b1fbec62
GB
80812013-06-04 Gary Benson <gbenson@redhat.com>
8082
8083 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8084 to qSupported response when appropriate.
8085 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8086 with nonzero-length annex.
8087 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8088 arguments supplied in annex.
8089
d1ec4ce7
DE
80902013-05-31 Doug Evans <dje@google.com>
8091
ac44adcb 8092 PR server/15594
d1ec4ce7
DE
8093 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8094 64 bits in 64-cross-32 environment.
8095
9b25f2d3
PA
80962013-05-28 Pedro Alves <palves@redhat.com>
8097
8098 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8099 (aarch64-without-fpu.c): Delete rule.
8100 * configure.srv (aarch64*-*-linux*): Remove references to
8101 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8102 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8103 declaration.
8104
6740dc9c
PA
81052013-05-24 Pedro Alves <palves@redhat.com>
8106
8107 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8108 instead of strchr/decode_address. Error if the range isn't split
8109 with a ','. Don't assume there's be a ':' in the action.
8110
c2d6af84
PA
81112013-05-23 Yao Qi <yao@codesourcery.com>
8112 Pedro Alves <palves@redhat.com>
8113
8114 * linux-low.c (lwp_in_step_range): New function.
8115 (linux_wait_1): If the thread was range stepping and stopped
8116 outside the stepping range, report the stop to GDB. Otherwise,
8117 continue stepping. Add range stepping debug output.
8118 (linux_set_resume_request): Copy the step range from the resume
8119 request to the lwp.
8120 (linux_supports_range_stepping): New.
8121 (linux_target_ops) <supports_range_stepping>: Set to
8122 linux_supports_range_stepping.
8123 * linux-low.h (struct linux_target_ops)
8124 <supports_range_stepping>: New field.
8125 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8126 * linux-x86-low.c (x86_supports_range_stepping): New.
8127 (the_low_target) <supports_range_stepping>: Set to
8128 x86_supports_range_stepping.
8129 * server.c (handle_v_cont): Handle 'r' action.
8130 (handle_v_requests): Append ";r" if the target supports range
8131 stepping.
8132 * target.h (struct thread_resume) <step_range_start,
8133 step_range_end>: New fields.
8134 (struct target_ops) <supports_range_stepping>:
8135 New field.
8136 (target_supports_range_stepping): New macro.
8137
58794e1a
JB
81382013-05-17 Joel Brobecker <brobecker@adacore.com>
8139
8140 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8141 confusion in comment.
8142
d631c5a7
JB
81432013-05-17 Joel Brobecker <brobecker@adacore.com>
8144
8145 * lynx-low.c (struct process_info_private): New type.
8146 (lynx_add_process): New function.
8147 (lynx_create_inferior, lynx_attach): Replace calls to
8148 add_process by calls to lynx_add_process.
8149 (lynx_resume): If PTID is null, then try using
8150 current_process()->private->last_wait_event_ptid.
8151 Add comments.
8152 (lynx_clear_inferiors): Delete. The contents of that function
8153 has been inlined in lynx_mourn;
8154 (lynx_wait_1): Save the ptid in the process's private data.
8155 (lynx_mourn): Free the process' private data. Replace call
8156 to lynx_clear_inferiors by call to clear_inferiors.
8157
96f7a20f
YQ
81582013-05-17 Yao Qi <yao@codesourcery.com>
8159
8160 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8161 the right place.
8162
db0dfaa0
LM
81632013-05-16 Luis Machado <lgustavo@codesourcery.com>
8164
8165 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8166 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8167 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8168 PT_TEXT_END_ADDR guards. Update comments.
8169 (linux_target_op) <read_offsets>: Conditionally define to
8170 linux_read_offsets if the target is UCLIBC and if it defines
8171 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8172
68f5f838
SL
81732013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8174 Andrew Jenner <andrew@codesourcery.com>
8175
8176 * Makefile.in (SFILES): Add linux-nios2-low.c.
8177 (clean): Add action to delete nios2-linux.c.
8178 (nios2-linux.c): New rule.
8179 * configure.srv: Add nios2*-*-linux*.
8180 * linux-nios2-low.c: New.
8181
1ebff1fd
HAQ
81822013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8183
8184 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8185
f6150862
HZ
81862013-04-25 Hui Zhu <hui@codesourcery.com>
8187
8188 PR gdb/15186
f6150862
HZ
8189 * ax.c (ax_printf): Add fflush.
8190
614c279d
TT
81912013-04-22 Tom Tromey <tromey@redhat.com>
8192
8193 * Makefile.in (SFILES): Add filestuff.c.
8194 (OBS): Add filestuff.o.
8195 (filestuff.o): New target.
8196 * config.in, configure: Rebuild.
8197 * configure.ac: Check for fdwalk, pipe2.
8198
7d4e5717
PA
81992013-04-17 Pedro Alves <palves@redhat.com>
8200
8201 * configure.ac (USE_THREAD_DB): Delete variable.
8202 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8203 Don't AC_SUBST USE_THREAD_DB.
8204 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8205 * config.in, configure: Regenerate.
8206
d5c93e41
PA
82072013-04-16 Pedro Alves <palves@redhat.com>
8208
8209 * linux-low.h (struct lwp_info) <thread_known>: Move under
8210 the USE_THREAD_DB #ifdef.
8211
04f5fe89
PA
82122013-04-16 Pedro Alves <palves@redhat.com>
8213
8214 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8215 (linux-low.o): Delete rule.
8216 * linux-low.h: Always include "gdb_thread_db.h" instead of
8217 conditionally including thread_db.h.
8218 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8219 HAVE_THREAD_DB_H.
8220
480b27bf
JK
82212013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8222
8223 * Makefile.in (install-only): Fix make install regression.
8224
43662968
JK
82252013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8226
8227 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8228 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8229 installation.
8230 * gdbserver.1: Remove.
8231
3e74e146
PA
82322013-03-22 Pedro Alves <palves@redhat.com>
8233
8234 * linux-low.c (handle_extended_wait): Don't call
8235 linux_enable_event_reporting.
8236
a8347a2a
TT
82372013-03-15 Tony Theodore <tonyt@logyst.com>
8238
8239 PR build/9098:
8240 * Makefile.in (SHELL): Use @SHELL@.
8241
eeb56fa7
SDJ
82422013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8243
8244 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8245 compiler warning.
8246
4fa7e2ff
JB
82472013-03-13 Joel Brobecker <brobecker@adacore.com>
8248
8249 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8250 Remove extraneous NULL element.
8251
8ddb1965
YQ
82522013-03-13 Yao Qi <yao@codesourcery.com>
8253
8254 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8255 'V' block in trace frame.
8256
9accd112
MM
82572013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8258
8259 * target.h (struct target_ops): Add btrace ops.
8260 (target_supports_btrace): New macro.
8261 (target_enable_btrace): New macro.
8262 (target_disable_btrace): New macro.
8263 (target_read_btrace): New macro.
8264 * gdbthread.h (struct thread_info): Add btrace field.
8265 * server.c: Include btrace-common.h.
8266 (handle_btrace_general_set): New function.
8267 (handle_btrace_enable): New function.
8268 (handle_btrace_disable): New function.
8269 (handle_general_set): Call handle_btrace_general_set.
8270 (handle_qxfer_btrace): New function.
8271 (struct qxfer qxfer_packets[]): Add btrace entry.
8272 * inferiors.c (remove_thread): Disable btrace.
8273 * linux-low: Include linux-btrace.h.
8274 (linux_low_enable_btrace): New function.
8275 (linux_low_read_btrace): New function.
8276 (linux_target_ops): Add btrace ops.
8277 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8278 Add srv_linux_btrace=yes.
8279 (x86_64-*-linux*): Add linux-btrace.o.
8280 Add srv_linux_btrace=yes.
8281 * configure.ac: Define HAVE_LINUX_BTRACE.
8282 * config.in: Regenerated.
8283 * configure: Regenerated.
8284
5cc22e4c
MM
82852013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8286
8287 * server.c (handle_qxfer): Preserve error message if -3 is
8288 returned.
8289 (qxfer): Document the -3 return value.
8290
7c97f91e
MM
82912013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8292
8293 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8294 (linux_btrace_h): New variable.
8295 (linux-btrace.o): New rule.
8296
be9a119c 82972013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8298 Hafiz Abid Qadeer <abidh@codesourcery.com>
8299
8300 * tracepoint.c (trace_buffer_size): New global.
8301 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8302 (init_trace_buffer): Change to one-argument function. Allocate
8303 trace buffer memory.
8304 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8305 handle QTBuffer:size packet.
8306 (cmd_bigqtbuffer_size): New function.
8307 (initialize_tracepoint): Call init_trace_buffer with
8308 DEFAULT_TRACE_BUFFER_SIZE.
8309 * server.c (handle_query): Add QTBuffer:size in the
8310 supported packets.
8311
e64f7499
YQ
83122013-03-07 Yao Qi <yao@codesourcery.com>
8313
8314 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8315 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8316 of -1.
8317 (cmd_qtsp): Adjust condition. Do post increment.
8318 Set cur_action and cur_step_action back to 0.
8319
f0ae6fc3
PA
83202013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8321
8322 PR server/15236
8323 * linux-low.c (linux_write_memory): Return early success if LEN is
8324 zero.
8325
b5b0b0af
CV
83262013-03-05 Corinna Vinschen <vinschen@redhat.de>
8327
334ad4a8 8328 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8329
589bc927
TT
83302013-02-28 Tom Tromey <tromey@redhat.com>
8331
8332 * configure.ac: Invoke AC_SYS_LARGEFILE.
8333 * configure, config.in: Rebuild.
8334
dfe07582
CV
83352013-02-28 Corinna Vinschen <vinschen@redhat.com>
8336
8337 * win32-low.c: Throughout, fix format strings and casts of
8338 printf-like functions to avoid type related warnings on all
8339 platforms.
8340 (get_child_debug_event): Print dwDebugEventCode as hex since
8341 that's how it's usually documented.
8342
736cd585
YQ
83432013-02-28 Yao Qi <yao@codesourcery.com>
8344
8345 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8346 pulongest.
8347
e1f58301
JW
83482013-02-27 Jiong Wang <jiwang@tilera.com>
8349
8350 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8351 (reg-tilegx32.c): New rule.
8352 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8353 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8354 different register info initializer according to elf class.
8355 (init_registers_tilgx32): New function. The tilegx32 register info
8356 initializer.
8357 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8358 (tile_store_gregset): Likewise.
8359
d171ca78
YQ
83602013-02-27 Yao Qi <yao@codesourcery.com>
8361
8362 * server.c (process_point_options): Print debug message when
8363 debug_threads is true.
8364
282bbdf3
YQ
83652013-02-26 Yao Qi <yao@codesourcery.com>
8366
8367 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8368
aca22551
PA
83692013-02-19 Pedro Alves <palves@redhat.com>
8370 Kai Tietz <ktietz@redhat.com>
8371
8372 PR gdb/15161
8373
8374 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8375 instead of strtoul to extract address from packet.
8376 (process_serial_event) <'z'>: Likewise.
8377
4f3cee1c
YQ
83782013-02-18 Yao Qi <yao@codesourcery.com>
8379
8380 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8381
8e1d55a3
PA
83822013-02-14 Pedro Alves <palves@redhat.com>
8383
8384 Plug memory leak.
8385
8386 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8387 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8388
458820da
PA
83892013-02-14 Pedro Alves <palves@redhat.com>
8390
8391 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8392
baea0dae
PA
83932013-02-14 Pedro Alves <palves@redhat.com>
8394
8395 * tracepoint.c (save_string): Delete.
8396 (add_tracepoint_action): Use savestring instead of save_string.
8397
0b1afbb3
PA
83982013-02-12 Pedro Alves <palves@redhat.com>
8399
8400 * linux-xtensa-low.c: Ditto.
8401 * xtensa-xtregs.c: Ditto.
8402
8a4ac37e
PA
84032013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8404
8405 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8406 thread_db.
8407
148de6bb
MS
84082013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8409
8410 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8411 aarch64_num_wp_regs and aarch64_num_bp_regs to
8412 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8413
55fac6e0
MS
84142013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8415
8416 * linux-aarch64-low.c (ps_get_thread_area): Replace
8417 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8418
176eb98c
MS
84192013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8420 Marcus Shawcroft <marcus.shawcroft@arm.com>
8421 Nigel Stephens <nigel.stephens@arm.com>
8422 Yufeng Zhang <yufeng.zhang@arm.com>
8423
8424 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8425 (aarch64.c, aarch64-without-fpu.c): New targets.
8426 * configure.srv (aarch64*-*-linux*): New.
8427 * linux-aarch64-low.c: New file.
8428
56f7af9c
MS
84292013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8430
43aaf8b6 8431 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8432 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8433 (dequeue_one_deferred_signal, linux_resume_one_thread)
8434 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8435 (linux_tracefork_grandchild, linux_test_for_tracefork)
8436 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8437 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8438 where the argument is 0.
8439
60f662b0
YQ
84402013-01-25 Yao Qi <yao@codesourcery.com>
8441
8442 * event-loop.c: Include "queue.h".
8443 (gdb_event_p): New typedef.
8444 (struct gdb_event) <next_event>: Remove.
8445 (event_queue): Change to QUEUE(gdb_event_p).
8446 (async_queue_event): Remove.
8447 (gdb_event_xfree): New.
8448 (initialize_event_loop): New.
8449 (process_event): Use API from QUEUE.
8450 (wait_for_event): Likewise.
8451 * server.c (main): Call initialize_event_loop.
8452 * server.h (initialize_event_loop): Declare.
8453
5ae4861a
YQ
84542013-01-18 Yao Qi <yao@codesourcery.com>
8455
8456 * ax.h (struct eval_agent_expr_context): New.
8457 (gdb_eval_agent_expr): Update declaration.
8458 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8459 TFRAME. Add new argument CTX.
8460 * server.h (struct eval_agent_expr_context): Declare.
8461 (agent_mem_read, agent_tsv_read): Update declaration.
8462 (agent_mem_read_string): Likewise.
8463 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8464 (add_traceframe_block): Add new argument TPOINT.
8465 Increase TPOINT->traceframe_usage.
8466 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8467 eval_tracepoint_agent_expr.
8468 (condition_true_at_tracepoint): Likewise.
8469 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8470 (agent_mem_read_string, agent_tsv_read): Likewise.
8471
85e00e85
YQ
84722013-01-16 Yao Qi <yao@codesourcery.com>
8473
8474 * linux-low.c (linux_resume_one_lwp): Don't check
8475 'lwp->bp_reinsert != 0'.
8476
4039cf45
JB
84772013-01-07 Joel Brobecker <brobecker@adacore.com>
8478 Pedro Alves <palves@redhat.com>
8479
8480 * lynx-low.c (ptrace_request_to_str): Define a temporary
8481 macro and use it to simplify this function's implementation.
8482
9044dee2
JB
84832013-01-07 Joel Brobecker <brobecker@adacore.com>
8484
8485 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8486 sets errno.
8487
e6352c8f
JB
84882013-01-07 Joel Brobecker <brobecker@adacore.com>
8489
8490 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8491
50681a27
JB
84922013-01-07 Joel Brobecker <brobecker@adacore.com>
8493
8494 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8495
3f6e77ef
JB
84962013-01-07 Joel Brobecker <brobecker@adacore.com>
8497
8498 * lynx-low.c (lynx_resume): Use the resume_info parameter
8499 to determine the ptid for the lynx_ptrace call, unless
8500 it is equal to minus_one_ptid, in which case we use the
8501 ptid of the current_inferior.
8502 (lynx_wait_1): After having received a thread create/exit
8503 event, resume the inferior's execution using the signaling
8504 thread's ptid, rather than the old ptid.
8505
7fda33ae
JB
85062013-01-07 Joel Brobecker <brobecker@adacore.com>
8507
8508 * lynx-low.c (lynx_resume): Delete variable ret.
8509
b9786c74
JB
85102013-01-01 Joel Brobecker <brobecker@adacore.com>
8511
8512 * gdbreplay.c (gdbreplay_version): Update copyright year.
8513 * server.c (gdbserver_version): Likewise.
8514
8b93d60f
JB
85152012-12-17 Joel Brobecker <brobecker@adacore.com>
8516
8517 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8518 new thread.
8519
037335a7
JB
85202012-12-17 Joel Brobecker <brobecker@adacore.com>
8521
8522 * lynx-low.c (ptrace_request_to_str): Add handling for
8523 PTRACE_GETTRACESIG.
8524
52d4cbd8
JB
85252012-12-17 Joel Brobecker <brobecker@adacore.com>
8526
8527 * lynx-low.c (lynx_attach): Delete variable new_process.
8528
ab8f6ca9
JB
85292012-12-17 Joel Brobecker <brobecker@adacore.com>
8530
8531 * lynx-low.c (lynx_create_inferior): Delete variable
8532 new_process.
8533
78cbc024
JB
85342012-12-17 Joel Brobecker <brobecker@adacore.com>
8535
8536 * lynx-low.c (ptrace_request_to_str): Do not handle
8537 PTRACE_GETTHREADLIST if this macro does not exist.
8538
14a00470
YQ
85392012-12-15 Yao Qi <yao@codesourcery.com>
8540
8541 * Makefile.in (OBS): Add notif.o.
8542 * notif.c, notif.h: New.
8543 * server.c: Include "notif.h".
8544 (struct vstop_notif) <next>: Remove.
8545 <base>: New field.
8546 (queue_stop_reply): Update.
8547 (push_event, send_next_stop_reply): Remove.
8548 (discard_queued_stop_replies): Update.
8549 (notif_stop): New variable.
8550 (handle_v_stopped): Remove.
8551 (handle_v_requests): Don't call handle_v_stopped. Call
8552 handle_ack_notif instead.
8553 (queue_stop_reply_callback): Call notif_event_enque instead
8554 of queue_stop_reply.
8555 (handle_status): Don't call send_next_stop_reply, call
8556 notif_write_event instead.
8557 (kill_inferior_callback): Likewise.
8558 (detach_or_kill_inferior_callback): Likewise.
8559 (main): Call initialize_notif.
8560 (process_serial_event): Call QUEUE_is_empty.
8561 (handle_target_event): Call notif_push instead of push event.
8562 * server.h (push_event): Remove declaration.
8563
61c125b9
TT
85642012-12-10 Tom Tromey <tromey@redhat.com>
8565
8566 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8567 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8568 macros.
8569 (.c.o): Rewrite.
8570 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8571 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8572 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8573 (amd64-linux-ipa.o, ax.o): Rewrite.
8574 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8575 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8576 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8577 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8578 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8579 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8580 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8581 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8582 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8583 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8584 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8585 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8586 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8587 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8588 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8589 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8590 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8591 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8592 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8593 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8594 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8595 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8596 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8597 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8598 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8599 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8600 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8601 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8602 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8603 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8604 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8605 (reg-tilegx.o): Remove.
8606 (all_object_files): New macro.
8607 Include .deps files.
8608 * aclocal.m4, configure: Rebuild.
8609 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8610 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8611 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8612
e90e9ad9
TT
86132012-12-05 Tom Tromey <tromey@redhat.com>
8614
8615 PR gdb/14917:
8616 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8617
02d403bf 86182012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8619
8620 * configure.ac: Check for linux/perf_event.h.
8621 * config.in: Regenerated.
8622 * configure: Regenerated.
8623
0270a750
PA
86242012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8625
8626 * hostio.c (handle_readlink): Decrease buffer size
8627 parameter passed to readlink by one byte.
8628
8c29b58e
YQ
86292012-11-26 Yao Qi <yao@codesourcery.com>
8630
8631 * configure.ac (build_warnings): Append '-Wempty-body'.
8632 * configure: Regenerated.
8633 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8634 body.
8635
8bdce1ff
PM
86362012-11-15 Pierre Muller <muller@sourceware.org>
8637
8638 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8639 * config.in: Regenerate.
8640 * configure: Regenerate.
8641 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8642 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8643 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8644 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8645 header.
8646 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8647 instead of <sys/wait.h> header.
8648 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8649
02d403bf 86502012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8651
8652 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8653 (various make rules): Remove -DGDBSERVER
8654
fbd5db48
YQ
86552012-11-09 Yao Qi <yao@codesourcery.com>
8656
8657 * spu-low.c (current_ptid): Move it to ..
8658 * gdbthread.h: ... here. New.
8659 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8660 * server.c (myresume, process_serial_event): Likewise.
8661 * thread-db.c (thread_db_find_new_threads): Likewise.
8662 * tracepoint.c (run_inferior_command): Likewise.
8663
b3dc46ff
AB
86642012-10-01 Andrew Burgess <aburgess@broadcom.com>
8665
8666 * server.c (handle_search_memory_1): Include access length in
8667 warning message.
8668
07c04788
HPN
86692012-09-05 Michael Brandt <michael.brandt@axis.com>
8670
8671 * linux-crisv32-low.c: Fix compile errors.
8672
918d227b
YQ
86732012-09-04 Yao Qi <yao@codesourcery.com>
8674
8675 * tracepoint.c (cmd_qtsv): Adjust debug message.
8676 Don't check CUR_TPOINT.
8677
18c1b81a
YQ
86782012-08-28 Yao Qi <yao@codesourcery.com>
8679
8680 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8681 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8682 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8683 Remove declarations of xmalloc, xreallloc, xstrdup and
8684 freeargv.
8685 * Makefile.in (libiberty_h): New.
8686 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8687 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8688
dc82f37b
YQ
86892012-08-23 Yao Qi <yao@codesourcery.com>
8690
8691 * server.h: Remove declaration of 'xsnprintf'.
8692
406b1477
KS
86932012-08-22 Keith Seitz <keiths@redhat.com>
8694
8695 * server.h: Include build-gnulib-gbserver/config.h.
8696 * gdbreplay.c: Likewise.
8697
e6712ff1
DE
86982012-08-08 Doug Evans <dje@google.com>
8699
8700 * Makefile.in (SFILES): Add gdb_vecs.c.
8701 (OBS): Add gdb_vecs.o.
8702 (gdb_vecs_h, host_defs_h): New variables.
8703 (thread-db.o): Add $(gdb_vecs_h) dependency.
8704 (gdb_vecs.o): New rule.
8705 * thread-db.c: #include "gdb_vecs.h".
8706 (thread_db_load_search): Use a vector to iterate over path elements.
8707 Handle text appearing after "$pdir".
8708
8709 * configure.ac: Add check for strstr.
8710 * config.in: Regenerate.
8711 * configure: Regenerate.
8712
7c3270ae
UW
87132012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8714
8715 * hostio.c (handle_pread): If pread fails, fall back to attempting
8716 lseek/read.
8717 (handle_pwrite): Likewise for pwrite.
8718
b62e2b27
UW
87192012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8720
8721 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8722 between unsupported TYPE and unimplementable ADDR/LEN combination.
8723 (arm_insert_point): Act on new return value.
8724
78a99e91
PA
87252012-07-31 Pedro Alves <palves@redhat.com>
8726
8727 * server.c (process_point_options): Only skip tokens if we find
8728 one that is unrecognized. Don't treat 'X' specially while
8729 skipping unrecognized tokens.
8730
fcf303ab
UW
87312012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8732
8733 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8734 to 4-byte-align HW breakpoint addresses for Thumb.
8735
7255706c
YQ
87362012-07-27 Yao Qi <yao@codesourcery.com>
8737
8738 PR remote/14161.
8739
8740 * server.h: Declare gdb_agent_about_to_close.
8741 * target.c (kill_inferior): Include "agent.h".
8742 New. Send command 'kill'.
8743 * target.h (kill_inferior): Removed macro.
8744 * tracepoint.c (gdb_agent_about_to_close): New.
8745 (gdb_agent_helper_thread): Handle command 'close'.
8746 Wait endlessly until the inferior stops.
8747 Install gdb_agent_remove_socket to atexit hook.
8748 (agent_socket_name): New static variable.
8749 (gdb_agent_socket_init): Replace local variable 'name' with
8750 'agent_socket_name'.
8751 (gdb_agent_remove_socket): New.
8752
5a3f286f
YQ
87532012-07-27 Yao Qi <yao@codesourcery.com>
8754
8755 * server.c (process_point_options): Stop at 'X' when parsing.
8756
961bd387
ME
87572012-07-19 Michael Eager <eager@eagercon.com>
8758
a261b8f5 8759 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8760 to hw_execute.
8761 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8762 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8763 hardware breakpoint.
8764
aa7c7447
JK
87652012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8766
8767 * gdbserver/linux-low.c (initialize_low): Call
8768 linux_ptrace_init_warnings.
8769
7f216e7c
DE
87702012-07-02 Doug Evans <dje@google.com>
8771
8772 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8773 pointer to int.
8774
d3ce09f5
SS
87752012-07-02 Stan Shebs <stan@codesourcery.com>
8776
8777 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8778 (ax.o): Add it to build rule.
8779 (ax-ipa.o): Ditto.
8780 (OBS): Add format.o.
8781 (IPA_OBS): Add format.o.
8782 * server.c (handle_query): Claim support for breakpoint commands.
8783 (process_point_options): Add command case.
8784 (process_serial_event): Leave running if there are printfs in
8785 effect.
8786 * mem-break.h (any_persistent_commands): Declare.
8787 (add_breakpoint_commands): Declare.
8788 (gdb_no_commands_at_breakpoint): Declare.
8789 (run_breakpoint_commands): Declare.
8790 * mem-break.c (struct point_command_list): New struct.
8791 (struct breakpoint): New field command_list.
8792 (any_persistent_commands): New function.
8793 (add_commands_to_breakpoint): New function.
8794 (add_breakpoint_commands): New function.
8795 (gdb_no_commands_at_breakpoint): New function.
8796 (run_breakpoint_commands): New function.
8797 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8798 locally.
8799 * ax.c: Include format.h.
8800 (ax_printf): New function.
8801 (gdb_eval_agent_expr): Add printf opcode.
8802
2f8f6aed
YQ
88032012-06-13 Yao Qi <yao@codesourcery.com>
8804
8805 * server.c (start_inferior): Remove duplicated writes to fields
8806 'last_resume_kind' and 'last_status' of 'current_inferior'.
8807
0c9070b3
YQ
88082012-06-12 Yao Qi <yao@codesourcery.com>
8809 Pedro Alves <palves@redhat.com>
8810
8811 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8812 comment.
8813 * server.c (handle_v_cont): Extend comment.
8814
c52daf70
YQ
88152012-06-11 Yao Qi <yao@codesourcery.com>
8816
8817 * linux-low.c (linux_attach): Add 'static'.
8818
d38bbb0a
YQ
88192012-06-06 Yao Qi <yao@codesourcery.com>
8820
8821 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8822
89dc0afd
JK
88232012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8824
8825 Fix gcc -flto compilation warning.
8826 * server.c (main): Make variable multi_mode and attach volatile.
8827
75f62ce7
TJB
88282012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8829
8830 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8831 if the platform doesn't know about it.
8832
65f479b6
PA
88332012-05-30 Jeff Kenton <jkenton@tilera.com>
8834
8835 * Makefile.in (SFILES): Add linux-tile-low.c.
8836 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8837 * configure.srv: Handle tilegx-*-linux*.
8838 * linux-tile-low.c: New file.
8839
0c5bf5a9
JK
88402012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8841
8842 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8843
a493e3e2
PA
88442012-05-24 Pedro Alves <palves@redhat.com>
8845
8846 PR gdb/7205
8847
43aaf8b6 8848 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8849
2ea28649
PA
88502012-05-24 Pedro Alves <palves@redhat.com>
8851
8852 PR gdb/7205
8853
8854 Replace target_signal with gdb_signal throughout.
8855
8d409d16
MR
88562012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8857
8858 * linux-low.c (linux_store_registers): Avoid the copying sequence
8859 when no data has been retrieved by ptrace.
8860
23512c01
MGD
88612012-05-22 Will Deacon <will.deacon@arm.com>
8862
8863 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8864 Include asm/ptrace.h.
8865 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8866 already defined.
8867
4934b29e
MR
88682012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8869
8870 * linux-low.c (linux_store_registers): Don't re-retrieve data
8871 with ptrace that has already been obtained from /proc. Always
8872 copy any data retrieved with ptrace to the buffer supplied.
8873
bde24c0a
PA
88742012-05-11 Yao Qi <yao@codesourcery.com>
8875 Pedro Alves <palves@redhat.com>
8876
8877 * linux-low.c (enum stopping_threads_kind): New.
8878 (stopping_threads): Change type to `enum stopping_threads_kind'.
8879 (handle_extended_wait): If stopping and suspending threads, leave
8880 the new_lwp suspended too.
8881 (linux_wait_for_event): Adjust.
8882 (stop_all_lwps): Set `stopping_threads' to
8883 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8884 whether we're suspending threads or just stopping them. Assert no
8885 recursion happens.
8886
623b6bdf
YQ
88872012-04-29 Yao Qi <yao@codesourcery.com>
8888
8889 * server.h: Move some code to ...
8890 * gdbthread.h: ... here. New.
8891 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8892 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8893 (nto-low.o, win32-low.o): Likewise.
8894 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8895 * regcache.c, remote-utils.c, server.c: Likewise.
8896 * target.c, tracepoint.c, win32-low.c: Likewise.
8897
f15f9948
TJB
88982012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8899
8900 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8901 (PTRACE_ARG4_TYPE): Likewise.
8902 (PTRACE_XFER_TYPE): Likewise.
8903 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8904 ptrace to PTRACE_ARG3_TYPE.
8905 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8906 (PTRACE_ARG4_TYPE): Likewise.
8907 (PTRACE_XFER_TYPE): Likewise.
8908 (linux_detach_one_lwp): Cast fourth argument of
8909 ptrace to long then PTRACE_ARG4_TYPE.
8910 (regsets_fetch_inferior_registers): Cast third argument of
8911 ptrace to long then PTRACE_ARG3_TYPE.
8912 (regsets_store_inferior_registers): Likewise.
8913
38ea300a
PA
89142012-04-20 Pedro Alves <palves@redhat.com>
8915
8916 * configure: Regenerate.
8917
c971b7fa
PA
89182012-04-19 Pedro Alves <palves@redhat.com>
8919
43aaf8b6 8920 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8921 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8922 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8923 (all, install-only, uninstall, clean-info, all-lib, clean): No
8924 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8925 (maintainer-clean realclean distclean): Use subdir_do.
8926 (subdir_do): New.
8927 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8928 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8929 * acinclude.m4: Include acx_configure_dir.m4.
8930 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8931 calls. Call AC_PROG_RANLIB. Configure gnulib using
8932 ACX_CONFIGURE_DIR.
8933 (GNULIB): New.
8934 (GNULIB_STDINT_H): Adjust.
8935 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8936 * gdbreplay.c: Include build-gnulib/config.h.
8937 * server.h: Likewise.
8938 * aclocal.m4: Regenerate.
8939 * config.in: Regenerate.
8940 * configure: Regenerate.
c971b7fa 8941
809277f8
PA
89422012-04-19 Pedro Alves <palves@redhat.com>
8943
8944 * Makefile.in (LIBGNU, INCGNU): Adjust.
8945 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8946 (all, install-only, uninstall, clean-info, all-lib, clean)
8947 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8948 * configure.ac: Adjust AC_OUTPUT output.
8949 * aclocal.m4: Regenerate.
8950 * configure: Regenerate.
8951
fd9bb8b8
PA
89522012-04-19 Pedro Alves <palves@redhat.com>
8953
8954 * Makefile.in (generated_files): New.
8955 (server_h): Remove the explicit dependency on config.h, and depend
8956 on $generated_files.
8957
1c298c66
PA
89582012-04-19 Pedro Alves <palves@redhat.com>
8959
8960 * Makefile.in (INCGNU): Add -Ignulib.
8961
57c4b50b
PA
89622012-04-19 Pedro Alves <palves@redhat.com>
8963
8964 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8965 (INCGNU): ... this, and spell out -I here.
8966 (GNULIB_LIB): Rename to ...
8967 (LIBGNU): ... this.
8968 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8969
1030e047
PA
89702012-04-19 Pedro Alves <palves@redhat.com>
8971
8972 * config.in: Regenerate.
8973
447d4319
PA
89742012-04-19 Pedro Alves <palves@redhat.com>
8975
8976 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8977 * server.h (memmem): Remove declaration.
8978 * config.in: Regenerate.
8979 * configure: Regenerate.
8980
aad9eab9
YQ
89812012-04-19 Yao Qi <yao@codesourcery.com>
8982
8983 * Makefile.in (SFILES): Add common/vec.c.
8984 (OBS): Add vec.o.
8985 (vec.o): New rule.
8986
3e10640f
YQ
89872012-04-19 Yao Qi <yao@codesourcery.com>
8988
8989 * remote-utils.c (prepare_resume_reply): Replace with macro
8990 target_core_of_thread.
8991 * server.c (handle_qxfer_threads_proper): Likewise.
8992 * target.h (traget_core_of_thread): New macro.
8993
71622373
PA
89942012-04-18 Pedro Alves <palves@redhat.com>
8995
8996 * aclocal.m4: Regenerate.
8997 * configure: Regenerate.
8998
80d26939
YQ
89992012-04-16 Yao Qi <yao@codesourcery.com>
9000
9001 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9002 duplicated on address.
9003
42476b70
YQ
90042012-04-16 Yao Qi <yao@codesourcery.com>
9005
9006 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9007 (struct tracepoint_action_ops) <send>: New field.
9008 (m_tracepoint_action_send, r_tracepoint_action_send): New.
9009 (agent_expr_send, x_tracepoint_action_send): New.
9010 (l_tracepoint_action_send): New.
9011 (cmd_qtdp): Download and install tracepoint
9012 according to `use_agent'.
9013 (run_inferior_command): Add one more parameter `len'.
9014 Update callers.
9015 (tracepoint_send_agent): New.
9016 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9017
7bc83639
YQ
90182012-04-16 Yao Qi <yao@codesourcery.com>
9019
9020 * tracepoint.c (download_tracepoints): Moved to ...
9021 (cmd_qtstart): ... here.
9022
5f18041e
YQ
90232012-04-14 Yao Qi <yao@codesourcery.com>
9024
9025 * tracepoint.c: Include inttypes.h.
9026 (struct collect_memory_action): Use sized types.
9027 (struct tracepoint): Likewise.
9028 (cmd_qtdp, stop_tracing): Update print specifiers.
9029 (cmd_qtp, response_tracepoint): Likewise.
9030 (collect_data_at_tracepoint): Likewise.
9031 (collect_data_at_step): Likewise.
9032
55a8c076
YQ
90332012-04-14 Yao Qi <yao@codesourcery.com>
9034
9035 Import gnulib module inttypes.
9036 * aclocal.m4, config.in, configure: Regenerated.
9037
dc750257
YQ
90382012-04-14 Yao Qi <yao@codesourcery.com>
9039
9040 * Makefile.in (maintainer-clean, realclean, distclean): Remove
9041 Makefile and config.status at last.
9042
0ab5faf9
YQ
90432012-04-13 Yao Qi <yao@codesourcery.com>
9044
9045 * tracepoint.c: Include stdint.h unconditionally.
9046
18f5fd81
TJB
90472012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9048
9049 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9050 on BFD_HAVE_SYS_PROCFS_TYPE.
9051 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9052 * configure: Regenerate.
9053 * config.in: Likewise.
9054
4d47af5c
L
90552012-04-13 H.J. Lu <hongjiu.lu@intel.com>
9056
9057 * Makefile.in (clean): Also remove x32.c x32-linux.c
9058 x32-avx.c x32-avx-linux.c.
9059 (x32.o): New target.
9060 (x32.c): Likewise.
9061 (x32-linux.o): Likewise.
9062 (x32-linux.c): Likewise.
9063 (x32-avx.o): Likewise.
9064 (x32-avx.c): Likewise.
9065 (x32-avx-linux.o): Likewise.
9066 (x32-avx-linux.c): Likewise.
9067
9068 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9069 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9070 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9071 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9072 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9073 i386/x32-avx-linux.xml.
9074
9075 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9076 (init_registers_x32_avx_linux): Likwise.
9077 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9078 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9079
ecedbe58
PA
90802012-04-13 Pedro Alves <palves@redhat.com>
9081
9082 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9083 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9084 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9085 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9086 the sub-make.
9087
c92b5177
L
90882012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9089
9090 * linux-x86-low.c (compat_x32_clock_t): New.
9091 (compat_x32_siginfo_t): Likewise.
9092 (compat_x32_siginfo_from_siginfo): Likewise.
9093 (siginfo_from_compat_x32_siginfo): Likewise.
9094 (linux_is_elf64): Likewise.
9095 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9096 and siginfo_from_compat_x32_siginfo for x32.
9097 (x86_arch_setup): Set linux_is_elf64.
9098
214d508e
L
90992012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9100
9101 PR gdb/13969
9102 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9103 e_machine field.
9104 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9105 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9106 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9107 compatible with process.
9108
c9a1864a
YQ
91092012-04-12 Yao Qi <yao@codesourcery.com>
9110
9111 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9112 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9113 (install-only, install-info, clean): Handle sub dir gnulib.
9114 (all-lib, am--refresh): New targets.
9115 (memmem.o): Remove target.
9116 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9117 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9118 (AC_REPLACE_FUNCS): Remove memmem.
9119 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9120 (AC_OUTPUT): Generate Makefile in gnulib/.
9121 * aclocal.m4, config.in, configure: Regenerated.
9122
367ba2c2
MR
91232012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9124
9125 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9126
9d236627
PA
91272012-04-05 Pedro Alves <palves@redhat.com>
9128
9129 -Werror=strict-aliasing
9130
9131 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9132 pointer.
9133
111217b3
PA
91342012-04-04 Pedro Alves <palves@redhat.com>
9135
9136 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9137 (sparc_store_gregset_from_stack, sparc_store_gregset)
9138 (sparc_breakpoint_at): Fix formatting.
9139
8365dcf5
TJB
91402012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9141
9142 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9143 are available.
9144 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9145 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9146 * config.in: Regenerate.
9147 * configure: Likewise.
9148
689cc2ae
PA
91492012-03-29 Pedro Alves <palves@redhat.com>
9150
9151 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9152 Correct ptrace arguments.
9153
c14dfd32
PA
91542012-03-28 Pedro Alves <palves@redhat.com>
9155
9156 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9157 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9158 (IA64_FR1_REGNUM): New defines.
9159 (ia64_fetch_register): New.
9160 (the_low_target): Install it.
9161 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9162 field.
9163 * linux-low.c (linux_fetch_registers): Try the
9164 the_low_target.fetch_register hook first.
9165
9166 * linux-arm-low.c (the_low_target): Adjust.
9167 * linux-bfin-low.c (the_low_target): Adjust.
9168 * linux-cris-low.c (the_low_target): Adjust.
9169 * linux-crisv32-low.c (the_low_target): Adjust.
9170 * linux-m32r-low.c (the_low_target): Adjust.
9171 * linux-m68k-low.c (the_low_target): Adjust.
9172 * linux-mips-low.c (the_low_target): Adjust.
9173 * linux-ppc-low.c (the_low_target): Adjust.
9174 * linux-s390-low.c (the_low_target): Adjust.
9175 * linux-sh-low.c (the_low_target): Adjust.
9176 * linux-sparc-low.c (the_low_target): Adjust.
9177 * linux-tic6x-low.c (the_low_target): Adjust.
9178 * linux-x86-low.c (the_low_target): Adjust.
9179 * linux-xtensa-low.c (the_low_target): Adjust.
9180
63c88e13
PA
91812012-03-26 Pedro Alves <palves@redhat.com>
9182
9183 * server.c (handle_qxfer_libraries): Don't bail early if
9184 the_target->qxfer_libraries_svr4 is not NULL.
9185
fb723180
PA
91862012-03-26 Pedro Alves <palves@redhat.com>
9187
9188 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9189
0afae3cf
PA
91902012-03-23 Pedro Alves <palves@redhat.com>
9191
9192 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9193 "library-list-svr4" element's start tag when the the DSO list is
9194 empty.
9195
485f1ee4
PA
91962012-03-23 Pedro Alves <palves@redhat.com>
9197
9198 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9199 a variable whose type size is the same as the inferior's pointer
9200 size.
9201
a5362b9a
TS
92022012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9203
9204 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9205 struct siginfo.
9206 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9207 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9208 * linux-low.h: Include <signal.h>.
9209 (struct siginfo): Remove forward declaration.
9210 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9211 struct siginfo.
9212
d226c142
MF
92132012-03-21 Mike Frysinger <vapier@gentoo.org>
9214
9215 * .gitignore: Ignore more files.
9216
122f36ef
PA
92172012-03-19 Pedro Alves <palves@redhat.com>
9218 Jan Kratochvil <jan.kratochvil@redhat.com>
9219
9220 * server.c (cont_thread, general_thread): Add describing comments.
9221 (start_inferior): Clear `cont_thread'.
9222 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9223 of a process.
9224
fc3e5175
YQ
92252012-03-15 Yao Qi <yao@codesourcery.com>
9226
9227 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9228 handling to ...
9229 (cmd_qtdp): ... here.
9230
8d0d92cd
YQ
92312012-03-15 Yao Qi <yao@codesourcery.com>
9232
9233 * tracepoint.c (struct tracepoint_action_ops): New.
9234 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9235 (m_tracepoint_action_download): New.
9236 (r_tracepoint_action_download): New.
9237 (x_tracepoint_action_download): New.
9238 (l_tracepoint_action_download): New.
9239 (add_tracepoint_action): Install `action->ops' according type.
9240 (download_tracepoint_1): Move code `download' function pointer
9241 of various tracepoint_action_ops.
9242
87b0bb13
JK
92432012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9244
9245 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9246 linux_ptrace_attach_warnings.
9247
5f572dec
JK
92482012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9249
9250 * Makefile.in (linux-ptrace.o): New.
9251 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9252 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9253 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9254 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9255 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9256 of these targets.
9257 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9258
f4647387
YQ
92592012-03-08 Yao Qi <yao@codesourcery.com>
9260 Pedro Alves <palves@redhat.com>
9261
9262 Fix PR server/13392.
9263 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9264 offset of JMP insn.
9265 * tracepoint.c (remove_tracepoint): New.
9266 (cmd_qtdp): Call remove_tracepoint when failed to install.
9267
9b224c5e
PA
92682012-03-07 Pedro Alves <palves@redhat.com>
9269
9270 * linux-low.c (get_detach_signal): New.
9271 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9272 Pass on pending signals to PTRACE_DETACH. Check the result of the
9273 ptrace call.
9274 * server.c (program_signals, program_signals_p): New.
9275 (handle_general_set): Handle QProgramSignals.
9276 * server.h (program_signals, program_signals_p): Declare.
9277
e237a7e2
JK
92782012-03-05 Pedro Alves <palves@redhat.com>
9279 Jan Kratochvil <jan.kratochvil@redhat.com>
9280
9281 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9282 New comment why.
9283
5808517f
YQ
92842012-03-03 Yao Qi <yao@codesourcery.com>
9285
9286 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9287 agent_look_up_symbols.
9288
58b4daa5
YQ
92892012-03-03 Yao Qi <yao@codesourcery.com>
9290
9291 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9292 (linux-x86-low.o): Likewise.
9293 * server.h: Remove in_process_agent_loaded.
9294 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9295 common/agent.c.
9296 Update callers.
9297
8ffcbaaf
YQ
92982012-03-03 Yao Qi <yao@codesourcery.com>
9299
9300 * tracepoint.c (gdb_agent_capability): New global.
9301 (in_process_agent_loaded_ust): Renamed to
9302 `in_process_agent_supports_ust'.
9303 Update callers.
9304 (in_process_agent_supports_ust): Call agent_capability_check.
9305 (clear_installed_tracepoints): Assert that agent supports
9306 agent.
9307
d1feda86
YQ
93082012-03-03 Yao Qi <yao@codesourcery.com>
9309
9310 * linux-low.c (linux_supports_agent): New.
9311 (linux_target_ops): Initialize field `supports_agent' with
9312 linux_supports_agent.
9313 * target.h (struct target_ops) <supports_agent>: New.
9314 (target_supports_agent): New macro.
9315 * server.c (handle_general_set): Handle packet 'QAgent'.
9316 (handle_query): Send `QAgent+'.
9317 * Makefile.in (server.o): Depends on agent.h.
9318
2fa291ac
YQ
93192012-03-03 Yao Qi <yao@codesourcery.com>
9320
9321 * Makefile.in (OBS): Add agent.o.
9322 Add new rule for agent.o.
9323 Track dependence of tracepoint.c on agent.h.
9324 * tracepoint.c (run_inferior_command_1):
9325 (run_inferior_command): Call agent_run_command.
9326 (gdb_ust_connect_sync_socket): Deleted. Move it to
9327 common/agent.c.
9328 (resume_thread, stop_thread): Likewise.
9329 (gdb_ust_socket_init): Renamed to ...
9330 (gdb_agent_socket_init): ... New.
9331 (gdb_ust_thread): Renamed to ...
9332 (gdb_agent_helper_thread): ... New.
9333 (gdb_ust_init): Move some code to ...
9334 (gdb_agent_init): ... here. New.
9335 [HAVE_UST]: Call gdb_ust_init.
9336 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9337 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9338 * config.in, configure: Regenerated.
9339
05044653
PA
93402012-03-02 Pedro Alves <palves@redhat.com>
9341
9342 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9343 * linux-low.c (struct simple_pid_list): New.
9344 (stopped_pids): New a struct simple_pid_list pointer.
9345 (add_to_pid_list, pull_pid_from_list): New.
9346 (handle_extended_wait): Don't assume the first signal new children
9347 report is SIGSTOP. Adjust call to pull_pid_from_list.
9348 (linux_wait_for_lwp): Adjust.
9349
8d00225b
YQ
93502012-03-02 Yao Qi <yao@codesourcery.com>
9351
9352 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9353 debug log.
9354
19560ba5
YQ
93552012-03-02 Yao Qi <yao@codesourcery.com>
9356
9357 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9358 `stop_pc' and `tpoint'. Update caller.
9359
1faeff08
MR
93602012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9361
9362 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9363 * linux-low.c (use_linux_regsets): New macro.
9364 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9365 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9366 (linux_register_in_regsets): New function.
9367 (usr_fetch_inferior_registers): Skip registers covered by
9368 regsets.
9369 (usr_store_inferior_registers): Likewise.
9370 (usr_fetch_inferior_registers): New macro.
9371 (usr_store_inferior_registers): Likewise.
9372 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9373 (linux_store_registers): Likewise.
9374 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9375 prototype.
9376 (init_registers_mips64_dsp_linux): Likewise.
9377 (init_registers_mips_linux): New macro.
9378 (init_registers_mips_dsp_linux): Likewise.
9379 (mips_dsp_num_regs): Likewise.
9380 (DSP_BASE, DSP_CONTROL): New fallback macros.
9381 (mips_base_regs): New macro.
9382 (mips_regmap): Use it. Fix the size.
9383 (mips_dsp_regmap): New variable.
9384 (mips_dsp_regset_bitmap): Likewise.
9385 (mips_arch_setup): New function.
9386 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9387 than mips_regmap.
9388 (mips_cannot_store_register): Likewise.
9389 (the_low_target): Update .arch_setup, .num_regs and .regmap
9390 initializers. Add .regset_bitmap initializer.
9391 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9392 initializer.
9393 * linux-bfin-low.c (the_low_target): Likewise.
9394 * linux-cris-low.c (the_low_target): Likewise.
9395 * linux-crisv32-low.c (the_low_target): Likewise.
9396 * linux-ia64-low.c (the_low_target): Likewise.
9397 * linux-m32r-low.c (the_low_target): Likewise.
9398 * linux-m68k-low.c (the_low_target): Likewise.
9399 * linux-ppc-low.c (the_low_target): Likewise.
9400 * linux-s390-low.c (the_low_target): Likewise.
9401 * linux-sh-low.c (the_low_target): Likewise.
9402 * linux-sparc-low.c (the_low_target): Likewise.
9403 * linux-tic6x-low.c (the_low_target): Likewise.
9404 * linux-x86-low.c (the_low_target): Likewise.
9405 * linux-xtensa-low.c (the_low_target): Likewise.
9406 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9407 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9408 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9409 srv_xmlfiles.
9410 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9411 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9412
c03e6ccc
YQ
94132012-02-29 Yao Qi <yao@codesourcery.com>
9414 Pedro Alves <palves@redhat.com>
9415
9416 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9417 `step_over_finished' is true.
9418
644cebc9
PA
94192012-02-27 Pedro Alves <palves@redhat.com>
9420
9421 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9422 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9423
c14d7ab2
PA
94242012-02-27 Pedro Alves <palves@redhat.com>
9425
9426 PR server/9684
9427 * linux-low.c (pid_is_stopped): New.
9428 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9429
412c89dd
LM
94302012-02-25 Luis Machado <lgustavo@codesourcery.com>
9431
9432 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9433 of conditions.
9434
b745defe
MR
94352012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9436
9437 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9438
9f3a5c85
LM
94392012-02-24 Luis Machado <lgustavo@codesourcery>
9440
9441 * server.c (handle_query): Advertise support for target-side
9442 breakpoint condition evaluation.
9443 (process_point_options): New function.
9444 (process_serial_event): When inserting a breakpoint, check for
9445 a target-side condition that should be evaluated.
9446
9447 * mem-break.c: Include regcache.h and ax.h.
9448 (point_cond_list_t): New data structure.
9449 (breakpoint) <cond_list>: New field.
9450 (find_gdb_breakpoint_at): Make non-static.
9451 (delete_gdb_breakpoint_at): Clear any target-side
9452 conditions.
9453 (clear_gdb_breakpoint_conditions): New function.
9454 (add_condition_to_breakpoint): Likewise.
9455 (add_breakpoint_condition): Likewise.
9456 (gdb_condition_true_at_breakpoint): Likewise.
9457 (gdb_breakpoint_here): Return result directly instead
9458 of going through a local variable.
9459
9460 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9461 (clear_gdb_breakpoint_conditions): Likewise.
9462 (add_breakpoint_condition): Likewise.
9463 (gdb_condition_true_at_breakpoint): Likewise.
9464
9465 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9466 (need_step_over_p): Take target-side breakpoint condition into
9467 consideration.
9468
5e1dc496
LM
94692012-02-24 Luis Machado <lgustavo@codesourcery>
9470
9471 * server.h: Include tracepoint.h.
9472 (agent_mem_read, agent_get_trace_state_variable_value,
9473 agent_set_trace_state_variable_value,
9474 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9475 get_set_tsv_func_addr): New prototypes.
9476
9477 * ax.h: New include file.
9478 * ax.c: New source file.
9479
9480 * tracepoint.c: Include ax.h.
9481 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9482 agent_expr, eval_result_type): Move to ax.h.
9483 (parse_agent_expr): Rename to ...
9484 (gdb_parse_agent_expr): ... this, make it non-static and move
9485 to ax.h.
9486 (unparse_agent_expr) Rename to ...
9487 (gdb_unparse_agent_expr): ... this, make it non-static and move
9488 to ax.h.
9489 (eval_agent_expr): Rename to ...
9490 (eval_tracepoint_agent_expr): ... this.
9491 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9492 forward declarations.
9493 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9494 (agent_get_trace_state_variable_value): New function.
9495 (agent_set_trace_state_variable_value): New function.
9496 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9497 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9498 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9499 (condition_true_at_tracepoint): Likewise.
9500 (parse_agent_expr): Rename to ...
9501 (gdb_parse_agent_expr): ... this and move to ax.c.
9502 (unparse_agent_expr): Rename to ...
9503 (gdb_unparse_agent_expr): ... this and move to ax.c.
9504 (gdb_agent_op_name): Move to ax.c.
9505 (eval_agent_expr): Rename to ...
9506 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9507 and move to ax.c.
9508 (eval_tracepoint_agent_expr): New function.
9509 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9510 non-static.
5e1dc496
LM
9511 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9512 ax.c.
9513 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9514 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9515 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9516 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9517 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9518 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9519 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9520 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9521 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9522 (compile_bytecodes): Remove forward declaration.
9523 (is_goto_target): Move to ax.c.
9524 (compile_bytecodes): Move to ax.c and call
9525 agent_get_trace_state_variable_value (...) and
9526 agent_set_trace_state_variable_value (...).
9527
9528 * Makefile.in: Update ax.c and IPA dependencies.
9529
277e4e52
PA
95302012-02-24 Pedro Alves <palves@redhat.com>
9531
9532 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9533 (cmd_bigqtbuffer_circular): ... this. Only handle
9534 'QTBuffer:circular:'.
9535 (handle_tracepoint_general_set): Adjust.
9536
bf4c19f7
YQ
95372012-02-16 Yao Qi <yao@codesourcery.com>
9538
9539 * inferiors.c: Move code to ...
9540 * dll.c: .... here. New.
9541 * server.h: Declare clear_dlls.
9542 * Makefile.in (SFILES): Add dll.c.
9543 (OBS): Add dll.o
9544 (dll.o): New rule.
9545
d73f2619
YQ
95462012-02-11 Yao Qi <yao@codesourcery.com>
9547
9548 * server.c: (handle_monitor_command): Add a new parameter
9549 `own_buf'.
9550 (handle_query): Update caller.
9551
f8255c2a
JB
95522012-02-09 Joel Brobecker <brobecker@adacore.com>
9553
9554 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9555 * configure, config.in: Regenerate.
9556 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9557 is not defined.
9558
da84f473
PA
95592012-02-02 Pedro Alves <palves@redhat.com>
9560
9561 Try SIGKILL first, then PTRACE_KILL.
9562 * linux-low.c (linux_kill_one_lwp): New.
9563 (linux_kill_one_lwp): Rename to ...
9564 (kill_one_lwp_callback): ... this. Use the new
9565 linux_kill_one_lwp.
9566
e886a173
PA
95672012-02-02 Pedro Alves <palves@redhat.com>
9568
9569 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9570 inferior.
9571
be07f1a2
PA
95722012-01-27 Pedro Alves <palves@redhat.com>
9573
9574 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9575 (elf_64_file_p): Make static.
9576 (linux_pid_exe_is_elf_64_file): New.
9577 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9578 Delete declarations.
9579 (linux_pid_exe_is_elf_64_file): Declare.
9580 * linux-x86-low.c (x86_arch_setup): Use
9581 linux_pid_exe_is_elf_64_file.
9582
d8301ad1
JK
95832012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9584
9585 * linux-low.c (linux_wait_for_event_1): Rename to ...
9586 (linux_wait_for_event): ... here and merge it with former
9587 linux_wait_for_event - new variable wait_ptid, use it.
9588 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9589
01b17894
PA
95902012-01-23 Pedro Alves <palves@redhat.com>
9591
9592 * server.c (main): Avoid yet another case of infinite loop while
9593 detaching/killing after a longjmp.
9594
e825046f
JK
95952012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9596
9597 Code cleanup.
9598 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9599
b9e7b9c3
UW
96002012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9601
9602 * hostio.c (handle_readlink): New function.
9603 (handle_vFile): Call it to handle "vFile:readlink" packets.
9604
901f9912
UW
96052012-01-20 Pedro Alves <palves@redhat.com>
9606 Ulrich Weigand <ulrich.weigand@linaro.org>
9607
9608 * server.c (handle_v_requests): Only support vAttach and vRun to
9609 start multiple processes when in extended protocol mode.
9610
fc1ab1a0
PA
96112012-01-17 Pedro Alves <palves@redhat.com>
9612
9613 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9614 memalign plus mprotect to allocate the scratch buffer.
9615
7d5d4e98
PA
96162012-01-13 Pedro Alves <palves@redhat.com>
9617
9618 * server.c (attach_inferior): Clear `cont_thread'.
9619
f128d5e9
PA
96202012-01-13 Pedro Alves <palves@redhat.com>
9621
9622 * server.c (main): Avoid infinite loop while detaching/killing
9623 after a longjmp.
9624
06db92f0
DE
96252012-01-09 Doug Evans <dje@google.com>
9626
9627 * server.c (start_inferior): Set last_ptid in --wrapper case.
9628
32d92999
YQ
96292012-01-06 Yao Qi <yao@codesourcery.com>
9630
9631 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9632 defined.
9633 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9634
5e0a92a9
YQ
96352012-01-04 Yao Qi <yao@codesourcery.com>
9636
9637 * tracepoint.c (cmd_qtdp): Print debug message
9638 for static tracepoint.
9639
ae639e8c
YQ
96402012-01-04 Yao Qi <yao@codesourcery.com>
9641
9642 * tracepoint.c (trace_vdebug): Differentiate debug message
9643 between gdbserver and IPA.
9644
f72429c5
YQ
96452012-01-03 Yao Qi <yao@codesourcery.com>
9646
9647 * tracepoint.c (tracepoint_was_hit): Don't collect for
9648 static tracepoint.
9649
12c3e59c
JB
96502012-01-02 Joel Brobecker <brobecker@adacore.com>
9651
9652 * terminal.h: Reformat copyright header.
9653
67827812
JB
96542012-01-02 Joel Brobecker <brobecker@adacore.com>
9655
9656 * server.c (gdbserver_version): Update copyright year.
9657 * gdbreplay.c (gdbreplay_version): Likewise.
9658
3e52c33d
JK
96592011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9660
9661 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9662
9663 Revert:
9664 2011-12-18 Hui Zhu <teawater@gmail.com>
9665 * linux-low.c (linux_create_inferior): Save return value to ret.
9666
66f1260e
HZ
96672011-12-18 Hui Zhu <teawater@gmail.com>
9668
9669 * linux-low.c (linux_create_inferior): Save return value to ret.
9670
e77616d7
DE
96712011-12-16 Doug Evans <dje@google.com>
9672
e7b06c57
DE
9673 * linux-low.c (linux_create_inferior): If stdio connection,
9674 redirect stdin from /dev/null, stdout to stderr.
9675 * remote-utils.c (remote_is_stdio): New static global.
9676 (remote_connection_is_stdio): New function.
9677 (remote_prepare): Handle stdio connection.
9678 (remote_open): Ditto.
9679 (remote_close): Don't close stdin for stdio connections.
9680 (read_prim,write_prim): New functions. Replace all calls to
9681 read/write to these.
9682 * server.c (main): Watch for "-" argument. Move call to
9683 remote_prepare before start_inferior.
9684 * server.h (STDIO_CONNECTION_NAME): New macro.
9685 (remote_connection_is_stdio): Declare.
9686
e77616d7
DE
9687 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9688 in debugging output.
9689
82067193
YQ
96902011-12-15 Yao Qi <yao@codesourcery.com>
9691
9692 * tracepoint.c: Include sys/syscall.h.
9693 (gdb_ust_thread): Remove preprocessor conditional.
9694
82bfbe7e
PA
96952011-12-14 Pedro Alves <pedro@codesourcery.com>
9696
9697 * linux-low.c (linux_detach_one_lwp): Call
9698 the_low_target.prepare_to_resume before detaching.
9699
712c6575
YQ
97002011-12-14 Yao Qi <yao@codesourcery.com>
9701
9702 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9703 of write.
9704
d54d1edf
YQ
97052011-12-14 Yao Qi <yao@codesourcery.com>
9706
9707 * i386-low.c (i386_low_stopped_data_address): Initialize local
9708 variable `control'.
9709
6210a125
PA
97102011-12-13 Pedro Alves <pedro@codesourcery.com>
9711
9712 PR remote/13492
9713
9714 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9715 DR_CONTROL unless necessary. Extend comments.
9716 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9717 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9718
2ece8244
YQ
97192011-12-13 Yao Qi <yao@codesourcery.com>
9720
9721 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9722 macros.
9723 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9724
784867a5
JK
97252011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9726
9727 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9728 Print new debug message for such case.
9729
6bf36717
JK
97302011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9731
9732 Fix overlapping memcpy.
9733 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9734 the read_inferior_memory transfer.
9735 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9736 write_inferior_memory transfer.
9737 (set_fast_tracepoint_jump): New variable buf. Use it for the
9738 read_inferior_memory and write_inferior_memory transfers.
9739 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9740 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9741 Use it for the write_inferior_memory transfer.
9742 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9743 buffers.
9744
50275556
MR
97452011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9746
9747 * linux-low.c (fetch_register, store_register): Make code
9748 consistent, fix formatting.
9749
7325beb4
MR
97502011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9751
9752 * linux-low.c (usr_store_inferior_registers): Factor out code
9753 to handle individual registers into...
9754 (store_register): ... this new function.
9755
c642a434
UW
97562011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9757
9758 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9759 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9760 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9761 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9762 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9763 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9764 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9765 (srv_xmlfiles): Add new XML files.
9766
9767 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9768 and <sys/uio.h>.
9769 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9770 (init_registers_s390_linux32v1): Add prototype.
9771 (init_registers_s390_linux32v2): Likewise.
9772 (init_registers_s390_linux64v1): Likewise.
9773 (init_registers_s390_linux64v2): Likewise.
9774 (init_registers_s390x_linux64v1): Likewise.
9775 (init_registers_s390x_linux64v2): Likewise.
9776 (s390_num_regs): Increment to 52.
9777 (s390_regmap): Add orig_r2 register.
9778 (s390_num_regs_3264): Increment to 68.
9779 (s390_regmap_3264): Add orig_r2 register.
9780 (s390_collect_ptrace_register): Handle orig_r2 register.
9781 (s390_supply_ptrace_register): Likewise.
9782 (s390_fill_last_break): New function.
9783 (s390_store_last_break): Likewise.
9784 (s390_fill_system_call): New function.
9785 (s390_store_system_call): Likewise.
9786 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9787 register sets.
9788 (s390_check_regset): New function.
9789 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9790 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9791 Update target_regsets for available register sets.
9792
2268b414
JK
97932011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9794 Jan Kratochvil <jan.kratochvil@redhat.com>
9795
9796 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9797 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9798 New.
9799 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9800 * linux-low.h (struct process_info_private): New member r_debug.
9801 * server.c (handle_qxfer_libraries): Call
9802 the_target->qxfer_libraries_svr4.
9803 (handle_qxfer_libraries_svr4): New function.
9804 (qxfer_packets): New entry "libraries-svr4".
9805 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9806 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9807 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9808 PACKET_qXfer_libraries_svr4.
9809
d6db1fab
UW
98102011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9811
9812 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9813 PSW address/mask between 8-byte and 16-byte formats.
9814 (s390_supply_ptrace_register): Likewise.
9815 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9816 basic addressing mode bit.
9817
242f5f1c
SS
98182011-11-24 Stan Shebs <stan@codesourcery.com>
9819
9820 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9821
f196051f
SS
98222011-11-17 Stan Shebs <stan@codesourcery.com>
9823
9824 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9825 (tracing_start_time): New global.
9826 (tracing_stop_time): New global.
9827 (tracing_user_name): New global.
9828 (tracing_notes): New global.
9829 (tracing_stop_note): New global.
9830 (cmd_qtstart): Set traceframe_usage, start_time.
9831 (stop_tracing): Set stop_time.
9832 (cmd_qtstatus): Report additional status.
9833 (cmd_qtp): New function.
9834 (handle_tracepoint_query): Call it.
9835 (cmd_qtnotes): New function.
9836 (handle_tracepoint_general_set): Call it.
9837 (get_timestamp): Rename from tsv_get_timestamp.
9838
405f8e94
SS
98392011-11-14 Stan Shebs <stan@codesourcery.com>
9840 Kwok Cheung Yeung <kcy@codesourcery.com>
9841
9842 * linux-x86-low.c (small_jump_insn): New.
9843 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9844 trampoline and error message, build a trampoline and issue a small
9845 jump instruction to it.
9846 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9847 trampoline and error message.
9848 (x86_get_min_fast_tracepoint_insn_len): New.
9849 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9850 * linux-low.h (struct linux_target_ops): Add arguments to
9851 install_fast_tracepoint_jump_pad operation, add new operation.
9852 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9853 arguments.
9854 (linux_get_min_fast_tracepoint_insn_len): New function.
9855 (linux_target_op): Add new operation.
9856 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9857 (gdb_trampoline_buffer_end): Ditto.
9858 (gdb_trampoline_buffer_error): Ditto.
9859 (struct ipa_sym_addresses): Add fields for new IPA variables.
9860 (symbol_list): Add entries for new IPA variables.
9861 (struct tracepoint): Add fields to hold the address range of the
9862 trampoline used by the tracepoint.
9863 (trampoline_buffer_head): New static variable.
9864 (trampoline_buffer_tail): Ditto.
9865 (claim_trampoline_space): New function.
9866 (have_fast_tracepoint_trampoline_buffer): New function.
9867 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9868 structure.
9869 (install_fast_tracepoint): Ditto, also add error buffer argument.
9870 (cmd_qtminftpilen): New function.
9871 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9872 (fast_tracepoint_from_trampoline_address): New function.
9873 (fast_tracepoint_collecting): Handle trampoline as part of jump
9874 pad space.
9875 (set_trampoline_buffer_space): New function.
9876 (initialize_tracepoint): Initialize new IPA variables.
9877 * target.h (struct target_ops): Add arguments to
9878 install_fast_tracepoint_jump_pad operation, add new
9879 get_min_fast_tracepoint_insn_len operation.
9880 (target_get_min_fast_tracepoint_insn_len): New.
9881 (install_fast_tracepoint_jump_pad): Add arguments.
9882 * server.h (IPA_BUFSIZ): Define.
9883 * linux-i386-ipa.c: Include extra header files.
9884 (initialize_fast_tracepoint_trampoline_buffer): New function.
9885 (initialize_low_tracepoint): Call it.
9886 * server.h (set_trampoline_buffer_space): Declare.
9887 (claim_trampoline_space): Ditto.
9888 (have_fast_tracepoint_trampoline_buffer): Ditto.
9889
1e4d1764
YQ
98902011-11-14 Yao Qi <yao@codesourcery.com>
9891
9892 * server.c (handle_query): Handle InstallInTrace for qSupported.
9893 * tracepoint.c (add_tracepoint): Sort list.
9894 (install_tracepoint, download_tracepoint): New.
9895 (cmd_qtdp): Call them to install and download tracepoints.
9896 (sort_tracepoints): Removed.
9897 (cmd_qtstart): Update.
9898
5c73ff4e
YQ
98992011-11-14 Yao Qi <yao@codesourcery.com>
9900
9901 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9902 * mem-break.h: Declare.
9903 * tracepoint.c (cmd_qtstart): Move some code to ...
9904 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9905 New.
9906 (download_tracepoints): Move some code to ...
9907 (download_tracepoint_1): ... here. New.
9908
86a30030
YQ
99092011-11-08 Yao Qi <yao@codesourcery.com>
9910
9911 * remote-utils.c (relocate_instruction): A comment fix.
9912
8d26e50c
JB
99132011-11-07 Joel Brobecker <brobecker@adacore.com>
9914
9915 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9916 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9917 dr_status_mirror and dr_control_mirror from debug_reg_state.
9918 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9919 (i386_initial_stuff): Remove use of deleted globals.
9920 (i386_get_thread_context, i386_set_thread_context,
9921 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9922 from debug_reg_state.
9923
a59306a3
YQ
99242011-11-05 Yao Qi <yao@codesourcery.com>
9925
9926 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9927 address as TPOINT's.
9928
3065dfb6
SS
99292011-11-02 Stan Shebs <stan@codesourcery.com>
9930
9931 * tracepoint.c (agent_mem_read_string): New function.
9932 (eval_agent_expr): Call it for tracenz.
9933 * server.c (handle_query): Report support for tracenz.
9934
fd0d8c7c
YQ
99352011-11-02 Yao Qi <yao@codesourcery.com>
9936
9937 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9938
609086b1
YQ
99392011-11-02 Yao Qi <yao@codesourcery.com>
9940
9941 * target.h: Fix a typo in comment.
9942
b9fd1791
PA
99432011-10-31 Pedro Alves <pedro@codesourcery.com>
9944
9945 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9946 clobber the breakpoints' shadows with fast tracepoint jumps.
9947 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9948 * target.c (write_inferior_memory): Also pass MYADDR down to
9949 check_mem_write.
9950
03583c20
UW
99512011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9952
9953 * configure.ac: Check support for personality routine.
9954 * configure: Regenerate.
9955 * config.in: Likewise.
9956 * linux-low.c: Include <sys/personality.h>.
9957 Define ADDR_NO_RANDOMIZE if necessary.
9958 (linux_create_inferior): Disable address space randomization when
9959 forking inferior, if requested.
9960 (linux_supports_disable_randomization): New function.
9961 (linux_target_ops): Install it.
9962 * server.h (disable_randomization): Declare.
9963 * server.c (disable_randomization): New global variable.
9964 (handle_general_set): Handle QDisableRandomization.
9965 (handle_query): Likewise for qSupported.
9966 (main): Support --disable-randomization and --no-disable-randomization
9967 command line arguments.
9968 * target.h (struct target_ops): Add supports_disable_randomization.
9969 (target_supports_disable_randomization): New macro.
9970
723b724b
MF
99712011-09-29 Mike Frysinger <vapier@gentoo.org>
9972
9973 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9974 ifdef check.
9975 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9976 [!PT_GETDSBT] (target_loadmap): New definition.
9977 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9978 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9979 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9980 and PT_GETDSBT to LINUX_LOADMAP.
9981 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9982 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9983
55329a5c 99842011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9985
9986 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9987 (arm_linux_hwbp_cap): New static variable.
9988 (arm_linux_get_hwbp_cap): Replace by ...
9989 (arm_linux_init_hwbp_cap): ... this new function.
9990 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9991 (arm_linux_get_hw_watchpoint_count): Likewise.
9992 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9993 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9994 (arm_prepare_to_resume): Use perror_with_name instead of error.
9995
55329a5c 99962011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9997
9998 * linux-arm-low.c: Include <signal.h>.
9999 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10000 (struct arm_linux_hwbp_cap): New data type.
10001 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10002 (struct arm_linux_hw_breakpoint): New data type.
10003 (MAX_BPTS, MAX_WPTS): Define.
10004 (struct arch_process_info, struct arch_lwp_info): New data types.
10005 (arm_linux_get_hwbp_cap): New function.
10006 (arm_linux_get_hw_breakpoint_count): Likewise.
10007 (arm_linux_get_hw_watchpoint_count): Likewise.
10008 (arm_linux_get_hw_watchpoint_max_length): Likewise.
10009 (arm_hwbp_control_initialize): Likewise.
10010 (arm_hwbp_control_is_enabled): Likewise.
10011 (arm_hwbp_control_is_initialized): Likewise.
10012 (arm_hwbp_control_disable): Likewise.
10013 (arm_linux_hw_breakpoint_equal): Likewise.
10014 (arm_linux_hw_point_initialize): Likewise.
10015 (struct update_registers_data): New data structure.
10016 (update_registers_callback: New function.
10017 (arm_insert_point): Likewise.
10018 (arm_remove_point): Likewise.
10019 (arm_stopped_by_watchpoint): Likewise.
10020 (arm_stopped_data_address): Likewise.
10021 (arm_new_process): Likewise.
10022 (arm_new_thread): Likewise.
10023 (arm_prepare_to_resume): Likewise.
10024 (the_low_target): Register arm_insert_point, arm_remove_point,
10025 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10026 arm_new_thread, and arm_prepare_to_resume.
10027
6b9801d4
SS
100282011-09-15 Stan Shebs <stan@codesourcery.com>
10029
10030 * server.h (struct emit_ops): Add compare-goto fields.
10031 * tracepoint.c (gdb_agent_op_sizes): New table.
10032 (emit_eq_goto): New function.
10033 (emit_ne_goto): New function.
10034 (emit_lt_goto): New function.
10035 (emit_le_goto): New function.
10036 (emit_gt_goto): New function.
10037 (emit_ge_goto): New function.
10038 (is_goto_target): New function.
10039 (compile_bytecodes): Recognize special cases of compare-goto
10040 combinations and call specialized emitters for them.
10041 * linux-x86-low.c (amd64_emit_eq_goto): New function.
10042 (amd64_emit_ne_goto): New function.
10043 (amd64_emit_lt_goto): New function.
10044 (amd64_emit_le_goto): New function.
10045 (amd64_emit_gt_goto): New function.
10046 (amd64_emit_ge_goto): New function.
10047 (amd64_emit_ops): Add the new functions.
10048 (i386_emit_eq_goto): New function.
10049 (i386_emit_ne_goto): New function.
10050 (i386_emit_lt_goto): New function.
10051 (i386_emit_le_goto): New function.
10052 (i386_emit_gt_goto): New function.
10053 (i386_emit_ge_goto): New function.
10054 (i386_emit_ops): Add the new functions.
10055
bf15cbda
SS
100562011-09-08 Stan Shebs <stan@codesourcery.com>
10057
10058 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10059 (i386_emit_epilogue): Restore %ebx.
10060
943ca1dd
JZ
100612011-08-31 Jie Zhang <jzhang918@gmail.com>
10062
10063 * server.c (step_thread): Remove definition.
10064 (process_serial_event): Don't handle Hs.
10065 * server.h (step_thread): Remove declaration.
10066 * target.c (set_desired_inferior): Remove use of step_thread.
10067
e3deef73
LM
100682011-08-24 Luis Machado <lgustavo@codesourcery.com>
10069
10070 * linux-low.c: Include linux-procfs.h.
10071 (linux_attach_lwp_1): Update comments.
10072 (linux_attach): Scan for existing threads when attaching to a
10073 process that is the tgid.
10074 * Makefile.in: Update dependencies.
10075
13da1c97
LM
100762011-08-24 Luis Machado <lgustavo@codesourcery.com>
10077
10078 * configure.srv: Add linux-procfs.o dependencies.
10079
881127c9
YQ
100802011-08-14 Yao Qi <yao@codesourcery.com>
10081
10082 * target.h (struct target_ops): Fix indent.
10083 * win32-low.c (win32_target_ops): Fix comment.
10084
58dbd541
YQ
100852011-08-14 Andrew Jenner <andrew@codesourcery.com>
10086 Yao Qi <yao@codesourcery.com>
10087
10088 * Makefile.in (clean): Remove tic6x-*.c files.
10089 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10090 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10091 (tic6x-c64xp-linux.c): Likewise.
10092 * configure.srv: Add support for tic6x-*-uclinux.
10093 * linux-tic6x-low.c: New.
10094 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10095
78d85199
YQ
100962011-08-14 Andrew Stubbs <ams@codesourcery.com>
10097 Yao Qi <yao@codesourcery.com>
10098
10099 * target.h (struct target_ops): Add read_loadmap.
10100 * linux-low.c (struct target_loadseg): New type.
10101 (struct target_loadmap): New type.
10102 (linux_read_loadmap): New function.
10103 (linux_target_ops): Add linux_read_loadmap.
10104 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10105 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10106 to NULL.
78d85199 10107
a959a88d
EZ
101082011-08-05 Eli Zaretskii <eliz@gnu.org>
10109
10110 * win32-low.c: Include <stdint.h>.
10111
1ced966e
PA
101122011-07-22 Pedro Alves <pedro@codesourcery.com>
10113
10114 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10115 to the inferior here.
10116 (i386_remove_aligned_watchpoint): Ditto.
10117 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10118 fit part of the watchpoint in the debug registers.
10119 (i386_update_inferior_debug_regs): New.
10120 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10121 registers, and only update the inferior on success.
10122 (i386_low_remove_watchpoint): Ditto.
10123
d26e3629
KY
101242011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10125
10126 * linux-low.c (compare_ints, unique, list_threads, show_process,
10127 linux_core_of_thread): Delete.
10128 (linux_target_ops): Change linux_core_of_thread to
10129 linux_common_core_of_thread.
10130 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10131 * utils.c (malloc_failure): Change type of argument.
10132 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10133 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10134 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10135 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10136 (IPA_OBJS): Add common-utils-ipa.o.
10137 (ptid_h, linux_osdata_h): New macros.
10138 (server_h): Add common/common-utils.h, common/xml-utils.h,
10139 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10140 common/ptid.h.
10141 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10142 ptid.o, buffer.o): New rules.
10143 (linux-low.o): Add common/linux-osdata.h as a dependency.
10144 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10145 * configure.ac: Add AC_HEADER_DIRENT check.
10146 * config.in: Regenerate.
10147 * configure: Regenerate.
10148 * remote-utils.c (xml_escape_text): Delete.
10149 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10150 buffer_xml_printf): Move to common/buffer.c.
10151 * server.c (main): Remove call to initialize_inferiors.
10152 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10153 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10154 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10155 internal_error, gdb_assert, gdb_assert_fail): Delete.
10156 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10157 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10158 common/buffer.h.
10159 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10160 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10161 initialize_inferiors): Delete.
10162
2275a1a7
PA
101632011-07-20 Pedro Alves <pedro@codesourcery.com>
10164
10165 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10166 symbol error.
10167
0a5b1e09
PA
101682011-05-31 Pedro Alves <pedro@codesourcery.com>
10169
10170 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10171 assertion.
10172 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10173
6938fd34
YQ
101742011-05-26 Yao Qi <yao@codesourcery.com>
10175
10176 * Makefile.in (thread-db.o): Track dependence to
10177 common/gdb_thread_db.h.
10178 * thread-db.c: include gdb_thread_db.h from right place.
10179
b481f9e0
TT
101802011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10181
10182 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10183 __FILE__ and __LINE__ to internal_error.
10184
98a5dd13
DE
101852011-05-13 Doug Evans <dje@google.com>
10186
10187 * thread-db.c (try_thread_db_load_from_sdir): New function.
10188 (try_thread_db_load_from_dir): New function.
10189 (thread_db_load_search): Handle $sdir, ignore $pdir.
10190 Remove trying of system directories if search of
10191 libthread-db-search-path fails, that is now done via $sdir.
10192
d248b706
KY
101932011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10194
10195 * server.c (handle_query): Add EnableDisableTracepoints to the list
10196 of supported features.
43aaf8b6 10197 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10198 tracepoints.
43aaf8b6
PA
10199 (cmd_qtenable_disable): New.
10200 (cmd_qtstart): Install tracepoints even if disabled.
10201 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10202 receiving a QTEnable or QTDisable packet.
10203 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10204 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10205 tracepoints.
10206 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10207
84e578fb
DE
102082011-05-10 Doug Evans <dje@google.com>
10209
10210 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10211
71f55dd8
DE
102122011-05-04 Doug Evans <dje@google.com>
10213
10214 * linux-low.c (linux_join): Skip process lookup.
10215 * spu-low.c (spu_join): Ditto.
10216 * server.c (join_inferiors_callback): Delete.
10217 (process_serial_event): For 'D' packet (detach) call join_inferior
10218 directly.
10219
4d393d60
JM
102202011-05-04 Joseph Myers <joseph@codesourcery.com>
10221
10222 * README: Don't mention xscale*-*-linux*.
10223 * configure.srv (xscale*-*-linux*): Don't handle target.
10224
b00ad6ff
NF
102252011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10226
10227 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10228 casting pointers.
10229 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10230 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10231 (i386_emit_void_call_2): Likewise.
10232
af96c192
YQ
102332011-04-26 Yao Qi <yao@codesourcery.com>
10234
43aaf8b6
PA
10235 * linux-low.c: Move common macros to linux-ptrace.h.
10236 Include linux-ptrace.h.
af96c192
YQ
10237 * Makefile.in (linux_ptrace_h): New.
10238 (linux-low.o): Depends on linux-ptrace.h.
10239
03f2bd59
JK
102402011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10241
10242 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10243 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10244 (remote_prepare): New function with most of the TCP code from ...
10245 (remote_open): ... here. Detect PORT here unconditionally. Move also
10246 setting transport_is_reliable.
10247 * server.c (run_once): New variable.
10248 (gdbserver_usage): Document it.
10249 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10250 the first run if RUN_ONCE.
10251 * server.h (run_once, remote_prepare): New declarations.
10252
7a9dd1b2
TT
102532011-04-19 Tom Tromey <tromey@redhat.com>
10254
10255 * win32-low.c (handle_load_dll): Remove duplicate "the".
10256
81239425
PM
102572011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10258
10259 Remove support for old Cygwin 1.5 versions.
10260 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10261 function to avoid warning.
10262 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10263 warning.
10264
9e0627f1
PM
102652011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10266
10267 * gdbserver/server.h (Macro _): Define it if not available.
10268
588eebee
MS
102692011-03-14 Michael Snyder <msnyder@vmware.com>
10270
348af9f7 10271 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10272
43f70d4c
JB
102732011-03-10 Joel Brobecker <brobecker@adacore.com>
10274
10275 * Makefile.in (maintainer-clean realclean distclean): Remove
10276 "make ... subdir_do" command.
10277
348af9f7
MS
102782011-03-10 Michael Snyder <msnyder@vmware.com>
10279
10280 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10281
10282 * server.c (handle_v_run): Free alloced buffer on early return.
10283
e637a4f5
YQ
102842011-03-09 Yao Qi <yao@codesourcery.com>
10285
10286 Revert:
10287 2011-03-04 Yao Qi <yao@codesourcery.com>
10288
10289 * Makefile.in: Remove GNU make feature --directory.
10290
10291 2011-03-05 Yao Qi <yao@codesourcery.com>
10292
10293 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10294 (subdir_do): New make target. Copied from gdb/Makefile.
10295 (maintainer-clean, realclean, distclean, clean): Call corresponding
10296 make targets in common/Makefile.
10297
10298 2011-02-11 Yao Qi <yao@codesourcery.com>
10299
10300 * configure.ac: Call AC_PROG_RANLIB.
10301 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10302 * configure: Regenerate.
10303
e6edda56
JK
103042011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10305
10306 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10307
e5141119
JB
103082011-03-06 Yao Qi <yao@codesourcery.com>
10309
10310 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10311
64794aa4
JB
103122011-03-05 Yao Qi <yao@codesourcery.com>
10313
10314 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10315 (subdir_do): New make target. Copied from gdb/Makefile.
10316 (maintainer-clean, realclean, distclean, clean): Call corresponding
10317 make targets in common/Makefile.
10318
7a762829
YQ
103192011-03-04 Yao Qi <yao@codesourcery.com>
10320
10321 * Makefile.in: Remove GNU make feature --directory.
10322
348af9f7
MS
103232011-03-04 Michael Snyder <msnyder@vmware.com>
10324
10325 * server.c (queue_stop_reply): Call xmalloc not malloc.
10326
103272011-03-02 Michael Snyder <msnyder@vmware.com>
10328
10329 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10330
9f72fee2
MS
103312011-02-28 Michael Snyder <msnyder@vmware.com>
10332
588eebee
MS
10333 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10334 (cmd_qtframe): Ditto.
10335 (cmd_qtbuffer): Ditto.
10336 (cmd_bigqtbuffer): Ditto.
10337
9f72fee2
MS
10338 * utils.c (decimal2str): Initialize 'width' to nine, then
10339 don't mess with it.
10340
8040bd49
UW
103412011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10342
10343 * hostio.c (require_data): Free *data, not data.
10344
7e52cbd0
JK
103452011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10346
10347 * hostio.c (require_data): Use free, not xfree.
10348
9130f83e
MS
103492011-02-27 Michael Snyder <msnyder@vmware.com>
10350
4b812f4e
MS
10351 * server.c (handle_query): Discard unused value.
10352
9130f83e
MS
10353 * hostio.c (require_data): Free malloc memory before returning
10354 error.
10355
69d37113
MS
103562011-02-26 Michael Snyder <msnyder@vmware.com>
10357
10358 * linux-low.c (list_threads): Call closedir for dirent.
10359
35f5825a
MS
103602011-02-27 Michael Snyder <msnyder@vmware.com>
10361
2a589cef
MS
10362 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10363 a case statement falls through.
10364
0adea5f7
MS
10365 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10366
35f5825a
MS
10367 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10368 in comparison.
10369
238f1c74
MS
103702011-02-26 Michael Snyder <msnyder@vmware.com>
10371
10372 * utils.c (decimal2str): Eliminate dead code and dead param.
10373 (pulongest): Drop dead param from call to decimal2str.
10374 (plongest): Ditto.
10375
633ff500
JB
103762011-02-24 Joel Brobecker <brobecker@adacore.com>
10377
10378 Revert the following patch (not approved yet):
10379 2011-02-21 Hui Zhu <teawater@gmail.com>
10380 * tracepoint.c (tp_printf): New function.
10381 (eval_agent_expr): Handle gdb_agent_op_printf.
10382
f9c6ff72
HZ
103832011-02-21 Hui Zhu <teawater@gmail.com>
10384
10385 * tracepoint.c (tp_printf): New function.
10386 (eval_agent_expr): Handle gdb_agent_op_printf.
10387
94d5e490
TT
103882011-02-18 Tom Tromey <tromey@redhat.com>
10389
10390 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10391 (tracepoint.o): Likewise.
10392 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10393 (gdb_agent_op_names): Likewise.
10394
c7f96d2b
TT
103952011-02-18 Tom Tromey <tromey@redhat.com>
10396
10397 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10398 gdb_agent_op_rot>: New constants.
10399 (gdb_agent_op_names): Add pick and roll.
10400 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10401 cases.
10402
0feedb2c
JK
104032011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10404
10405 * aclocal.m4: Regenerated with aclocal-1.11.1.
10406
b3b9301e
PA
104072011-02-14 Pedro Alves <pedro@codesourcery.com>
10408
10409 * server.c (handle_qxfer_traceframe_info): New.
10410 (qxfer_packets): Register "traceframe-info".
10411 (handle_query): Report support for qXfer:traceframe-info:read+.
10412 * tracepoint.c (match_blocktype): New.
10413 (traceframe_find_block_type): Rename to ...
10414 (traceframe_walk_blocks): ... this. Add callback filter argument,
10415 and use it.
10416 (traceframe_find_block_type): New, reimplemented on top of
10417 traceframe_walk_blocks.
10418 (build_traceframe_info_xml): New.
10419 (traceframe_read_info): New.
10420 * server.h (traceframe_read_info): Declare.
10421
4f3e6fb7
YQ
104222011-02-11 Yao Qi <yao@codesourcery.com>
10423
10424 * configure.ac: Call AC_PROG_RANLIB.
10425 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10426 * configure: Regenerate.
10427
764880b7
PA
104282011-02-07 Pedro Alves <pedro@codesourcery.com>
10429
10430 * server.c (gdb_read_memory): Change return semantics to allow
10431 partial transfers.
10432 (handle_search_memory_1): Adjust.
10433 (process_serial_event) <'m' packet>: Handle partial transfers.
10434 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10435
1c79eb8a
PA
104362011-01-28 Pedro Alves <pedro@codesourcery.com>
10437
10438 * regcache.c (init_register_cache): Initialize
10439 regcache->register_status.
10440 (free_register_cache): Release regcache->register_status.
10441 (regcache_cpy): Copy register_status.
10442 (registers_to_string): Print 'x's for unavailable registers.
10443 (supply_register): Mark the register's status valid or
10444 unavailable, depending on whether a buffer was passed in or not.
10445 (supply_register_zeroed): New.
10446 (supply_regblock): Mark the registers' status valid or
10447 unavailable, depending on whether a buffer was passed in or not.
10448 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10449 (struct regcache): New `register_status' field.
10450 (supply_register_zeroed): Declare.
10451 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10452 supply_register_zeroed, rather than passing a NULL buffer to
10453 supply_register.
10454 * tracepoint.c (fetch_traceframe_registers): Update comment.
10455
85724a0e
PA
104562011-01-28 Pedro Alves <pedro@codesourcery.com>
10457
10458 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10459 buffer explicit.
10460
d08aafef
PA
104612011-01-25 Pedro Alves <pedro@codesourcery.com>
10462
10463 * server.h (decode_xfer_write): Change prototype.
10464 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10465 and don't extract the annex here.
10466 * server.c (decode_xfer_read): Remove `annex' parameter,
10467 and don't extract the annex here.
10468 (decode_xfer): New.
10469 (struct qxfer): New.
10470 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10471 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10472 (handle_qxfer_statictrace): New functions, abstracted out from
10473 handle_query, and made to use the struct qxfer interface.
10474 (handle_threads_qxfer_proper): Rename to ...
10475 (handle_qxfer_threads_proper): ... this.
10476 (handle_threads_qxfer): Rename to ...
10477 (handle_qxfer_threads): ... this. Adjust.
10478 (qxfer_packets): New array.
10479 (handle_qxfer): New function.
10480 (handle_query): Use handle_qxfer.
10481
493e2a69
MS
104822011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10483
10484 * gdbreplay.c: Shorten lines of >= 80 columns.
10485 * linux-low.c: Ditto.
10486 * linux-ppc-low.c: Ditto.
10487 * linux-s390-low.c: Ditto.
10488 * linux-sparc-low.c: Ditto.
10489 * linux-x86-low.c: Ditto.
10490 * linux-xtensa-low.c: Ditto.
10491 * mem-break.c: Ditto.
10492 * nto-low.c: Ditto.
10493 * regcache.h: Ditto.
10494 * remote-utils.c: Ditto.
10495 * server.c: Ditto.
10496 * server.h: Ditto.
10497 * thread-db.c: Ditto.
10498 * tracepoint.c: Ditto.
10499 * utils.c: Ditto.
10500 * win32-low.h: Ditto.
10501
44944448
JB
105022011-01-05 Joel Brobecker <brobecker@adacore.com>
10503
10504 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10505 update.
10506
71ce852c
JB
105072011-01-01 Joel Brobecker <brobecker@adacore.com>
10508
10509 * server.c (gdbserver_version): Update copyright year in version
10510 output.
10511 * gdbreplay.c (gdbreplay_version): Ditto.
10512
eb826dc6
MF
105132010-12-29 Jie Zhang <jie.zhang@analog.com>
10514
10515 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10516 * linux-bfin-low.c: New file.
10517 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10518 PT_DATA_ADDR for BFIN targets.
10519 * Makefile.in (SFILES): Add linux-bfin-low.c.
10520 (clean): Remove reg-bfin.c.
10521 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10522 * README: Mention supported Blackfin targets.
10523
39ab222a
MF
105242010-12-23 Mike Frysinger <vapier@gentoo.org>
10525
10526 * .gitignore: New file.
10527
a1f2ce7d
MF
105282010-11-16 Mike Frysinger <vapier@gentoo.org>
10529
10530 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10531
f474844c
JZ
105322010-10-22 Jie Zhang <jie@codesourcery.com>
10533
10534 * Makefile.in: Add FLAGS_TO_PASS variable.
10535 (install): Remove dependency of install-only and recursively
10536 invoke make for install-only.
10537
f1048712
DE
105382010-10-04 Doug Evans <dje@google.com>
10539
10540 * Makefile.in (uninstall): Use $(DESTDIR).
10541
b53a1623
PA
105422010-09-24 Pedro Alves <pedro@codesourcery.com>
10543
e6ee044d
PA
10544 PR gdb/11842
10545
b53a1623
PA
10546 * linux-x86-low.c (compat_siginfo_from_siginfo)
10547 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10548 si_code is < 0. Check for si_code == SI_TIMER before checking for
10549 si_code < 0.
10550
fa1bd1e4
JB
105512010-09-13 Joel Brobecker <brobecker@adacore.com>
10552
10553 * lynx-i386-low.c: New file.
10554 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10555
47fac8f8
JB
105562010-09-13 Joel Brobecker <brobecker@adacore.com>
10557
10558 * lynx-low.c (ptrace_request_to_str): Remove handling for
10559 request values that have been removed in LynxOS 5.x.
10560
1adfc54d
JB
105612010-09-13 Joel Brobecker <brobecker@adacore.com>
10562
10563 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10564 <ptrace.h>
10565
c2a66c29
NS
105662010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10567
10568 * configure.ac: Add --enable-inprocess-agent option.
10569 * configure: Rebuilt.
10570
32fcada3
YQ
105712010-09-06 Yao Qi <yao@codesourcery.com>
10572
10573 * linux-low.c (linux_kill): Remove unused variable.
10574 (linux_stabilize_threads): Likewise.
10575 * server.c (start_inferior): Likewise.
10576 (queue_stop_reply_callback): Likewise.
10577 * tracepoint.c (do_action_at_tracepoint): Likewise.
10578
0cccb683
YQ
105792010-09-06 Yao Qi <yao@codesourcery.com>
10580
10581 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10582 on return.
10583
423ec54c
JK
105842010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10585
10586 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10587
12ac6819
PA
105882010-09-06 Pedro Alves <pedro@codesourcery.com>
10589
10590 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10591 "$(IPA_DEPFILES)".
10592
8ed54b31
JB
105932010-09-01 Joel Brobecker <brobecker@adacore.com>
10594
10595 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10596 gdbserver/lynx-ppc-low.c: New files.
10597 * Makefile.in (lynx_low_h): New variable.
10598 (lynx-low.o, lynx-ppc-low.o): New rules.
10599 * configure.ac: On LynxOS, link with -lnetinet.
10600 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10601 * configure: regenerate.
10602
bb0116a4
JB
106032010-09-01 Joel Brobecker <brobecker@adacore.com>
10604
10605 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10606 * configure.ac: Add check for vasprintf and vsnprintf.
10607 * configure, config.in: Regenerate.
10608 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10609
a778ab81 106102010-09-01 Joel Brobecker <brobecker@adacore.com>
10611
10612 * gdbreplay.c: Move include of alloca.h up, next to include of
10613 malloc.h.
10614 * server.h: Add include of malloc.h.
10615 * mem-break.c: Remove include of malloc.h.
10616 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10617
8b034a19 106182010-09-01 Joel Brobecker <brobecker@adacore.com>
10619
10620 * Makefile.in (memmem.o): Build with -Wno-error.
10621
106222010-09-01 Joel Brobecker <brobecker@adacore.com>
10623
10624 * utils.c (xsnprintf): Make non-static.
10625 * server.h: Add xsnprintf declaration.
10626 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10627 replace calls to snprintf by calls to xsnprintf throughout.
10628
106292010-09-01 Joel Brobecker <brobecker@adacore.com>
10630
10631 * configure.ac: Add configure check for alloca.
10632 * configure, config.in: Regenerate.
10633 * server.h: Include alloca.h if it exists.
10634 * gdbreplay.c: Include alloca.h if it exists.
10635
1a981360
PA
106362010-08-28 Pedro Alves <pedro@codesourcery.com>
10637
10638 * linux-low.c (__SIGRTMIN): Define if not already defined.
10639 (linux_create_inferior): Check for __ANDROID__ rather than
10640 __SIGRTMIN.
10641 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10642 are already deferred.
10643 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10644 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10645 stopped and already has a pending signal to report.
10646 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10647 a pending signal to report or is moving out of a jump pad.
10648 (linux_init_signals): Check for __ANDROID__ rather than
10649 __SIGRTMIN.
10650
b4d51a55
PA
106512010-08-28 Pedro Alves <pedro@codesourcery.com>
10652
10653 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10654 debug_threads check. Avoid a linear search when not doing debug
10655 output.
10656
ec48365d
PA
106572010-08-27 Pedro Alves <pedro@codesourcery.com>
10658
10659 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10660 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10661 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10662 (process_event): Change local fd's type to gdb_fildes_t.
10663 (create_file_handler): Adjust prototype.
10664 (delete_file_handler): Adjust prototype.
10665 (handle_file_event): Adjust prototype. Use pfildes.
10666 (create_file_event): Adjsut prototype.
10667 * remote-utils.c (remote_desc, listen_desc): Change type to
10668 gdb_fildes_t.
10669 * server.h: New gdb_fildes_t typedef.
10670 [USE_WIN32API]: Include winsock2.h.
10671 (delete_file_handler, add_file_handler): Adjust prototypes.
10672 (pfildes): Declare.
10673 * utils.c (pfildes): New.
10674
854d88f0
PA
106752010-08-27 Pedro Alves <pedro@codesourcery.com>
10676
10677 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10678 * configure: Regenerate.
10679
0146f85b
PA
106802010-08-27 Pedro Alves <pedro@codesourcery.com>
10681
10682 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10683 (linux_done_accessing_memory): ... this.
10684 (linux_target_ops): Adjust.
10685 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10686 * nto-low.c (nto_target_ops): Adjust comment.
10687 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10688 * spu-low.c (spu_target_ops): Adjust comment.
10689 * target.h (target_ops): Rename unprepare_to_access_memory field
10690 to done_accessing_memory.
10691 (unprepare_to_access_memory): Rename to ...
10692 (done_accessing_memory): ... this.
10693
90d74c30
PA
106942010-08-26 Pedro Alves <pedro@codesourcery.com>
10695
10696 * linux-low.c (linux_prepare_to_access_memory): New.
10697 (linux_unprepare_to_access_memory): New.
10698 (linux_target_ops): Install them.
10699 * server.c (read_memory): Rename to ...
10700 (gdb_read_memory): ... this. Use
10701 prepare_to_access_memory/prepare_to_access_memory.
10702 (write_memory): Rename to ...
10703 (gdb_write_memory): ... this. Use
10704 prepare_to_access_memory/prepare_to_access_memory.
10705 (handle_search_memory_1): Adjust.
10706 (process_serial_event): Adjust.
10707 * target.h (struct target_ops): New fields
10708 prepare_to_access_memory and unprepare_to_access_memory.
10709 (prepare_to_access_memory, unprepare_to_access_memory): New.
10710 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10711 prepare_to_access_memory/prepare_to_access_memory.
10712 * nto-low.c (nto_target_ops): Adjust.
10713 * spu-low.c (spu_target_ops): Adjust.
10714 * win32-low.c (win32_target_ops): Adjust.
10715
fd467969
PA
107162010-08-26 Pedro Alves <pedro@codesourcery.com>
10717
10718 * Makefile.in (WARN_CFLAGS): Get it from configure.
10719 (WERROR_CFLAGS): New.
10720 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10721 * configure.ac: Introduce --enable-werror, which adds -Werror to
10722 the compiler command line. Enabled by default. Disable with
10723 --disable-werror. Add -Wdeclaration-after-statement
10724 Wpointer-arith and -Wformat-nonliteral to warning flags.
10725 * configure: Regenerate.
10726
331e2f5f
PA
107272010-08-26 Pedro Alves <pedro@codesourcery.com>
10728
10729 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10730
e581f2b4
PA
107312010-08-26 Pedro Alves <pedro@codesourcery.com>
10732
10733 * gdbreplay.c (remote_error): New.
10734 (gdbchar): New.
10735 (expect): Use gdbchar. Check for error reading from GDB.
10736 Clarify sync error output.
10737 (play): Check for errors writing to GDB.
10738 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10739 * remote-utils.c (getpkt): Check for errors writing to the remote
10740 descriptor.
10741
3c11dd79
PA
107422010-08-25 Pedro Alves <pedro@codesourcery.com>
10743
10744 * linux-low.c (linux_wait_1): Move non-debugging code out of
10745 `debug_threads' control.
10746
d20a8ad9
PA
107472010-08-25 Pedro Alves <pedro@codesourcery.com>
10748
10749 * linux-low.c (linux_wait_1): Don't set last_status here.
10750 * server.c (push_event, queue_stop_reply_callback): Assert we're
10751 not pushing a TARGET_WAITKIND_IGNORE event.
10752 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10753 (myresume, handle_target_event): Set the thread's last_resume_kind
10754 and last_status from the target returned status.
10755
964e4306
PA
107562010-08-25 Pedro Alves <pedro@codesourcery.com>
10757
10758 PR threads/10729
10759
10760 * linux-x86-low.c (update_debug_registers_callback): New.
10761 (i386_dr_low_set_addr): Use it.
10762 (i386_dr_low_get_addr): New.
10763 (i386_dr_low_set_control): Use update_debug_registers_callback.
10764 (i386_dr_low_get_control): New.
10765 (i386_dr_low_get_status): Adjust.
10766 * linux-low.c (linux_stop_lwp): New.
10767 * linux-low.h (linux_stop_lwp): Declare.
10768
10769 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10770 argument instead of a i386_debug_reg_state.
10771 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10772 a i386_debug_reg_state.
10773 (i386_insert_aligned_watchpoint): Adjust.
10774 (i386_remove_aligned_watchpoint): Adjust.
10775 (i386_low_stopped_data_address): Read the debug registers from the
10776 inferior instead of from the mirrors.
10777 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10778 (i386_dr_low_get_addr): Declare.
10779 (i386_dr_low_get_control): Declare.
10780 (i386_dr_low_get_status): Change prototype.
10781
10782 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10783 (i386_dr_low_get_addr): New.
10784 (i386_dr_low_get_control): New.
10785 (i386_dr_low_get_status): Adjust prototype. Return
10786 dr_status_mirror.
10787 (i386_initial_stuff): Clear dr_status_mirror and
10788 dr_control_mirror.
10789 (i386_get_thread_context): Adjust.
10790 (i386_set_thread_context): Adjust.
10791 (i386_thread_added): Adjust.
10792
5f21a75b
PA
107932010-08-24 Pedro Alves <pedro@codesourcery.com>
10794
10795 * linux-low.h (linux_thread_area): Delete declaration.
10796
3e4c1235
TS
107972010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10798
10799 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10800 after its termination.
10801
1971b033
PA
108022010-08-09 Pedro Alves <pedro@codesourcery.com>
10803
10804 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10805 (gdb_wants_all_stopped): Delete.
10806 (linux_wait_1): Don't call them.
10807 * server.c (handle_v_cont): Tag all threads as want-stopped.
10808 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10809 stopped as "client-wants-stopped".
10810
310444ac
PA
108112010-07-31 Pedro Alves <pedro@codesourcery.com>
10812
10813 * Makefile.in (signals_h): New.
10814 (server_h): Depend on it.
10815 (server.o): Don't depend on $(signals_def).
10816 (signals.o): Depend on $(signals_def).
10817
a19cae16
JK
108182010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10819
10820 * Makefile.in (signals_def): New.
10821 (server_h): Append include/gdb/signals.h and signals_def.
10822 (server.o): Append signals_def.
10823
30d50328
JK
108242010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10825
10826 * server.c (handle_target_event): Use target_signal_to_host for
10827 resume_info.sig initialization.
10828 * target.h (struct thread_resume) <sig>: New comment.
10829
5c3216e2
OS
108302010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10831
c6f46ca0
OS
10832 * server.c (handle_query): strcpy() the returned string from paddress()
10833 instead of sprintf().
5c3216e2
OS
10834 * utils.c (paddress): Return phex_nz().
10835
6bd31874
JB
108362010-07-07 Joel Brobecker <brobecker@adacore.com>
10837
10838 * server.c (handle_v_cont): Call mourn_inferior if process
10839 just exited.
10840 (myresume): Likewise.
10841
0fb4aa4b
PA
108422010-07-01 Pedro Alves <pedro@codesourcery.com>
10843
10844 Static tracepoints, and integration with UST.
10845
10846 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10847 * mem-break.c (uninsert_all_breakpoints)
10848 (reinsert_all_breakpoints): New.
10849 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10850 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10851 (gdb_agent_ust_loaded, helper_thread_id)
10852 (gdb_agent_helper_thread_id): New macros.
10853 (struct ipa_sym_addresses): Add addr_ust_loaded,
10854 addr_helper_thread_id, addr_cmd_buf.
10855 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10856 (in_process_agent_loaded_ust): New.
10857 (write_e_ust_not_loaded): New.
10858 (maybe_write_ipa_ust_not_loaded): New.
10859 (struct collect_static_trace_data_action): New.
10860 (enum tracepoint_type) <static_tracepoint>: New.
10861 (struct tracepoint) <handle>: Mention static tracepoints.
10862 (struct static_tracepoint_ctx): New.
10863 (CMD_BUF_SIZE): New.
10864 (add_tracepoint_action): Handle static tracepoint actions.
10865 (unprobe_marker_at): New.
10866 (clear_installed_tracepoints): Handle static tracepoints.
10867 (cmd_qtdp): Handle static tracepoints.
10868 (probe_marker_at): New.
10869 (cmd_qtstart): Handle static tracepoints.
10870 (response_tracepoint): Handle static tracepoints.
10871 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10872 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10873 (get_context_regcache): Handle static tracepoints.
10874 (do_action_at_tracepoint): Handle static tracepoint actions.
10875 (traceframe_find_block_type): Handle static trace data blocks.
10876 (traceframe_read_sdata): New.
10877 (download_tracepoints): Download static tracepoint actions.
10878 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10879 (GDB_PROBE_NAME): New.
10880 (ust_ops): New.
10881 (GET_UST_SYM): New.
10882 (USTF): New.
10883 (dlsym_ust): New.
10884 (ust_marker_to_static_tracepoint): New.
10885 (gdb_probe): New.
10886 (collect_ust_data_at_tracepoint): New.
10887 (gdb_ust_probe): New.
10888 (UNIX_PATH_MAX, SOCK_DIR): New.
10889 (gdb_ust_connect_sync_socket): New.
10890 (resume_thread, stop_thread): New.
10891 (run_inferior_command): New.
10892 (init_named_socket): New.
10893 (gdb_ust_socket_init): New.
10894 (cstr_to_hexstr): New.
10895 (next_st): New.
10896 (first_marker, next_marker): New.
10897 (response_ust_marker): New.
10898 (cmd_qtfstm, cmd_qtsstm): New.
10899 (unprobe_marker_at, probe_marker_at): New.
10900 (cmd_qtstmat, gdb_ust_thread): New.
10901 (gdb_ust_init): New.
10902 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10903 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10904 (ST_REGENTRY): New.
10905 (x86_64_st_collect_regmap): New.
10906 (X86_64_NUM_ST_COLLECT_GREGS): New.
10907 (AMD64_RIP_REGNUM): New.
10908 (supply_static_tracepoint_registers): New.
10909 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10910 (ST_REGENTRY): New.
10911 (i386_st_collect_regmap): New.
10912 (i386_NUM_ST_COLLECT_GREGS): New.
10913 (supply_static_tracepoint_registers): New.
10914 * server.c (handle_query): Handle qXfer:statictrace:read.
10915 <qSupported>: Report support for StaticTracepoints, and
10916 qXfer:statictrace:read features.
10917 * server.h (traceframe_read_sdata)
10918 (supply_static_tracepoint_registers): Declare.
10919 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10920 (unpack_varlen_hex): Include in IPA build.
10921 * Makefile.in (ustlibs, ustinc): New.
10922 (IPA_OBJS): Add remote-utils-ipa.o.
10923 ($(IPA_LIB)): Link -ldl and -lpthread.
10924 (UST_CFLAGS): New.
10925 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10926 * config.in, configure: Regenerate.
10927
9e4344e5
PA
109282010-06-20 Ian Lance Taylor <iant@google.com>
10929 Pedro Alves <pedro@codesourcery.com>
10930
10931 * linux-x86-low.c (always_true): Delete.
10932 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10933 trying to fool the compiler with always_true.
10934
c6beb2cb
PA
109352010-06-20 Pedro Alves <pedro@codesourcery.com>
10936
10937 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10938 conditions in gdbserver.
10939
d2ed6730
UW
109402010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10941
10942 * spu-low.c (spu_read_memory): Wrap around local store limit.
10943 (spu_write_memory): Likewise.
10944
4e29fb54
PA
109452010-06-15 Pedro Alves <pedro@codesourcery.com>
10946
10947 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10948 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10949 LONGEST uses.
10950 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10951 uses.
10952 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10953 uses with LONGEST uses.
10954
6a271cae
PA
109552010-06-14 Stan Shebs <stan@codesourcery.com>
10956 Pedro Alves <pedro@codesourcery.com>
10957
10958 Bytecode compiler.
10959
10960 * linux-x86-low.c: Include limits.h.
10961 (add_insns): New.
10962 (always_true): New.
10963 (EMIT_ASM): New.
10964 (EMIT_ASM32): New.
10965 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10966 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10967 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10968 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10969 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10970 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10971 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10972 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10973 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10974 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10975 (amd64_emit_void_call_2): New.
10976 (amd64_emit_ops): New.
10977 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10978 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10979 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10980 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10981 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10982 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10983 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10984 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10985 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10986 (i386_emit_stack_adjust, i386_emit_int_call_1)
10987 (i386_emit_void_call_2): New.
10988 (i386_emit_ops): New.
10989 (x86_emit_ops): New.
10990 (the_low_target): Install x86_emit_ops.
10991 * server.h (struct emit_ops): New.
10992 (get_raw_reg_func_addr): Declare.
10993 (current_insn_ptr, emit_error): Declare.
10994 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10995 (set_trace_state_variable_value): New defines.
10996 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10997 addr_get_trace_state_variable_value and
10998 addr_set_trace_state_variable_value.
10999 (symbol_list): New fields for get_raw_reg,
11000 get_trace_state_variable_value and set_trace_state_variable_value.
11001 (condfn): New typedef.
11002 (struct tracepoint): New field `compiled_cond'.
11003 (do_action_at_tracepoint): Clear compiled_cond.
11004 (get_trace_state_variable_value, set_trace_state_variable_value):
11005 Export in the IPA.
11006 (condition_true_at_tracepoint): If there's a compiled condition,
11007 run that.
11008 (current_insn_ptr, emit_error): New globals.
11009 (struct bytecode_address): New.
11010 (get_raw_reg_func_addr): New.
11011 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11012 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11013 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11014 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11015 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11016 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11017 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11018 (compile_tracepoint_condition, compile_bytecodes): New.
11019 * target.h (emit_ops): Forward declare.
11020 (struct target_ops): New field emit_ops.
11021 (target_emit_ops): New.
11022 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11023 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11024 * linux-low.c (linux_emit_ops): New.
11025 (linux_target_ops): Install it.
11026 * linux-low.h (struct linux_target_ops): New field emit_ops.
11027
92b72907
UW
110282010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
11029
11030 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11031 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11032
fa593d66
PA
110332010-06-01 Pedro Alves <pedro@codesourcery.com>
11034 Stan Shebs <stan@codesourcery.com>
11035
11036 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11037 (all): Depend on $(extra_libraries).
11038 (install-only): Install the IPA.
11039 (IPA_OBJS, IPA_LIB): New.
11040 (clean): Remove the IPA lib.
11041 (IPAGENT_CFLAGS): New.
11042 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11043 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11044 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11045 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11046 * configure.ac: Check for atomic builtins support in the compiler.
11047 (IPA_DEPFILES, extra_libraries): Define.
11048 * configure.srv (ipa_obj): Add description.
11049 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11050 (i[34567]86-*-linux*): Set ipa_obj.
11051 (x86_64-*-linux*): Set ipa_obj.
11052 * linux-low.c (stabilizing_threads): New.
11053 (supports_fast_tracepoints): New.
11054 (linux_detach): Stabilize threads before detaching.
11055 (handle_tracepoints): Handle internal tracing breakpoints. Assert
11056 the lwp is either not stabilizing, or is moving out of a jump pad.
11057 (linux_fast_tracepoint_collecting): New.
11058 (maybe_move_out_of_jump_pad): New.
11059 (enqueue_one_deferred_signal): New.
11060 (dequeue_one_deferred_signal): New.
11061 (linux_wait_for_event_1): If moving out of a jump pad, defer
11062 pending signals to later.
11063 (linux_stabilize_threads): New.
11064 (linux_wait_1): Check if threads need moving out of jump pads, and
11065 do it if so.
11066 (stuck_in_jump_pad_callback): New.
11067 (move_out_of_jump_pad_callback): New.
11068 (lwp_running): New.
11069 (linux_resume_one_lwp): Handle moving out of jump pads.
11070 (linux_set_resume_request): Dequeue deferred signals.
11071 (need_step_over_p): Also step over fast tracepoint jumps.
11072 (start_step_over): Also uninsert fast tracepoint jumps.
11073 (finish_step_over): Also reinsert fast tracepoint jumps.
11074 (linux_install_fast_tracepoint_jump): New.
11075 (linux_target_ops): Install linux_stabilize_threads and
11076 linux_install_fast_tracepoint_jump_pad.
11077 * linux-low.h (linux_target_ops) <get_thread_area,
11078 install_fast_tracepoint_jump_pad>: New fields.
11079 (struct lwp_info) <collecting_fast_tracepoint,
11080 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11081 (linux_get_thread_area): Declare.
11082 * linux-x86-low.c (jump_insn): New.
11083 (x86_get_thread_area): New.
11084 (append_insns): New.
11085 (push_opcode): New.
11086 (amd64_install_fast_tracepoint_jump_pad): New.
11087 (i386_install_fast_tracepoint_jump_pad): New.
11088 (x86_install_fast_tracepoint_jump_pad): New.
11089 (the_low_target): Install x86_get_thread_area and
11090 x86_install_fast_tracepoint_jump_pad.
11091 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11092 (struct fast_tracepoint_jump): New.
11093 (fast_tracepoint_jump_insn): New.
11094 (fast_tracepoint_jump_shadow): New.
11095 (find_fast_tracepoint_jump_at): New.
11096 (fast_tracepoint_jump_here): New.
11097 (delete_fast_tracepoint_jump): New.
11098 (set_fast_tracepoint_jump): New.
11099 (uninsert_fast_tracepoint_jumps_at): New.
11100 (reinsert_fast_tracepoint_jumps_at): New.
11101 (set_breakpoint_at): Use write_inferior_memory.
11102 (uninsert_raw_breakpoint): Use write_inferior_memory.
11103 (check_mem_read): Mask out fast tracepoint jumps.
11104 (check_mem_write): Mask out fast tracepoint jumps.
11105 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11106 (set_fast_tracepoint_jump): Declare.
11107 (delete_fast_tracepoint_jump)
11108 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11109 (reinsert_fast_tracepoint_jumps_at): Declare.
11110 * regcache.c: Don't compile many functions when building the
11111 in-process agent library.
11112 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11113 the register buffer in the heap.
11114 (free_register_cache): If the register buffer isn't owned by the
11115 regcache, don't free it.
11116 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11117 pre-existing register caches.
11118 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11119 type.
11120 (convert_ascii_to_int): : Constify `from' parameter type.
11121 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11122 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11123 the needed buffer in-place.
11124 (relocate_instruction): New.
11125 * server.c (handle_query) <qSymbols>: If the target supports
11126 tracepoints, give it a chance of looking up symbols. Report
11127 support for fast tracepoints.
11128 (handle_status): Stabilize threads.
11129 (process_serial_event): Adjust.
11130 * server.h (struct fast_tracepoint_jump): Forward declare.
11131 (struct process_info) <fast_tracepoint_jumps>: New field.
11132 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11133 (decode_X_packet, decode_M_packet): Adjust.
11134 (relocate_instruction): Declare.
11135 (in_process_agent_loaded): Declare.
11136 (tracepoint_look_up_symbols): Declare.
11137 (struct fast_tpoint_collect_status): Declare.
11138 (fast_tracepoint_collecting): Declare.
11139 (force_unlock_trace_buffer): Declare.
11140 (handle_tracepoint_bkpts): Declare.
11141 (initialize_low_tracepoint)
11142 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11143 * target.h (struct target_ops) <stabilize_threads,
11144 install_fast_tracepoint_jump_pad>: New fields.
11145 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11146 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11147 [HAVE_STDINT_H]: Include stdint.h.
11148 (trace_debug_1): Rename to ...
11149 (trace_vdebug): ... this.
11150 (trace_debug): Rename to ...
11151 (trace_debug_1): ... this. Add `level' parameter.
11152 (trace_debug): New.
11153 (ATTR_USED, ATTR_NOINLINE): New.
11154 (IP_AGENT_EXPORT): New.
11155 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11156 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11157 (about_to_request_buffer_space, trace_buffer_is_full)
11158 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11159 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11160 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11161 (traceframe_write_count, traceframes_created)
11162 (trace_state_variables)
11163 New renaming defines.
11164 (struct ipa_sym_addresses): New.
11165 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11166 (symbol_list): New.
11167 (ipa_sym_addrs): New.
11168 (all_tracepoint_symbols_looked_up): New.
11169 (in_process_agent_loaded): New.
11170 (write_e_ipa_not_loaded): New.
11171 (maybe_write_ipa_not_loaded): New.
11172 (tracepoint_look_up_symbols): New.
11173 (debug_threads) [IN_PROCESS_AGENT]: New.
11174 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11175 (UNKNOWN_SIDE_EFFECTS): New.
11176 (stop_tracing): New.
11177 (flush_trace_buffer): New.
11178 (stop_tracing_bkpt): New.
11179 (flush_trace_buffer_bkpt): New.
11180 (read_inferior_integer): New.
11181 (read_inferior_uinteger): New.
11182 (read_inferior_data_pointer): New.
11183 (write_inferior_data_pointer): New.
11184 (write_inferior_integer): New.
11185 (write_inferior_uinteger): New.
11186 (struct collect_static_trace_data_action): Delete.
11187 (enum tracepoint_type): New.
11188 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11189 <actions_str, step_actions, step_actions_str>: Only include in
11190 GDBserver.
fa593d66
PA
11191 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11192 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11193 (tracepoints): Use IP_AGENT_EXPORT.
11194 (last_tracepoint): Don't include in the IPA.
11195 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11196 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11197 (alloced_trace_state_variables): New.
11198 (trace_state_variables): Use IP_AGENT_EXPORT.
11199 (traceframe_t): Delete unused variable.
11200 (circular_trace_buffer): Don't include in the IPA.
11201 (trace_buffer_start): Delete.
11202 (struct trace_buffer_control): New.
11203 (trace_buffer_free): Delete.
11204 (struct ipa_trace_buffer_control): New.
11205 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11206 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11207 New.
11208 (trace_buffer_ctrl): New.
11209 (TRACE_BUFFER_CTRL_CURR): New.
11210 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11211 Reimplement as macros.
11212 (trace_buffer_wrap): Delete.
11213 (traceframe_write_count, traceframe_read_count)
11214 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11215 (struct tracepoint_hit_ctx) <type>: New field.
11216 (struct fast_tracepoint_ctx): New.
11217 (memory_barrier): New.
11218 (cmpxchg): New.
11219 (record_tracepoint_error): Update atomically in the IPA.
11220 (clear_inferior_trace_buffer): New.
11221 (about_to_request_buffer_space): New.
11222 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11223 updating the same buffer.
11224 (add_tracepoint): Default the tracepoint's type to trap
11225 tracepoint, and orig_size to -1.
11226 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11227 internal variables.
11228 (create_trace_state_variable): New parameter `gdb'. Handle it.
11229 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11230 (cmd_qtdp): Handle fast tracepoints.
11231 (cmd_qtdv): Adjust.
11232 (max_jump_pad_size): New.
11233 (gdb_jump_pad_head): New.
11234 (get_jump_space_head): New.
11235 (claim_jump_space): New.
11236 (sort_tracepoints): New.
11237 (MAX_JUMP_SIZE): New.
11238 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11239 IPA.
11240 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11241 support. Upload fast traceframes, and delete internal IPA
11242 breakpoints.
11243 (stop_tracing_handler): New.
11244 (flush_trace_buffer_handler): New.
11245 (cmd_qtstop): Upload fast tracepoints.
11246 (response_tracepoint): Handle fast tracepoints.
11247 (tracepoint_finished_step): Upload fast traceframes. Set the
11248 tracepoint hit context's tracepoint type.
11249 (handle_tracepoint_bkpts): New.
11250 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11251 type. Add comment about fast tracepoints.
11252 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11253 non-existing action_str field.
11254 (get_context_regcache): Handle fast tracepoints.
11255 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11256 to the regcache.
11257 (fast_tracepoint_from_jump_pad_address): New.
11258 (fast_tracepoint_from_ipa_tpoint_address): New.
11259 (collecting_t): New.
11260 (force_unlock_trace_buffer): New.
11261 (fast_tracepoint_collecting): New.
11262 (collecting): New.
11263 (gdb_collect): New.
11264 (write_inferior_data_ptr): New.
11265 (target_tp_heap): New.
11266 (target_malloc): New.
11267 (download_agent_expr): New.
11268 (UALIGN): New.
11269 (download_tracepoints): New.
11270 (download_trace_state_variables): New.
11271 (upload_fast_traceframes): New.
11272 (IPA_FIRST_TRACEFRAME): New.
11273 (IPA_NEXT_TRACEFRAME_1): New.
11274 (IPA_NEXT_TRACEFRAME): New.
11275 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11276 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11277 (gdb_jump_pad_buffer_end): New.
11278 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11279 (initialize_tracepoint): Adjust.
11280 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11281 buffer. Initialize the low module.
11282 * utils.c (PREFIX, TOOLNAME): New.
11283 (malloc_failure): Use PREFIX.
11284 (error): In the IPA, an error causes an exit.
11285 (fatal, warning): Use PREFIX.
11286 (internal_error): Use TOOLNAME.
11287 (NUMCELLS): Increase to 10.
11288 * configure, config.in: Regenerate.
11289
d149dd1d
PA
112902010-06-01 Pedro Alves <pedro@codesourcery.com>
11291
11292 * server.c (handle_query) <qSupported>: Do two passes over the
11293 qSupported string to avoid nesting strtok.
11294
f6528abd
JK
112952010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11296
11297 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11298 (CDEPS): New.
11299 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11300 -Wl,--dynamic-list.
11301 * configure: Regenerate.
11302 * proc-service.list: New.
11303
ca2a87a0
JK
113042010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11305
11306 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11307 New comment.
11308
363a6e9f
OS
113092010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11310
11311 * gdbreplay.c (remote_open): Check error return from socket() call by
11312 its equality to -1 not by it being negative.
11313 * remote-utils.c (remote_open): Likewise.
11314
d23b6cb1
PA
113152010-05-23 Pedro Alves <pedro@codesourcery.com>
11316
11317 * config.h: Regenerate.
11318
28d3cf85
MK
113192010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11320
11321 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11322 doesn't provide PTRACE_GET_THREAD_AREA.
11323
fea36a59
MK
113242010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11325
11326 * linux-m68k-low.c: Include <asm/ptrace.h>
11327 (ps_get_thread_area): Implement.
11328
24b066ba
DE
113292010-05-03 Doug Evans <dje@google.com>
11330
11331 * event-loop.c (struct callback_event): New struct.
11332 (callback_list): New global.
11333 (append_callback_event, delete_callback_event): New functions.
11334 (process_callback): New function.
11335 (start_event_loop): Call it.
11336 * remote-utils.c (NOT_SCHEDULED): Define.
11337 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11338 moved out of readchar.
11339 (readchar): Rewrite. Call reschedule before returning.
11340 (reset_readchar): New function.
11341 (remote_close): Call it.
11342 (process_remaining, reschedule): New functions.
11343 * server.h (callback_handler_func): New typedef.
11344 (append_callback_event, delete_callback_event): Declare.
11345
9836d6ea
PA
113462010-05-03 Pedro Alves <pedro@codesourcery.com>
11347
11348 * proc-service.c (ps_pglobal_lookup): Use
11349 thread_db_look_up_one_symbol.
11350 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11351 parameter. Use it instead of all_symbols_looked_up.
11352 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11353 field.
11354 (all_symbols_looked_up): Don't declare.
11355 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11356 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11357 field.
11358 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11359 Set all_symbols_looked_up here.
11360 (thread_db_look_up_one_symbol): New.
11361 (thread_db_get_tls_address): Adjust.
11362 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11363 thread_db object on the heap, and tentatively set it in the
11364 process structure.
11365 (thread_db_init): Don't set all_symbols_looked_up here.
11366 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11367
7984d532
PA
113682010-05-03 Pedro Alves <pedro@codesourcery.com>
11369
11370 * linux-low.c (linux_kill, linux_detach): Adjust.
11371 (status_pending_p_callback): Remove redundant statement. Check
11372 for !TARGET_WAITIKIND_IGNORE, instead of
11373 TARGET_WAITKIND_STOPPED.
11374 (handle_tracepoints): Make sure LWP is locked. Adjust.
11375 (linux_wait_for_event_1): Adjust.
11376 (linux_cancel_breakpoints): New.
11377 (unsuspend_one_lwp): New.
11378 (unsuspend_all_lwps): New.
11379 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11380 (send_sigstop_callback): Change return type to int, add new
11381 `except' parameter and handle it.
11382 (suspend_and_send_sigstop_callback): New.
11383 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11384 pass them down. If SUSPEND, also increment the lwp's suspend
11385 count.
11386 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11387 (need_step_over_p): Don't consider suspended LWPs.
11388 (start_step_over): Adjust.
11389 (proceed_one_lwp): Change return type to int, add new `except'
11390 parameter and handle it.
11391 (unsuspend_and_proceed_one_lwp): New.
11392 (proceed_all_lwps): Use find_inferior instead of
11393 for_each_inferior.
11394 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11395 also decrement the suspend count of LWPs. Pass `except' down,
11396 instead of hacking its suspend count.
11397 (linux_pause_all): Add `freeze' parameter. Adjust.
11398 (linux_unpause_all): New.
11399 (linux_target_ops): Install linux_unpause_all.
11400 * server.c (handle_status): Adjust.
11401 * target.h (struct target_ops): New fields `unpause_all' and
11402 `cancel_breakpoints'. Add new parameter to `pause_all'.
11403 (pause_all): Add new `freeze' parameter.
11404 (unpause_all): New.
11405 (cancel_breakpoints): New.
11406 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11407 cancel breakpoints.
11408 (cmd_qtstart): Pause threads.
11409 (stop_tracing): Pause threads, and cancel breakpoints.
11410 * win32-low.c (win32_target_ops): Adjust.
11411
e471f25b
PA
114122010-05-03 Pedro Alves <pedro@codesourcery.com>
11413
11414 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11415 the inferior right away from here...
11416 (linux_wait_1): ... to here, and adjust to check the thread's
11417 last_resume_kind instead of the lwp's step or stop_expected flags.
11418
1915ef4f
PA
114192010-05-02 Pedro Alves <pedro@codesourcery.com>
11420
11421 * README: Use consistent `GDB' and `GDBserver' spellings.
11422
f9e39928
PA
114232010-05-02 Pedro Alves <pedro@codesourcery.com>
11424
11425 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11426 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11427 (linux_detach_one_lwp): Assume the lwp is stopped.
11428 (any_thread_of): Delete.
11429 (linux_detach): Stop all lwps here. Don't blindly delete all
11430 breakpoints.
11431 (delete_lwp_callback): New.
11432 (linux_mourn): Delete all lwps of the process that is gone.
11433 (linux_wait_1): Don't delete the last lwp of the process here.
11434 * mem-break.h (mark_breakpoints_out): Declare.
11435 * mem-break.c (mark_breakpoints_out): New.
11436 (free_all_breakpoints): Use it.
11437 * server.c (handle_target_event): If the process is gone, mark
11438 breakpoints out.
11439 * thread-db.c (struct thread_db) <create_bp>: New field.
11440 (thread_db_enable_reporting): Fix prototype. Store a thread event
11441 breakpoint reference in the thread_db struct.
11442 (thread_db_load_search): Clear the thread_db object.
11443 (try_thread_db_load_1): Ditto.
11444 (switch_to_process): New.
11445 (disable_thread_event_reporting): Use it.
11446 (remove_thread_event_breakpoints): New.
11447 (thread_db_detach, thread_db_mourn): Use it.
11448
1e7fc18c
PA
114492010-05-01 Pedro Alves <pedro@codesourcery.com>
11450
11451 * linux-low.c (linux_enable_event_reporting): New.
11452 (linux_wait_for_event_1, handle_extended_wait): Use it.
11453
02fc4de7
PA
114542010-04-30 Pedro Alves <pedro@codesourcery.com>
11455
11456 * linux-low.c (linux_kill_one_lwp, linux_kill)
11457 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11458 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11459 SIGSTOP even if the LWP is stopped.
11460 (send_sigstop_callback): New.
11461 (stop_all_lwps): Use send_sigstop_callback instead.
11462 (linux_resume_one_thread): Adjust.
11463 (proceed_one_lwp): Still proceed an LWP that the client has
11464 requested to stop, if we haven't reported it as stopped yet. Make
11465 sure that LWPs the client want stopped, have a pending SIGSTOP.
11466
bc3b5632
DE
114672010-04-26 Doug Evans <dje@google.com>
11468
ae1ada35
DE
11469 * server.c (handle_general_set): Make static.
11470
bc3b5632
DE
11471 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11472 Print received char after testing for error/eof instead of before.
11473 (input_interrupt): Tweak comment.
11474
65730243
DE
114752010-04-23 Doug Evans <dje@google.com>
11476
11477 * server.c (start_inferior): Print inferior argv if --debug.
11478
a8ae7dc0
AR
114792010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11480
11481 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11482 * nto-x86-low.c: Include server.h
11483
1c07cc19
PM
114842010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11485
11486 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11487 be consistent with other sources of this directory.
11488 (init_registers_amd64): Correct name of source file of this function
11489 in the comment.
11490
e0a61e09
PM
114912010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11492
11493 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11494 64-bit executables.
11495
54709339
PM
114962010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11497
11498 * win32-i386-low.c: Add 64-bit support.
11499 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11500 (init_registers_amd64): Declare.
11501 (mappings): Add 64-bit version of array.
11502 (init_windows_x86): New function.
11503 (the_low_target): Change init_arch field to init_windows_x86.
11504
e8f0053d
PM
115052010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11506
11507 * win32-low.c: Adapt to support also 64-bit architecture.
11508 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11509 (get_image_name): Use SIZE_T type for local variable `done'.
11510 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11511 (toolhelp_get_dll_name): Idem.
11512 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11513 Use uintptr_t typecast to avoid warning.
11514 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11515 (handle_exception): Use phex_nz to avoid warning.
11516 (win32_wait): Remove unused local variable `process'.
11517
c481e77e
PM
115182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11519
11520 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11521 `amd64-avx.o'.
11522
12ea4b69
PM
115232010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11524
11525 * configure.ac: Use `ws2_32' library for srv_mingw.
11526 * configure: Regenerate.
11527 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11528 * remote-utils.c: Likewise.
11529
f6d1620c
L
115302010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11531
11532 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11533 if __x86_64__ is defined.
11534
8e642873
PM
115352010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11536
11537 * configure: Regenerate.
11538
711e434b
PM
115392010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11540
11541 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11542 * target.h (target_ops): New get_tib_address field.
11543 * win32-low.h (win32_thread_info): Add thread_local_base field.
11544 * win32-low.c (child_add_thread): Add tlb argument.
11545 Set thread_local_base field to TLB.
11546 (get_child_debug_event): Adapt to child_add_thread change.
11547 (win32_get_tib_address): New function.
11548 (win32_target_ops): Set get_tib_address field to
11549 win32_get_tib_address.
11550 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11551
505106cd
PA
115522010-04-12 Pedro Alves <pedro@codesourcery.com>
11553
505106cd
PA
11554 * linux-low.c (linux_mourn): Also remove the process.
11555 * server.c (handle_target_event): Don't remove the process here.
11556 * nto-low.c (nto_mourn): New.
11557 (nto_target_ops): Install it.
11558 * spu-low.c (spu_mourn): New.
11559 (spu_target_ops): Install it.
11560 * win32-low.c (win32_mourn): New.
11561 (win32_target_ops): Install it.
11562
e8470a06
PA
115632010-04-12 Pedro Alves <pedro@codesourcery.com>
11564
11565 * server.h (buffer_xml_printf): Remove redundant `;'.
11566
45ba0d02
PA
115672010-04-12 Pedro Alves <pedro@codesourcery.com>
11568
11569 * regcache.c (set_register_cache): Invalidate regcaches before
11570 changing the register cache layout.
11571 (regcache_invalidate_one): Allow a NULL regcache.
11572 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11573 regcaches before changing the register cache layout or the target
11574 regsets.
11575
59e04013
L
115762010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11577
11578 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11579 variable warning on Linux/x86-64.
11580
8336d594
PA
115812010-04-11 Pedro Alves <pedro@codesourcery.com>
11582
11583 GDBserver disconnected tracing support.
11584
11585 * linux-low.c (linux_remove_process): Delete.
11586 (add_lwp): Don't set last_resume_kind here.
11587 (linux_kill): Use `mourn'.
11588 (linux_detach): Use `thread_db_detach', and `mourn'.
11589 (linux_mourn): New.
11590 (linux_attach_lwp_1): Adjust comment.
11591 (linux_attach): last_resume_kind moved the thread_info; adjust.
11592 (status_pending_p_callback): Adjust.
11593 (linux_wait_for_event_1): Adjust.
11594 (count_events_callback, select_singlestep_lwp_callback)
11595 (select_event_lwp_callback, cancel_breakpoints_callback)
11596 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11597 (proceed_one_lwp): Adjust.
11598 (linux_async): Add debug output.
11599 (linux_thread_stopped): New.
11600 (linux_pause_all): New.
11601 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11602 linux_pause_all.
11603 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11604 (thread_db_free): Delete declaration.
11605 (thread_db_detach, thread_db_mourn): Declare.
11606 * thread-db.c (thread_db_init): Use thread_db_mourn.
11607 (thread_db_free): Delete, split in two.
11608 (disable_thread_event_reporting): New.
11609 (thread_db_detach): New.
11610 (thread_db_mourn): New.
11611
11612 * server.h (struct thread_info) <last_resume_kind>: New field.
11613 <attached>: Add comment.
11614 <gdb_detached>: New field.
11615 (handler_func): Change return type to int.
11616 (handle_serial_event, handle_target_event): Ditto.
11617 (gdb_connected): Declare.
11618 (tracing): Delete.
11619 (disconnected_tracing): Declare.
11620 (stop_tracing): Declare.
11621
11622 * server.c (handle_query) <qSupported>: Report support for
11623 disconnected tracing.
11624 (queue_stop_reply_callback): Account for running threads.
11625 (gdb_wants_thread_stopped): New.
11626 (gdb_wants_all_threads_stopped): New.
11627 (gdb_reattached_process): New.
11628 (handle_status): Clear the `gdb_detached' flag of all processes.
11629 In all-stop, stop all threads.
11630 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11631 (process_serial_event): If the remote connection breaks, or if an
11632 exit was forced with "monitor exit", force an event loop exit.
11633 Handle disconnected tracing on detach.
11634 (handle_serial_event): Adjust.
11635 (handle_target_event): If GDB isn't connected, forward events back
11636 to the inferior, unless the last process exited, in which case,
11637 exit gdbserver. Adjust interface.
11638
11639 * remote-utils.c (remote_open): Don't block in accept. Instead
11640 register an event loop source on the listen socket file
11641 descriptor. Refactor bits into ...
11642 (listen_desc): ... this new global.
11643 (gdb_connected): ... this new function.
11644 (enable_async_notification): ... this new function.
11645 (handle_accept_event): ... this new function.
11646 (remote_close): Clear remote_desc.
11647
11648 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11649
11650 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11651 New fields.
11652 (mourn_inferior): Define.
11653 (target_process_qsupported): Avoid the dangling else problem.
11654 (thread_stopped): Define.
11655 (pause_all): Define.
11656 (target_waitstatus_to_string): Declare.
11657 * target.c (target_waitstatus_to_string): New.
11658
11659 * tracepoint.c (tracing): Make extern.
11660 (disconnected_tracing): New.
11661 (stop_tracing): Make extern. Handle tracing stops due to GDB
11662 disconnecting.
11663 (cmd_qtdisconnected): New.
11664 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11665 (handle_tracepoint_general_set): Handle QTDisconnected.
11666
11667 * event-loop.c (event_handler_func): Change return type to int.
11668 (process_event): Bail out if the event handler wants the event
11669 loop to stop.
11670 (handle_file_event): Ditto.
11671 (start_event_loop): Bail out if the event handler wants the event
11672 loop to stop.
11673
11674 * nto-low.c (nto_target_ops): Adjust.
11675 * spu-low.c (spu_wait): Don't remove the process here.
11676 (spu_target_ops): Adjust.
11677 * win32-low.c (win32_wait): Don't remove the process here.
11678 (win32_target_ops): Adjust.
11679
5d267c4c
PA
116802010-04-11 Pedro Alves <pedro@codesourcery.com>
11681
11682 * regcache.c (realloc_register_cache): Invalidate inferior's
11683 regcache before recreating it.
11684
623ccd72
PA
116852010-04-09 Pedro Alves <pedro@codesourcery.com>
11686
11687 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11688
219f2f23
PA
116892010-04-09 Stan Shebs <stan@codesourcery.com>
11690 Pedro Alves <pedro@codesourcery.com>
11691
11692 * server.h (LONGEST): New.
11693 (struct thread_info) <while_stepping>: New field.
11694 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11695 Declare.
11696 (initialize_tracepoint, handle_tracepoint_general_set)
11697 (handle_tracepoint_query, tracepoint_finished_step)
11698 (tracepoint_was_hit, release_while_stepping_state_list):
11699 (current_traceframe): Declare.
11700 * server.c (handle_general_set): Handle tracepoint packets.
11701 (read_memory): New.
11702 (write_memory): New.
11703 (handle_search_memory_1): Use read_memory.
11704 (handle_query): Report support for conditional tracepoints, trace
11705 state variables, and tracepoint sources. Handle tracepoint
11706 queries.
11707 (main): Initialize the tracepoints module.
11708 (process_serial_event): Handle traceframe reads/writes.
11709
11710 * linux-low.c (handle_tracepoints): New.
11711 (linux_wait_1): Call it.
11712 (linux_resume_one_lwp): Handle while-stepping.
11713 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11714 (linux_target_ops): Install them.
11715 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11716 New field.
11717 * linux-x86-low.c (x86_supports_tracepoints): New.
11718 (the_low_target). Install it.
11719
11720 * mem-break.h (delete_breakpoint): Declare.
11721 * mem-break.c (delete_breakpoint): Make external.
11722
11723 * target.h (struct target_ops): Add `supports_tracepoints',
11724 `read_pc', and `write_pc' fields.
11725 (target_supports_tracepoints): Define.
11726 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11727 (phex_nz): New.
11728
11729 * regcache.h (struct regcache) <registers_owned>: New field.
11730 (init_register_cache, regcache_cpy): Declare.
11731 (regcache_read_pc, regcache_write_pc): Declare.
11732 (register_cache_size): Declare.
11733 (supply_regblock): Declare.
11734 * regcache.c (init_register_cache): New.
11735 (new_register_cache): Use it.
11736 (regcache_cpy): New.
11737 (register_cache_size): New.
11738 (supply_regblock): New.
11739 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11740
219f2f23
PA
11741 * tracepoint.c: New.
11742
11743 * Makefile.in (OBS): Add tracepoint.o.
11744 (tracepoint.o): New rule.
11745
3a13a53b
L
117462010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11747
11748 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11749 (i386-mmx.o): New.
11750 (i386-mmx.c): Likewise.
11751 (i386-mmx-linux.o): Likewise.
11752 (i386-mmx-linux.c): Likewise.
11753
11754 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11755 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11756 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11757 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11758
11759 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11760 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11761 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11762
1570b33e
L
117632010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11764
11765 * Makefile.in (clean): Updated.
11766 (i386-avx.o): New.
11767 (i386-avx.c): Likewise.
11768 (i386-avx-linux.o): Likewise.
11769 (i386-avx-linux.c): Likewise.
11770 (amd64-avx.o): Likewise.
11771 (amd64-avx.c): Likewise.
11772 (amd64-avx-linux.o): Likewise.
11773 (amd64-avx-linux.c): Likewise.
11774
11775 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11776 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11777 (srv_amd64_regobj): Add amd64-avx.o.
11778 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11779 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11780 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11781 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11782 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11783 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11784 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11785
11786 * i387-fp.c: Include "i386-xstate.h".
11787 (i387_xsave): New.
11788 (i387_cache_to_xsave): Likewise.
11789 (i387_xsave_to_cache): Likewise.
11790 (x86_xcr0): Likewise.
11791
11792 * i387-fp.h (i387_cache_to_xsave): Likewise.
11793 (i387_xsave_to_cache): Likewise.
11794 (x86_xcr0): Likewise.
11795
11796 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11797 * linux-crisv32-low.c (target_regsets): Likewise.
11798 * linux-m68k-low.c (target_regsets): Likewise.
11799 * linux-mips-low.c (target_regsets): Likewise.
11800 * linux-ppc-low.c (target_regsets): Likewise.
11801 * linux-s390-low.c (target_regsets): Likewise.
11802 * linux-sh-low.c (target_regsets): Likewise.
11803 * linux-sparc-low.c (target_regsets): Likewise.
11804 * linux-xtensa-low.c (target_regsets): Likewise.
11805
11806 * linux-low.c: Include <sys/uio.h>.
11807 (regsets_fetch_inferior_registers): Support nt_type.
11808 (regsets_store_inferior_registers): Likewise.
11809 (linux_process_qsupported): New.
11810 (linux_target_ops): Add linux_process_qsupported.
11811
11812 * linux-low.h (regset_info): Add nt_type.
11813 (linux_target_ops): Add process_qsupported.
11814
11815 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11816 and <sys/uio.h>.
11817 (init_registers_i386_avx_linux): New.
11818 (init_registers_amd64_avx_linux): Likewise.
11819 (xmltarget_i386_linux_no_xml): Likewise.
11820 (xmltarget_amd64_linux_no_xml): Likewise.
11821 (PTRACE_GETREGSET): Likewise.
11822 (PTRACE_SETREGSET): Likewise.
11823 (x86_fill_xstateregset): Likewise.
11824 (x86_store_xstateregset): Likewise.
11825 (use_xml): Likewise.
11826 (x86_linux_update_xmltarget): Likewise.
11827 (x86_linux_process_qsupported): Likewise.
11828 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11829 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11830 init_registers_i386_linux here. Call
11831 x86_linux_update_xmltarget.
11832 (the_low_target): Add x86_linux_process_qsupported.
11833
11834 * server.c (handle_query): Call target_process_qsupported.
11835
11836 * target.h (target_ops): Add process_qsupported.
11837 (target_process_qsupported): New.
11838
fc7238bb
PA
118392010-04-03 Pedro Alves <pedro@codesourcery.com>
11840
11841 * inferiors.c (add_thread): Set last_status kind to
11842 TARGET_WAITKIND_IGNORE.
11843 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11844 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11845 (linux_wait_1): Move `thread' local definition to block that uses
11846 it. Don't NULL initialize `event_child'.
11847 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11848 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11849 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11850
bdabb078
PA
118512010-04-01 Pedro Alves <pedro@codesourcery.com>
11852
11853 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11854 an extended waitstatus, or by a watchpoint.
11855 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11856 thread was stepping or has been stopped by a watchpoint.
11857
d3bbe7a0
PA
118582010-04-01 Pedro Alves <pedro@codesourcery.com>
11859
11860 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11861 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11862 of another, then delete the previous, and validate all
11863 breakpoints.
11864 (validate_inserted_breakpoint): New.
11865 (delete_disabled_breakpoints): New.
11866 (validate_breakpoints): New.
11867 (check_mem_read): Validate breakpoints before trusting their
11868 shadow. Delete disabled breakpoints.
11869 (check_mem_write): Validate breakpoints before trusting they
11870 should be inserted. Delete disabled breakpoints.
11871 * mem-break.h (validate_breakpoints):
11872 * server.c (handle_query): Validate breakpoints when we see a
11873 qSymbol query.
11874
8b07ae33
PA
118752010-04-01 Pedro Alves <pedro@codesourcery.com>
11876
11877 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11878 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11879 if we could tell there's a GDB breakpoint at stop_pc.
11880 (need_step_over_p): Don't do a step over if we find a GDB
11881 breakpoint at the resume PC.
11882
11883 * mem-break.c (struct raw_breakpoint): New.
11884 (enum bkpt_type): New type `gdb_breakpoint'.
11885 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11886 fields. New field `raw'.
11887 (find_raw_breakpoint_at): New.
11888 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11889 breakpoint instead.
11890 (set_breakpoint_at): Adjust.
11891 (delete_raw_breakpoint): New.
11892 (release_breakpoint): New.
11893 (delete_breakpoint): Rename to...
11894 (delete_breakpoint_1): ... this. Add proc parameter. Use
11895 release_breakpoint. Return ENOENT.
11896 (delete_breakpoint): Reimplement.
11897 (find_breakpoint_at): Delete.
11898 (find_gdb_breakpoint_at): New.
11899 (delete_breakpoint_at): Delete.
11900 (set_gdb_breakpoint_at): New.
11901 (delete_gdb_breakpoint_at): New.
11902 (gdb_breakpoint_here): New.
11903 (set_reinsert_breakpoint): Use release_breakpoint.
11904 (uninsert_breakpoint): Rename to ...
11905 (uninsert_raw_breakpoint): ... this.
11906 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11907 (reinsert_raw_breakpoint): Change parameter type to
11908 raw_breakpoint.
11909 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11910 instead.
11911 (check_breakpoints): Adjust. Use release_breakpoint.
11912 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11913 (breakpoint_inserted_here): Ditto.
11914 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11915 Don't trust the breakpoint's shadow if it is not inserted.
11916 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11917 (delete_all_breakpoints): Adjust.
11918 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11919 use delete_breakpoint_1.
11920
11921 * mem-break.h (breakpoints_supported): Delete declaration.
11922 (set_gdb_breakpoint_at): Declare.
11923 (gdb_breakpoint_here): Declare.
11924 (delete_breakpoint_at): Delete.
11925 (delete_gdb_breakpoint_at): Declare.
11926
11927 * server.h (struct raw_breakpoint): Forward declare.
11928 (struct process_info): New field `raw_breakpoints'.
11929
11930 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11931 breakpoints.
11932
6bf5e0ba
PA
119332010-03-24 Pedro Alves <pedro@codesourcery.com>
11934
11935 * linux-low.c (status_pending_p_callback): Fix comment.
11936 (linux_wait_for_event_1): Move most of the internal breakpoint
11937 handling from here...
11938 (linux_wait_1): ... to here.
11939 (count_events_callback): New.
11940 (select_singlestep_lwp_callback): New.
11941 (select_event_lwp_callback): New.
11942 (cancel_breakpoints_callback): New.
11943 (select_event_lwp): New.
11944 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11945 priority to all LWPs that have had events that should be reported
11946 to the client. Cancel breakpoints when about to reporting the
11947 event to the client, not while stopping lwps. No longer cancel
11948 finished single-steps here.
11949 (cancel_finished_single_step): Delete.
11950 (cancel_finished_single_steps): Delete.
11951
414a389f
PA
119522010-03-24 Pedro Alves <pedro@codesourcery.com>
11953
11954 * mem-break.c (enum bkpt_type): New.
11955 (struct breakpoint): New field `type'.
11956 (set_breakpoint_at): Change return type to struct breakpoint
11957 pointer. Set type to `other_breakpoint' by default.
11958 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11959 in the breakpoint list.
11960 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11961 (reinsert_breakpoint): Rename to ...
11962 (reinsert_raw_breakpoint): ... this.
11963 (reinsert_breakpoints_at): Adjust.
11964 * mem-break.h (struct breakpoint): Declare.
11965 (set_breakpoint_at): Change return type to struct breakpoint
11966 pointer.
11967
2280c721
PA
119682010-03-24 Pedro Alves <pedro@codesourcery.com>
11969
11970 * server.c (handle_query): Assign, not compare.
11971
d50171e4
PA
119722010-03-24 Pedro Alves <pedro@codesourcery.com>
11973
11974 Teach linux gdbserver to step-over-breakpoints.
11975
11976 * linux-low.c (can_hardware_single_step): New.
11977 (supports_breakpoints): New.
11978 (handle_extended_wait): If stopping threads, read the stop pc of
11979 the new cloned LWP.
11980 (get_pc): New.
11981 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11982 low target doesn't support retrieving the PC.
11983 (add_lwp): Set last_resume_kind to resume_continue.
11984 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11985 (linux_attach): Don't clear stop_expected. Set the lwp's
11986 last_resume_kind to resume_stop.
11987 (linux_detach_one_lwp): Don't check for removed breakpoints.
11988 (check_removed_breakpoint): Delete.
11989 (status_pending_p): Rename to ...
11990 (status_pending_p_callback): ... this. Don't check for removed
11991 breakpoints. Don't consider threads that are stopped from GDB's
11992 perspective.
11993 (linux_wait_for_lwp): Always read the stop_pc here.
11994 (cancel_breakpoint): New.
11995 (step_over_bkpt): New global.
11996 (linux_wait_for_event_1): Implement stepping over breakpoints.
11997 (gdb_wants_lwp_stopped): New.
11998 (gdb_wants_all_stopped): New.
11999 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
12000 single-step traps here. Store the thread's last reported target
12001 wait status.
12002 (send_sigstop): Don't clear stop_expected. Always set it,
12003 instead.
12004 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12005 (cancel_finished_single_step): New.
12006 (cancel_finished_single_steps): New.
12007 (wait_for_sigstop): Don't cancel finished single-step traps here.
12008 (linux_resume_one_lwp): Don't check for removed breakpoints.
12009 Don't set `step' on non-hardware step archs.
12010 (linux_set_resume_request): Ignore resume_stop requests if already
12011 stopping or stopped. Set the lwp's last_resume_kind.
12012 (resume_status_pending_p): Don't check for removed breakpoints.
12013 (need_step_over_p): New.
12014 (start_step_over): New.
12015 (finish_step_over): New.
12016 (linux_resume_one_thread): Always queue a sigstop for resume_stop
12017 requests. Clear the thread's last reported target waitstatus.
12018 Don't use the `suspended' flag. Don't consider pending breakpoints.
12019 (linux_resume): Start a step-over if necessary.
12020 (proceed_one_lwp): New.
12021 (proceed_all_lwps): New.
12022 (unstop_all_lwps): New.
12023 * linux-low.h (struct lwp_info): Rewrite comment for the
12024 `suspended' flag. Add the `stop_pc' field. Delete the
12025 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
12026 Add `'last_resume_kind' and `need_step_over' fields.
12027 * inferiors.c (struct thread_info): Delete, moved elsewhere.
12028 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12029 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
12030 (set_raw_breakpoint_at): New.
12031 (set_breakpoint_at): Rewrite to use it.
12032 (reinsert_breakpoint_handler): Delete.
12033 (set_reinsert_breakpoint): New.
12034 (reinsert_breakpoint_by_bp): Delete.
12035 (delete_reinsert_breakpoints): New.
12036 (uninsert_breakpoint): Rewrite.
12037 (uninsert_breakpoints_at): New.
12038 (reinsert_breakpoint): Rewrite.
12039 (reinsert_breakpoints_at): New.
12040 (check_breakpoints): Rewrite.
12041 (breakpoint_here): New.
12042 (breakpoint_inserted_here): New.
12043 (check_mem_read): Adjust.
12044 * mem-break.h (breakpoints_supported, breakpoint_here)
12045 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12046 (reinsert_breakpoint_by_bp): Delete declaration.
12047 (delete_reinsert_breakpoints): Declare.
12048 (reinsert_breakpoint): Delete declaration.
12049 (reinsert_breakpoints_at): Declare.
12050 (uninsert_breakpoint): Delete declaration.
12051 (uninsert_breakpoints_at): Declare.
12052 (check_breakpoints): Adjust prototype.
12053 * server.h: Adjust include order.
12054 (struct thread_info): Declare here. Add a `last_status' field.
12055
30ba68cb
MS
120562010-03-23 Michael Snyder <msnyder@vmware.com>
12057
12058 * server.c (crc32): New function.
12059 (handle_query): Add handling for 'qCRC:' request.
12060
b9a881c2
PA
120612010-03-23 Pedro Alves <pedro@codesourcery.com>
12062
12063 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12064 lwp had been stopped by a watchpoint.
12065
e92d13d5
PA
120662010-03-16 Pedro Alves <pedro@codesourcery.com>
12067
12068 * server.h (internal_error): Declare.
12069 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12070 * utils.c (internal_error): New function.
12071
64daa791
AS
120722010-03-15 Andreas Schwab <schwab@redhat.com>
12073
12074 * configure.srv: Fix typo setting srv_regobj.
12075
f52cd8cd
PA
120762010-03-15 Pedro Alves <pedro@codesourcery.com>
12077
12078 * linux-low.c (fetch_register): Avoid passing a non string literal
12079 format to `error'.
12080 (usr_store_inferior_registers): Ditto.
12081
93ae6fdc
PA
120822010-03-14 Pedro Alves <pedro@codesourcery.com>
12083
12084 * linux-low.c (linux_write_memory): Bail out early if peeking
12085 memory failed.
12086
c3adc08c
PA
120872010-03-14 Pedro Alves <pedro@codesourcery.com>
12088
12089 * linux-low.h (struct lwp_info): New fields
12090 `stopped_by_watchpoint' and `stopped_data_address'.
12091 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12092 here, and cache them in the lwp object.
12093 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12094 directly.
12095 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12096 field.
12097 (linux_stopped_by_watchpoint): Rewrite.
12098 (linux_stopped_data_address): Rewrite.
12099
bce522a2
PA
121002010-03-06 Simo Melenius <simo.melenius@iki.fi>
12101
12102 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12103 switching the current inferior, not before.
12104
90884b2b
L
121052010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12106
12107 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12108 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12109 i386-linux.c and amd64-linux.c.
12110 (reg-i386.o): Removed.
12111 (reg-i386.c): Likewise.
12112 (reg-i386-linux.o): Likewise.
12113 (reg-i386-linux.c): Likewise.
12114 (reg-x86-64.o): Likewise.
12115 (reg-x86-64.c): Likewise.
12116 (reg-x86-64-linux.o): Likewise.
12117 (reg-x86-64-linux.c): Likewise.
12118 (i386.o): New.
12119 (i386.c): Likewise.
12120 (i386-linux.o): Likewise.
12121 (i386-linux.c): Likewise.
12122 (amd64.o): Likewise.
12123 (amd64.c): Likewise.
12124 (amd64-linux.o): Likewise.
12125 (amd64-linux.c): Likewise.
12126
12127 * configure.srv (srv_i386_regobj): New.
12128 (srv_i386_linux_regobj): Likewise.
12129 (srv_amd64_regobj): Likewise.
12130 (srv_amd64_linux_regobj): Likewise.
12131 (srv_i386_32bit_xmlfiles): Likewise.
12132 (srv_i386_64bit_xmlfiles): Likewise.
12133 (srv_i386_xmlfiles): Likewise.
12134 (srv_amd64_xmlfiles): Likewise.
12135 (srv_i386_linux_xmlfiles): Likewise.
12136 (srv_amd64_linux_xmlfiles): Likewise.
12137 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12138 srv_xmlfiles to $srv_i386_xmlfiles.
12139 (i[34567]86-*-mingw32ce*): Likewise.
12140 (i[34567]86-*-mingw*): Likewise.
12141 (i[34567]86-*-nto*): Likewise.
12142 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12143 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12144 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12145 (x86_64-*-linux*): Likewise.
12146
12147 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12148 (init_registers_amd64_linux): New.
12149 (x86_arch_setup): Replace init_registers_x86_64_linux with
12150 init_registers_amd64_linux.
12151
193f13e6
MK
121522010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12153
12154 * configure.ac: Check for libdl. If it is not available link against
12155 static libthread_db.
12156 * configure: Regenerate.
12157
85d721b8
PA
121582010-02-22 Pedro Alves <pedro@codesourcery.com>
12159
12160 PR9605
12161
12162 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12163 handing a read watchpoint.
12164 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12165
6076632b
DE
121662010-02-12 Doug Evans <dje@google.com>
12167
12168 * linux-low.c (linux_supports_tracefork_flag): Document.
12169 (linux_look_up_symbols): Add comment.
12170
3327ccf7
L
121712010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12172
12173 * regcache.c (supply_register): Clear regcache if buf is NULL.
12174
0718675c 121752010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12176 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12177
12178 * inferiors.c (find_inferior): Add function documentation.
12179 (unloaded_dll): Handle the case where the unloaded dll has not
12180 been previously registered in the dll list.
12181
177321bd
DJ
121822010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12183
12184 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12185 (thumb2_breakpoint): New.
12186 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12187
2b009048
DJ
121882010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12189
12190 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12191 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12192 breakpoints.
12193
3be029c7
PA
121942010-01-21 Pedro Alves <pedro@codesourcery.com>
12195
12196 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12197
18f5de3b
JK
121982010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12199
12200 * linux-s390-low.c (s390_collect_ptrace_register)
12201 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12202
3743bb4f
DE
122032010-01-21 Doug Evans <dje@google.com>
12204
14ce3065
DE
12205 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12206 (PTRACE_ARG4_TYPE): New macro.
12207 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12208 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12209 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12210 (usr_store_inferior_registers): Ditto.
12211 (linux_read_memory, linux_write_memory): Ditto.
12212 (linux_test_for_tracefork): Ditto.
12213
3743bb4f
DE
12214 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12215 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12216
8b315be5
PA
122172010-01-21 Pedro Alves <pedro@codesourcery.com>
12218
12219 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12220 target.
12221
85492558
PA
122222010-01-21 Pedro Alves <pedro@codesourcery.com>
12223
12224 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12225 prototype to take a regcache. Adjust.
12226
442ea881
PA
122272010-01-20 Pedro Alves <pedro@codesourcery.com>
12228
12229 * regcache.h (struct thread_info): Forward declare.
12230 (struct regcache): New.
12231 (new_register_cache): Adjust prototype.
12232 (get_thread_regcache): Declare.
12233 (free_register_cache): Adjust prototype.
12234 (registers_to_string, registers_from_string): Ditto.
12235 (supply_register, supply_register_by_name, collect_register)
12236 (collect_register_as_string, collect_register_by_name): Ditto.
12237 * regcache.c (struct inferior_regcache_data): Delete.
12238 (get_regcache): Rename to ...
12239 (get_thread_regcache): ... this. Adjust. Switch inferior before
12240 fetching registers.
12241 (regcache_invalidate_one): Adjust.
12242 (regcache_invalidate): Fix prototype.
12243 (new_register_cache): Return the new register cache.
12244 (free_register_cache): Change prototype.
12245 (realloc_register_cache): Adjust.
12246 (registers_to_string): Change prototype to take a regcache. Adjust.
12247 (registers_from_string): Ditto.
12248 (register_data): Ditto.
12249 (supply_register): Ditto.
12250 (supply_register_by_name): Ditto.
12251 (collect_register): Ditto.
12252 (collect_register_as_string): Ditto.
12253 (collect_register_by_name): Ditto.
12254 * server.c (process_serial_event): Adjust.
12255 * linux-low.h (regset_fill_func, regset_store_func): Change
12256 prototype.
12257 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12258 Change prototype.
12259 * linux-low.c (get_stop_pc): Adjust.
12260 (check_removed_breakpoint): Adjust.
12261 (linux_wait_for_event): Adjust.
12262 (linux_resume_one_lwp): Adjust.
12263 (fetch_register): Add regcache parameter. Adjust.
12264 (usr_store_inferior_registers): Ditto.
12265 (regsets_fetch_inferior_registers): Ditto.
12266 (regsets_store_inferior_registers): Ditto.
12267 (linux_fetch_registers, linux_store_registers): Ditto.
12268 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12269 regcache. Adjust.
43aaf8b6
PA
12270 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12271 Ditto.
442ea881
PA
12272 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12273 prototype to take a regcache.
12274 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12275 * remote-utils.c (convert_ascii_to_int, outreg)
12276 (prepare_resume_reply): Change prototype to take a regcache.
12277 Adjust.
12278 * target.h (struct target_ops) <fetch_registers, store_registers>:
12279 Change prototype to take a regcache.
12280 (fetch_inferior_registers, store_inferior_registers): Change
12281 prototype to take a regcache. Adjust.
12282 * proc-service.c (ps_lgetregs): Adjust.
12283 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12284 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12285 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12286 take a regcache. Adjust.
12287 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12288 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12289 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12290 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12291 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12292 (cris_cannot_fetch_register):
12293 (cris_breakpoint_at): Change prototype to take a regcache.
12294 Adjust.
12295 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12296 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12297 to take a regcache. Adjust.
12298 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12299 Adjust.
12300 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12301 take a regcache. Adjust.
12302 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12303 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12304 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12305 * linux-mips-low.c (mips_get_pc):
12306 (mips_set_pc): Change prototype to take a regcache. Adjust.
12307 (mips_reinsert_addr): Adjust.
12308 (mips_collect_register): Change prototype to take a regcache.
12309 Adjust.
12310 (mips_supply_register):
12311 (mips_collect_register_32bit, mips_supply_register_32bit)
12312 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12313 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12314 * linux-ppc-low.c (ppc_supply_ptrace_register)
12315 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12316 (parse_spufs_run): Adjust.
12317 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12318 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12319 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12320 take a regcache. Adjust.
12321 * linux-s390-low.c (s390_collect_ptrace_register)
12322 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12323 (s390_set_pc): Change prototype to take a regcache. Adjust.
12324 (s390_arch_setup): Adjust.
12325 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12326 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12327 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12328 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12329 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12330 regcache. Adjust.
12331 (sparc_breakpoint_at): Adjust.
12332 * linux-xtensa-low.c (xtensa_fill_gregset):
12333 (xtensa_store_gregset):
12334 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12335 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12336 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12337 prototype to take a regcache. Adjust.
12338 * win32-arm-low.c (arm_fetch_inferior_register)
12339 (arm_store_inferior_register): Change prototype to take a
12340 regcache. Adjust.
12341 * win32-i386-low.c (i386_fetch_inferior_register)
12342 (i386_store_inferior_register): Change prototype to take a
12343 regcache. Adjust.
12344 * win32-low.c (child_fetch_inferior_registers)
12345 (child_store_inferior_registers): Change prototype to take a
12346 regcache. Adjust.
12347 (win32_wait): Adjust.
12348 (win32_fetch_inferior_registers): Change prototype to take a
12349 regcache. Adjust.
12350 (win32_store_inferior_registers): Adjust.
12351 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12352 store_inferior_register>: Change prototype to take a regcache.
12353
60c3d7b0
DE
123542010-01-20 Doug Evans <dje@google.com>
12355
12356 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12357 #ifdef.
12358 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12359 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12360
dc146f7c
VP
123612010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12362
12363 * linux-low.c (linux_core_of_thread): New.
12364 (compare_ints, show_process, list_threads): New.
12365 (linux_qxfer_osdata): Report threads and cores.
12366 (linux_target_op): Register linux_core_of_thread.
12367 * remote-utils.c (prepare_resume_reply): Report the core.
12368 (buffer_xml_printf): Support %d specifier.
12369 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12370 New.
12371 (handle_query): Handle qXfer:threads. Announce availability
12372 thereof.
12373 * target.h (struct target_ops): New field core_of_thread.
12374
7803799a
UW
123752010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12376
12377 * Makefile.in (clean): Remove new generated files.
12378 (reg-s390.o, reg-s390.c): Remove rules.
12379 (reg-s390x.o, reg-s390x.c): Likewise.
12380 (s390-linux32.o, s390-linux32.c): Add rules.
12381 (s390-linux64.o, s390-linux64.c): Likewise.
12382 (s390x-linux64.o, s390x-linux64.c): Likewise.
12383 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12384 * linux-s390-low.c: Include <elf.h>.
12385 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12386 (init_registers_s390): Remove prototype.
12387 (init_registers_s390x): Likewise.
12388 (init_registers_s390_linux32): Add prototype.
12389 (init_registers_s390_linux64): Likewise.
12390 (init_registers_s390x_linux64): Likewise.
12391 (s390_num_regs_3264): New define.
12392 (s390_regmap_3264): New global variable.
12393 (s390_cannot_fetch_register): Remove obsolete check.
12394 (s390_cannot_store_register): Likewise.
12395 (s390_collect_ptrace_register): Handle upper/lower register halves.
12396 (s390_supply_ptrace_register): Likewise.
12397 (s390_fill_gregset): Update to register number changes.
12398 (s390_get_hwcap): New routine.
12399 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12400 Install appropriate regmap and register set.
12401
6e7ffa39
JB
124022010-01-01 Joel Brobecker <brobecker@adacore.com>
12403
12404 * server.c (gdbserver_version): Update copyright year to 2010.
12405 * gdbreplay.c (gdbreplay_version): Likewise.
12406
957f3f49
DE
124072009-12-28 Doug Evans <dje@google.com>
12408
12409 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12410 elf/external.h. Include <elf.h> instead but only if necessary.
12411
ca5c370d
PA
124122009-12-28 Pedro Alves <pedro@codesourcery.com>
12413
12414 * linux-low.c (linux_remove_process): Remove `detaching'
12415 parameter. Don't release/detach from thread_db here.
12416 (linux_kill): Release/detach from thread_db here, ...
12417 (linux_detach): ... and here, before actually detaching.
12418 (linux_wait_1): ... and here, when a process exits.
12419 * thread-db.c (any_thread_of): New.
12420 (thread_db_free): Switch the current inferior to a thread of the
12421 passed in process.
12422
4ee62156
DE
124232009-12-21 Doug Evans <dje@google.com>
12424
d90e6a88
DE
12425 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12426
c5f62d5f
DE
12427 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12428 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12429 warning ifndef __NR_tkill. Move setting of errno there too.
12430 Delete unnecessary resetting of errno after syscall.
12431 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12432
10e86dd7
DE
12433 * configure.ac: Check for dladdr.
12434 * config.in: Regenerate.
12435 * configure: Regenerate.
12436 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12437 (try_thread_db_load): Update.
12438
4ee62156
DE
12439 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12440
00f515da
DE
124412009-12-18 Doug Evans <dje@google.com>
12442
e9464885
DE
12443 * event-loop.c: Include unistd.h if it exists.
12444
07d4f67e
DE
12445 * linux-low.c (my_waitpid): Move definition away from being in
12446 between linux_tracefork_child/linux_test_for_tracefork.
12447
00f515da
DE
12448 * gdb_proc_service.h (psaddr_t): Fix type.
12449 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12450 signature to match glibc.
12451
1de1badb
DE
124522009-12-16 Doug Evans <dje@google.com>
12453
12454 * linux-low.c (linux_read_memory): Fix argument to read.
12455
aeeb81d1
PA
124562009-11-26 Pedro Alves <pedro@codesourcery.com>
12457
12458 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12459 events, don't leave current_inferior pointing at null.
12460
10357975
PA
124612009-11-26 Pedro Alves <pedro@codesourcery.com>
12462
12463 * win32-low.c (LOG): Delete.
12464 (OUTMSG): Output to stderr.
12465 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12466 on compile time LOG macro.
12467 (win32_wait): Fix debug output.
12468
cf6e3471
PA
124692009-11-26 Pedro Alves <pedro@codesourcery.com>
12470
12471 * win32-low.c (win32_add_one_solib): If the dll name is
12472 "ntdll.dll", prepend the system directory to the dll path.
12473
0c85e18e
MK
124742009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12475
12476 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12477
9ac544ce 124782009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12479 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12480
12481 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12482 * configure.ac: Check for __mcoldfire__ and set
12483 gdb_cv_m68k_is_coldfire.
12484 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12485 reg-cf.o and reg-m68k.o.
12486 * configure: Regenerated.
12487
fd7dd3e6
PA
124882009-11-16 Pedro Alves <pedro@codesourcery.com>
12489
12490 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12491 Pass it to thread_db_free.
12492 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12493 proper `detaching' argument to linux_remove_process.
12494 * linux-low.h (thread_db_free): Add `detaching' parameter.
12495 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12496 to thread_db_free.
12497 (thread_db_free): Add `detaching' parameter. Only
12498 call td_ta_clear_event if detaching from process.
12499
75aa492e
MK
125002009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12501
12502 * thread-db.c (thread_db_free): Fix typo.
12503
21e1bee4
PP
125042009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12505
12506 PR gdb/10838
12507 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12508
8838b45e
NS
125092009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12510
12511 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12512 with an i686 compiler.
12513 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12514 needed.
12515 * configure: Rebuilt.
12516
8a35fb51
SL
125172009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12518
12519 PR gdb/10783
12520
12521 * server.c (handle_search_memory_1): Correct read_addr initialization
12522 in loop for searching subsequent chunks.
12523
96f15937
PP
125242009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12525
12526 * configure.ac: New --with-libthread-db option.
12527 * thread-db.c: Allow direct dependence on libthread_db.
12528 (thread_db_free): Adjust.
12529 * config.in: Regenerate.
12530 * configure: Likewise.
889bf7c5 12531
5f7d1694
PP
125322009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12533
12534 PR gdb/10757
12535 * thread-db.c (attach_thread): New function.
12536 (maybe_attach_thread): Return success/failure.
12537 (find_new_threads_callback): Adjust.
889bf7c5
PA
12538 (thread_db_find_new_threads): Loop until no new threads.
12539
88e3b899
PA
125402009-10-13 Pedro Alves <pedro@codesourcery.com>
12541
12542 * proc-service.c (ps_lgetregs): Formatting.
12543
cdbfd419
PP
125442009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12545
12546 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12547 * configure.ac: Adjust.
12548 * linux-low.h (struct process_info_private): Move members to struct
12549 thread_db.
12550 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12551 * linux-low.c (linux_remove_process): Adjust.
12552 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12553 * server.c (handle_query): Move code ...
12554 (handle_monitor_command): ... here. New function.
12555 * target.h (struct target_ops): New member.
12556 * thread-db.c (struct thread_db): New.
12557 (libthread_db_search_path): New variable.
12558 (thread_db_create_event, thread_db_enable_reporting)
12559 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12560 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12561 (try_thread_db_load_1, dladdr_to_soname): New functions.
12562 (try_thread_db_load, thread_db_load_search): New functions.
12563 (thread_db_init): Search for libthread_db.
12564 (thread_db_free): New function.
12565 (thread_db_handle_monitor_command): Likewise.
12566 * config.in: Regenerate.
12567 * configure: Regenerate.
889bf7c5 12568
4168d2d6
UW
125692009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12570
12571 * spu-low.c (spu_kill): Wait for inferior to terminate.
12572 Call clear_inferiors.
12573 (spu_detach): Call clear_inferiors.
12574
81ecdfbb
RW
125752009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12576
12577 * aclocal.m4: Regenerate.
12578 * config.in: Likewise.
12579 * configure: Likewise.
12580
0b9ff2c0
UW
125812009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12582
12583 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12584 (parse_spufs_run): New function.
12585 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12586 (ppc_breakpoint_at): Handle SPU breakpoints.
12587
efcbbd14
UW
125882009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12589
12590 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12591 (SPUFS_MAGIC): Define.
12592 (spu_enumerate_spu_ids): New function.
12593 (linux_qxfer_spu): New function.
12594 (linux_target_ops): Install linux_qxfer_spu.
12595
f4d9bade
UW
125962009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12597
12598 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12599 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12600 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12601 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12602 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12603 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12604 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12605 (init_registers_powerpc_cell32l): Add prototype.
12606 (init_registers_powerpc_cell64l): Likewise.
12607 (ppc_arch_setup): Detect Cell/B.E. architecture.
12608
96e946ca
RW
126092009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12610
12611 * Makefile.in (datarootdir): New variable.
12612
58d6951d
DJ
126132009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12614
12615 * linux-low.c (linux_write_memory): Update debugging output.
12616 * Makefile.in (clean): Add new descriptions.
12617 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12618 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12619 * configure.srv: Add new files for arm*-*-linux*.
12620 * linux-arm-low.c: Add new declarations.
12621 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12622 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12623 (HWCAP_VFPv3D16): New.
12624 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12625 instead of __IWMMXT__.
12626 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12627 (arm_arch_setup): New.
12628 (target_regsets): Remove #ifdef. Add VFP regset.
12629 (the_low_target): Use arm_arch_setup.
12630
12b42a12
DJ
126312009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12632
12633 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12634 the main thread again.
12635
ac8c974e
AR
126362009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12637
12638 Adding Neutrino gdbserver.
12639 * configure: Regenerated.
12640 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12641 * configure.srv (i[34567]86-*-nto*): New target.
12642 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12643 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12644 (nto_comctrl) [__QNX__]: New function.
12645 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12646
4424e0c3 126472009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12648
12649 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12650 srv_tgtobj.
12651
912cf4ba
PA
126522009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12653 Pedro Alves <pedro@codesourcery.com>
12654
12655 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12656 don't support CONTEXT_EXTENDED_REGISTERS.
12657 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12658 (the_low_target): Install them.
12659 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12660 failing with ERROR_PIPE_NOT_CONNECTED.
12661
aa5ca48f
DE
126622009-06-30 Doug Evans <dje@google.com>
12663 Pierre Muller <muller@ics.u-strasbg.fr>
12664
12665 Add h/w watchpoint support to x86-linux, win32-i386.
12666 * Makefile.in (SFILES): Add i386-low.c
12667 (i386_low_h): Define.
12668 (i386-low.o): Add dependencies.
12669 (linux-x86-low.o): Add i386-low.h dependency.
12670 (win32-i386-low.o): Ditto.
12671 * i386-low.c: New file.
12672 * i386-low.h: New file.
12673 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12674 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12675 * linux-low.c (linux_add_process): Initialize arch_private.
12676 (linux_remove_process): Free arch_private.
12677 (add_lwp): Initialize arch_private.
12678 (delete_lwp): Free arch_private.
12679 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12680 provided.
12681 * linux-low.h (process_info_private): New member arch_private.
12682 (lwp_info): New member arch_private.
12683 (linux_target_ops): New members new_process, new_thread,
12684 prepare_to_resume.
12685 (ptid_of): New macro.
12686 * linux-x86-low.c: Include stddef.h, i386-low.h.
12687 (arch_process_info): New struct.
12688 (arch_lwp_info): New struct.
12689 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12690 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12691 (i386_dr_low_get_status): New function.
12692 (x86_insert_point, x86_remove_point): New functions.
12693 (x86_stopped_by_watchpoint): New function.
12694 (x86_stopped_data_address): New function.
12695 (x86_linux_new_process, x86_linux_new_thread): New functions.
12696 (x86_linux_prepare_to_resume): New function.
12697 (the_low_target): Add entries for insert_point, remove_point,
12698 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12699 prepare_to_resume.
12700 * server.c (debug_hw_points): New global.
12701 (monitor_show_help): Document set debug-hw-points.
12702 (handle_query): Process "set debug-hw-points".
12703 * server.h (debug_hw_points): Declare.
12704 (paddress): Declare.
12705 * utils.c (NUMCELLS, CELLSIZE): New macros.
12706 (get_sell, xsnprintf, paddress): New functions.
12707 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12708 remove_point, stopped_by_watchpoint, stopped_data_address.
12709 * win32-i386-low.c: Include i386-low.h.
12710 (debug_reg_state): Replaces dr.
12711 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12712 (i386_dr_low_get_status): New function.
12713 (i386_insert_point, i386_remove_point): New functions.
12714 (i386_stopped_by_watchpoint): New function.
12715 (i386_stopped_data_address): New function.
12716 (i386_initial_stuff): Update.
12717 (get_thread_context,set_thread_context,i386_thread_added): Update.
12718 (the_low_target): Add entries for insert_point,
12719 remove_point, stopped_by_watchpoint, stopped_data_address.
12720 * win32-low.c (win32_insert_watchpoint): New function.
12721 (win32_remove_watchpoint): New function.
12722 (win32_stopped_by_watchpoint): New function.
12723 (win32_stopped_data_address): New function.
12724 (win32_target_ops): Add entries for insert_watchpoint,
12725 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12726 * win32-low.h (win32_target_ops): New members insert_point,
12727 remove_point, stopped_by_watchpoint, stopped_data_address.
12728
d993e290
PA
127292009-06-25 Pedro Alves <pedro@codesourcery.com>
12730
12731 * server.c (process_serial_event): Re-return unsupported, not
12732 error, if the type isn't recognized. Re-allow supporting only
12733 insert or remove packets. Also call require_running for
12734 breakpoints. Add missing break statement to default case. Tidy.
12735 * target.h (struct target_ops): Rename insert_watchpoint to
12736 insert_point, and remove_watchpoint to remove_point.
12737
12738 * linux-low.h (struct linux_target_ops): Likewise.
12739 * linux-low.c (linux_insert_watchpoint): Rename to ...
12740 (linux_insert_point): ... this. Adjust.
12741 (linux_remove_watchpoint): Rename to ...
12742 (linux_remove_point): ... this. Adjust.
12743 (linux_target_ops): Adjust.
12744 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12745 (cris_insert_point): ... this.
12746 (cris_remove_watchpoint): Rename to ...
12747 (cris_remove_point): ... this.
12748 (the_low_target): Adjust.
12749
0f54c268
PM
127502009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12751
12752 * server.c (handle_v_kill): Pass signal_pid to
12753 kill_inferior if multi_process is zero.
12754
c6314022
AR
127552009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12756
12757 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12758 * target.h (target_ops): Comment for *_watchpoint to make it clear
12759 the functions can get types '0' and '1'.
12760
4463ce24
AR
127612009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12762
12763 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12764 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12765 * regcache.c (get_regcache): Likewise.
12766 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12767 * win32-low.c (child_fetch_inferior_registers): Remove check for
12768 regno 0.
12769
cf8fd78b
PA
127702009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12771 Pedro Alves <pedro@codesourcery.com>
12772
12773 * target.h (struct target_ops) <supports_multi_process>: New
12774 callback.
12775 (target_supports_multi_process): New.
12776 * server.c (handle_query): Even if GDB reports support, only
12777 enable multi-process if the target also supports it. Report
12778 multi-process support only if the target backend supports it.
12779 * linux-low.c (linux_supports_multi_process): New function.
12780 (linux_target_ops): Install it as target_supports_multi_process
12781 callback.
12782
47c0c975
DE
127832009-05-24 Doug Evans <dje@google.com>
12784
e09875d4
DE
12785 Global renaming of find_thread_pid to find_thread_ptid.
12786 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12787 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12788 All callers updated.
12789
e27d73f6
DE
12790 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12791 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12792 directly.
12793
47c0c975
DE
12794 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12795 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12796 (linux_resume_one_lwp): Ditto.
12797
2acc282a
DE
127982009-05-23 Doug Evans <dje@google.com>
12799
12800 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12801 from struct inferior_list_entry * to struct lwp_info *.
12802 All callers updated.
12803
9f1036c1
DE
128042009-05-13 Doug Evans <dje@google.com>
12805
12806 * linux-x86-low.c: Don't include assert.h.
12807 (x86_siginfo_fixup): Use fatal, not assert.
12808 (x86_arch_setup): Fix comment.
12809
d0722149
DE
128102009-05-12 Doug Evans <dje@google.com>
12811
12812 Biarch support for i386/amd64 gdbserver.
12813 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12814 Add linux-x86-low.c.
12815 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12816 (linux-x86-low.o): Add.
12817 * linux-x86-64-low.c: Delete.
12818 * linux-i386-low.c: Delete.
12819 * linux-x86-low.c: New file.
12820 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12821 linux-x86-low.o.
12822 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12823 linux-x86-low.o.
12824 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12825 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12826 (linux_child_pid_to_exec_file): New function.
12827 (elf_64_header_p, elf_64_file_p): New functions.
12828 (siginfo_fixup): New function.
12829 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12830 give target a chance to convert layout.
12831 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12832 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12833
fdeb2a12
DE
128342009-05-07 Doug Evans <dje@google.com>
12835
12836 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12837 (regsets_store_inferior_registers): Ditto.
12838
a6dbe5df
PA
128392009-05-06 Pedro Alves <pedro@codesourcery.com>
12840
12841 PR server/10048
12842
12843 * linux-low.c (must_set_ptrace_flags): Delete.
12844 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12845 of the global.
12846 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12847 `lwp->must_set_ptrace_flags' instead.
ba42693b 12848 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12849 (linux_wait_1): ... not here.
12850
5091eb23
DE
128512009-04-30 Doug Evans <dje@google.com>
12852
9f767825
DE
12853 * inferiors.c (started_inferior_callback): New function.
12854 (attached_inferior_callback): New function.
12855 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12856 * server.c (print_started_pid, print_attached_pid): New functions.
12857 (detach_or_kill_for_exit): New function.
12858 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12859 * server.h (have_started_inferiors_p): Declare.
12860 (have_attached_inferiors_p): Declare.
12861
5091eb23
DE
12862 * inferiors.c (remove_process): Fix memory leak, free process.
12863 * linux-low.c (linux_remove_process): New function.
12864 (linux_kill): Call it instead of remove_process.
12865 (linux_detach, linux_wait_1): Ditto.
12866
155c8968
PA
128672009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12868
12869 * configure.srv: Add x86 Windows CE target.
12870
7fe519cb
UW
128712009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12872
12873 * inferiors.c (get_thread_process): Make global.
12874 * server.h (get_thread_process): Add prototype.
12875 * thread-db.c (find_one_thread): Use get_thread_process
12876 instead of current_process.
12877 (thread_db_get_tls_address): Do not crash if called when
12878 thread layer is not yet initialized.
12879
5472f405
UW
128802009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12881
12882 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12883 * spu-low.c (current_tid): Rename to ...
12884 (current_ptid): ... this.
12885 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12886 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12887 ptid_get_lwp (current_ptid) instead of current_tid.
12888 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12889 instead of current_tid. Use find_process_pid to verify pid
12890 argument is valid. Pass proper argument to remove_process.
12891 (spu_thread_alive): Compare current_ptid instead of current_tid.
12892 (spu_resume): Likewise.
12893
55ac2b99
PA
128942009-04-02 Pedro Alves <pedro@codesourcery.com>
12895
12896 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12897 variable.
12898
95954743
PA
128992009-04-01 Pedro Alves <pedro@codesourcery.com>
12900
12901 Implement the multiprocess extensions, and add linux multiprocess
12902 support.
12903
12904 * server.h (ULONGEST): Declare.
12905 (struct ptid, ptid_t): New.
12906 (minus_one_ptid, null_ptid): Declare.
12907 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12908 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12909 (struct inferior_list_entry): Change `id' type from unsigned from
12910 to ptid_t.
12911 (struct sym_cache, struct breakpoint, struct
12912 process_info_private): Forward declare.
12913 (struct process_info): Declare.
12914 (current_process): Declare.
12915 (all_processes): Declare.
12916 (initialize_inferiors): Declare.
12917 (add_thread): Adjust to use ptid_t.
12918 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12919 (add_process, remove_process, find_thread_pid): Declare.
12920 (find_inferior_id): Adjust to use ptid_t.
12921 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12922 (multi_process): Declare.
12923 (push_event): Adjust to use ptid_t.
12924 (read_ptid, write_ptid): Declare.
12925 (prepare_resume_reply): Adjust to use ptid_t.
12926 (clear_symbol_cache): Declare.
12927 * inferiors.c (all_processes): New.
12928 (null_ptid, minus_one_ptid): New.
12929 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12930 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12931 (add_thread): Change unsigned long to ptid. Remove gdb_id
12932 parameter. Adjust.
12933 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12934 (gdb_id_to_thread): Rename to ...
12935 (find_thread_pid): ... this. Change unsigned long to ptid.
12936 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12937 (loaded_dll, pull_pid_from_list): Adjust.
12938 (add_process, remove_process, find_process_pid)
12939 (get_thread_process, current_process, initialize_inferiors): New.
12940 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12941 (struct target_waitstatus) <related_pid>: Ditto.
12942 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12943 return type to int.
12944 (struct target_ops) <join>: Add `pid' argument.
12945 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12946 (struct target_ops) <wait>: Add `ptid' field. Change return type
12947 to ptid.
12948 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12949 (mywait): Add `ptid' argument. Change return type to ptid_t.
12950 (target_pid_to_str): Declare.
12951 * target.c (set_desired_inferior): Adjust to use ptids.
12952 (mywait): Add new `ptid' argument. Adjust.
12953 (target_pid_to_str): New.
12954 * mem-break.h (free_all_breakpoints): Declare.
12955 * mem-break.c (breakpoints): Delelete.
12956 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12957 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12958 to use per-process breakpoint list.
12959 (free_all_breakpoints): New.
12960 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12961 (symbol_cache, all_symbols_looked_up): Delete.
12962 (hexchars): New.
12963 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12964 read_ptid): New.
12965 (prepare_resume_reply): Change ptid argument's type from unsigned
12966 long to ptid_t. Adjust. Implement W;process and X;process.
12967 (free_sym_cache, clear_symbol_cache): New.
12968 (look_up_one_symbol): Adjust to per-process symbol cache. *
12969 * server.c (cont_thread, general_thread, step_thread): Change type
12970 to ptid_t.
12971 (attached): Delete.
12972 (multi_process): New.
12973 (last_ptid): Change type to ptid_t.
12974 (struct vstop_notif) <ptid>: Change type to ptid_t.
12975 (queue_stop_reply, push_event): Change `ptid' argument's type to
12976 ptid_t.
12977 (discard_queued_stop_replies): Add `pid' argument.
12978 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12979 changes. Don't reference the `attached' global.
12980 (attach_inferior): Adjust to mywait interface changes.
12981 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12982 features. Handle and report "multiprocess+". Handle
12983 "qAttached:PID".
12984 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12985 changes.
12986 (handle_v_kill): New.
12987 (handle_v_stopped): Adjust to use target_pid_to_str.
12988 (handle_v_requests): Allow multiple attaches and runs when
12989 multiprocess extensions are in effect. Handle "vKill".
12990 (myresume): Adjust to use ptids.
12991 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12992 (handle_status): Adjust to discard_queued_stop_replies interface
12993 change.
12994 (first_thread_of, kill_inferior_callback)
12995 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12996 (main): Call initialize_inferiors. Adjust to use ptids, killing
12997 and detaching from all inferiors. Handle multiprocess packet
12998 variants.
12999 * linux-low.h: Include gdb_proc_service.h.
13000 (struct process_info_private): New.
13001 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13002 <lwpid_of>: Use ptid_get_lwp.
13003 (get_lwp_thread): Adjust.
13004 (struct lwp_info): Add `dead' member.
13005 (find_lwp_pid): Declare.
13006 * linux-low.c (thread_db_active): Delete.
13007 (new_inferior): Adjust comment.
13008 (inferior_pid): Delete.
13009 (linux_add_process): New.
13010 (handle_extended_wait): Adjust.
13011 (add_lwp): Change unsigned long to ptid.
13012 (linux_create_inferior): Add process to processes table. Adjust
13013 to use ptids. Don't set new_inferior here.
13014 (linux_attach_lwp): Rename to ...
13015 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
13016 it. Adjust to use ptids.
13017 (linux_attach_lwp): New.
13018 (linux_attach): Add process to processes table. Don't set
13019 new_inferior here.
13020 (struct counter): New.
13021 (second_thread_of_pid_p, last_thread_of_process_p): New.
13022 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
13023 multiple processes.
13024 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
13025 processes. Remove process from process table.
13026 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
13027 to multiple processes.
13028 (any_thread_of): New.
13029 (linux_detach): Add `pid' argument, and handle it. Remove process
13030 from processes table.
13031 (linux_join): Add `pid' argument. Handle it.
13032 (linux_thread_alive): Change unsighed long argument to ptid_t.
13033 Consider dead lwps as not being alive.
13034 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
13035 threads we're not interested in.
13036 (same_lwp, find_lwp_pid): New.
13037 (linux_wait_for_lwp): Change `pid' argument's type from int to
13038 ptid_t. Adjust.
13039 (linux_wait_for_event): Rename to ...
13040 (linux_wait_for_event_1): ... this. Change `pid' argument's type
13041 from int to ptid_t. Adjust.
13042 (linux_wait_for_event): New.
13043 (linux_wait_1): Add `ptid' argument. Change return type to
13044 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
13045 that exit from the process table.
13046 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
13047 Adjust.
13048 (mark_lwp_dead): New.
13049 (wait_for_sigstop): Adjust to use ptids. If a process exits while
13050 stopping all threads, mark its main lwp as dead.
13051 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13052 ptids.
13053 (fetch_register, usr_store_inferior_registers)
13054 (regsets_fetch_inferior_registers)
13055 (regsets_store_inferior_registers, linux_read_memory)
13056 (linux_write_memory): Inline `inferior_pid'.
13057 (linux_look_up_symbols): Adjust to use per-process
13058 `thread_db_active'.
13059 (linux_request_interrupt): Adjust to use ptids.
13060 (linux_read_auxv): Inline `inferior_pid'.
13061 (initialize_low): Don't reference thread_db_active.
13062 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13063 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13064 (ps_getpid): Return the pid of the current inferior.
13065 * thread-db.c (proc_handle, thread_agent): Delete.
13066 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13067 per-process data.
13068 (find_one_thread): Change argument type to ptid_t. Adjust to
13069 per-process data.
13070 (maybe_attach_thread): Adjust to per-process data and ptids.
13071 (thread_db_find_new_threads): Ditto.
13072 (thread_db_init): Ditto.
13073 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13074 processes table. Adjust to use ptids.
13075 (spu_kill, spu_detach): Adjust interface. Remove process from
13076 processes table.
13077 (spu_join, spu_thread_alive): Adjust interface.
13078 (spu_wait): Adjust interface. Remove process from processes
13079 table. Adjust to use ptids.
13080 * win32-low.c (current_inferior_tid): Delete.
13081 (current_inferior_ptid): New.
13082 (debug_event_ptid): New.
13083 (thread_rec): Take a ptid. Adjust.
13084 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13085 (child_delete_thread): Ditto.
13086 (do_initial_child_stuff): Add `attached' argument. Add process to
13087 processes table.
13088 (child_fetch_inferior_registers, child_store_inferior_registers):
13089 Adjust.
13090 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13091 (win32_attach): Pass 1 to do_initial_child_stuff.
13092 (win32_kill): Adjust interface. Remove process from processes
13093 table.
13094 (win32_detach): Ditto.
13095 (win32_join): Adjust interface.
13096 (win32_thread_alive): Take a ptid.
13097 (win32_resume): Adjust to use ptids.
13098 (get_child_debug_event): Ditto.
13099 (win32_wait): Adjust interface. Remove exiting process from
13100 processes table.
13101
bd99dc85
PA
131022009-04-01 Pedro Alves <pedro@codesourcery.com>
13103
13104 Non-stop mode support.
13105
13106 * server.h (non_stop): Declare.
13107 (gdb_client_data, handler_func): Declare.
13108 (delete_file_handler, add_file_handler, start_event_loop):
13109 Declare.
13110 (handle_serial_event, handle_target_event, push_event)
13111 (putpkt_notif): Declare.
13112 * target.h (enum resume_kind): New.
13113 (struct thread_resume): Replace `step' field by `kind' field.
13114 (TARGET_WNOHANG): Define.
13115 (struct target_ops) <wait>: Add `options' argument.
13116 <supports_non_stop, async, start_non_stop>: New fields.
13117 (target_supports_non_stop, target_async): New.
13118 (start_non_stop): Declare.
13119 (mywait): Add `options' argument.
13120 * target.c (mywait): Add `options' argument. Print child exit
13121 notifications here.
13122 (start_non_stop): New.
13123 * server.c (non_stop, own_buf, mem_buf): New globals.
13124 (struct vstop_notif): New.
13125 (notif_queue): New global.
13126 (queue_stop_reply, push_event, discard_queued_stop_replies)
13127 (send_next_stop_reply): New.
13128 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13129 interface changes.
13130 (attach_inferior): In non-stop mode, don't wait for the target
13131 here.
13132 (handle_general_set): Handle QNonStop.
13133 (handle_query): When handling qC, return the current general
13134 thread, instead of the first thread of the list.
13135 (handle_query): If the backend supports non-stop mode, include
13136 QNonStop+ in the qSupported query response.
13137 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13138 and non-stop mode.
13139 (handle_v_attach, handle_v_run): Handle non-stop mode.
13140 (handle_v_stopped): New.
13141 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13142 (myresume): Adjust to use resume_kind. Handle non-stop.
13143 (queue_stop_reply_callback): New.
13144 (handle_status): Handle non-stop mode.
13145 (main): Clear non_stop flag on reconnection. Use the event-loop.
13146 Refactor serial protocol handling from here ...
13147 (process_serial_event): ... to this new function. When GDB
13148 selects any thread, select one here. In non-stop mode, wait until
13149 GDB acks all pending events before exiting.
13150 (handle_serial_event, handle_target_event): New.
13151 * remote-utils.c (remote_open): Install remote_desc in the event
13152 loop.
13153 (remote_close): Remove remote_desc from the event loop.
13154 (putpkt_binary): Rename to...
13155 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13156 (putpkt_binary): New as wrapper around putpkt_binary_1.
13157 (putpkt_notif): New.
13158 (prepare_resume_reply): In non-stop mode, don't change the
13159 general_thread.
13160 * event-loop.c: New.
13161 * Makefile.in (OBJ): Add event-loop.o.
13162 (event-loop.o): New rule.
13163
13164 * linux-low.h (pid_of): Moved here.
13165 (lwpid_of): New.
13166 (get_lwp_thread): Use lwpid_of.
13167 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13168 * linux-low.c (pid_of): Delete.
13169 (inferior_pid): Use lwpid_of.
13170 (linux_event_pipe): New.
13171 (target_is_async_p): New.
13172 (delete_lwp): New.
13173 (handle_extended_wait): Use lwpid_of.
13174 (add_lwp): Don't set lwpid field.
13175 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13176 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13177 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13178 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13179 first. Adjust to linux_wait_for_event interface changes. Use
13180 lwpid_of.
13181 (linux_detach): Don't delete the main lwp here.
13182 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13183 (status_pending_p): Don't consider explicitly suspended lwps.
13184 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13185 pointer. Add OPTIONS argument. Change return type to int. Use
13186 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13187 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13188 pointer. Add status pointer argument. Return a pid instead of a
13189 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13190 changes. In non-stop mode, don't switch to a random thread.
13191 (linux_wait): Rename to...
13192 (linux_wait_1): ... this. Add target_options argument, and handle
13193 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13194 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13195 clean exit and signal exit code. Don't stop all threads in
13196 non-stop mode. In all-stop mode, only stop all threads when
13197 reporting a stop to GDB. Handle explicit thread stop requests.
13198 (async_file_flush, async_file_mark): New.
13199 (linux_wait): New.
13200 (send_sigstop): Use lwpid_of.
13201 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13202 interface changes. In non-stop mode, don't switch to a random
13203 thread.
13204 (linux_resume_one_lwp): Use lwpid_of.
13205 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13206 (linux_resume_one_thread): ... this. Handle resume_stop. In
13207 non-stop mode, don't look for pending flag in all threads.
13208 (resume_status_pending_p): Don't consider explicitly suspended
13209 threads.
13210 (my_waitpid): Reimplement. Emulate __WALL.
13211 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13212 Use lwpid_of.
13213 (sigchld_handler, linux_supports_non_stop, linux_async)
13214 (linux_start_non_stop): New.
13215 (linux_target_ops): Register linux_supports_non_stop, linux_async
13216 and linux_start_non_stop.
13217 (initialize_low): Install SIGCHLD handler.
13218 * thread-db.c (thread_db_create_event, find_one_thread)
13219 (thread_db_get_tls_address): Use lwpid_of.
13220 * win32-low.c (win32_detach): Adjust to use resume_kind.
13221 (win32_wait): Add `options' argument.
13222 * spu-low.c (spu_resume): Adjust to use resume_kind.
13223 (spu_wait): Add `options' argument.
13224
5b1c542e
PA
132252009-04-01 Pedro Alves <pedro@codesourcery.com>
13226
13227 Decouple target code from remote protocol.
13228
13229 * target.h (enum target_waitkind): New.
13230 (struct target_waitstatus): New.
13231 (struct target_ops) <wait>: Return an unsigned long. Take a
13232 target_waitstatus pointer instead of a char pointer.
13233 (mywait): Likewise.
13234 * target.c (mywait): Change prototype to return an unsigned long.
13235 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13236 * server.h (thread_from_wait, old_thread_from_wait): Delete
13237 declarations.
13238 (prepare_resume_reply): Change prototype to take a
13239 target_waitstatus.
13240 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13241 (last_status, last_ptid): New.
13242 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13243 pid instead of a signal.
13244 (attach_inferior): Remove "status" and "signal" parameters.
13245 Adjust.
13246 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13247 not as an address.
13248 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13249 (handle_v_requests, myresume): Remove "status" and "signal"
13250 parameters. Adjust.
13251 (handle_status): New.
13252 (main): Delete local `status'. Adjust.
13253 * remote-utils.c: Include target.h.
13254 (prepare_resume_reply): Change prototype to take a
13255 target_waitstatus. Adjust.
13256
13257 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13258 interface.
13259 * spu-low.c (spu_wait): Adjust.
13260 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13261 Delete.
13262 (win32_wait): Adjust.
13263
2bd7c093
PA
132642009-04-01 Pedro Alves <pedro@codesourcery.com>
13265
13266 * target.h (struct thread_resume): Delete leave_stopped member.
13267 (struct target_ops): Add a `n' argument to the `resume' callback.
13268 * server.c (start_inferior): Adjust.
13269 (handle_v_cont, myresume): Adjust.
13270 * linux-low.c (check_removed_breakpoint): Adjust to resume
13271 interface change, and to removed leave_stopped field.
13272 (resume_ptr): Delete.
13273 (struct thread_resume_array): New.
13274 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13275 resume interface change.
13276 (linux_continue_one_thread, linux_queue_one_thread)
13277 (resume_status_pending_p): Check if the resume field is NULL
13278 instead of checking the leave_stopped member.
13279 (linux_resume): Adjust to the target resume interface change.
13280 * spu-low.c (spu_resume): Adjust to the target resume interface
13281 change.
13282 * win32-low.c (win32_detach, win32_resume): Ditto.
13283
c35fafde
PA
132842009-04-01 Pedro Alves <pedro@codesourcery.com>
13285
13286 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13287 flag.
13288 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13289 pending.
13290 (linux_continue_one_thread): Only preserve the stepping flag if
13291 there's a pending breakpoint.
13292
0a59d50b
PA
132932009-03-31 Pedro Alves <pedro@codesourcery.com>
13294
13295 * server.c (main): After the inferior having exited, call
13296 remote_close before exiting gdbserver.
13297
f04c6d38
TJB
132982009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13299
13300 Fix size of FPSCR in Power 7 processors.
13301 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13302 (PPC_FEATURE_HAS_DFP): New #define.
13303 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13304 size of the FPSCR.
13305
78e5cee6
PA
133062009-03-23 Pedro Alves <pedro@codesourcery.com>
13307
13308 * server.c (handle_query) Whitespace and formatting.
13309
1b3f6016
PA
133102009-03-22 Pedro Alves <pedro@codesourcery.com>
13311
13312 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13313 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13314 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13315 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13316 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13317 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13318 Makefile.in, configure.ac: Fix whitespace throughout.
13319 * configure: Regenerate.
13320
a07b2135
PA
133212009-03-22 Pedro Alves <pedro@codesourcery.com>
13322
13323 * inferiors.c (find_inferior): Make it safe for the callback
13324 function to delete the currently iterated inferior.
13325
67cc2626
PA
133262009-03-22 Pedro Alves <pedro@codesourcery.com>
13327
13328 * Makefile.in (linuw_low_h): Move higher.
13329 (thread-db.o): Depend on $(linux_low_h).
13330
54a0b537
PA
133312009-03-17 Pedro Alves <pedro@codesourcery.com>
13332
13333 Rename "process" to "lwp" throughout.
13334
13335 * linux-low.c (all_processes): Rename to...
13336 (all_lwps): ... this.
13337 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13338 (add_process): Rename to ...
13339 (add_lwp): ... this. Adjust.
13340 (linux_create_inferior): Adjust.
13341 (linux_attach_lwp): Adjust.
13342 (linux_attach): Adjust.
13343 (linux_kill_one_process): Rename to ...
13344 (linux_kill_one_lwp): ... this. Adjust.
13345 (linux_kill): Adjust.
13346 (linux_detach_one_process): Rename to ...
13347 (linux_detach_one_lwp): ... this. Adjust.
13348 (linux_detach): Adjust.
13349 (check_removed_breakpoint): Adjust.
13350 (status_pending_p): Adjust.
13351 (linux_wait_for_process): Rename to ...
13352 (linux_wait_for_lwp): ... this. Adjust.
13353 (linux_wait_for_event): Adjust.
13354 (send_sigstop): Adjust.
13355 (wait_for_sigstop): Adjust.
13356 (stop_all_processes): Rename to ...
13357 (stop_all_lwps): ... this.
13358 (linux_resume_one_process): Rename to ...
13359 (linux_resume_one_lwp): ... this. Adjust.
13360 (linux_set_resume_request, linux_continue_one_thread)
13361 (linux_queue_one_thread, resume_status_pending_p)
13362 (usr_store_inferior_registers, regsets_store_inferior_registers)
13363 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13364 Adjust.
13365 * linux-low.h (get_process): Rename to ...
13366 (get_lwp): ... this. Adjust.
13367 (get_thread_process): Rename to ...
13368 (get_thread_lwp): ... this. Adjust.
13369 (get_process_thread): Rename to ...
13370 (get_lwp_thread): ... this. Adjust.
13371 (struct process_info): Rename to ...
13372 (struct lwp_info): ... this.
13373 (all_processes): Rename to ...
13374 (all_lwps): ... this.
13375 * proc-service.c (ps_lgetregs): Adjust.
13376 * thread-db.c (thread_db_create_event, find_one_thread)
13377 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13378
0b16c5cf
PA
133792009-03-14 Pedro Alves <pedro@codesourcery.com>
13380
13381 * server.c (handle_query): Handle "qAttached".
13382
32de4b9d
NS
133832009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13384
13385 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13386 GPLv3, update license URL.
13387
2aecd87f
DE
133882009-03-01 Doug Evans <dje@google.com>
13389
93efd302 13390 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13391 (server_h): Add gdb_signals.h.
13392 (signals.o): Update.
13393 * server.h (target_signal_from_host,target_signal_to_host_p)
13394 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13395
86b1f9c5
PM
133962009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13397
13398 * remote-utils.c (getpkt): Also generate remote-debug
13399 information if noack_mode is set.
13400
4aa995e1
PA
134012009-02-06 Pedro Alves <pedro@codesourcery.com>
13402
13403 * server.c (handle_query): Report qXfer:siginfo:read and
13404 qXfer:siginfo:write as supported and handle them.
13405 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13406 * linux-low.c (linux_xfer_siginfo): New.
13407 (linux_target_ops): Set it.
13408
62709adf
PA
134092009-01-26 Pedro Alves <pedro@codesourcery.com>
13410
13411 * server.c (gdbserver_usage): Mention --remote-debug.
13412 (main): Accept '--remote-debug' switch.
13413
aef93bd7
DE
134142009-01-18 Doug Evans <dje@google.com>
13415
13416 * regcache.c (new_register_cache): No need to check result of xcalloc.
13417 * server.c (handle_search_memory): Back out calls to xmalloc,
13418 result is checked and error is returned to user upon failure.
13419 (handle_query): Ditto. Add more checks for result of malloc.
13420 (handle_v_cont): Check result of malloc, report error back to
13421 user upon failure.
13422 (handle_v_run): Ditto. Call freeargv.
13423 * server.h (freeargv): Declare.
13424 * utils.c (freeargv): New fn.
13425
54363045
DE
134262009-01-15 Doug Evans <dje@google.com>
13427
f626972c
DE
13428 * gdbreplay.c (perror_with_name): Make arg const char *.
13429 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13430 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13431 * utils.c (perror_with_name): Make arg const char *.
54363045 13432
18aae699
PA
134332009-01-14 Pedro Alves <pedro@codesourcery.com>
13434
13435 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13436 when handling a EXIT_PROCESS_DEBUG_EVENT.
13437
ff703abe
JB
134382009-01-06 Joel Brobecker <brobecker@adacore.com>
13439
13440 * gdbreplay.c (gdbreplay_version): Update copyright year.
13441 * server.c (gdbserver_version): Likewise.
13442
f21cc1a2 134432009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13444
13445 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13446 (handle_extended_wait): Improve comment.
0e21c1ec 13447
bca929d3
DE
134482008-12-13 Doug Evans <dje@google.com>
13449
13450 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13451 * server.h (ATTR_MALLOC): New macro.
13452 (xmalloc,xcalloc,xstrdup): Declare.
13453 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13454 * inferiors.c: Ditto.
13455 * linux-low.c: Ditto.
13456 * mem-break.c: Ditto.
13457 * regcache.c: Ditto.
13458 * remote-utils.c: Ditto.
13459 * server.c: Ditto.
13460 * target.c: Ditto.
13461 * win32-low.c: Ditto.
13462
97438e3f
DE
134632008-12-12 Doug Evans <dje@google.com>
13464
896c7fbb
DE
13465 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13466 in debugging printf.
13467
97438e3f
DE
13468 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13469
e3b886f8
DE
134702008-12-09 Doug Evans <dje@google.com>
13471
13472 * linux-low.h (struct process_info): Delete member tid, unused.
13473 * thread-db.c (find_one_thread): Update.
13474 (maybe_attach_thread): Update.
13475
07e059b5
VP
134762008-12-02 Pedro Alves <pedro@codesourcery.com>
13477
889bf7c5
PA
13478 * target.h (struct target_ops): Add qxfer_osdata member.
13479 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13480 and dirent.h.
13481 (linux_qxfer_osdata): New functions.
13482 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13483 callback.
13484 * server.c (handle_query): Handle "qXfer:osdata:read:".
13485 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13486 (buffer_xml_printf): New functions.
13487 * server.h (struct buffer): New.
13488 (buffer_grow_str, buffer_grow_str0): New macros.
13489 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13490 (buffer_xml_printf): Declare.
07e059b5 13491
4cab47ab
DE
134922008-11-24 Doug Evans <dje@google.com>
13493
13494 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13495
f142445f
DJ
134962008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13497
13498 * server.c (handle_v_run): Always use the supplied argument list.
13499
d0107bb6 135002008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13501
d0107bb6
BW
13502 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13503 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13504
2c4ad781
TJB
135052008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13506
13507 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13508 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13509 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13510 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13511 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13512 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13513 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13514 XML target descriptions.
13515 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13516 when inferior is running on an ISA 2.05 or later processor. Add
13517 special case to return offset for full 64-bit slot of FPSCR when
13518 in 32-bits.
13519
dfb64f85
DJ
135202008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13521
13522 * Makefile.in (SFILES, clean): Added sparc64 files.
13523 (reg-sparc64.o, reg-sparc64.c): New.
13524 * configure.srv (sparc*-*-linux*): New configuration.
13525 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13526 syscall arguments for SPARC.
13527 (regsets_store_inferior_registers): Likewise.
13528 * linux-sparc-low.c: New file.
13529
66b6e1dd
DE
135302008-10-21 Doug Evans <dje@google.com>
13531
13532 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13533 (READLINE_DIR,READLINE_DEP): Delete.
13534 (INTERNAL_CFLAGS): Update.
13535 (LINTFLAGS): Update.
13536
9b710a42
PA
135372008-10-10 Pedro Alves <pedro@codesourcery.com>
13538
13539 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13540 whole argv from the last run, not just argv[0].
13541
5822d809
PA
135422008-09-08 Pedro Alves <pedro@codesourcery.com>
13543
13544 * regcache.c (new_register_cache): Return NULL if the register
13545 cache size isn't known yet.
13546 (free_register_cache): Avoid dereferencing a NULL regcache.
13547
74aac56f
DJ
135482008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13549
13550 * configure.srv: Merge MIPS and MIPS64.
13551
400b20f5
MR
135522008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13553
13554 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13555
677c5bb1
LM
135562008-08-18 Luis Machado <luisgpm@br.ibm.com>
13557
13558 * Makefile.in: Add required vsx dependencies.
13559
13560 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13561 Declare init_registers_powerpc_vsx32l.
13562 Declare init_registers_powerpc_vsx64l.
13563 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13564 (ppc_arch_setup): Check for VSX in hwcap.
13565 (ppc_fill_vsxregset): New function.
13566 (ppc_store_vsxregset): New function.
13567 Add new VSX entry in regset_info target_regsets.
13568
13569 * configure.srv: Add new VSX dependencies.
13570
a6f3e723
SL
135712008-08-12 Pedro Alves <pedro@codesourcery.com>
13572
13573 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13574 (remote_open): Set or clear transport_is_reliable.
13575 (putpkt_binary): Don't expect acks in noack mode.
13576 (getpkt): Don't send ack/nac in noack mode.
13577 * server.c (handle_general_set): Handle QStartNoAckMode.
13578 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13579 qSupported.
13580 (main): Reset noack_mode on every connection.
13581 * server.h (noack_mode): Declare.
13582
a417dc56
RW
135832008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13584
13585 * Makefile.in (GDBREPLAY_OBS): New variable.
13586 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13587
3221518c
UW
135882008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13589 Daniel Jacobowitz <dan@codesourcery.com>
13590
13591 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13592 (usr_store_inferior_registers): Likewise.
13593 (regsets_store_inferior_registers): Likewise.
13594
ec56be1b
PA
135952008-07-31 Rolf Jansen <rj@surtec.com>
13596 Pedro Alves <pedro@codesourcery.com>
13597
13598 * configure.ac: Check for memmem declaration.
13599 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13600 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13601 (disable_packet_qfThreadInfo): Unconditionally compile.
13602 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13603 * configure, config.in: Regenerate.
13604
2fe5e3ff
DE
136052008-07-28 Doug Kwan <dougkwan@google.com>
13606
13607 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13608 (linux_write_memory): Remove declaration of errno.
13609
836acd6d
UW
136102008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13611
13612 * linux-low.c (handle_extended_wait): Do not use "status"
13613 variable uninitialized.
13614
aeba519e
PA
136152008-07-07 Pedro Alves <pedro@codesourcery.com>
13616
13617 * server.c (handle_v_attach): Inhibit reporting dll changes.
13618
db42f210
PA
136192008-06-27 Pedro Alves <pedro@codesourcery.com>
13620
13621 * remote-utils.c (prepare_resume_reply): If requested, don't
13622 output "thread:TID" in the T stop reply.
13623
13624 * server.c (disable_packet_vCont, disable_packet_Tthread)
13625 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13626 (handle_query): If requested, disable support for qC, qfThreadInfo
13627 and qsThreadInfo.
13628 (handle_v_requests): If requested, disable support for vCont.
13629 (gdbserver_show_disableable): New.
13630 (main): Handle --disable-packet and --disable-packet=LIST.
13631
13632 * server.h (disable_packet_vCont, disable_packet_Tthread)
13633 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13634
8e4c5421
CD
136352008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13636
13637 * server.c (gdbserver_usage): Mention --version.
13638
6e23a804
DJ
136392008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13640
13641 * Makefile.in (gdbreplay.o): New rule.
13642
90aa6a40
JM
136432008-06-06 Joseph Myers <joseph@codesourcery.com>
13644
13645 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13646 message, not gdbserver.
13647
c16158bc 136482008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13649 Nathan Sidwell <nathan@codesourcery.com>
13650 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13651
13652 * acinclude.m4: Include ../../config/acx.m4.
13653 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13654 * configure, config.in: Regenerate.
13655 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13656 * server.c (gdbserver_version): Print PKGVERSION.
13657 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13658 (main): Adjust gdbserver_usage calls.
13659 * gdbreplay.c (version, host_name): Add declarations.
13660 (gdbreplay_version, gdbreplay_usage): New.
13661 (main): Accept --version and --help options.
13662
aeb75bf5
DJ
136632008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13664
13665 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13666 (arm_breakpoint_at): Handle Thumb.
13667 (the_low_target): Add comment.
13668
76b233dd
UW
136692008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13670
13671 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13672
08388c79
DE
136732008-05-09 Doug Evans <dje@google.com>
13674
a3c83fae
DE
13675 * server.h (decode_search_memory_packet): Declare.
13676 * remote-utils.c (decode_search_memory_packet): New fn.
13677 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13678 (handle_search_memory): New fn.
13679 (handle_query): Process qSearch:memory packets.
13680
bb9c3d36
UW
136812008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13682
13683 * regcache.c (registers_length): Remove.
13684 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13685 full register packet.
13686 * regcache.h (registers_length): Remove prototype.
13687 * server.h (PBUFSIZ): Define to 16384.
13688
7284e1be
UW
136892008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13690
13691 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13692 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13693 powerpc-64l.o, and powerpc-altivec64l.o.
13694 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13695 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13696 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13697 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13698 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13699 to srv_xmlfiles.
13700
13701 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13702 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13703 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13704 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13705 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13706 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13707 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13708 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13709 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13710 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13711 (clean): Update.
13712
13713 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13714 (init_registers_powerpc_32l): ... this new prototype.
13715 (init_registers_powerpc_32): Remove, replace by ...
13716 (init_registers_powerpc_altivec32l): ... this new prototype.
13717 (init_registers_powerpc_e500): Remove, replace by ...
13718 (init_registers_powerpc_e500l): ... this new prototype.
13719 (init_registers_ppc64): Remove, replace by ...
13720 (init_registers_powerpc_64l): ... this new prototype.
13721 (init_registers_powerpc_64): Remove, replace by ...
13722 (init_registers_powerpc_altivec64l): ... this new prototype.
13723 (ppc_num_regs): Set to 73.
13724 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13725 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13726 (ppc_cannot_store_register): Handle orig_r3 and trap.
13727 (ppc_arch_setup): Update init_registers_... calls.
13728 (ppc_fill_gregset): Handle orig_r3 and trap.
13729
13730 * inferiors.c (clear_inferiors): Reset current_inferior.
13731
fdc59709
PB
137322008-04-23 Paolo Bonzini <bonzini@gnu.org>
13733
889bf7c5
PA
13734 * acinclude.m4: Add override.m4.
13735 * configure: Regenerate.
fdc59709 13736
c9b2f845
UW
137372008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13738
13739 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13740 initial call to init_register_ppc64.
13741
550512b8
UW
137422008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13743
43aaf8b6
PA
13744 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13745 single powerpc*-*-linux* case.
550512b8
UW
13746 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13747
b6430ec3
UW
137482008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13749
13750 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13751 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13752 from reg_xmlfiles.
13753 * linux-ppc-low.c: Include <elf.h>.
13754 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13755 (ppc_hwcap): New global variable.
13756 (ppc_regmap): Remove __SPE__ #ifdef sections.
13757 (ppc_regmap_e500): New global variable.
13758 (ppc_cannot_store_register): Update __SPE__ special case.
13759 (ppc_get_hwcap): New function.
13760 (ppc_arch_setup): Use it to determine whether inferior supports
13761 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13762 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13763 Do not access registers if target does not support AltiVec.
13764 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13765 Do not access registers if target does not support SPE.
13766 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13767
52fa2412
UW
137682008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13769
13770 * linux-low.c (disabled_regsets, num_regsets): New.
13771 (use_regsets_p): Delete.
13772 (linux_wait_for_process): Clear disabled_regsets.
13773 (regsets_fetch_inferior_registers): Check and set it.
13774 (regsets_store_inferior_registers): Likewise.
13775 (linux_fetch_registers, linux_store_registers): Do not use
13776 use_regsets_p.
13777 (initialize_low): Allocate disabled_regsets.
13778
e28b3332
DJ
137792008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13780
13781 * Makefile.in (LIBOBJS): New.
13782 (OBS): Use LIBOBJS.
13783 (memmem.o): New rule.
13784 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13785 * configure: Regenerated.
13786
4536995d
UW
137872008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13788
13789 * server.c (handle_query): Never return "unsupported" for
13790 qXfer:features:read queries.
13791
221c031f
UW
137922008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13793
13794 * server.c (get_features_xml): Fix inverted condition.
13795 (handle_query): Always support qXfer:feature:read.
13796
ccd213ac
DJ
137972008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13798
13799 * server.c (wrapper_argv): New.
13800 (start_inferior): Handle wrapper_argv. If set, expect an extra
13801 trap.
13802 (gdbserver_usage): Document --wrapper.
13803 (main): Parse --wrapper.
13804
6fe305f7
UW
138052008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13806
13807 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13808 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13809 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13810 (ppc_set_pc): Likewise.
13811 (ppc_arch_setup): New function.
13812 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13813 of collect_register.
889bf7c5 13814 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13815
5b0a002e
UW
138162008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13817
13818 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13819 instead of linux-ppc64-low.o.
13820 * linux-ppc64-low.c: Remove file.
13821 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13822 (linux-ppc64-low.o): Remove rule.
13823
13824 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13825 (init_registers_powerpc_64): Likewise.
13826 (ppc_regmap): Conditionally define depending on __powerpc64__.
13827 (ppc_cannot_store_register): Do not special-case "fpscr" when
13828 compiled on __powerpc64__.
13829 (ppc_collect_ptrace_register): New function.
13830 (ppc_supply_ptrace_register): New function.
13831 (ppc_breakpoint): Change type to "unsigned int".
13832 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13833 (the_low_target): Conditionally provide initializers for the
889bf7c5 13834 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13835 collect_ptrace_register and supply_ptrace_register members.
13836
9b4b61c8
UW
138372008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13838
13839 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13840 * server.c (gdbserver_xmltarget): Define.
13841 (get_features_xml): Use it to replace "target.xml" and arch_string.
13842
13843 * configure.srv: Remove srv_xmltarget. Add XML files that were
13844 mentioned there to srv_xmlfiles instead. Remove conditional tests
13845 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13846 srv_xmlfiles and srv_regobj to include all possible choices.
13847 * configure.ac (srv_xmltarget): Remove.
13848 (srv_xmlfiles): Do not add "target.xml".
13849 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13850 checks for supplementary target information.
13851 * configure: Regenerate.
13852 * Makefile.in (XML_TARGET): Remove.
13853 (target.xml): Remove rule.
13854 (clean): Do not clean up target.xml.
13855 (.PRECIOUS): Do not mention target.xml.
13856
13857 * target.h (struct target_ops): Remove arch_string member.
13858 * linux-low.c (linux_arch_string): Remove.
13859 (linux_target_ops): Remove arch_string initializer.
13860 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13861 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13862 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13863 * spu-low.c (spu_arch_string): Remove.
13864 (spu_target_ops): Remove arch_string initializer.
13865 * win32-low.c (win32_arch_string): Remove.
13866 (win32_target_ops): Remove arch_string initializer.
13867 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13868 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13869 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13870
ee1a7ae4
UW
138712008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13872
13873 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13874 by collect_ptrace_register and supply_ptrace_register hooks.
13875 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13876 instead of checking for the_low_target.left_pad_xfer.
13877 (usr_store_inferior_registers): Use collect_ptrace_register callback
13878 instead of checking for the_low_target.left_pad_xfer.
13879
13880 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13881 (s390_supply_ptrace_register): Likewise.
13882 (s390_fill_gregset): Call s390_collect_ptrace_register.
13883 (the_low_target): Update.
13884
13885 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13886 (ppc_supply_ptrace_register): Likewise.
13887 (the_low_target): Update.
13888
13889 * linux-i386-low.c (the_low_target): Update.
13890 * linux-x86-64-low.c (the_low_target): Update.
13891
d61ddec4
UW
138922008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13893
13894 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13895 reg-s390.o and reg-s390x.o.
13896
13897 * linux-low.c (new_inferior): New global variable.
13898 (linux_create_inferior, linux_attach): Set it.
13899 (linux_wait_for_process): Call the_low_target.arch_setup after the
13900 target has stopped for the first time.
13901 (initialize_low): Do not call the_low_target.arch_setup.
13902
13903 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13904 (s390_set_pc): Likewise.
13905 (s390_arch_setup): New function.
13906 (the_low_target): Use s390_arch_setup as arch_setup routine.
13907
13908 * regcache.c (realloc_register_cache): New function.
13909 (set_register_cache): Call it for each existing regcache.
13910
d05b4ac3
UW
139112008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13912
13913 * server.h (init_registers): Remove prototype.
13914
13915 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13916 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13917 instead of init_registers ().
13918 * linux-arm-low.c (init_registers_arm): Add prototype.
13919 (init_registers_arm_with_iwmmxt): Likewise.
13920 (the_low_target): Add initializer for arch_setup field.
13921 * linux-cris-low.c (init_registers_cris): Add prototype.
13922 (the_low_target): Add initializer for arch_setup field.
13923 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13924 (the_low_target): Add initializer for arch_setup field.
13925 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13926 (the_low_target): Add initializer for arch_setup field.
13927 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13928 (the_low_target): Add initializer for arch_setup field.
13929 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13930 (the_low_target): Add initializer for arch_setup field.
13931 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13932 (the_low_target): Add initializer for arch_setup field.
13933 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13934 (init_registers_mips64_linux): Likewise.
13935 (the_low_target): Add initializer for arch_setup field.
13936 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13937 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13938 (the_low_target): Add initializer for arch_setup field.
13939 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13940 (init_registers_powerpc_64): Likewise.
13941 (the_low_target): Add initializer for arch_setup field.
13942 * linux-s390-low.c (init_registers_s390): Add prototype.
13943 (init_registers_s390x): Likewise.
13944 (the_low_target): Add initializer for arch_setup field.
13945 * linux-sh-low.c (init_registers_sh): Add prototype.
13946 (the_low_target): Add initializer for arch_setup field.
13947 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13948 (the_low_target): Add initializer for arch_setup field.
13949 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13950 (the_low_target): Add initializer for arch_setup field.
13951
13952 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13953 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13954 instead of init_registers ().
13955 * win32-arm-low.c (init_registers_arm): Add prototype.
13956 (the_low_target): Add initializer for arch_setup field.
13957 * win32-i386-low.c (init_registers_i386): Add prototype.
13958 (the_low_target): Add initializer for arch_setup field.
13959
13960 * spu-low.c (init_registers_spu): Add prototype.
13961 (initialize_low): Call initialie_registers_spu () instead of
13962 initialize_registers ().
13963
fd96d250
PA
139642008-02-19 Pedro Alves <pedro@codesourcery.com>
13965
13966 * server.c (handle_v_requests): When handling the vRun and vAttach
13967 packets, if already debugging a process, don't kill it. Return an
13968 error instead.
13969
d41b6bb4
DJ
139702008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13971
13972 * server.c (handle_query): Correct length check.
13973
5ac588cf
PA
139742008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13975
13976 * win32-low.c (do_initial_child_stuff): Add process handle
13977 parameter. Set current_process_handle and current_process_id from the
13978 parameters. Clear globals.
13979 (win32_create_inferior): Don't set current_process_handle and
13980 current_process_id here. Instead pass them on the call to
13981 do_initial_child_stuff.
13982 (win32_attach): Likewise.
13983 (win32_clear_inferiors): New.
13984 (win32_kill): Don't close the current process handle or the
13985 current thread handle here. Instead call win32_clear_inferiors.
13986 (win32_detach): Don't open a new handle to the process. Call
13987 win32_clear_inferiors.
13988 (win32_join): Don't rely on current_process_handle; open a new
13989 handle using the process id.
13990 (win32_wait): Call win32_clear_inferiors when the inferior process
13991 has exited.
13992
ecd7ecbc
DJ
139932008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13994
13995 * server.c (monitor_show_help): Add "exit".
13996
1525d545
MG
139972008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13998
ecd7ecbc 13999 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
14000 (clean): Add reg-xtensa.c.
14001 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
14002 * configure.srv (xtensa*-*-linux*) New target.
14003 * linux-xtensa-low.c: New.
14004 * xtensa-xtregs.c: New.
1525d545 14005
59a016f0
PA
140062008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
14007
14008 * hostio.c: Don't include errno.h.
14009 (errno_to_fileio_errno): Move to hostio-errno.
14010 * hostio.c: (hostio_error): Remove the error parameter. Defer the
14011 error number outputting to the target->hostio_last_error callback.
14012 (hostio_packet_error): Use FILEIO_EINVAL directly.
14013 (handle_open, handle_pread, hostio_error, handle_unlink): Update
14014 calls to hostio_error.
14015 * hostio-errno.c: New.
14016 * server.h (hostio_last_error_from_errno): Declare.
14017 * target.h (target_ops): Add hostio_last_error member.
14018 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14019 as hostio_last_error handler.
889bf7c5 14020 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
14021 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14022 (wince_hostio_last_error): New functions.
14023 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14024 as hostio_last_error handler.
14025 (win32_target_ops) [!_WIN32_WCE]: Register
14026 hostio_last_error_from_errno as hostio_last_error handler.
14027 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14028 (hostio-errno.o): New rule.
14029 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14030 * configure.srv (srv_hostio_err_objs): New variable. Default to
14031 hostio-errno.o.
14032 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14033 * configure: Regenerate.
14034
2d717e4f
DJ
140352008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14036
14037 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14038 (linux_kill, linux_detach): Clean up the process list.
14039 * remote-utils.c (remote_open): Improve port number parsing.
14040 (putpkt_binary, input_interrupt): Only send interrupts if the target
14041 is running.
14042 * server.c (extended_protocol): Make static.
14043 (attached): Define earlier.
14044 (exit_requested, response_needed, program_argv): New variables.
14045 (target_running): New.
14046 (start_inferior): Clear attached here.
14047 (attach_inferior): Set attached here.
14048 (require_running): Define.
14049 (handle_query): Use require_running and target_running. Implement
14050 "monitor exit".
14051 (handle_v_attach, handle_v_run): New.
14052 (handle_v_requests): Use require_running. Handle vAttach and vRun.
14053 (gdbserver_usage): Update.
14054 (main): Redo argument parsing. Handle --debug and --multi. Handle
14055 --attach along with other options or after the port. Save
14056 program_argv. Support no initial program. Resynchronize
14057 communication with GDB after an error. Handle "monitor exit".
14058 Use require_running and target_running. Always allow the extended
14059 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
14060 restart in extended mode.
14061 * README: Refer to the GDB manual. Update --attach usage.
14062
7407e2de
AS
140632007-12-20 Andreas Schwab <schwab@suse.de>
14064
14065 * linux-low.c (STACK_SIZE): Define.
14066 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14067 (linux_test_for_tracefork): Likewise.
14068
b65d95c5
DJ
140692007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14070
14071 * linux-low.c (linux_wait_for_event): Update messages. Do not
14072 reinsert auto-delete breakpoints.
14073 * mem-break.c (struct breakpoint): Change return type of handler to
14074 int.
14075 (set_breakpoint_at): Update handler type.
14076 (reinsert_breakpoint_handler): Return 1 instead of calling
14077 delete_breakpoint.
14078 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14079 setting a new one.
14080 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14081 * mem-break.h (set_breakpoint_at): Update handler type.
14082 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14083 * win32-low.c (auto_delete_breakpoint): New.
14084 (get_child_debug_event): Use it.
14085
4e799345
DJ
140862007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14087
14088 * configure.ac: Check for pread and pwrite.
14089 * hostio.c (handle_pread): Fall back to lseek and read.
14090 (handle_pwrite): Fall back to lseek and write.
14091 * config.in, configure: Regenerated.
14092
27524b67
DJ
140932007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14094
14095 * server.c (myresume): Add own_buf argument.
14096 (main): Update calls.
14097
a20d5e98
DJ
140982007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14099
14100 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14101 * remote-utils.c (remote_open): Do not call disable_async_io.
14102 (block_async_io): Delete.
14103 (unblock_async_io): Make static.
14104 (initialize_async_io): New.
14105 * server.c (handle_v_cont): Handle async I/O here.
14106 (myresume): Likewise. Move other common resume tasks here...
14107 (main): ... from here. Call initialize_async_io. Disable async
14108 I/O before the main loop.
14109 * server.h (initialize_async_io): Declare.
14110 (block_async_io, unblock_async_io): Delete prototypes.
14111 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14112
b79d787e
DJ
141132007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14114
14115 * remote-utils.c (readchar): Allow binary data in received messages.
14116
d97903b2
PA
141172007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14118
14119 * win32-low.c (attaching): New global.
14120 (win32_create_inferior): Clear the `attaching' global.
14121 (win32_attach): Set the `attaching' global.
14122 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14123 attaching. Only set a breakpoint at the entry point if not
14124 attaching.
14125
311de423
PA
141262007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14127
14128 * server.c (main): Don't report dll events on the initial
14129 connection on attaches.
14130
6c2d16d2
PA
141312007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14132
14133 * server.c (main): Relax numerical bases supported for the pid of
14134 the --attach command line argument.
14135
5ca906e6
PA
141362007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14137
14138 * win32-low.c (win32_attach): Call OpenProcess before
14139 DebugActiveProcess, not after. Add last error output to error
14140 call.
14141
9c6c8194
PA
141422007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14143
14144 * win32-low.c (win32_get_thread_context)
14145 (win32_set_thread_context): New functions.
14146 (thread_rec): Use win32_get_thread_context.
14147 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14148 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14149 field.
14150
4d5d1aaa
PA
141512007-12-03 Leo Zayas
14152 Pedro Alves <pedro_alves@portugalmail.pt>
14153
14154 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14155 global variables.
14156 (child_add_thread): Minor cleanup.
14157 (child_continue): Resume artificially suspended threads before
14158 calling ContinueDebugEvent.
14159 (suspend_one_thread): New.
14160 (fake_breakpoint_event): New.
14161 (get_child_debug_event): Change return type to int. Check here if
14162 gdb sent an interrupt request. If a soft interrupt was requested,
14163 fake a breakpoint event. Return 0 if there is no event to handle,
14164 and 1 otherwise.
14165 (win32_wait): Don't check here if gdb sent an interrupt request.
14166 Ensure there is a valid event to handle.
14167 (win32_request_interrupt): Add soft interruption method as last
14168 resort.
14169
c436e841
PA
141702007-12-03 Leo Zayas
14171 Pedro Alves <pedro_alves@portugalmail.pt>
14172
14173 * win32-low.h (win32_thread_info): Add descriptions to the
14174 structure members. Replace `suspend_count' counter by a
14175 `suspended' flag.
14176 * win32-low.c (thread_rec): Update condition of when to get the
14177 context from the inferior. Rely on ContextFlags being set if it
14178 has already been retrieved. Only suspend the inferior thread if
14179 we haven't already. Warn if that fails.
14180 (continue_one_thread): s/suspend_count/suspended/. Only call
14181 ResumeThread once. Warn if that fails.
14182
e7b5fa67
PA
141832007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14184
14185 * win32-low.c (win32_wait): Don't read from the inferior when it
14186 has already exited.
14187
a385171d
PA
141882007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14189
14190 * Makefile.in (win32_low_h): New variable.
14191 (win32-low.o): Add dependency on $(win32_low_h).
14192 (win32-arm-low.o, win32-i386-low.o): New rules.
14193
f80c84b3
DJ
141942007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14195
14196 * hostio.c: Correct copyright year.
14197
a6b151f1
DJ
141982007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14199
14200 * Makefile.in (OBS): Add hostio.o.
14201 (hostio.o): New rule.
14202 * server.h (handle_vFile): Declare.
14203 * hostio.c: New file.
14204 * server.c (handle_v_requests): Take packet_len and new_packet_len
14205 for binary packets. Call handle_vFile.
14206 (main): Update call to handle_v_requests.
14207
f9387fc3
DJ
142082007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14209
14210 * linux-low.c: Include <sched.h>.
14211
51c2684e
DJ
142122007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14213
14214 * linux-low.c (linux_tracefork_grandchild): New.
14215 (linux_tracefork_child): Use clone.
14216 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14217
75f83163
JB
142182007-10-31 Joel Brobecker <brobecker@adacore.com>
14219
14220 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14221
da5898ce
DJ
142222007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14223
14224 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14225
24a09b5f
DJ
142262007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14227
14228 * inferiors.c (change_inferior_id): Delete.
14229 (add_pid_to_list, pull_pid_from_list): New.
14230 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14231 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14232 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14233 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14234 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14235 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14236 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14237 (using_threads): Always set to 1.
14238 (handle_extended_wait): New.
14239 (add_process): Do not set TID.
14240 (linux_create_inferior): Set must_set_ptrace_flags.
14241 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14242 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14243 (linux_thread_alive): Rename TID argument to LWPID.
14244 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14245 (linux_wait_for_event): Do not use TID or check using_threads. Update
14246 call to dead_thread_notify. Call handle_extended_wait.
14247 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14248 (send_sigstop): Delete sigstop_sent.
14249 (wait_for_sigstop): Avoid TID.
14250 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14251 (linux_test_for_tracefork): New.
14252 (linux_lookup_signals): Use thread_db_active and
14253 linux_supports_tracefork_flag.
14254 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14255 * linux-low.h (get_process_thread): Avoid TID.
14256 (struct process_ifo): Move thread_known and tid to the end. Remove
14257 sigstop_sent.
14258 (linux_attach_lwp, thread_db_init): Update prototypes.
14259 * server.h (change_inferior_id): Delete prototype.
14260 (add_pid_to_list, pull_pid_from_list): New prototypes.
14261 * thread-db.c (thread_db_use_events): New.
14262 (find_first_thread): Rename to...
14263 (find_one_thread): ...this. Update callers and messages. Do not
14264 call fatal. Check thread_db_use_events. Do not call
14265 change_inferior_id or new_thread_notify.
14266 (maybe_attach_thread): Update. Do not call new_thread_notify.
14267 (thread_db_init): Set thread_db_use_events. Check use_events.
14268 * utils.c (fatal, warning): Correct message prefix.
14269
30ed0a8f
DJ
142702007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14271
14272 * Makefile.in (clean): Remove new files.
14273 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14274 (powerpc-64.o, powerpc-64.c): New rules.
14275 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14276 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14277 with SPE.
14278 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14279 SPE targets.
14280 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14281 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14282 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14283 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14284 (target_regsets): Add AltiVec and SPE register sets.
14285 * configure.ac: Check for AltiVec and SPE.
14286 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14287 (ppc_fill_vrregset, ppc_store_vrregset): New.
14288 (target_regsets): Add AltiVec register set.
14289 * configure: Regenerated.
14290
fd462a61
DJ
142912007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14292
14293 * linux-low.c (O_LARGEFILE): Define.
14294 (linux_read_memory): Use /proc/PID/mem.
14295 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14296 * configure, config.in: Regenerated.
14297
69f223ed
DJ
142982007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14299
14300 * linux-low.c (linux_wait_for_event): Do not pass signals while
14301 single-stepping.
14302
aec18585
PA
143032007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14304
14305 * win32-low.c (create_process): New.
14306 (win32_create_inferior): Use create_process instead of
14307 CreateProcess. If create_process failed retry appending an ".exe"
14308 suffix. Store the GetLastError result immediatelly after
14309 create_process calls and use it on the call to error.
14310
34d86ddd
PA
143112007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14312
14313 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14314
5a0e3bd0
JB
143152007-08-23 Joel Brobecker <brobecker@adacore.com>
14316
14317 * configure.ac: Switch license to GPLv3.
14318
f88c79e6
MS
143192007-08-01 Michael Snyder <msnyder@access-company.com>
14320
14321 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14322
6b3d9b83
PA
143232007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14324
14325 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14326 typedef.
14327 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14328 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14329 CloseToolhelp32Snapshot.
14330 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14331 CloseToolhelp32Snapshot.
14332
c588c53c
MS
143332007-07-27 Michael Snyder <michael.snyder@access-company.com>
14334
14335 * server.c (main): Check for inferior exit before main loop.
14336
aa0403d9
PA
143372007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14338
14339 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14340 instead of on tmp_desc.
14341
255e7678
DJ
143422007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14343 Daniel Jacobowitz <dan@codesourcery.com>
14344
14345 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14346 (add_thread): Minor cleanups.
14347 (clear_inferiors): Move lower in the file. Clear the DLL
14348 list.
14349 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14350 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14351 (xml_escape_text): New.
14352 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14353 for qSupported.
14354 (handle_v_cont): Report errors.
14355 (gdbserver_version): Update.
14356 (main): Correct size of own_buf. Do not report initial DLL events.
14357 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14358 (unloaded_dll, xml_escape_text): New.
14359 * win32-low.c (enum target_waitkind): Update comments.
14360 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14361 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14362 (win32_EnumProcessModules, win32_GetModuleInformation)
14363 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14364 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14365 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14366 (win32_Module32First, win32_Module32Next, load_toolhelp)
14367 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14368 (get_child_debug_event): Handle DLL events.
14369 (win32_wait): Likewise.
14370
0d37add9
DJ
143712007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14372
14373 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14374 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14375
45e2715e
PA
143762007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14377
14378 * win32-low.c (handle_output_debug_string): Ignore event if not
14379 waiting.
14380
c5674cf1
PA
143812007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14382
14383 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14384
2bbe3cc1
DJ
143852007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14386
14387 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14388
ae13219e
DJ
143892007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14390
14391 * inferiors.c (change_inferior_id): Add comment.
14392 * linux-low.c (check_removed_breakpoint): Add an early
14393 prototype. Improve debug output.
14394 (linux_attach): Doc update.
14395 (linux_detach_one_process, linux_detach): Clean up before releasing
14396 each process.
14397 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14398 * linux-low.h (struct process_info): Doc improvement.
14399 * mem-break.c (delete_all_breakpoints): New.
14400 * mem-break.h (delete_all_breakpoints): New prototype.
14401 * thread-db.c (find_first_thread): New.
14402 (thread_db_create_event): Call it instead of
14403 thread_db_find_new_threads. Clean up unused variables.
14404 (maybe_attach_thread): Remove first thread handling.
14405 (thread_db_find_new_threads): Use find_first_thread.
14406 (thread_db_get_tls_address): Likewise.
14407
4105de34
DJ
144082007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14409
14410 * thread-db.c (thread_db_find_new_threads): Add prototype.
14411 (thread_db_create_event): Check for the main thread before adding
14412 a new thread.
14413 (maybe_attach_thread): Only enable event reporting if TID == 0.
14414 (thread_db_get_tls_address): Check for new threads.
14415
2b876972
DJ
144162007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14417
14418 * linux-low.c (linux_create_inferior): Try execv before execvp.
14419 * spu-low.c (spu_create_inferior): Likewise.
14420
7a245884
DJ
144212007-06-13 Mike Frysinger <vapier@gentoo.org>
14422
14423 * linux-low.c (linux_create_inferior): Change execv to execvp.
14424 * spu-low.c (spu_create_inferior): Likewies.
14425
117ce543
DJ
144262007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14427
14428 * Makefile.in (clean): Clean new files instead of deleted ones.
14429 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14430 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14431 rules.
14432 * configure.srv: Specify XML files and new regformats for MIPS and
14433 MIPS64 GNU/Linux.
14434 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14435 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14436 an entry for the restart register.
14437 (mips_cannot_fetch_register, mips_cannot_store_register)
14438 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14439 register names to match the XML descriptions.
14440 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14441 restart register instead of $0.
14442
0e7f50da
UW
144432007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14444 Markus Deuling <deuling@de.ibm.com>
14445
14446 * remote-utils.c (decode_xfer_write): New function.
14447 * server.h (decode_xfer_write): Add prototype.
14448 * server.c (handle_query): Add PACKET_LEN argument. Support
14449 qXfer:spu:read and qXfer:spu:write packets.
14450 (main): Pass packet_len to handle_query.
14451 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14452 * target.h (target_ops): Add qxfer_spu.
14453
374c1d38
UW
144542007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14455
14456 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14457 accessing non-seekable spufs files.
14458
bb63802a
UW
144592007-05-16 Markus Deuling <deuling@de.ibm.com>
14460
889bf7c5 14461 * server.c (handle_query): Add reply for qC packet.
bb63802a 14462
7390519e
PA
144632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14464 Leo Zayas <lerele@champenstudios@com>
14465
14466 * server.h (check_remote_input_interrupt_request): New function.
14467 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14468 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14469 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14470 (check_remote_input_interrupt_request): New function.
14471 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14472 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14473 winapi_GenerateConsoleCtrlEvent): New typedefs.
14474 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14475 to 250 ms.
14476 (win32_wait): Check for remote interrupt request
14477 with check_remote_input_interrupt_request.
14478 (win32_request_interrupt): New function.
14479 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14480
34b34921
PA
144812007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14482
14483 * win32-low.c (debug_registers_changed,
14484 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14485 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14486 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14487 (thread_rec): Get context using the low target.
14488 (child_add_thread): Call thread_added on the low target,
14489 which does the same thing.
14490 (regptr): Delete.
14491 (do_initial_child_stuff): Remove debug registers references.
14492 Set context using the low target. Resume threads after
14493 setting the contexts.
14494 (child_continue): Remove dead variable. Remove debug
14495 registers references.
14496 (child_fetch_inferior_registers): Go through the low target.
14497 (do_child_store_inferior_registers): Remove.
14498 (child_store_inferior_registers): Go through the low target.
14499 (win32_resume): Remove debug registers references.
14500 Set context using the low target.
14501 (handle_exception): Change return type to void. Don't record
14502 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14503 first chance exception.
889bf7c5 14504 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14505 goto loop. Always return after waiting for debug event.
14506 (win32_wait): Convert to switch statement. Handle spurious
14507 events.
14508
14509 * win32-i386-low.c (debug_registers_changed,
14510 debug_registers_used): New.
14511 (initial_stuff): Rename to ...
14512 (i386_initial_stuff): ... this. Clear debug registers
14513 state variables.
14514 (store_debug_registers): Delete.
14515 (i386_get_thread_context): New.
14516 (load_debug_registers): Delete.
14517 (i386_set_thread_context): New.
14518 (i386_thread_added): New.
14519 (single_step): Rename to ...
14520 (i386_single_step): ... this.
14521 (do_fetch_inferior_registers): Rename to ...
14522 (i386_fetch_inferior_register): ... this.
14523 (i386_store_inferior_register): New.
14524 (the_low_target): Adapt to new interface.
14525
14526 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14527 (arm_get_thread_context): New.
14528 (arm_set_thread_context): New.
14529 (regptr): New.
14530 (do_fetch_inferior_registers): Rename to ...
14531 (arm_fetch_inferior_register): ... this.
14532 (arm_store_inferior_register): New.
14533 (arm_wince_breakpoint): Reimplement as unsigned long.
14534 (arm_wince_breakpoint_len): Define.
14535 (the_low_target): Adapt to new interface.
14536
14537 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14538 load_debug_registers. Add get_thread_context, set_thread_context,
14539 thread_added and store_inferior_register. Rename
14540 fetch_inferior_registers to fetch_inferior_register.
14541 (regptr): Remove declaration.
14542
dd6953e1
PA
145432007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14544
14545 * linux-low.c (linux_detach): Change return type to int. Return 0.
14546 * spu-low.c (spu_detach): Likewise.
14547
444d6139
PA
145482007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14549
14550 * target.h (target_ops): Change return type of detach to int.
14551 Add join.
14552 (join_inferior): New.
14553 * server.c (main): Don't skip detach support on mingw32.
14554 If the inferior doesn't support detaching return error.
14555 Call join_inferior instead of using waitpid.
14556 * linux-low.c (linux_join): New.
14557 (linux_target_op): Add linux_join.
14558 * spu-low.c (spu_join): New.
14559 (spu_target_ops): Add spu_join.
14560 * win32-low.c (win32_detach): Adapt to new interface.
14561 Reopen current_process_handle before detaching. Issue a child
14562 resume before detaching.
14563 (win32_join): New.
14564 (win32_target_op): Add win32_join.
14565
1d5315fe
PA
145662007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14567
14568 * win32-low.c (win32-attach): Fix return value.
14569 * target.h (target_ops): Describe ATTACH return values.
14570
bf914831
PA
145712007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14572
14573 * win32-low.c (GETPROCADDRESS): Define.
14574 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14575 (winapi_DebugSetProcessKillOnExit): Likewise.
14576 (win32_create_inferior): Force usage of ansi CreateProcessA.
14577 (win32_attach): Use GETPROCADDRESS.
14578 (win32_detach): Likewise.
14579
f72f3e60
PA
145802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14581
14582 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14583
ed50f18f
PA
145842007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14585
14586 * win32-low.c: Commit leftover changes from 2007-03-29.
14587
0c2ead7e
DJ
145882007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14589
14590 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14591 fields short instead of int. Add explicit padding.
14592 (i387_cache_to_fsave): Remove unnecessary casts.
14593 (i387_fsave_to_cache): Doc fix.
14594 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14595
73725ff3
DJ
145962007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14597
14598 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14599 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14600
d99f33d8
PA
146012007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14602
14603 * configure.srv (arm*-*-mingw32ce*): Move near the other
14604 arm targets.
14605
68070c10
PA
146062007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14607
2482afc6 14608 * configure.ac: Add errno checking.
68070c10
PA
14609 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14610 sys/file.h and malloc.h.
14611 (AC_CHECK_DECLS): Add perror.
14612 (srv_mingwce): Handle.
2482afc6 14613 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14614 win32-i386-low.o to srv_tgtobj.
14615 (i[34567]86-*-mingw*): Likewise.
14616 (arm*-*-mingw32ce*): Add case.
14617 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14618 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14619 [__MINGW32CE__] (strerror): New function.
14620 [__MINGW32CE__] (errno): Define to GetLastError.
14621 [__MINGW32CE__] (COUNTOF): New macro.
14622 (remote_open): Remove extra close call.
14623 * mem-break.c (delete_breakpoint_at): New function.
14624 * mem-break.h (delete_breakpoint_at): Declare.
14625 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14626 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14627 [USE_WIN32API] (read, write): Add char* casts.
14628 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14629 * server.h: Include wincecompat.h on Windows CE.
14630 [HAVE_ERRNO_H]: Check.
14631 (perror): Declare if not declared.
14632 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14633 (perror_with_name): Remove errno declaration.
14634 * wincecompat.h: New.
14635 * wincecompat.c: New.
14636 * win32-low.h: New.
14637 * win32-arm-low.c: New.
14638 * win32-i386-low.c: New.
14639 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14640 (OUTMSG2): Make it safe.
14641 (_T): New macro.
14642 (COUNTOF): New macro.
14643 (NUM_REGS): Get it from the low target.
14644 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14645 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14646 (thread_rec): Let low target handle debug registers.
14647 (child_add_thread): Likewise.
14648 (child_init_thread_list): Likewise.
14649 (continue_one_thread): Likewise.
14650 (regptr): New.
14651 (do_child_fetch_inferior_registers): Move to ...
14652 * win32-i386-low.c: ... here, and rename to ...
14653 (do_fetch_inferior_registers): ... this.
889bf7c5 14654 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14655 Go through the low target.
14656 (do_child_store_inferior_registers): Use regptr.
14657 (strwinerror): New function.
14658 (win32_create_inferior): Handle Windows CE.
14659 Use strwinerror instead of strerror on Windows error
14660 codes. Add program to the error output.
14661 Don't close the main thread handle on Windows CE.
14662 (win32_attach): Use coredll.dll on Windows CE.
14663 (win32_kill): Close current process and current
14664 thread handles.
14665 (win32_detach): Use coredll.dll on Windows CE.
14666 (win32_resume): Let low target handle debug registers, and
14667 step request.
14668 (handle_exception): Add/Remove initial breakpoint. Avoid
14669 non-existant WSTOPSIG on Windows CE.
14670 (win32_read_inferior_memory): Cast to remove warning.
14671 (win32_arch_string): Go through the low target.
14672 (initialize_low): Call set_breakpoint_data with the low
14673 target's breakpoint.
14674 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14675 FOP_REGNUM, mappings): Move to ...
14676 * win32-i386-low.c: ... here.
14677 * win32-low.c (win32_thread_info): Move to ...
14678 * win32-low.h: ... here.
14679 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14680 win32-arm-low.c and wincecompat.c.
14681 (all:): Add $EXEEXT.
14682 (install-only:): Likewise.
14683 (gdbserver:): Likewise.
14684 (gdbreplay:): Likewise.
14685 * config.in: Regenerate.
14686 * configure: Regenerate.
14687
41093d81
PA
146882007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14689
14690 * win32-low.c: Rename typedef thread_info to
14691 win32_thread_info throughout.
14692
544afa54
PA
146932007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14694
14695 * win32-i386-low.c: Rename to ...
14696 * win32-low.c: ... this.
14697 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14698 * Makefile.in: Likewise.
14699
bce7165d
PA
147002007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14701
14702 * remote-utils.c (monitor_output): Constify msg parameter.
14703 * server.h (monitor_output): Likewise.
14704 * win32-i386-low.c (handle_output_debug_string): New.
14705 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14706 handle_output_debug_string.
14707 (get_child_debug_event): Likewise.
14708
506c7aa0
DJ
147092007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14710
14711 * server.c (main): Correct strtoul check.
14712
42c81e2a
DJ
147132007-03-27 Jon Ringle <jon@ringle.org>
14714
14715 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14716
9453113a
DJ
147172007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14718
14719 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14720
64a69107
DJ
147212007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14722
14723 * terminal.h: Check HAVE_SGTTY_H.
14724
147252007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14726
14727 * remote-utils.c (remote_open): Print out the assigned port number.
14728
c74d0ad8
DJ
147292007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14730
14731 * remote-utils.c (monitor_output): New function.
14732 * server.c (debug_threads): Define here.
14733 (monitor_show_help): New function.
14734 (handle_query): Handle qRcmd.
14735 (main): Do not handle 'd' packet.
14736 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14737 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14738 of debug_threads.
14739
de7c3b4a
PA
147402007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14741
14742 * Makefile.in (EXEEXT): New.
14743 (clean): Use $(EXEEXT).
14744
ef57601b
PA
147452007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14746
14747 * target.h (target_ops): Rename send_signal to request_interrupt,
14748 and remove enum target_signal parameter.
14749 * linux-low.c (linux_request_interrupt): Rename from
14750 linux_send_signal, and always send SIGINT.
14751 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14752 and always send SIGINT.
14753 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14754 of send_signal.
14755 (input_interrupt): Likewise.
14756
820f2bda
PA
147572007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14758
14759 * server.c (get_features_xml): Check if target implemented
14760 arch_string.
14761 * win32-i386-low.c (win32_arch_string): New.
14762 (win32_target_ops): Add win32_arch_string as arch_string member.
14763
ab39bf24
UW
147642007-02-22 Markus Deuling <deuling@de.ibm.com>
14765
14766 * spu-low.c (spu_arch_string): New.
14767 (spu_target_ops): Add spu_arch_string.
14768
61ff6e04
DJ
147692007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14770
14771 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14772 * configure.ac: Do not check for terminal.h.
14773 * configure, config.in: Regenerated.
14774
fb1e4ffc
DJ
147752007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14776
14777 * Makefile.in (OBS): Add $(XML_BUILTIN).
14778 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14779 (clean): Update.
14780 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14781 (arm-with-iwmmxt.c): New.
14782 * config.in, configure: Regenerate.
14783 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14784 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14785 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14786 (arm*-*-linux*): Add iWMMXt and regset support.
14787 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14788 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14789 (arm_store_wmmxregset, target_regsets): New.
14790 * server.c (get_features_xml): Take annex argument. Check builtin
14791 XML documents.
14792 (handle_query): Handle multiple annexes.
14793
0f48aa01
DJ
147942007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14795
14796 * remote-utils.c [USE_WIN32API] (read, write): Define.
14797 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14798 write.
14799
23181151
DJ
148002007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14801
14802 * linux-i386-low.c (the_low_target): Set arch_string.
14803 * linux-x86-64-low.c (the_low_target): Likewise.
14804 * linux-low.c (linux_arch_string): New.
14805 (linux_target_ops): Add it.
14806 * linux-low.h (struct linux_target_ops): Add arch_string.
14807 * server.c (write_qxfer_response): Use const void * for DATA.
14808 (get_features_xml): New.
14809 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14810 * target.h (struct target_ops): Add arch_string method.
14811
9d606399
DJ
148122007-01-03 Denis Pilat <denis.pilat@st.com>
14813 Daniel Jacobowitz <dan@codesourcery.com>
14814
14815 * linux-low.c (linux_kill): Handle being called with no threads.
14816 * win32-i386-low.c (win32_kill): Likewise.
14817 (get_child_debug_event): Clear current_process_handle.
14818
148192006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14820 Daniel Jacobowitz <dan@codesourcery.com>
14821
14822 * remote-utils.c (remote_open): Check the type of specified
14823 serial port devices before opening them.
14824 * server.c (main): Kill the inferior if an error occurs during
14825 the first remote_open.
14826
a5e13d24
DJ
148272006-12-05 Markus Deuling <deuling@de.ibm.com>
14828
14829 * README: Update supported targets.
14830
186947f7
DJ
148312006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14832
14833 * Makefile.in (clean): Remove reg-mips64.c.
14834 (reg-mips64.c, reg-mips64.o): New rules.
14835 * configure.srv: Handle mips64. Include regset support for mips.
14836 * linux-mips-low.c (union mips_register): New.
14837 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14838 (mips_breakpoint, mips_breakpoint_at): Use int.
14839 (mips_collect_register, mips_supply_register)
14840 (mips_collect_register_32bit, mips_supply_register_32bit)
14841 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14842 (mips_store_fpregset, target_regsets): New.
14843 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14844
a13e2c95
UW
148452006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14846
14847 * configure.srv: Add target "spu*-*-*".
14848 * Makefile.in (clean): Remove reg-spu.c.
14849 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14850 * spu-low.c: New file.
14851
cb7283db
DJ
148522006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14853
14854 * configure.ac: Correct td_thr_tls_get_addr test.
14855 * configure: Regenerated.
14856
89be2091
DJ
148572006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14858
14859 * linux-low.c (linux_wait_for_event): Reformat. Use the
14860 pass_signals array.
14861 * remote-utils.c (decode_address_to_semicolon): New.
14862 * server.c (pass_signals, handle_general_set): New.
14863 (handle_query): Mention QPassSignals for qSupported.
14864 (main): Call handle_general_set.
14865 * server.h (pass_signals, decode_address_to_semicolon): New.
14866
000ef4f0
DJ
148672006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14868
14869 * server.c (handle_query): Correct error handling for read_auxv.
14870
b7149293
UW
148712005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14872
14873 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14874 and srv_linux_thread_db to yes.
14875 * linux-s390-low.c (s390_fill_gregset): New function.
14876 (target_regsets): Define data structure.
14877
dae5f5cf
DJ
148782006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14879
14880 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14881 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14882 * config.in, configure: Regenerated.
14883 * inferiors.c (gdb_id_to_thread): New function.
14884 (gdb_id_to_thread_id): Use it.
14885 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14886 * linux-low.h (struct process_info): Add th member.
14887 (thread_db_get_tls_address): New prototype.
14888 * remote-utils.c (decode_address): Make non-static.
14889 * server.c (handle_query): Handle qGetTLSAddr.
14890 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14891 * target.h (struct target_ops): Add get_tls_address.
14892 * thread-db.c (maybe_attach_thread): Save the thread handle.
14893 (thread_db_get_tls_address): New.
14894
32ca6d61
DJ
148952006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14896
14897 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14898 (linux_resume_one_process): Take a siginfo_t *. Update all
14899 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14900 (struct pending_signals): Add a siginfo_t.
14901 (linux_wait_for_process): Always set last_status.
14902 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14903 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14904 * linux-low.h (struct process_info): Add last_status.
14905
5ffff7c1
DJ
149062006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14907
14908 * remote-utils.c (try_rle): New function.
14909 (putpkt_binary): Use it.
14910
8695c747
DJ
149112006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14912
14913 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14914 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14915 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14916 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14917 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14918 point registers.
14919
290fadea
RS
149202006-08-08 Richard Sandiford <richard@codesourcery.com>
14921
14922 * server.c (terminal_fd): New variable.
14923 (old_foreground_pgrp): Likewise.
14924 (restore_old_foreground_pgrp): New function.
14925 (start_inferior): Record the terminal file descriptor in terminal_fd
14926 and its original foreground group in old_foreground_pgrp. Register
14927 restore_old_foreground_pgrp with atexit().
14928
9f2e1e63
DJ
149292006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14930
14931 * server.c (handle_query): Correct qPart to qXfer.
14932
b80864fb
DJ
149332006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14934
14935 * configure.ac: Check for more headers which are missing on
14936 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14937 * configure.srv: Add Cygwin and mingw32.
14938 * remote-utils.c: Don't include headers unconditionally which
14939 are missing on mingw32. Include <winsock.h> for mingw32.
14940 (remote_open): Adjust for mingw32 support. Flush
14941 standard error after writing to it.
14942 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14943 (unblock_async_io, enable_async_io, disable_async_io)
14944 (readchar, getpkt): Update for Winsock support.
14945 (prepare_resume_reply): Expect a protocol signal number.
14946 * server.c: Disable <sys/wait.h> on mingw32.
14947 (start_inferior): Adjust for mingw32 support. Flush
14948 standard error after writing to it.
14949 (attach_inferior): Likewise. Use protocol signal
14950 numbers.
14951 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14952 and names.
14953 * win32-i386-low.c: New file.
14954 * Makefile.in (XM_CLIBS): Set.
14955 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14956 (win32-i386-low.o): New dependency rule.
14957 * linux-low.c (linux_wait): Use target signal numbers.
14958 * target.h (struct target_ops): Doc fix.
14959 * server.h (target_signal_to_name): New prototype.
14960 * gdbreplay.c: Don't include headers unconditionally which
14961 are missing on mingw32. Include <winsock.h> for mingw32.
14962 (remote_close, remote_open): Adjust for Winsock support.
14963 * configure, config.in: Regenerated.
14964
0876f84a
DJ
149652006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14966
14967 * server.c (decode_xfer_read, write_qxfer_response): New.
14968 (handle_query): Take a packet length argument. Handle
14969 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14970 the qSupported response.
14971 (main): Update call to handle_query.
14972
01f9e8fa
DJ
149732006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14974
14975 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14976 (putpkt_binary): Renamed from putpkt and adjusted for binary
14977 data.
14978 (putpkt): New wrapper for putpkt_binary.
14979 (readchar): Don't mask off the high bit.
14980 (decode_X_packet): New function.
14981 * server.c (main): Call putpkt_binary if a handler sets the packet
14982 length. Save the length of the incoming packet. Handle 'X'.
14983 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14984
be2a5f71
DJ
149852006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14986
14987 * server.c (handle_query): Handle qSupported.
14988
ea025f5f
DJ
149892006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14990
14991 * remote-utils.c (all_symbols_looked_up): New variable.
14992 (look_up_one_symbol): Check it.
14993 * server.h (look_up_one_symbol): New declaration.
14994 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14995
9308fc88
DJ
149962006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14997
14998 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14999 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
15000 (PTRACE_GET_THREAD_AREA): Define.
15001 (ps_get_thread_area): New function.
15002
52fb6437
NS
150032006-05-09 Nathan Sidwell <nathan@codesourcery.com>
15004
15005 * configure.srv (m68k*-*-uclinux*): New target.
15006 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15007 (linux_resume_one_process): Remove extraneous cast.
15008 (linux_read_offsets): New.
15009 (linux_target_op): Add linux_read_offsets on mmuless systems.
15010 * server.c (handle_query): Add qOffsets logic.
15011 * target.h (struct target_ops): Add read_offsets.
15012
21b0f40c
DJ
150132006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15014
15015 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15016 (PTRACE_GET_THREAD_AREA): Define.
15017 (ps_get_thread_area): New function.
15018 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15019 (linux-x86-64-low.o): Update.
15020
0050a760
DJ
150212006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
15022
15023 * configure.ac: Remove checks for prfpregset_t.
15024 * gdb_proc_service.h: New file.
15025 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15026 new "gdb_proc_service.h".
15027 * proc-service.c: Likewise.
15028 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15029 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15030 * Makefile.in (gdb_proc_service_h): Updated.
15031 * configure, config.in: Regenerated.
15032
b92a518e
DJ
150332006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15034
15035 * remote-utils.c (prepare_resume_reply): Move declaration
15036 of gdb_id_from_wait to the top of the block.
15037
545587ee
DJ
150382006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
15039
15040 * linux-low.c (regsets_store_inferior_registers): Read the regset
15041 from the target before filling it.
15042
9db87ebd
DJ
150432006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15044
15045 * server.c (attach_inferior): Return SIGTRAP for a successful
15046 attach.
15047
dd24457d
DJ
150482006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
15049
15050 * Makefile.in (OBS): Add version.o.
15051 (STAGESTUFF): Delete.
15052 (version.o): Add dependencies.
15053 (version.c): Replace rule.
15054 (clean): Remove version.c.
15055 * server.c (gdbserver_version): New.
15056 (gdbserver_usage): Use printf.
15057 (main): Handle --version and --help.
15058 * server.h (version, host_name): Add declarations.
15059
6f0f660e
EZ
150602005-12-23 Eli Zaretskii <eliz@gnu.org>
15061
889bf7c5
PA
15062 * linux-arm-low.c:
15063 * linux-arm-low.c:
15064 * inferiors.c:
15065 * i387-fp.h:
15066 * i387-fp.c:
15067 * gdbreplay.c:
15068 * regcache.c:
15069 * proc-service.c:
15070 * mem-break.h:
15071 * mem-break.c:
15072 * linux-x86-64-low.c:
15073 * linux-sh-low.c:
15074 * linux-s390-low.c:
15075 * linux-ppc64-low.c:
15076 * linux-ppc-low.c:
15077 * linux-mips-low.c:
15078 * linux-m68k-low.c:
15079 * linux-m32r-low.c:
15080 * linux-low.h:
15081 * linux-low.c:
15082 * linux-ia64-low.c:
15083 * linux-i386-low.c:
15084 * linux-crisv32-low.c:
15085 * thread-db.c:
15086 * terminal.h:
15087 * target.h:
15088 * target.c:
15089 * server.h:
15090 * server.c:
15091 * remote-utils.c:
15092 * regcache.h:
15093 * utils.c:
15094 * Makefile.in:
15095 * configure.ac:
6f0f660e
EZ
15096 * gdbserver.1: Add (C) after Copyright. Update the FSF
15097 address.
15098
9d1fb177
DJ
150992005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15100
15101 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15102 (arm_breakpoint_at): Recognize both breakpoints.
15103 (the_low_target): Use the correct breakpoint instruction.
15104
011a70c2
DJ
151052005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15106
15107 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15108 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15109 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15110 (the_low_target): Update.
15111
7fb85e41
AS
151122005-10-25 Andreas Schwab <schwab@suse.de>
15113
15114 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15115
15116 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15117 (ia64_num_regs): Reduce to 462.
15118
3db0444b
DJ
151192005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15120
15121 * acinclude.m4: Correct quoting.
15122 * aclocal.m4: Regenerated.
15123
15124 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15125 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15126 (thread_db_init): Call thread_db_err_str.
15127 * configure.ac: Check for TD_VERSION.
15128 * config.in, configure: Regenerated.
15129
bee0189a
DJ
151302005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15131
15132 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15133
e9d25b98
DJ
151342005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15135
15136 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15137 is not available. Define HAVE_PTRACE_GETREGS if it is.
15138 * config.in, configure: Regenerated.
15139 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15140 * linux-i386-low.c, linux-m68k-low.c: Update to use
15141 HAVE_PTRACE_GETREGS.
15142 * linux-low.c (regsets_fetch_inferior_registers)
15143 (regsets_store_inferior_registers): Only return 0 if we processed
15144 GENERAL_REGS.
15145 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15146 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15147
a06660f7
DJ
151482005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15149
15150 * inferiors.c (struct thread_info): Add gdb_id.
15151 (add_thread): Add gdb_id argument.
15152 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15153 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15154 calls to add_thread.
15155 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15156 * server.c (handle_query): Use thread_to_gdb_id.
15157 (handle_v_cont, main): Use gdb_id_to_thread_id.
15158 * server.h (add_thread): Update prototype.
15159 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15160 prototypes.
15161
5a1f5858
DJ
151622005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15163
15164 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15165 left-padded registers.
15166 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15167 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15168
e122f1f5
SE
151692005-07-01 Steve Ellcey <sje@cup.hp.com>
15170
15171 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15172 * configure: Regenerate.
15173 * config.in: Regenerate.
15174 * server.h (NEED_DECLARATION_STRERROR):
15175 Replace with !HAVE_DECL_STRERROR.
15176
d592fa2f
DJ
151772005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15178
15179 * linux-low.c (linux_wait, linux_send_signal): Don't test
15180 an unsigned long variable for > 0 if it could be MAX_ULONG.
15181 * server.c (myresume): Likewise.
15182 * target.c (set_desired_inferior): Likewise.
15183
ccbd4912
MK
151842005-06-13 Mark Kettenis <kettenis@gnu.org>
15185
15186 * configure.ac: Simplify and improve check for socklen_t.
15187 * configure, config.in: Regenerate.
15188
f450004a
DJ
151892005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15190
15191 * acconfig.h: Remove.
15192 * configure.ac: Add a test for socklen_t. Use three-argument
15193 AC_DEFINE throughout.
15194 * config.in: Regenerated using autoheader 2.59.
15195 * configure: Regenerated.
15196
15197 * gdbreplay.c (socklen_t): Provide a default.
15198 (remote_open): Use socklen_t.
15199 * remote-utils.c (socklen_t): Provide a default.
15200 (remote_open): Use socklen_t.
15201 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15202 unsigned char.
15203
15204 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15205 char for buffers.
15206 * linux-low.c (linux_read_memory, linux_write_memory)
15207 (linux_read_auxv): Likewise.
15208 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15209 (check_mem_write): Likewise.
15210 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15211 Likewise.
15212 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15213 (registers_from_string, register_data): Likewise.
15214 * server.c (handle_query, main): Likewise.
15215 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15216 (decode_M_packet): Likewise.
15217 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15218 * target.h (struct target_ops): Update read_memory, write_memory,
15219 and read_auxv.
15220 (read_inferior_memory, write_inferior_memory): Update.
15221 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15222 to unsigned char *.
15223 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15224 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15225 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15226 linux-s390-low.c, linux-sh-low.c: Update for changes in
15227 read_inferior_memory and the_low_target->breakpoint.
15228
eee84df1
DJ
152292005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15230
15231 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15232 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15233 * configure.srv: Add powerpc64-*-linux*.
15234 * linux-ppc64-low.c: New file.
15235
45b134e5
OF
152362005-05-23 Orjan Friberg <orjanf@axis.com>
15237
15238 * linux-cris-low.c: New file with support for CRIS.
15239 * linux-crisv32-low.c: Ditto for CRISv32.
15240 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15241 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15242 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15243 reg-crisv32.o, and reg-crisv32.c to make rules.
15244 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15245 recognized targets.
15246
48d93c75
UW
152472005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15248
15249 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15250 of sizeof (PTRACE_XFER_TYPE).
15251 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15252
e013ee27
OF
152532005-05-12 Orjan Friberg <orjanf@axis.com>
15254
889bf7c5 15255 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15256 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15257 pointers for hardware watchpoint support.
15258 * linux-low.h (struct linux_target_ops): Ditto.
15259 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15260 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15261 to linux_target_ops.
15262 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15263 reply packet.
15264 * server.c (main): Recognize 'Z' and 'z' packets.
15265
b0ded00b
UW
152662005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15267
15268 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15269 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15270 (the_low_target): Add new members.
15271
8643e2ad
DJ
152722005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15273
15274 * proc-service.c (ps_lgetregs): Search all_processes instead of
15275 all_threads.
15276
fc620387
DJ
152772005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15278
15279 * server.c (start_inferior): Change return type to int.
15280 (attach_inferior): Change sigptr to int *.
15281 (handle_v_cont, handle_v_requests): Change signal to int *.
15282 (main): Change signal to int.
15283
152842005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15285
15286 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15287 * configure.srv: Add m32r*-*-linux*.
15288 * linux-m32r-low.c: New file.
15289
e0e76420
DJ
152902005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15291
15292 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15293
a1928bad
DJ
152942005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15295
15296 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15297 Take unsigned long arguments for PIDs.
15298 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15299 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15300 (wait_for_sigstop, linux_resume_one_process)
15301 (regsets_fetch_inferior_registers, linux_send_signal)
15302 (linux_read_auxv): Likewise. Update the types of variables holding
15303 PIDs. Update format string specifiers.
15304 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15305 * remote-utils.c (prepare_resume_reply): Likewise.
15306 * server.c (cont_thread, general_thread, step_thread)
15307 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15308 unsigned long.
15309 (handle_query): Update format specifiers.
15310 (handle_v_cont, main): Use strtoul for thread IDs.
15311 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15312 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15313 (general_thread, step_thread, thread_from_wait)
15314 (old_thread_from_wait): Update.
15315 * target.h (struct thread_resume): Use unsigned long for THREAD.
15316 (struct target_ops): Use unsigned long for arguments to attach and
15317 thread_alive.
15318
dcdb98d2
DJ
153192005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15320
15321 * acinclude.m4: Include bfd/bfd.m4 directly.
15322 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15323 <agriffis@toolchain.org>.
15324 * aclocal.m4, configure: Regenerated.
15325
bec39cab
AC
153262005-01-07 Andrew Cagney <cagney@gnu.org>
15327
15328 * configure.ac: Rename configure.in, require autoconf 2.59.
15329 * configure: Re-generate.
15330
434c4c77
DJ
153312004-12-08 Daniel Jacobowitz <dan@debian.org>
15332
15333 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15334 LIBS when finished.
15335 * aclocal.m4: Regenerated.
15336 * configure: Regenerated.
15337
db1d3e1b
AS
153382004-11-21 Andreas Schwab <schwab@suse.de>
15339
15340 * linux-m68k-low.c (m68k_num_gregs): Define.
15341 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15342 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15343 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15344 (m68k_breakpoint_at): New. Add to the_low_target.
15345
15346 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15347 srv_linux_thread_db to yes.
15348
43360365
JB
153492004-10-20 Joel Brobecker <brobecker@gnat.com>
15350
15351 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15352 (ARCH_SET_FS): Likewise.
15353 (ARCH_GET_FS): Likewise.
15354 (ARCH_GET_GS): Likewise.
15355
fd500816
DJ
153562004-10-16 Daniel Jacobowitz <dan@debian.org>
15357
15358 * linux-i386-low.c (ps_get_thread_area): New.
15359 * linux-x86-64-low.c (ps_get_thread_area): New.
15360 * linux-low.c: Include <sys/syscall.h>.
15361 (linux_kill_one_process): Don't kill the first thread here.
15362 (linux_kill): Kill the first thread here.
15363 (kill_lwp): New function.
15364 (send_sigstop, linux_send_signal): Use it.
15365 * proc-service.c: Clean up #ifdefs.
15366 (fpregset_info): Delete.
15367 (ps_lgetregs): Update and enable implementation.
15368 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15369 implementations.
15370 * remote-utils.c (struct sym_cache, symbol_cache): New.
15371 (input_interrupt): Print a clearer message.
15372 (async_io_enabled): New variable.
15373 (enable_async_io, disable_async_io): Use it. Update comments.
15374 (look_up_one_symbol): Use the symbol cache.
15375 * thread-db.c (thread_db_look_up_symbols): New function.
15376 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15377
f6de3c42
DJ
153782004-10-16 Daniel Jacobowitz <dan@debian.org>
15379
15380 * configure.in: Test for -rdynamic.
15381 * configure: Regenerated.
15382 * Makefile (INTERNAL_LDFLAGS): New.
15383 (gdbserver, gdbreplay): Use it.
15384
2c0fc042
AC
153852004-09-02 Andrew Cagney <cagney@gnu.org>
15386
15387 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15388
075b3282
DJ
153892004-03-23 Daniel Jacobowitz <drow@mvista.com>
15390
15391 * linux-low.c (linux_wait): Clear all_processes list also.
15392
fa6a77dc
DJ
153932004-03-12 Daniel Jacobowitz <drow@mvista.com>
15394
15395 * linux-low.c: Include <errno.h>. Remove extern declaration of
15396 errno.
15397
6d782a97
DJ
153982004-03-12 Daniel Jacobowitz <drow@mvista.com>
15399
15400 * gdbreplay.c, server.h, utils.c: Update copyright years.
15401
3a7fb99b
DJ
154022004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15403
15404 * server.c (main): Print child status or termination signal from
15405 variable 'signal', not 'sig'.
15406
c3e735a6
DJ
154072004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15408
15409 * linux-low.c (linux_read_memory): Change return type to
15410 int. Check for and return error from ptrace().
15411 * target.c (read_inferior_memory): Change return type to int. Pass
15412 back return status from the_target->read_memory().
15413 * target.h (struct target_ops): Adapt *read_memory() prototype.
15414 Update comment.
15415 (read_inferior_memory): Adapt prototype.
15416 * server.c (main): Return an error packet if
15417 read_inferior_memory() returns an error.
15418
a59d1c82
DJ
154192004-03-04 Daniel Jacobowitz <drow@mvista.com>
15420
15421 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15422 Unify with other clean targets.
15423
dc3f8883
DJ
154242004-02-29 Daniel Jacobowitz <drow@mvista.com>
15425
15426 * server.c (handle_v_cont): Call set_desired_inferior.
15427
89a208da
DJ
154282004-02-29 Daniel Jacobowitz <drow@mvista.com>
15429
15430 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15431
62ea82f5
DJ
154322004-02-29 Daniel Jacobowitz <drow@mvista.com>
15433
15434 * linux-low.c (linux_wait): Unblock async I/O.
15435 (linux_resume): Block and enable async I/O.
15436 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15437 * server.h (block_async_io, unblock_async_io): Add prototypes.
15438
6910d122
DJ
154392004-02-29 Daniel Jacobowitz <drow@mvista.com>
15440
15441 * remote-utils.c (remote_open): Print a status notice after
15442 opening a TCP port.
15443 * server.c (attach_inferior): Print a status notice after
15444 attaching.
15445
154462004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15447
15448 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15449
c89dc5d4
DJ
154502004-02-26 Daniel Jacobowitz <drow@mvista.com>
15451
15452 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15453 error packet.
15454 * server.c, target.h: Update copyright years.
15455
4b8dad4a
RM
154562004-02-25 Roland McGrath <roland@redhat.com>
15457
15458 * target.h (struct target_ops): New member `read_auxv'.
15459 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15460 * linux-low.c (linux_read_auxv): New function.
15461 (linux_target_ops): Initialize `read_auxv' member to that.
15462
d7446758
JB
154632004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15464
15465 Committed by Jim Blandy <jimb@redhat.com>.
15466
15467 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15468 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15469 instead of GPR_SIZE to distiguish s390 and s390x targets.
15470
5544ad89
DJ
154712004-01-31 Daniel Jacobowitz <drow@mvista.com>
15472
15473 * linux-low.c: Update copyright year.
15474 (check_removed_breakpoint): Clear pending_is_breakpoint.
15475 (linux_set_resume_request, linux_queue_one_thread)
15476 (resume_status_pending_p): New functions.
15477 (linux_continue_one_thread): Use process->resume.
15478 (linux_resume): Only resume threads if there are no pending events.
15479 * linux-low.h (struct process_info): Add resume request
15480 pointer.
15481
2a68b70e
DJ
154822004-01-30 Daniel Jacobowitz <drow@mvista.com>
15483
15484 * regcache.c (new_register_cache): Clear the allocated register
15485 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15486
64386c31
DJ
154872003-10-13 Daniel Jacobowitz <drow@mvista.com>
15488
15489 * linux-low.c (linux_resume): Take a struct thread_resume *
15490 argument.
15491 (linux_wait): Update call.
15492 (resume_ptr): New static variable.
15493 (linux_continue_one_thread): Renamed from
15494 linux_continue_one_process. Use resume_ptr.
15495 (linux_resume): Use linux_continue_one_thread.
15496 * server.c (handle_v_cont, handle_v_requests): New functions.
15497 (myresume): New function.
15498 (main): Handle 'v' case.
15499 * target.h (struct thread_resume): New type.
15500 (struct target_ops): Change argument of "resume" to struct
15501 thread_resume *.
15502 (myresume): Delete macro.
15503
c938e9b0
L
155042003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15505
15506 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15507 (uninstall): Support DESTDIR.
15508
7f313d07
BC
15509Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15510
15511 * configure.srv: Add xscale*linux copy of arm*linux entry.
15512
3b2fc2ea
DJ
155132003-07-24 Daniel Jacobowitz <drow@mvista.com>
15514
15515 * linux-arm-low.c (arm_reinsert_addr): New function.
15516 (the_low_target): Add arm_reinsert_addr.
15517
1c0a559e
MK
155182003-07-08 Mark Kettenis <kettenis@gnu.org>
15519
15520 * mem-break.c: Remove whitespace at end of file.
15521
43d5792c
DJ
155222003-06-28 Daniel Jacobowitz <drow@mvista.com>
15523
15524 * configure.in: Check whether we need to prototype strerror.
15525 * server.h: Optionally prototype strerror.
15526 * gdbreplay.c (perror_with_name): Use strerror.
15527 * linux-low.c (linux_attach_lwp): Use strerror.
15528 * utils.c (perror_with_name): Use strerror.
15529 * config.in, configure: Regenerated.
15530
c8a86edf
DJ
155312003-06-28 Daniel Jacobowitz <drow@mvista.com>
15532
15533 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15534 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15535
73d37363
DJ
155362003-06-20 Daniel Jacobowitz <drow@mvista.com>
15537
15538 * Makefile.in (SFILES): Update.
15539 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15540 low-sun3.c: Remove files.
15541
6ad8ae5c
DJ
155422003-06-17 Daniel Jacobowitz <drow@mvista.com>
15543
15544 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15545 (linux_detach_one_process, linux_detach): New functions.
15546 (linux_target_ops): Add linux_detach.
15547 * server.c (main): Handle 'D' packet.
15548 * target.h (struct target_ops): Add "detach" member.
15549 (detach_inferior): Define.
15550
1581182a
MK
155512003-06-13 Mark Kettenis <kettenis@gnu.org>
15552
15553 From Kelley Cook <kelleycook@wideopenwest.com>:
15554 * configure.srv: Accept i[34567]86 variants.
15555
e5379b03
DJ
155562003-06-05 Daniel Jacobowitz <drow@mvista.com>
15557
15558 * linux-low.c (linux_wait_for_event): Correct comment typos.
15559 (linux_resume_one_process): Call check_removed_breakpoint.
15560 (linux_send_signal): New function.
15561 (linux_target_ops): Add linux_send_signal.
15562 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15563 of kill.
15564 * target.h (struct target_ops): Add send_signal.
15565
2ff29de4
JB
155662003-05-29 Jim Blandy <jimb@redhat.com>
15567
15568 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15569 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15570 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15571 away part of the register's value.
15572
254787d4
DJ
155732003-03-26 Daniel Jacobowitz <drow@mvista.com>
15574
15575 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15576 (linux_wait_for_event, linux_init_signals): Likewise.
15577
94e10508
DJ
155782003-03-17 Daniel Jacobowitz <drow@mvista.com>
15579
15580 * configure.in: Check for stdlib.h.
15581 * configure: Regenerated.
15582 * config.in: Regenerated.
15583
4c0711e0
DJ
155842003-01-04 Andreas Schwab <schwab@suse.de>
15585
15586 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15587
ef66e766
AC
155882003-01-02 Andrew Cagney <ac131313@redhat.com>
15589
15590 * Makefile.in: Remove obsolete code.
15591
a1358604
DJ
155922002-11-20 Daniel Jacobowitz <drow@mvista.com>
15593
15594 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15595 defined(PT_FPR0_HI).
15596
23ce3b1c
DJ
155972002-11-17 Stuart Hughes <seh@zee2.com>
15598
15599 * linux-arm-low.c (arm_num_regs): Increase.
15600 (arm_regmap): Include status register.
15601
156022002-11-17 Daniel Jacobowitz <drow@mvista.com>
15603
15604 * linux-low.c (register_addr): Remove incorrect -1 check.
15605
a9fa9f7d
DJ
156062002-08-29 Daniel Jacobowitz <drow@mvista.com>
15607
15608 * linux-low.c (linux_create_inferior): Call setpgid. Return
15609 the new PID.
15610 (unstopped_p, linux_signal_pid): Remove.
15611 (linux_target_ops): Remove linux_signal_pid.
15612 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15613 global instead of target method.
15614 * target.h (struct target_ops): Remove signal_pid. Update comment
15615 for create_inferior.
15616 * server.c (signal_pid): New variable.
15617 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15618 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15619 (attach_inferior): Set signal_pid.
15620
17574093
DJ
156212002-08-23 Daniel Jacobowitz <drow@mvista.com>
15622
15623 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15624
156252002-08-20 Jim Blandy <jimb@redhat.com>
15626
15627 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15628 default for this.
15629
156302002-08-01 Andrew Cagney <cagney@redhat.com>
15631
15632 * Makefile.in: Make chill references obsolete.
15633
156342002-07-24 Kevin Buettner <kevinb@redhat.com>
15635
15636 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15637 * configure: Regenerate.
15638 * config.in: Regenerate.
15639
156402002-07-09 David O'Brien <obrien@FreeBSD.org>
15641
15642 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15643 (perror_with_name, remote_close, remote_open, expect, play): Static.
15644
156452002-07-04 Michal Ludvig <mludvig@suse.cz>
15646
4b8dad4a 15647 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15648 byte offsets instead of an array of indexes.
15649 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15650
156512002-06-13 Daniel Jacobowitz <drow@mvista.com>
15652
15653 * regcache.c: Add comment.
15654
156552002-06-11 Daniel Jacobowitz <drow@mvista.com>
15656
15657 * thread-db.c: New file.
15658 * proc-service.c: New file.
15659 * acinclude.m4: New file.
15660 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15661 proc-service.o, and thread-db.o.
15662 (linux-low.o): Add USE_THREAD_DB.
15663 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15664 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15665 * aclocal.m4: Regenerated.
15666 * config.in: Regenerated.
15667 * configure: Regenerated.
15668 * configure.in: Check for proc_service.h, sys/procfs.h,
15669 thread_db.h, and linux/elf.h headrs.
15670 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15671 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15672 Check for -lthread_db and thread support.
15673 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15674 PowerPC, and SuperH.
15675 * i387-fp.c: Constify arguments.
15676 * i387-fp.h: Likewise.
15677 * inferiors.c: (struct thread_info): Renamed from
15678 `struct inferior_info'. Remove PID member. Use generic inferior
15679 list header. All uses updated.
15680 (inferiors, signal_pid): Removed.
15681 (all_threads): New variable.
15682 (get_thread): Define.
15683 (add_inferior_to_list): New function.
15684 (for_each_inferior): New function.
15685 (change_inferior_id): New function.
15686 (add_inferior): Removed.
15687 (remove_inferior): New function.
15688 (add_thread): New function.
15689 (free_one_thread): New function.
15690 (remove_thread): New function.
15691 (clear_inferiors): Use for_each_inferior and free_one_thread.
15692 (find_inferior): New function.
15693 (find_inferior_id): New function.
15694 (inferior_target_data): Update argument type.
15695 (set_inferior_target_data): Likewise.
15696 (inferior_regcache_data): Likewise.
15697 (set_inferior_regcache_data): Likewise.
15698 * linux-low.c (linux_bp_reinsert): Remove.
15699 (all_processes, stopping_threads, using_thrads)
15700 (struct pending_signals, debug_threads, pid_of): New.
15701 (inferior_pid): Replace with macro.
15702 (struct inferior_linux_data): Remove.
15703 (get_stop_pc, add_process): New functions.
15704 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15705 Use add_process and add_thread.
15706 (linux_attach_lwp): New function, based on old linux_attach. Use
15707 add_process and add_thread. Set stop_expected for new threads.
15708 (linux_attach): New function.
15709 (linux_kill_one_process): New function.
15710 (linux_kill): Kill all LWPs.
15711 (linux_thread_alive): Use find_inferior_id.
15712 (check_removed_breakpoints, status_pending_p): New functions.
15713 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15714 Update. Use WNOHANG. Wait for cloned processes also. Update process
15715 struct for the found process.
15716 (linux_wait_for_event): New function.
15717 (linux_wait): Use it. Support LWPs.
15718 (send_sigstop, wait_for_sigstop, stop_all_processes)
15719 (linux_resume_one_process, linux_continue_one_process): New functions.
15720 (linux_resume): Support LWPs.
15721 (REGISTER_RAW_SIZE): Remove.
15722 (fetch_register): Use register_size instead. Call supply_register.
15723 (usr_store_inferior_registers): Likewise. Call collect_register.
15724 Fix recursive case.
15725 (regsets_fetch_inferior_registers): Improve error message.
15726 (regsets_store_inferior_registers): Add debugging.
15727 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15728 (unstopped_p, linux_signal_pid): New functions.
15729 (linux_target_ops): Add linux_signal_pid.
15730 (linux_init_signals): New function.
15731 (initialize_low): Call it. Initialize using_threads.
15732 * regcache.c (inferior_regcache_data): Add valid
15733 flag.
15734 (get_regcache): Fetch registers lazily. Add fetch argument
15735 and update all callers.
15736 (regcache_invalidate_one, regcache_invalidate): New
15737 functions.
15738 (new_register_cache): Renamed from create_register_cache.
15739 Return the new regcache.
15740 (free_register_cache): Change argument to a void *.
15741 (registers_to_string, registers_from_string): Call get_regcache
15742 with fetch flag set.
15743 (register_data): Make static. Pass fetch flag to get_regcache.
15744 (supply_register): Call get_regcache with fetch flag clear.
15745 (collect_register): Call get_regcache with fetch flag set.
15746 (collect_register_as_string): New function.
15747 * regcache.h: Update.
15748 * remote-utils.c (putpkt): Flush after debug output and use
15749 stderr.
15750 Handle input interrupts while waiting for an ACK.
15751 (input_interrupt): Use signal_pid method.
15752 (getpkt): Flush after debug output and use stderr.
15753 (outreg): Use collect_register_as_string.
15754 (new_thread_notify, dead_thread_notify): New functions.
15755 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15756 and general_thread.
15757 (look_up_one_symbol): Flush after debug output.
15758 * server.c (step_thread, server_waiting): New variables.
15759 (start_inferior): Don't use signal_pid. Update call to mywait.
15760 (attach_inferior): Update call to mywait.
15761 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15762 (main): Don't fetch/store registers explicitly. Use
15763 set_desired_inferior. Support proposed ``Hs'' packet. Update
15764 calls to mywait.
15765 * server.h: Update.
15766 (struct inferior_list, struct_inferior_list_entry): New.
15767 * target.c (set_desired_inferior): New.
15768 (write_inferior_memory): Constify.
15769 (mywait): New function.
15770 * target.h: Update.
15771 (struct target_ops): New signal_pid method.
15772 (mywait): Removed macro, added prototype.
15773
15774 * linux-low.h (regset_func): Removed.
15775 (regset_fill_func, regset_store_func): New.
15776 (enum regset_type): New.
15777 (struct regset_info): Add type field. Use new operation types.
15778 (struct linux_target_ops): stop_pc renamed to get_pc.
15779 Add decr_pc_after_break and breakpoint_at.
15780 (get_process, get_thread_proess, get_process_thread)
15781 (strut process_info, all_processes, linux_attach_lwp)
15782 (thread_db_init): New.
15783
15784 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15785 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15786 (the_low_target): Add new members.
15787 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15788 (i386_store_fpxregset): Constify.
15789 (target_regsets): Add new kind identifier.
15790 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15791 (i386_set_pc): Add debugging.
15792 (i386_breakpoint_at): New function.
15793 (the_low_target): Add new members.
15794 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15795 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15796 (mips_breakpoint_at): New.
15797 (the_low_target): Add new members.
15798 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15799 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15800 (the_low_target): Add new members.
15801 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15802 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15803 (the_low_target): Add new members.
15804 * linux-x86-64-low.c (target_regsets): Add new kind
15805 identifier.
15806
158072002-05-15 Daniel Jacobowitz <drow@mvista.com>
15808
15809 From Martin Pool <mbp@samba.org>:
15810 * server.c (gdbserver_usage): New function.
15811 (main): Call it.
15812
158132002-05-14 Daniel Jacobowitz <drow@mvista.com>
15814
15815 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15816 stop_at -> stop_pc.
15817
158182002-05-04 Andrew Cagney <ac131313@redhat.com>
15819
15820 * Makefile.in: Remove obsolete code.
15821
158222002-04-24 Michal Ludvig <mludvig@suse.cz>
15823
15824 * linux-low.c (regsets_fetch_inferior_registers),
15825 (regsets_store_inferior_registers): Removed cast to int from
15826 ptrace() calls.
15827 * regcache.h: Added declaration of struct inferior_info.
15828
158292002-04-20 Daniel Jacobowitz <drow@mvista.com>
15830
15831 * inferiors.c (struct inferior_info): Add regcache_data.
15832 (add_inferior): Call create_register_cache.
15833 (clear_inferiors): Call free_register_cache.
15834 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15835 * regcache.c (struct inferior_regcache_data): New.
15836 (registers): Remove.
15837 (get_regcache): New function.
15838 (create_register_cache, free_register_cache): New functions.
15839 (set_register_cache): Don't initialize the register cache here.
15840 (registers_to_string, registers_from_string, register_data): Call
15841 get_regcache.
15842 * regcache.h: Add prototypes.
15843 * server.h: Likewise.
15844
158452002-04-20 Daniel Jacobowitz <drow@mvista.com>
15846
15847 * mem-break.c: New file.
15848 * mem-break.h: New file.
15849 * Makefile.in: Add mem-break.o rule; update server.h
15850 dependencies.
15851 * inferiors.c (struct inferior_info): Add target_data
15852 member.
15853 (clear_inferiors): Free target_data member if set.
15854 (inferior_target_data, set_inferior_target_data): New functions.
15855 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15856 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15857 * linux-low.c (linux_bp_reinsert): New variable.
15858 (struct inferior_linux_data): New.
15859 (linux_create_inferior): Use set_inferior_target_data.
15860 (linux_attach): Likewise. Call add_inferior.
15861 (linux_wait_for_one_inferior): New function.
15862 (linux_wait): Call it.
15863 (linux_write_memory): Add const.
15864 (initialize_low): Call set_breakpoint_data.
15865 * linux-low.h (struct linux_target_ops): Add breakpoint
15866 handling members.
15867 * server.c (attach_inferior): Remove extra add_inferior
15868 call.
15869 * server.h: Include mem-break.h. Update inferior.c
15870 prototypes.
15871 * target.c (read_inferior_memory)
15872 (write_inferior_memory): New functions.
15873 * target.h (read_inferior_memory)
15874 (write_inferior_memory): Change macros to prototypes.
15875 (struct target_ops): Update comments. Add const to write_memory
15876 definition.
15877
158782002-04-11 Daniel Jacobowitz <drow@mvista.com>
15879
15880 * linux-low.c (usr_store_inferior_registers): Support
15881 registers which are allowed to fail to store.
15882 * linux-low.h (linux_target_ops): Likewise.
15883 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15884 (ppc_cannot_store_register): FPSCR may not be storable.
15885
158862002-04-09 Daniel Jacobowitz <drow@mvista.com>
15887
15888 * server.h: Include <string.h> if HAVE_STRING_H.
15889 * ChangeLog: Correct paths in last ChangeLog entry.
15890
158912002-04-09 Daniel Jacobowitz <drow@mvista.com>
15892
15893 * linux-low.h: Remove obsolete prototypes.
15894 (struct linux_target_ops): New.
15895 (extern the_low_target): New.
15896 * linux-low.c (num_regs, regmap): Remove declarations.
15897 (register_addr): Use the_low_target explicitly.
15898 (fetch_register): Likewise.
15899 (usr_fetch_inferior_registers): Likewise.
15900 (usr_store_inferior_registers): Likewise.
15901 * linux-arm-low.c (num_regs): Remove.
15902 (arm_num_regs): Define.
15903 (arm_regmap): Renamed from regmap, made static.
15904 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15905 made static.
15906 (arm_cannot_store_register): Renamed from cannot_store_register,
15907 made static.
15908 (the_low_target): New.
15909 * linux-i386-low.c (num_regs): Remove.
15910 (i386_num_regs): Define.
15911 (i386_regmap): Renamed from regmap, made static.
15912 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15913 made static.
15914 (i386_cannot_store_register): Renamed from cannot_store_register,
15915 made static.
15916 (the_low_target): New.
15917 * linux-ia64-low.c (num_regs): Remove.
15918 (ia64_num_regs): Define.
15919 (ia64_regmap): Renamed from regmap, made static.
15920 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15921 made static.
15922 (ia64_cannot_store_register): Renamed from cannot_store_register,
15923 made static.
15924 (the_low_target): New.
15925 * linux-m68k-low.c (num_regs): Remove.
15926 (m68k_num_regs): Define.
15927 (m68k_regmap): Renamed from regmap, made static.
15928 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15929 made static.
15930 (m68k_cannot_store_register): Renamed from cannot_store_register,
15931 made static.
15932 (the_low_target): New.
15933 * linux-mips-low.c (num_regs): Remove.
15934 (mips_num_regs): Define.
15935 (mips_regmap): Renamed from regmap, made static.
15936 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15937 made static.
15938 (mips_cannot_store_register): Renamed from cannot_store_register,
15939 made static.
15940 (the_low_target): New.
15941 * linux-ppc-low.c (num_regs): Remove.
15942 (ppc_num_regs): Define.
15943 (ppc_regmap): Renamed from regmap, made static.
15944 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15945 made static.
15946 (ppc_cannot_store_register): Renamed from cannot_store_register,
15947 made static.
15948 (the_low_target): New.
15949 * linux-s390-low.c (num_regs): Remove.
15950 (s390_num_regs): Define.
15951 (s390_regmap): Renamed from regmap, made static.
15952 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15953 made static.
15954 (s390_cannot_store_register): Renamed from cannot_store_register,
15955 made static.
15956 (the_low_target): New.
15957 * linux-sh-low.c (num_regs): Remove.
15958 (sh_num_regs): Define.
15959 (sh_regmap): Renamed from regmap, made static.
15960 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15961 made static.
15962 (sh_cannot_store_register): Renamed from cannot_store_register,
15963 made static.
15964 (the_low_target): New.
15965 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15966 (the_low_target): New.
15967
159682002-04-09 Daniel Jacobowitz <drow@mvista.com>
15969
15970 * Makefile.in: Add stamp-h target.
15971 * configure.in: Create stamp-h.
15972 * configure: Regenerated.
15973
159742002-04-09 Daniel Jacobowitz <drow@mvista.com>
15975
15976 * inferiors.c: New file.
15977 * target.c: New file.
15978 * target.h: New file.
15979 * Makefile.in: Add target.o and inferiors.o. Update
15980 dependencies.
15981 * linux-low.c (inferior_pid): New static variable,
15982 moved from server.c.
15983 (linux_create_inferior): Renamed from create_inferior.
15984 Call add_inferior. Return 0 on success instead of a PID.
15985 (linux_attach): Renamed from myattach.
15986 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15987 (linux_thread_alive): Renamed from mythread_alive.
15988 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15989 child dies.
15990 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15991 (regsets_store_inferior_registers): Correct error message.
15992 Add missing ``return 0''.
15993 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15994 (linux_store_registers): Renamed from store_inferior_registers.
15995 (linux_read_memory): Renamed from read_inferior_memory.
15996 (linux_write_memory): Renamed from write_inferior_memory.
15997 (linux_target_ops): New structure.
15998 (initialize_low): Call set_target_ops ().
15999 * remote-utils.c (unhexify): New function.
16000 (hexify): New function.
16001 (input_interrupt): Send signals to ``signal_pid''.
16002 * server.c (inferior_pid): Remove.
16003 (start_inferior): Update create_inferior call.
16004 (attach_inferior): Call add_inferior.
16005 (handle_query): New function.
16006 (main): Call handle_query for `q' packets.
16007 * server.h: Include "target.h". Remove obsolete prototypes.
16008 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16009
160102002-04-09 Daniel Jacobowitz <drow@mvista.com>
16011
16012 * Makefile.in: Add WARN_CFLAGS. Update configury
16013 dependencies.
16014 * configure.in: Check for <string.h>
16015 * configure: Regenerate.
16016 * config.in: Regenerate.
16017 * gdbreplay.c: Include needed system headers.
16018 (remote_open): Remove strchr prototype.
16019 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16020 * regcache.c (supply_register): Change buf argument to const void *.
16021 (supply_register_by_name): Likewise.
16022 (collect_register): Change buf argument to void *.
16023 (collect_register_by_name): Likewise.
16024 * regcache.h: Add missing prototypes.
16025 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16026 * server.c (handle_query): New function.
16027 (attached): New static variable, moved out of main.
16028 (main): Quiet longjmp clobber warnings.
16029 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
16030 * utils.c (error): Remove NORETURN.
16031 (fatal): Likewise.
This page took 3.511562 seconds and 4 git commands to generate.