Removes a cleanup from gcore.c
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
f5291a6f
UW
12017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
2
3 * spu-low.c (spu_create_inferior): Fix typo in argument name.
4
6654d750
AH
52017-11-24 Alan Hayward <alan.hayward@arm.com>
6
7 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
8 * linux-aarch64-low.c (initialize_low_arch): Call init func.
9 * linux-aarch64-tdesc-selftest.c: New file.
10 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
11
122017-11-24 Alan Hayward <alan.hayward@arm.com>
13
14 * configure.srv: Add new file.
15 * linux-aarch64-low.c (initialize_low_arch): Call init func.
16 * linux-aarch64-tdesc-selftest.c: New file.
17 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
18
49bdb7ee
AH
192017-11-24 Alan Hayward <alan.hayward@arm.com>
20
21 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
22 * linux-aarch64-low.c (initialize_low_arch): Remove init.
23 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
24
d6d7ce56
AH
252017-11-24 Alan Hayward <alan.hayward@arm.com>
26
27 * configure.srv: Add new files.
28 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
29 aarch64_linux_read_description.
30 * linux-aarch64-low.c (aarch64_linux_read_description):
31 Merge with aarch64_arch_setup.
32 (aarch64_arch_setup): Call aarch64_linux_read_description.
33 * linux-aarch64-tdesc.c: New file.
34 * linux-aarch64-tdesc.h: New file.
35
506fe5f4
YQ
362017-11-24 Yao Qi <yao.qi@linaro.org>
37
38 * configure.srv: Set $srv_regobj for tic6x-linux.
39 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
40 (tic6x_read_description): Move some code to tic6x_arch_setup.
41 (tic6x_tdesc_test): New function.
42 (initialize_low_arch): Call selftests::register_test.
43
29f9a567
YQ
442017-11-22 Yao Qi <yao.qi@linaro.org>
45
46 * remote-utils.c (prepare_resume_reply): Use memcpy.
47
578290ec
SM
482017-11-19 Simon Marchi <simon.marchi@ericsson.com>
49
50 * linux-low.c (kill_one_lwp_callback): Return void, take
51 argument directly, don't filter on pid.
52 (linux_kill): Use for_each_thread.
53
eca55aec
SM
542017-11-19 Simon Marchi <simon.marchi@ericsson.com>
55
56 * linux-low.c (need_step_over_p): Return bool, remove dummy
57 argument.
58 (linux_resume, proceed_all_lwps): Use find_thread.
59
25c28b4d
SM
602017-11-19 Simon Marchi <simon.marchi@ericsson.com>
61
62 * linux-low.c (resume_status_pending_p): Return bool, remove
63 flag_p argument.
64 (linux_resume): Use find_thread.
65
5fdda392
SM
662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
67
68 * linux-low.c (struct thread_resume_array): Remove.
69 (linux_set_resume_request): Return void, take arguments
70 directly.
71 (linux_resume): Use for_each_thread.
72
fcb056a5
SM
732017-11-19 Simon Marchi <simon.marchi@ericsson.com>
74
75 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
76 return bool, remove data argument.
77 (linux_stabilize_threads): Use find_thread.
78
139720c5
SM
792017-11-19 Simon Marchi <simon.marchi@ericsson.com>
80
81 * linux-low.c (unsuspend_one_lwp): Remove.
82 (unsuspend_all_lwps): Use for_each_thread, inline code from
83 unsuspend_one_lwp.
84
6d1e5673
SM
852017-11-19 Simon Marchi <simon.marchi@ericsson.com>
86
87 * gdbthread.h (find_thread): Add overload with ptid_t filter.
88 * linux-low.c (struct iterate_over_lwps_args): Remove.
89 (iterate_over_lwps_filter): Remove.
90 (iterate_over_lwps): Use find_thread.
91
bbf550d5
SM
922017-11-19 Simon Marchi <simon.marchi@ericsson.com>
93
94 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
95 (linux_handle_new_gdb_connection): Use for_each_thread, inline
96 code from reset_lwp_ptrace_options_callback.
97
00192f77
SM
982017-11-19 Simon Marchi <simon.marchi@ericsson.com>
99
100 * linux-arm-low.c (struct update_registers_data): Remove.
101 (update_registers_callback): Return void, take arguments
102 directly, don't check thread's pid.
103 (arm_insert_point, arm_remove_point): Use for_each_thread.
104
2bee2b6c
SM
1052017-11-19 Simon Marchi <simon.marchi@ericsson.com>
106
107 * win32-low.c (continue_one_thread): Return void, take argument
108 directly.
109 (child_continue): Use for_each_thread.
110
0b360f19
SM
1112017-11-19 Simon Marchi <simon.marchi@ericsson.com>
112
113 * win32-i386-low.c (update_debug_registers_callback): Rename
114 to ...
115 (update_debug_registers): ... this, return void, remove pid_p arg.
116 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
117
f27866ba
SM
1182017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
119
120 * inferiors.h (struct process_info): Add constructor, initialize
121 fields..
122 <syscalls_to_catch>: Change type to std::vector<int>.
123 * inferiors.c (add_process): Allocate process_info with new.
124 (remove_process): Free process_info with delete.
125 * linux-low.c (handle_extended_wait): Adjust.
126 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
127 * server.c (handle_general_set): Adjust.
128
e849ea89
PA
1292017-11-16 Pedro Alves <palves@redhat.com>
130
131 * remote-utils.c (remote_close): Block SIGIO signals instead of
132 uninstalling the SIGIO handler.
133
1d0aa65c
AH
1342017-11-16 Alan Hayward <alan.hayward@arm.com>
135
136 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
137
3491a34c
YQ
1382017-11-16 Yao Qi <yao.qi@linaro.org>
139
140 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
141 (tic6x_store_gregset): Likewise.
142 (tic6x_usrregs_info): Move it up.
143
a602f924
AH
1442017-11-15 Alan Hayward <alan.hayward@arm.com>
145
146 * Makefile.in: Update arch rules.
147 * configure.srv: Explicitly mark arch/ files.
148
5616b6c3
AS
1492017-11-13 Andreas Schwab <schwab@suse.de>
150
151 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
152 function.
153 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
154
d1928160
PA
1552017-11-06 Pedro Alves <palves@redhat.com>
156
157 * config.in, configure: Regenerate.
158
bac608e7
SM
1592017-10-27 Simon Marchi <simon.marchi@ericsson.com>
160
161 * target.c (struct thread_search): Remove.
162 (thread_search_callback): Remove.
163 (prepare_to_access_memory): Use for_each_thread instead of
164 find_inferior. Inline code from thread_search_callback.
165
eaddb425
SM
1662017-10-27 Simon Marchi <simon.marchi@ericsson.com>
167
168 * server.c (struct visit_actioned_threads_data): Remove.
169 (visit_actioned_threads): Change prototype to take arguments
170 directly.
171 (resume): Use find_thread instead of find_inferior.
172
99078d34
SM
1732017-10-27 Simon Marchi <simon.marchi@ericsson.com>
174
175 * server.c (queue_stop_reply_callback): Change prototype, return
176 void.
177 (find_status_pending_thread_callback): Remove.
178 (handle_status): Replace find_inferior with find_thread and
179 for_each_thread.
180
cc628f3d
AH
1812017-10-25 Alan Hayward <alan.hayward@arm.com>
182
183 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
184 with REGNO.
185 (aarch64_store_gregset): Likewise.
186 (aarch64_fill_fpregset): Likewise.
187 (aarch64_store_fpregset): Likewise.
188
4d3bb80e
SM
1892017-10-21 Simon Marchi <simon.marchi@ericsson.com>
190
191 * gdbthread.h (find_thread, for_each_thread): New functions.
192 * inferiors.c (thread_of_pid): Remove.
193 (find_any_thread_of_pid): Use find_thread.
194 * linux-low.c (num_lwps): Use for_each_thread.
195
7a7cdfa0
YQ
1962017-10-17 Yao Qi <yao.qi@linaro.org>
197
198 * Makefile.in: Remove one rule.
199 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
200
e675d170
YQ
2012017-10-17 Yao Qi <yao.qi@linaro.org>
202
203 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
204 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
205
7eb4e0f9
YQ
2062017-10-17 Yao Qi <yao.qi@linaro.org>
207
208 * configure.srv: Rename arm.o with arch/arm.o.
209
60d6cfc9
YQ
2102017-10-17 Yao Qi <yao.qi@linaro.org>
211
212 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
213 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
214 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
215 (arch-i386.o, arch-amd64.o): Remove rules.
216 (arch/%.o): New rule.
217 Update POSTCOMPILE and COMPILE.pre.
218 * configure.ac: Invoke AC_CONFIG_COMMANDS.
219 * configure: Re-generated.
220 * configure.srv: Replace arch-i386.o with arch/i386.o.
221 Replace arch-amd64.o with arch/amd64.o.
222
5bfda255
YQ
2232017-10-16 Yao Qi <yao.qi@linaro.org>
224
225 * configure: Regenerated.
226
9c80ecd6
SM
2272017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
228
229 * inferiors.h: (struct inferior_list): Remove.
230 (struct inferior_list_entry); Remove.
231 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
232 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
233 get_first_inferior): Remove.
234 (for_each_inferior, for_each_inferior_with_data, find_inferior,
235 find_inferior_id, find_inferior_in_random): Change signature.
236 * inferiors.c (all_threads): Change type to
237 std::list<thread_info *>.
238 (get_thread): Remove macro.
239 (find_inferior, find_inferior_id): Change signature, implement
240 using find_thread.
241 (find_inferior_in_random): Change signature, implement using
242 find_thread_in_random.
243 (for_each_inferior, for_each_inferior_with_data): Change
244 signature, implement using for_each_thread.
245 (add_inferior_to_list, remove_inferior): Remove.
246 (add_thread, get_first_thread, thread_of_pid,
247 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
248 (get_first_inferior, one_inferior_p, clear_inferior_list):
249 Remove.
250 (clear_inferiors, get_thread_process): Update.
251 * gdbthread.h: Include <list>.
252 (struct thread_info) <entry>: Remove field.
253 <id>: New field.
254 (all_threads): Change type to std::list<thread_info *>.
255 (get_first_inferior): Add doc.
256 (find_thread, for_each_thread, find_thread_in_random): New
257 functions.
258 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
259 * linux-arm-low.c (update_registers_callback): Update.
260 * linux-low.c (second_thread_of_pid_p): Update.
261 (kill_one_lwp_callback, linux_detach_lwp_callback,
262 delete_lwp_callback, status_pending_p_callback, same_lwp,
263 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
264 iterate_over_lwps, not_stopped_callback,
265 resume_stopped_resumed_lwps, count_events_callback,
266 select_singlestep_lwp_callback, select_event_lwp_callback,
267 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
268 suspend_and_send_sigstop_callback, wait_for_sigstop,
269 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
270 lwp_running, linux_set_resume_request, resume_status_pending_p,
271 need_step_over_p, start_step_over, linux_resume_one_thread,
272 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
273 reset_lwp_ptrace_options_callback): Update.
274 * linux-mips-low.c (update_watch_registers_callback): Update.
275 * regcache.c (regcache_invalidate_one, regcache_invalidate):
276 Update.
277 (free_register_cache_thread_one): Remove.
278 (regcache_release): Update.
279 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
280 handle_qxfer_threads_worker): Update.
281 (handle_query): Update, use list iterator.
282 (visit_actioned_threads, handle_pending_status,
283 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
284 clear_pending_status_callback, set_pending_status_callback,
285 find_status_pending_thread_callback, handle_status,
286 process_serial_event): Update.
287 * target.c (thread_search_callback): Update.
288 * thread-db.c (thread_db_get_tls_address): Update.
289 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
290 Update.
291 * win32-i386-low.c (update_debug_registers_callback): Update.
292 * win32-low.c (delete_thread_info, child_delete_thread,
293 continue_one_thread, suspend_one_thread,
294 get_child_debug_event): Adjust.
295
9179355e
SM
2962017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
297
298 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
299 * inferiors.h: Include <list>.
300 (struct process_info) <entry>: Remove field.
301 <pid>: New field.
302 (pid_of): Change macro to function.
303 (ptid_of, lwpid_of): Remove macro.
304 (all_processes): Change type to std::list<process_info *>.
305 (ALL_PROCESSES): Remove macro.
306 (for_each_process, find_process): New function.
307 * inferiors.c (all_processes): Change type to
308 std::list<process_info *>.
309 (find_thread_process): Adjust.
310 (add_process): Likewise.
311 (remove_process): Likewise.
312 (find_process_pid): Likewise.
313 (get_first_process): Likewise.
314 (started_inferior_callback): Remove.
315 (have_started_inferiors_p): Adjust.
316 (attached_inferior_callback): Remove.
317 (have_attached_inferiors_p): Adjust.
318 * linux-low.c (check_zombie_leaders): Likewise.
319 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
320 (x86_linux_update_xmltarget): Adjust.
321 * server.c (handle_query): Likewise.
322 (gdb_reattached_process): Remove.
323 (handle_status): Adjust.
324 (kill_inferior_callback): Likewise.
325 (detach_or_kill_inferior): Remove.
326 (print_started_pid): Likewise.
327 (print_attached_pid): Likewise.
328 (detach_or_kill_for_exit): Update.
329 (process_serial_event): Likewise.
330 * linux-arm-low.c (arm_new_fork): Likewise.
331
c9cb8905
SM
3322017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
333
334 * dll.h: Include <list>.
335 (struct dll_info): Add constructor.
336 <entry>: Remove field.
337 (all_dlls): Change type to std::list<dll_info>.
338 * dll.c: Include <algorithm>.
339 (get_dll): Remove macro.
340 (all_dlls): Change type to std::list<dll_info *>.
341 (free_one_dll): Remove.
342 (match_dll): Likewise.
343 (loaded_dll): Adjust.
344 (unloaded_dll): Adjust to all_dlls type change, use
345 std::find_if. Inline code from match_dll.
346 (clear_dlls): Adjust to all_dlls type change.
347 * server.c (emit_dll_description): Remove.
348 (handle_qxfer_libraries): Adjust to all_dlls type change,
349 integrate emit_dll_description's functionality.
350
04ec7890
SM
3512017-10-12 Simon Marchi <simon.marchi@ericsson.com>
352
353 * linux-low.h (struct linux_target_ops) <delete_process>: New
354 field.
355 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
356 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
357 (struct linux_target_ops): Add delete_process callback.
358 * linux-arm-low.c (arm_delete_process): New.
359 (struct linux_target_ops): Add delete_process callback.
360 * linux-bfin-low.c (struct linux_target_ops): Likewise.
361 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
362 * linux-m32r-low.c (struct linux_target_ops): Likewise.
363 * linux-mips-low.c (mips_linux_delete_process): New.
364 (struct linux_target_ops): Add delete_process callback.
365 * linux-ppc-low.c (struct linux_target_ops): Likewise.
366 * linux-s390-low.c (struct linux_target_ops): Likewise.
367 * linux-sh-low.c (struct linux_target_ops): Likewise.
368 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
369 * linux-tile-low.c (struct linux_target_ops): Likewise.
370 * linux-x86-low.c (x86_linux_delete_process): New.
371 (struct linux_target_ops): Add delete_process callback.
372 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
373
466eecee
SM
3742017-10-12 Simon Marchi <simon.marchi@ericsson.com>
375
376 * linux-aarch64-low.c (the_low_target): Add thread delete
377 callback.
378 * linux-arm-low.c (arm_delete_thread): New function.
379 (the_low_target): Add thread delete callback.
380 * linux-bfin-low.c (the_low_target): Likewise.
381 * linux-crisv32-low.c (the_low_target): Likewise.
382 * linux-low.c (delete_lwp): Invoke delete_thread callback if
383 set.
384 * linux-low.h (struct linux_target_ops) <delete_thread>: New
385 field.
386 * linux-m32r-low.c (the_low_target): Add thread delete callback.
387 * linux-mips-low.c (mips_linux_delete_thread): New function.
388 (the_low_target): Add thread delete callback.
389 * linux-ppc-low.c (the_low_target): Likewise.
390 * linux-s390-low.c (the_low_target): Likewise.
391 * linux-sh-low.c (the_low_target): Likewise.
392 * linux-tic6x-low.c (the_low_target): Likewise.
393 * linux-tile-low.c (the_low_target): Likewise.
394 * linux-x86-low.c (the_low_target): Likewise.
395 * linux-xtensa-low.c (the_low_target): Likewise.
396
b79f7801
YZ
3972017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
398
399 * win32-low.c: Include "common-inferior.h".
400
bc3b087d
SDJ
4012017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
402
403 * inferiors.c (set_inferior_cwd): New function.
404 * server.c (handle_general_set): Handle QSetWorkingDir packet.
405 (handle_query): Inform that QSetWorkingDir is supported.
406 * win32-low.c (create_process): Pass the inferior's cwd to
407 CreateProcess.
408
d092c5a2
SDJ
4092017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
410
411 * inferiors.c (current_inferior_cwd): New global variable.
412 (get_inferior_cwd): New function.
413 * inferiors.h (struct process_info) <cwd>: New field.
414
7da0a886
SDJ
4152017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
416
417 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
418 (OBS): Add gdb_tilde_expand.o.
419
289a6840
SM
4202017-10-02 Simon Marchi <simon.marchi@ericsson.com>
421
422 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
423 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
424
256642e8
PA
4252017-09-29 Pedro Alves <palves@redhat.com>
426
427 * ax.c (gdb_parse_agent_expr): Constify.
428 * ax.h (gdb_parse_agent_expr): Constify.
429 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
430 Constify.
431 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
432 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
433 * remote-utils.h (read_ptid): Constify.
434 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
435 (process_point_options, process_serial_event): Constify.
436 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
437 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
438 (cmd_qtbuffer): Constify.
439
5b9ca4d4
PA
4402017-09-29 Pedro Alves <palves@redhat.com>
441
442 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
443 fails.
444
94c207e0
PA
4452017-09-29 Pedro Alves <palves@redhat.com>
446
447 * linux-low.c (handle_extended_wait): Pass parent thread instead
448 of process to thread_db_notice_clone.
449 * linux-low.h (thread_db_notice_clone): Replace parent process
450 parameter with parent thread parameter.
451 * thread-db.c (find_one_thread): Add comment.
452 (thread_db_notice_clone): Replace parent process parameter with
453 parent thread parameter. Temporarily switch to the parent thread.
454
75352e28
SDJ
4552017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
456
457 * gdbthread.h: Include "common-gdbthread.h".
458 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
459 "if" when validating the ptid.
460 * remote-utils.c: Include "gdbthread.h".
461 (prepare_resume_reply): Use "switch_to_thread".
462 * target.c (done_accessing_memory): Likewise.
463
ad339634
AA
4642017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
465
466 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
467 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
468 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
469 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
470 s390x-gs-linux64-ipa.o to ipa_obj.
471 * linux-s390-low.c (HWCAP_S390_GS): New define.
472 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
473 New functions.
474 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
475 (s390_arch_setup): Check for guarded-storage support and choose
476 appropriate tdesc.
477 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
478 init_registers_s390x_gs_linux64.
479 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
480 enum value.
481 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
482 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
483
cc4d742f
SM
4842017-09-22 Simon Marchi <simon.marchi@ericsson.com>
485
486 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
487
f6327dcb
KB
4882017-09-21 Kevin Buettner <kevinb@redhat.com>
489
490 * linux-low.h (struct lwp_info): Add new field, thread_handle.
491 (thread_db_thread_handle): Declare.
492 * linux-low.c (linux_target_ops): Initialize thread_handle.
493 * server.c (handle_qxfer_threads_worker): Add support for
494 "handle" attribute.
495 * target.h (struct target_ops): Add new function pointer,
496 thread_handle.
497 (target_thread_handle): Define.
498 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
499 field in lwp.
500 (thread_db_thread_handle): New function.
501
86299109
KB
5022017-09-21 Kevin Buettner <kevinb@redhat.com>
503
504 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
505 * linux-low.h (thread_db_notice_clone): Declare.
506 * thread-db.c (thread_db_notice_clone): New function.
507
f557a88a
PA
5082017-09-21 Pedro Alves <palves@redhat.com>
509
510 * server.c (gdb_read_memory, handle_status, process_serial_event)
511 (handle_serial_event, handle_target_event): Adjust to
512 set_desired_thread prototype change.
513 * target.c (set_desired_thread): Remove 'use_general' parameter
514 and adjust.
515 * target.h (set_desired_thread): Remove 'use_general' parameter.
516
223ffa71
TT
5172017-09-20 Tom Tromey <tom@tromey.com>
518
519 * target.c (target_terminal::terminal_state): Define.
520 (target_terminal::init): Rename from target_terminal_init.
521 (target_terminal::inferior): Rename from
522 target_terminal_inferior.
523 (target_terminal::ours): Rename from target_terminal_ours.
524 (target_terminal::ours_for_output, target_terminal::info): New.
525
04fd3ba9
SM
5262017-09-16 Simon Marchi <simon.marchi@ericsson.com>
527
528 * server.c (accumulate_file_name_length): Remove.
529 (emit_dll_description): Adjust to std::string change.
530 (handle_qxfer_libraries): Use std::string to hold document.
531
5e187554
SM
5322017-09-16 Simon Marchi <simon.marchi@ericsson.com>
533
534 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
535 return type of xml_escape_text.
536 * server.c (emit_dll_description): Likewise.
537
1526853e
SM
5382017-09-16 Simon Marchi <simon.marchi@ericsson.com>
539
540 * server.c (captured_main): Accept argument for --selftest.
541 Update run_tests call.
542 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
543 when registering selftests.
544
c4dfafab
SDJ
5452017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
546
547 * regcache.c (get_thread_regcache): Update code to use "std::vector"
548 instead of "VEC" for "target_desc.reg_defs".
549 (regcache_cpy): Likewise.
550 (registers_to_string): Likewise.
551 (registers_from_string): Likewise.
552 (find_regno): Likewise.
553 (supply_regblock): Likewise.
554 (regcache_raw_read_unsigned): Likewise.
555 * tdesc.c (init_target_desc): Likewise.
556 (tdesc_create_reg): Likewise.
557 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
558 (struct target_desc) <reg_defs>: Convert to "std::vector".
559 (target_desc): Do not initialize "reg_defs".
560 (~target_desc): Update code to use "std::vector" instead of "VEC"
561 for "target_desc.reg_defs".
562 (operator==): Likewise.
563
124aceb4
SM
5642017-09-15 Simon Marchi <simon.marchi@ericsson.com>
565
566 * inferiors.h (thread_to_gdb_id): Remove.
567 * inferiors.c (thread_to_gdb_id): Remove.
568 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
569 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
570 lynx_store_registers, lynx_read_memory, lynx_write_memory):
571 Likewise.
572 * nto-low.c (nto_fetch_registers, nto_store_registers,
573 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
574
96cde54f
SM
5752017-09-15 Simon Marchi <simon.marchi@ericsson.com>
576
577 * inferiors.h (gdb_id_to_thread_id): Remove.
578 * inferiors.c (gdb_id_to_thread_id): Remove.
579 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
580 removal. Move pid declaration closer to where it's used.
581
e8ca139e
SM
5822017-09-15 Simon Marchi <simon.marchi@ericsson.com>
583
584 * server.c (handle_detach): New function.
585 (process_serial_event): Move code out, call handle_detach.
586
f8a4e119
SM
5872017-09-15 Simon Marchi <simon.marchi@ericsson.com>
588
589 * server.c (require_running): Rename to ...
590 (require_running_or_return): ... this ...
591 (require_running_or_break): ... and this.
592 (handle_query, process_serial_event): Adjust.
593
0eb0a407
SM
5942017-09-15 Simon Marchi <simon.marchi@ericsson.com>
595
596 * linux-low.c (linux_set_resume_request): Remove unused
597 variables.
598
785922a5
SM
5992017-09-15 Simon Marchi <simon.marchi@ericsson.com>
600
601 * server.c (first_thread_of): Remove.
602 (process_serial_event): Replace usage of first_thread_of with
603 find_any_thread_of_pid.
604 * tracepoint.c (same_process_p): Remove.
605 (gdb_agent_about_to_close): Replace usage of same_process_p with
606 find_any_thread_of_pid.
607 * linux-x86-low.c (same_process_callback): Remove.
608 (x86_arch_setup_process_callback): Replace usage of
609 same_process_callback with find_any_thread_of_pid.
610 * thread-db.c (any_thread_of): Remove.
611 (switch_to_process): Replace usage of any_thread_of with
612 find_any_thread_of_pid.
613 * inferiors.c (thread_pid_matches_callback): Remove.
614 (find_thread_process): Adjust to use find_any_thread_of_pid.
615
a059f00c
SDJ
6162017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
617
618 * regcache.c (get_thread_regcache): Guard calls to "memset"
619 with "!VEC_empty".
620
cc397f3a
SDJ
6212017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
622
623 * linux-low.c (handle_extended_wait): Use
624 "allocate_target_description" instead of "XNEW".
625 * linux-x86-low.c (initialize_low_arch): Likewise.
626
22916b07
YQ
6272017-09-05 Yao Qi <yao.qi@linaro.org>
628
629 * configure.srv (srv_i386_regobj): Remove.
630 (srv_amd64_regobj): Remove.
631 (srv_regobj): Set it to "" for x86 non-linux targets.
632 * linux-x86-tdesc.c (i386_linux_read_description):
633 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
634 (init_registers_i386): Remove the declaration.
635 (tdesc_i386): Remove the declaration.
636 (lynx_i386_arch_setup): Call i386_create_target_description.
637 * nto-x86-low.c: Likewise.
638 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
639 [!__x86_64__]: include arch/i386.h.
640 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
641
38602d55
YQ
6422017-09-05 Yao Qi <yao.qi@linaro.org>
643
644 * configure.srv (srv_amd64_linux_xmlfiles): Remove
645 i386/amd64-XXX-linux from it.
646
44b886ff
YQ
6472017-09-05 Yao Qi <yao.qi@linaro.org>
648
649 * configure.srv: Empty srv_amd64_linux_regobj if $development is
650 false.
651 (ipa_amd64_linux_regobj): Remove.
652 (ipa_x32_linux_regobj): Remove.
653
b4570e4b
YQ
6542017-09-05 Yao Qi <yao.qi@linaro.org>
655
656 * Makefile.in (arch-amd64.o): New rule.
657 * configure.srv: Append arch-amd64.o.
658 * linux-amd64-ipa.c: Include common/x86-xstate.h.
659 (get_ipa_tdesc): Call amd64_linux_read_description.
660 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
661 and init_registers_amd64_XXX.
662 * linux-x86-low.c (x86_linux_read_description): Call
663 amd64_linux_read_description.
664 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
665 (initialize_low_arch): Don't call init_registers_x32_XXX and
666 init_registers_amd64_XXX.
667 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
668 and tdesc_amd64_XXX.
669 [__x86_64__] (amd64_tdesc_test): New function.
670 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
671 and init_registers_amd64_XXX.
672 * linux-x86-tdesc.c: Include arch/amd64.h.
673 (xcr0_to_tdesc_idx): New function.
674 (i386_linux_read_description): New function.
675 (amd64_get_ipa_tdesc_idx): New function.
676 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
677 (amd64_get_ipa_tdesc): Declare.
678
d1f28ea2
YQ
6792017-09-05 Yao Qi <yao.qi@linaro.org>
680
681 * configure.srv (srv_i386_linux_xmlfiles): Remove
682 i386/i386-XXX-linux.xml from it.
683
25a93583
YQ
6842017-09-05 Yao Qi <yao.qi@linaro.org>
685
686 * configure.srv: Set srv_i386_linux_regobj empty if $development
687 is false.
688 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
689 initialize_low_tdesc.
690 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
691 with #if initialize_low_tdesc.
692 * linux-x86-tdesc-selftest.c: New file.
693 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
694
5f035c07
YQ
6952017-09-05 Yao Qi <yao.qi@linaro.org>
696
697 * Makefile.in (arch-i386.o): New rule.
698 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
699 (x86_64-*-linux*): Likewise.
700 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
701 include arch/i386.h.
702 (i386_linux_read_description): Remove code and call
703 i386_create_target_description.
704 * tdesc.c (allocate_target_description): New function.
705 * tdesc.h (set_tdesc_architecture): Remove declaration.
706 (set_tdesc_osabi): Likewise.
707
0abe8a89
YQ
7082017-09-05 Yao Qi <yao.qi@linaro.org>
709
710 * linux-x86-tdesc.c: Don't include <inttypes.h>.
711 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
712 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
713 .xmltarget.
714 * server.c (get_features_xml): Call tdesc_get_features_xml.
715 * tdesc.c (set_tdesc_architecture): New function.
716 (set_tdesc_osabi): New function.
717 (tdesc_get_features_xml): New function.
718 (tdesc_create_feature): Add an argument.
719 * tdesc.h (struct target_desc) <features>: New field.
720 <arch, osabi>: New field.
721 (~target_desc): xfree features, arch, and osabi.
722 (target_desc::oerator==): Don't compare .xmltarget.
723 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
724 (set_tdesc_osabi): Likewise.
725 (tdesc_get_features_xml): Likewise.
726
0a188386
YQ
7272017-09-05 Yao Qi <yao.qi@linaro.org>
728
729 * linux-x86-tdesc.c: Include selftest.h.
730 (i386_tdesc_test): New function.
731 (initialize_low_tdesc): Call selftests::register_test.
732 * tdesc.h: Include regdef.h.
733 (target_desc): Override operator == and !=.
734
f49ff000
YQ
7352017-09-05 Yao Qi <yao.qi@linaro.org>
736
737 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
738 (ipa_obj): Likewise.
739 * linux-i386-ipa.c: Include common/x86-xstate.h
740 (get_ipa_tdesc): Call i386_linux_read_description.
741 (initialize_low_tracepoint): Don't call init_registers_XXX
742 functions, call initialize_low_tdesc instead.
743 * linux-x86-low.c (x86_linux_read_description): Call
744 i386_linux_read_description.
745 (initialize_low_arch): Don't call init_registers_i386_XXX
746 functions, call initialize_low_tdesc.
747 * linux-x86-tdesc.c: New file.
748 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
749 (i386_get_ipa_tdesc_idx): Declare.
750 (i386_get_ipa_tdesc): Declare.
751 (initialize_low_tdesc): Declare.
752
2b68ef2f
YQ
7532017-09-05 Yao Qi <yao.qi@linaro.org>
754
755 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
756 instead of 0.
757
f7000548
YQ
7582017-09-05 Yao Qi <yao.qi@linaro.org>
759
760 * Makefile.in (IPA_OBJS): Add vec-ipa.o
761 * regcache.c (get_thread_regcache): Use VEC_length.
762 (init_register_cache): Likewise.
763 (regcache_cpy): Likewise.
764 (registers_to_string): Iterate reg_defs via VEC_iterate.
765 (find_regno): Likewise.
766 (find_register_by_number): Use VEC_index.
767 (register_size): Call find_register_by_number.
768 (register_data): Call find_register_by_number.
769 (supply_regblock): Use VEC_length.
770 (regcache_raw_read_unsigned): Likewise.
771 * tdesc.c (init_target_desc): Iterate reg_defs via
772 VEC_iterate.
773 (default_description): Update initializer.
774 (copy_target_description): Don't update field num_registers.
775 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
776 <num_registers>: Remove.
777
50a421ac
SM
7782017-09-04 Simon Marchi <simon.marchi@ericsson.com>
779
780 * Makefile.in (.SECONDARY): Define target.
781
23fdd69e
SM
7822017-09-03 Simon Marchi <simon.marchi@ericsson.com>
783
784 * linux-low.c (linux_wait_1): Adjust.
785 * server.c (queue_stop_reply_callback): Adjust.
786
0a2dde4a
SDJ
7872017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
788
789 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
790 QEnvironmentUnset and QEnvironmentReset packets.
791 (handle_query): Inform remote that QEnvironmentHexEncoded,
792 QEnvironmentUnset and QEnvironmentReset are supported.
793
6afd337d
SM
7942017-08-25 Simon Marchi <simon.marchi@ericsson.com>
795
796 * inferiors.h (inferior_target_data): Rename to ...
797 (thread_target_data): ... this.
798 (inferior_regcache_data): Rename to ...
799 (thread_regcache_data): ... this.
800 (set_inferior_regcache_data): Rename to ...
801 (set_thread_regcache_data): ... this.
802 * inferiors.c (inferior_target_data): Rename to ...
803 (thread_target_data): ... this.
804 (inferior_regcache_data): Rename to ...
805 (thread_regcache_data): ... this.
806 (set_inferior_regcache_data): Rename to ...
807 (set_thread_regcache_data): ... this.
808 (free_one_thread): Update.
809 * linux-low.h (get_thread_lwp): Update.
810 * regcache.c (get_thread_regcache): Update.
811 (regcache_invalidate_thread): Update.
812 (free_register_cache_thread): Update.
813 * win32-i386-low.c (update_debug_registers_callback): Update.
814 (win32_get_current_dr): Update.
815 * win32-low.c (thread_rec): Update.
816 (delete_thread_info): Update.
817 (continue_one_thread): Update.
818 (suspend_one_thread): Update.
819
a160cc46
SM
8202017-08-24 Simon Marchi <simon.marchi@ericsson.com>
821
822 * inferiors.c (set_inferior_target_data): Remove.
823 * inferiors.h (set_inferior_target_data): Remove.
824
6d580b63
YQ
8252017-08-18 Yao Qi <yao.qi@linaro.org>
826
827 * Makefile.in (OBS): Add selftest.o.
828 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
829 * configure, config.in: Re-generated.
830 * server.c: Include common/sefltest.h.
831 (captured_main): Handle option --selftest.
832
f5a29eb0
YQ
8332017-08-09 Yao Qi <yao.qi@linaro.org>
834
835 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
836 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
837 i386-avx-mpx.o and i386-mmx.o.
838 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
839 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
840 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
841 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
842 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
843 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
844 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
845 i386/amd64-avx-mpx.xml.
846
57757c2f
YQ
8472017-08-09 Yao Qi <yao.qi@linaro.org>
848
849 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
850 and x32-avx-avx512.o.
851 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
852 i386/x32-avx-avx512.xml.
853
229d26fc
SM
8542017-07-26 Simon Marchi <simon.marchi@ericsson.com>
855
856 * tracepoint.h (enum class fast_tpoint_collect_result): New
857 enumeration.
858 (fast_tracepoint_collecting): Change return type to
859 fast_tpoint_collect_result.
860 * tracepoint.c (fast_tracepoint_collecting): Likewise.
861 * linux-low.h: Include tracepoint.h.
862 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
863 fast_tpoint_collect_result.
864 * linux-low.c (handle_tracepoints): Adjust.
865 (linux_fast_tracepoint_collecting): Change return type to
866 fast_tpoint_collect_result.
867 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
868 linux_wait_1, stuck_in_jump_pad_callback,
869 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
870 proceed_one_lwp): Adjust to type change.
871
2e1e43e1
YQ
8722017-07-10 Yao Qi <yao.qi@linaro.org>
873
874 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
875
adc764e7
YQ
8762017-06-29 Yao Qi <yao.qi@linaro.org>
877
878 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
879 Remove.
880 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
881
a206891a
SM
8822017-06-20 Simon Marchi <simon.marchi@ericsson.com>
883
884 * Makefile.in (IPA_OBJS): Sort and format one item per line.
885
9a6c7d9c
SDJ
8862017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
887
888 * linux-low.c (linux_create_inferior): Adjust code to access the
889 environment information via 'gdb_environ' class.
890 * lynx-low.c (lynx_create_inferior): Likewise.
891 * server.c (our_environ): Make it an instance of 'gdb_environ'.
892 (get_environ): Return a pointer to 'our_environ'.
893 (captured_main): Initialize 'our_environ'.
894 * server.h (get_environ): Adjust prototype.
895 * spu-low.c (spu_create_inferior): Adjust code to access the
896 environment information via 'gdb_environ' class.
897
ae3e2ccf
SM
8982017-06-17 Simon Marchi <simon.marchi@ericsson.com>
899
900 * linux-low.c (linux_read_memory, linux_write_memory): Remove
901 usage of "register" keyword.
902
3e019bdc
SM
9032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
904
905 * configure: Re-generate.
906
8465943a
SM
9072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
908
909 * configure: Re-generate.
910
cf0dd6f0
SM
9112017-06-17 Simon Marchi <simon.marchi@ericsson.com>
912
913 * Makefile.in (COMPILE.pre): Add "-x c++".
914
9845682b
SDJ
9152017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
916
917 * fork-child.c: Conditionally include <signal.h>.
918
aefd8b33
SDJ
9192017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
920
921 * server.c (handle_general_set): Handle new packet
922 "QStartupWithShell".
923 (handle_query): Add "QStartupWithShell" to the list of supported
924 packets.
925 (gdbserver_usage): Add help text explaining the
926 new "--startup-with-shell" and "--no-startup-with-shell" CLI
927 options.
928 (captured_main): Recognize and act upon the presence of the new
929 CLI options.
930
2090129c
SDJ
9312017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
932 Pedro Alves <palves@redhat.com>
933
934 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
935 * configure: Regenerate.
936 * configure.srv (srv_linux_obj): Add "fork-child.o" and
937 "fork-inferior.o".
938 (i[34567]86-*-lynxos*): Likewise.
939 (spu*-*-*): Likewise.
940 * fork-child.c: New file.
941 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
942 and "environ.h".
943 (linux_ptrace_fun): New function.
944 (linux_create_inferior): Adjust function prototype to reflect
945 change on "target.h". Adjust function code to use
946 "fork_inferior".
947 (linux_request_interrupt): Delete "signal_pid".
948 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
949 (lynx_ptrace_fun): New function.
950 (lynx_create_inferior): Adjust function prototype to reflect
951 change on "target.h". Adjust function code to use
952 "fork_inferior".
953 * nto-low.c (nto_create_inferior): Adjust function prototype and
954 code to reflect change on "target.h". Update comments.
955 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
956 "common-terminal.h" and "environ.h".
957 (terminal_fd): Moved to fork-child.c.
958 (old_foreground_pgrp): Likewise.
959 (restore_old_foreground_pgrp): Likewise.
960 (last_status): Make it global.
961 (last_ptid): Likewise.
962 (our_environ): New variable.
963 (startup_with_shell): Likewise.
964 (program_name): Likewise.
965 (program_argv): Rename to...
966 (program_args): ...this.
967 (wrapper_argv): New variable.
968 (start_inferior): Delete function.
969 (get_exec_wrapper): New function.
970 (get_exec_file): Likewise.
971 (get_environ): Likewise.
972 (prefork_hook): Likewise.
973 (post_fork_inferior): Likewise.
974 (postfork_hook): Likewise.
975 (postfork_child_hook): Likewise.
976 (handle_v_run): Update code to deal with arguments coming from the
977 remote host. Update calls from "start_inferior" to
978 "create_inferior".
979 (captured_main): Likewise. Initialize environment variable. Call
980 "have_job_control".
981 * server.h (post_fork_inferior): New prototype.
982 (get_environ): Likewise.
983 (last_status): Declare.
984 (last_ptid): Likewise.
985 (signal_pid): Likewise.
986 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
987 (spu_ptrace_fun): New function.
988 (spu_create_inferior): Adjust function prototype to reflect change
989 on "target.h". Adjust function code to use "fork_inferior".
990 * target.c (target_terminal_init): New function.
991 (target_terminal_inferior): Likewise.
992 (target_terminal_ours): Likewise.
993 * target.h: Include <vector>.
994 (struct target_ops) <create_inferior>: Update prototype.
995 (create_inferior): Update macro.
996 * utils.c (gdb_flush_out_err): New function.
997 * win32-low.c (win32_create_inferior): Adjust function prototype
998 and code to reflect change on "target.h".
999
043a4934
SDJ
10002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1001
1002 * inferiors.c (switch_to_thread): New function.
1003
15652511
SDJ
10042017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
1005
1006 * Makefile.in (SFILE): Add "common/job-control.c".
1007 (OBS): Add "job-control.o".
1008
21ea5acd
SDJ
10092017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
1010
1011 * Makefile: Remove "@host_makefile_frag@".
1012
e13cb306
PA
10132017-05-05 Pedro Alves <palves@redhat.com>
1014
1015 * configure: Regenerate.
1016
c94fee56
SDJ
10172017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
1018
1019 * configure: Regenerate.
1020
a0ff9e1a
SM
10212017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
1022
1023 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1024 software_single_step change of return type to
1025 std::vector<CORE_ADDR>.
1026 * linux-low.c (install_software_single_step_breakpoints):
1027 Likewise.
1028 * linux-low.h (install_software_single_step_breakpoints):
1029 Likewise.
1030
be628ab8
SDJ
10312017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1032
1033 * remote-utils.c: Include "gdb_termios.h" instead of
1034 "terminal.h".
1035 * terminal.h: Delete file.
1036
7c5ded6a
SDJ
10372017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
1038
1039 * server.c: Include <vector>.
1040 <program_argv, wrapper_argv>: Convert to std::vector.
1041 (start_inferior): Rewrite function to use C++.
1042 (handle_v_run): Likewise. Update code that calculates the argv
1043 based on the vRun packet; use C++.
1044 (captured_main): Likewise.
1045
436252de
SM
10462017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1047
1048 * server.c (handle_v_cont): Initialize thread_resume::thread
1049 with null_ptid.
1050
9bf2a700
PA
10512017-04-05 Pedro Alves <palves@redhat.com>
1052
1053 * configure: Regenerate.
1054
a121b7c1
PA
10552017-04-05 Pedro Alves <palves@redhat.com>
1056
1057 * gdbreplay.c (sync_error): Constify.
1058 * linux-x86-low.c (push_opcode): Constify.
1059
21c8a587
PA
10602017-04-05 Pedro Alves <palves@redhat.com>
1061
1062 * win32-low.c (get_child_debug_event)
1063 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1064 Report TARGET_WAITKIND_SPURIOUS instead.
1065
fb32b4f7
PA
10662017-04-05 Pedro Alves <palves@redhat.com>
1067
1068 * remote-utils.c (remote_prepare, remote_open): Constify.
1069 * remote-utils.h (remote_prepare, remote_open): Constify.
1070 * server.c (captured_main): Constify 'port' handling.
1071
65dd1e59
SM
10722017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1073
1074 * Makefile.in (clean): Clear .deps.
1075
8fa5b777
SM
10762017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1077
1078 * .gitignore: Remove generated files, replace with wildcard.
1079 * (clean): Replace removal of generated files with wildcard.
1080 (version.c): Replace with...
1081 (version-generated.c): ...this.
1082 (xml-builtin.c): Replace with...
1083 (xml-builtin-generated.c): ...this.
1084 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1085 (%.c: *regformats*): Replace with...
1086 (%-generated.c: *regformats*): ...this.
1087
a12e714b
MF
10882017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1089
1090 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1091 (xtensa_fill_gregset): Call collect_register_by_name for
1092 threadptr register.
1093 (xtensa_store_gregset): Call supply_register_by_name for
1094 threadptr register.
1095
1a09b50a
MF
10962017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1097
1098 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1099 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1100 (xtensa_store_gregset): Call supply_register for all registers in
1101 a0_regnum..a0_regnum + C0_NREGS range.
1102
1a01e7c6
SM
11032017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1104
1105 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1106 (ax-ipa.o: ax.c): Remove.
1107 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1108 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1109 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1110 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1111 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1112
36bc18a8
SM
11132017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1114
1115 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1116 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1117 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1118 (errors-ipa.o: ../common/errors.c): Remove.
1119 (format-ipa.o: ../common/format.c): Remove.
1120 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1121
a8ebe3d5
SM
11222017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1123
1124 * Makefile.in (%-ipa.o: %.c): New rule.
1125 (tracepoint-ipa.o: tracepoint.c): Remove.
1126 (utils-ipa.o: utils.c): Remove.
1127 (remote-utils-ipa.o: remote-utils.c): Remove.
1128 (regcache-ipa.o: regcache.c): Remove.
1129 (i386-linux-ipa.o: i386-linux.c): Remove.
1130 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1131 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1132 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1133 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1134 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1135 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1136 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1137 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1138 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1139 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1140 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1141 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1142 (aarch64-ipa.o: aarch64.c): Remove.
1143 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1144 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1145 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1146 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1147 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1148 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1149 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1150 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1151 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1152 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1153 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1154 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1155 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1156 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1157 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1158 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1159 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1160 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1161 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1162 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1163 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1164 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1165 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1166 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1167 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1168 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1169 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1170 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1171 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1172 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1173 (tdesc-ipa.o: tdesc.c): Remove.
1174 (x32-linux-ipa.o: x32-linux.c): Remove.
1175 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1176 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1177
50cfacb7
SM
11782017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1179
1180 * Makefile.in (%.o: ../arch/%.c): New rule.
1181 (arm.o: ../arch/arm.c): Remove.
1182 (arm-linux.o: ../arch/arm-linux.c): Remove.
1183 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1184 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1185
c5a22423
SM
11862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1187
1188 * Makefile.in (%.o: ../nat/%.c): New rule.
1189 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1190 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1191 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1192 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1193 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1194 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1195 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1196 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1197 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1198 (linux-personality.o: ../nat/linux-personality.c): Remove.
1199 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1200 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1201 (x86-linux.o: ../nat/x86-linux.c): Remove.
1202 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1203 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1204
6bda016b
SM
12052017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1206
1207 * Makefile.in (%.o: ../common/%.c): New rule.
1208 (signals.o: ../common/signals.c): Remove.
1209 (print-utils.o: ../common/print-utils.c): Remove.
1210 (rsp-low.o: ../common/rsp-low.c): Remove.
1211 (common-utils.o: ../common/common-utils.c): Remove.
1212 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1213 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1214 (vec.o: ../common/vec.c): Remove.
1215 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1216 (xml-utils.o: ../common/xml-utils.c): Remove.
1217 (ptid.o: ../common/ptid.c): Remove.
1218 (buffer.o: ../common/buffer.c): Remove.
1219 (format.o: ../common/format.c): Remove.
1220 (filestuff.o: ../common/filestuff.c): Remove.
1221 (agent.o: ../common/agent.c): Remove.
1222 (errors.o: ../common/errors.c): Remove.
1223 (environ.o: ../common/environ.c): Remove.
1224 (common-debug.o: ../common/common-debug.c): Remove.
1225 (cleanups.o: ../common/cleanups.c): Remove.
1226 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1227 (fileio.o: ../common/fileio.c): Remove.
1228 (common-regcache.o: ../common/common-regcache.c): Remove.
1229 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1230 (new-op.o: ../common/new-op.c): Remove.
1231 (btrace-common.o: ../common/btrace-common.c): Remove.
1232
21122961
SM
12332017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1234
1235 * Makefile.in (%.o: ../target/%.c): New rule.
1236 (waitstatus.o: ../target/waitstatus.c): Remove.
1237
c362e621
SM
12382017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1239
1240 * Makefile.in
1241 (%.c: ../regformats/%.dat,
1242 (%.c: ../regformats/arm/%.dat,
1243 (%.c: ../regformats/i386/%.dat,
1244 (%.c: ../regformats/rs6000/%.dat): New rules.
1245 (aarch64.c): Remove.
1246 (reg-arm.c): Remove.
1247 (arm-with-iwmmxt.c): Remove.
1248 (arm-with-vfpv2.c): Remove.
1249 (arm-with-vfpv3.c): Remove.
1250 (arm-with-neon.c): Remove.
1251 (reg-bfin.c): Remove.
1252 (reg-cris.c): Remove.
1253 (reg-crisv32.c): Remove.
1254 (i386.c): Remove.
1255 (i386-linux.c): Remove.
1256 (i386-avx.c): Remove.
1257 (i386-avx-linux.c): Remove.
1258 (i386-avx-avx512.c): Remove.
1259 (i386-avx-avx512-linux.c): Remove.
1260 (i386-mpx.c): Remove.
1261 (i386-mpx-linux.c): Remove.
1262 (i386-avx-mpx-avx512-pku.c): Remove.
1263 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1264 (i386-avx-mpx.c): Remove.
1265 (i386-avx-mpx-linux.c): Remove.
1266 (i386-mmx.c): Remove.
1267 (i386-mmx-linux.c): Remove.
1268 (reg-ia64.c): Remove.
1269 (reg-m32r.c): Remove.
1270 (reg-m68k.c): Remove.
1271 (reg-cf.c): Remove.
1272 (mips-linux.c): Remove.
1273 (mips-dsp-linux.c): Remove.
1274 (mips64-linux.c): Remove.
1275 (mips64-dsp-linux.c): Remove.
1276 (nios2-linux.c): Remove.
1277 (powerpc-32.c): Remove.
1278 (powerpc-32l.c): Remove.
1279 (powerpc-altivec32l.c): Remove.
1280 (powerpc-cell32l.c): Remove.
1281 (powerpc-vsx32l.c): Remove.
1282 (powerpc-isa205-32l.c): Remove.
1283 (powerpc-isa205-altivec32l.c): Remove.
1284 (powerpc-isa205-vsx32l.c): Remove.
1285 (powerpc-e500l.c): Remove.
1286 (powerpc-64l.c): Remove.
1287 (powerpc-altivec64l.c): Remove.
1288 (powerpc-cell64l.c): Remove.
1289 (powerpc-vsx64l.c): Remove.
1290 (powerpc-isa205-64l.c): Remove.
1291 (powerpc-isa205-altivec64l.c): Remove.
1292 (powerpc-isa205-vsx64l.c): Remove.
1293 (s390-linux32.c): Remove.
1294 (s390-linux32v1.c): Remove.
1295 (s390-linux32v2.c): Remove.
1296 (s390-linux64.c): Remove.
1297 (s390-linux64v1.c): Remove.
1298 (s390-linux64v2.c): Remove.
1299 (s390-te-linux64.c): Remove.
1300 (s390-vx-linux64.c): Remove.
1301 (s390-tevx-linux64.c): Remove.
1302 (s390x-linux64.c): Remove.
1303 (s390x-linux64v1.c): Remove.
1304 (s390x-linux64v2.c): Remove.
1305 (s390x-te-linux64.c): Remove.
1306 (s390x-vx-linux64.c): Remove.
1307 (s390x-tevx-linux64.c): Remove.
1308 (tic6x-c64xp-linux.c): Remove.
1309 (tic6x-c64x-linux.c): Remove.
1310 (tic6x-c62x-linux.c): Remove.
1311 (reg-sh.c): Remove.
1312 (reg-sparc64.c): Remove.
1313 (reg-spu.c): Remove.
1314 (amd64.c): Remove.
1315 (amd64-linux.c): Remove.
1316 (amd64-avx.c): Remove.
1317 (amd64-avx-linux.c): Remove.
1318 (amd64-avx-avx512.c): Remove.
1319 (amd64-avx-avx512-linux.c): Remove.
1320 (amd64-mpx.c): Remove.
1321 (amd64-mpx-linux.c): Remove.
1322 (amd64-avx-mpx-avx512-pku.c): Remove.
1323 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1324 (amd64-avx-mpx.c): Remove.
1325 (amd64-avx-mpx-linux.c): Remove.
1326 (x32.c): Remove.
1327 (x32-linux.c): Remove.
1328 (x32-avx.c): Remove.
1329 (x32-avx-linux.c): Remove.
1330 (x32-avx-avx512.c): Remove.
1331 (x32-avx-avx512-linux.c): Remove.
1332 (reg-xtensa.c): Remove.
1333 (reg-tilegx.c): Remove.
1334 (reg-tilegx32.c): Remove.
1335
1672e0d9
SDJ
13362017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1337
1338 * Makefile.in (SFILES): Add "common/environ.c".
1339 (OBJS): Add "common/environ.h".
1340
239b6d10
WT
13412017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1342
1343 * configure.ac: Check if the fs_base and gs_base members of
1344 `struct user_regs_struct' exist.
1345 * config.in: Regenerated.
1346 * configure: Likewise.
1347
694b382c
AT
13482017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1349
1350 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1351 target_read_memory.
1352 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1353 (get_next_pcs_syscall_next_pc): Likewise.
1354
7dc53023
LM
13552016-12-23 Luis Machado <lgustavo@codesourcery.com>
1356
1357 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1358 * nto-x86-low.c: Likewise.
1359
ad02e4fe
SM
13602016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1361
1362 * Makefile.in: Include disable-implicit-rules.mk.
1363
dcb07cfa
PA
13642016-11-23 Pedro Alves <palves@redhat.com>
1365
1366 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1367 (debug_vprintf): Use std::chrono::steady_clock instead of
1368 gettimeofday. Use '.' instead of ':'.
1369 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1370 (get_timestamp): Use std::chrono::steady_clock instead of
1371 gettimeofday.
1372
8629c02c
SM
13732016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1374
1375 * Makefile.in: Fix whitespace formatting.
1376
b593ecca
SM
13772016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1378
1379 * Makefile.in (SFILES, OBS): Flatten list and order
1380 alphabetically.
1381
9986ba08
PA
13822016-11-23 Pedro Alves <palves@redhat.com>
1383
1384 * event-loop.c (handle_file_event): Use warning.
1385 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1386 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1387 Use warning.
1388
4eefa7bc
PA
13892016-11-23 Pedro Alves <palves@redhat.com>
1390
1391 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1392 output.
1393 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1394 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1395 debug_printf and debug_flush for debug output.
1396 * server.c (handle_general_set): Likewise.
1397 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1398 output.
1399
5443506e
SM
14002016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1401
1402 * Makefile.in (.c.o): Replace rule with ...
1403 (%.o: %.c): ... this one.
1404
3b165252
SM
14052016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1406
1407 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1408 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1409 make.
1410 * configure.ac: Remove checks for the make program.
1411 * configure: Re-generate.
1412
0bcda685
PA
14132016-10-28 Pedro Alves <palves@redhat.com>
1414
1415 * Makefile.in (CXX_DIALECT): Get from configure.
1416 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1417 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1418 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1419 * config.in: Regenerate.
1420 * configure: Regenerate.
1421
c3805894
YQ
14222016-10-27 Yao Qi <yao.qi@linaro.org>
1423
1424 * linux-low.c (linux_supports_range_stepping): Return true if
1425 can_software_single_step return true.
1426
89342618
YQ
14272016-10-27 Yao Qi <yao.qi@linaro.org>
1428
1429 * inferiors.c (find_inferior_in_random): New function.
1430 * inferiors.h (find_inferior_in_random): Declare.
1431 * linux-low.c (linux_wait_for_event_filtered): Call
1432 find_inferior_in_random instead of find_inferior.
1433
e3652c84
YQ
14342016-10-27 Yao Qi <yao.qi@linaro.org>
1435
1436 * linux-low.c (linux_wait_1): If single-step breakpoints are
1437 inserted, remove them.
1438
5a04c4cf
PA
14392016-10-26 Pedro Alves <palves@redhat.com>
1440
1441 * linux-low.c (handle_extended_wait): Link parent/child fork
1442 threads.
1443 (linux_wait_1): Unlink them.
1444 (linux_set_resume_request): Ignore resume requests for
1445 already-resumed and unhandled fork child threads.
1446 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1447 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1448 New functions.
1449 (handle_v_requests) <vCont>: Don't call require_running.
1450 * server.h (in_queued_stop_replies): New declaration.
1451
cb93dc7f
YQ
14522016-10-24 Yao Qi <yao.qi@linaro.org>
1453
1454 PR server/20733
1455 * linux-aarch64-low.c (append_insns): Cast the return value to
1456 'uint32_t *'.
1457
a1078bea
YQ
14582016-10-10 Yao Qi <yao.qi@linaro.org>
1459
1460 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1461
1fb77080
SDJ
14622016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1463
1464 * target.c (target_supports_multi_process): New function, moved
1465 from...
1466 * target.h (target_supports_multi_process): ... here. Remove
1467 macro.
1468
39b5a3b9
TT
14692016-10-05 Tom Tromey <tom@tromey.com>
1470
1471 PR remote/20655:
1472 * tracepoint.c (handle_tracepoint_bkpts): Check
1473 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1474
c1d0b70a
YQ
14752016-10-05 Yao Qi <yao.qi@linaro.org>
1476
1477 * configure.srv: Update the path of arm-*.xml files.
1478
0a69eedb
YQ
14792016-10-05 Terry Guo <terry.guo@arm.com>
1480 Yao Qi <yao.qi@linaro.org>
1481
1482 * Makefile.in: Adjust the path of rules.
1483 * configure.srv: Update the path of xml files.
1484 * regformats/arm-with-iwmmxt.dat: Regenerated.
1485 * regformats/arm-with-neon.dat: Likewise.
1486 * regformats/arm-with-vfpv2.dat: Likewise.
1487 * regformats/arm-with-vfpv3.dat Likewise.
1488
17e16485
YQ
14892016-09-30 Yao Qi <yao.qi@linaro.org>
1490
1491 PR gdbserver/20627
1492 * target.c (target_stop_and_wait): Don't call
1493 target_continue_no_signal, use resume_stop instead.
1494
edeeb602
YQ
14952016-09-26 Yao Qi <yao.qi@linaro.org>
1496
1497 * linux-low.c (linux_wait_1): Call debug_exit.
1498
503b1c39
PA
14992016-09-23 Pedro Alves <palves@redhat.com>
1500
1501 * Makefile.in (SFILES): Add common/new-op.c.
1502 (OBS): Add common/new-op.o.
1503 (new-op.o): New rule.
1504
74172ecf
SM
15052016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1506
1507 * .gitinore: Ignore more files.
1508
fc6cda2e
YQ
15092016-09-21 Yao Qi <yao.qi@linaro.org>
1510
1511 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1512 23.
1513
bc1e6c81
SDJ
15142016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1515
1516 * server.c (start_inferior): Call target_mourn_inferior instead of
1517 mourn_inferior; pass ptid_t argument to it.
1518 (resume): Likewise.
1519 (handle_target_event): Likewise.
1520 * target.c (target_mourn_inferior): New function.
1521 * target.h (mourn_inferior): Delete macro.
1522
0e00e962
AA
15232016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1524
1525 * linux-low.c (lwp_is_stepping): New function.
1526
1d8cb77d
CL
15272016-09-06 Carl Love <cel@us.ibm.com>
1528
1529 * server.c (start_inferior): Fixed comment, requested comment change
1530 didn't get updated correctly. Removed reference to ptrace () call as
1531 it is only true on Linux systems.
1532
7313bced
CL
15332016-09-06 Carl Love <cel@us.ibm.com>
1534
1535 * server.c (start_inferior): Do not call
1536 function target_post_create_inferior () if the
1537 inferior process has already exited.
1538
cf6de44d
PA
15392016-09-05 Pedro Alves <palves@redhat.com>
1540
1541 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1542 (COMPILE.pre, CC_LD): Use CXX directly.
1543 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1544 * acinclude.m4: Don't include build-with-cxx.m4.
1545 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1546 * configure: Regenerate.
1547
c1da6748
AT
15482016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1549
1550 PR gdb/19495
1551 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1552 call writing data to own_buf.
1553
f2b9e3df
SDJ
15542016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1555
1556 * target.c (mywait): Call target_wait instead of
1557 the_target->wait.
1558 (target_wait): New function.
1559
049a8570
SDJ
15602016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1561
1562 * server.c (start_inferior): New variable 'ptid'. Replace calls
1563 to the_target->resume by target_continue{,_no_signal}, depending
1564 on the case.
1565 * target.c (target_stop_and_wait): Call target_continue_no_signal
1566 instead of the_target->resume.
1567 (target_continue): New function.
1568
3aa5cfa0
AT
15692016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1570
1571 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1572
754653a7
AZ
15732016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1574
1575 PR server/20491
1576 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1577 ps_prochandle.
1578 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1579 * linux-arm-low.c (ps_get_thread_area): Likewise.
1580 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1581 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1582 * linux-mips-low.c (ps_get_thread_area): Likewise.
1583 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1584 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1585 * linux-x86-low.c (ps_get_thread_area): Likewise.
1586 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1587
ed036b40
PA
15882016-08-19 Pedro Alves <palves@redhat.com>
1589
1590 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1591
c8ef42ee
PA
15922016-08-19 Pedro Alves <palves@redhat.com>
1593
1594 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1595 comment. Use memcpy instead of casting through unsigned long.
1596
9c235a72
PA
15972016-08-19 Pedro Alves <palves@redhat.com>
1598
1599 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1600 allocating around 0x80000000.
1601
201506da
PA
16022016-08-19 Pedro Alves <palves@redhat.com>
1603
1604 PR gdb/20415
1605 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1606 (x32-avx512-linux-ipa.o): New rules.
1607 * configure.ac (x86_64-*-linux*): New x32 check.
1608 * configure.srv (ipa_x32_linux_regobj): New.
1609 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1610 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1611 descriptions.
1612 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1613 descriptions.
1614 * configure: Regenerate.
1615
f348d89a
PA
16162016-08-09 Pedro Alves <palves@redhat.com>
1617
1618 PR gdb/18653
1619 * Makefile.in (OBS): Add signals-state-save-restore.o.
1620 (signals-state-save-restore.o): New rule.
1621 * config.in: Regenerate.
1622 * configure: Regenerate.
1623 * linux-low.c: Include "signals-state-save-restore.h".
1624 (linux_create_inferior): Call
1625 restore_original_signals_state.
1626 * server.c: Include "dispositions-save-restore.h".
1627 (captured_main): Call save_original_signals_state.
1628
1baf5149
PA
16292016-08-05 Pedro Alves <palves@redhat.com>
1630
1631 * configure: Regenerate.
1632
fcd4a73d
YQ
16332016-08-04 Yao Qi <yao.qi@linaro.org>
1634
1635 * linux-low.c (regsets_fetch_inferior_registers): Check
1636 errno is ESRCH or not.
1637
979659d0
YQ
16382016-08-02 Yao Qi <yao.qi@linaro.org>
1639
1640 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1641 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1642 (thread_db_load_search): Update.
1643 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1644 td_ta_set_event and td_ta_event_getmsg.
1645
6598661d
PA
16462016-07-26 Pedro Alves <palves@redhat.com>
1647
1648 PR server/20414
1649 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1650 of unsigned long for 64-bit registers and use uint32_t instead of
1651 unsigned int for 32-bit registers.
1652
9cf12d57
PA
16532016-07-26 Pedro Alves <palves@redhat.com>
1654
1655 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1656 to 'ptrace'.
1657
305450ed
TT
16582016-07-21 Tom Tromey <tom@tromey.com>
1659
1660 * configure: Rebuild.
1661
2583da7c
YQ
16622016-07-21 Yao Qi <yao.qi@linaro.org>
1663
1664 * mem-break.c (find_gdb_breakpoint): Cast bp to
1665 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1666
21536b36
YQ
16672016-07-21 Yao Qi <yao.qi@linaro.org>
1668
1669 * server.c (handle_v_requests): Support s and S actions
1670 if target_supports_software_single_step return true.
1671
8901d193
YQ
16722016-07-21 Yao Qi <yao.qi@linaro.org>
1673
1674 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1675 is resume_step, call maybe_hw_step.
1676 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1677 and unstop them.
1678 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1679 breakpoints or not.
1680 (proceed_one_lwp): If resume request is resume_step, install
1681 reinsert breakpoints and call maybe_hw_step.
1682
0e9a339e
YQ
16832016-07-21 Yao Qi <yao.qi@linaro.org>
1684
1685 * linux-low.c (proceed_one_lwp): Declare.
1686 (linux_resume_one_thread): Remove local variable 'step'.
1687 Lift code enqueue signal. Call proceed_one_lwp instead of
1688 linux_resume_one_lwp.
1689
4281b351
YQ
16902016-07-21 Yao Qi <yao.qi@linaro.org>
1691
1692 * linux-low.c (linux_resume_one_thread): Call
1693 enqueue_pending_signal.
1694
984a2c04
YQ
16952016-07-21 Yao Qi <yao.qi@linaro.org>
1696
1697 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1698 * inferiors.c (do_restore_current_thread_cleanup): New function.
1699 (make_cleanup_restore_current_thread): Likewise.
1700 * linux-low.c (install_software_single_step_breakpoints): Call
1701 make_cleanup_restore_current_thread. Switch current_thread to
1702 thread.
1703
bec903c9
YQ
17042016-07-21 Yao Qi <yao.qi@linaro.org>
1705
1706 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1707 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1708 (clone_one_breakpoint): Likewise.
1709 (delete_reinsert_breakpoints): Change parameter to thread.
1710 Callers updated.
1711 (has_reinsert_breakpoints): Likewise.
1712 (uninsert_reinsert_breakpoints): Likewise.
1713 (reinsert_reinsert_breakpoints): Likewise.
1714 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1715 (delete_reinsert_breakpoints): Likewise.
1716 (reinsert_reinsert_breakpoints): Likewise.
1717 (uninsert_reinsert_breakpoints): Likewise.
1718 (has_reinsert_breakpoints): Likewise.
1719
63c40ec7
YQ
17202016-07-21 Yao Qi <yao.qi@linaro.org>
1721
1722 * inferiors.c (get_thread_process): Make parameter const.
1723 * inferiors.h (get_thread_process): Update declaration.
1724 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1725 Add new parameters child_thread and parent_thread. Callers
1726 updated.
1727 * mem-break.h (clone_all_breakpoints): Update declaration.
1728
9aa76cd0
YQ
17292016-07-21 Yao Qi <yao.qi@linaro.org>
1730
1731 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1732 <command_list, handler>: Remove.
1733 (struct gdb_breakpoint): New.
1734 (struct other_breakpoint): New.
1735 (struct reinsert_breakpoint): New.
1736 (is_gdb_breakpoint): New function.
1737 (any_persistent_commands): Update command_list if
1738 is_gdb_breakpoint returns true.
1739 (set_breakpoint): Create breakpoints according to their types.
1740 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1741 (set_gdb_breakpoint_1): Likewise.
1742 (set_gdb_breakpoint): Likewise.
1743 (clear_breakpoint_conditions): Change parameter type to
1744 'struct gdb_breakpoint *'.
1745 (clear_breakpoint_commands): Likewise.
1746 (clear_breakpoint_conditions_and_commands): Likewise.
1747 (add_condition_to_breakpoint): Likewise.
1748 (add_breakpoint_condition): Likewise.
1749 (add_commands_to_breakpoint): Likewise.
1750 (check_breakpoints): Check other_breakpoint.
1751 (clone_one_breakpoint): Clone breakpopint according to its type.
1752 * mem-break.h (struct gdb_breakpoint): Declare.
1753 (set_gdb_breakpoint): Update declaration.
1754 (clear_breakpoint_conditions_and_commands): Likewise.
1755 (add_breakpoint_condition): Likewise.
1756 (add_breakpoint_commands): Likewise.
1757 * server.c (process_point_options): Change parameter type to
1758 'struct gdb_breakpoint *'.
1759
811f8301
YQ
17602016-07-21 Yao Qi <yao.qi@linaro.org>
1761
1762 * mem-break.c (set_breakpoint_at): Rename it to ...
1763 (set_breakpoint_type_at): ... it.
1764 (set_breakpoint_at): Call set_breakpoint_type_at.
1765 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1766 * mem-break.h (set_breakpoint_at): Update comments.
1767
b1c51e36
CLT
17682016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1769
1770 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1771 to buf parameter.
1772 (nios2_store_gregset): Likewise.
1773
ced2dffb
PA
17742016-07-01 Pedro Alves <palves@redhat.com>
1775 Antoine Tremblay <antoine.tremblay@ericsson.com>
1776
1777 * linux-low.c: Change interface to take the target lwp_info
1778 pointer directly and return void. Handle detaching from a zombie
1779 thread.
1780 (linux_detach_lwp_callback): New function.
1781 (linux_detach): Detach from the leader thread after detaching from
1782 the clone threads.
1783
2ac09a5b
YQ
17842016-06-28 Yao Qi <yao.qi@linaro.org>
1785
1786 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1787 for variable new_offset.
1788 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1789 (aarch64_ftrace_insn_reloc_cb): Likewise.
1790 (aarch64_ftrace_insn_reloc_tb): Likewise.
1791 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1792 PRIx64 instead of PRIx32.
1793
79e7fd4f
YQ
17942016-06-28 Yao Qi <yao.qi@linaro.org>
1795
1796 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1797 (the_low_target): Install arm_get_syscall_trapinfo.
1798
061fc021
YQ
17992016-06-28 Yao Qi <yao.qi@linaro.org>
1800
1801 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1802 function.
1803 (the_low_target): Install aarch64_get_syscall_trapinfo.
1804
4cc32bec
YQ
18052016-06-28 Yao Qi <yao.qi@linaro.org>
1806
1807 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1808 Callers updated.
1809 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1810 Remove parameter sysno.
1811 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1812 sysret.
1813
782c1122
AA
18142016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1815
1816 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1817 (s390_emit_ne_goto): Likewise.
1818 (s390_emit_lt_goto): Likewise.
1819 (s390_emit_le_goto): Likewise.
1820 (s390_emit_gt_goto): Likewise.
1821 (s390_emit_ge_goto): Likewise.
1822 (s390x_emit_eq_goto): Likewise.
1823 (s390x_emit_ne_goto): Likewise.
1824 (s390x_emit_lt_goto): Likewise.
1825 (s390x_emit_le_goto): Likewise.
1826 (s390x_emit_gt_goto): Likewise.
1827 (s390x_emit_ge_goto): Likewise.
1828 (s390_emit_ops_impl): Mark variable static.
1829 (s390x_emit_ops): Likewise.
1830
2e7b624b
YQ
18312016-06-17 Yao Qi <yao.qi@linaro.org>
1832
1833 * linux-low.c (handle_extended_wait): Call
1834 uninsert_reinsert_breakpoints for the parent process. Remove
1835 reinsert breakpoints from the child process. Reinsert them to
1836 the parent process when vfork is done.
1837 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1838 (reinsert_reinsert_breakpoints): New function.
1839 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1840 (reinsert_reinsert_breakpoints): Declare.
1841
8a81c5d7
YQ
18422016-06-17 Yao Qi <yao.qi@linaro.org>
1843
1844 * linux-low.c (handle_extended_wait): If the parent is doing
1845 step-over, remove the reinsert breakpoints from the forked child.
1846
f50bf8e5
YQ
18472016-06-17 Yao Qi <yao.qi@linaro.org>
1848
1849 * linux-low.c (unsuspend_all_lwps): Declare.
1850 (linux_low_filter_event): If thread exited, call finish_step_over.
1851 If step-over is finished, unsuspend other threads.
1852
8376a3cb
YQ
18532016-06-17 Yao Qi <yao.qi@linaro.org>
1854
1855 * linux-low.c (linux_resume_one_lwp_throw): Assert
1856 has_reinsert_breakpoints returns false.
1857 * mem-break.c (delete_disabled_breakpoints): Assert
1858 bp type isn't reinsert_breakpoint.
1859
f79b145d
YQ
18602016-06-17 Yao Qi <yao.qi@linaro.org>
1861
1862 * linux-low.c (maybe_hw_step): New function.
1863 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1864 (finish_step_over): Switch current_thread to lwp temporarily,
1865 and assert has_reinsert_breakpoints returns true.
1866 (proceed_one_lwp): Call maybe_hw_step.
1867 * mem-break.c (has_reinsert_breakpoints): New function.
1868 * mem-break.h (has_reinsert_breakpoints): Declare.
1869
0ae534d2
JT
18702016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1871
1872 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1873
fcdad592
YQ
18742016-05-17 Yao Qi <yao.qi@linaro.org>
1875
1876 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1877 instead of find_inferior.
1878
9e784964
YQ
18792016-05-05 Yao Qi <yao.qi@linaro.org>
1880
1881 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1882 Initialize res to zero.
1883
cf2ebb6e
YQ
18842016-05-05 Yao Qi <yao.qi@linaro.org>
1885
1886 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1887 to uint32_t.
1888
c1aebf87
UW
18892016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1890
1891 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1892 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1893 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1894
35fd2deb 18952016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1896 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1897
1898 * tracepoint.c (write_inferior_int8): New function.
1899 (cmd_qtenable_disable): Write enable flag using
1900 write_inferior_int8.
1901
484b3c32
YQ
19022016-04-25 Yao Qi <yao.qi@linaro.org>
1903
1904 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1905 (need_step_over_p): Return zero if the LWP has pending signals
1906 can be delivered on software single step target.
1907
85ba7d86
YQ
19082016-04-25 Yao Qi <yao.qi@linaro.org>
1909
1910 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1911 return instead of error.
1912
3539aa13
YQ
19132016-04-22 Yao Qi <yao.qi@linaro.org>
1914
1915 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1916 to 23.
1917
5b061e98
YQ
19182016-04-22 Yao Qi <yao.qi@linaro.org>
1919
1920 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1921 signal when stepping over breakpoint with software single
1922 step.
1923
3451269c
PA
19242016-04-21 Pedro Alves <palves@redhat.com>
1925
1926 * linux-s390-low.c (s390_collect_ptrace_register)
1927 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1928 add casts.
1929 (s390_check_regset): Use void * instead of gdb_byte *.
1930
a2358508
PA
19312016-04-20 Pedro Alves <palves@redhat.com>
1932
1933 * configure: Renegerate.
1934
6885166d
YQ
19352016-04-20 Yao Qi <yao.qi@linaro.org>
1936
1937 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1938 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1939 number 16.
1940 (arm_store_gregset): Likewise.
1941
2b863f51
WT
19422016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1943
1944 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1945 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1946 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1947 (amd64-avx-mpx-linux.c): New rules.
1948 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1949 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1950 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1951 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1952 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1953 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1954 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1955 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1956 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1957 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1958 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1959 * linux-x86-low.c (x86_linux_read_description): Add case for
1960 X86_XSTATE_AVX_MPX_MASK.
1961 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1962 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1963 init_registers_i386_avx_mpx_linux.
1964 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1965 (initialize_low_tracepoint): Call
1966 init_registers_i386_avx_mpx_linux.
1967 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1968 (initialize_low_tracepoint): Call
1969 init_registers_amd64_avx_mpx_linux.
1970 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1971 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1972 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1973 declarations.
1974
9b30624b
PA
19752016-04-18 Pedro Alves <palves@redhat.com>
1976
1977 * configure: Regenerate.
1978
45e3745e
AT
19792016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1980
1981 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1982 (aarch64_emit_sub): Likewise.
1983
2afc13ff
PA
19842016-04-12 Pedro Alves <palves@redhat.com>
1985
1986 * utils.c (prepare_to_throw_exception): Delete.
1987
6e774b13
SM
19882016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1989
1990 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1991
4dca19f8
MK
19922016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1993
1994 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1995
d0a9981f
MK
19962016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1997
1998 * linux-aarch64-ipa.c: Add <elf.h> include.
1999 * linux-ppc-ipa.c: Add <elf.h> include.
2000 * linux-s390-ipa.c: Add <elf.h> include.
2001
252db07e
MK
20022016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2003
2004 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2005 (get_raw_reg_ptr): Likewise.
2006 (get_trace_state_variable_value_ptr): Likewise.
2007 (set_trace_state_variable_value_ptr): Likewise.
2008 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2009 char *.
2010
14e2b6d9
MK
20112016-03-31 Wei-cheng Wang <cole945@gmail.com>
2012 Marcin Kościelnicki <koriakin@0x04.net>
2013
2014 PR/17221
2015 * linux-ppc-low.c (emit_insns): New function.
2016 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2017 (ppc_emit_prologue): New function.
2018 (ppc_emit_epilogue): New function.
2019 (ppc_emit_add): New function.
2020 (ppc_emit_sub): New function.
2021 (ppc_emit_mul): New function.
2022 (ppc_emit_lsh): New function.
2023 (ppc_emit_rsh_signed): New function.
2024 (ppc_emit_rsh_unsigned): New function.
2025 (ppc_emit_ext): New function.
2026 (ppc_emit_zero_ext): New function.
2027 (ppc_emit_log_not): New function.
2028 (ppc_emit_bit_and): New function.
2029 (ppc_emit_bit_or): New function.
2030 (ppc_emit_bit_xor): New function.
2031 (ppc_emit_bit_not): New function.
2032 (ppc_emit_equal): New function.
2033 (ppc_emit_less_signed): New function.
2034 (ppc_emit_less_unsigned): New function.
2035 (ppc_emit_ref): New function.
2036 (ppc_emit_const): New function.
2037 (ppc_emit_reg): New function.
2038 (ppc_emit_pop): New function.
2039 (ppc_emit_stack_flush): New function.
2040 (ppc_emit_swap): New function.
2041 (ppc_emit_stack_adjust): New function.
2042 (ppc_emit_call): New function.
2043 (ppc_emit_int_call_1): New function.
2044 (ppc_emit_void_call_2): New function.
2045 (ppc_emit_if_goto): New function.
2046 (ppc_emit_goto): New function.
2047 (ppc_emit_eq_goto): New function.
2048 (ppc_emit_ne_goto): New function.
2049 (ppc_emit_lt_goto): New function.
2050 (ppc_emit_le_goto): New function.
2051 (ppc_emit_gt_goto): New function.
2052 (ppc_emit_ge_goto): New function.
2053 (ppc_write_goto_address): New function.
2054 (ppc_emit_ops_impl): New static variable.
2055 (ppc64v1_emit_prologue): New function.
2056 (ppc64v2_emit_prologue): New function.
2057 (ppc64_emit_epilogue): New function.
2058 (ppc64_emit_add): New function.
2059 (ppc64_emit_sub): New function.
2060 (ppc64_emit_mul): New function.
2061 (ppc64_emit_lsh): New function.
2062 (ppc64_emit_rsh_signed): New function.
2063 (ppc64_emit_rsh_unsigned): New function.
2064 (ppc64_emit_ext): New function.
2065 (ppc64_emit_zero_ext): New function.
2066 (ppc64_emit_log_not): New function.
2067 (ppc64_emit_bit_and): New function.
2068 (ppc64_emit_bit_or): New function.
2069 (ppc64_emit_bit_xor): New function.
2070 (ppc64_emit_bit_not): New function.
2071 (ppc64_emit_equal): New function.
2072 (ppc64_emit_less_signed): New function.
2073 (ppc64_emit_less_unsigned): New function.
2074 (ppc64_emit_ref): New function.
2075 (ppc64_emit_const): New function.
2076 (ppc64v1_emit_reg): New function.
2077 (ppc64v2_emit_reg): New function.
2078 (ppc64_emit_pop): New function.
2079 (ppc64_emit_stack_flush): New function.
2080 (ppc64_emit_swap): New function.
2081 (ppc64v1_emit_call): New function.
2082 (ppc64v2_emit_call): New function.
2083 (ppc64v1_emit_int_call_1): New function.
2084 (ppc64v2_emit_int_call_1): New function.
2085 (ppc64v1_emit_void_call_2): New function.
2086 (ppc64v2_emit_void_call_2): New function.
2087 (ppc64_emit_if_goto): New function.
2088 (ppc64_emit_eq_goto): New function.
2089 (ppc64_emit_ne_goto): New function.
2090 (ppc64_emit_lt_goto): New function.
2091 (ppc64_emit_le_goto): New function.
2092 (ppc64_emit_gt_goto): New function.
2093 (ppc64_emit_ge_goto): New function.
2094 (ppc64v1_emit_ops_impl): New static variable.
2095 (ppc64v2_emit_ops_impl): New static variable.
2096 (ppc_emit_ops): New function.
2097 (linux_low_target): Wire in ppc_emit_ops.
2098
a2174ba4
MK
20992016-03-31 Wei-cheng Wang <cole945@gmail.com>
2100 Marcin Kościelnicki <koriakin@0x04.net>
2101
2102 PR/17221
2103 * Makefile.in: Add powerpc-*-ipa.o
2104 * configure.srv: Add ipa_obj for powerpc*-linux.
2105 * linux-ppc-ipa.c: New file.
2106 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2107 includes.
2108 (PPC_FIELD): New macro.
2109 (PPC_SEXT): New macro.
2110 (PPC_OP6): New macro.
2111 (PPC_BO): New macro.
2112 (PPC_LI): New macro.
2113 (PPC_BD): New macro.
2114 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2115 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2116 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2117 (ppc_get_thread_area): New function.
2118 (is_elfv2_inferior): New function.
2119 (gen_ds_form): New function.
2120 (GEN_STD): New macro.
2121 (GEN_STDU): New macro.
2122 (GEN_LD): New macro.
2123 (GEN_LDU): New macro.
2124 (gen_d_form): New function.
2125 (GEN_ADDI): New macro.
2126 (GEN_ADDIS): New macro.
2127 (GEN_LI): New macro.
2128 (GEN_LIS): New macro.
2129 (GEN_ORI): New macro.
2130 (GEN_ORIS): New macro.
2131 (GEN_LWZ): New macro.
2132 (GEN_STW): New macro.
2133 (GEN_STWU): New macro.
2134 (gen_xfx_form): New function.
2135 (GEN_MFSPR): New macro.
2136 (GEN_MTSPR): New macro.
2137 (GEN_MFCR): New macro.
2138 (GEN_MTCR): New macro.
2139 (GEN_SYNC): New macro.
2140 (GEN_LWSYNC): New macro.
2141 (gen_x_form): New function.
2142 (GEN_OR): New macro.
2143 (GEN_MR): New macro.
2144 (GEN_LWARX): New macro.
2145 (GEN_STWCX): New macro.
2146 (GEN_CMPW): New macro.
2147 (gen_md_form): New function.
2148 (GEN_RLDICL): New macro.
2149 (GEN_RLDICR): New macro.
2150 (gen_i_form): New function.
2151 (GEN_B): New macro.
2152 (GEN_BL): New macro.
2153 (gen_b_form): New function.
2154 (GEN_BNE): New macro.
2155 (GEN_LOAD): New macro.
2156 (GEN_STORE): New macro.
2157 (gen_limm): New function.
2158 (gen_atomic_xchg): New function.
2159 (gen_call): New function.
2160 (ppc_relocate_instruction): New function.
2161 (ppc_install_fast_tracepoint_jump_pad): New function.
2162 (ppc_get_min_fast_tracepoint_insn_len): New function.
2163 (ppc_get_ipa_tdesc_idx): New function.
2164 (the_low_target): Wire in the new functions.
2165 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2166 tdescs.
2167 * linux-ppc-tdesc.h: New file.
2168
a13c4696
MK
21692016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2170
2171 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2172 (alloc_jump_pad_buffer): New function.
2173 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2174 (alloc_jump_pad_buffer): New function.
2175 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2176 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2177 (alloc_jump_pad_buffer): New function.
2178 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2179 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2180 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2181 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2182
1cda1512
MK
21832016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2184
2185 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2186 * linux-amd64-ipa.c: Likewise.
2187 * linux-i386-ipa.c: Likewise.
2188 * linux-s390-ipa.c: Likewise.
2189 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2190 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2191 set_trace_state_variable_value_ptr.
2192 (struct ipa_sym_addresses): Likewise.
2193 (symbol_list): Likewise.
2194 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2195 accessing gdb_collect directly.
2196 (gdb_collect_ptr_type): New typedef.
2197 (get_raw_reg_ptr_type): New typedef.
2198 (get_trace_state_variable_value_ptr_type): New typedef.
2199 (set_trace_state_variable_value_ptr_type): New typedef.
2200 (gdb_collect_ptr): New global.
2201 (get_raw_reg_ptr): New global.
2202 (get_trace_state_variable_value_ptr): New global.
2203 (set_trace_state_variable_value_ptr): New global.
2204 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2205 accessing get_raw_reg directly.
2206 (get_get_tsv_func_addr): Likewise for
2207 get_trace_state_variable_value_ptr.
2208 (get_set_tsv_func_addr): Likewise for
2209 set_trace_state_variable_value_ptr.
2210 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2211
72fb5488
SM
22122016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2213
2214 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2215
28170b88
MK
22162016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2217
2218 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2219 packets.
2220 (relocate_instruction): Remove own_buf.
2221 * server.c (own_buf): Make global.
2222 (handle_v_requests): Make global.
2223 * server.h (own_buf): New declaration.
2224 (handle_v_requests): New prototype.
2225
f39e8743
MK
22262016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2227
2228 PR 18377
2229 * linux-s390-low.c (add_insns): New function.
2230 (s390_emit_prologue): New function.
2231 (s390_emit_epilogue): New function.
2232 (s390_emit_add): New function.
2233 (s390_emit_sub): New function.
2234 (s390_emit_mul): New function.
2235 (s390_emit_lsh): New function.
2236 (s390_emit_rsh_signed): New function.
2237 (s390_emit_rsh_unsigned): New function.
2238 (s390_emit_ext): New function.
2239 (s390_emit_log_not): New function.
2240 (s390_emit_bit_and): New function.
2241 (s390_emit_bit_or): New function.
2242 (s390_emit_bit_xor): New function.
2243 (s390_emit_bit_not): New function.
2244 (s390_emit_equal): New function.
2245 (s390_emit_less_signed): New function.
2246 (s390_emit_less_unsigned): New function.
2247 (s390_emit_ref): New function.
2248 (s390_emit_if_goto): New function.
2249 (s390_emit_goto): New function.
2250 (s390_write_goto_address): New function.
2251 (s390_emit_litpool): New function.
2252 (s390_emit_const): New function.
2253 (s390_emit_call): New function.
2254 (s390_emit_reg): New function.
2255 (s390_emit_pop): New function.
2256 (s390_emit_stack_flush): New function.
2257 (s390_emit_zero_ext): New function.
2258 (s390_emit_swap): New function.
2259 (s390_emit_stack_adjust): New function.
2260 (s390_emit_set_r2): New function.
2261 (s390_emit_int_call_1): New function.
2262 (s390_emit_void_call_2): New function.
2263 (s390_emit_eq_goto): New function.
2264 (s390_emit_ne_goto): New function.
2265 (s390_emit_lt_goto): New function.
2266 (s390_emit_le_goto): New function.
2267 (s390_emit_gt_goto): New function.
2268 (s390_emit_ge_goto): New function.
2269 (s390x_emit_prologue): New function.
2270 (s390x_emit_epilogue): New function.
2271 (s390x_emit_add): New function.
2272 (s390x_emit_sub): New function.
2273 (s390x_emit_mul): New function.
2274 (s390x_emit_lsh): New function.
2275 (s390x_emit_rsh_signed): New function.
2276 (s390x_emit_rsh_unsigned): New function.
2277 (s390x_emit_ext): New function.
2278 (s390x_emit_log_not): New function.
2279 (s390x_emit_bit_and): New function.
2280 (s390x_emit_bit_or): New function.
2281 (s390x_emit_bit_xor): New function.
2282 (s390x_emit_bit_not): New function.
2283 (s390x_emit_equal): New function.
2284 (s390x_emit_less_signed): New function.
2285 (s390x_emit_less_unsigned): New function.
2286 (s390x_emit_ref): New function.
2287 (s390x_emit_if_goto): New function.
2288 (s390x_emit_const): New function.
2289 (s390x_emit_call): New function.
2290 (s390x_emit_reg): New function.
2291 (s390x_emit_pop): New function.
2292 (s390x_emit_stack_flush): New function.
2293 (s390x_emit_zero_ext): New function.
2294 (s390x_emit_swap): New function.
2295 (s390x_emit_stack_adjust): New function.
2296 (s390x_emit_int_call_1): New function.
2297 (s390x_emit_void_call_2): New function.
2298 (s390x_emit_eq_goto): New function.
2299 (s390x_emit_ne_goto): New function.
2300 (s390x_emit_lt_goto): New function.
2301 (s390x_emit_le_goto): New function.
2302 (s390x_emit_gt_goto): New function.
2303 (s390x_emit_ge_goto): New function.
2304 (s390_emit_ops): New function.
2305 (struct linux_target_ops): Fill in emit_ops hook.
2306
abd9baf9
MK
23072016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2308
2309 PR 18377
2310 * Makefile.in: Add s390 IPA files.
2311 * configure.srv: Build IPA for s390.
2312 * linux-s390-ipa.c: New file.
2313 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2314 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2315 (tdesc_s390_linux32): Likewise.
2316 (init_registers_s390_linux32v1): Likewise.
2317 (tdesc_s390_linux32v1): Likewise.
2318 (init_registers_s390_linux32v2): Likewise.
2319 (tdesc_s390_linux32v2): Likewise.
2320 (init_registers_s390_linux64): Likewise.
2321 (tdesc_s390_linux64): Likewise.
2322 (init_registers_s390_linux64v1): Likewise.
2323 (tdesc_s390_linux64v1): Likewise.
2324 (init_registers_s390_linux64v2): Likewise.
2325 (tdesc_s390_linux64v2): Likewise.
2326 (init_registers_s390_te_linux64): Likewise.
2327 (tdesc_s390_te_linux64): Likewise.
2328 (init_registers_s390_vx_linux64): Likewise.
2329 (tdesc_s390_vx_linux64): Likewise.
2330 (init_registers_s390_tevx_linux64): Likewise.
2331 (tdesc_s390_tevx_linux64): Likewise.
2332 (init_registers_s390x_linux64): Likewise.
2333 (tdesc_s390x_linux64): Likewise.
2334 (init_registers_s390x_linux64v1): Likewise.
2335 (tdesc_s390x_linux64v1): Likewise.
2336 (init_registers_s390x_linux64v2): Likewise.
2337 (tdesc_s390x_linux64v2): Likewise.
2338 (init_registers_s390x_te_linux64): Likewise.
2339 (tdesc_s390x_te_linux64): Likewise.
2340 (init_registers_s390x_vx_linux64): Likewise.
2341 (tdesc_s390x_vx_linux64): Likewise.
2342 (init_registers_s390x_tevx_linux64): Likewise.
2343 (tdesc_s390x_tevx_linux64): Likewise.
2344 (have_hwcap_s390_vx): New static variable.
2345 (s390_arch_setup): Fill have_hwcap_s390_vx.
2346 (s390_get_thread_area): New function.
2347 (s390_ft_entry_gpr_esa): New const.
2348 (s390_ft_entry_gpr_zarch): New const.
2349 (s390_ft_entry_misc): New const.
2350 (s390_ft_entry_fr): New const.
2351 (s390_ft_entry_vr): New const.
2352 (s390_ft_main_31): New const.
2353 (s390_ft_main_64): New const.
2354 (s390_ft_exit_fr): New const.
2355 (s390_ft_exit_vr): New const.
2356 (s390_ft_exit_misc): New const.
2357 (s390_ft_exit_gpr_esa): New const.
2358 (s390_ft_exit_gpr_zarch): New const.
2359 (append_insns): New function.
2360 (s390_relocate_instruction): New function.
2361 (s390_install_fast_tracepoint_jump_pad): New function.
2362 (s390_get_min_fast_tracepoint_insn_len): New function.
2363 (s390_get_ipa_tdesc_idx): New function.
2364 (struct linux_target_ops): Wire in the above functions.
2365 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2366 * linux-s390-tdesc.h: New file.
2367
a4105d04
MK
23682016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2369
2370 * linux-s390-low.c (s390_supports_tracepoints): New function.
2371 (struct linux_target_ops): Fill supports_tracepoints hook.
2372
35ac8b3e
YQ
23732016-03-18 Yao Qi <yao.qi@linaro.org>
2374
2375 * linux-low.c (lwp_signal_can_be_delivered): New function.
2376 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2377
94610ec4
YQ
23782016-03-18 Yao Qi <yao.qi@linaro.org>
2379
2380 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2381 0 if signal is enqueued. Remove 'signal' from one debugging
2382 message. Move one debugging message to some lines below.
2383 Remove code setting 'signal' to 0.
2384
80aea927
YQ
23852016-03-18 Yao Qi <yao.qi@linaro.org>
2386
2387 * linux-low.c (linux_low_filter_event): Remove redundant
2388 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2389
b04fd3be
MK
23902016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2391
2392 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2393 (struct linux_target_ops): Wire in the above.
2394
c40c8d4b
YQ
23952016-03-03 Yao Qi <yao.qi@linaro.org>
2396
2397 * linux-low.c: Update comments to start_step_over.
2398
0f8288ae
YQ
23992016-03-03 Yao Qi <yao.qi@linaro.org>
2400
2401 PR server/19736
2402 * linux-low.c (handle_extended_wait): Set child suspended
2403 if event_lwp->bp_reinsert isn't zero.
2404
fdbd04a8
YQ
24052016-03-02 Yao Qi <yao.qi@linaro.org>
2406
2407 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2408 enqueue_pending_signal.
2409
6896a8fa
MK
24102016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2411
2412 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2413 is actually loaded.
2414
ab503087
MK
24152016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2416
2417 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2418 (s390_regmap_3264) [!__s390x__]: New global.
2419 (s390_collect_ptrace_register): Skip map entries containing -1.
2420 (s390_supply_ptrace_register): Ditto.
2421 (s390_fill_gprs_high): New function.
2422 (s390_store_gprs_high): New function.
2423 (s390_regsets): Add NT_S390_HIGH_GPRS.
2424 (s390_get_hwcap): Enable on 31-bit.
2425 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2426 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2427 Detect NT_S390_HIGH_GPRS.
2428 (s390_usrregs_info_3264): Enable on 31-bit.
2429 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2430 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2431
ae91f625
MK
24322016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2433
2434 PR gdb/13808
2435 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2436 * configure.srv: Ditto.
2437 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2438 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2439 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2440 (init_registers_amd64_linux): Remove prototype.
2441 (tdesc_amd64_linux): Remove declaration.
2442 (get_ipa_tdesc): New function.
2443 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2444 initialize remaining tdescs.
2445 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2446 (init_registers_i386_linux): Remove prototype.
2447 (tdesc_i386_linux): Remove declaration.
2448 (get_ipa_tdesc): New function.
2449 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2450 initialize remaining tdescs.
2451 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2452 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2453 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2454 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2455 (x86_get_ipa_tdesc_idx): New function.
2456 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2457 * linux-x86-tdesc.h: New file.
2458 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2459 (target_get_ipa_tdesc_idx): New macro.
2460 * tracepoint.c (ipa_tdesc_idx): New macro.
2461 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2462 (symbol_list): Add ipa_tdesc_idx.
2463 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2464 (ipa_tdesc): Remove.
2465 (ipa_tdesc_idx): New variable.
2466 (get_context_regcache): Use get_ipa_tdesc.
2467 (gdb_collect): Ditto.
2468 (gdb_probe): Ditto.
2469 * tracepoint.h (get_ipa_tdesc): New prototype.
2470 (ipa_tdesc): Remove.
2471
e7ad2f14
PA
24722016-02-24 Pedro Alves <palves@redhat.com>
2473
2474 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2475 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2476 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2477 Factor out common code between the USE_SIGTRAP_SIGINFO and
2478 !USE_SIGTRAP_SIGINFO blocks.
2479 (linux_low_filter_event): Call save_stop_reason instead of
2480 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2481 Update comments.
2482 (linux_wait_1): Update comments.
2483
657f9cde
WW
24842016-02-24 Wei-cheng Wang <cole945@gmail.com>
2485
2486 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2487 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2488 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2489 ppc_insert_point, ppc_remove_point.
2490
b00b61e1
MK
24912016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2492
2493 * linux-s390-low.c (s390_supports_z_point_type): New function.
2494 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2495
553cb527
YQ
24962016-02-16 Yao Qi <yao.qi@linaro.org>
2497
2498 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2499 PC. Get pc from regcache_read_pc.
2500
a5652c21
YQ
25012016-02-12 Yao Qi <yao.qi@linaro.org>
2502
2503 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2504 or linux_get_pc_32bit.
2505 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2506
ed443b61
YQ
25072016-02-12 Yao Qi <yao.qi@linaro.org>
2508
2509 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2510 arm_linux_get_next_pcs_fixup.
2511
020ecd38
MK
25122016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2513
2514 * tracepoint.c (x_tracepoint_action_download): Change
2515 write_inferior_data_ptr to write_inferior_data_pointer.
2516 (cmd_qtstart): Likewise.
2517 (write_inferior_data_ptr): Remove.
2518 (download_agent_expr): Change write_inferior_data_ptr to
2519 write_inferior_data_pointer.
2520 (download_tracepoint_1): Likewise.
2521 (download_tracepoint): Likewise.
2522 (download_trace_state_variables): Likewise.
2523
7cae9051
WW
25242016-02-11 Wei-cheng Wang <cole945@gmail.com>
2525 Marcin Kościelnicki <koriakin@0x04.net>
2526
2527 * tracepoint.c (struct tracepoint_action_ops): Remove.
2528 (struct tracepoint_action): Remove ops.
2529 (m_tracepoint_action_download, r_tracepoint_action_download)
2530 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2531 size and offset accordingly.
2532 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2533 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2534 (tracepoint_action_send, tracepoint_action_download): New functions.
2535 Helpers for trace action handlers.
2536 (add_tracepoint_action): Remove setup actions ops.
2537 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2538
9f6a71b4
YQ
25392016-02-10 Yao Qi <yao.qi@linaro.org>
2540
2541 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2542
1e94266c
SM
25432016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2544
2545 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2546 to AC_OUTPUT.
2547 * configure: Regenerate.
2548
8adce034
SM
25492016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2550
2551 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2552 void * to gdb_byte *.
2553 * linux-low.c (siginfo_fixup): Likewise.
2554 (linux_xfer_siginfo): Likewise.
2555 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2556 Likewise.
2557 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2558
93813b37
WT
25592016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2560
2561 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2562 to srv_tgtobj.
2563 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2564 to srv_tgtobj.
2565 * linux-x86-low.c [__x86_64__]: Include
2566 "nat/amd64-linux-siginfo.h".
2567 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2568 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2569 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2570 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2571 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2572 (cpt_si_fd, si_timerid, si_overrun): Move from
2573 nat/amd64-linux-siginfo.c.
2574 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2575
8424cc97
SM
25762016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2577
2578 * server.c (skip_to_semicolon): Remove.
2579 (process_point_options): Use strchrnul instead of
2580 skip_to_semicolon.
2581
4d18591b
YQ
25822016-01-26 Yao Qi <yao.qi@linaro.org>
2583
2584 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2585 * linux-low.c (install_software_single_step_breakpoints): Don't
2586 call regcache_read_pc.
2587 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2588 argument pc.
2589
d8020970
YQ
25902016-01-26 Yao Qi <yao.qi@linaro.org>
2591
2592 * linux-low.c (install_software_single_step_breakpoints): Call
2593 regcache_read_pc instead of get_pc.
2594
8b207339
YQ
25952016-01-26 Yao Qi <yao.qi@linaro.org>
2596
2597 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2598 (unblock_async_io): Rename to ...
2599 (block_unblock_async_io): ... it. New function.
2600 (enable_async_io): Don't install SIGIO handler. Unblock it
2601 instead.
2602 (disable_async_io): Don't ignore SIGIO. Block it instead.
2603 (initialize_async_io): Install SIGIO handler. Don't call
2604 unblock_async_io.
2605
18879fef
YQ
26062016-01-26 Yao Qi <yao.qi@linaro.org>
2607
2608 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2609 first character is '\003', call *the_target->request_interrupt.
2610
a0f8e08a
YQ
26112016-01-25 Yao Qi <yao.qi@linaro.org>
2612
2613 * remote-utils.c (new_thread_notify): Remove.
2614 (dead_thread_notify): Likewise.
2615 * remote-utils.h (new_thread_notify): Remove declaration.
2616 (dead_thread_notify): Likewise.
2617
cc5fd9ab
MK
26182016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2619
2620 * gdb.trace/pending.exp: Fix expected message on continue.
2621
99e8eb11
MK
26222016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2623
2624 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2625 it works properly on big-endian machines where sizeof (CORE_ADDR)
2626 != sizeof (void *).
2627
a994041d
PA
26282016-01-21 Pedro Alves <palves@redhat.com>
2629
2630 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2631 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2632 * configure: Regenerate.
2633
f7a6a40d
YQ
26342016-01-21 Yao Qi <yao.qi@linaro.org>
2635
2636 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2637 is_thumb and set it according to CPSR saved on the stack.
2638 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2639 arm_sigreturn_next_pc.
2640
6f69e520
YQ
26412016-01-18 Yao Qi <yao.qi@linaro.org>
2642
2643 * linux-low.c (linux_set_pc_64bit): New function.
2644 (linux_get_pc_64bit): New function.
2645 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2646 Declare.
2647 * linux-sparc-low.c (debug_threads): Remove declaration.
2648 (sparc_get_pc): Remove.
2649 (the_low_target): Use linux_get_pc_64bit instead of
2650 sparc_get_pc.
2651 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2652 (the_low_target): Use linux_get_pc_64bit and
2653 linux_set_pc_64bit.
2654
276d4552
YQ
26552016-01-18 Yao Qi <yao.qi@linaro.org>
2656
2657 * linux-arm-low.c (debug_threads): Remove declaration.
2658 (arm_get_pc, arm_set_pc): Remove.
2659 (the_low_target): Use linux_get_pc_32bit and
2660 linux_set_pc_32bit.
2661 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2662 (the_low_target): Use linux_get_pc_32bit and
2663 linux_set_pc_32bit.
2664 * linux-cris-low.c (debug_threads): Remove declaration.
2665 (cris_get_pc, cris_set_pc,): Remove.
2666 (the_low_target): Use linux_get_pc_32bit and
2667 linux_set_pc_32bit.
2668 * linux-crisv32-low.c (debug_threads): Remove declaration.
2669 (cris_get_pc, cris_set_pc): Remove.
2670 (the_low_target): Use linux_get_pc_32bit and
2671 linux_set_pc_32bit.
2672 * linux-low.c: Include inttypes.h.
2673 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2674 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2675 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2676 (the_low_target): Use linux_get_pc_32bit and
2677 linux_set_pc_32bit.
2678 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2679 (the_low_target): Use linux_get_pc_32bit and
2680 linux_set_pc_32bit.
2681 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2682 (the_low_target): Use linux_get_pc_32bit and
2683 linux_set_pc_32bit.
2684 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2685 (the_low_target): Use linux_get_pc_32bit and
2686 linux_set_pc_32bit.
2687 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2688 (the_low_target): Use linux_get_pc_32bit and
2689 linux_set_pc_32bit.
2690
eb0edac8
GB
26912016-01-18 Gary Benson <gbenson@redhat.com>
2692
2693 * configure.ac (AC_FUNC_FORK): New check.
2694 * config.in: Regenerate.
2695 * configure: Likewise.
2696
1b451dda
YQ
26972016-01-14 Yao Qi <yao.qi@linaro.org>
2698
2699 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2700 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2701 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2702 arm_get_next_pcs_ctor.
2703
82075af2
JS
27042016-01-12 Josh Stone <jistone@redhat.com>
2705 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2706
2707 * inferiors.h: Include "gdb_vecs.h".
2708 (struct process_info): Add syscalls_to_catch.
2709 * inferiors.c (remove_process): Free syscalls_to_catch.
2710 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2711 syscall_return stops.
2712 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2713 * server.c (handle_general_set): Handle QCatchSyscalls.
2714 (handle_query): Report support for QCatchSyscalls.
2715 * target.h (struct target_ops): Add supports_catch_syscall.
2716 (target_supports_catch_syscall): New macro.
2717 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2718 (struct lwp_info): Add syscall_state.
2719 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2720 Maintain syscall_state and syscalls_to_catch across exec.
2721 (get_syscall_trapinfo): New function, proxy to the_low_target.
2722 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2723 (linux_low_filter_event): Toggle syscall_state entry/return for
2724 syscall traps, and set it ignored for all others.
2725 (gdb_catching_syscalls_p): New function.
2726 (gdb_catch_this_syscall_p): New function.
2727 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2728 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2729 (linux_supports_catch_syscall): New function.
2730 (linux_target_ops): Install it.
2731 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2732 (the_low_target): Install it.
2733
8f13a3ce
MF
27342016-01-12 Mike Frysinger <vapier@gentoo.org>
2735
2736 * acinclude.m4: Include new ../warning.m4 file.
2737 * configure: Regenerated.
2738 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2739
5b3da067
MF
27402016-01-12 Mike Frysinger <vapier@gentoo.org>
2741
2742 * ax.c (is_goto_target): Mark static.
2743 * linux-low.c (register_addr): Likewise.
2744 (linux_fetch_registers, linux_store_registers): Likewise.
2745 * mem-break.c (any_persistent_commands): Fix old prototype.
2746 (add_commands_to_breakpoint): Mark static.
2747 * regcache.c (find_register_by_name): Delete unused func.
2748 * remote-utils.c (hex_or_minus_one): Mark static.
2749 * server.c (monitor_show_help): Mark static.
2750 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2751 handle_v_requests): Likewise.
2752
bc504a31
PA
27532016-01-12 Pedro Alves <palves@redhat.com>
2754
2755 Remove use of the registered trademark symbol throughout.
2756
5a0dd67a
YQ
27572016-01-08 Yao Qi <yao.qi@linaro.org>
2758
2759 * remote-utils.c (getpkt): If c is '\003', call target hook
2760 request_interrupt.
2761
b2ca446f
YQ
27622016-01-06 Yao Qi <yao.qi@linaro.org>
2763
2764 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2765 linux-aarch32-low.c.
2766 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2767 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2768 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2769 (thumb2_breakpoint): Declare.
2770 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2771 linux-aarch32-low.h.
2772 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2773 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2774 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2775
edd88788
JB
27762016-01-01 Joel Brobecker <brobecker@adacore.com>
2777
2778 * gdbreplay.c (gdbreplay_version): Change copyright year in
2779 version message.
2780 * server.c (gdbserver_version): Likewise.
2781
65da7f14
PP
27822015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2783
2784 * server.c (crc32_table): Delete.
2785 (crc32): Use libiberty's xcrc32 function.
2786
4abd5ed2
JB
27872015-12-22 Joel Brobecker <brobecker@adacore.com>
2788
2789 * lynx-low.c (lynx_delete_thread_callback): New function.
2790 (lynx_mourn): Properly delete our process and all of its
2791 threads. Remove call to clear_inferiors.
2792
0e50fe5c
JB
27932015-12-22 Joel Brobecker <brobecker@adacore.com>
2794
2795 * target.c (thread_search_callback): Add check that
2796 the thread_stopped target callback is not NULL before
2797 calling it.
2798
35adc03f
YQ
27992015-12-21 Yao Qi <yao.qi@linaro.org>
2800
2801 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2802 arm breakpoint.
2803
bd2b2909
AT
28042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2805
2806 * server.c (handle_query): Call target_supports_software_single_step.
2807
7fe5e27e
AT
28082015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2809
2810 * linux-low.c (single_step): New function.
2811 (linux_resume_one_lwp_throw): Call single_step.
2812 (start_step_over): Likewise.
2813
d9311bfa
AT
28142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2815
2816 * Makefile.in (SFILES): Append arch/arm-linux.c,
2817 arch/arm-get-next-pcs.c.
2818 (arm-linux.o): New rule.
2819 (arm-get-next-pcs.o): New rule.
2820 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2821 arm-linux.o.
2822 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2823 to linux-aarch32-low.c.
2824 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2825 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2826 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2827 (thumb2_breakpoint_len): Likewise.
2828 (arm_is_thumb_mode): Make non-static.
2829 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2830 from linux-aarch32-low.c.
2831 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2832 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2833 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2834 (thumb2_breakpoint_len): Likewise.
2835 (arm_is_thumb_mode): New declaration.
2836 * linux-arm-low.c: Include arch/arm-linux.h
2837 aarch/arm-get-next-pcs.h, sys/syscall.h.
2838 (get_next_pcs_ops): New struct.
2839 (get_next_pcs_addr_bits_remove): New function.
2840 (get_next_pcs_is_thumb): New function.
2841 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2842 (arm_sigreturn_next_pc): Likewise.
2843 (get_next_pcs_syscall_next_pc): Likewise.
2844 (arm_gdbserver_get_next_pcs): Likewise.
2845 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2846 Initialize.
2847 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2848 * server.h: Include gdb_vecs.h.
2849
68ce2059
AT
28502015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2851
2852 * Makefile.in (SFILES): Append common/common-regcache.c.
2853 (OBS): Append common-regcache.o.
2854 (common-regcache.o): New rule.
2855 * regcache.c (init_register_cache): Initialize cache to
2856 REG_UNAVAILABLE.
2857 (regcache_raw_read_unsigned): New function.
2858 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2859 register_status enum.
2860
fa5308bd
AT
28612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2862
2863 * linux-aarch64-low.c (the_low_targets): Rename
2864 breakpoint_reinsert_addr to get_next_pcs.
2865 * linux-arm-low.c (the_low_targets): Likewise.
2866 * linux-bfin-low.c (the_low_targets): Likewise.
2867 * linux-cris-low.c (the_low_targets): Likewise.
2868 * linux-crisv32-low.c (the_low_targets): Likewise.
2869 * linux-low.c (can_software_single_step): Likewise.
2870 (install_software_single_step_breakpoints): New function.
2871 (start_step_over): Use install_software_single_step_breakpoints.
2872 * linux-low.h: New CORE_ADDR vector.
2873 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2874 get_next_pcs.
2875 * linux-mips-low.c (the_low_targets): Likewise.
2876 * linux-nios2-low.c (the_low_targets): Likewise.
2877 * linux-sparc-low.c (the_low_targets): Likewise.
2878
4a6ed09b
PA
28792015-12-17 Pedro Alves <palves@redhat.com>
2880
2881 * linux-low.c (linux_kill_one_lwp): Remove references to
2882 LinuxThreads.
2883 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2884 to 'kill'.
2885 (linux_init_signals): Delete.
2886 (initialize_low): Adjust.
2887 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2888
7544db95
PA
28892015-12-16 Pedro Alves <palves@redhat.com>
2890
2891 * configure.ac (compiler warning flags): When testing a
2892 -Wno-foo option, check whether -Wfoo works instead.
2893 * configure: Regenerate.
2894
8020350c
DB
28952015-12-11 Don Breazeal <donb@codesourcery.com>
2896
2897 * server.c (process_serial_event): Don't exit from gdbserver
2898 in remote mode if there are still active inferiors.
2899
db91f502
YQ
29002015-12-11 Yao Qi <yao.qi@linaro.org>
2901
2902 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2903 arm_breakpoint_at if the process is 32-bit.
2904
b37a6290
YQ
29052015-12-11 Yao Qi <yao.qi@linaro.org>
2906
2907 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2908 arm breakpoint.
2909
17b1509a
YQ
29102015-12-07 Yao Qi <yao.qi@linaro.org>
2911
2912 * configure.srv: Append arm.o to srv_tgtobj for
2913 aarch64*-*-linux* target.
2914 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2915 from linux-arm-low.c.
2916 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2917 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2918 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2919 (thumb2_breakpoint_len): Likewise.
2920 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2921 (arm_breakpoint_kinds): Likewise.
2922 (arm_breakpoint_kind_from_pc): Likewise.
2923 (arm_sw_breakpoint_from_kind): Likewise.
2924 (arm_breakpoint_kind_from_current_state): Likewise.
2925 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2926 (arm_sw_breakpoint_from_kind): Declare.
2927 (arm_breakpoint_kind_from_current_state): Declare.
2928 (arm_breakpoint_at): Declare.
2929 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2930 arm_sw_breakpoint_from_kind if process is 32-bit.
2931 (aarch64_breakpoint_kind_from_pc): New function.
2932 (aarch64_breakpoint_kind_from_current_state): New function.
2933 (the_low_target): Initialize fields breakpoint_kind_from_pc
2934 and breakpoint_kind_from_current_state.
2935 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2936 linux-aarch32-low.c.
2937 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2938 (arm_breakpoint, arm_breakpoint_len): Likewise.
2939 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2940 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2941 (arm_is_thumb_mode): Likewise.
2942 (arm_breakpoint_at): Likewise.
2943 (arm_breakpoint_kind_from_pc): Likewise.
2944 (arm_sw_breakpoint_from_kind): Likewise.
2945 (arm_breakpoint_kind_from_current_state): Likewise.
2946
2947 Revert:
2948 2015-08-04 Yao Qi <yao.qi@linaro.org>
2949
2950 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2951 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2952 * server.c (extended_protocol): Remove "static".
2953 * server.h (extended_protocol): Declare it.
2954
ece66d65
JS
29552015-12-04 Josh Stone <jistone@redhat.com>
2956
2957 * target.h (struct target_ops) <arch_setup>: Rename to ...
2958 (struct target_ops) <post_create_inferior>: ... this.
2959 (target_arch_setup): Rename to ...
2960 (target_post_create_inferior): ... this, calling post_create_inferior.
2961 * server.c (start_inferior): Update target_arch_setup calls to
2962 target_post_create_inferior.
2963 * linux-low.c (linux_low_ptrace_options): Forward declare.
2964 (linux_arch_setup): Update its comment for general use.
2965 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2966 (struct linux_target_ops): Use linux_post_create_inferior.
2967 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2968 to post_create_inferior.
2969 * nto-low.c (struct nto_target_ops): Likewise.
2970 * spu-low.c (struct spu_target_ops): Likewise.
2971 * win32-low.c (struct win32_target_ops): Likewise.
2972
e58c48b4
AT
29732015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2974
2975 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2976
fbec8956
AT
29772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2978
2979 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2980 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2981 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2982 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2983 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2984 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2985 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2986 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2987 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2988 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2989 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2990 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2991
9b4c5f87
AT
29922015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2993
2994 * linux-low.c (linux_look_up_symbols): Don't call
2995 linux_supports_traceclone.
2996 * linux-low.h (thread_db_init): Remove use_events argument.
2997 * thread-db.c (thread_db_use_event): Remove global variable.
2998 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2999 (struct thread_db) <td_create_bp>: Remove field.
3000 (thread_db_create_event): Remove function.
3001 (thread_db_enable_reporting): Likewise.
3002 (find_one_thread): Don't check for thread_db_use_events.
3003 (attach_thread): Likewise.
3004 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3005 (try_thread_db_load_1): Don't check for thread_db_use_events.
3006 (thread_db_init): Remove use_events argument and thread events
3007 handling.
3008 (remove_thread_event_breakpoints): Remove function.
3009 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3010
7d00775e
AT
30112015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3012
3013 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3014 New function.
3015 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3016 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3017 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3018 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3019 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3020 Initialize.
3021 * linux-crisv32-low.c (cris_supports_hardware_single_step):
3022 New function.
3023 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3024 * linux-low.c (can_hardware_single_step): Use
3025 supports_hardware_single_step.
3026 (can_software_single_step): New function.
3027 (start_step_over): Call can_software_single_step.
3028 (linux_supports_hardware_single_step): New function.
3029 (struct target_ops) <supports_software_single_step>: Initialize.
3030 * linux-low.h (struct linux_target_ops)
3031 <supports_hardware_single_step>: Initialize.
3032 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
3033 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3034 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
3035 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
3036 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
3037 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3038 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
3039 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3040 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
3041 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
3042 Initialize.
3043 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
3044 (struct linux_target_ops) <tile_supports_hardware_single_step>:
3045 Initialize.
3046 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3047 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3048 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3049 New function.
3050 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3051 * target.h (struct target_ops): <supports_software_single_step>:
3052 New field.
3053 (target_supports_software_single_step): New macro.
3054
2d97cd35
AT
30552015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3056
3057 * linux-low.c (linux_wait_1): Fix pc advance condition.
3058 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3059 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3060
769ef81f
AT
30612015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3062
3063 * linux-arm-low.c (arm_is_thumb_mode): New function.
3064 (arm_breakpoint_at): Use arm_is_thumb_mode.
3065 (arm_breakpoint_kind_from_current_state): New function.
3066 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3067 Initialize.
3068 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3069 (linux_breakpoint_kind_from_current_state): New function.
3070 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3071 * linux-low.h (struct linux_target_ops)
3072 <breakpoint_kind_from_current_state>: New field.
3073 * target.h (struct target_ops): Likewise.
3074 (target_breakpoint_kind_from_current_state): New macro.
3075
1bebeeca
PA
30762015-11-30 Pedro Alves <palves@redhat.com>
3077
3078 * linux-low.c (linux_resume): Wake up the event loop before
3079 returning.
3080
a67a9fae
PA
30812015-11-30 Pedro Alves <palves@redhat.com>
3082
3083 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3084 check.
3085 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3086 to -1.
3087 * target.c (struct thread_search): New structure.
3088 (thread_search_callback): New function.
3089 (prev_general_thread): New global.
3090 (prepare_to_access_memory, done_accessing_memory): New functions.
3091 * target.h (prepare_to_access_memory, done_accessing_memory):
3092 Replace macros with function declarations.
3093
f2faf941
PA
30942015-11-30 Pedro Alves <palves@redhat.com>
3095
3096 PR 14618
3097 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3098 report TARGET_WAITKIND_NO_RESUMED.
3099 * remote-utils.c (prepare_resume_reply): Handle
3100 TARGET_WAITKIND_NO_RESUMED.
3101 * server.c (report_no_resumed): New global.
3102 (handle_query) <qSupported>: Handle "no-resumed+". Report
3103 "no-resumed+" support.
3104 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3105 return error if the client doesn't support no-resumed events.
3106 (push_stop_notification): New function.
3107 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3108 events if the client supports them.
3109
a681f9c9
PA
31102015-11-30 Pedro Alves <palves@redhat.com>
3111
3112 * linux-low.c (thread_still_has_status_pending_p): Don't check
3113 vCont;t here.
3114 (lwp_resumed): New function.
3115 (status_pending_p_callback): Return early if the LWP is not
3116 supposed to be resumed.
3117
65706a29
PA
31182015-11-30 Pedro Alves <palves@redhat.com>
3119
3120 * linux-low.c (handle_extended_wait): Assert that the LWP's
3121 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3122 thread create events, leave the new child's status pending.
3123 (linux_low_filter_event): If GDB wants to hear about thread exit
3124 events, leave the LWP marked dead and don't delete it.
3125 (linux_wait_for_event_filtered): Don't check for thread exit.
3126 (filter_exit_event): New function.
3127 (linux_wait_1): Use it, when returning an exit event.
3128 (linux_resume_one_lwp_throw): Assert that the LWP's
3129 waitstatus is TARGET_WAITKIND_IGNORE.
3130 * remote-utils.c (prepare_resume_reply): Handle
3131 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3132 * server.c (report_thread_events): New global.
3133 (handle_general_set): Handle QThreadEvents.
3134 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3135 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3136 TARGET_WAITKIND_THREAD_EXITED.
3137 * server.h (report_thread_events): Declare.
3138
56cf4bed
PA
31392015-11-30 Pedro Alves <palves@redhat.com>
3140
3141 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3142 the thread's last_resume_kind was resume_stop.
3143
500c1d85
PA
31442015-11-30 Pedro Alves <palves@redhat.com>
3145
3146 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3147 before returning.
3148
de979965
PA
31492015-11-30 Pedro Alves <palves@redhat.com>
3150
3151 * server.c (handle_v_requests): Handle vCtrlC.
3152
34c65914
PA
31532015-11-30 Pedro Alves <palves@redhat.com>
3154
3155 * gdbthread.h (find_any_thread_of_pid): Declare.
3156 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3157 functions.
3158 * server.c (handle_query): If current_thread is NULL, look for
3159 another thread of the selected process.
3160
79efa585 31612015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3162 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3163
3164 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3165 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3166 name in reply.
3167 * target.h (struct target_ops) <thread_name>: New field.
3168 (target_thread_name): New macro.
3169
80d82c19
JB
31702015-11-23 Joel Brobecker <brobecker@adacore.com>
3171
3172 * regcache.h (regcache_invalidate_pid): Add declaration.
3173 * regcache.c (regcache_invalidate_pid): New function, extracted
3174 from regcache_invalidate.
3175 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3176 Add trivial documentation comment.
3177 * lynx-low.c: Use regcache_invalidate_pid instead of
3178 regcache_invalidate.
3179
64da5dd5
JB
31802015-11-23 Joel Brobecker <brobecker@adacore.com>
3181
3182 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3183 and Elf64_auxv_t if the target is Android.
3184
37ce4055
DE
31852015-11-22 Doug Evans <xdje42@gmail.com>
3186
3187 * target.h: #include <sys/types.h>.
3188
06e03fff
PA
31892015-11-19 Pedro Alves <palves@redhat.com>
3190
3191 * linux-low.c (linux_process_qsupported): Change prototype.
3192 Adjust.
3193 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3194 Change prototype.
3195 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3196 and adjust to loop over all features.
3197 * server.c (handle_query) <qSupported>: Adjust to call
3198 target_process_qsupported once, passing it a vector of unprocessed
3199 features.
3200 * target.h (struct target_ops) <process_qsupported>: Change
3201 prototype.
3202 (target_process_qsupported): Adjust.
3203
9a084706
PA
32042015-11-19 Pedro Alves <palves@redhat.com>
3205
3206 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3207 mode.
3208 * configure: Regenerate.
3209
dad44a1f
PA
32102015-11-19 Pedro Alves <palves@redhat.com>
3211
3212 * configure: Regenerate.
3213
231c0592
YQ
32142015-11-19 Yao Qi <yao.qi@linaro.org>
3215
3216 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3217 type to uint32_t.
3218
6c1c9a8b
YQ
32192015-11-19 Yao Qi <yao.qi@linaro.org>
3220
3221 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3222 (struct aarch64_operand): Move enum out.
3223
9caa3311
YQ
32242015-11-19 Yao Qi <yao.qi@linaro.org>
3225
3226 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3227 struct user_fpsimd_state *.
3228 (aarch64_store_fpregset): Likewise.
3229
6a69a054
YQ
32302015-11-19 Yao Qi <yao.qi@linaro.org>
3231
3232 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3233 struct user_pt_regs *.
3234 (aarch64_store_gregset): Likewise.
3235
1798301e
PA
32362015-11-18 Pedro Alves <palves@redhat.com>
3237
3238 * Makefile.in (all_object_files): Add $IPA_OBJS.
3239
ce7715e2
PA
32402015-11-17 Pedro Alves <palves@redhat.com>
3241
3242 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3243 GDB_SIGNAL_0 and gdb_signal_to_string.
3244
c0879059
PA
32452015-11-17 Pedro Alves <palves@redhat.com>
3246
3247 * win32-low.c (handle_output_debug_string): Remove parameter.
3248 (win32_kill): Remove our_status local and adjust call to
3249 handle_output_debug_string.
3250 (get_child_debug_event): Adjust call to
3251 handle_output_debug_string.
3252
1996e237
SM
32532015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3254
3255 * linux-mips-low.c (mips_fill_gregset): Add cast.
3256 (mips_store_gregset): Likewise.
3257 (mips_fill_fpregset): Likewise.
3258 (mips_store_fpregset): Likewise.
3259
cbec665b
SM
32602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3261
3262 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3263 priv.
3264
eb3e3c67
SM
32652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3266
3267 * linux-mips-low.c (mips_linux_new_thread): Change type of
3268 watch_type to enum target_hw_bp_type.
3269
171de4b8
SM
32702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3271
3272 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3273 Change return type to arm_hwbp_type.
3274
04248ead
SM
32752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3276
3277 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3278 (arm_store_gregset): Likewise.
3279 * linux-arm-low.c (arm_get_hwcap): Likewise.
3280 (arm_read_description): Likewise.
3281
04b3479c
SM
32822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3283
3284 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3285
2bc84e8a
SM
32862015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3287
3288 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3289 (ppc_fill_vsxregset): Likewise.
3290 (ppc_store_vsxregset): Likewise.
3291 (ppc_fill_vrregset): Likewise.
3292 (ppc_store_vrregset): Likewise.
3293 (ppc_fill_evrregset): Likewise.
3294 (ppc_store_evrregset): Likewise.
3295
e6c5bb05
SM
32962015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3297
3298 * linux-ppc-low.c (ppc_usrregs_info): Remove
3299 forward-declaration.
3300 (ppc_arch_setup): Move lower in file.
3301
7ea45d72
SM
33022015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3303
3304 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3305 (ps_pdwrite): Likewise.
3306
69291610
HW
33072015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3308
3309 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3310 to after assert checks.
3311
b42945fd
SM
33122015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3313
3314 * proc-service.c (ps_pdread): Add/adjust casts.
3315 (ps_pdwrite): Add/adjust casts.
3316
d6f85c84
SM
33172015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3318
3319 * server.c (handle_search_memory_1): Cast return value of
3320 memmem.
3321
f98cd059
SM
33222015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3323
3324 * server.c (write_qxfer_response): Change type of data to
3325 gdb_byte *.
3326
d2412fa5
PA
33272015-10-29 Pedro Alves <palves@redhat.com>
3328
3329 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3330
c17414a2
PA
33312015-10-29 Pedro Alves <palves@redhat.com>
3332
3333 * tracepoint.c (clear_installed_tracepoints): Add casts.
3334
e053fbc4
PA
33352015-10-29 Pedro Alves <palves@redhat.com>
3336
3337 * server.c (handle_v_cont, process_serial_event): Add enum
3338 gdb_signal casts to signal parsing code.
3339
add67df8
PA
33402015-10-29 Pedro Alves <palves@redhat.com>
3341
3342 * linux-low.h (NULL_REGSET): Define.
3343 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3344 * linux-arm-low.c (arm_regsets): Likewise.
3345 * linux-crisv32-low.c (cris_regsets): Likewise.
3346 * linux-m68k-low.c (m68k_regsets): Likewise.
3347 * linux-mips-low.c (mips_regsets): Likewise.
3348 * linux-nios2-low.c (nios2_regsets): Likewise.
3349 * linux-ppc-low.c (ppc_regsets): Likewise.
3350 * linux-s390-low.c (s390_regsets): Likewise.
3351 * linux-sh-low.c (sh_regsets): Likewise.
3352 * linux-sparc-low.c (sparc_regsets): Likewise.
3353 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3354 * linux-tile-low.c (tile_regsets): Likewise.
3355 * linux-x86-low.c (x86_regsets): Likewise.
3356 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3357
50bc912a
PA
33582015-10-29 Pedro Alves <palves@redhat.com>
3359
3360 * linux-low.h (NULL_REGSET): Define.
3361 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3362 * linux-arm-low.c (arm_regsets): Likewise.
3363 * linux-crisv32-low.c (cris_regsets): Likewise.
3364 * linux-m68k-low.c (m68k_regsets): Likewise.
3365 * linux-mips-low.c (mips_regsets): Likewise.
3366 * linux-nios2-low.c (nios2_regsets): Likewise.
3367 * linux-ppc-low.c (ppc_regsets): Likewise.
3368 * linux-s390-low.c (s390_regsets): Likewise.
3369 * linux-sh-low.c (sh_regsets): Likewise.
3370 * linux-sparc-low.c (sparc_regsets): Likewise.
3371 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3372 * linux-tile-low.c (tile_regsets): Likewise.
3373 * linux-x86-low.c (x86_regsets): Likewise.
3374 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3375
682b2546
DE
33762015-10-26 Doug Evans <dje@google.com>
3377
3378 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3379
963843d4
DE
33802015-10-26 Doug Evans <dje@google.com>
3381
3382 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3383
d41401ac
DE
33842015-10-26 Doug Evans <dje@google.com>
3385
3386 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3387 for debug_printf.
3388 (attach_thread, find_new_threads_callback): Ditto.
3389
3db28855
AT
33902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3391
3392 * mem-break.h (set_breakpoint_data): Remove.
3393
fb78e89c
AT
33942015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3395
3396 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3397 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3398 (initialize_low): Remove set_breakpoint_data call.
3399 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3400 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3401 (initialize_low): Remove set_breakpoint_data call.
3402 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3403 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3404 (initialize_low): Remove set_breakpoint_data call.
3405
2e6ee069
AT
34062015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3407
3408 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3409 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3410 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3411 * target.h (target_breakpoint_kind_from_pc): New macro.
3412
1652a986
AT
34132015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3414
3415 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3416 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3417 the default breakpoint kind.
3418
abeead09
AT
34192015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3420
3421 * linux-arm-low.c (arm_supports_z_point_type): Add software
3422 breakpoint support.
3423
b0b4b501
AT
34242015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3425
3426 * linux-arm-low.c: Refactor breakpoint definitions.
3427 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3428 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3429
8689682c
AT
34302015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3431
3432 * Makefile.in: Add arm.c/o.
3433 * configure.srv: Likewise.
3434 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3435 (arm_breakpoint_kind_from_pc): New function.
3436 (arm_sw_breakpoint_from_kind): Return proper kind.
3437 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3438
27165294
AT
34392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3440
3441 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3442 removal.
3443 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3444 (struct raw_breakpoint) <size>: Remove.
3445 (struct raw_breakpoint) <kind>: Add.
3446 (bp_size): New function.
3447 (bp_opcode): Likewise.
3448 (find_raw_breakpoint_at): Adjust for kind.
3449 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3450 (remove_memory_breakpoint): Adjust for kind call bp_size.
3451 (set_raw_breakpoint_at): Adjust for kind.
3452 (set_breakpoint): Likewise.
3453 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3454 (delete_raw_breakpoint): Adjust for kind.
3455 (delete_breakpoint): Likewise.
3456 (find_gdb_breakpoint): Likewise.
3457 (set_gdb_breakpoint_1): Likewise.
3458 (set_gdb_breakpoint): Likewise.
3459 (delete_gdb_breakpoint_1): Likewise.
3460 (delete_gdb_breakpoint): Likewise.
3461 (uninsert_raw_breakpoint): Likewise.
3462 (reinsert_raw_breakpoint): Likewise.
3463 (set_breakpoint_data): Remove.
3464 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3465 (check_mem_read): Adjust for kind call bp_size.
3466 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3467 (clone_one_breakpoint): Adjust for kind.
3468 * mem-break.h (set_gdb_breakpoint): Likewise.
3469 (delete_gdb_breakpoint): Likewise.
3470 * server.c (process_serial_event): Likewise.
3471
dd373349
AT
34722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3473
3474 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3475 (struct linux_target_ops) <breakpoint>: Remove.
3476 (struct linux_target_ops) <breakpoint_len>: Remove.
3477 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3478 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3479 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3480 (arm_sw_breakpoint_from_kind): New function.
3481 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3482 (struct linux_target_ops) <breakpoint>: Remove.
3483 (struct linux_target_ops) <breakpoint_len>: Remove.
3484 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3485 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3486 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3487 (struct linux_target_ops) <breakpoint>: Remove.
3488 (struct linux_target_ops) <breakpoint_len>: Remove.
3489 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3490 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3491 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3492 (struct linux_target_ops) <breakpoint>: Remove.
3493 (struct linux_target_ops) <breakpoint_len>: Remove.
3494 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3495 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3496 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3497 and sw_breakpoint_from_kind to increment the pc.
3498 (linux_breakpoint_kind_from_pc): New function.
3499 (linux_sw_breakpoint_from_kind): New function.
3500 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3501 (initialize_low): Call breakpoint_kind_from_pc and
3502 sw_breakpoint_from_kind to replace breakpoint_data/len.
3503 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3504 New field.
3505 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3506 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3507 (struct linux_target_ops) <breakpoint>: Remove.
3508 (struct linux_target_ops) <breakpoint_len>: Remove.
3509 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3510 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3511 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3512 (struct linux_target_ops) <breakpoint>: Remove.
3513 (struct linux_target_ops) <breakpoint_len>: Remove.
3514 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3515 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3516 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3517 (struct linux_target_ops) <breakpoint>: Remove.
3518 (struct linux_target_ops) <breakpoint_len>: Remove.
3519 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3520 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3521 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3522 (struct linux_target_ops) <breakpoint>: Remove.
3523 (struct linux_target_ops) <breakpoint_len>: Remove.
3524 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3525 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3526 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3527 (struct linux_target_ops) <breakpoint>: Remove.
3528 (struct linux_target_ops) <breakpoint_len>: Remove.
3529 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3530 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3531 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3532 (struct linux_target_ops) <breakpoint>: Remove.
3533 (struct linux_target_ops) <breakpoint_len>: Remove.
3534 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3535 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3536 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3537 (struct linux_target_ops) <breakpoint>: Remove.
3538 (struct linux_target_ops) <breakpoint_len>: Remove.
3539 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3540 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3541 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3542 (struct linux_target_ops) <breakpoint>: Remove.
3543 (struct linux_target_ops) <breakpoint_len>: Remove.
3544 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3545 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3546 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3547 (struct linux_target_ops) <breakpoint>: Remove.
3548 (struct linux_target_ops) <breakpoint_len>: Remove.
3549 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3550 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3551 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3552 * linux-x86-low.c (x86_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-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3558 (struct linux_target_ops) <breakpoint>: Remove.
3559 (struct linux_target_ops) <breakpoint_len>: Remove.
3560 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3561 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3562
4cd98a19
AT
35632015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3564
3565 * linux-cris-low.c (cris_get_pc): Remove void arg.
3566
774ee6d2
AR
35672015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3568
3569 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3570 variable name.
3571
833dcd29
AR
35722015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3573
3574 * inferiors.c (thread_pid_matches_callback): New function.
3575 (find_thread_process): New function.
3576 (remove_thread): Reset current_thread.
3577 (remove_process): Assert threads have been removed first.
3578
8d689ee5
YQ
35792015-10-15 Yao Qi <yao.qi@linaro.org>
3580
3581 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3582 if it is 3.
3583 (aarch64_remove_point): Likewise.
3584 * regcache.c (regcache_register_size): New function.
3585
1c2e1515
YQ
35862015-10-12 Yao Qi <yao.qi@linaro.org>
3587
3588 * linux-aarch64-low.c: Update all callers as emit_load_store
3589 is renamed to aarch64_emit_load_store.
3590
e1c587c3
YQ
35912015-10-12 Yao Qi <yao.qi@linaro.org>
3592
3593 * linux-aarch64-low.c: Update all callers of function renaming
3594 from emit_insn to aarch64_emit_insn.
3595
b6542f81
YQ
35962015-10-12 Yao Qi <yao.qi@linaro.org>
3597
3598 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3599 arch/aarch64-insn.h.
3600 (struct aarch64_memory_operand): Likewise.
3601 (ENCODE): Likewise.
3602 (emit_insn): Move to arch/aarch64-insn.c.
3603 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3604 (emit_load_store): Move to arch/aarch64-insn.c.
3605 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3606 (can_encode_int32): Remove.
3607
246994ce
YQ
36082015-10-12 Yao Qi <yao.qi@linaro.org>
3609
3610 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3611 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3612 (aarch64_relocate_instruction): Likewise.
3613 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3614 (struct aarch64_insn_visitor): Likewise.
3615
0badd99f
YQ
36162015-10-12 Yao Qi <yao.qi@linaro.org>
3617
3618 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3619 (struct aarch64_insn_visitor): New.
3620 (struct aarch64_insn_relocation_data): New.
3621 (aarch64_ftrace_insn_reloc_b): New function.
3622 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3623 (aarch64_ftrace_insn_reloc_cb): Likewise.
3624 (aarch64_ftrace_insn_reloc_tb): Likewise.
3625 (aarch64_ftrace_insn_reloc_adr): Likewise.
3626 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3627 (aarch64_ftrace_insn_reloc_others): Likewise.
3628 (visitor): New.
3629 (aarch64_relocate_instruction): Use visitor.
3630
dfaffe9d
YQ
36312015-10-12 Yao Qi <yao.qi@linaro.org>
3632
3633 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3634 int. Add argument buf.
3635 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3636 aarch64_relocate_instruction.
3637
70b439f0
YQ
36382015-10-12 Yao Qi <yao.qi@linaro.org>
3639
3640 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3641 argument insn. Remove local variable insn. Don't call
3642 target_read_uint32.
3643 (aarch64_install_fast_tracepoint_jump_pad): Call
3644 target_read_uint32.
3645
7781c06f
YQ
36462015-09-30 Yao Qi <yao.qi@linaro.org>
3647
3648 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3649 (emit_load_store_pair): Likewise.
3650
9a3c8263
SM
36512015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3652
3653 * dll.c (match_dll): Add cast(s).
3654 (unloaded_dll): Likewise.
3655 * linux-low.c (second_thread_of_pid_p): Likewise.
3656 (delete_lwp_callback): Likewise.
3657 (count_events_callback): Likewise.
3658 (select_event_lwp_callback): Likewise.
3659 (linux_set_resume_request): Likewise.
3660 * server.c (accumulate_file_name_length): Likewise.
3661 (emit_dll_description): Likewise.
3662 (handle_qxfer_threads_worker): Likewise.
3663 (visit_actioned_threads): Likewise.
3664 * thread-db.c (any_thread_of): Likewise.
3665 * tracepoint.c (same_process_p): Likewise.
3666 (match_blocktype): Likewise.
3667 (build_traceframe_info_xml): Likewise.
3668
224c3ddb
SM
36692015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3670
3671 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3672 assignment.
3673 (gdb_unparse_agent_expr): Likewise.
3674 * hostio.c (require_data): Likewise.
3675 (handle_pread): Likewise.
3676 * linux-low.c (disable_regset): Likewise.
3677 (fetch_register): Likewise.
3678 (store_register): Likewise.
3679 (get_dynamic): Likewise.
3680 (linux_qxfer_libraries_svr4): Likewise.
3681 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3682 (set_fast_tracepoint_jump): Likewise.
3683 (uninsert_fast_tracepoint_jumps_at): Likewise.
3684 (reinsert_fast_tracepoint_jumps_at): Likewise.
3685 (validate_inserted_breakpoint): Likewise.
3686 (clone_agent_expr): Likewise.
3687 * regcache.c (init_register_cache): Likewise.
3688 * remote-utils.c (putpkt_binary_1): Likewise.
3689 (decode_M_packet): Likewise.
3690 (decode_X_packet): Likewise.
3691 (look_up_one_symbol): Likewise.
3692 (relocate_instruction): Likewise.
3693 (monitor_output): Likewise.
3694 * server.c (handle_search_memory): Likewise.
3695 (handle_qxfer_exec_file): Likewise.
3696 (handle_qxfer_libraries): Likewise.
3697 (handle_qxfer): Likewise.
3698 (handle_query): Likewise.
3699 (handle_v_cont): Likewise.
3700 (handle_v_run): Likewise.
3701 (captured_main): Likewise.
3702 * target.c (write_inferior_memory): Likewise.
3703 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3704 * tracepoint.c (init_trace_buffer): Likewise.
3705 (add_tracepoint_action): Likewise.
3706 (add_traceframe): Likewise.
3707 (add_traceframe_block): Likewise.
3708 (cmd_qtdpsrc): Likewise.
3709 (cmd_qtdv): Likewise.
3710 (cmd_qtstatus): Likewise.
3711 (response_source): Likewise.
3712 (response_tsv): Likewise.
3713 (cmd_qtnotes): Likewise.
3714 (gdb_collect): Likewise.
3715 (initialize_tracepoint): Likewise.
3716
afbe19f8
PL
37172015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3718
3719 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3720 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3721 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3722 <NOP>: New.
3723 (enum aarch64_condition_codes): New enum.
3724 (w0): New static global.
3725 (fp): Likewise.
3726 (lr): Likewise.
3727 (struct aarch64_memory_operand) <type>: New
3728 MEMORY_OPERAND_POSTINDEX type.
3729 (postindex_memory_operand): New helper function.
3730 (emit_ret): New function.
3731 (emit_load_store_pair): New function, factored out of emit_stp
3732 with support for MEMORY_OPERAND_POSTINDEX.
3733 (emit_stp): Rewrite using emit_load_store_pair.
3734 (emit_ldp): New function.
3735 (emit_load_store): Likewise.
3736 (emit_ldr): Mention post-index instruction in comment.
3737 (emit_ldrh): New function.
3738 (emit_ldrb): New function.
3739 (emit_ldrsw): Mention post-index instruction in comment.
3740 (emit_str): Likewise.
3741 (emit_subs): New function.
3742 (emit_cmp): Likewise.
3743 (emit_and): Likewise.
3744 (emit_orr): Likewise.
3745 (emit_orn): Likewise.
3746 (emit_eor): Likewise.
3747 (emit_mvn): Likewise.
3748 (emit_lslv): Likewise.
3749 (emit_lsrv): Likewise.
3750 (emit_asrv): Likewise.
3751 (emit_mul): Likewise.
3752 (emit_sbfm): Likewise.
3753 (emit_sbfx): Likewise.
3754 (emit_ubfm): Likewise.
3755 (emit_ubfx): Likewise.
3756 (emit_csinc): Likewise.
3757 (emit_cset): Likewise.
3758 (emit_nop): Likewise.
3759 (emit_ops_insns): New helper function.
3760 (emit_pop): Likewise.
3761 (emit_push): Likewise.
3762 (aarch64_emit_prologue): New function.
3763 (aarch64_emit_epilogue): Likewise.
3764 (aarch64_emit_add): Likewise.
3765 (aarch64_emit_sub): Likewise.
3766 (aarch64_emit_mul): Likewise.
3767 (aarch64_emit_lsh): Likewise.
3768 (aarch64_emit_rsh_signed): Likewise.
3769 (aarch64_emit_rsh_unsigned): Likewise.
3770 (aarch64_emit_ext): Likewise.
3771 (aarch64_emit_log_not): Likewise.
3772 (aarch64_emit_bit_and): Likewise.
3773 (aarch64_emit_bit_or): Likewise.
3774 (aarch64_emit_bit_xor): Likewise.
3775 (aarch64_emit_bit_not): Likewise.
3776 (aarch64_emit_equal): Likewise.
3777 (aarch64_emit_less_signed): Likewise.
3778 (aarch64_emit_less_unsigned): Likewise.
3779 (aarch64_emit_ref): Likewise.
3780 (aarch64_emit_if_goto): Likewise.
3781 (aarch64_emit_goto): Likewise.
3782 (aarch64_write_goto_address): Likewise.
3783 (aarch64_emit_const): Likewise.
3784 (aarch64_emit_call): Likewise.
3785 (aarch64_emit_reg): Likewise.
3786 (aarch64_emit_pop): Likewise.
3787 (aarch64_emit_stack_flush): Likewise.
3788 (aarch64_emit_zero_ext): Likewise.
3789 (aarch64_emit_swap): Likewise.
3790 (aarch64_emit_stack_adjust): Likewise.
3791 (aarch64_emit_int_call_1): Likewise.
3792 (aarch64_emit_void_call_2): Likewise.
3793 (aarch64_emit_eq_goto): Likewise.
3794 (aarch64_emit_ne_goto): Likewise.
3795 (aarch64_emit_lt_goto): Likewise.
3796 (aarch64_emit_le_goto): Likewise.
3797 (aarch64_emit_gt_goto): Likewise.
3798 (aarch64_emit_ge_got): Likewise.
3799 (aarch64_emit_ops_impl): New static global variable.
3800 (aarch64_emit_ops): New target function, return
3801 &aarch64_emit_ops_impl.
3802 (struct linux_target_ops): Install it.
3803
bb903df0
PL
38042015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3805
3806 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3807 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3808 aarch64-ipa.o.
3809 * linux-aarch64-ipa.c: New file.
3810 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3811 and endian.h.
3812 (aarch64_get_thread_area): New target method.
3813 (extract_signed_bitfield): New helper function.
3814 (aarch64_decode_ldr_literal): New function.
3815 (enum aarch64_opcodes): New enum.
3816 (struct aarch64_register): New struct.
3817 (struct aarch64_operand): New struct.
3818 (x0): New static global.
3819 (x1): Likewise.
3820 (x2): Likewise.
3821 (x3): Likewise.
3822 (x4): Likewise.
3823 (w2): Likewise.
3824 (ip0): Likewise.
3825 (sp): Likewise.
3826 (xzr): Likewise.
3827 (aarch64_register): New helper function.
3828 (register_operand): Likewise.
3829 (immediate_operand): Likewise.
3830 (struct aarch64_memory_operand): New struct.
3831 (offset_memory_operand): New helper function.
3832 (preindex_memory_operand): Likewise.
3833 (enum aarch64_system_control_registers): New enum.
3834 (ENCODE): New macro.
3835 (emit_insn): New helper function.
3836 (emit_b): New function.
3837 (emit_bcond): Likewise.
3838 (emit_cb): Likewise.
3839 (emit_tb): Likewise.
3840 (emit_blr): Likewise.
3841 (emit_stp): Likewise.
3842 (emit_ldp_q_offset): Likewise.
3843 (emit_stp_q_offset): Likewise.
3844 (emit_load_store): Likewise.
3845 (emit_ldr): Likewise.
3846 (emit_ldrsw): Likewise.
3847 (emit_str): Likewise.
3848 (emit_ldaxr): Likewise.
3849 (emit_stxr): Likewise.
3850 (emit_stlr): Likewise.
3851 (emit_data_processing_reg): Likewise.
3852 (emit_data_processing): Likewise.
3853 (emit_add): Likewise.
3854 (emit_sub): Likewise.
3855 (emit_mov): Likewise.
3856 (emit_movk): Likewise.
3857 (emit_mov_addr): Likewise.
3858 (emit_mrs): Likewise.
3859 (emit_msr): Likewise.
3860 (emit_sevl): Likewise.
3861 (emit_wfe): Likewise.
3862 (append_insns): Likewise.
3863 (can_encode_int32_in): New helper function.
3864 (aarch64_relocate_instruction): New function.
3865 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3866 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3867 (struct linux_target_ops): Install aarch64_get_thread_area,
3868 aarch64_install_fast_tracepoint_jump_pad and
3869 aarch64_get_min_fast_tracepoint_insn_len.
3870
787749ea
PL
38712015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3872
3873 * Makefile.in (aarch64-insn.o): New rule.
3874 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3875
9812b2e6
YQ
38762015-09-21 Yao Qi <yao.qi@linaro.org>
3877
3878 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3879
18fe412b
YQ
38802015-09-21 Yao Qi <yao.qi@linaro.org>
3881
3882 * tracepoint.c (max_jump_pad_size): Remove.
3883
a0cc84cd
YQ
38842015-09-18 Yao Qi <yao.qi@linaro.org>
3885
3886 * linux-aarch64-low.c: Don't include sys/uio.h.
3887 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3888
d78908cf
WW
38892015-09-16 Wei-cheng Wang <cole945@gmail.com>
3890
3891 * tracepoint.c (eval_result_type): Change prototype.
3892 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3893
d57e0d50
PA
38942015-09-15 Pedro Alves <palves@redhat.com>
3895
3896 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3897 Check whether to report exec events instead of checking whether
3898 multiprocess is enabled.
3899
5a676acc
PA
39002015-09-15 Pedro Alves <palves@redhat.com>
3901
3902 PR remote/18965
3903 * remote-utils.c (prepare_resume_reply): Merge
3904 TARGET_WAITKIND_VFORK_DONE switch case with the
3905 TARGET_WAITKIND_FORKED case.
3906
7c5d0fad
YQ
39072015-09-15 Yao Qi <yao.qi@linaro.org>
3908
3909 * server.c (handle_query): Check string comparison using
3910 "else if" instead of "if".
3911
750ce8d1
YQ
39122015-09-15 Yao Qi <yao.qi@linaro.org>
3913
3914 * server.c (vCont_supported): New global variable.
3915 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3916 matches. Append ";vContSupported+" to own_buf.
3917 (handle_v_requests): Append ";s;S" to own_buf if target supports
3918 hardware single step or vCont_supported is false.
3919 (capture_main): Set vCont_supported to zero.
3920
70b90b91
YQ
39212015-09-15 Yao Qi <yao.qi@linaro.org>
3922
3923 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3924 it to ...
3925 (linux_supports_hardware_single_step): ... New function.
3926 (linux_target_ops): Update.
3927 * lynx-low.c (lynx_target_ops): Set field
3928 supports_hardware_single_step to target_can_do_hardware_single_step.
3929 * nto-low.c (nto_target_ops): Likewise.
3930 * spu-low.c (spu_target_ops): Likewise.
3931 * win32-low.c (win32_target_ops): Likewise.
3932 * target.c (target_can_do_hardware_single_step): New function.
3933 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3934 Remove. <supports_hardware_single_step>: New field.
3935 (target_supports_conditional_breakpoints): Remove.
3936 (target_supports_hardware_single_step): New macro.
3937 (target_can_do_hardware_single_step): Declare.
3938 * server.c (handle_query): Use target_supports_hardware_single_step
3939 instead of target_supports_conditional_breakpoints.
3940
ade90bde
YQ
39412015-09-15 Yao Qi <yao.qi@linaro.org>
3942
3943 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3944 function.
3945 (struct linux_target_ops the_low_target): Install
3946 aarch64_linux_siginfo_fixup.
3947
94585166
DB
39482015-09-11 Don Breazeal <donb@codesourcery.com>
3949 Luis Machado <lgustavo@codesourcery.com>
3950
3951 * linux-low.c (linux_mourn): Static declaration.
3952 (linux_arch_setup): Move in front of
3953 handle_extended_wait.
3954 (linux_arch_setup_thread): New function.
3955 (handle_extended_wait): Handle exec events. Call
3956 linux_arch_setup_thread. Make event_lwp argument a
3957 pointer-to-a-pointer.
3958 (check_zombie_leaders): Do not check stopped threads.
3959 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3960 (linux_low_filter_event): Add lwp and thread for exec'ing
3961 non-leader thread if leader thread has been deleted.
3962 Refactor code into linux_arch_setup_thread and call it.
3963 Pass child lwp pointer by reference to handle_extended_wait.
3964 (linux_wait_for_event_filtered): Update comment.
3965 (linux_wait_1): Prevent clobbering exec event status.
3966 (linux_supports_exec_events): New function.
3967 (linux_target_ops) <supports_exec_events>: Initialize new member.
3968 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3969 new member.
3970 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3971 * server.c (report_exec_events): New global variable.
3972 (handle_query): Handle qSupported query for exec-events feature.
3973 (captured_main): Initialize report_exec_events.
3974 * server.h (report_exec_events): Declare new global variable.
3975 * target.h (struct target_ops) <supports_exec_events>: New
3976 member.
3977 (target_supports_exec_events): New macro.
3978 * win32-low.c (win32_target_ops) <supports_exec_events>:
3979 Initialize new member.
3980
0568462b
MM
39812015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3982
3983 * linux-low.c (linux_low_enable_btrace): Remove.
3984 (linux_target_ops): Replace linux_low_enable_btrace with
3985 linux_enable_btrace.
3986
39edd165
YQ
39872015-09-03 Yao Qi <yao.qi@linaro.org>
3988
3989 * linux-aarch64-low.c (aarch64_insert_point): Call
3990 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3991 returns true.
3992
1db33b5a
UW
39932015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3994
3995 * linux-low.c (check_stopped_by_breakpoint): Use
3996 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3997
ab290430
PA
39982015-08-27 Pedro Alves <palves@redhat.com>
3999
4000 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4001
8d749320
SM
40022015-08-26 Simon Marchi <simon.marchi@ericsson.com>
4003
6711b7f8
SM
4004 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4005 the XNEW-family equivalent.
8d749320
SM
4006 (compile_bytecodes): Likewise.
4007 * dll.c (loaded_dll): Likewise.
4008 * event-loop.c (append_callback_event): Likewise.
4009 (create_file_handler): Likewise.
4010 (create_file_event): Likewise.
4011 * hostio.c (handle_open): Likewise.
4012 * inferiors.c (add_thread): Likewise.
4013 (add_process): Likewise.
4014 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4015 * linux-arm-low.c (arm_new_process): Likewise.
4016 (arm_new_thread): Likewise.
4017 * linux-low.c (add_to_pid_list): Likewise.
4018 (linux_add_process): Likewise.
4019 (handle_extended_wait): Likewise.
4020 (add_lwp): Likewise.
4021 (enqueue_one_deferred_signal): Likewise.
4022 (enqueue_pending_signal): Likewise.
4023 (linux_resume_one_lwp_throw): Likewise.
4024 (linux_resume_one_thread): Likewise.
4025 (linux_read_memory): Likewise.
4026 (linux_write_memory): Likewise.
4027 * linux-mips-low.c (mips_linux_new_process): Likewise.
4028 (mips_linux_new_thread): Likewise.
4029 (mips_add_watchpoint): Likewise.
4030 * linux-x86-low.c (initialize_low_arch): Likewise.
4031 * lynx-low.c (lynx_add_process): Likewise.
4032 * mem-break.c (set_raw_breakpoint_at): Likewise.
4033 (set_breakpoint): Likewise.
4034 (add_condition_to_breakpoint): Likewise.
4035 (add_commands_to_breakpoint): Likewise.
4036 (clone_agent_expr): Likewise.
4037 (clone_one_breakpoint): Likewise.
4038 * regcache.c (new_register_cache): Likewise.
4039 * remote-utils.c (look_up_one_symbol): Likewise.
4040 * server.c (queue_stop_reply): Likewise.
4041 (start_inferior): Likewise.
4042 (queue_stop_reply_callback): Likewise.
4043 (handle_target_event): Likewise.
4044 * spu-low.c (fetch_ppc_memory): Likewise.
4045 (store_ppc_memory): Likewise.
4046 * target.c (set_target_ops): Likewise.
4047 * thread-db.c (thread_db_load_search): Likewise.
4048 (try_thread_db_load_1): Likewise.
4049 * tracepoint.c (add_tracepoint): Likewise.
4050 (add_tracepoint_action): Likewise.
4051 (create_trace_state_variable): Likewise.
4052 (cmd_qtdpsrc): Likewise.
4053 (cmd_qtro): Likewise.
4054 (add_while_stepping_state): Likewise.
4055 * win32-low.c (child_add_thread): Likewise.
4056 (get_image_name): Likewise.
4057
ed8b7b42
YQ
40582015-08-25 Yao Qi <yao.qi@linaro.org>
4059
4060 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4061
db3cb7cb
YQ
40622015-08-25 Yao Qi <yao.qi@linaro.org>
4063
4064 * Makefile.in (aarch64-linux.o): New rule.
4065 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4066 srv_tgtobj.
4067 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4068 (aarch64_init_debug_reg_state): Make it extern.
4069 (aarch64_linux_prepare_to_resume): Remove.
4070
f6011a1c
YQ
40712015-08-25 Yao Qi <yao.qi@linaro.org>
4072
4073 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4074 lwp_arch_private_info and ptid_of_lwp.
4075
88e2cf7e
YQ
40762015-08-25 Yao Qi <yao.qi@linaro.org>
4077
4078 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4079 Find proc_info by find_process_pid. All callers updated.
4080
5e35436e
YQ
40812015-08-25 Yao Qi <yao.qi@linaro.org>
4082
4083 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4084 Remove.
4085 (debug_reg_change_callback): Remove.
4086 (aarch64_notify_debug_reg_change): Remove.
4087
4a8a7965
YQ
40882015-08-25 Yao Qi <yao.qi@linaro.org>
4089
4090 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4091 Call current_lwp_ptid.
4092
32a271ee
YQ
40932015-08-25 Yao Qi <yao.qi@linaro.org>
4094
4095 * linux-aarch64-low.c (debug_reg_change_callback): Use
4096 debug_printf.
4097
0d51c8d7
YQ
40982015-08-25 Yao Qi <yao.qi@linaro.org>
4099
4100 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4101
31a43dd5
YQ
41022015-08-25 Yao Qi <yao.qi@linaro.org>
4103
4104 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4105
8ee52567
YQ
41062015-08-25 Yao Qi <yao.qi@linaro.org>
4107
4108 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4109 the code.
4110
ff3f0f45
YQ
41112015-08-25 Yao Qi <yao.qi@linaro.org>
4112
4113 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4114 Remove.
4115 (debug_reg_change_callback): Remove argument entry and add argument
4116 lwp. Remove local variable thread. Don't print thread id in the
4117 debugging output. Don't check whether pid of thread equals to pid.
4118 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4119 iterate_over_lwps instead find_inferior.
4120
3d40fbb5
PA
41212015-08-24 Pedro Alves <palves@redhat.com>
4122
4123 * inferiors.c (get_first_process): New function.
4124 * inferiors.h (get_first_process): New declaration.
4125 * remote-utils.c (read_ptid): Default to the first process in the
4126 list, instead of to the current thread's process.
4127
438e1e42
PA
41282015-08-24 Pedro Alves <palves@redhat.com>
4129
4130 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4131 * event-loop.c: Likewise.
4132 * remote-utils.c: Likewise.
4133 * tracepoint.c: Likewise.
4134
a8c6d4fc
PA
41352015-08-24 Pedro Alves <palves@redhat.com>
4136
4137 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4138 ptid_get_lwp.
4139
99b0bb12
PA
41402015-08-21 Pedro Alves <palves@redhat.com>
4141
4142 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4143 instead of literal 1.
4144
f8904751
PA
41452015-08-21 Pedro Alves <palves@redhat.com>
4146
4147 * tdesc.c (default_description): Explicitly zero-initialize.
4148
465a859e
PA
41492015-08-21 Pedro Alves <palves@redhat.com>
4150
4151 PR gdb/18749
4152 * inferiors.c (remove_thread): Discard any pending stop reply for
4153 this thread.
4154 * server.c (remove_all_on_match_pid): Rename to ...
4155 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4156 instead of a pid.
4157 (discard_queued_stop_replies): Change parameter to a ptid. Now
4158 extern.
4159 (handle_v_kill, kill_inferior_callback, captured_main)
4160 (process_serial_event): Adjust.
4161 * server.h (discard_queued_stop_replies): Declare.
4162
f0db101d
PA
41632015-08-21 Pedro Alves <palves@redhat.com>
4164
4165 * linux-low.c (wait_for_sigstop): Always switch to no thread
4166 selected if the previously current thread dies.
4167 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4168 process instead of the current thread's.
4169 * remote-utils.c (input_interrupt): Don't check if there's no
4170 current thread.
4171 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4172 current thread to the general thread fails, error out.
4173 (handle_qxfer_auxv, handle_qxfer_libraries)
4174 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4175 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4176 (handle_query): Check if there's a thread selected instead of
4177 checking whether there's any thread in the thread list.
4178 (handle_qxfer_threads, handle_qxfer_btrace)
4179 (handle_qxfer_btrace_conf): Don't error out early if there's no
4180 thread in the thread list.
4181 (handle_v_cont, myresume): Don't set the current thread to the
4182 continue thread.
4183 (process_serial_event) <Hg handling>: Also set thread_id if the
4184 previous general thread is still alive.
4185 (process_serial_event) <g/G handling>: If setting the current
4186 thread to the general thread fails, error out.
4187 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4188 thread's lwp instead of the current thread's.
4189 * target.c (set_desired_thread): If the desired thread was not
4190 found, leave the current thread pointing to NULL. Return an int
4191 (boolean) indicating success.
4192 * target.h (set_desired_thread): Change return type to int.
4193
40045d91
MF
41942015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4195
4196 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4197 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4198 #includes.
4199 (ps_get_thread_area): New function.
4200
45face3b
GB
42012015-08-19 Gary Benson <gbenson@redhat.com>
4202
4203 * hostio.c (handle_pread): Do not attempt to read more data
4204 than hostio_reply_with_data can fit in a packet.
4205
16d5f642
JB
42062015-08-18 Joel Brobecker <brobecker@adacore.com>
4207
4208 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4209
a738da3a
MF
42102015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4211
4212 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4213
33ebda9d
PA
42142015-08-06 Pedro Alves <palves@redhat.com>
4215
4216 * tracepoint.c (expr_eval_result): Now an int.
4217
a44892be
PA
42182015-08-06 Pedro Alves <palves@redhat.com>
4219
4220 * gdbthread.h (struct regcache): Forward declare.
4221 (struct thread_info) <regcache_data>: Now a struct regcache
4222 pointer.
4223 * inferiors.c (inferior_regcache_data)
4224 (set_inferior_regcache_data): Now work with struct regcache
4225 pointers.
4226 * inferiors.h (struct regcache): Forward declare.
4227 (inferior_regcache_data, set_inferior_regcache_data): Now work
4228 with struct regcache pointers.
4229 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4230 (free_register_cache_thread): Remove struct regcache pointer
4231 casts.
4232
608a1e46
PA
42332015-08-06 Pedro Alves <palves@redhat.com>
4234
4235 * server.c (captured_main): On error, print the exception message
4236 to stderr, and if run_once is set, throw a quit.
4237
f0ce0d3a
PA
42382015-08-06 Pedro Alves <palves@redhat.com>
4239
4240 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4241 the current thread.
4242
bf47e248
PA
42432015-08-06 Pedro Alves <palves@redhat.com>
4244
4245 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4246 reading beyond the passed in buffer length.
4247
b6b9ffcc
PL
42482015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4249
4250 * tracepoint.c (symbol_list) <required>: Remove.
4251
863d01bd
PA
42522015-08-06 Pedro Alves <palves@redhat.com>
4253
4254 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4255 count if stopping and suspending threads.
4256 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4257 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4258 (linux_detach): Complete an ongoing step-over.
4259 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4260 throughout.
4261 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4262 (linux_wait_1): If passing a signal to the inferior after
4263 finishing a step-over, unsuspend and re-resume all lwps. If we
4264 see a single-step event but the thread should be continuing, don't
4265 pass the trap to gdb.
4266 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4267 internal_error instead of gdb_assert.
4268 (enqueue_pending_signal): New function.
4269 (check_ptrace_stopped_lwp_gone): Add debug output.
4270 (start_step_over): Use internal_error instead of gdb_assert.
4271 (complete_ongoing_step_over): New function.
4272 (linux_resume_one_thread): Don't resume a suspended thread.
4273 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4274 it stepping.
4275
00db26fa
PA
42762015-08-06 Pedro Alves <palves@redhat.com>
4277
4278 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4279 (linux_thread_alive): Use lwp_is_marked_dead.
4280 (extended_event_reported): Delete.
4281 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4282 instead of extended_event_reported.
4283 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4284 as well.
4285 (lwp_is_marked_dead): New function.
4286 (lwp_running): Use lwp_is_marked_dead.
4287 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4288 comment.
4289
ad071a30
PA
42902015-08-06 Pedro Alves <palves@redhat.com>
4291
4292 * linux-low.c (linux_wait_1): Move fork event output out of the
4293 !report_to_gdb check. Pass event_child->waitstatus to
4294 target_waitstatus_to_string instead of ourstatus.
4295
524b57e6
YQ
42962015-08-04 Yao Qi <yao.qi@linaro.org>
4297
4298 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4299 if current_thread is 32 bit.
4300
6085d6f6
YQ
43012015-08-04 Yao Qi <yao.qi@linaro.org>
4302
4303 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4304 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4305 * server.c (extended_protocol): Remove "static".
4306 * server.h (extended_protocol): Declare it.
4307
8a7e4587
YQ
43082015-08-04 Yao Qi <yao.qi@linaro.org>
4309
4310 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4311 both aarch64 and aarch32.
4312 (aarch64_set_pc): Likewise.
4313
3b53ae99
YQ
43142015-08-04 Yao Qi <yao.qi@linaro.org>
4315
4316 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4317 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4318 arm-with-neon.xml to srv_xmlfiles.
4319 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4320 (is_64bit_tdesc): New function.
4321 (aarch64_linux_read_description): New function.
4322 (aarch64_arch_setup): Call aarch64_linux_read_description.
4323 (regs_info): Rename to regs_info_aarch64.
4324 (aarch64_regs_info): Return right regs_info.
4325 (initialize_low_arch): Call initialize_low_arch_aarch32.
4326
bd9e6534
YQ
43272015-08-04 Yao Qi <yao.qi@linaro.org>
4328
4329 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4330 * linux-aarch32-low.c: New file.
4331 * linux-aarch32-low.h: New file.
4332 * linux-arm-low.c (arm_fill_gregset): Move it to
4333 linux-aarch32-low.c.
4334 (arm_store_gregset): Likewise.
4335 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4336 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4337 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4338 (regs_info): Rename to regs_info_arm.
4339 (arm_regs_info): Return regs_info_aarch32 if
4340 have_ptrace_getregset is 1 and target description is
4341 arm_with_neon or arm_with_vfpv3.
4342 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4343 Call initialize_low_arch_aarch32 instead.
4344
ded48a5e
YQ
43452015-08-04 Yao Qi <yao.qi@linaro.org>
4346
4347 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4348 * linux-low.c: ... here.
4349 * linux-low.h (have_ptrace_getregset): Declare it.
4350
96e9210f
PA
43512015-08-04 Pedro Alves <palves@redhat.com>
4352
4353 * thread-db.c (struct thread_db): Use new typedefs.
4354 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4355 CHK calls.
4356 (disable_thread_event_reporting): Cast result of dlsym to
4357 destination function pointer type.
4358 (thread_db_mourn): Use td_ta_delete_ftype.
4359
af60a1ef
SL
43602015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4361
4362 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4363 arch variant.
4364 (CDX_BREAKPOINT): Define for R2.
4365 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4366 (the_low_target): Add comments.
4367
e8b41681
YQ
43682015-07-30 Yao Qi <yao.qi@linaro.org>
4369
4370 * linux-arm-low.c (arm_hwcap): Remove it.
4371 (arm_read_description): New local variable arm_hwcap. Don't
4372 set arm_hwcap to zero.
4373
89abb039
YQ
43742015-07-30 Yao Qi <yao.qi@linaro.org>
4375
4376 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4377 Use regcache->tdesc instead.
4378 (arm_store_wmmxregset): Likewise.
4379 (arm_fill_vfpregset): Likewise.
4380 (arm_store_vfpregset): Likewise.
4381
deca266c
YQ
43822015-07-30 Yao Qi <yao.qi@linaro.org>
4383
4384 * linux-arm-low.c: Include arch/arm.h.
4385 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4386 (arm_store_gregset): Likewise.
4387
aa58a496
SM
43882015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4389
4390 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4391 ptrace's 4th parameter.
4392
50904b25
YQ
43932015-07-27 Yao Qi <yao.qi@linaro.org>
4394
4395 * configure.srv (case aarch64*-*-linux*): Don't set
4396 srv_linux_usrregs.
4397
5826e159
PA
43982015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4399
4400 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4401 sys/ptrace.h.
4402 * linux-arm-low.c: Likewise.
4403 * linux-cris-low.c: Likewise.
4404 * linux-crisv32-low.c: Likewise.
4405 * linux-low.c: Likewise.
4406 * linux-m68k-low.c: Likewise.
4407 * linux-mips-low.c: Likewise.
4408 * linux-nios2-low.c: Likewise.
4409 * linux-s390-low.c: Likewise.
4410 * linux-sparc-low.c: Likewise.
4411 * linux-tic6x-low.c: Likewise.
4412 * linux-tile-low.c: Likewise.
4413 * linux-x86-low.c: Likewise.
4414
54019719
PA
44152015-07-24 Pedro Alves <palves@redhat.com>
4416
4417 * config.in: Regenerate.
4418 * configure: Regenerate.
4419
eb7aa561
PA
44202015-07-24 Pedro Alves <palves@redhat.com>
4421
4422 * acinclude.m4: Include ../ptrace.m4.
4423 * configure.ac: Call GDB_AC_PTRACE.
4424 * config.in, configure: Regenerate.
4425
55d7b841
YQ
44262015-07-24 Yao Qi <yao.qi@linaro.org>
4427
4428 * linux-low.c (linux_create_inferior): Remove setting to
4429 proc->priv->new_inferior.
4430 (linux_attach): Likewise.
4431 (linux_low_filter_event): Likewise.
4432 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4433
c06cbd92
YQ
44342015-07-24 Yao Qi <yao.qi@linaro.org>
4435
4436 * linux-low.c (linux_arch_setup): New function.
4437 (linux_low_filter_event): If proc->tdesc is NULL and
4438 proc->attached is true, call the_low_target.arch_setup.
4439 Otherwise, keep status pending, and return.
4440 (linux_resume_one_lwp_throw): Don't call get_pc if
4441 thread->while_stepping isn't NULL. Don't call
4442 get_thread_regcache if proc->tdesc is NULL.
4443 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4444 (linux_target_ops): Install arch_setup.
4445 * server.c (start_inferior): Call the_target->arch_setup.
4446 * target.h (struct target_ops) <arch_setup>: New field.
4447 (target_arch_setup): New marco.
4448 * lynx-low.c (lynx_target_ops): Update.
4449 * nto-low.c (nto_target_ops): Update.
4450 * spu-low.c (spu_target_ops): Update.
4451 * win32-low.c (win32_target_ops): Update.
4452
5ae3ebba
YQ
44532015-07-24 Yao Qi <yao.qi@linaro.org>
4454
4455 * linux-low.c (linux_add_process): Don't set
4456 proc->priv->new_inferior.
4457 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4458 (linux_attach): Likewise.
4459
eb97750b
YQ
44602015-07-24 Yao Qi <yao.qi@linaro.org>
4461
4462 * server.c (start_inferior): Code refactor.
4463
51aee833
YQ
44642015-07-24 Yao Qi <yao.qi@linaro.org>
4465
4466 * server.c (process_serial_event): Set general_thread.
4467
af1b22f3
YQ
44682015-07-21 Yao Qi <yao.qi@linaro.org>
4469
4470 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4471 aarch64_linux_get_debug_reg_capacity.
4472
554717a3
YQ
44732015-07-17 Yao Qi <yao.qi@linaro.org>
4474
4475 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4476 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4477 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4478 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4479 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4480 (AARCH64_HWP_ALIGNMENT): Likewise.
4481 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4482 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4483 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4484 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4485 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4486 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4487 (struct aarch64_debug_reg_state): Likewise.
4488 (struct arch_lwp_info): Likewise.
4489 (aarch64_align_watchpoint): Likewise.
4490 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4491 (aarch64_watchpoint_length): Likewise.
4492 (aarch64_point_encode_ctrl_reg): Likewise
4493 (aarch64_point_is_aligned): Likewise.
4494 (aarch64_align_watchpoint): Likewise.
4495 (aarch64_linux_set_debug_regs):
4496 (aarch64_dr_state_insert_one_point): Likewise.
4497 (aarch64_dr_state_remove_one_point): Likewise.
4498 (aarch64_handle_breakpoint): Likewise.
4499 (aarch64_handle_aligned_watchpoint): Likewise.
4500 (aarch64_handle_unaligned_watchpoint): Likewise.
4501 (aarch64_handle_watchpoint): Likewise.
4502
c67ca4de
YQ
45032015-07-17 Yao Qi <yao.qi@linaro.org>
4504
4505 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4506 and don't aarch64_get_debug_reg_state. All callers update.
4507 (aarch64_handle_aligned_watchpoint): Likewise.
4508 (aarch64_handle_unaligned_watchpoint): Likewise.
4509 (aarch64_handle_watchpoint): Likewise.
4510 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4511 (aarch64_remove_point): Likewise.
4512
25abf979
YQ
45132015-07-17 Yao Qi <yao.qi@linaro.org>
4514
4515 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4516 debug_printf.
4517 (aarch64_handle_unaligned_watchpoint): Likewise.
4518
db1ff28b
JK
45192015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4520
4521 Revert the previous 3 commits:
4522 Move gdb_regex* to common/
4523 Move linux_find_memory_regions_full & co.
4524 gdbserver build-id attribute generator
4525
700ca40f
JK
45262015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4527 Jan Kratochvil <jan.kratochvil@redhat.com>
4528
4529 gdbserver build-id attribute generator.
4530 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4531 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4532 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4533 (find_phdr): New.
4534 (get_dynamic): Use find_pdhr to traverse program headers.
4535 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4536 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4537 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4538 (get_hex_build_id): New.
4539 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4540 to reply XML document.
4541
9904185c
JK
45422015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4543 Jan Kratochvil <jan.kratochvil@redhat.com>
4544
4545 * target.c: Include target/target-utils.h and fcntl.h.
4546 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4547 (target_fileio_read_stralloc): New functions.
4548
6e5b4429
JK
45492015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4550
4551 * Makefile.in (OBS): Add gdb_regex.o.
4552 (gdb_regex.o): New.
4553 * config.in: Rebuilt.
4554 * configure: Rebuilt.
4555
ddc98fbf
JK
45562015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4557 Jan Kratochvil <jan.kratochvil@redhat.com>
4558
4559 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4560 * Makefile.in (OBS): Add target-utils.o.
4561 (linux-maps.o, target-utils.o): New.
4562 * configure.srv (srv_linux_obj): Add linux-maps.o.
4563
e57bb7a0
PL
45642015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4565
4566 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4567 function, return 1.
4568 (the_low_target): Install it.
4569
586b02a9
PA
45702015-07-14 Pedro Alves <palves@redhat.com>
4571
4572 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4573 Instead, ignore ECHILD, and throw an error for other errnos.
4574
58c1b36c
PA
45752015-07-10 Pedro Alves <palves@redhat.com>
4576
4577 * event-loop.c (struct callback_event) <data>: Change type to
4578 gdb_client_data instance instead of gdb_client_data pointer.
4579 (append_callback_event): Adjust.
4580
421530db
PL
45812015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4582
4583 * linux-aarch64-low.c: Add comments for each linux_target_ops
4584 method. Remove comments already covered in target_ops and
4585 linux_target_ops definitions.
4586 (the_low_target): Add comments for each unimplemented method.
4587
c2d65f38
YQ
45882015-07-09 Yao Qi <yao.qi@linaro.org>
4589
4590 * linux-aarch64-low.c (aarch64_regmap): Remove.
4591 (aarch64_usrregs_info): Remove.
4592 (regs_info): Set field usrregs to NULL.
4593
b20a6524
MM
45942015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4595
4596 * linux-low.c: Include "rsp-low.h"
4597 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4598 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4599 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4600 (handle_btrace_enable_pt): New.
4601 (handle_btrace_general_set): Support "pt".
4602 (handle_btrace_conf_general_set): Support "pt:size".
4603
96c97461
PL
46042015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4605
4606 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4607 Z_PACKET_SW_BP.
4608
37d66942
PL
46092015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4610
4611 * linux-aarch64-low.c: Remove comment about endianness.
4612 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4613 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4614 memcmp.
4615
dc06243f
GB
46162015-06-24 Gary Benson <gbenson@redhat.com>
4617
4618 * linux-i386-ipa.c (stdint.h): Do not include.
4619 * lynx-i386-low.c (stdint.h): Likewise.
4620 * lynx-ppc-low.c (stdint.h): Likewise.
4621 * mem-break.c (stdint.h): Likewise.
4622 * thread-db.c (stdint.h): Likewise.
4623 * tracepoint.c (stdint.h): Likewise.
4624 * win32-low.c (stdint.h): Likewise.
4625
124e13d9
SM
46262015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4627
4628 * server.c (write_qxfer_response): Update call to
4629 remote_escape_output.
4630
909c2cda
JK
46312015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4632 Jan Kratochvil <jan.kratochvil@redhat.com>
4633
4634 Merge multiple hex conversions.
4635 * gdbreplay.c (tohex): Rename to 'fromhex'.
4636 (logchar): Use fromhex.
4637
24c05f46
JK
46382015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4639
4640 * server.c (handle_qxfer_libraries): Set `version' attribute for
4641 <library-list>.
4642
14d2069a
GB
46432015-06-10 Gary Benson <gbenson@redhat.com>
4644
4645 * target.h (struct target_ops) <multifs_open>: New field.
4646 <multifs_unlink>: Likewise.
4647 <multifs_readlink>: Likewise.
4648 * linux-low.c (nat/linux-namespaces.h): New include.
4649 (linux_target_ops): Initialize the_target->multifs_open,
4650 the_target->multifs_unlink and the_target->multifs_readlink.
4651 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4652 * hostio.c (hostio_fs_pid): New static variable.
4653 (hostio_handle_new_gdb_connection): New function.
4654 (handle_setfs): Likewise.
4655 (handle_open): Use the_target->multifs_open as appropriate.
4656 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4657 (handle_readlink): Use the_target->multifs_readlink as
4658 appropriate.
4659 (handle_vFile): Handle vFile:setfs packets.
4660 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4661 after target_handle_new_gdb_connection.
4662
4b8b5e72
GB
46632015-06-10 Gary Benson <gbenson@redhat.com>
4664
4665 * configure.ac (AC_CHECK_FUNCS): Add setns.
4666 * config.in: Regenerate.
4667 * configure: Likewise.
4668 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4669 (linux-namespaces.o): New rule.
4670 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4671
3ac2e371
GB
46722015-06-09 Gary Benson <gbenson@redhat.com>
4673
4674 * hostio.c (handle_open): Process mode argument with
4675 fileio_to_host_mode.
4676
ca9b78ce
YQ
46772015-06-01 Yao Qi <yao.qi@linaro.org>
4678
4679 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4680 * linux-x86-low.c: Likewise.
4681
bfacd19d
DB
46822015-05-28 Don Breazeal <donb@codesourcery.com>
4683
4684 * linux-low.c (handle_extended_wait): Initialize
4685 thread_info.last_resume_kind for new fork children.
4686
452003ef
PA
46872015-05-15 Pedro Alves <palves@redhat.com>
4688
4689 * target.h (target_handle_new_gdb_connection): Rewrite using if
4690 wrapped in do/while.
4691
1041a03c
JB
46922015-05-14 Joel Brobecker <brobecker@adacore.com>
4693
4694 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4695 * configure, config.in: Regenerate.
4696 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4697 Declare typedef.
4698
c269dbdb
DB
46992015-05-12 Don Breazeal <donb@codesourcery.com>
4700
4701 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4702 PTRACE_EVENT_VFORK_DONE.
4703 (linux_low_ptrace_options, extended_event_reported): Add vfork
4704 events.
4705 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4706 and "vforkdone" for RSP 'T' Stop Reply Packet.
4707 * server.h (report_vfork_events): Declare
4708 global variable.
4709
3a8a0396
DB
47102015-05-12 Don Breazeal <donb@codesourcery.com>
4711
4712 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4713 (the_low_target) <new_fork>: Initialize new member.
4714 * linux-arm-low.c (arm_new_fork): New function.
4715 (the_low_target) <new_fork>: Initialize new member.
4716 * linux-low.c (handle_extended_wait): Call new target function
4717 new_fork.
4718 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4719 * linux-mips-low.c (mips_add_watchpoint): New function
4720 extracted from mips_insert_point.
4721 (the_low_target) <new_fork>: Initialize new member.
4722 (mips_linux_new_fork): New function.
4723 (mips_insert_point): Call mips_add_watchpoint.
4724 * linux-x86-low.c (x86_linux_new_fork): New function.
4725 (the_low_target) <new_fork>: Initialize new member.
4726
de0d863e
DB
47272015-05-12 Don Breazeal <donb@codesourcery.com>
4728
4729 * linux-low.c (handle_extended_wait): Implement return value,
4730 rename argument 'event_child' to 'event_lwp', handle
4731 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4732 (linux_low_ptrace_options): New function.
4733 (linux_low_filter_event): Call linux_low_ptrace_options,
4734 use different argument fo linux_enable_event_reporting,
4735 use return value from handle_extended_wait.
4736 (extended_event_reported): New function.
4737 (linux_wait_1): Call extended_event_reported and set
4738 status to report fork events.
4739 (linux_write_memory): Add pid to debug message.
4740 (reset_lwp_ptrace_options_callback): New function.
4741 (linux_handle_new_gdb_connection): New function.
4742 (linux_target_ops): Initialize new structure member.
4743 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4744 * lynx-low.c: Initialize new structure member.
4745 * remote-utils.c (prepare_resume_reply): Implement stop reason
4746 "fork" for "T" stop message.
4747 * server.c (handle_query): Call handle_new_gdb_connection.
4748 * server.h (report_fork_events): Declare global flag.
4749 * target.h (struct target_ops) <handle_new_gdb_connection>:
4750 New member.
4751 (target_handle_new_gdb_connection): New macro.
4752 * win32-low.c: Initialize new structure member.
4753
ddcbc397
DB
47542015-05-12 Don Breazeal <donb@codesourcery.com>
4755
4756 * mem-break.c (APPEND_TO_LIST): Define macro.
4757 (clone_agent_expr): New function.
4758 (clone_one_breakpoint): New function.
4759 (clone_all_breakpoints): New function.
4760 * mem-break.h: Declare new functions.
4761
89245bc0
DB
47622015-05-12 Don Breazeal <donb@codesourcery.com>
4763
4764 * linux-low.c (linux_supports_fork_events): New function.
4765 (linux_supports_vfork_events): New function.
4766 (linux_target_ops): Initialize new structure members.
4767 (initialize_low): Call linux_check_ptrace_features.
4768 * lynx-low.c (lynx_target_ops): Initialize new structure
4769 members.
4770 * server.c (report_fork_events, report_vfork_events):
4771 New global flags.
4772 (handle_query): Add new features to qSupported packet and
4773 response.
4774 (captured_main): Initialize new global variables.
4775 * target.h (struct target_ops) <supports_fork_events>:
4776 New member.
4777 <supports_vfork_events>: New member.
4778 (target_supports_fork_events): New macro.
4779 (target_supports_vfork_events): New macro.
4780 * win32-low.c (win32_target_ops): Initialize new structure
4781 members.
4782
835205d0
GB
47832015-05-12 Gary Benson <gbenson@redhat.com>
4784
4785 * server.c (handle_qxfer_exec_file): Use current process
4786 if annex is empty.
4787
21e94bd9
SL
47882015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4789
4790 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4791 Remove HAVE_PTRACE_GETREGS conditionals.
4792 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4793 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4794
45614f15
YQ
47952015-05-08 Yao Qi <yao.qi@linaro.org>
4796
4797 * linux-low.c (linux_supports_conditional_breakpoints): New
4798 function.
4799 (linux_target_ops): Install new target method.
4800 * lynx-low.c (lynx_target_ops): Install NULL hook for
4801 supports_conditional_breakpoints.
4802 * nto-low.c (nto_target_ops): Likewise.
4803 * spu-low.c (spu_target_ops): Likewise.
4804 * win32-low.c (win32_target_ops): Likewise.
4805 * server.c (handle_query): Check
4806 target_supports_conditional_breakpoints.
4807 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4808 New field.
4809 (target_supports_conditional_breakpoints): New macro.
4810
80ad801e
PA
48112015-05-06 Pedro Alves <palves@redhat.com>
4812
4813 PR server/18081
4814 * server.c (start_inferior): If the process exits, mourn it.
4815
819843c7
GB
48162015-04-21 Gary Benson <gbenson@redhat.com>
4817
4818 * hostio.c (fileio_open_flags_to_host): Factored out to
4819 fileio_to_host_openflags in common/fileio.c. Single use
4820 updated.
4821
a2d5a9d7
MF
48222015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4823
4824 * linux-xtensa-low.c (xtensa_fill_gregset)
4825 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4826 XCHAL_HAVE_LOOP.
4827
deb44829
MF
48282015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4829
4830 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4831 (regs_info): Replace usrregs pointer with NULL.
4832
e57f1de3
GB
48332015-04-17 Gary Benson <gbenson@redhat.com>
4834
4835 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4836 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4837 * server.c (handle_qxfer_exec_file): New function.
4838 (qxfer_packets): Add exec-file entry.
4839 (handle_query): Report qXfer:exec-file:read as supported packet.
4840
62828379
RN
48412015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4842
4843 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4844
b88bb450
GB
48452015-04-09 Gary Benson <gbenson@redhat.com>
4846
4847 * hostio-errno.c (errno_to_fileio_error): Remove function.
4848 Update caller to use remote_fileio_to_fio_error.
4849
c8f4bfdd
YQ
48502015-04-09 Yao Qi <yao.qi@linaro.org>
4851
4852 * linux-low.c (linux_insert_point): Call
4853 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4854 (linux_remove_point): Call remove_memory_breakpoint if type is
4855 raw_bkpt_type_sw.
4856 * linux-x86-low.c (x86_insert_point): Don't call
4857 insert_memory_breakpoint.
4858 (x86_remove_point): Don't call remove_memory_breakpoint.
4859
41f98f02
PA
48602015-04-01 Pedro Alves <palves@redhat.com>
4861 Cleber Rosa <crosa@redhat.com>
4862
4863 * server.c (gdbserver_usage): Reorganize and extend the usage
4864 message.
4865
2bf6fb9d
PA
48662015-03-24 Pedro Alves <palves@redhat.com>
4867
4868 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4869 output. Also dump TRAP_TRACE.
4870 (linux_low_filter_event): In debug output, distinguish a
4871 resume_stop SIGSTOP from a delayed SIGSTOP.
4872
369f6daa
GB
48732015-03-24 Gary Benson <gbenson@redhat.com>
4874
4875 * linux-x86-low.c (x86_linux_new_thread): Moved to
4876 nat/x86-linux.c.
4877 (x86_linux_prepare_to_resume): Likewise.
4878
8e5d4070
GB
48792015-03-24 Gary Benson <gbenson@redhat.com>
4880
4881 * Makefile.in (x86-linux-dregs.o): New rule.
4882 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4883 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4884 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4885 (x86_linux_dr_get): Likewise.
4886 (x86_linux_dr_set): Likewise.
4887 (update_debug_registers_callback): Likewise.
4888 (x86_linux_dr_set_addr): Likewise.
4889 (x86_linux_dr_get_addr): Likewise.
4890 (x86_linux_dr_set_control): Likewise.
4891 (x86_linux_dr_get_control): Likewise.
4892 (x86_linux_dr_get_status): Likewise.
4893 (x86_linux_update_debug_registers): Likewise.
4894
2b95d440
GB
48952015-03-24 Gary Benson <gbenson@redhat.com>
4896
4897 * linux-x86-low.c (x86_linux_update_debug_registers):
4898 New function, factored out from...
4899 (x86_linux_prepare_to_resume): ...this.
4900
14b0bc68
GB
49012015-03-24 Gary Benson <gbenson@redhat.com>
4902
4903 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4904 (x86_linux_dr_set): Likewise.
4905 (update_debug_registers_callback): Likewise.
4906 (x86_linux_dr_set_addr): Likewise.
4907 (x86_linux_dr_get_addr): Likewise.
4908 (x86_linux_dr_set_control): Likewise.
4909 (x86_linux_dr_get_control): Likewise.
4910 (x86_linux_dr_get_status): Likewise.
4911 (x86_linux_prepare_to_resume): Likewise.
4912
5dfe6ca8
GB
49132015-03-24 Gary Benson <gbenson@redhat.com>
4914
4915 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4916 Use perror_with_name. Pass string through gettext.
4917 (x86_linux_dr_set): Likewise.
4918
d33472ad
GB
49192015-03-24 Gary Benson <gbenson@redhat.com>
4920
4921 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4922 (x86_linux_dr_set_addr): ...this.
4923 (x86_dr_low_get_addr): Rename to...
4924 (x86_linux_dr_get_addr): ...this.
4925 (x86_dr_low_set_control): Rename to...
4926 (x86_linux_dr_set_control): ...this.
4927 (x86_dr_low_get_control): Rename to...
4928 (x86_linux_dr_get_control): ...this.
4929 (x86_dr_low_get_status): Rename to...
4930 (x86_linux_dr_get_status): ...this.
4931 (x86_dr_low): Update with new function names.
4932
4b134ca1
GB
49332015-03-24 Gary Benson <gbenson@redhat.com>
4934
4935 * Makefile.in (x86-linux.o): New rule.
4936 * configure.srv: Add x86-linux.o to relevant targets.
4937 * linux-low.c (lwp_set_arch_private_info): New function.
4938 (lwp_arch_private_info): Likewise.
4939 * linux-x86-low.c: Include nat/x86-linux.h.
4940 (arch_lwp_info): Removed structure.
4941 (update_debug_registers_callback):
4942 Use lwp_set_debug_registers_changed.
4943 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4944 and lwp_set_debug_registers_changed.
4945 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4946
34c703da
GB
49472015-03-24 Gary Benson <gbenson@redhat.com>
4948
4949 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4950 * linux-arm-low.c (arm_new_thread): Likewise.
4951 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4952 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4953 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4954 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4955
cff068da
GB
49562015-03-24 Gary Benson <gbenson@redhat.com>
4957
4958 * linux-low.c (ptid_of_lwp): New function.
4959 (lwp_is_stopped): Likewise.
4960 (lwp_stop_reason): Likewise.
4961 * linux-x86-low.c (update_debug_registers_callback):
4962 Use lwp_is_stopped.
4963 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4964 lwp_stop_reason.
4965
b2f7c7e8
GB
49662015-03-24 Gary Benson <gbenson@redhat.com>
4967
4968 * linux-low.h (linux_stop_lwp): Remove declaration.
4969
6d4ee8c6
GB
49702015-03-24 Gary Benson <gbenson@redhat.com>
4971
4972 * linux-low.h: Include nat/linux-nat.h.
4973 * linux-low.c (iterate_over_lwps_args): New structure.
4974 (iterate_over_lwps_filter): New function.
4975 (iterate_over_lwps): Likewise.
4976 * linux-x86-low.c (update_debug_registers_callback):
4977 Update signature to what iterate_over_lwps expects.
4978 Remove PID check that iterate_over_lwps now performs.
4979 (x86_dr_low_set_addr): Use iterate_over_lwps.
4980 (x86_dr_low_set_control): Likewise.
4981
70a0bb6b
GB
49822015-03-24 Gary Benson <gbenson@redhat.com>
4983
4984 * linux-x86-low.c (x86_debug_reg_state): New function.
4985 (x86_linux_prepare_to_resume): Use the above.
4986
7b669087
GB
49872015-03-24 Gary Benson <gbenson@redhat.com>
4988
4989 * linux-low.c (current_lwp_ptid): New function.
4990 * linux-x86-low.c: Include nat/linux-nat.h.
4991 (x86_dr_low_get_addr): Use current_lwp_ptid.
4992 (x86_dr_low_get_control): Likewise.
4993 (x86_dr_low_get_status): Likewise.
4994
eef49a3d
PA
49952015-03-20 Pedro Alves <palves@redhat.com>
4996
4997 * tracepoint.c (cmd_qtstatus): Make "str" const.
4998
b2333d22
PA
49992015-03-20 Pedro Alves <palves@redhat.com>
5000
5001 * server.c (handle_general_set): Make "req_str" const.
5002
23f238d3
PA
50032015-03-19 Pedro Alves <palves@redhat.com>
5004
5005 * linux-low.c (linux_resume_one_lwp): Rename to ...
5006 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
5007 instead call perror_with_name.
5008 (check_ptrace_stopped_lwp_gone): New function.
5009 (linux_resume_one_lwp): Reimplement as wrapper around
5010 linux_resume_one_lwp_throw that swallows errors if the LWP is
5011 gone.
5012
91baf43f
PA
50132015-03-19 Pedro Alves <palves@redhat.com>
5014
5015 * linux-low.c (count_events_callback, select_event_lwp_callback):
5016 No longer check whether the thread has resume_stop as last resume
5017 kind.
5018
8bf3b159
PA
50192015-03-19 Pedro Alves <palves@redhat.com>
5020
5021 * linux-low.c (count_events_callback, select_event_lwp_callback):
5022 Use the lwp's status_pending_p field, not the thread's.
5023
b90fc188
PA
50242015-03-19 Pedro Alves <palves@redhat.com>
5025
5026 * linux-low.c (select_event_lwp_callback): Update comments to
5027 no longer mention SIGTRAP.
5028
464b0089
GB
50292015-03-18 Gary Benson <gbenson@redhat.com>
5030
5031 * server.c (handle_query): Do not report vFile:fstat as supported.
5032
aa9e327f
GB
50332015-03-11 Gary Benson <gbenson@redhat.com>
5034
5035 * hostio.c (sys/types.h): New include.
5036 (sys/stat.h): Likewise.
5037 (common-remote-fileio.h): Likewise.
5038 (handle_fstat): New function.
5039 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 5040
791c0056
GB
50412015-03-11 Gary Benson <gbenson@redhat.com>
5042
5043 * configure.ac (AC_CHECK_MEMBERS): Add checks for
5044 struct stat.st_blocks and struct stat.st_blksize.
5045 * configure: Regenerate.
5046 * config.in: Likewise.
5047 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5048 (OBS): Add common-remote-fileio.o.
5049 (common-remote-fileio.o): New rule.
5050
9a9df970
PA
50512015-03-09 Pedro Alves <palves@redhat.com>
5052
5053 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5054 'struct sockaddr' pointer in 'accept' call.
5055
9eb1356e
PA
50562015-03-09 Pedro Alves <palves@redhat.com>
5057
5058 Revert:
5059 2015-03-07 Pedro Alves <palves@redhat.com>
5060 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5061 or <winsock2.h> here. Instead include "gdb_socket.h".
5062 (remote_open): Use union gdb_sockaddr_u.
5063 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5064 or <winsock2.h> here. Instead include "gdb_socket.h".
5065 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5066 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5067 or <sys/un.h>.
5068 (init_named_socket, gdb_agent_helper_thread): Use union
5069 gdb_sockaddr_u.
5070
aac331e4
PA
50712015-03-07 Pedro Alves <palves@redhat.com>
5072
5073 * configure.ac (build_warnings): Move
5074 -Wdeclaration-after-statement to the C-specific set.
5075 * configure: Regenerate.
5076
366c75fc
PA
50772015-03-07 Pedro Alves <palves@redhat.com>
5078
5079 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5080 or <winsock2.h> here. Instead include "gdb_socket.h".
5081 (remote_open): Use union gdb_sockaddr_u.
5082 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5083 or <winsock2.h> here. Instead include "gdb_socket.h".
5084 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5085 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5086 or <sys/un.h>.
5087 (init_named_socket, gdb_agent_helper_thread): Use union
5088 gdb_sockaddr_u.
5089
492d29ea
PA
50902015-03-07 Pedro Alves <palves@redhat.com>
5091
5092 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5093 instead.
5094
60a191ed
YQ
50952015-03-06 Yao Qi <yao.qi@linaro.org>
5096
5097 * linux-aarch64-low.c (aarch64_insert_point): Use
5098 show_debug_regs as a boolean.
5099 (aarch64_remove_point): Likewise.
5100
f5771b1d
PA
51012015-03-05 Pedro Alves <palves@redhat.com>
5102
5103 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5104 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5105 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5106 * nto-low.c (nto_target_ops): Likewise.
5107 * spu-low.c (spu_target_ops): Likewise.
5108 * win32-low.c (win32_target_ops): Likewise.
5109
3e572f71
PA
51102015-03-04 Pedro Alves <palves@redhat.com>
5111
72f4393d 5112 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5113 Decide whether a breakpoint triggered based on the SIGTRAP's
5114 siginfo.si_code.
72f4393d
L
5115 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5116 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5117 (linux_low_filter_event): Check for breakpoints before checking
5118 watchpoints.
5119 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5120 siginfo.si_code.
72f4393d
L
5121 (linux_stopped_by_sw_breakpoint)
5122 (linux_supports_stopped_by_sw_breakpoint)
5123 (linux_stopped_by_hw_breakpoint)
5124 (linux_supports_stopped_by_hw_breakpoint): New functions.
5125 (linux_target_ops): Install new target methods.
3e572f71 5126
1ec68e26
PA
51272015-03-04 Pedro Alves <palves@redhat.com>
5128
5129 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5130 * server.c (swbreak_feature, hwbreak_feature): New globals.
5131 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5132 (captured_main): Clear swbreak_feature and hwbreak_feature.
5133 * server.h (swbreak_feature, hwbreak_feature): Declare.
5134 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5135 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5136 supports_stopped_by_hw_breakpoint>: New fields.
5137 (target_supports_stopped_by_sw_breakpoint)
5138 (target_stopped_by_sw_breakpoint)
5139 (target_supports_stopped_by_hw_breakpoint)
5140 (target_stopped_by_hw_breakpoint): Declare.
5141
15c66dd6
PA
51422015-03-04 Pedro Alves <palves@redhat.com>
5143
5144 enum lwp_stop_reason -> enum target_stop_reason
5145 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5146 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5147 (linux_wait_1, stuck_in_jump_pad_callback)
5148 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5149 (linux_stopped_by_watchpoint):
5150 * linux-low.h (enum lwp_stop_reason): Delete.
5151 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5152 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5153
98fc70d6
YQ
51542015-03-04 Yao Qi <yao.qi@linaro.org>
5155
5156 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5157
dd2ac174
GB
51582015-03-03 Gary Benson <gbenson@redhat.com>
5159
5160 * hostio.c (handle_vFile): Fix prefix lengths.
5161
d68e53f4
MM
51622015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5163
5164 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5165 ptr_bits.
5166
bf2d68ab
AA
51672015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5168
5169 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5170 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5171 (clean): Add "rm -f" for above C files.
5172 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5173 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5174 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5175 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5176 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5177 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5178 (init_registers_s390x_vx_linux64)
5179 (init_registers_s390x_tevx_linux64)
5180 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5181 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5182 declarations.
5183 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5184 (s390_store_vxrs_high): New functions.
5185 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5186 NT_S390_VXRS_HIGH.
5187 (s390_arch_setup): Add logic for selecting one of the new target
5188 descriptions. Activate the new vector regsets if applicable.
5189 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5190 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5191 and init_registers_s390x_tevx_linux64.
5192
c966a859
PA
51932015-03-01 Pedro Alves <palves@redhat.com>
5194
5195 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5196 parameter.
5197
4180215b
PA
51982015-02-27 Pedro Alves <palves@redhat.com>
5199
5200 * linux-x86-low.c (u_debugreg_offset): New function.
5201 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5202
749bab01
PA
52032015-02-27 Pedro Alves <palves@redhat.com>
5204
5205 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5206 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5207 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5208 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5209 (ps_lsetfpregs, ps_getpid)
5210 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5211 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5212 (ps_lsetxregs, ps_plog): Declare.
5213
3c14e5a3
PA
52142015-02-27 Pedro Alves <palves@redhat.com>
5215
5216 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5217 IP_AGENT_EXPORT_FUNC.
5218 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5219 IP_AGENT_EXPORT_FUNC.
5220 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5221 (IP_AGENT_EXPORT): Delete.
5222 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5223 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5224 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5225 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5226 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5227 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5228 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5229 (traceframe_read_count, traceframe_write_count)
5230 (traceframes_created, trace_state_variables, get_raw_reg)
5231 (get_trace_state_variable_value, set_trace_state_variable_value)
5232 (ust_loaded, helper_thread_id, cmd_buf): Use
5233 IPA_SYM_EXPORTED_NAME.
5234 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5235 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5236 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5237 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5238 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5239 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5240 EXTERN_C_PUSH/EXTERN_C_POP.
5241 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5242 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5243 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5244 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5245 (traceframe_write_count, traceframe_read_count)
5246 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5247 (about_to_request_buffer_space, get_trace_state_variable_value)
5248 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5249 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5250 EXTERN_C_PUSH/EXTERN_C_POP.
5251 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5252 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5253 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5254 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5255 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5256 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5257 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5258 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5259 Define.
5260 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5261 (IP_AGENT_EXPORT_VAR_DECL): Define.
5262 (tracing): Declare.
5263 (gdb_agent_get_raw_reg): Declare.
5264
fe978cb0
PA
52652015-02-27 Tom Tromey <tromey@redhat.com>
5266 Pedro Alves <palves@redhat.com>
5267
5268 Rename symbols whose names are reserved C++ keywords throughout.
5269
3bc3d82a
PA
52702015-02-27 Pedro Alves <palves@redhat.com>
5271
5272 * Makefile.in (COMPILER): New, get it from autoconf.
5273 (CXX): Get from autoconf instead.
5274 (COMPILE.pre): Use COMPILER.
5275 (CC-LD): Rename to ...
5276 (CC_LD): ... this. Use COMPILER.
5277 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5278 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5279 * acinclude.m4: Include build-with-cxx.m4.
5280 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5281 Disable -Werror by default if building in C++ mode.
5282 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5283 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5284 the C++ compiler. Save/restore CXXFLAGS too.
5285 * configure: Regenerate.
5286
07697489
PA
52872015-02-27 Pedro Alves <palves@redhat.com>
5288
5289 * acinclude.m4: Include libiberty.m4.
5290 * configure.ac: Call libiberty_INIT.
5291 * config.in, configure: Regenerate.
5292
9beb7c4e
PA
52932015-02-26 Pedro Alves <palves@redhat.com>
5294
5295 * linux-low.c (linux_wait_1): When incrementing the PC past a
5296 program breakpoint always use the_low_target.breakpoint_len as
5297 increment, rather than the maximum between that and
5298 the_low_target.decr_pc_after_break.
5299
8090aef2
PA
53002015-02-23 Pedro Alves <palves@redhat.com>
5301
5302 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5303 thread was doing a step-over; always adjust the PC if
5304 we stepped over a permanent breakpoint.
5305 (linux_wait_1): If we stepped over breakpoint that was on top of a
5306 permanent breakpoint, manually advance the PC past it.
5307
bc9540e8
PA
53082015-02-23 Pedro Alves <palves@redhat.com>
5309
5310 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5311 modes.
5312 (x86_fill_gregset, x86_store_gregset): Use it when handling
5313 $orig_eax.
5314
2db9a427
PA
53152015-02-20 Pedro Alves <palves@redhat.com>
5316
5317 * thread-db.c: Include "nat/linux-procfs.h".
5318 (thread_db_init): Skip listing new threads if the kernel supports
5319 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5320
afa8d396
PA
53212015-02-20 Pedro Alves <palves@redhat.com>
5322
5323 * linux-low.c (status_pending_p_callback): Use ptid_match.
5324
c9587f88
AT
53252015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5326
5327 PR breakpoints/16812
5328 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5329 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5330 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5331
b05ec7a5
AT
53322015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5333
5334 PR breakpoints/15956
5335 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5336
d33501a5
MM
53372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5338
5339 * linux-low.c (linux_low_btrace_conf): Print size.
5340 * server.c (handle_btrace_conf_general_set): New.
5341 (hanle_general_set): Call handle_btrace_conf_general_set.
5342 (handle_query): Report Qbtrace-conf:bts:size as supported.
5343
f4abbc16
MM
53442015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5345
5346 * linux-low.c (linux_low_enable_btrace): Update parameters.
5347 (linux_low_btrace_conf): New.
5348 (linux_target_ops)<to_btrace_conf>: Initialize.
5349 * server.c (current_btrace_conf): New.
5350 (handle_btrace_enable): Rename to ...
5351 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5352 to target_enable_btrace. Update comment. Update users.
5353 (handle_qxfer_btrace_conf): New.
5354 (qxfer_packets): Add btrace-conf entry.
5355 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5356 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5357 (target_ops)<read_btrace_conf>: New.
5358 (target_enable_btrace): Update parameters.
5359 (target_read_btrace_conf): New.
5360
043c3577
MM
53612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5362
5363 * server.c (handle_btrace_general_set): Remove call to
5364 target_supports_btrace.
5365 (supported_btrace_packets): New.
5366 (handle_query): Call supported_btrace_packets.
5367 * target.h: include btrace-common.h.
5368 (btrace_target_info): Removed.
5369 (supports_btrace, target_supports_btrace): Update parameters.
5370
734b0e4b
MM
53712015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5372
5373 * Makefile.in (SFILES): Add common/btrace-common.c.
5374 (OBS): Add common/btrace-common.o.
5375 (btrace-common.o): Add build rules.
5376 * linux-low: Include btrace-common.h.
5377 (linux_low_read_btrace): Use struct btrace_data. Call
5378 btrace_data_init and btrace_data_fini.
5379
d6c146e9
PA
53802015-02-06 Pedro Alves <palves@redhat.com>
5381
5382 * thread-db.c (find_new_threads_callback): Add debug output.
5383
20ba1ce6
PA
53842015-02-04 Pedro Alves <palves@redhat.com>
5385
5386 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5387 (resume_stopped_resumed_lwps): New function.
5388 (linux_wait_for_event_filtered): Use it.
5389
8cc73a39
SDJ
53902015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5391
5392 * Makefile.in (SFILES): Add linux-personality.c.
5393 (linux-personality.o): New rule.
5394 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5395 list of objects to be built.
5396 * linux-low.c: Include nat/linux-personality.h.
5397 (linux_create_inferior): Remove code to disable address space
5398 randomization (moved to ../nat/linux-personality.c). Create
5399 cleanup to disable address space randomization.
5400
fb23d554
SDJ
54012015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5402
5403 * Makefile.in (posix-strerror.o): New rule.
5404 (mingw-strerror.o): Likewise.
5405 * configure: Regenerated.
5406 * configure.ac: Source file ../common/common.host. Initialize new
5407 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5408
cdf43629
YQ
54092015-01-14 Yao Qi <yao@codesourcery.com>
5410
5411 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5412 (ppc-linux.o): New rule.
5413 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5414 * configure.ac: AC_CHECK_FUNCS(getauxval).
5415 * config.in: Re-generated.
5416 * configure: Re-generated.
5417 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5418 ppc64_64bit_inferior_p
5419
514c5338
YQ
54202015-01-14 Yao Qi <yao@codesourcery.com>
5421
5422 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5423 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5424 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5425 (PT_ORIG_R3, PT_TRAP): Likewise.
5426 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5427 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5428 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5429
3368c1e5
JB
54302015-01-10 Joel Brobecker <brobecker@adacore.com>
5431
5432 * i387-fp.c (i387_cache_to_xsave): In look over
5433 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5434 zmmh_low_space field by use of zmmh_high_space.
5435
582511be
PA
54362015-01-09 Pedro Alves <palves@redhat.com>
5437
5438 * linux-low.c (step_over_bkpt): Move higher up in the file.
5439 (handle_extended_wait): Don't store the stop_pc here.
5440 (get_stop_pc): Adjust comments and rename to ...
5441 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5442 stopped for a software breakpoint or hardware breakpoint.
5443 (thread_still_has_status_pending_p): New function.
5444 (status_pending_p_callback): Use
5445 thread_still_has_status_pending_p. If the event is no longer
5446 interesting, resume the LWP.
5447 (handle_tracepoints): Add assert.
5448 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5449 (wstatus_maybe_breakpoint): New function.
5450 (cancel_breakpoint): Delete function.
5451 (check_stopped_by_watchpoint): New function, factored out from
5452 linux_low_filter_event.
5453 (lp_status_maybe_breakpoint): Delete function.
5454 (linux_low_filter_event): Remove filter_ptid argument.
5455 Leave thread group exits pending here. Store the LWP's stop PC.
5456 Always leave events pending.
5457 (linux_wait_for_event_filtered): Pull all events out of the
5458 kernel, and leave them all pending.
5459 (count_events_callback, select_event_lwp_callback): Consider all
5460 events.
5461 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5462 (select_event_lwp): Only give preference to the stepping LWP in
5463 all-stop mode. Adjust comments.
5464 (ignore_event): New function.
5465 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5466 references to cancel_breakpoints. Adjust to renames. Also give
5467 equal priority to all LWPs that have had events in non-stop mode.
5468 If reporting a software breakpoint event, unadjust the LWP's PC.
5469 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5470 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5471 Adjust.
5472 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5473 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5474 (linux_stopped_by_watchpoint): Adjust.
5475 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5476 * linux-low.h (enum lwp_stop_reason): New.
5477 (struct lwp_info) <stop_pc>: Adjust comment.
5478 <stopped_by_watchpoint>: Delete field.
5479 <stop_reason>: New field.
5480 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5481 * mem-break.c (software_breakpoint_inserted_here)
5482 (hardware_breakpoint_inserted_here): New function.
5483 * mem-break.h (software_breakpoint_inserted_here)
5484 (hardware_breakpoint_inserted_here): Declare.
5485 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5486 (cancel_breakpoints): Delete.
5487 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5488 (upload_fast_traceframes): Remove references to
5489 cancel_breakpoints.
5490
a33e3959
PA
54912015-01-09 Pedro Alves <palves@redhat.com>
5492
5493 * thread-db.c (find_new_threads_callback): Ignore thread if the
5494 kernel thread ID is -1.
5495
8784d563
PA
54962015-01-09 Pedro Alves <palves@redhat.com>
5497
5498 * linux-low.c (linux_attach_fail_reason_string): Move to
5499 nat/linux-ptrace.c, and rename.
5500 (linux_attach_lwp): Update comment.
5501 (attach_proc_task_lwp_callback): New function.
5502 (linux_attach): Adjust to rename and use
5503 linux_proc_attach_tgid_threads.
5504 (linux_attach_fail_reason_string): Delete declaration.
5505
76f2b779
JB
55062015-01-01 Joel Brobecker <brobecker@adacore.com>
5507
5508 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5509 * server.c (gdbserver_version): Likewise.
5510
fafcc06a
SDJ
55112014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5512
5513 * remote-utils.c: Include ctype.h.
5514 (input_interrupt): Explicitly handle the case when the char
5515 received is the NUL byte. Improve the printing of non-ASCII
5516 characters.
5517
beed38b8
JB
55182014-12-16 Joel Brobecker <brobecker@adacore.com>
5519
5520 * linux-low.c (linux_low_filter_event): Update call to
5521 linux_enable_event_reporting following the addition of
5522 a new parameter to that function.
5523
bf330350
CU
55242014-12-16 Catalin Udma <catalin.udma@freescale.com>
5525
5526 PR server/17457
5527 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5528 (AARCH64_FPCR_REGNO): Likewise.
5529 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5530 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5531 (aarch64_store_fpregset): Likewise.
5532
5227d625
JB
55332014-12-15 Joel Brobecker <brobecker@adacore.com>
5534
5535 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5536 Remove FIXME comment about assumption about N.
5537
f93b65a0
JB
55382014-12-13 Joel Brobecker <brobecker@adacore.com>
5539
5540 * configure.ac: If large-file support is disabled in GDBserver,
5541 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5542 * configure: Regenerate.
5543
e5a9158d
AA
55442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5545
5546 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5547 warning upon ENODATA from ptrace.
5548 * linux-s390-low.c (s390_store_tdb): New.
5549 (s390_regsets): Add regset for NT_S390_TDB.
5550
feea5f36
AA
55512014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5552
5553 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5554 without a fill_function.
5555 * linux-s390-low.c (s390_fill_last_break): Remove.
5556 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5557 (s390_arch_setup): Use regset's size instead of fill_function for
5558 loop end condition.
5559
098dbe61
AA
55602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5561
5562 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5563 the regset's store function when ptrace returned an error.
5564 * regcache.c (get_thread_regcache): Invalidate register cache
5565 before fetching inferior's registers.
5566
28eef672
AA
55672014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5568
5569 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5570 while-loop as for-loop.
5571 (regsets_store_inferior_registers): Likewise.
5572
bdca27a2
YQ
55732014-11-28 Yao Qi <yao@codesourcery.com>
5574
5575 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5576 * config.in, configure: Re-generate.
5577 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5578 is defined.
5579
9c232dda
YQ
55802014-11-21 Yao Qi <yao@codesourcery.com>
5581
5582 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5583 (AC_CHECK_HEADERS): Remove malloc.h.
5584 * configure: Re-generated.
5585 * config.in: Re-generated.
5586 * server.h: Don't include alloca.h and malloc.h.
5587 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5588 Don't include malloc.h.
5589
43968415
JB
55902014-11-17 Joel Brobecker <brobecker@adacore.com>
5591
5592 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5593 corresponding ERRNO check in same block.
5594
40e91bc7
PA
55952014-11-12 Pedro Alves <palves@redhat.com>
5596
5597 * server.c (cont_thread): Update comment.
5598 (start_inferior, attach_inferior): No longer clear cont_thread.
5599 (handle_v_cont): No longer set cont_thread.
5600 (captured_main): Clear cont_thread each time a GDB connects.
5601
c2c118cf
PA
56022014-11-12 Pedro Alves <palves@redhat.com>
5603
5604 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5605 thread, and don't resume all threads if the Hc thread has exited.
5606
78708b7c
PA
56072014-11-12 Pedro Alves <palves@redhat.com>
5608
5609 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5610 the process group instead of to a specific LWP.
5611
a2abc7de
PA
56122014-10-15 Pedro Alves <palves@redhat.com>
5613
5614 PR server/17487
5615 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5616 parameter.
5617 (arm_set_thread_context): Delete.
5618 (the_low_target): Adjust.
5619 * win32-i386-low.c (debug_registers_changed)
5620 (debug_registers_used): Delete.
5621 (update_debug_registers_callback): New function.
5622 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5623 needing to update their debug registers.
5624 (win32_get_current_dr): New function.
5625 (x86_dr_low_get_addr, x86_dr_low_get_control)
5626 (x86_dr_low_get_status): Fetch the debug register from the thread
5627 record's context.
5628 (i386_initial_stuff): Adjust.
5629 (i386_get_thread_context): Remove current_event parameter. Don't
5630 clear debug_registers_changed nor copy DR values to
5631 debug_reg_state.
5632 (i386_set_thread_context): Delete.
5633 (i386_prepare_to_resume): New function.
5634 (i386_thread_added): Mark the thread as needing to update irs
5635 debug registers.
5636 (the_low_target): Remove i386_set_thread_context and install
5637 i386_prepare_to_resume.
5638 * win32-low.c (win32_get_thread_context): Adjust.
5639 (win32_set_thread_context): Use SetThreadContext
5640 directly.
5641 (win32_prepare_to_resume): New function.
5642 (win32_require_context): New function, factored out from ...
5643 (thread_rec): ... this.
5644 (continue_one_thread): Call win32_prepare_to_resume on each thread
5645 we're about to continue.
5646 (win32_resume): Call win32_prepare_to_resume on the event thread.
5647 * win32-low.h (struct win32_thread_info)
5648 <debug_registers_changed>: New field.
5649 (struct win32_target_ops): Change prototype of set_thread_context,
5650 delete set_thread_context and add prepare_to_resume.
5651 (win32_require_context): New declaration.
5652
a442d071
GB
56532014-10-08 Gary Benson <gbenson@redhat.com>
5654
5655 * server.h: Do not include common-exceptions.h.
5656
6f1947e8
GB
56572014-10-08 Gary Benson <gbenson@redhat.com>
5658
5659 * server.h: Do not include cleanups.h.
5660
63b434a4
JH
56612014-09-30 James Hogan <james.hogan@imgtec.com>
5662
5663 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5664 mips64-dsp-linux.c.
5665
c4d9ceb6
YQ
56662014-09-23 Yao Qi <yao@codesourcery.com>
5667
5668 * linux-low.c (lp_status_maybe_breakpoint): New function.
5669 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5670 (count_events_callback): Likewise.
5671 (select_event_lwp_callback): Likewise.
5672 (cancel_breakpoints_callback): Likewise.
5673
89a5711c
DB
56742014-09-19 Don Breazeal <donb@codesourcery.com>
5675
5676 * linux-low.c (handle_extended_wait): Call
5677 linux_ptrace_get_extended_event.
5678 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5679 linux_is_extended_waitstatus.
5680
bffc0964
JB
56812014-09-16 Joel Brobecker <brobecker@adacore.com>
5682
5683 * Makefile.in (CPPFLAGS): Define.
5684 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5685 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5686
0bfdf32f
GB
56872014-09-16 Gary Benson <gbenson@redhat.com>
5688
5689 * inferiors.h (current_inferior): Renamed as...
5690 (current_thread): New variable. All uses updated.
5691 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5692 (maybe_move_out_of_jump_pad): Likewise.
5693 (cancel_breakpoint): Likewise.
5694 (linux_low_filter_event): Likewise.
5695 (wait_for_sigstop): Likewise.
5696 (linux_resume_one_lwp): Likewise.
5697 (need_step_over_p): Likewise.
5698 (start_step_over): Likewise.
5699 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5700 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5701 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5702 and save_inferior as saved_thread.
5703 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5704 saved_thread.
5705 (regcache_invalidate_thread): Likewise.
5706 * remote-utils.c (prepare_resume_reply): Likewise.
5707 * thread-db.c (thread_db_get_tls_address): Likewise.
5708 (disable_thread_event_reporting): Likewise.
5709 (remove_thread_event_breakpoints): Likewise.
5710 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5711 as saved_thread.
5712 * target.h (set_desired_inferior): Renamed as...
5713 (set_desired_thread): New declaration. All uses updated.
5714 * server.c (myresume): Updated comment to reference thread instead
5715 of inferior.
5716 (handle_serial_event): Likewise.
5717 (handle_target_event): Likewise.
5718
361c8ade
GB
57192014-09-12 Tom Tromey <tromey@redhat.com>
5720 Gary Benson <gbenson@redhat.com>
5721
5722 * regcache.h: Include common-regcache.h.
5723 (regcache_read_pc): Don't declare.
5724 * regcache.c (get_thread_regcache_for_ptid): New function.
5725
bd9269f7
GB
57262014-09-11 Tom Tromey <tromey@redhat.com>
5727 Gary Benson <gbenson@redhat.com>
5728
5729 * symbol.c: New file.
5730 * Makefile.in (SFILES): Add symbol.c.
5731 (OBS): Add symbol.o.
5732
f8c1d06b
GB
57332014-09-11 Gary Benson <gbenson@redhat.com>
5734
5735 * target.c (target_stop_ptid, target_continue_ptid): New
5736 functions.
5737
721ec300
GB
57382014-09-11 Tom Tromey <tromey@redhat.com>
5739 Gary Benson <gbenson@redhat.com>
5740
5741 * target.h: Include target/target.h.
5742 * target.c (target_read_memory, target_read_uint32)
5743 (target_write_memory): New functions.
5744
c5e92cca
GB
57452014-09-11 Gary Benson <gbenson@redhat.com>
5746
5747 * server.h (debug_hw_points): Don't declare.
5748 * server.c (debug_hw_points): Don't define. Replace all uses
5749 with show_debug_regs.
5750 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5751 all uses with show_debug_regs.
5752
2e4bb98a
EBM
57532014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5754
5755 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5756 endianness into account.
5757 (ppc_supply_ptrace_register): Likewise.
5758
ac740bc7
JH
57592014-09-03 James Hogan <james.hogan@imgtec.com>
5760
5761 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5762 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5763
97ea6506
GB
57642014-09-03 Gary Benson <gbenson@redhat.com>
5765
5766 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5767 ALL_DEBUG_ADDRESS_REGISTERS.
5768
df7e5265
GB
57692014-09-02 Gary Benson <gbenson@redhat.com>
5770
5771 * i386-low.h: Renamed as...
5772 * x86-low.h: New file. All type, function and variable name
5773 prefixes changed from "i386_" to "x86_". All references updated.
5774 * i386-low.c: Renamed as...
5775 * x86-low.c: New file. All type, function and variable name
5776 prefixes changed from "i386_" to "x86_". All references updated.
5777
ed859da7
GB
57782014-09-02 Gary Benson <gbenson@redhat.com>
5779
5780 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5781 (x86_linux_new_thread): Likewise.
5782
860789c7
GB
57832014-08-29 Gary Benson <gbenson@redhat.com>
5784
5785 * server.h (setjmp.h): Do not include.
5786 (toplevel): Do not declare.
5787 (common-exceptions.h): Include.
5788 (cleanups.h): Likewise.
5789 * server.c (toplevel): Do not define.
5790 (exit_code): New static global.
5791 (detach_or_kill_for_exit_cleanup): New function.
5792 (main): New function. Original main renamed to...
5793 (captured_main): New function.
5794 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5795
ff55e1b5
GB
57962014-08-29 Gary Benson <gbenson@redhat.com>
5797
5798 * Makefile.in (SFILES): Add common/common-exceptions.c.
5799 (OBS): Add common-exceptions.o.
5800 (common-exceptions.o): New rule.
5801 * utils.c (prepare_to_throw_exception): New function.
5802
e9bcb658
GB
58032014-08-29 Gary Benson <gbenson@redhat.com>
5804
5805 * config.in: Regenerate.
5806 * configure: Likewise.
5807
e3180625
GB
58082014-08-29 Gary Benson <gbenson@redhat.com>
5809
5810 * Makefile.in (SFILES): Add common/cleanups.c.
5811 (OBS): cleanups.o.
5812 (cleanups.o): New rule.
5813
e3d6ba5d
GB
58142014-08-29 Gary Benson <gbenson@redhat.com>
5815
5816 * utils.c (internal_vwarning): New function.
5817
7096e886
GB
58182014-08-28 Gary Benson <gbenson@redhat.com>
5819
5820 * utils.h (fatal): Remove declaration.
5821 * utils.c (fatal): Remove function.
5822
14ce3192
GB
58232014-08-28 Gary Benson <gbenson@redhat.com>
5824
5825 * tracepoint.c (gdb_agent_init): Replace fatal with
5826 perror_with_name.
5827 (initialize_tracepoint): Likewise.
5828
50278d59
GB
58292014-08-28 Gary Benson <gbenson@redhat.com>
5830
5831 * remote-utils.c (remote_prepare): Replace fatal with error.
5832
aa96c426
GB
58332014-08-28 Gary Benson <gbenson@redhat.com>
5834
5835 * linux-low.c (linux_async): Replace fatal with warning.
5836 Tidy up and return.
5837 (linux_start_non_stop): Return -1 if linux_async failed.
5838
f7160e97
GB
58392014-08-28 Gary Benson <gbenson@redhat.com>
5840
5841 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5842 gdb_assert.
5843 (i386_dr_low_get_addr): Remove vague comment.
5844 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5845 gdb_assert.
5846
38e08fca
GB
58472014-08-28 Gary Benson <gbenson@redhat.com>
5848
5849 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5850 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5851 internal_error.
5852 (linux_resume_one_lwp): Likewise.
5853 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5854 gdb_assert.
5855 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5856 with internal_error.
5857 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5858 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5859 (find_register_by_name): Replace fatal with internal_error.
5860 (find_regno): Likewise.
5861 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5862 * thread-db.c (thread_db_create_event): Likewise.
5863 (thread_db_load_search): Likewise.
5864 (try_thread_db_load_1): Likewise.
5865 * tracepoint.c (get_jump_space_head): Replace fatal with
5866 internal_error.
5867 (claim_trampoline_space): Likewise.
5868 (have_fast_tracepoint_trampoline_buffer): Likewise.
5869 (cmd_qtstart): Likewise.
5870 (stop_tracing): Likewise.
5871 (fast_tracepoint_collecting): Likewise.
5872 (target_malloc): Likewise.
5873 (download_tracepoint): Likewise.
5874 (download_trace_state_variables): Replace check with gdb_assert.
5875 (upload_fast_traceframes): Replace fatal with internal_error.
5876
34abf635
GB
58772014-08-19 Tom Tromey <tromey@redhat.com>
5878 Gary Benson <gbenson@redhat.com>
5879
5880 * Makefile.in (SFILES): Add common/common-debug.c.
5881 (OBS): Add common-debug.o.
5882 (common-debug.o): New rule.
5883 * debug.h (debug_printf): Don't declare.
5884 * debug.c (debug_printf): Renamed and rewritten as...
5885 (debug_vprintf): New function.
5886
f6e94d78
GB
58872014-08-19 Gary Benson <gbenson@redhat.com>
5888
5889 * utils.h: Do not include print-utils.h.
5890
9239eeab
GB
58912014-08-19 Tom Tromey <tromey@redhat.com>
5892 Gary Benson <gbenson@redhat.com>
5893
5894 * server.h: Add static assertion.
5895 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5896
ef87c8bb
GB
58972014-08-19 Tom Tromey <tromey@redhat.com>
5898 Gary Benson <gbenson@redhat.com>
5899
5900 * Makefile.in (SFILES): Add common/errors.c.
5901 (OBS): Add errors.o.
5902 (IPA_OBS): Add errors-ipa.o.
5903 (errors.o): New rule.
5904 (errors-ipa.o): Likewise.
5905 * utils.h (perror_with_name, error, warning): Don't declare.
5906 * utils.c (warning): Renamed and rewritten as...
5907 (vwarning): New function.
5908 (error): Renamed and rewritten as...
5909 (verror): New function.
5910 (internal_error): Renamed and rewritten as...
5911 (internal_verror): New function.
5912
bb974a24
GB
59132014-08-07 Gary Benson <gbenson@redhat.com>
5914
5915 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5916 * configure: Regenerate.
5917 * config.in: Likewise.
5918 * server.h: Do not include errno.h.
5919 * event-loop.c: Likewise.
5920 * hostio-errno.c: Likewise.
5921 * linux-low.c: Likewise.
5922 * remote-utils.c: Likewise.
5923 * spu-low.c: Likewise.
5924 * utils.c: Likewise.
5925 * gdbreplay.c: Unconditionally include errno.h.
5926
6d3d12eb
GB
59272014-08-07 Gary Benson <gbenson@redhat.com>
5928
5929 * server.h: Do not include string.h.
5930 * event-loop.c: Likewise.
5931 * linux-low.c: Likewise.
5932 * regcache.c: Likewise.
5933 * remote-utils.c: Likewise.
5934 * spu-low.c: Likewise.
5935 * utils.c: Likewise.
5936
dccbb609
GB
59372014-08-07 Gary Benson <gbenson@redhat.com>
5938
5939 * server.h: Do not include gdb_assert.h.
5940
e76df0d0
GB
59412014-08-07 Gary Benson <gbenson@redhat.com>
5942
5943 * server.h: Do not include common-utils.h.
5944
4cb9c816
GB
59452014-08-07 Gary Benson <gbenson@redhat.com>
5946
5947 * server.h: Do not include ptid.h.
5948 * notif.h: Likewise.
5949
3995eeee
GB
59502014-08-07 Gary Benson <gbenson@redhat.com>
5951
5952 * server.h: Do not include gdb_locale.h.
5953
cb9f1a9b
GB
59542014-08-07 Gary Benson <gbenson@redhat.com>
5955
5956 * server.h: Do not include gdb/signals.h.
5957 * win32-low.c: Likewise.
5958
a5fceff8
GB
59592014-08-07 Gary Benson <gbenson@redhat.com>
5960
5961 * server.h: Do not include pathmax.h.
5962
b9391142
GB
59632014-08-07 Gary Benson <gbenson@redhat.com>
5964
5965 * server.h: Do not include libiberty.h.
5966 * linux-bfin-low.c: Likewise.
5967
0e443c87
GB
59682014-08-07 Gary Benson <gbenson@redhat.com>
5969
5970 * server.h: Do not include ansidecl.h.
5971
8ebb3f56
GB
59722014-08-07 Gary Benson <gbenson@redhat.com>
5973
5974 * linux-x86-low.c: Do not include stddef.h.
5975 * lynx-ppc-low.c: Likewise.
5976 * tracepoint.c: Likewise.
5977
8980bdf6
GB
59782014-08-07 Gary Benson <gbenson@redhat.com>
5979
5980 * server.h: Do not include stdarg.h.
5981 * nto-low.c: Likewise.
5982
d7096f71
GB
59832014-08-07 Gary Benson <gbenson@redhat.com>
5984
5985 * server.h: Do not include stdlib.h.
5986 * inferiors.c: Likewise.
5987 * linux-low.c: Likewise.
5988 * regcache.c: Likewise.
5989 * spu-low.c: Likewise.
5990 * tracepoint.c: Likewise.
5991 * utils.c: Likewise.
5992
d02f550d
GB
59932014-08-07 Gary Benson <gbenson@redhat.com>
5994
5995 * server.h: Do not include stdio.h.
5996 * linux-low.c: Likewise.
5997 * remote-utils.c: Likewise.
5998 * spu-low.c: Likewise.
5999 * utils.c: Likewise.
6000 * wincecompat.c: Likewise.
6001
87f6c4e3
GB
60022014-08-06 Gary Benson <gbenson@redhat.com>
6003
6004 * regcache.c (init_register_cache): Move conditionals inside if.
6005
7089dca4
GB
60062014-08-06 Gary Benson <gbenson@redhat.com>
6007
6008 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6009
462f517e
GB
60102014-07-31 Gary Benson <gbenson@redhat.com>
6011
6012 * ax.h: Do not include server.h.
6013 * gdbthread.h: Likewise.
6014 * lynx-low.h: Likewise.
6015 * notif.h: Likewise.
6016
976411d6
GB
60172014-07-30 Gary Benson <gbenson@redhat.com>
6018
6019 * server.h: Include common-defs.h.
6020 Do not include config.h or build-gnulib-gdbserver/config.h.
6021
d41f6d8e
GB
60222014-07-30 Gary Benson <gbenson@redhat.com>
6023
6024 * hostio-errno.c: Move server.h to top of includes list.
6025 * inferiors.c: Likewise.
6026 * linux-x86-low.c: Likewise.
6027 * notif.c: Include server.h.
6028
314c6a35
TT
60292014-07-24 Tom Tromey <tromey@redhat.com>
6030 Gary Benson <gbenson@redhat.com>
6031
6032 * server.h (CORE_ADDR): Now unsigned.
6033
69ff6be5
PA
60342014-07-16 Pedro Alves <palves@redhat.com>
6035
6036 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
6037
ce9e3fe7
PA
60382014-07-15 Pedro Alves <palves@redhat.com>
6039
6040 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
6041 copy.
6042
e76126e8
PA
60432014-07-11 Pedro Alves <palves@redhat.com>
6044
6045 * linux-low.c (kill_wait_lwp): New function, based on
6046 kill_one_lwp_callback, but use my_waitpid directly.
6047 (kill_one_lwp_callback, linux_kill): Use it.
6048
8e9db26e
PA
60492014-06-23 Pedro Alves <palves@redhat.com>
6050
6051 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6052 before setting DR0..DR3.
6053
698b3e08
GB
60542014-06-20 Gary Benson <gbenson@redhat.com>
6055
6056 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6057 * configure: Regenerated.
6058 * config.in: Likewise.
6059
125f8a3d
GB
60602014-06-20 Gary Benson <gbenson@redhat.com>
6061
6062 * Makefile.in (SFILES): Update locations for files moved
6063 from common to nat.
6064 (object file files): Reordered.
6065
42995dbd
GB
60662014-06-20 Gary Benson <gbenson@redhat.com>
6067
6068 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6069 (i386_dr_low_set_addr): Likewise.
6070 (i386_dr_low_get_addr): Likewise.
6071 (i386_dr_low_can_set_control): Likewise.
6072 (i386_dr_low_set_control): Likewise.
6073 (i386_dr_low_get_control): Likewise.
6074 (i386_dr_low_get_status): Likewise.
6075 (i386_get_debug_register_length): Likewise.
6076 * linux-x86-low.c (i386_dr_low_set_addr):
6077 Changed signature. Made static.
6078 (i386_dr_low_get_addr): Likewise.
6079 (i386_dr_low_set_control): Likewise.
6080 (i386_dr_low_get_control): Likewise.
6081 (i386_dr_low_get_status): Likewise.
6082 (i386_dr_low): New global variable.
6083 * win32-i386-low.c (i386_dr_low_set_addr):
6084 Changed signature. Made static.
6085 (i386_dr_low_get_addr): Likewise.
6086 (i386_dr_low_set_control): Likewise.
6087 (i386_dr_low_get_control): Likewise.
6088 (i386_dr_low_get_status): Likewise.
6089 (i386_dr_low): New global variable.
6090
e1d2394b
MS
60912014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6092
6093 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6094 * Makefile.in (AR, AR_FLAGS): Define.
6095 * configure: Regenerate.
6096
3a8ee006
GB
60972014-06-19 Gary Benson <gbenson@redhat.com>
6098
6099 * Makefile.in (i386-dregs.o): New rule.
6100 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6101 * i386-low.c (target.h): Remove include.
6102 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6103 (DR_CONTROL_SHIFT): Likewise.
6104 (DR_CONTROL_SIZE): Likewise.
6105 (DR_RW_EXECUTE): Likewise.
6106 (DR_RW_WRITE): Likewise.
6107 (DR_RW_READ): Likewise.
6108 (DR_RW_IORW): Likewise.
6109 (DR_LEN_1): Likewise.
6110 (DR_LEN_2): Likewise.
6111 (DR_LEN_4): Likewise.
6112 (DR_LEN_8): Likewise.
6113 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6114 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6115 (DR_ENABLE_SIZE): Likewise.
6116 (DR_LOCAL_SLOWDOWN): Likewise.
6117 (DR_GLOBAL_SLOWDOWN): Likewise.
6118 (DR_CONTROL_RESERVED): Likewise.
6119 (I386_DR_CONTROL_MASK): Likewise.
6120 (I386_DR_VACANT): Likewise.
6121 (I386_DR_LOCAL_ENABLE): Likewise.
6122 (I386_DR_GLOBAL_ENABLE): Likewise.
6123 (I386_DR_DISABLE): Likewise.
6124 (I386_DR_SET_RW_LEN): Likewise.
6125 (I386_DR_GET_RW_LEN): Likewise.
6126 (I386_DR_WATCH_HIT): Likewise.
6127 (i386_wp_op_t): Likewise.
6128 (i386_show_dr): Likewise.
6129 (i386_length_and_rw_bits): Likewise.
6130 (i386_insert_aligned_watchpoint): Likewise.
6131 (i386_remove_aligned_watchpoint): Likewise.
6132 (i386_handle_nonaligned_watchpoint): Likewise.
6133 i386_update_inferior_debug_regs(): Likewise.
6134 (i386_dr_insert_watchpoint): Likewise.
6135 (i386_dr_remove_watchpoint): Likewise.
6136 (i386_dr_region_ok_for_watchpoint): Likewise.
6137 (i386_dr_stopped_data_address): Likewise.
6138 (i386_dr_stopped_by_watchpoint): Likewise.
6139
8f26655c
GB
61402014-06-19 Gary Benson <gbenson@redhat.com>
6141
6142 * i386-low.c (i386_dr_show): Renamed to
6143 i386_show_dr and made static. All uses updated.
6144 (i386_dr_length_and_rw_bits): Renamed to
6145 i386_length_and_rw_bits and made static.
6146 All uses updated.
6147 (i386_dr_insert_aligned_watchpoint): Renamed to
6148 i386_insert_aligned_watchpoint and made static.
6149 All uses updated.
6150 (i386_dr_remove_aligned_watchpoint): Renamed to
6151 i386_remove_aligned_watchpoint and made static.
6152 All uses updated.
6153 (i386_dr_update_inferior_debug_regs): Renamed to
6154 i386_update_inferior_debug_regs and made static.
6155 All uses updated.
6156
b9228891
GB
61572014-06-18 Gary Benson <gbenson@redhat.com>
6158
5171def3
GB
6159 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6160 (i386_dr_low_can_set_control): Likewise.
6161 (i386_get_debug_register_length): Likewise.
6162 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6163 (i386_dr_low_can_set_control): Likewise.
6164 (i386_get_debug_register_length): Likewise.
6165
61662014-06-17 Gary Benson <gbenson@redhat.com>
6167
b9228891
GB
6168 * i386-low.h (i386-dregs.h): New include.
6169 (DR_FIRSTADDR): Now in i386-dregs.h.
6170 (DR_LASTADDR): Likewise.
6171 (DR_NADDR): Likewise.
6172 (DR_STATUS): Likewise.
6173 (DR_CONTROL): Likewise.
6174 (i386_debug_reg_state): Likewise.
6175 (i386_dr_insert_watchpoint): Likewise.
6176 (i386_dr_remove_watchpoint): Likewise.
6177 (i386_dr_region_ok_for_watchpoint): Likewise.
6178 (i386_dr_stopped_data_address): Likewise.
6179 (i386_dr_stopped_by_watchpoint): Likewise.
6180 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6181
4be83cc2
GB
61822014-06-18 Gary Benson <gbenson@redhat.com>
6183
6184 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6185 i386_dr_insert_watchpoint.
6186 (i386_low_remove_watchpoint): Renamed to
6187 i386_dr_remove_watchpoint.
6188 (i386_low_region_ok_for_watchpoint): Renamed to
6189 i386_dr_region_ok_for_watchpoint.
6190 (i386_low_stopped_data_address): Renamed to
6191 i386_dr_stopped_data_address.
6192 (i386_low_stopped_by_watchpoint): Renamed to
6193 i386_dr_stopped_by_watchpoint.
6194 * i386-low.c (i386_show_dr): Renamed to
6195 i386_dr_show and made nonstatic. All uses updated.
6196 (i386_length_and_rw_bits): Renamed to
6197 i386_dr_length_and_rw_bits and made nonstatic.
6198 All uses updated.
6199 (i386_insert_aligned_watchpoint): Renamed to
6200 i386_dr_insert_aligned_watchpoint and made nonstatic.
6201 All uses updated.
6202 (i386_remove_aligned_watchpoint): Renamed to
6203 i386_dr_remove_aligned_watchpoint and made nonstatic.
6204 All uses updated.
6205 (i386_update_inferior_debug_regs): Renamed to
6206 i386_dr_update_inferior_debug_regs and made nonstatic.
6207 All uses updated.
6208 (i386_low_insert_watchpoint): Renamed to
6209 i386_dr_insert_watchpoint. All uses updated.
6210 (i386_low_remove_watchpoint): Renamed to
6211 i386_dr_remove_watchpoint. All uses updated.
6212 (i386_low_region_ok_for_watchpoint): Renamed to
6213 i386_dr_region_ok_for_watchpoint. All uses updated.
6214 (i386_low_stopped_data_address): Renamed to
6215 i386_dr_stopped_data_address. All uses updated.
6216 (i386_low_stopped_by_watchpoint): Renamed to
6217 i386_dr_stopped_by_watchpoint. All uses updated.
6218
131aa0d4
GB
62192014-06-18 Gary Benson <gbenson@redhat.com>
6220
6221 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6222 (i386_dr_low_can_set_control): Likewise.
6223 (i386_insert_aligned_watchpoint): New check.
6224
d9305f7f
GB
62252014-06-18 Gary Benson <gbenson@redhat.com>
6226
6227 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6228 Renamed to state.
6229
e927c9fc
GB
62302014-06-18 Gary Benson <gbenson@redhat.com>
6231
6232 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6233 instead of fatal and error.
6234 (i386_handle_nonaligned_watchpoint): Likewise.
6235
1b6d4134
GB
62362014-06-18 Gary Benson <gbenson@redhat.com>
6237
6238 * i386-low.c (i386_get_debug_register_length): New macro.
6239 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6240 (i386_show_dr): Use debug_printf instead of fprintf. Use
6241 phex to format values.
6242
6e62758f
GB
62432014-06-18 Gary Benson <gbenson@redhat.com>
6244
6245 * i386-low.h: Comment changes.
6246 * i386-low.c: Likewise.
6247
fc6e2f03
GB
62482014-06-18 Gary Benson <gbenson@redhat.com>
6249
6250 * i386-low.c: Whitespace changes.
6251
f9d1eeed
TT
62522014-06-12 Tom Tromey <tromey@redhat.com>
6253
6254 * utils.c (freeargv): Remove.
6255
0b04e523
TT
62562014-06-12 Tom Tromey <tromey@redhat.com>
6257
6258 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6259 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6260 (parse_debug_format_options): Likewise.
6261 (gdbserver_usage): Likewise.
6262 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6263 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6264 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6265 against libiberty.
6266 ($(LIBGNU)): Depend on libiberty.
6267 (all-lib): Recurse into all subdirs.
6268 (install-only): Invoke "install" target in subdirs.
6269 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6270 targets.
6271 * configure: Rebuild.
6272 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6273 for vasprintf, vsnprintf, or gettimeofday.
6274 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6275 srv_tgtobj.
6276
270c9937
JB
62772014-06-05 Joel Brobecker <brobecker@adacore.com>
6278
6279 * development.sh: Delete.
6280 * Makefile.in (config.status): Adjust dependency on development.sh.
6281 * configure.ac: Adjust development.sh source call.
6282 * configure: Regenerate.
6283
0a261ed8
PA
62842014-06-02 Pedro Alves <palves@redhat.com>
6285
6286 * ax.c (gdb_free_agent_expr): New function.
6287 * ax.h (gdb_free_agent_expr): New declaration.
6288 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6289 list.
6290 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6291 static.
6292 (clear_breakpoint_conditions_and_commands): New function.
6293 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6294 (clear_breakpoint_conditions_and_commands): New declaration.
6295
e9dae05e
RR
62962014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6297
6298 * linux-aarch64-low.c (asm/ptrace.h): Include.
6299
5876f503
JK
63002014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6301
6302 Fix TLS access for -static -pthread.
6303 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6304 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6305 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6306
802e8e6d
PA
63072014-05-20 Pedro Alves <palves@redhat.com>
6308
6309 * linux-aarch64-low.c (aarch64_insert_point)
6310 (aarch64_remove_point): No longer check whether the type is
6311 supported here. Adjust to new interface.
6312 (the_low_target): Install aarch64_supports_z_point_type as
6313 supports_z_point_type method.
6314 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6315 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6316 instead of a Z packet char. Adjust.
6317 (arm_supports_z_point_type): New function.
6318 (arm_insert_point, arm_remove_point): Adjust to new interface.
6319 (the_low_target): Install arm_supports_z_point_type.
6320 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6321 (cris_insert_point, cris_remove_point): Adjust to new interface.
6322 Don't check whether the type is supported here.
6323 (the_low_target): Install cris_supports_z_point_type.
6324 * linux-low.c (linux_supports_z_point_type): New function.
6325 (linux_insert_point, linux_remove_point): Adjust to new interface.
6326 * linux-low.h (struct linux_target_ops) <insert_point,
6327 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6328 raw_breakpoint pointer parameter.
6329 <supports_z_point_type>: New method.
6330 * linux-mips-low.c (mips_supports_z_point_type): New function.
6331 (mips_insert_point, mips_remove_point): Adjust to new interface.
6332 Use mips_supports_z_point_type.
6333 (the_low_target): Install mips_supports_z_point_type.
6334 * linux-ppc-low.c (the_low_target): Install NULL as
6335 supports_z_point_type method.
6336 * linux-s390-low.c (the_low_target): Install NULL as
6337 supports_z_point_type method.
6338 * linux-sparc-low.c (the_low_target): Install NULL as
6339 supports_z_point_type method.
6340 * linux-x86-low.c (x86_supports_z_point_type): New function.
6341 (x86_insert_point): Adjust to new insert_point interface. Use
6342 insert_memory_breakpoint. Adjust to new
6343 i386_low_insert_watchpoint interface.
6344 (x86_remove_point): Adjust to remove_point interface. Use
6345 remove_memory_breakpoint. Adjust to new
6346 i386_low_remove_watchpoint interface.
6347 (the_low_target): Install x86_supports_z_point_type.
6348 * lynx-low.c (lynx_target_ops): Install NULL as
6349 supports_z_point_type callback.
6350 * nto-low.c (nto_supports_z_point_type): New.
6351 (nto_insert_point, nto_remove_point): Adjust to new interface.
6352 (nto_target_ops): Install nto_supports_z_point_type.
6353 * mem-break.c: Adjust intro comment.
6354 (struct raw_breakpoint) <raw_type, size>: New fields.
6355 <inserted>: Update comment.
6356 <shlib_disabled>: Delete field.
6357 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6358 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6359 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6360 (raw_bkpt_type_to_target_hw_bp_type): New function.
6361 (find_enabled_raw_code_breakpoint_at): New function.
6362 (find_raw_breakpoint_at): New type and size parameters. Use them.
6363 (insert_memory_breakpoint): New function, based off
6364 set_raw_breakpoint_at.
6365 (remove_memory_breakpoint): New function.
6366 (set_raw_breakpoint_at): Reimplement.
6367 (set_breakpoint): New, based on set_breakpoint_at.
6368 (set_breakpoint_at): Reimplement.
6369 (delete_raw_breakpoint): Go through the_target->remove_point
6370 instead of assuming memory breakpoints.
6371 (find_gdb_breakpoint_at): Delete.
6372 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6373 (find_gdb_breakpoint): New function.
6374 (set_gdb_breakpoint_at): Delete.
6375 (z_type_supported): New function.
6376 (set_gdb_breakpoint_1): New function, loosely based off
6377 set_gdb_breakpoint_at.
6378 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6379 (delete_gdb_breakpoint_at): Delete.
6380 (delete_gdb_breakpoint_1): New function, loosely based off
6381 delete_gdb_breakpoint_at.
6382 (delete_gdb_breakpoint): New function.
6383 (clear_gdb_breakpoint_conditions): Rename to ...
6384 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6385 breakpoint.
6386 (add_condition_to_breakpoint): Make static.
6387 (add_breakpoint_condition): Take a struct breakpoint pointer
6388 instead of an address. Adjust.
6389 (gdb_condition_true_at_breakpoint): Rename to ...
6390 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6391 z_type parameter.
6392 (gdb_condition_true_at_breakpoint): Reimplement.
6393 (add_breakpoint_commands): Take a struct breakpoint pointer
6394 instead of an address. Adjust.
6395 (gdb_no_commands_at_breakpoint): Rename to ...
6396 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6397 parameter. Return true if no breakpoint was found. Change debug
6398 output.
6399 (gdb_no_commands_at_breakpoint): Reimplement.
6400 (run_breakpoint_commands): Rename to ...
6401 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6402 and change return type to boolean.
6403 (run_breakpoint_commands): New function.
6404 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6405 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6406 breakpoint. Go through the_target->remove_point instead of
6407 assuming memory breakpoint.
6408 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6409 software and hardware breakpoints.
6410 (reinsert_raw_breakpoint): Go through the_target->insert_point
6411 instead of assuming memory breakpoint.
6412 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6413 software and hardware breakpoints.
6414 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6415 Check both software and hardware breakpoints.
6416 (validate_inserted_breakpoint): Assert the breakpoint is a
6417 software breakpoint. Set the inserted flag to -1 instead of
6418 setting shlib_disabled.
6419 (delete_disabled_breakpoints): Adjust.
6420 (validate_breakpoints): Only validate software breakpoints.
6421 Adjust to inserted flag change.
6422 (check_mem_read, check_mem_write): Skip breakpoint types other
6423 than software breakpoints. Adjust to inserted flag change.
6424 * mem-break.h (enum raw_bkpt_type): New enum.
6425 (raw_breakpoint, struct process_info): Forward declare.
6426 (Z_packet_to_target_hw_bp_type): Delete declaration.
6427 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6428 (set_gdb_breakpoint, delete_gdb_breakpoint)
6429 (clear_breakpoint_conditions): New declarations.
6430 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6431 (breakpoint_inserted_here): Update comment.
6432 (add_breakpoint_condition, add_breakpoint_commands): Replace
6433 address parameter with a breakpoint pointer parameter.
6434 (gdb_breakpoint_here): Update comment.
6435 (delete_gdb_breakpoint_at): Delete.
6436 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6437 * server.c (process_point_options): Take a struct breakpoint
6438 pointer instead of an address. Adjust.
6439 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6440 delete_gdb_breakpoint.
6441 * spu-low.c (spu_target_ops): Install NULL as
6442 supports_z_point_type method.
6443 * target.h: Include mem-break.h.
6444 (struct target_ops) <prepare_to_access_memory>: Update comment.
6445 <supports_z_point_type>: New field.
6446 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6447 instead of a char. Also take a raw breakpoint pointer.
6448 * win32-arm-low.c (the_low_target): Install NULL as
6449 supports_z_point_type.
6450 * win32-i386-low.c (i386_supports_z_point_type): New function.
6451 (i386_insert_point, i386_remove_point): Adjust to new interface.
6452 (the_low_target): Install i386_supports_z_point_type.
6453 * win32-low.c (win32_supports_z_point_type): New function.
6454 (win32_insert_point, win32_remove_point): Adjust to new interface.
6455 (win32_target_ops): Install win32_supports_z_point_type.
6456 * win32-low.h (struct win32_target_ops):
6457 <supports_z_point_type>: New method.
6458 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6459 instead of a char. Also take a raw breakpoint pointer.
6460
932539e3
PA
64612014-05-20 Pedro Alves <palves@redhat.com>
6462
6463 * mem-break.h: Include break-common.h.
6464 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6465 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6466 (Z_packet_to_target_hw_bp_type): New declaration.
6467 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6468 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6469 (Z_PACKET_ACCESS_WP): Delete macros.
6470 (Z_packet_to_hw_type): Delete function.
6471 * i386-low.h: Don't include break-common.h here.
6472 (Z_packet_to_hw_type): Delete declaration.
6473 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6474 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6475 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6476 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6477 * linux-aarch64-low.c: Don't include break-common.h here.
6478 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6479 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6480 (Z_packet_to_target_hw_bp_type): Delete function.
6481 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6482 function.
6483 (mips_insert_point, mips_remove_point): Use
6484 Z_packet_to_target_hw_bp_type.
6485
4ff0d3d8
PA
64862014-05-20 Pedro Alves <palves@redhat.com>
6487
6488 * linux-aarch64-low.c: Include break-common.h.
6489 (enum target_point_type): Delete.
6490 (Z_packet_to_point_type): Rename to ...
6491 (Z_packet_to_target_hw_bp_type): ... this, and return a
6492 target_hw_bp_type instead.
6493 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6494 instead of an enum target_point_type.
6495 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6496 breakpoint type.
6497 (aarch64_dr_state_insert_one_point)
6498 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6499 (aarch64_handle_aligned_watchpoint)
6500 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6501 Take an enum target_hw_bp_type instead of an enum
6502 target_point_type.
6503 (aarch64_supports_z_point_type): New function.
6504 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6505 use Z_packet_to_target_hw_bp_type.
6506
786dc519
JB
65072014-05-20 Joel Brobecker <brobecker@adacore.com>
6508
6509 * configure.ac: Only use -Werror by default when DEVELOPMENT
6510 is true.
6511 * configure: Regenerate.
6512
9e0aa64f
JK
65132014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6514
6515 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6516 * linux-x86-low.c (X86_64_USER_REGS): New.
6517 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6518
2b577b92
YQ
65192014-04-28 Yao Qi <yao@codesourcery.com>
6520
6521 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6522 name.
6523
94611da2
PA
65242014-04-25 Pedro Alves <palves@redhat.com>
6525
6526 PR server/16255
6527 * linux-low.c (linux_attach_fail_reason_string): New function.
6528 (linux_attach_lwp): Delete.
6529 (linux_attach_lwp_1): Rename to ...
6530 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6531 argument. Remove "initial" parameter. Return int instead of
6532 void. Don't error or warn here.
6533 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6534 failure to attach to the tgid. Call warning when failing to
6535 attach to an lwp.
6536 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6537 argument. Remove "initial" parameter. Return int instead of
6538 void. Don't error or warn here.
6539 (linux_attach_fail_reason_string): New declaration.
6540 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6541 interface change. Use linux_attach_fail_reason_string.
6542
01f9f808
MS
65432014-04-24 Michael Sturm <michael.sturm@mintel.com>
6544 Walfred Tedeschi <walfred.tedeschi@intel.com>
6545
6546 * Makefile.in: Added rules to handle new files
6547 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6548 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6549 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6550 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6551 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6552 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6553 x32-avx512-linux.o.
6554 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6555 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6556 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6557 i386/x32-avx512.xml.
6558 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6559 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6560 i386/x32-avx512-linux.xml.
6561 * i387-fp.c (num_avx512_k_registers): New constant for number
6562 of K registers.
6563 (num_avx512_zmmh_low_registers): New constant for number of
6564 lower ZMM registers (0-15).
6565 (num_avx512_zmmh_high_registers): New constant for number of
6566 higher ZMM registers (16-31).
6567 (num_avx512_ymmh_registers): New contant for number of higher
6568 YMM registers (ymm16-31 added by avx521 on x86_64).
6569 (num_avx512_xmm_registers): New constant for number of higher
6570 XMM registers (xmm16-31 added by AVX512 on x86_64).
6571 (struct i387_xsave): Add space for AVX512 registers.
6572 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6573 Add code to handle AVX512 registers.
6574 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6575 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6576 prototypei from generated file.
6577 (tdesc_amd64_avx512_linux): Likewise.
6578 (init_registers_x32_avx512_linux): Likewise.
6579 (tdesc_x32_avx512_linux): Likewise.
6580 (init_registers_i386_avx512_linux): Likewise.
6581 (tdesc_i386_avx512_linux): Likewise.
6582 (x86_64_regmap): Add AVX512 registers.
6583 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6584 mask.
6585 (initialize_low_arch): Add code to initialize AVX512 registers.
6586
51aa91f9
PA
65872014-04-23 Pedro Alves <palves@redhat.com>
6588
6589 * mem-break.c (find_gdb_breakpoint_at): Make static.
6590 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6591
a4165e94
PA
65922014-04-23 Pedro Alves <palves@redhat.com>
6593
6594 * i386-low.c: Don't include break-common.h here.
6595 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6596 prototype to take target_hw_bp_type as argument instead of a Z
6597 packet char.
6598 * i386-low.h: Include break-common.h here.
6599 (Z_packet_to_hw_type): Declare.
6600 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6601 prototypes.
6602 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6603 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6604 (x86_remove_point): Convert the packet number to a
6605 target_hw_bp_type before calling i386_low_remove_watchpoint.
6606 * win32-i386-low.c (i386_insert_point): Convert the packet number
6607 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6608 (i386_remove_point): Convert the packet number to a
6609 target_hw_bp_type before calling i386_low_remove_watchpoint.
6610
b8acf843
PA
66112014-04-23 Pedro Alves <palves@redhat.com>
6612
6613 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6614
d708bcd1
PA
66152014-04-10 Pedro Alves <palves@redhat.com>
6616
6617 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6618 Check if the condition or command is NULL before checking if the
6619 breakpoint is known. On success, return true.
6620 * mem-break.h (add_breakpoint_condition): Document return.
6621 (add_breakpoint_commands): Add describing comment.
6622 * server.c (skip_to_semicolon): New function.
6623 (process_point_options): Use it.
6624
2eec7d5b
PA
66252014-04-09 Pedro Alves <palves@redhat.com>
6626
6627 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6628 to lwpid_of.
6629
fa96cb38
PA
66302014-02-27 Pedro Alves <palves@redhat.com>
6631
6632 PR 12702
6633 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6634 macros.
6635 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6636 output.
6637 (last_thread_of_process_p): Take a PID argument instead of a
6638 thread pointer.
6639 (linux_wait_for_lwp): Delete.
6640 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6641 functions.
6642 (linux_low_filter_event): New function, party factored out from
6643 linux_wait_for_event.
6644 (linux_wait_for_event): Rename to ...
6645 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6646 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6647 sigsuspend. Check for zombie leaders.
6648 (linux_wait_for_event): Reimplement as wrapper around
6649 linux_wait_for_event_filtered.
6650 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6651 a normal or signal exit is seen, it's the whole process exiting.
6652 (wait_for_sigstop): No longer a for_each_inferior callback.
6653 Rewrite on top of linux_wait_for_event_filtered.
6654 (stop_all_lwps): Call wait_for_sigstop directly.
6655 * server.c (resume, handle_target_event): Handle
6656 TARGET_WAITKIND_NO_RESUMED.
6657
d763de10
JB
66582014-02-26 Joel Brobecker <brobecker@adacore.com>
6659
6660 * win32-low.c (psapi_get_dll_name,
6661 * win32_CreateToolhelp32Snapshot): Delete.
6662 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6663 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6664 Delete.
6665 (handle_load_dll): Add function description.
6666 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6667
850a0f76
JB
66682014-02-26 Joel Brobecker <brobecker@adacore.com>
6669
6670 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6671 Add comment.
6672 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6673 base address when calling win32_add_one_solib.
6674 (handle_load_dll): Delete local variable load_addr.
6675 Remove 0x1000 offset applied to DLL base address when calling
6676 win32_add_one_solib.
6677 (handle_unload_dll): Add comment.
6678
f25b3fc3
JB
66792014-02-26 Joel Brobecker <brobecker@adacore.com>
6680
6681 * win32-low.c (win32_add_all_dlls): Renames
6682 win32_ensure_ntdll_loaded. Rewrite function documentation.
6683 Adjust implementation to always load all DLLs.
6684 Add 0x1000 offset to DLL base address when calling
6685 win32_add_one_solib.
6686 (child_initialization_done): New static global.
6687 (do_initial_child_stuff): Set child_initialization_done to
6688 zero during child initialization, and 1 after. Replace call
6689 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6690 Add comment.
6691 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6692 (handle_unload_dll): Add function documentation.
6693 (get_child_debug_event): Ignore load and unload DLL events
6694 during child initialization.
6695
d86d4aaf
DE
66962014-02-20 Doug Evans <dje@google.com>
6697
3bc32da3 6698 Remove global all_lwps.
d86d4aaf
DE
6699 * inferiors.h (ptid_of): Move here from linux-low.h.
6700 (pid_of, lwpid_of): Ditto.
6701 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6702 parameter is a struct thread_info * now.
6703 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6704 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6705 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6706 directly.
6707 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6708 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6709 * linux-arm-low.c (update_registers_callback): Update, "entry"
6710 parameter is a struct thread_info * now.
6711 Fetch lwpid from current_inferior directly.
6712 (arm_insert_point): Pass &all_threads to find_inferior instead of
6713 &all_lwps.
6714 (arm_remove_point): Ditto.
6715 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6716 (arm_prepare_to_resume): Fetch pid from thread.
6717 (arm_read_description): Fetch lwpid from current_inferior directly.
6718 * linux-low.c (all_lwps): Delete.
6719 (delete_lwp): Delete call to remove_inferior.
6720 (handle_extended_wait): Fetch lwpid from thread.
6721 (add_lwp): Don't set lwp->entry.id. Remove call to
6722 add_inferior_to_list.
6723 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6724 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6725 (kill_one_lwp_callback): Ditto.
6726 (linux_kill): Don't dereference NULL pointer.
6727 Fetch ptid,lwpid from thread.
6728 (get_detach_signal): Fetch ptid from thread.
6729 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6730 Simplify call to regcache_invalidate_thread.
6731 (delete_lwp_callback): Update, "entry" parameter is a
6732 struct thread_info * now. Fetch pid from thread.
6733 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6734 (status_pending_p_callback): Update, "entry" parameter is a
6735 struct thread_info * now. Fetch ptid from thread.
6736 (find_lwp_pid): Update, "entry" parameter is a
6737 struct thread_info * now.
6738 (linux_wait_for_lwp): Fetch pid from thread.
6739 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6740 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6741 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6742 (dequeue_one_deferred_signal): Ditto.
6743 (cancel_breakpoint): Fetch ptid from current_inferior.
6744 (linux_wait_for_event): Pass &all_threads to find_inferior,
6745 not &all_lwps. Fetch ptid, lwpid from thread.
6746 (count_events_callback): Update, "entry" parameter is a
6747 struct thread_info * now.
6748 (select_singlestep_lwp_callback): Ditto.
6749 (select_event_lwp_callback): Ditto.
6750 (cancel_breakpoints_callback): Ditto.
6751 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6752 not &all_lwps.
6753 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6754 (unsuspend_one_lwp): Update, "entry" parameter is a
6755 struct thread_info * now.
6756 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6757 not &all_lwps.
6758 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6759 Fetch lwpid from thread, not lwp.
6760 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6761 Pass &all_threads to find_inferior, not &all_lwps.
6762 (send_sigstop): Fetch lwpid from thread, not lwp.
6763 (send_sigstop_callback): Update, "entry" parameter is a
6764 struct thread_info * now.
6765 (suspend_and_send_sigstop_callback): Ditto.
6766 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6767 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6768 struct thread_info * now.
6769 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6770 from thread, lwp.
6771 (lwp_running): Update, "entry" parameter is a
6772 struct thread_info * now.
6773 (stop_all_lwps): Fetch ptid from thread.
6774 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6775 (linux_resume_one_lwp): Fetch lwpid from thread.
6776 (linux_set_resume_request): Update, "entry" parameter is a
6777 struct thread_info * now. Fetch pid, lwpid from thread.
6778 (resume_status_pending_p): Update, "entry" parameter is a
6779 struct thread_info * now.
6780 (need_step_over_p): Ditto. Fetch lwpid from thread.
6781 (start_step_over): Fetch lwpid from thread.
6782 (linux_resume_one_thread): Update, "entry" parameter is a
6783 struct thread_info * now. Fetch lwpid from thread.
6784 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6785 (proceed_one_lwp): Update, "entry" parameter is a
6786 struct thread_info * now. Fetch lwpid from thread.
6787 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6788 struct thread_info * now.
6789 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6790 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6791 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6792 directly.
6793 (regsets_store_inferior_registers): Ditto.
6794 (fetch_register, store_register): Ditto.
6795 (linux_read_memory, linux_write_memory): Ditto.
6796 (linux_request_interrupt): Ditto.
6797 (linux_read_auxv): Ditto.
6798 (linux_xfer_siginfo): Ditto.
6799 (linux_qxfer_spu): Ditto.
6800 (linux_qxfer_libraries_svr4): Ditto.
6801 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6802 moved to inferiors.h.
6803 (get_lwp): Delete.
6804 (get_thread_lwp): Update.
6805 (struct lwp_info): Delete member "entry". Simplify comment for
6806 member "thread".
6807 (all_lwps): Delete.
6808 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6809 current_inferior directly.
6810 (update_watch_registers_callback): Update, "entry" parameter is a
6811 struct thread_info * now. Fetch pid from thread.
6812 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6813 (mips_insert_point): Fetch lwpid from current_inferior.
6814 Pass &all_threads to find_inferior, not &all_lwps.
6815 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6816 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6817 directly.
6818 (mips_stopped_data_address): Ditto.
6819 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6820 directly.
6821 * linux-tile-low.c (tile_arch_setup): Ditto.
6822 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6823 (update_debug_registers_callback): Update, "entry" parameter is a
6824 struct thread_info * now. Fetch pid from thread.
6825 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6826 Pass &all_threads to find_inferior, not &all_lwps.
6827 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6828 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6829 Pass &all_threads to find_inferior, not &all_lwps.
6830 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6831 (i386_dr_low_get_status): Ditto.
6832 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6833 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6834 (x86_linux_read_description): Ditto.
6835 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6836
3b8361aa
DE
68372014-02-20 Doug Evans <dje@google.com>
6838
6839 * inferiors.c (get_first_inferior): Fix buglet.
6840
f7667f0d
DE
68412014-02-19 Doug Evans <dje@google.com>
6842
6843 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6844 * inferiors.c (add_thread): Change result type to struct thread_info *.
6845 All callers updated.
6846 (add_lwp): Call add_thread here instead of in callers.
6847 All callers updated.
6848 * linux-low.h (get_lwp_thread): Rewrite.
6849 (struct lwp_info): New member "thread".
6850
b3312d80
DE
68512014-02-19 Doug Evans <dje@google.com>
6852
6853 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6854 All callers updated.
6855
ecc6f45c
DE
68562014-02-19 Doug Evans <dje@google.com>
6857
6858 * inferiors.c (add_thread): Fix whitespace.
6859
649ebbca
DE
68602014-02-19 Doug Evans <dje@google.com>
6861
6862 * dll.c (clear_dlls): Replace accessing list implemention details
6863 with API function.
6864 * gdbthread.h (get_first_thread): Declare.
6865 * inferiors.c (for_each_inferior_with_data): New function.
6866 (get_first_thread): New function.
6867 (find_thread_ptid): Simplify.
6868 (get_first_inferior): New function.
6869 (clear_list): Delete.
6870 (one_inferior_p): New function.
6871 (clear_inferior_list): New function.
6872 (clear_inferiors): Update.
6873 * inferiors.h (for_each_inferior_with_data): Declare.
6874 (clear_inferior_list): Declare.
6875 (one_inferior_p): Declare.
6876 (get_first_inferior): Declare.
6877 * linux-low.c (linux_wait_for_event): Replace accessing list
6878 implemention details with API function.
6879 * server.c (target_running): Ditto.
6880 (accumulate_file_name_length): New function.
6881 (emit_dll_description): New function.
6882 (handle_qxfer_libraries): Replace accessing list implemention
6883 details with API function.
6884 (handle_qxfer_threads_worker): New function.
6885 (handle_qxfer_threads_proper): Replace accessing list implemention
6886 details with API function.
6887 (handle_query): Ditto.
6888 (visit_actioned_threads_callback_ftype): New typedef.
6889 (visit_actioned_threads_data): New struct.
6890 (visit_actioned_threads): Rewrite to be find_inferior callback.
6891 (resume): Call find_inferior.
6892 (handle_status): Replace accessing list implemention
6893 details with API function.
6894 (process_serial_event): Replace accessing list implemention details
6895 with API function.
6896 * target.c (set_desired_inferior): Replace accessing list implemention
6897 details with API function.
6898 * tracepoint.c (same_process_p): New function.
6899 (gdb_agent_about_to_close): Replace accessing list implemention
6900 details with API function.
6901 * win32-low.c (child_delete_thread): Replace accessing list
6902 implemention details with API function.
6903 (match_dll_by_basename): New function.
6904 (dll_is_loaded_by_basename): New function.
6905 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6906 details call to dll_is_loaded_by_basename.
6907
80894984
DE
69082014-02-19 Doug Evans <dje@google.com>
6909
6910 * dll.h (struct dll_info): Add comment.
6911 * gdbthread.h (struct thread_info): Add comment.
6912 (current_ptid): Simplify.
6913 * inferiors.c (add_process): Update.
6914 (remove_process): Update.
6915 * inferiors.h (struct process_info): Rename member "head" to "entry".
6916 * linux-low.c (delete_lwp): Update.
6917 (add_lwp): Update.
6918 (last_thread_of_process_p): Update.
6919 (kill_one_lwp_callback, linux_kill): Update.
6920 (status_pending_p_callback): Update.
6921 (wait_for_sigstop): Update. Simplify read of ptid.
6922 (start_step_over): Update.
6923 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6924 (get_lwp_thread): Update.
6925 (struct lwp_info): Rename member "head" to "entry".
6926 * regcache.h (inferior_list_entry): Delete.
6927 * server.c (kill_inferior_callback): Update.
6928 (detach_or_kill_inferior_callback): Update.
6929 (print_started_pid): Update.
6930 (print_attached_pid): Update.
6931 (process_serial_event): Simplify read of ptid.
6932 * thread-db.c (thread_db_create_event): Update.
6933 (thread_db_get_tls_address): Update.
6934 * win32-low.c (current_inferior_ptid): Simplify.
6935
46917d26
TT
69362014-02-19 Tom Tromey <tromey@redhat.com>
6937
6938 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6939 argument.
6940 (target_supports_btrace): Update.
6941
0759a81e
YQ
69422014-02-14 Yao Qi <yao@codesourcery.com>
6943
6944 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6945 (rsp-low-ipa.o): New target.
6946
a7191e8b
TT
69472014-02-12 Tom Tromey <tromey@redhat.com>
6948
6949 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6950 convert_ascii_to_int.
6951 * regcache.c (registers_to_string): Likewise.
6952 * remote-utils.c (decode_M_packet): Likewise.
6953 * server.c (process_serial_event): Likewise.
6954
ff0e980e
TT
69552014-02-12 Tom Tromey <tromey@redhat.com>
6956
6957 * server.c (handle_query, handle_v_run): Use hex2bin, not
6958 unhexify.
6959 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6960
e9371aff
TT
69612014-02-12 Tom Tromey <tromey@redhat.com>
6962
6963 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6964 convert_int_to_ascii.
6965 * regcache.c (registers_to_string, collect_register_as_string):
6966 Likewise.
6967 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6968 Likewise.
6969 * server.c (process_serial_event): Likewise.
6970 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6971 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6972
971dc0b8
TT
69732014-02-12 Tom Tromey <tromey@redhat.com>
6974
6975 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6976 bin2hex, not hexify.
6977 * tracepoint.c (cmd_qtstatus): Likewise.
6978
0a822afb
TT
69792014-02-12 Tom Tromey <tromey@redhat.com>
6980
6981 * remote-utils.c (monitor_output): Pass explicit length to
6982 hexify.
6983
9c3d6531
TT
69842014-02-12 Tom Tromey <tromey@redhat.com>
6985
6986 * tracepoint.c: Include rsp-low.h.
6987 * server.c: Include rsp-low.h.
6988 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6989 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6990 declare.
6991 * remote-utils.c: Include rsp-low.h.
6992 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6993 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6994 (convert_int_to_ascii, convert_ascii_to_int): Move to
6995 common/rsp-low.c.
6996 * regcache.c: Include rsp-low.h.
6997 * ax.c: Include rsp-low.h.
6998 * Makefile.in (SFILES): Add common/rsp-low.c.
6999 (OBS): Add rsp-low.o.
7000 (rsp-low.o): New target.
7001
01fd3ea5
TT
70022014-02-12 Tom Tromey <tromey@redhat.com>
7003
7004 * utils.h (pulongest, plongest, phex_nz): Don't declare.
7005 Include print-utils.h.
7006 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7007 (plongest, thirty_two, phex_nz): Remove.
7008 * Makefile.in (SFILES): Add common/print-utils.c.
7009 (OBS): Add print-utils.o.
7010 (print-utils-ipa.o): New target.
7011 (print-utils.o): New target.
7012 (IPA_OBJS): Add print-utils-ipa.o.
7013
e99dc820
TT
70142014-02-06 Tom Tromey <tromey@redhat.com>
7015
7016 * Makefile.in (SFILES): Fix indentation.
7017
ee1e2d4f
DE
70182014-02-05 Doug Evans <dje@google.com>
7019
7020 * linux-low.c (linux_wait_for_event): Improve comment.
7021 (linux_wait_1): Keep current_inferior in sync with event_child.
7022
f5a02773
DE
70232014-01-22 Doug Evans <dje@google.com>
7024
7025 * gdbthread.h (gdb_id_to_thread): Delete, unused.
7026
87ce2a04
DE
70272014-01-22 Doug Evans <dje@google.com>
7028
7029 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
7030 * configure: Regenerate.
7031 * config.in: Regenerate.
7032 * Makefile.in (SFILES): Add debug.c.
7033 (OBS): Add debug.o.
7034 * debug.c: New file.
7035 * debug.h: New file.
7036 * linux-aarch64-low.c (*): Update all debugging printfs to use
7037 debug_printf instead of fprintf.
7038 * linux-arm-low.c (*): Ditto.
7039 * linux-cris-low.c (*): Ditto.
7040 * linux-crisv32-low.c (*): Ditto.
7041 * linux-m32r-low.c (*): Ditto.
7042 * linux-sparc-low.c (*): Ditto.
7043 * linux-x86.c (*): Ditto.
7044 * linux-low.c (*): Ditto.
7045 (linux_wait_1): Add calls to debug_enter, debug_exit.
7046 (linux_wait): Remove redundant debugging printf.
7047 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7048 (linux_resume, unstop_all_lwps): Ditto.
7049 * mem-break.c (*): Update all debugging printfs to use
7050 debug_printf instead of fprintf.
7051 * remote-utils.c (*): Ditto.
7052 * thread-db.c (*): Ditto.
7053 * server.c #include <ctype.h>, "gdb_vecs.h".
7054 (debug_threads): Moved to debug.c.
7055 (*): Update all debugging printfs to use debug_printf instead of
7056 fprintf.
7057 (start_inferior): Replace call to fflush with call to debug_flush.
7058 (monitor_show_help): Mention set debug-format.
7059 (parse_debug_format_options): New function.
7060 (handle_monitor_command): Handle "monitor set debug-format".
7061 (gdbserver_usage): Mention --debug-format.
7062 (main): Parse --debug-format.
7063 * server.h (debug_threads): Declaration moved to debug.h.
7064 #include "debug.h".
7065 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7066 trace_debug_1 that uses debug_printf.
7067 (tracepoint_look_up_symbols): Update all debugging printfs to use
7068 debug_printf instead of fprintf.
7069
e671835b
BS
70702014-01-20 Baruch Siach <baruch@tkos.co.il>
7071
7072 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7073 sys/ptrace.h.
7074
b5737fa9
PA
70752014-01-17 Pedro Alves <palves@redhat.com>
7076
ea38d2a9 7077 PR build/16445
c7faa97a
PA
7078 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7079 defined after including gdb_proc_service.h.
b5737fa9 7080
40ed484e
DE
70812014-01-16 Doug Evans <dje@google.com>
7082
7083 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7084 (match_dll): Use it.
7085
969c39fb
MM
70862014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7087
7088 * target.h (target_ops) <read_btrace>: Change parameters and
7089 return type to allow error reporting.
7090 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7091 trace reading errors on.
7092 * linux-low.c (linux_low_read_btrace): Pass trace reading
7093 errors on.
7094 (linux_low_disable_btrace): New.
7095
ab7f45ba
DE
70962014-01-15 Doug Evans <dje@google.com>
7097
7098 * inferiors.c (thread_id_to_gdb_id): Delete.
7099 * inferiors.h (thread_id_to_gdb_id): Delete.
7100
66af0f44
EZ
71012014-01-13 Eli Zaretskii <eliz@gnu.org>
7102
7103 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7104 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7105 versions.
7106
9939e131
PA
71072014-01-08 Pedro Alves <palves@redhat.com>
7108
7109 * server.c (handle_status): Don't discard previous queued stop
7110 replies or thread's pending status here.
7111 (main) <disconnection>: Do it here instead.
7112
b7ea362b
PA
71132014-01-08 Pedro Alves <palves@redhat.com>
7114
7115 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7116 * server.c (visit_actioned_threads, handle_pending_status): New
7117 function.
7118 (handle_v_cont): Factor out parts to ...
7119 (resume): ... this new function. If in all-stop, and a thread
7120 being resumed has a pending status, report it without actually
7121 resuming.
7122 (myresume): Adjust to use the new 'resume' function.
7123 (clear_pending_status_callback, set_pending_status_callback)
7124 (find_status_pending_thread_callback): New functions.
7125 (handle_status): Handle the case of multiple threads having
7126 interesting statuses to report. Report threads' real last signal
7127 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7128 with an interesting thread to report the status for, instead of
7129 always reporting the status of the first thread.
7130
28498c42
JB
71312014-01-01 Joel Brobecker <brobecker@adacore.com>
7132
7133 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7134 * gdbreplay.c (gdbreplay_version): Likewise.
7135
f45c82da
YZ
71362013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7137
7138 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7139 iov.iov_len with the real length in use.
7140
379a5e2d
JB
71412013-12-13 Joel Brobecker <brobecker@adacore.com>
7142
7143 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7144 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7145 for all targets that use win32-low.c.
7146 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7147 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7148
4210d83e
PA
71492013-12-13 Pedro Alves <palves@redhat.com>
7150
7151 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7152 if equal to TARGET_WAITKIND_LOADED.
7153 * win32-low.c (cached_status): New static global.
7154 (win32_wait): Add declaration.
7155 (do_initial_child_stuff): Flush all initial pending debug events
7156 up to the initial breakpoint.
7157 (win32_wait): If CACHED_STATUS was set, return that instead
7158 of doing a real wait. Remove the code resuming the execution
7159 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7160 during the initial phase. Also remove the code changing
7161 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7162 TARGET_WAITKIND_STOPPED.
7163
e7f0d979
YQ
71642013-12-11 Yao Qi <yao@codesourcery.com>
7165
7166 * notif.c (handle_notif_ack): Return 0 if no notification
7167 matches.
7168
ebcf782c
DE
71692013-11-20 Doug Evans <dje@google.com>
7170
7171 * linux-low.c (linux_set_resume_request): Fix comment.
7172
20ad9378
DE
71732013-11-20 Doug Evans <dje@google.com>
7174
7175 * linux-low.c (resume_status_pending_p): Tweak comment.
7176
a196ebeb
WT
71772013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7178
7179 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7180 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7181 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7182 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7183 (srv_amd64_regobj): Add amd64-mpx.o.
7184 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7185 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7186 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7187 * i387-fp.c (num_pl_bnd_register) Added constant.
7188 (num_pl_bnd_cfg_registers) Added constant.
7189 (struct i387_xsave) Added reserved area and MPX fields.
7190 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7191 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7192 function.
7193 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7194 (init_registers_amd64_mpx_linux): Declare new function.
7195 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7196 (x86_64_regmap): Add MPX registers.
7197 (x86_linux_read_description): Add MPX case.
7198 (initialize_low_arch): Initialize MPX targets.
7199
0080a2f6
TT
72002013-11-18 Tom Tromey <tromey@redhat.com>
7201
7202 * configure: Rebuild.
7203 * configure.ac: Don't check for stdlib.h.
7204 * gdbreplay.c: Unconditionally include stdlib.h.
7205
2978b111
TT
72062013-11-18 Tom Tromey <tromey@redhat.com>
7207
7208 * config.in: Rebuild.
7209 * configure: Rebuild.
7210 * configure.ac: Don't use AC_HEADER_DIRENT.
7211
a3d08894
TT
72122013-11-18 Tom Tromey <tromey@redhat.com>
7213
7214 * server.h: Don't check HAVE_STRING_H.
7215 * gdbreplay.c: Don't check HAVE_STRING_H.
7216 * configure: Rebuild.
7217
0a5dd17d
TT
72182013-11-18 Tom Tromey <tromey@redhat.com>
7219
7220 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7221 LIBGNU.
7222
1bd2f0ba
TT
72232013-11-08 Tom Tromey <tromey@redhat.com>
7224
7225 * configure, config.in: Rebuild.
7226 * configure.ac: Remove unused configury.
7227
3266f10b
TT
72282013-11-08 Tom Tromey <tromey@redhat.com>
7229
7230 * acinclude.m4: Include common.m4, codeset.m4.
7231 * configure, config.in: Rebuild.
7232 * configure.ac: Use GDB_AC_COMMON.
7233
6682d959
AA
72342013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7235
7236 * linux-s390-low.c (HWCAP_S390_TE): New define.
7237 (s390_arch_setup): Consider the TE field in the HWCAP for
7238 determining 'have_regset_tdb'.
7239
fd0a4d76
SDJ
72402013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7241
7242 PR gdb/16014
7243 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7244 call to sizeof.
7245
1a3d890b
PA
72462013-10-02 Pedro Alves <palves@redhat.com>
7247
7248 * server.c (process_serial_event): Don't output "GDBserver
7249 exiting" if GDB is connected through stdio.
7250 * target.c (mywait): Likewise, be silent if GDB is connected
7251 through stdio.
7252
97ad4581
JB
72532013-10-01 Joel Brobecker <brobecker@adacore.com>
7254
7255 * lynx-low.c (lynx_add_threads_after_attach): New function.
7256 (lynx_attach): Remove call to add_thread. Add call to
7257 lynx_add_threads_after_attach instead.
7258
5b4e221c
MF
72592013-09-28 Mike Frysinger <vapier@gentoo.org>
7260
7261 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7262 * config.in, configure: Regenerated.
7263
ee47b2f8
YQ
72642013-09-18 Yao Qi <yao@codesourcery.com>
7265
7266 PR server/15959
7267 * server.c (start_inferior): Clear 'resume_info'.
7268
d6707650 72692013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7270
d6707650
JW
7271 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7272 for each register.
7273
9243dd0e 72742013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7275
9243dd0e
JW
7276 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7277 linux-tile-low.o to srv_tgtobj.
7278
c623a6ef
WN
72792013-09-16 Will Newton <will.newton@linaro.org>
7280
7281 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7282 out regs.
7283
fb71d39e
PA
72842013-09-06 Pedro Alves <palves@redhat.com>
7285
7286 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7287 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7288 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7289 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7290 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7291 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7292
8e7e9910
PA
72932013-09-06 Pedro Alves <palves@redhat.com>
7294
7295 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7296 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7297
7c3a12ca
PA
72982013-09-06 Pedro Alves <palves@redhat.com>
7299
7300 * linux-amd64-ipa.c: Include tracepoint.h.
7301 * linux-i386-ipa.c: Include tracepoint.h.
7302
8eb3d7b6
RW
73032013-09-06 Ricard Wanderlof <ricardw@axis.com>
7304
7305 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7306 (ps_get_thread_area): New function.
7307
eddddb9d
RW
73082013-09-06 Ricard Wanderlof <ricardw@axis.com>
7309
7310 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7311 (initialize_low_arch): Call init_registers_crisv32 rather than
7312 init_register_crisv32.
7313
533b0600
PA
73142013-09-05 Pedro Alves <palves@redhat.com>
7315
7316 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7317 to ...
7318 * hostio.h: ... this new file.
7319 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7320 win32-low.c: Include hostio.h.
7321
0ce3d3b5
PA
73222013-09-05 Pedro Alves <palves@redhat.com>
7323
7324 * server.h (gdb_client_data, handler_func, callback_handler_func)
7325 (delete_file_handler, add_file_handler, append_callback_event)
7326 (delete_callback_event, start_event_loop, initialize_event_loop):
7327 Move to event-loop.h and include it.
7328 * event-loop.h: New file.
7329
799cdc37
PA
73302013-09-05 Pedro Alves <palves@redhat.com>
7331
7332 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7333 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7334 (loaded_dll, unloaded_dll): Move to ...
7335 * dll.h: ... this new file.
7336 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7337
6a6bbd9d
PA
73382013-09-05 Pedro Alves <palves@redhat.com>
7339
7340 * server.h (current_process, get_thread_process, all_processes)
7341 (add_inferior_to_list, for_each_inferior, current_inferior)
7342 (remove_inferior, add_process, remove_process, find_process_pid)
7343 (have_started_inferiors_p, have_attached_inferiors_p)
7344 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7345 (clear_inferiors, find_inferior, find_inferior_id)
7346 (inferior_target_data, set_inferior_target_data)
7347 (inferior_regcache_data, set_inferior_regcache_data): Move to
7348 inferiors.h, and include it.
7349 * inferiors.h: New file.
7350
f699aaba
PA
73512013-09-05 Pedro Alves <palves@redhat.com>
7352
7353 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7354 Move ...
72f4393d 7355 * ax.h: ... here.
f699aaba 7356
c144c7a0
PA
73572013-09-05 Pedro Alves <palves@redhat.com>
7358
7359 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7360 tracepoint.h.
7361 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7362 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7363 (handle_tracepoint_general_set, handle_tracepoint_query)
7364 (tracepoint_finished_step, tracepoint_was_hit)
7365 (release_while_stepping_state_list, current_traceframe)
7366 (in_readonly_region, traceframe_read_mem)
7367 (fetch_traceframe_registers, traceframe_read_sdata)
7368 (traceframe_read_info, struct fast_tpoint_collect_status)
7369 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7370 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7371 (supply_fast_tracepoint_registers)
7372 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7373 (ipa_tdesc, claim_trampoline_space)
7374 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7375 (agent_mem_read, agent_get_trace_state_variable_value)
7376 (agent_set_trace_state_variable_value, agent_tsv_read)
7377 (agent_mem_read_string, get_raw_reg_func_addr)
7378 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7379 * tracepoint.h: ... this new file.
7380
ff42e6ab
PA
73812013-09-05 Pedro Alves <palves@redhat.com>
7382
7383 * server.h (perror_with_name, error, fatal, warning, paddress)
7384 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7385 include it.
7386 * utils.h: New file.
7387
541af0f4
PA
73882013-09-05 Pedro Alves <palves@redhat.com>
7389
7390 * server.h (remote_debug, noack_mode, transport_is_reliable)
7391 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7392 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7393 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7394 (write_enn, initialize_async_io, enable_async_io)
7395 (disable_async_io, check_remote_input_interrupt_request)
7396 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7397 (dead_thread_notify, prepare_resume_reply)
7398 (decode_address_to_semicolon, decode_address, decode_m_packet)
7399 (decode_M_packet, decode_X_packet, decode_xfer_write)
7400 (decode_search_memory_packet, unhexify, hexify)
7401 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7402 (look_up_one_symbol, relocate_instruction)
7403 (monitor_output): Move to remote-utils.h, and include it.
7404 * remote-utils.h: New file.
7405
eebdf26b
PA
74062013-09-05 Pedro Alves <palves@redhat.com>
7407
7408 * server.h (_): Delete.
7409
3aafd2ff
PA
74102013-09-02 Pedro Alves <palves@redhat.com>
7411
7412 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7413 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7414 allocated.
7415 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7416
cee83bcb
PM
74172013-09-02 Pierre Muller <muller@sourceware.org>
7418
7419 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7420 or WriteProcessMemory complete successfully and handle
7421 ERROR_PARTIAL_COPY error.
7422
9a13b2fa
PA
74232013-09-02 Pedro Alves <palves@redhat.com>
7424
7425 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7426 error instead of EIO.
7427
602e3198
JK
74282013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7429
7430 PR server/15604
7431 * linux-low.c: Include filestuff.h.
7432 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7433 * lynx-low.c: Include filestuff.h.
7434 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7435 * server.c: Include filestuff.h.
7436 (main): Call notice_open_fds.
7437 * spu-low.c: Include filestuff.h.
7438 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7439
96d7229d
LM
74402013-08-22 Luis Machado <lgustavo@codesourcery.com>
7441
7442 * Makefile.in: Explain why ../target and ../nat are not
7443 listed as include file search paths.
7444 (linux-waitpid.o): New object file rule.
7445 * configure.srv (srv_native_linux_obj): New variable.
7446 Replace all occurrences of linux native object files with
7447 $srv_native_linux_obj.
7448 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7449 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7450 (linux_enable_event_reporting): Remove declaration.
7451 (my_waitpid): Moved to common/linux-waitpid.c.
7452 (linux_wait_for_event): Pass ptid when calling
7453 linux_enable_event_reporting.
7454 (linux_supports_tracefork_flag): Remove.
7455 (linux_enable_event_reporting): Likewise.
7456 (linux_tracefork_grandchild): Remove.
7457 (STACK_SIZE): Moved to common/linux-ptrace.c.
7458 (linux_tracefork_child): Remove.
7459 (linux_test_for_tracefork): Remove.
7460 (linux_look_up_symbols): Call linux_supports_traceclone.
7461 (initialize_low): Remove call to linux_test_for_tracefork.
7462 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7463 common/linux-ptrace.h.
7464 (PTRACE_TYPE_ARG4): Likewise.
7465 Include linux-ptrace.h.
7466
32940073
PA
74672013-08-21 Pedro Alves <palves@redhat.com>
7468
7469 * config.in: Renegerate.
7470
33b60d58 74712013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7472
33b60d58
LM
7473 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7474 (SFILES): Remove $(srcdir)/common/target-common.c and
7475 add $(srcdir)/target/waitstatus.c.
7476 (OBS): Remove target-common.o and add waitstatus.o.
7477 (server_h): Remove $(srcdir)/../common/target-common.h and
7478 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7479 and $(srcdir)/../target/waitstatus.h.
7480 (target-common.o): Remove.
7481 (waitstatus.o): New target object file.
7482 * target.h: Do not include target-common.h and
7483 include target/resume.h, target/wait.h and
7484 target/waitstatus.h.
7485
b8e1b30e
LM
74862013-08-13 Luis Machado <lgustavo@codesourcery.com>
7487
7488 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7489 to PTRACE_TYPE_ARG3.
7490 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7491 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7492 PTRACE_TYPE_ARG4.
7493 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7494 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7495
7a60ad40
YQ
74962013-07-27 Jie Zhang <jie@codesourcery.com>
7497 Daniel Jacobowitz <dan@codesourcery.com>
7498 Yao Qi <yao@codesourcery.com>
7499
7500 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7501 (mips-linux-watch.o): New rule.
7502 (mips_linux_watch_h): New variable.
7503 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7504 srv_tgtobj.
7505 * linux-mips-low.c: Include mips-linux-watch.h.
7506 (struct arch_process_info, struct arch_lwp_info): New.
7507 (update_watch_registers_callback): New function.
7508 (mips_linux_new_process, mips_linux_new_thread) New functions.
7509 (mips_linux_prepare_to_resume, mips_insert_point): New
7510 functions.
7511 (mips_remove_point, mips_stopped_by_watchpoint): New
7512 functions.
7513 (rsp_bp_type_to_target_hw_bp_type): New function.
7514 (mips_stopped_data_address): New function.
7515 (the_low_target): Add watchpoint support functions.
7516
de6f69ad
YQ
75172013-07-27 Yao Qi <yao@codesourcery.com>
7518
7519 * i386-low.c: Include break-common.h.
7520 (enum target_hw_bp_type): Remove.
7521
3360c0bf
LM
75222013-07-24 Luis Machado <lgustavo@codesourcery.com>
7523
7524 * Makefile.in (SFILES): /common/target-common.c.
7525 (OBS): Add target-common.o.
7526 (server_h): Add $(srcdir)/../common/target-common.h.
7527 (target-common.o): New target.
7528 * server.c (queue_stop_reply_callback): Free
7529 status string after use.
7530 * target.c (target_waitstatus_to_string): Remove.
7531 * target.h: Include target-common.h.
7532 (resume_kind): Likewise.
7533 (target_waitkind): Likewise.
7534 (target_waitstatus): Likewise.
7535 (TARGET_WNOHANG): Likewise.
7536
bd885420
YQ
75372013-07-04 Yao Qi <yao@codesourcery.com>
7538
7539 * Makefile.in (host_alias): Use @host_noncanonical@.
7540 (target_alias): Use @target_noncanonical@.
7541 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7542 ACX_NONCANONICAL_HOST.
7543 * configure: Regenerated.
7544
7545 Revert:
7546 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7547
7548 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7549 * configure: Rebuild.
7550 * Makefile.in (version_host, version_target): Get from configure.
7551 (version.c): Use $(version_host) and $(version_target).
7552
17ef446e
PA
75532013-07-03 Pedro Alves <palves@redhat.com>
7554
7555 * Makefile.in (config.status): Depend on development.sh.
7556 * acinclude.m4: Include libmcheck.m4.
7557 * configure: Regenerate.
7558
7a9a7487
MG
75592013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7560
7561 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7562 attribute inside the parentheses.
7563 (winapi_DebugSetProcessKillOnExit): Ditto.
7564 (winapi_DebugBreakProcess): Ditto.
7565 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7566
49b64de6
MG
75672013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7568
7569 * notif.h (notif_event): Add a dummy member to avoid compiler
7570 errors.
7571
d5749ee7
PA
75722013-07-01 Pedro Alves <palves@redhat.com>
7573
7574 * hostio.c (HOSTIO_PATH_MAX): Define.
7575 (require_filename, handle_open, handle_unlink, handle_readlink):
7576 Use it.
7577
d8d2a3ee
PA
75782013-07-01 Pedro Alves <palves@redhat.com>
7579
7580 * server.h: Include "pathmax.h".
7581 * linux-low.c: Don't include sys/param.h.
7582 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7583 MAXPATHLEN.
7584 * win32-low.c: Don't include sys/param.h.
7585 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7586
bc7dea8d
PA
75872013-07-01 Pedro Alves <palves@redhat.com>
7588
7589 * event-loop.c: Don't check HAVE_UNISTD_H before including
7590 <unistd.h>.
7591 * gdbreplay.c: Likewise.
7592 * remote-utils.c: Likewise.
7593 * server.c: Likewise.
7594 * configure.ac: Don't check for unistd.h.
7595 * configure: Regenerate.
7596
d6c2da54
TT
75972013-06-28 Tom Tromey <tromey@redhat.com>
7598
7599 * Makefile.in (version.c): Use version.in, not
7600 common/version.in.
7601
257b6bec
MG
76022013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7603
7604 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7605 * configure: Rebuild.
7606 * Makefile.in (version_host, version_target): Get from configure.
7607 (version.c): Use $(version_host) and $(version_target).
7608
86ebe149
DK
76092013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7610
7611 Fix trace-status to output user name without trailing colon.
7612 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7613
f30aa5af
DK
76142013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7615
7616 Fix trace-status to output proper start-time and stop-time.
7617 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7618 output start time and stop time in hex as gdb expects.
7619
28a93511
YQ
76202013-06-26 Pedro Alves <pedro@codesourcery.com>
7621
7622 * tracepoint.c (build_traceframe_info_xml): Output trace state
7623 variables present in the trace buffer.
7624
01208463
TT
76252013-06-24 Tom Tromey <tromey@redhat.com>
7626
7627 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7628 create-version.sh.
7629 (version.o): Remove.
7630 * gdbreplay.c: Include version.h.
7631 (version, host_name): Don't declare.
7632 * server.h: Include version.h.
7633 (version, host_name): Don't declare.
7634
760256f9
PA
76352013-06-12 Pedro Alves <palves@redhat.com>
7636
7637 * linux-x86-low.c (linux_is_elf64): Delete global.
7638 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7639 with local linux_pid_exe_is_elf_64_file use.
7640
030031ee
PA
76412013-06-11 Pedro Alves <palves@redhat.com>
7642
7643 * linux-low.c (regset_disabled, disable_regset): New functions.
7644 (regsets_fetch_inferior_registers)
7645 (regsets_store_inferior_registers): Use them.
7646 (initialize_regsets_info); Don't allocate the disabled_regsets
7647 array here.
7648 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7649 comment.
7650
5da6eb0a
PA
76512013-06-11 Pedro Alves <palves@redhat.com>
7652
7653 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7654 xmalloc.
7655
7e5aaa09
PA
76562013-06-11 Pedro Alves <palves@redhat.com>
7657
7658 * linux-x86-low.c (initialize_low_arch): Call
7659 init_registers_x32_avx_linux.
7660
d878444c
JK
76612013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7662
7663 Fix compatibility with Android Bionic.
7664 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7665 it is not empty.
7666
3aee8918
PA
76672013-06-07 Pedro Alves <palves@redhat.com>
7668
5f2b57b5 7669 PR server/14823
3aee8918
PA
7670 * Makefile.in (OBS): Add tdesc.o.
7671 (IPA_OBJS): Add tdesc-ipa.o.
7672 (tdesc-ipa.o): New rule.
7673 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7674 interface.
7675 * linux-low.c (new_inferior): Delete.
7676 (disabled_regsets, num_regsets): Delete.
7677 (linux_add_process): Adjust to set the new per-process
7678 new_inferior flag.
7679 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7680 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7681 was a stop. When calling arch_setup, switch the current inferior
7682 to the thread that got an event.
7683 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7684 (regsets_fetch_inferior_registers)
7685 (regsets_store_inferior_registers): New regsets_info parameter.
7686 Adjust to use it.
7687 (linux_register_in_regsets): New regs_info parameter. Adjust to
7688 use it.
7689 (register_addr, fetch_register, store_register): New usrregs_info
7690 parameter. Adjust to use it.
7691 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7692 parameter regs_info. Adjust to use it.
7693 (linux_fetch_registers): Get the current inferior's regs_info, and
7694 adjust to use it.
7695 (linux_store_registers): Ditto.
7696 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7697 (initialize_low): Don't initialize the target_regsets here. Call
7698 initialize_low_arch.
7699 * linux-low.h (target_regsets): Delete declaration.
7700 (struct regsets_info): New.
7701 (struct usrregs_info): New.
7702 (struct regs_info): New.
7703 (struct process_info_private) <new_inferior>: New field.
7704 (struct linux_target_ops): Delete the num_regs, regmap, and
7705 regset_bitmap fields. New field regs_info.
7706 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7707 * i387-fp.c (num_xmm_registers): Delete.
7708 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7709 calls to new interface.
7710 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7711 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7712 Infer the number of xmm registers from the regcache's target
7713 description.
7714 * i387-fp.h (num_xmm_registers): Delete.
7715 * inferiors.c (add_thread): Don't install the thread's regcache
7716 here.
7717 * proc-service.c (gregset_info): Fetch the current inferior's
7718 regs_info. Adjust to use it.
7719 * regcache.c: Include tdesc.h.
7720 (register_bytes, reg_defs, num_registers)
7721 (gdbserver_expedite_regs): Delete.
7722 (get_thread_regcache): If the thread doesn't have a regcache yet,
7723 create one, instead of aborting gdbserver.
7724 (regcache_invalidate_one): Rename to ...
7725 (regcache_invalidate_thread): ... this.
7726 (regcache_invalidate_one): New.
7727 (regcache_invalidate): Only invalidate registers of the current
7728 process.
7729 (init_register_cache): Add target_desc parameter, and use it.
7730 (new_register_cache): Ditto. Assert the target description has a
7731 non zero registers_size.
7732 (regcache_cpy): Add assertions. Adjust.
7733 (realloc_register_cache, set_register_cache): Delete.
7734 (registers_to_string, registers_from_string): Adjust.
7735 (find_register_by_name, find_regno, find_register_by_number)
7736 (register_cache_size): Add target_desc parameter, and use it.
7737 (free_register_cache_thread, free_register_cache_thread_one)
7738 (regcache_release, register_cache_size): New.
7739 (register_size): Add target_desc parameter, and use it.
7740 (register_data, supply_register, supply_register_zeroed)
7741 (supply_regblock, supply_register_by_name, collect_register)
7742 (collect_register_as_string, collect_register_by_name): Adjust.
7743 * regcache.h (struct target_desc): Forward declare.
7744 (struct regcache) <tdesc>: New field.
7745 (init_register_cache, new_register_cache): Add target_desc
7746 parameter.
7747 (regcache_invalidate_thread): Declare.
7748 (regcache_invalidate_one): Delete declaration.
7749 (regcache_release): Declare.
7750 (find_register_by_number, register_cache_size, register_size)
7751 (find_regno): Add target_desc parameter.
7752 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7753 declarations.
7754 * remote-utils.c: Include tdesc.h.
7755 (outreg, prepare_resume_reply): Adjust.
7756 * server.c: Include tdesc.h.
7757 (gdbserver_xmltarget): Delete declaration.
7758 (get_features_xml, process_serial_event): Adjust.
7759 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7760 declare.
7761 (struct process_info) <tdesc>: New field.
7762 (ipa_tdesc): Declare.
7763 * tdesc.c: New file.
7764 * tdesc.h: New file.
7765 * tracepoint.c: Include tdesc.h.
7766 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7767 (get_context_regcache): Adjust to pass ipa_tdesc down.
7768 (do_action_at_tracepoint): Adjust to get the register cache size
7769 from the context regcache's description.
7770 (traceframe_walk_blocks): Adjust to get the register cache size
7771 from the current trace frame's description.
7772 (traceframe_get_pc): Adjust to get current trace frame's
7773 description and pass it down.
7774 (gdb_collect): Adjust to get the register cache size from the
7775 IPA's description.
7776 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7777 (gdbserver_xmltarget): Delete.
7778 (initialize_low_tracepoint): Set the ipa's target description.
7779 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7780 (initialize_low_tracepoint): Set the ipa's target description.
7781 * linux-x86-low.c: Include tdesc.h.
7782 [__x86_64__] (is_64bit_tdesc): New.
7783 (ps_get_thread_area, x86_get_thread_area): Use it.
7784 (i386_cannot_store_register): Rename to ...
7785 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7786 (i386_cannot_fetch_register): Rename to ...
7787 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7788 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7789 to new interface.
7790 (target_regsets): Rename to ...
7791 (x86_regsets): ... this.
7792 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7793 interface.
7794 (x86_siginfo_fixup): Use is_64bit_tdesc.
7795 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7796 (tdesc_x32_avx_linux, tdesc_x32_linux)
7797 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7798 Declare.
7799 (x86_linux_update_xmltarget): Delete.
7800 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7801 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7802 (AMD64_LINUX_USER64_CS): New.
7803 (x86_linux_read_description): New, based on
7804 x86_linux_update_xmltarget.
7805 (same_process_callback): New.
7806 (x86_arch_setup_process_callback): New.
7807 (x86_linux_update_xmltarget): New.
7808 (x86_regsets_info): New.
7809 (amd64_linux_regs_info): New.
7810 (i386_linux_usrregs_info): New.
7811 (i386_linux_regs_info): New.
7812 (x86_linux_regs_info): New.
7813 (x86_arch_setup): Reimplement.
7814 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7815 (x86_emit_ops): Ditto.
7816 (the_low_target): Adjust. Install x86_linux_regs_info,
7817 x86_cannot_fetch_register, and x86_cannot_store_register.
7818 (initialize_low_arch): New.
7819 * linux-ia64-low.c (tdesc_ia64): Declare.
7820 (ia64_fetch_register): Adjust.
7821 (ia64_usrregs_info, regs_info): New globals.
7822 (ia64_regs_info): New function.
7823 (the_low_target): Adjust.
7824 (initialize_low_arch): New function.
7825 * linux-sparc-low.c (tdesc_sparc64): Declare.
7826 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7827 Adjust.
7828 (sparc_arch_setup): New function.
7829 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7830 (the_low_target): Adjust.
7831 (initialize_low_arch): New function.
7832 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7833 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7834 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7835 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7836 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7837 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7838 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7839 (tdesc_powerpc_isa205_vsx64l): Declare.
7840 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7841 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7842 (ppc_set_pc, ppc_get_hwcap): Adjust.
7843 (ppc_usrregs_info): Forward declare.
7844 (!__powerpc64__) ppc_regmap_adjusted: New global.
7845 (ppc_arch_setup): Adjust to the current process'es target
7846 description.
7847 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7848 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7849 (ppc_store_evrregset): Adjust.
7850 (target_regsets): Rename to ...
7851 (ppc_regsets): ... this, and make static.
7852 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7853 (ppc_regs_info): New function.
7854 (the_low_target): Adjust.
7855 (initialize_low_arch): New function.
7856 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7857 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7858 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7859 (tdesc_s390x_linux64v2): Declare.
7860 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7861 (s390_fill_gregset, s390_store_last_break): Adjust.
7862 (target_regsets): Rename to ...
7863 (s390_regsets): ... this, and make static.
7864 (s390_get_pc, s390_set_pc): Adjust.
7865 (s390_get_hwcap): New target_desc parameter, and use it.
7866 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7867 (s390_arch_setup): Adjust to set the current process'es target
7868 description. Don't adjust the regmap.
7869 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7870 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7871 (regs_info_3264): New globals.
7872 (s390_regs_info): New function.
7873 (the_low_target): Adjust.
7874 (initialize_low_arch): New function.
7875 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7876 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7877 [__mips64] (init_registers_mips_linux)
7878 (init_registers_mips_dsp_linux): Delete defines.
7879 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7880 (have_dsp): New global.
7881 (mips_read_description): New, based on mips_arch_setup.
7882 (mips_arch_setup): Reimplement.
7883 (get_usrregs_info): New function.
7884 (mips_cannot_fetch_register, mips_cannot_store_register)
7885 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7886 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7887 (target_regsets): Rename to ...
7888 (mips_regsets): ... this, and make static.
7889 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7890 (dsp_regs_info, regs_info): New globals.
7891 (mips_regs_info): New function.
7892 (the_low_target): Adjust.
7893 (initialize_low_arch): New function.
7894 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7895 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7896 Declare.
7897 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7898 (arm_read_description): New, with bits factored from
7899 arm_arch_setup.
7900 (arm_arch_setup): Reimplement.
7901 (target_regsets): Rename to ...
7902 (arm_regsets): ... this, and make static.
7903 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7904 (arm_regs_info): New function.
7905 (the_low_target): Adjust.
7906 (initialize_low_arch): New function.
7907 * linux-m68k-low.c (tdesc_m68k): Declare.
7908 (target_regsets): Rename to ...
7909 (m68k_regsets): ... this, and make static.
7910 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7911 (m68k_regs_info): New function.
7912 (m68k_arch_setup): New function.
7913 (the_low_target): Adjust.
7914 (initialize_low_arch): New function.
7915 * linux-sh-low.c (tdesc_sharch): Declare.
7916 (target_regsets): Rename to ...
7917 (sh_regsets): ... this, and make static.
7918 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7919 (sh_regs_info, sh_arch_setup): New functions.
7920 (the_low_target): Adjust.
7921 (initialize_low_arch): New function.
7922 * linux-bfin-low.c (tdesc_bfin): Declare.
7923 (bfin_arch_setup): New function.
7924 (bfin_usrregs_info, regs_info): New globals.
7925 (bfin_regs_info): New function.
7926 (the_low_target): Adjust.
7927 (initialize_low_arch): New function.
7928 * linux-cris-low.c (tdesc_cris): Declare.
7929 (cris_arch_setup): New function.
7930 (cris_usrregs_info, regs_info): New globals.
7931 (cris_regs_info): New function.
7932 (the_low_target): Adjust.
7933 (initialize_low_arch): New function.
7934 * linux-cris-low.c (tdesc_crisv32): Declare.
7935 (cris_arch_setup): New function.
7936 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7937 (cris_regs_info): New function.
7938 (the_low_target): Adjust.
7939 (initialize_low_arch): New function.
7940 * linux-m32r-low.c (tdesc_m32r): Declare.
7941 (m32r_arch_setup): New function.
7942 (m32r_usrregs_info, regs_info): New globals.
7943 (m32r_regs_info): Adjust.
7944 (initialize_low_arch): New function.
7945 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7946 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7947 (tic6x_usrregs_info): Forward declare.
7948 (tic6x_read_description): New function, based on ...
7949 (tic6x_arch_setup): ... this. Reimplement.
7950 (target_regsets): Rename to ...
7951 (tic6x_regsets): ... this, and make static.
7952 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7953 (tic6x_regs_info): New function.
7954 (the_low_target): Adjust.
7955 (initialize_low_arch): New function.
7956 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7957 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7958 (target_regsets): Rename to ...
7959 (xtensa_regsets): ... this, and make static.
7960 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7961 globals.
7962 (xtensa_arch_setup, xtensa_regs_info): New functions.
7963 (the_low_target): Adjust.
7964 (initialize_low_arch): New function.
7965 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7966 (nios2_arch_setup): Set the current process'es tdesc.
7967 (target_regsets): Rename to ...
7968 (nios2_regsets): ... this.
7969 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7970 (nios2_regs_info): New function.
7971 (the_low_target): Adjust.
7972 (initialize_low_arch): New function.
a261b8f5
PA
7973 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7974 (aarch64_arch_setup): Set the current process'es tdesc.
7975 (target_regsets): Rename to ...
7976 (aarch64_regsets): ... this.
7977 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7978 (aarch64_regs_info): New function.
7979 (the_low_target): Adjust.
7980 (initialize_low_arch): New function.
3aee8918
PA
7981 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7982 globals.
7983 (target_regsets): Rename to ...
7984 (tile_regsets): ... this.
7985 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7986 (tile_regs_info): New function.
7987 (tile_arch_setup): Set the current process'es tdesc.
7988 (the_low_target): Adjust.
7989 (initialize_low_arch): New function.
7990 * spu-low.c (tdesc_spu): Declare.
7991 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7992 * win32-arm-low.c (tdesc_arm): Declare.
7993 (arm_arch_setup): New function.
7994 (the_low_target): Install arm_arch_setup instead of
7995 init_registers_arm.
7996 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7997 (init_windows_x86): Rename to ...
7998 (i386_arch_setup): ... this. Set `win32_tdesc'.
7999 (the_low_target): Adjust.
8000 * win32-low.c (win32_tdesc): New global.
8001 (child_add_thread): Don't create the thread cache here.
8002 (do_initial_child_stuff): Set the new process'es tdesc.
8003 * win32-low.h (struct target_desc): Forward declare.
8004 (win32_tdesc): Declare.
8005 * lynx-i386-low.c (tdesc_i386): Declare global.
8006 (lynx_i386_arch_setup): Set `lynx_tdesc'.
8007 * lynx-low.c (lynx_tdesc): New global.
8008 (lynx_add_process): Set the new process'es tdesc.
8009 * lynx-low.h (struct target_desc): Forward declare.
8010 (lynx_tdesc): Declare global.
8011 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8012 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8013 * nto-low.c (nto_tdesc): New global.
8014 (do_attach): Set the new process'es tdesc.
8015 * nto-low.h (struct target_desc): Forward declare.
8016 (nto_tdesc): Declare.
8017 * nto-x86-low.c (tdesc_i386): Declare.
8018 (nto_x86_arch_setup): Set `nto_tdesc'.
8019
b1fbec62
GB
80202013-06-04 Gary Benson <gbenson@redhat.com>
8021
8022 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8023 to qSupported response when appropriate.
8024 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8025 with nonzero-length annex.
8026 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8027 arguments supplied in annex.
8028
d1ec4ce7
DE
80292013-05-31 Doug Evans <dje@google.com>
8030
ac44adcb 8031 PR server/15594
d1ec4ce7
DE
8032 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
8033 64 bits in 64-cross-32 environment.
8034
9b25f2d3
PA
80352013-05-28 Pedro Alves <palves@redhat.com>
8036
8037 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
8038 (aarch64-without-fpu.c): Delete rule.
8039 * configure.srv (aarch64*-*-linux*): Remove references to
8040 aarch64-without-fpu.o and aarch64-without-fpu.xml.
8041 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
8042 declaration.
8043
6740dc9c
PA
80442013-05-24 Pedro Alves <palves@redhat.com>
8045
8046 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8047 instead of strchr/decode_address. Error if the range isn't split
8048 with a ','. Don't assume there's be a ':' in the action.
8049
c2d6af84
PA
80502013-05-23 Yao Qi <yao@codesourcery.com>
8051 Pedro Alves <palves@redhat.com>
8052
8053 * linux-low.c (lwp_in_step_range): New function.
8054 (linux_wait_1): If the thread was range stepping and stopped
8055 outside the stepping range, report the stop to GDB. Otherwise,
8056 continue stepping. Add range stepping debug output.
8057 (linux_set_resume_request): Copy the step range from the resume
8058 request to the lwp.
8059 (linux_supports_range_stepping): New.
8060 (linux_target_ops) <supports_range_stepping>: Set to
8061 linux_supports_range_stepping.
8062 * linux-low.h (struct linux_target_ops)
8063 <supports_range_stepping>: New field.
8064 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8065 * linux-x86-low.c (x86_supports_range_stepping): New.
8066 (the_low_target) <supports_range_stepping>: Set to
8067 x86_supports_range_stepping.
8068 * server.c (handle_v_cont): Handle 'r' action.
8069 (handle_v_requests): Append ";r" if the target supports range
8070 stepping.
8071 * target.h (struct thread_resume) <step_range_start,
8072 step_range_end>: New fields.
8073 (struct target_ops) <supports_range_stepping>:
8074 New field.
8075 (target_supports_range_stepping): New macro.
8076
58794e1a
JB
80772013-05-17 Joel Brobecker <brobecker@adacore.com>
8078
8079 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8080 confusion in comment.
8081
d631c5a7
JB
80822013-05-17 Joel Brobecker <brobecker@adacore.com>
8083
8084 * lynx-low.c (struct process_info_private): New type.
8085 (lynx_add_process): New function.
8086 (lynx_create_inferior, lynx_attach): Replace calls to
8087 add_process by calls to lynx_add_process.
8088 (lynx_resume): If PTID is null, then try using
8089 current_process()->private->last_wait_event_ptid.
8090 Add comments.
8091 (lynx_clear_inferiors): Delete. The contents of that function
8092 has been inlined in lynx_mourn;
8093 (lynx_wait_1): Save the ptid in the process's private data.
8094 (lynx_mourn): Free the process' private data. Replace call
8095 to lynx_clear_inferiors by call to clear_inferiors.
8096
96f7a20f
YQ
80972013-05-17 Yao Qi <yao@codesourcery.com>
8098
8099 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8100 the right place.
8101
db0dfaa0
LM
81022013-05-16 Luis Machado <lgustavo@codesourcery.com>
8103
8104 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8105 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8106 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8107 PT_TEXT_END_ADDR guards. Update comments.
8108 (linux_target_op) <read_offsets>: Conditionally define to
8109 linux_read_offsets if the target is UCLIBC and if it defines
8110 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8111
68f5f838
SL
81122013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8113 Andrew Jenner <andrew@codesourcery.com>
8114
8115 * Makefile.in (SFILES): Add linux-nios2-low.c.
8116 (clean): Add action to delete nios2-linux.c.
8117 (nios2-linux.c): New rule.
8118 * configure.srv: Add nios2*-*-linux*.
8119 * linux-nios2-low.c: New.
8120
1ebff1fd
HAQ
81212013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8122
8123 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8124
f6150862
HZ
81252013-04-25 Hui Zhu <hui@codesourcery.com>
8126
8127 PR gdb/15186
f6150862
HZ
8128 * ax.c (ax_printf): Add fflush.
8129
614c279d
TT
81302013-04-22 Tom Tromey <tromey@redhat.com>
8131
8132 * Makefile.in (SFILES): Add filestuff.c.
8133 (OBS): Add filestuff.o.
8134 (filestuff.o): New target.
8135 * config.in, configure: Rebuild.
8136 * configure.ac: Check for fdwalk, pipe2.
8137
7d4e5717
PA
81382013-04-17 Pedro Alves <palves@redhat.com>
8139
8140 * configure.ac (USE_THREAD_DB): Delete variable.
8141 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8142 Don't AC_SUBST USE_THREAD_DB.
8143 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8144 * config.in, configure: Regenerate.
8145
d5c93e41
PA
81462013-04-16 Pedro Alves <palves@redhat.com>
8147
8148 * linux-low.h (struct lwp_info) <thread_known>: Move under
8149 the USE_THREAD_DB #ifdef.
8150
04f5fe89
PA
81512013-04-16 Pedro Alves <palves@redhat.com>
8152
8153 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8154 (linux-low.o): Delete rule.
8155 * linux-low.h: Always include "gdb_thread_db.h" instead of
8156 conditionally including thread_db.h.
8157 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8158 HAVE_THREAD_DB_H.
8159
480b27bf
JK
81602013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8161
8162 * Makefile.in (install-only): Fix make install regression.
8163
43662968
JK
81642013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8165
8166 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8167 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8168 installation.
8169 * gdbserver.1: Remove.
8170
3e74e146
PA
81712013-03-22 Pedro Alves <palves@redhat.com>
8172
8173 * linux-low.c (handle_extended_wait): Don't call
8174 linux_enable_event_reporting.
8175
a8347a2a
TT
81762013-03-15 Tony Theodore <tonyt@logyst.com>
8177
8178 PR build/9098:
8179 * Makefile.in (SHELL): Use @SHELL@.
8180
eeb56fa7
SDJ
81812013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8182
8183 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8184 compiler warning.
8185
4fa7e2ff
JB
81862013-03-13 Joel Brobecker <brobecker@adacore.com>
8187
8188 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8189 Remove extraneous NULL element.
8190
8ddb1965
YQ
81912013-03-13 Yao Qi <yao@codesourcery.com>
8192
8193 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8194 'V' block in trace frame.
8195
9accd112
MM
81962013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8197
8198 * target.h (struct target_ops): Add btrace ops.
8199 (target_supports_btrace): New macro.
8200 (target_enable_btrace): New macro.
8201 (target_disable_btrace): New macro.
8202 (target_read_btrace): New macro.
8203 * gdbthread.h (struct thread_info): Add btrace field.
8204 * server.c: Include btrace-common.h.
8205 (handle_btrace_general_set): New function.
8206 (handle_btrace_enable): New function.
8207 (handle_btrace_disable): New function.
8208 (handle_general_set): Call handle_btrace_general_set.
8209 (handle_qxfer_btrace): New function.
8210 (struct qxfer qxfer_packets[]): Add btrace entry.
8211 * inferiors.c (remove_thread): Disable btrace.
8212 * linux-low: Include linux-btrace.h.
8213 (linux_low_enable_btrace): New function.
8214 (linux_low_read_btrace): New function.
8215 (linux_target_ops): Add btrace ops.
8216 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8217 Add srv_linux_btrace=yes.
8218 (x86_64-*-linux*): Add linux-btrace.o.
8219 Add srv_linux_btrace=yes.
8220 * configure.ac: Define HAVE_LINUX_BTRACE.
8221 * config.in: Regenerated.
8222 * configure: Regenerated.
8223
5cc22e4c
MM
82242013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8225
8226 * server.c (handle_qxfer): Preserve error message if -3 is
8227 returned.
8228 (qxfer): Document the -3 return value.
8229
7c97f91e
MM
82302013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8231
8232 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8233 (linux_btrace_h): New variable.
8234 (linux-btrace.o): New rule.
8235
be9a119c 82362013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8237 Hafiz Abid Qadeer <abidh@codesourcery.com>
8238
8239 * tracepoint.c (trace_buffer_size): New global.
8240 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8241 (init_trace_buffer): Change to one-argument function. Allocate
8242 trace buffer memory.
8243 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8244 handle QTBuffer:size packet.
8245 (cmd_bigqtbuffer_size): New function.
8246 (initialize_tracepoint): Call init_trace_buffer with
8247 DEFAULT_TRACE_BUFFER_SIZE.
8248 * server.c (handle_query): Add QTBuffer:size in the
8249 supported packets.
8250
e64f7499
YQ
82512013-03-07 Yao Qi <yao@codesourcery.com>
8252
8253 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8254 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8255 of -1.
8256 (cmd_qtsp): Adjust condition. Do post increment.
8257 Set cur_action and cur_step_action back to 0.
8258
f0ae6fc3
PA
82592013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8260
8261 PR server/15236
8262 * linux-low.c (linux_write_memory): Return early success if LEN is
8263 zero.
8264
b5b0b0af
CV
82652013-03-05 Corinna Vinschen <vinschen@redhat.de>
8266
334ad4a8 8267 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8268
589bc927
TT
82692013-02-28 Tom Tromey <tromey@redhat.com>
8270
8271 * configure.ac: Invoke AC_SYS_LARGEFILE.
8272 * configure, config.in: Rebuild.
8273
dfe07582
CV
82742013-02-28 Corinna Vinschen <vinschen@redhat.com>
8275
8276 * win32-low.c: Throughout, fix format strings and casts of
8277 printf-like functions to avoid type related warnings on all
8278 platforms.
8279 (get_child_debug_event): Print dwDebugEventCode as hex since
8280 that's how it's usually documented.
8281
736cd585
YQ
82822013-02-28 Yao Qi <yao@codesourcery.com>
8283
8284 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8285 pulongest.
8286
e1f58301
JW
82872013-02-27 Jiong Wang <jiwang@tilera.com>
8288
8289 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8290 (reg-tilegx32.c): New rule.
8291 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8292 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8293 different register info initializer according to elf class.
8294 (init_registers_tilgx32): New function. The tilegx32 register info
8295 initializer.
8296 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8297 (tile_store_gregset): Likewise.
8298
d171ca78
YQ
82992013-02-27 Yao Qi <yao@codesourcery.com>
8300
8301 * server.c (process_point_options): Print debug message when
8302 debug_threads is true.
8303
282bbdf3
YQ
83042013-02-26 Yao Qi <yao@codesourcery.com>
8305
8306 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8307
aca22551
PA
83082013-02-19 Pedro Alves <palves@redhat.com>
8309 Kai Tietz <ktietz@redhat.com>
8310
8311 PR gdb/15161
8312
8313 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8314 instead of strtoul to extract address from packet.
8315 (process_serial_event) <'z'>: Likewise.
8316
4f3cee1c
YQ
83172013-02-18 Yao Qi <yao@codesourcery.com>
8318
8319 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8320
8e1d55a3
PA
83212013-02-14 Pedro Alves <palves@redhat.com>
8322
8323 Plug memory leak.
8324
8325 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8326 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8327
458820da
PA
83282013-02-14 Pedro Alves <palves@redhat.com>
8329
8330 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8331
baea0dae
PA
83322013-02-14 Pedro Alves <palves@redhat.com>
8333
8334 * tracepoint.c (save_string): Delete.
8335 (add_tracepoint_action): Use savestring instead of save_string.
8336
0b1afbb3
PA
83372013-02-12 Pedro Alves <palves@redhat.com>
8338
8339 * linux-xtensa-low.c: Ditto.
8340 * xtensa-xtregs.c: Ditto.
8341
8a4ac37e
PA
83422013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8343
8344 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8345 thread_db.
8346
148de6bb
MS
83472013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8348
8349 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8350 aarch64_num_wp_regs and aarch64_num_bp_regs to
8351 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8352
55fac6e0
MS
83532013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8354
8355 * linux-aarch64-low.c (ps_get_thread_area): Replace
8356 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8357
176eb98c
MS
83582013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8359 Marcus Shawcroft <marcus.shawcroft@arm.com>
8360 Nigel Stephens <nigel.stephens@arm.com>
8361 Yufeng Zhang <yufeng.zhang@arm.com>
8362
8363 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8364 (aarch64.c, aarch64-without-fpu.c): New targets.
8365 * configure.srv (aarch64*-*-linux*): New.
8366 * linux-aarch64-low.c: New file.
8367
56f7af9c
MS
83682013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8369
43aaf8b6 8370 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8371 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8372 (dequeue_one_deferred_signal, linux_resume_one_thread)
8373 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8374 (linux_tracefork_grandchild, linux_test_for_tracefork)
8375 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8376 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8377 where the argument is 0.
8378
60f662b0
YQ
83792013-01-25 Yao Qi <yao@codesourcery.com>
8380
8381 * event-loop.c: Include "queue.h".
8382 (gdb_event_p): New typedef.
8383 (struct gdb_event) <next_event>: Remove.
8384 (event_queue): Change to QUEUE(gdb_event_p).
8385 (async_queue_event): Remove.
8386 (gdb_event_xfree): New.
8387 (initialize_event_loop): New.
8388 (process_event): Use API from QUEUE.
8389 (wait_for_event): Likewise.
8390 * server.c (main): Call initialize_event_loop.
8391 * server.h (initialize_event_loop): Declare.
8392
5ae4861a
YQ
83932013-01-18 Yao Qi <yao@codesourcery.com>
8394
8395 * ax.h (struct eval_agent_expr_context): New.
8396 (gdb_eval_agent_expr): Update declaration.
8397 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8398 TFRAME. Add new argument CTX.
8399 * server.h (struct eval_agent_expr_context): Declare.
8400 (agent_mem_read, agent_tsv_read): Update declaration.
8401 (agent_mem_read_string): Likewise.
8402 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8403 (add_traceframe_block): Add new argument TPOINT.
8404 Increase TPOINT->traceframe_usage.
8405 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8406 eval_tracepoint_agent_expr.
8407 (condition_true_at_tracepoint): Likewise.
8408 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8409 (agent_mem_read_string, agent_tsv_read): Likewise.
8410
85e00e85
YQ
84112013-01-16 Yao Qi <yao@codesourcery.com>
8412
8413 * linux-low.c (linux_resume_one_lwp): Don't check
8414 'lwp->bp_reinsert != 0'.
8415
4039cf45
JB
84162013-01-07 Joel Brobecker <brobecker@adacore.com>
8417 Pedro Alves <palves@redhat.com>
8418
8419 * lynx-low.c (ptrace_request_to_str): Define a temporary
8420 macro and use it to simplify this function's implementation.
8421
9044dee2
JB
84222013-01-07 Joel Brobecker <brobecker@adacore.com>
8423
8424 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8425 sets errno.
8426
e6352c8f
JB
84272013-01-07 Joel Brobecker <brobecker@adacore.com>
8428
8429 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8430
50681a27
JB
84312013-01-07 Joel Brobecker <brobecker@adacore.com>
8432
8433 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8434
3f6e77ef
JB
84352013-01-07 Joel Brobecker <brobecker@adacore.com>
8436
8437 * lynx-low.c (lynx_resume): Use the resume_info parameter
8438 to determine the ptid for the lynx_ptrace call, unless
8439 it is equal to minus_one_ptid, in which case we use the
8440 ptid of the current_inferior.
8441 (lynx_wait_1): After having received a thread create/exit
8442 event, resume the inferior's execution using the signaling
8443 thread's ptid, rather than the old ptid.
8444
7fda33ae
JB
84452013-01-07 Joel Brobecker <brobecker@adacore.com>
8446
8447 * lynx-low.c (lynx_resume): Delete variable ret.
8448
b9786c74
JB
84492013-01-01 Joel Brobecker <brobecker@adacore.com>
8450
8451 * gdbreplay.c (gdbreplay_version): Update copyright year.
8452 * server.c (gdbserver_version): Likewise.
8453
8b93d60f
JB
84542012-12-17 Joel Brobecker <brobecker@adacore.com>
8455
8456 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8457 new thread.
8458
037335a7
JB
84592012-12-17 Joel Brobecker <brobecker@adacore.com>
8460
8461 * lynx-low.c (ptrace_request_to_str): Add handling for
8462 PTRACE_GETTRACESIG.
8463
52d4cbd8
JB
84642012-12-17 Joel Brobecker <brobecker@adacore.com>
8465
8466 * lynx-low.c (lynx_attach): Delete variable new_process.
8467
ab8f6ca9
JB
84682012-12-17 Joel Brobecker <brobecker@adacore.com>
8469
8470 * lynx-low.c (lynx_create_inferior): Delete variable
8471 new_process.
8472
78cbc024
JB
84732012-12-17 Joel Brobecker <brobecker@adacore.com>
8474
8475 * lynx-low.c (ptrace_request_to_str): Do not handle
8476 PTRACE_GETTHREADLIST if this macro does not exist.
8477
14a00470
YQ
84782012-12-15 Yao Qi <yao@codesourcery.com>
8479
8480 * Makefile.in (OBS): Add notif.o.
8481 * notif.c, notif.h: New.
8482 * server.c: Include "notif.h".
8483 (struct vstop_notif) <next>: Remove.
8484 <base>: New field.
8485 (queue_stop_reply): Update.
8486 (push_event, send_next_stop_reply): Remove.
8487 (discard_queued_stop_replies): Update.
8488 (notif_stop): New variable.
8489 (handle_v_stopped): Remove.
8490 (handle_v_requests): Don't call handle_v_stopped. Call
8491 handle_ack_notif instead.
8492 (queue_stop_reply_callback): Call notif_event_enque instead
8493 of queue_stop_reply.
8494 (handle_status): Don't call send_next_stop_reply, call
8495 notif_write_event instead.
8496 (kill_inferior_callback): Likewise.
8497 (detach_or_kill_inferior_callback): Likewise.
8498 (main): Call initialize_notif.
8499 (process_serial_event): Call QUEUE_is_empty.
8500 (handle_target_event): Call notif_push instead of push event.
8501 * server.h (push_event): Remove declaration.
8502
61c125b9
TT
85032012-12-10 Tom Tromey <tromey@redhat.com>
8504
8505 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8506 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8507 macros.
8508 (.c.o): Rewrite.
8509 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8510 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8511 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8512 (amd64-linux-ipa.o, ax.o): Rewrite.
8513 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8514 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8515 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8516 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8517 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8518 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8519 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8520 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8521 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8522 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8523 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8524 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8525 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8526 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8527 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8528 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8529 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8530 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8531 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8532 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8533 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8534 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8535 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8536 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8537 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8538 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8539 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8540 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8541 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8542 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8543 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8544 (reg-tilegx.o): Remove.
8545 (all_object_files): New macro.
8546 Include .deps files.
8547 * aclocal.m4, configure: Rebuild.
8548 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8549 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8550 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8551
e90e9ad9
TT
85522012-12-05 Tom Tromey <tromey@redhat.com>
8553
8554 PR gdb/14917:
8555 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8556
02d403bf 85572012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8558
8559 * configure.ac: Check for linux/perf_event.h.
8560 * config.in: Regenerated.
8561 * configure: Regenerated.
8562
0270a750
PA
85632012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8564
8565 * hostio.c (handle_readlink): Decrease buffer size
8566 parameter passed to readlink by one byte.
8567
8c29b58e
YQ
85682012-11-26 Yao Qi <yao@codesourcery.com>
8569
8570 * configure.ac (build_warnings): Append '-Wempty-body'.
8571 * configure: Regenerated.
8572 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8573 body.
8574
8bdce1ff
PM
85752012-11-15 Pierre Muller <muller@sourceware.org>
8576
8577 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8578 * config.in: Regenerate.
8579 * configure: Regenerate.
8580 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8581 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8582 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8583 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8584 header.
8585 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8586 instead of <sys/wait.h> header.
8587 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8588
02d403bf 85892012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8590
8591 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8592 (various make rules): Remove -DGDBSERVER
8593
fbd5db48
YQ
85942012-11-09 Yao Qi <yao@codesourcery.com>
8595
8596 * spu-low.c (current_ptid): Move it to ..
8597 * gdbthread.h: ... here. New.
8598 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8599 * server.c (myresume, process_serial_event): Likewise.
8600 * thread-db.c (thread_db_find_new_threads): Likewise.
8601 * tracepoint.c (run_inferior_command): Likewise.
8602
b3dc46ff
AB
86032012-10-01 Andrew Burgess <aburgess@broadcom.com>
8604
8605 * server.c (handle_search_memory_1): Include access length in
8606 warning message.
8607
07c04788
HPN
86082012-09-05 Michael Brandt <michael.brandt@axis.com>
8609
8610 * linux-crisv32-low.c: Fix compile errors.
8611
918d227b
YQ
86122012-09-04 Yao Qi <yao@codesourcery.com>
8613
8614 * tracepoint.c (cmd_qtsv): Adjust debug message.
8615 Don't check CUR_TPOINT.
8616
18c1b81a
YQ
86172012-08-28 Yao Qi <yao@codesourcery.com>
8618
8619 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8620 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8621 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8622 Remove declarations of xmalloc, xreallloc, xstrdup and
8623 freeargv.
8624 * Makefile.in (libiberty_h): New.
8625 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8626 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8627
dc82f37b
YQ
86282012-08-23 Yao Qi <yao@codesourcery.com>
8629
8630 * server.h: Remove declaration of 'xsnprintf'.
8631
406b1477
KS
86322012-08-22 Keith Seitz <keiths@redhat.com>
8633
8634 * server.h: Include build-gnulib-gbserver/config.h.
8635 * gdbreplay.c: Likewise.
8636
e6712ff1
DE
86372012-08-08 Doug Evans <dje@google.com>
8638
8639 * Makefile.in (SFILES): Add gdb_vecs.c.
8640 (OBS): Add gdb_vecs.o.
8641 (gdb_vecs_h, host_defs_h): New variables.
8642 (thread-db.o): Add $(gdb_vecs_h) dependency.
8643 (gdb_vecs.o): New rule.
8644 * thread-db.c: #include "gdb_vecs.h".
8645 (thread_db_load_search): Use a vector to iterate over path elements.
8646 Handle text appearing after "$pdir".
8647
8648 * configure.ac: Add check for strstr.
8649 * config.in: Regenerate.
8650 * configure: Regenerate.
8651
7c3270ae
UW
86522012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8653
8654 * hostio.c (handle_pread): If pread fails, fall back to attempting
8655 lseek/read.
8656 (handle_pwrite): Likewise for pwrite.
8657
b62e2b27
UW
86582012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8659
8660 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8661 between unsupported TYPE and unimplementable ADDR/LEN combination.
8662 (arm_insert_point): Act on new return value.
8663
78a99e91
PA
86642012-07-31 Pedro Alves <palves@redhat.com>
8665
8666 * server.c (process_point_options): Only skip tokens if we find
8667 one that is unrecognized. Don't treat 'X' specially while
8668 skipping unrecognized tokens.
8669
fcf303ab
UW
86702012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8671
8672 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8673 to 4-byte-align HW breakpoint addresses for Thumb.
8674
7255706c
YQ
86752012-07-27 Yao Qi <yao@codesourcery.com>
8676
8677 PR remote/14161.
8678
8679 * server.h: Declare gdb_agent_about_to_close.
8680 * target.c (kill_inferior): Include "agent.h".
8681 New. Send command 'kill'.
8682 * target.h (kill_inferior): Removed macro.
8683 * tracepoint.c (gdb_agent_about_to_close): New.
8684 (gdb_agent_helper_thread): Handle command 'close'.
8685 Wait endlessly until the inferior stops.
8686 Install gdb_agent_remove_socket to atexit hook.
8687 (agent_socket_name): New static variable.
8688 (gdb_agent_socket_init): Replace local variable 'name' with
8689 'agent_socket_name'.
8690 (gdb_agent_remove_socket): New.
8691
5a3f286f
YQ
86922012-07-27 Yao Qi <yao@codesourcery.com>
8693
8694 * server.c (process_point_options): Stop at 'X' when parsing.
8695
961bd387
ME
86962012-07-19 Michael Eager <eager@eagercon.com>
8697
a261b8f5 8698 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8699 to hw_execute.
8700 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8701 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8702 hardware breakpoint.
8703
aa7c7447
JK
87042012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8705
8706 * gdbserver/linux-low.c (initialize_low): Call
8707 linux_ptrace_init_warnings.
8708
7f216e7c
DE
87092012-07-02 Doug Evans <dje@google.com>
8710
8711 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8712 pointer to int.
8713
d3ce09f5
SS
87142012-07-02 Stan Shebs <stan@codesourcery.com>
8715
8716 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8717 (ax.o): Add it to build rule.
8718 (ax-ipa.o): Ditto.
8719 (OBS): Add format.o.
8720 (IPA_OBS): Add format.o.
8721 * server.c (handle_query): Claim support for breakpoint commands.
8722 (process_point_options): Add command case.
8723 (process_serial_event): Leave running if there are printfs in
8724 effect.
8725 * mem-break.h (any_persistent_commands): Declare.
8726 (add_breakpoint_commands): Declare.
8727 (gdb_no_commands_at_breakpoint): Declare.
8728 (run_breakpoint_commands): Declare.
8729 * mem-break.c (struct point_command_list): New struct.
8730 (struct breakpoint): New field command_list.
8731 (any_persistent_commands): New function.
8732 (add_commands_to_breakpoint): New function.
8733 (add_breakpoint_commands): New function.
8734 (gdb_no_commands_at_breakpoint): New function.
8735 (run_breakpoint_commands): New function.
8736 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8737 locally.
8738 * ax.c: Include format.h.
8739 (ax_printf): New function.
8740 (gdb_eval_agent_expr): Add printf opcode.
8741
2f8f6aed
YQ
87422012-06-13 Yao Qi <yao@codesourcery.com>
8743
8744 * server.c (start_inferior): Remove duplicated writes to fields
8745 'last_resume_kind' and 'last_status' of 'current_inferior'.
8746
0c9070b3
YQ
87472012-06-12 Yao Qi <yao@codesourcery.com>
8748 Pedro Alves <palves@redhat.com>
8749
8750 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8751 comment.
8752 * server.c (handle_v_cont): Extend comment.
8753
c52daf70
YQ
87542012-06-11 Yao Qi <yao@codesourcery.com>
8755
8756 * linux-low.c (linux_attach): Add 'static'.
8757
d38bbb0a
YQ
87582012-06-06 Yao Qi <yao@codesourcery.com>
8759
8760 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8761
89dc0afd
JK
87622012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8763
8764 Fix gcc -flto compilation warning.
8765 * server.c (main): Make variable multi_mode and attach volatile.
8766
75f62ce7
TJB
87672012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8768
8769 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8770 if the platform doesn't know about it.
8771
65f479b6
PA
87722012-05-30 Jeff Kenton <jkenton@tilera.com>
8773
8774 * Makefile.in (SFILES): Add linux-tile-low.c.
8775 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8776 * configure.srv: Handle tilegx-*-linux*.
8777 * linux-tile-low.c: New file.
8778
0c5bf5a9
JK
87792012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8780
8781 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8782
a493e3e2
PA
87832012-05-24 Pedro Alves <palves@redhat.com>
8784
8785 PR gdb/7205
8786
43aaf8b6 8787 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8788
2ea28649
PA
87892012-05-24 Pedro Alves <palves@redhat.com>
8790
8791 PR gdb/7205
8792
8793 Replace target_signal with gdb_signal throughout.
8794
8d409d16
MR
87952012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8796
8797 * linux-low.c (linux_store_registers): Avoid the copying sequence
8798 when no data has been retrieved by ptrace.
8799
23512c01
MGD
88002012-05-22 Will Deacon <will.deacon@arm.com>
8801
8802 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8803 Include asm/ptrace.h.
8804 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8805 already defined.
8806
4934b29e
MR
88072012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8808
8809 * linux-low.c (linux_store_registers): Don't re-retrieve data
8810 with ptrace that has already been obtained from /proc. Always
8811 copy any data retrieved with ptrace to the buffer supplied.
8812
bde24c0a
PA
88132012-05-11 Yao Qi <yao@codesourcery.com>
8814 Pedro Alves <palves@redhat.com>
8815
8816 * linux-low.c (enum stopping_threads_kind): New.
8817 (stopping_threads): Change type to `enum stopping_threads_kind'.
8818 (handle_extended_wait): If stopping and suspending threads, leave
8819 the new_lwp suspended too.
8820 (linux_wait_for_event): Adjust.
8821 (stop_all_lwps): Set `stopping_threads' to
8822 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8823 whether we're suspending threads or just stopping them. Assert no
8824 recursion happens.
8825
623b6bdf
YQ
88262012-04-29 Yao Qi <yao@codesourcery.com>
8827
8828 * server.h: Move some code to ...
8829 * gdbthread.h: ... here. New.
8830 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8831 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8832 (nto-low.o, win32-low.o): Likewise.
8833 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8834 * regcache.c, remote-utils.c, server.c: Likewise.
8835 * target.c, tracepoint.c, win32-low.c: Likewise.
8836
f15f9948
TJB
88372012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8838
8839 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8840 (PTRACE_ARG4_TYPE): Likewise.
8841 (PTRACE_XFER_TYPE): Likewise.
8842 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8843 ptrace to PTRACE_ARG3_TYPE.
8844 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8845 (PTRACE_ARG4_TYPE): Likewise.
8846 (PTRACE_XFER_TYPE): Likewise.
8847 (linux_detach_one_lwp): Cast fourth argument of
8848 ptrace to long then PTRACE_ARG4_TYPE.
8849 (regsets_fetch_inferior_registers): Cast third argument of
8850 ptrace to long then PTRACE_ARG3_TYPE.
8851 (regsets_store_inferior_registers): Likewise.
8852
38ea300a
PA
88532012-04-20 Pedro Alves <palves@redhat.com>
8854
8855 * configure: Regenerate.
8856
c971b7fa
PA
88572012-04-19 Pedro Alves <palves@redhat.com>
8858
43aaf8b6 8859 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8860 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8861 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8862 (all, install-only, uninstall, clean-info, all-lib, clean): No
8863 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8864 (maintainer-clean realclean distclean): Use subdir_do.
8865 (subdir_do): New.
8866 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8867 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8868 * acinclude.m4: Include acx_configure_dir.m4.
8869 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8870 calls. Call AC_PROG_RANLIB. Configure gnulib using
8871 ACX_CONFIGURE_DIR.
8872 (GNULIB): New.
8873 (GNULIB_STDINT_H): Adjust.
8874 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8875 * gdbreplay.c: Include build-gnulib/config.h.
8876 * server.h: Likewise.
8877 * aclocal.m4: Regenerate.
8878 * config.in: Regenerate.
8879 * configure: Regenerate.
c971b7fa 8880
809277f8
PA
88812012-04-19 Pedro Alves <palves@redhat.com>
8882
8883 * Makefile.in (LIBGNU, INCGNU): Adjust.
8884 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8885 (all, install-only, uninstall, clean-info, all-lib, clean)
8886 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8887 * configure.ac: Adjust AC_OUTPUT output.
8888 * aclocal.m4: Regenerate.
8889 * configure: Regenerate.
8890
fd9bb8b8
PA
88912012-04-19 Pedro Alves <palves@redhat.com>
8892
8893 * Makefile.in (generated_files): New.
8894 (server_h): Remove the explicit dependency on config.h, and depend
8895 on $generated_files.
8896
1c298c66
PA
88972012-04-19 Pedro Alves <palves@redhat.com>
8898
8899 * Makefile.in (INCGNU): Add -Ignulib.
8900
57c4b50b
PA
89012012-04-19 Pedro Alves <palves@redhat.com>
8902
8903 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8904 (INCGNU): ... this, and spell out -I here.
8905 (GNULIB_LIB): Rename to ...
8906 (LIBGNU): ... this.
8907 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8908
1030e047
PA
89092012-04-19 Pedro Alves <palves@redhat.com>
8910
8911 * config.in: Regenerate.
8912
447d4319
PA
89132012-04-19 Pedro Alves <palves@redhat.com>
8914
8915 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8916 * server.h (memmem): Remove declaration.
8917 * config.in: Regenerate.
8918 * configure: Regenerate.
8919
aad9eab9
YQ
89202012-04-19 Yao Qi <yao@codesourcery.com>
8921
8922 * Makefile.in (SFILES): Add common/vec.c.
8923 (OBS): Add vec.o.
8924 (vec.o): New rule.
8925
3e10640f
YQ
89262012-04-19 Yao Qi <yao@codesourcery.com>
8927
8928 * remote-utils.c (prepare_resume_reply): Replace with macro
8929 target_core_of_thread.
8930 * server.c (handle_qxfer_threads_proper): Likewise.
8931 * target.h (traget_core_of_thread): New macro.
8932
71622373
PA
89332012-04-18 Pedro Alves <palves@redhat.com>
8934
8935 * aclocal.m4: Regenerate.
8936 * configure: Regenerate.
8937
80d26939
YQ
89382012-04-16 Yao Qi <yao@codesourcery.com>
8939
8940 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8941 duplicated on address.
8942
42476b70
YQ
89432012-04-16 Yao Qi <yao@codesourcery.com>
8944
8945 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8946 (struct tracepoint_action_ops) <send>: New field.
8947 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8948 (agent_expr_send, x_tracepoint_action_send): New.
8949 (l_tracepoint_action_send): New.
8950 (cmd_qtdp): Download and install tracepoint
8951 according to `use_agent'.
8952 (run_inferior_command): Add one more parameter `len'.
8953 Update callers.
8954 (tracepoint_send_agent): New.
8955 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8956
7bc83639
YQ
89572012-04-16 Yao Qi <yao@codesourcery.com>
8958
8959 * tracepoint.c (download_tracepoints): Moved to ...
8960 (cmd_qtstart): ... here.
8961
5f18041e
YQ
89622012-04-14 Yao Qi <yao@codesourcery.com>
8963
8964 * tracepoint.c: Include inttypes.h.
8965 (struct collect_memory_action): Use sized types.
8966 (struct tracepoint): Likewise.
8967 (cmd_qtdp, stop_tracing): Update print specifiers.
8968 (cmd_qtp, response_tracepoint): Likewise.
8969 (collect_data_at_tracepoint): Likewise.
8970 (collect_data_at_step): Likewise.
8971
55a8c076
YQ
89722012-04-14 Yao Qi <yao@codesourcery.com>
8973
8974 Import gnulib module inttypes.
8975 * aclocal.m4, config.in, configure: Regenerated.
8976
dc750257
YQ
89772012-04-14 Yao Qi <yao@codesourcery.com>
8978
8979 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8980 Makefile and config.status at last.
8981
0ab5faf9
YQ
89822012-04-13 Yao Qi <yao@codesourcery.com>
8983
8984 * tracepoint.c: Include stdint.h unconditionally.
8985
18f5fd81
TJB
89862012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8987
8988 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8989 on BFD_HAVE_SYS_PROCFS_TYPE.
8990 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8991 * configure: Regenerate.
8992 * config.in: Likewise.
8993
4d47af5c
L
89942012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8995
8996 * Makefile.in (clean): Also remove x32.c x32-linux.c
8997 x32-avx.c x32-avx-linux.c.
8998 (x32.o): New target.
8999 (x32.c): Likewise.
9000 (x32-linux.o): Likewise.
9001 (x32-linux.c): Likewise.
9002 (x32-avx.o): Likewise.
9003 (x32-avx.c): Likewise.
9004 (x32-avx-linux.o): Likewise.
9005 (x32-avx-linux.c): Likewise.
9006
9007 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9008 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9009 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9010 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9011 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9012 i386/x32-avx-linux.xml.
9013
9014 * linux-x86-low.c (init_registers_x32_linux): New prototype.
9015 (init_registers_x32_avx_linux): Likwise.
9016 (x86_linux_update_xmltarget): Call init_registers_x32_linux
9017 or init_registers_x32_avx_linux if linux_is_elf64 is false.
9018
ecedbe58
PA
90192012-04-13 Pedro Alves <palves@redhat.com>
9020
9021 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9022 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9023 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9024 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9025 the sub-make.
9026
c92b5177
L
90272012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9028
9029 * linux-x86-low.c (compat_x32_clock_t): New.
9030 (compat_x32_siginfo_t): Likewise.
9031 (compat_x32_siginfo_from_siginfo): Likewise.
9032 (siginfo_from_compat_x32_siginfo): Likewise.
9033 (linux_is_elf64): Likewise.
9034 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
9035 and siginfo_from_compat_x32_siginfo for x32.
9036 (x86_arch_setup): Set linux_is_elf64.
9037
214d508e
L
90382012-04-12 H.J. Lu <hongjiu.lu@intel.com>
9039
9040 PR gdb/13969
9041 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
9042 e_machine field.
9043 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
9044 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
9045 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
9046 compatible with process.
9047
c9a1864a
YQ
90482012-04-12 Yao Qi <yao@codesourcery.com>
9049
9050 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9051 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9052 (install-only, install-info, clean): Handle sub dir gnulib.
9053 (all-lib, am--refresh): New targets.
9054 (memmem.o): Remove target.
9055 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9056 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9057 (AC_REPLACE_FUNCS): Remove memmem.
9058 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9059 (AC_OUTPUT): Generate Makefile in gnulib/.
9060 * aclocal.m4, config.in, configure: Regenerated.
9061
367ba2c2
MR
90622012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9063
9064 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9065
9d236627
PA
90662012-04-05 Pedro Alves <palves@redhat.com>
9067
9068 -Werror=strict-aliasing
9069
9070 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9071 pointer.
9072
111217b3
PA
90732012-04-04 Pedro Alves <palves@redhat.com>
9074
9075 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9076 (sparc_store_gregset_from_stack, sparc_store_gregset)
9077 (sparc_breakpoint_at): Fix formatting.
9078
8365dcf5
TJB
90792012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9080
9081 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9082 are available.
9083 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9084 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9085 * config.in: Regenerate.
9086 * configure: Likewise.
9087
689cc2ae
PA
90882012-03-29 Pedro Alves <palves@redhat.com>
9089
9090 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9091 Correct ptrace arguments.
9092
c14dfd32
PA
90932012-03-28 Pedro Alves <palves@redhat.com>
9094
9095 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9096 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9097 (IA64_FR1_REGNUM): New defines.
9098 (ia64_fetch_register): New.
9099 (the_low_target): Install it.
9100 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9101 field.
9102 * linux-low.c (linux_fetch_registers): Try the
9103 the_low_target.fetch_register hook first.
9104
9105 * linux-arm-low.c (the_low_target): Adjust.
9106 * linux-bfin-low.c (the_low_target): Adjust.
9107 * linux-cris-low.c (the_low_target): Adjust.
9108 * linux-crisv32-low.c (the_low_target): Adjust.
9109 * linux-m32r-low.c (the_low_target): Adjust.
9110 * linux-m68k-low.c (the_low_target): Adjust.
9111 * linux-mips-low.c (the_low_target): Adjust.
9112 * linux-ppc-low.c (the_low_target): Adjust.
9113 * linux-s390-low.c (the_low_target): Adjust.
9114 * linux-sh-low.c (the_low_target): Adjust.
9115 * linux-sparc-low.c (the_low_target): Adjust.
9116 * linux-tic6x-low.c (the_low_target): Adjust.
9117 * linux-x86-low.c (the_low_target): Adjust.
9118 * linux-xtensa-low.c (the_low_target): Adjust.
9119
63c88e13
PA
91202012-03-26 Pedro Alves <palves@redhat.com>
9121
9122 * server.c (handle_qxfer_libraries): Don't bail early if
9123 the_target->qxfer_libraries_svr4 is not NULL.
9124
fb723180
PA
91252012-03-26 Pedro Alves <palves@redhat.com>
9126
9127 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9128
0afae3cf
PA
91292012-03-23 Pedro Alves <palves@redhat.com>
9130
9131 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9132 "library-list-svr4" element's start tag when the the DSO list is
9133 empty.
9134
485f1ee4
PA
91352012-03-23 Pedro Alves <palves@redhat.com>
9136
9137 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9138 a variable whose type size is the same as the inferior's pointer
9139 size.
9140
a5362b9a
TS
91412012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9142
9143 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9144 struct siginfo.
9145 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9146 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9147 * linux-low.h: Include <signal.h>.
9148 (struct siginfo): Remove forward declaration.
9149 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9150 struct siginfo.
9151
d226c142
MF
91522012-03-21 Mike Frysinger <vapier@gentoo.org>
9153
9154 * .gitignore: Ignore more files.
9155
122f36ef
PA
91562012-03-19 Pedro Alves <palves@redhat.com>
9157 Jan Kratochvil <jan.kratochvil@redhat.com>
9158
9159 * server.c (cont_thread, general_thread): Add describing comments.
9160 (start_inferior): Clear `cont_thread'.
9161 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9162 of a process.
9163
fc3e5175
YQ
91642012-03-15 Yao Qi <yao@codesourcery.com>
9165
9166 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9167 handling to ...
9168 (cmd_qtdp): ... here.
9169
8d0d92cd
YQ
91702012-03-15 Yao Qi <yao@codesourcery.com>
9171
9172 * tracepoint.c (struct tracepoint_action_ops): New.
9173 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9174 (m_tracepoint_action_download): New.
9175 (r_tracepoint_action_download): New.
9176 (x_tracepoint_action_download): New.
9177 (l_tracepoint_action_download): New.
9178 (add_tracepoint_action): Install `action->ops' according type.
9179 (download_tracepoint_1): Move code `download' function pointer
9180 of various tracepoint_action_ops.
9181
87b0bb13
JK
91822012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9183
9184 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9185 linux_ptrace_attach_warnings.
9186
5f572dec
JK
91872012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9188
9189 * Makefile.in (linux-ptrace.o): New.
9190 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9191 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9192 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9193 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9194 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9195 of these targets.
9196 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9197
f4647387
YQ
91982012-03-08 Yao Qi <yao@codesourcery.com>
9199 Pedro Alves <palves@redhat.com>
9200
9201 Fix PR server/13392.
9202 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9203 offset of JMP insn.
9204 * tracepoint.c (remove_tracepoint): New.
9205 (cmd_qtdp): Call remove_tracepoint when failed to install.
9206
9b224c5e
PA
92072012-03-07 Pedro Alves <palves@redhat.com>
9208
9209 * linux-low.c (get_detach_signal): New.
9210 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9211 Pass on pending signals to PTRACE_DETACH. Check the result of the
9212 ptrace call.
9213 * server.c (program_signals, program_signals_p): New.
9214 (handle_general_set): Handle QProgramSignals.
9215 * server.h (program_signals, program_signals_p): Declare.
9216
e237a7e2
JK
92172012-03-05 Pedro Alves <palves@redhat.com>
9218 Jan Kratochvil <jan.kratochvil@redhat.com>
9219
9220 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9221 New comment why.
9222
5808517f
YQ
92232012-03-03 Yao Qi <yao@codesourcery.com>
9224
9225 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9226 agent_look_up_symbols.
9227
58b4daa5
YQ
92282012-03-03 Yao Qi <yao@codesourcery.com>
9229
9230 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9231 (linux-x86-low.o): Likewise.
9232 * server.h: Remove in_process_agent_loaded.
9233 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9234 common/agent.c.
9235 Update callers.
9236
8ffcbaaf
YQ
92372012-03-03 Yao Qi <yao@codesourcery.com>
9238
9239 * tracepoint.c (gdb_agent_capability): New global.
9240 (in_process_agent_loaded_ust): Renamed to
9241 `in_process_agent_supports_ust'.
9242 Update callers.
9243 (in_process_agent_supports_ust): Call agent_capability_check.
9244 (clear_installed_tracepoints): Assert that agent supports
9245 agent.
9246
d1feda86
YQ
92472012-03-03 Yao Qi <yao@codesourcery.com>
9248
9249 * linux-low.c (linux_supports_agent): New.
9250 (linux_target_ops): Initialize field `supports_agent' with
9251 linux_supports_agent.
9252 * target.h (struct target_ops) <supports_agent>: New.
9253 (target_supports_agent): New macro.
9254 * server.c (handle_general_set): Handle packet 'QAgent'.
9255 (handle_query): Send `QAgent+'.
9256 * Makefile.in (server.o): Depends on agent.h.
9257
2fa291ac
YQ
92582012-03-03 Yao Qi <yao@codesourcery.com>
9259
9260 * Makefile.in (OBS): Add agent.o.
9261 Add new rule for agent.o.
9262 Track dependence of tracepoint.c on agent.h.
9263 * tracepoint.c (run_inferior_command_1):
9264 (run_inferior_command): Call agent_run_command.
9265 (gdb_ust_connect_sync_socket): Deleted. Move it to
9266 common/agent.c.
9267 (resume_thread, stop_thread): Likewise.
9268 (gdb_ust_socket_init): Renamed to ...
9269 (gdb_agent_socket_init): ... New.
9270 (gdb_ust_thread): Renamed to ...
9271 (gdb_agent_helper_thread): ... New.
9272 (gdb_ust_init): Move some code to ...
9273 (gdb_agent_init): ... here. New.
9274 [HAVE_UST]: Call gdb_ust_init.
9275 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9276 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9277 * config.in, configure: Regenerated.
9278
05044653
PA
92792012-03-02 Pedro Alves <palves@redhat.com>
9280
9281 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9282 * linux-low.c (struct simple_pid_list): New.
9283 (stopped_pids): New a struct simple_pid_list pointer.
9284 (add_to_pid_list, pull_pid_from_list): New.
9285 (handle_extended_wait): Don't assume the first signal new children
9286 report is SIGSTOP. Adjust call to pull_pid_from_list.
9287 (linux_wait_for_lwp): Adjust.
9288
8d00225b
YQ
92892012-03-02 Yao Qi <yao@codesourcery.com>
9290
9291 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9292 debug log.
9293
19560ba5
YQ
92942012-03-02 Yao Qi <yao@codesourcery.com>
9295
9296 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9297 `stop_pc' and `tpoint'. Update caller.
9298
1faeff08
MR
92992012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9300
9301 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9302 * linux-low.c (use_linux_regsets): New macro.
9303 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9304 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9305 (linux_register_in_regsets): New function.
9306 (usr_fetch_inferior_registers): Skip registers covered by
9307 regsets.
9308 (usr_store_inferior_registers): Likewise.
9309 (usr_fetch_inferior_registers): New macro.
9310 (usr_store_inferior_registers): Likewise.
9311 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9312 (linux_store_registers): Likewise.
9313 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9314 prototype.
9315 (init_registers_mips64_dsp_linux): Likewise.
9316 (init_registers_mips_linux): New macro.
9317 (init_registers_mips_dsp_linux): Likewise.
9318 (mips_dsp_num_regs): Likewise.
9319 (DSP_BASE, DSP_CONTROL): New fallback macros.
9320 (mips_base_regs): New macro.
9321 (mips_regmap): Use it. Fix the size.
9322 (mips_dsp_regmap): New variable.
9323 (mips_dsp_regset_bitmap): Likewise.
9324 (mips_arch_setup): New function.
9325 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9326 than mips_regmap.
9327 (mips_cannot_store_register): Likewise.
9328 (the_low_target): Update .arch_setup, .num_regs and .regmap
9329 initializers. Add .regset_bitmap initializer.
9330 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9331 initializer.
9332 * linux-bfin-low.c (the_low_target): Likewise.
9333 * linux-cris-low.c (the_low_target): Likewise.
9334 * linux-crisv32-low.c (the_low_target): Likewise.
9335 * linux-ia64-low.c (the_low_target): Likewise.
9336 * linux-m32r-low.c (the_low_target): Likewise.
9337 * linux-m68k-low.c (the_low_target): Likewise.
9338 * linux-ppc-low.c (the_low_target): Likewise.
9339 * linux-s390-low.c (the_low_target): Likewise.
9340 * linux-sh-low.c (the_low_target): Likewise.
9341 * linux-sparc-low.c (the_low_target): Likewise.
9342 * linux-tic6x-low.c (the_low_target): Likewise.
9343 * linux-x86-low.c (the_low_target): Likewise.
9344 * linux-xtensa-low.c (the_low_target): Likewise.
9345 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9346 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9347 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9348 srv_xmlfiles.
9349 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9350 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9351
c03e6ccc
YQ
93522012-02-29 Yao Qi <yao@codesourcery.com>
9353 Pedro Alves <palves@redhat.com>
9354
9355 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9356 `step_over_finished' is true.
9357
644cebc9
PA
93582012-02-27 Pedro Alves <palves@redhat.com>
9359
9360 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9361 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9362
c14d7ab2
PA
93632012-02-27 Pedro Alves <palves@redhat.com>
9364
9365 PR server/9684
9366 * linux-low.c (pid_is_stopped): New.
9367 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9368
412c89dd
LM
93692012-02-25 Luis Machado <lgustavo@codesourcery.com>
9370
9371 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9372 of conditions.
9373
b745defe
MR
93742012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9375
9376 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9377
9f3a5c85
LM
93782012-02-24 Luis Machado <lgustavo@codesourcery>
9379
9380 * server.c (handle_query): Advertise support for target-side
9381 breakpoint condition evaluation.
9382 (process_point_options): New function.
9383 (process_serial_event): When inserting a breakpoint, check for
9384 a target-side condition that should be evaluated.
9385
9386 * mem-break.c: Include regcache.h and ax.h.
9387 (point_cond_list_t): New data structure.
9388 (breakpoint) <cond_list>: New field.
9389 (find_gdb_breakpoint_at): Make non-static.
9390 (delete_gdb_breakpoint_at): Clear any target-side
9391 conditions.
9392 (clear_gdb_breakpoint_conditions): New function.
9393 (add_condition_to_breakpoint): Likewise.
9394 (add_breakpoint_condition): Likewise.
9395 (gdb_condition_true_at_breakpoint): Likewise.
9396 (gdb_breakpoint_here): Return result directly instead
9397 of going through a local variable.
9398
9399 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9400 (clear_gdb_breakpoint_conditions): Likewise.
9401 (add_breakpoint_condition): Likewise.
9402 (gdb_condition_true_at_breakpoint): Likewise.
9403
9404 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9405 (need_step_over_p): Take target-side breakpoint condition into
9406 consideration.
9407
5e1dc496
LM
94082012-02-24 Luis Machado <lgustavo@codesourcery>
9409
9410 * server.h: Include tracepoint.h.
9411 (agent_mem_read, agent_get_trace_state_variable_value,
9412 agent_set_trace_state_variable_value,
9413 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9414 get_set_tsv_func_addr): New prototypes.
9415
9416 * ax.h: New include file.
9417 * ax.c: New source file.
9418
9419 * tracepoint.c: Include ax.h.
9420 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9421 agent_expr, eval_result_type): Move to ax.h.
9422 (parse_agent_expr): Rename to ...
9423 (gdb_parse_agent_expr): ... this, make it non-static and move
9424 to ax.h.
9425 (unparse_agent_expr) Rename to ...
9426 (gdb_unparse_agent_expr): ... this, make it non-static and move
9427 to ax.h.
9428 (eval_agent_expr): Rename to ...
9429 (eval_tracepoint_agent_expr): ... this.
9430 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9431 forward declarations.
9432 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9433 (agent_get_trace_state_variable_value): New function.
9434 (agent_set_trace_state_variable_value): New function.
9435 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9436 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9437 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9438 (condition_true_at_tracepoint): Likewise.
9439 (parse_agent_expr): Rename to ...
9440 (gdb_parse_agent_expr): ... this and move to ax.c.
9441 (unparse_agent_expr): Rename to ...
9442 (gdb_unparse_agent_expr): ... this and move to ax.c.
9443 (gdb_agent_op_name): Move to ax.c.
9444 (eval_agent_expr): Rename to ...
9445 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9446 and move to ax.c.
9447 (eval_tracepoint_agent_expr): New function.
9448 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9449 non-static.
5e1dc496
LM
9450 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9451 ax.c.
9452 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9453 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9454 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9455 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9456 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9457 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9458 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9459 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9460 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9461 (compile_bytecodes): Remove forward declaration.
9462 (is_goto_target): Move to ax.c.
9463 (compile_bytecodes): Move to ax.c and call
9464 agent_get_trace_state_variable_value (...) and
9465 agent_set_trace_state_variable_value (...).
9466
9467 * Makefile.in: Update ax.c and IPA dependencies.
9468
277e4e52
PA
94692012-02-24 Pedro Alves <palves@redhat.com>
9470
9471 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9472 (cmd_bigqtbuffer_circular): ... this. Only handle
9473 'QTBuffer:circular:'.
9474 (handle_tracepoint_general_set): Adjust.
9475
bf4c19f7
YQ
94762012-02-16 Yao Qi <yao@codesourcery.com>
9477
9478 * inferiors.c: Move code to ...
9479 * dll.c: .... here. New.
9480 * server.h: Declare clear_dlls.
9481 * Makefile.in (SFILES): Add dll.c.
9482 (OBS): Add dll.o
9483 (dll.o): New rule.
9484
d73f2619
YQ
94852012-02-11 Yao Qi <yao@codesourcery.com>
9486
9487 * server.c: (handle_monitor_command): Add a new parameter
9488 `own_buf'.
9489 (handle_query): Update caller.
9490
f8255c2a
JB
94912012-02-09 Joel Brobecker <brobecker@adacore.com>
9492
9493 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9494 * configure, config.in: Regenerate.
9495 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9496 is not defined.
9497
da84f473
PA
94982012-02-02 Pedro Alves <palves@redhat.com>
9499
9500 Try SIGKILL first, then PTRACE_KILL.
9501 * linux-low.c (linux_kill_one_lwp): New.
9502 (linux_kill_one_lwp): Rename to ...
9503 (kill_one_lwp_callback): ... this. Use the new
9504 linux_kill_one_lwp.
9505
e886a173
PA
95062012-02-02 Pedro Alves <palves@redhat.com>
9507
9508 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9509 inferior.
9510
be07f1a2
PA
95112012-01-27 Pedro Alves <palves@redhat.com>
9512
9513 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9514 (elf_64_file_p): Make static.
9515 (linux_pid_exe_is_elf_64_file): New.
9516 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9517 Delete declarations.
9518 (linux_pid_exe_is_elf_64_file): Declare.
9519 * linux-x86-low.c (x86_arch_setup): Use
9520 linux_pid_exe_is_elf_64_file.
9521
d8301ad1
JK
95222012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9523
9524 * linux-low.c (linux_wait_for_event_1): Rename to ...
9525 (linux_wait_for_event): ... here and merge it with former
9526 linux_wait_for_event - new variable wait_ptid, use it.
9527 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9528
01b17894
PA
95292012-01-23 Pedro Alves <palves@redhat.com>
9530
9531 * server.c (main): Avoid yet another case of infinite loop while
9532 detaching/killing after a longjmp.
9533
e825046f
JK
95342012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9535
9536 Code cleanup.
9537 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9538
b9e7b9c3
UW
95392012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9540
9541 * hostio.c (handle_readlink): New function.
9542 (handle_vFile): Call it to handle "vFile:readlink" packets.
9543
901f9912
UW
95442012-01-20 Pedro Alves <palves@redhat.com>
9545 Ulrich Weigand <ulrich.weigand@linaro.org>
9546
9547 * server.c (handle_v_requests): Only support vAttach and vRun to
9548 start multiple processes when in extended protocol mode.
9549
fc1ab1a0
PA
95502012-01-17 Pedro Alves <palves@redhat.com>
9551
9552 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9553 memalign plus mprotect to allocate the scratch buffer.
9554
7d5d4e98
PA
95552012-01-13 Pedro Alves <palves@redhat.com>
9556
9557 * server.c (attach_inferior): Clear `cont_thread'.
9558
f128d5e9
PA
95592012-01-13 Pedro Alves <palves@redhat.com>
9560
9561 * server.c (main): Avoid infinite loop while detaching/killing
9562 after a longjmp.
9563
06db92f0
DE
95642012-01-09 Doug Evans <dje@google.com>
9565
9566 * server.c (start_inferior): Set last_ptid in --wrapper case.
9567
32d92999
YQ
95682012-01-06 Yao Qi <yao@codesourcery.com>
9569
9570 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9571 defined.
9572 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9573
5e0a92a9
YQ
95742012-01-04 Yao Qi <yao@codesourcery.com>
9575
9576 * tracepoint.c (cmd_qtdp): Print debug message
9577 for static tracepoint.
9578
ae639e8c
YQ
95792012-01-04 Yao Qi <yao@codesourcery.com>
9580
9581 * tracepoint.c (trace_vdebug): Differentiate debug message
9582 between gdbserver and IPA.
9583
f72429c5
YQ
95842012-01-03 Yao Qi <yao@codesourcery.com>
9585
9586 * tracepoint.c (tracepoint_was_hit): Don't collect for
9587 static tracepoint.
9588
12c3e59c
JB
95892012-01-02 Joel Brobecker <brobecker@adacore.com>
9590
9591 * terminal.h: Reformat copyright header.
9592
67827812
JB
95932012-01-02 Joel Brobecker <brobecker@adacore.com>
9594
9595 * server.c (gdbserver_version): Update copyright year.
9596 * gdbreplay.c (gdbreplay_version): Likewise.
9597
3e52c33d
JK
95982011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9599
9600 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9601
9602 Revert:
9603 2011-12-18 Hui Zhu <teawater@gmail.com>
9604 * linux-low.c (linux_create_inferior): Save return value to ret.
9605
66f1260e
HZ
96062011-12-18 Hui Zhu <teawater@gmail.com>
9607
9608 * linux-low.c (linux_create_inferior): Save return value to ret.
9609
e77616d7
DE
96102011-12-16 Doug Evans <dje@google.com>
9611
e7b06c57
DE
9612 * linux-low.c (linux_create_inferior): If stdio connection,
9613 redirect stdin from /dev/null, stdout to stderr.
9614 * remote-utils.c (remote_is_stdio): New static global.
9615 (remote_connection_is_stdio): New function.
9616 (remote_prepare): Handle stdio connection.
9617 (remote_open): Ditto.
9618 (remote_close): Don't close stdin for stdio connections.
9619 (read_prim,write_prim): New functions. Replace all calls to
9620 read/write to these.
9621 * server.c (main): Watch for "-" argument. Move call to
9622 remote_prepare before start_inferior.
9623 * server.h (STDIO_CONNECTION_NAME): New macro.
9624 (remote_connection_is_stdio): Declare.
9625
e77616d7
DE
9626 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9627 in debugging output.
9628
82067193
YQ
96292011-12-15 Yao Qi <yao@codesourcery.com>
9630
9631 * tracepoint.c: Include sys/syscall.h.
9632 (gdb_ust_thread): Remove preprocessor conditional.
9633
82bfbe7e
PA
96342011-12-14 Pedro Alves <pedro@codesourcery.com>
9635
9636 * linux-low.c (linux_detach_one_lwp): Call
9637 the_low_target.prepare_to_resume before detaching.
9638
712c6575
YQ
96392011-12-14 Yao Qi <yao@codesourcery.com>
9640
9641 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9642 of write.
9643
d54d1edf
YQ
96442011-12-14 Yao Qi <yao@codesourcery.com>
9645
9646 * i386-low.c (i386_low_stopped_data_address): Initialize local
9647 variable `control'.
9648
6210a125
PA
96492011-12-13 Pedro Alves <pedro@codesourcery.com>
9650
9651 PR remote/13492
9652
9653 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9654 DR_CONTROL unless necessary. Extend comments.
9655 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9656 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9657
2ece8244
YQ
96582011-12-13 Yao Qi <yao@codesourcery.com>
9659
9660 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9661 macros.
9662 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9663
784867a5
JK
96642011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9665
9666 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9667 Print new debug message for such case.
9668
6bf36717
JK
96692011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9670
9671 Fix overlapping memcpy.
9672 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9673 the read_inferior_memory transfer.
9674 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9675 write_inferior_memory transfer.
9676 (set_fast_tracepoint_jump): New variable buf. Use it for the
9677 read_inferior_memory and write_inferior_memory transfers.
9678 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9679 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9680 Use it for the write_inferior_memory transfer.
9681 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9682 buffers.
9683
50275556
MR
96842011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9685
9686 * linux-low.c (fetch_register, store_register): Make code
9687 consistent, fix formatting.
9688
7325beb4
MR
96892011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9690
9691 * linux-low.c (usr_store_inferior_registers): Factor out code
9692 to handle individual registers into...
9693 (store_register): ... this new function.
9694
c642a434
UW
96952011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9696
9697 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9698 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9699 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9700 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9701 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9702 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9703 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9704 (srv_xmlfiles): Add new XML files.
9705
9706 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9707 and <sys/uio.h>.
9708 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9709 (init_registers_s390_linux32v1): Add prototype.
9710 (init_registers_s390_linux32v2): Likewise.
9711 (init_registers_s390_linux64v1): Likewise.
9712 (init_registers_s390_linux64v2): Likewise.
9713 (init_registers_s390x_linux64v1): Likewise.
9714 (init_registers_s390x_linux64v2): Likewise.
9715 (s390_num_regs): Increment to 52.
9716 (s390_regmap): Add orig_r2 register.
9717 (s390_num_regs_3264): Increment to 68.
9718 (s390_regmap_3264): Add orig_r2 register.
9719 (s390_collect_ptrace_register): Handle orig_r2 register.
9720 (s390_supply_ptrace_register): Likewise.
9721 (s390_fill_last_break): New function.
9722 (s390_store_last_break): Likewise.
9723 (s390_fill_system_call): New function.
9724 (s390_store_system_call): Likewise.
9725 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9726 register sets.
9727 (s390_check_regset): New function.
9728 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9729 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9730 Update target_regsets for available register sets.
9731
2268b414
JK
97322011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9733 Jan Kratochvil <jan.kratochvil@redhat.com>
9734
9735 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9736 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9737 New.
9738 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9739 * linux-low.h (struct process_info_private): New member r_debug.
9740 * server.c (handle_qxfer_libraries): Call
9741 the_target->qxfer_libraries_svr4.
9742 (handle_qxfer_libraries_svr4): New function.
9743 (qxfer_packets): New entry "libraries-svr4".
9744 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9745 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9746 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9747 PACKET_qXfer_libraries_svr4.
9748
d6db1fab
UW
97492011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9750
9751 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9752 PSW address/mask between 8-byte and 16-byte formats.
9753 (s390_supply_ptrace_register): Likewise.
9754 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9755 basic addressing mode bit.
9756
242f5f1c
SS
97572011-11-24 Stan Shebs <stan@codesourcery.com>
9758
9759 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9760
f196051f
SS
97612011-11-17 Stan Shebs <stan@codesourcery.com>
9762
9763 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9764 (tracing_start_time): New global.
9765 (tracing_stop_time): New global.
9766 (tracing_user_name): New global.
9767 (tracing_notes): New global.
9768 (tracing_stop_note): New global.
9769 (cmd_qtstart): Set traceframe_usage, start_time.
9770 (stop_tracing): Set stop_time.
9771 (cmd_qtstatus): Report additional status.
9772 (cmd_qtp): New function.
9773 (handle_tracepoint_query): Call it.
9774 (cmd_qtnotes): New function.
9775 (handle_tracepoint_general_set): Call it.
9776 (get_timestamp): Rename from tsv_get_timestamp.
9777
405f8e94
SS
97782011-11-14 Stan Shebs <stan@codesourcery.com>
9779 Kwok Cheung Yeung <kcy@codesourcery.com>
9780
9781 * linux-x86-low.c (small_jump_insn): New.
9782 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9783 trampoline and error message, build a trampoline and issue a small
9784 jump instruction to it.
9785 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9786 trampoline and error message.
9787 (x86_get_min_fast_tracepoint_insn_len): New.
9788 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9789 * linux-low.h (struct linux_target_ops): Add arguments to
9790 install_fast_tracepoint_jump_pad operation, add new operation.
9791 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9792 arguments.
9793 (linux_get_min_fast_tracepoint_insn_len): New function.
9794 (linux_target_op): Add new operation.
9795 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9796 (gdb_trampoline_buffer_end): Ditto.
9797 (gdb_trampoline_buffer_error): Ditto.
9798 (struct ipa_sym_addresses): Add fields for new IPA variables.
9799 (symbol_list): Add entries for new IPA variables.
9800 (struct tracepoint): Add fields to hold the address range of the
9801 trampoline used by the tracepoint.
9802 (trampoline_buffer_head): New static variable.
9803 (trampoline_buffer_tail): Ditto.
9804 (claim_trampoline_space): New function.
9805 (have_fast_tracepoint_trampoline_buffer): New function.
9806 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9807 structure.
9808 (install_fast_tracepoint): Ditto, also add error buffer argument.
9809 (cmd_qtminftpilen): New function.
9810 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9811 (fast_tracepoint_from_trampoline_address): New function.
9812 (fast_tracepoint_collecting): Handle trampoline as part of jump
9813 pad space.
9814 (set_trampoline_buffer_space): New function.
9815 (initialize_tracepoint): Initialize new IPA variables.
9816 * target.h (struct target_ops): Add arguments to
9817 install_fast_tracepoint_jump_pad operation, add new
9818 get_min_fast_tracepoint_insn_len operation.
9819 (target_get_min_fast_tracepoint_insn_len): New.
9820 (install_fast_tracepoint_jump_pad): Add arguments.
9821 * server.h (IPA_BUFSIZ): Define.
9822 * linux-i386-ipa.c: Include extra header files.
9823 (initialize_fast_tracepoint_trampoline_buffer): New function.
9824 (initialize_low_tracepoint): Call it.
9825 * server.h (set_trampoline_buffer_space): Declare.
9826 (claim_trampoline_space): Ditto.
9827 (have_fast_tracepoint_trampoline_buffer): Ditto.
9828
1e4d1764
YQ
98292011-11-14 Yao Qi <yao@codesourcery.com>
9830
9831 * server.c (handle_query): Handle InstallInTrace for qSupported.
9832 * tracepoint.c (add_tracepoint): Sort list.
9833 (install_tracepoint, download_tracepoint): New.
9834 (cmd_qtdp): Call them to install and download tracepoints.
9835 (sort_tracepoints): Removed.
9836 (cmd_qtstart): Update.
9837
5c73ff4e
YQ
98382011-11-14 Yao Qi <yao@codesourcery.com>
9839
9840 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9841 * mem-break.h: Declare.
9842 * tracepoint.c (cmd_qtstart): Move some code to ...
9843 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9844 New.
9845 (download_tracepoints): Move some code to ...
9846 (download_tracepoint_1): ... here. New.
9847
86a30030
YQ
98482011-11-08 Yao Qi <yao@codesourcery.com>
9849
9850 * remote-utils.c (relocate_instruction): A comment fix.
9851
8d26e50c
JB
98522011-11-07 Joel Brobecker <brobecker@adacore.com>
9853
9854 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9855 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9856 dr_status_mirror and dr_control_mirror from debug_reg_state.
9857 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9858 (i386_initial_stuff): Remove use of deleted globals.
9859 (i386_get_thread_context, i386_set_thread_context,
9860 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9861 from debug_reg_state.
9862
a59306a3
YQ
98632011-11-05 Yao Qi <yao@codesourcery.com>
9864
9865 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9866 address as TPOINT's.
9867
3065dfb6
SS
98682011-11-02 Stan Shebs <stan@codesourcery.com>
9869
9870 * tracepoint.c (agent_mem_read_string): New function.
9871 (eval_agent_expr): Call it for tracenz.
9872 * server.c (handle_query): Report support for tracenz.
9873
fd0d8c7c
YQ
98742011-11-02 Yao Qi <yao@codesourcery.com>
9875
9876 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9877
609086b1
YQ
98782011-11-02 Yao Qi <yao@codesourcery.com>
9879
9880 * target.h: Fix a typo in comment.
9881
b9fd1791
PA
98822011-10-31 Pedro Alves <pedro@codesourcery.com>
9883
9884 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9885 clobber the breakpoints' shadows with fast tracepoint jumps.
9886 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9887 * target.c (write_inferior_memory): Also pass MYADDR down to
9888 check_mem_write.
9889
03583c20
UW
98902011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9891
9892 * configure.ac: Check support for personality routine.
9893 * configure: Regenerate.
9894 * config.in: Likewise.
9895 * linux-low.c: Include <sys/personality.h>.
9896 Define ADDR_NO_RANDOMIZE if necessary.
9897 (linux_create_inferior): Disable address space randomization when
9898 forking inferior, if requested.
9899 (linux_supports_disable_randomization): New function.
9900 (linux_target_ops): Install it.
9901 * server.h (disable_randomization): Declare.
9902 * server.c (disable_randomization): New global variable.
9903 (handle_general_set): Handle QDisableRandomization.
9904 (handle_query): Likewise for qSupported.
9905 (main): Support --disable-randomization and --no-disable-randomization
9906 command line arguments.
9907 * target.h (struct target_ops): Add supports_disable_randomization.
9908 (target_supports_disable_randomization): New macro.
9909
723b724b
MF
99102011-09-29 Mike Frysinger <vapier@gentoo.org>
9911
9912 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9913 ifdef check.
9914 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9915 [!PT_GETDSBT] (target_loadmap): New definition.
9916 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9917 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9918 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9919 and PT_GETDSBT to LINUX_LOADMAP.
9920 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9921 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9922
55329a5c 99232011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9924
9925 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9926 (arm_linux_hwbp_cap): New static variable.
9927 (arm_linux_get_hwbp_cap): Replace by ...
9928 (arm_linux_init_hwbp_cap): ... this new function.
9929 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9930 (arm_linux_get_hw_watchpoint_count): Likewise.
9931 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9932 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9933 (arm_prepare_to_resume): Use perror_with_name instead of error.
9934
55329a5c 99352011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9936
9937 * linux-arm-low.c: Include <signal.h>.
9938 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9939 (struct arm_linux_hwbp_cap): New data type.
9940 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9941 (struct arm_linux_hw_breakpoint): New data type.
9942 (MAX_BPTS, MAX_WPTS): Define.
9943 (struct arch_process_info, struct arch_lwp_info): New data types.
9944 (arm_linux_get_hwbp_cap): New function.
9945 (arm_linux_get_hw_breakpoint_count): Likewise.
9946 (arm_linux_get_hw_watchpoint_count): Likewise.
9947 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9948 (arm_hwbp_control_initialize): Likewise.
9949 (arm_hwbp_control_is_enabled): Likewise.
9950 (arm_hwbp_control_is_initialized): Likewise.
9951 (arm_hwbp_control_disable): Likewise.
9952 (arm_linux_hw_breakpoint_equal): Likewise.
9953 (arm_linux_hw_point_initialize): Likewise.
9954 (struct update_registers_data): New data structure.
9955 (update_registers_callback: New function.
9956 (arm_insert_point): Likewise.
9957 (arm_remove_point): Likewise.
9958 (arm_stopped_by_watchpoint): Likewise.
9959 (arm_stopped_data_address): Likewise.
9960 (arm_new_process): Likewise.
9961 (arm_new_thread): Likewise.
9962 (arm_prepare_to_resume): Likewise.
9963 (the_low_target): Register arm_insert_point, arm_remove_point,
9964 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9965 arm_new_thread, and arm_prepare_to_resume.
9966
6b9801d4
SS
99672011-09-15 Stan Shebs <stan@codesourcery.com>
9968
9969 * server.h (struct emit_ops): Add compare-goto fields.
9970 * tracepoint.c (gdb_agent_op_sizes): New table.
9971 (emit_eq_goto): New function.
9972 (emit_ne_goto): New function.
9973 (emit_lt_goto): New function.
9974 (emit_le_goto): New function.
9975 (emit_gt_goto): New function.
9976 (emit_ge_goto): New function.
9977 (is_goto_target): New function.
9978 (compile_bytecodes): Recognize special cases of compare-goto
9979 combinations and call specialized emitters for them.
9980 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9981 (amd64_emit_ne_goto): New function.
9982 (amd64_emit_lt_goto): New function.
9983 (amd64_emit_le_goto): New function.
9984 (amd64_emit_gt_goto): New function.
9985 (amd64_emit_ge_goto): New function.
9986 (amd64_emit_ops): Add the new functions.
9987 (i386_emit_eq_goto): New function.
9988 (i386_emit_ne_goto): New function.
9989 (i386_emit_lt_goto): New function.
9990 (i386_emit_le_goto): New function.
9991 (i386_emit_gt_goto): New function.
9992 (i386_emit_ge_goto): New function.
9993 (i386_emit_ops): Add the new functions.
9994
bf15cbda
SS
99952011-09-08 Stan Shebs <stan@codesourcery.com>
9996
9997 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9998 (i386_emit_epilogue): Restore %ebx.
9999
943ca1dd
JZ
100002011-08-31 Jie Zhang <jzhang918@gmail.com>
10001
10002 * server.c (step_thread): Remove definition.
10003 (process_serial_event): Don't handle Hs.
10004 * server.h (step_thread): Remove declaration.
10005 * target.c (set_desired_inferior): Remove use of step_thread.
10006
e3deef73
LM
100072011-08-24 Luis Machado <lgustavo@codesourcery.com>
10008
10009 * linux-low.c: Include linux-procfs.h.
10010 (linux_attach_lwp_1): Update comments.
10011 (linux_attach): Scan for existing threads when attaching to a
10012 process that is the tgid.
10013 * Makefile.in: Update dependencies.
10014
13da1c97
LM
100152011-08-24 Luis Machado <lgustavo@codesourcery.com>
10016
10017 * configure.srv: Add linux-procfs.o dependencies.
10018
881127c9
YQ
100192011-08-14 Yao Qi <yao@codesourcery.com>
10020
10021 * target.h (struct target_ops): Fix indent.
10022 * win32-low.c (win32_target_ops): Fix comment.
10023
58dbd541
YQ
100242011-08-14 Andrew Jenner <andrew@codesourcery.com>
10025 Yao Qi <yao@codesourcery.com>
10026
10027 * Makefile.in (clean): Remove tic6x-*.c files.
10028 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
10029 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
10030 (tic6x-c64xp-linux.c): Likewise.
10031 * configure.srv: Add support for tic6x-*-uclinux.
10032 * linux-tic6x-low.c: New.
10033 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
10034
78d85199
YQ
100352011-08-14 Andrew Stubbs <ams@codesourcery.com>
10036 Yao Qi <yao@codesourcery.com>
10037
10038 * target.h (struct target_ops): Add read_loadmap.
10039 * linux-low.c (struct target_loadseg): New type.
10040 (struct target_loadmap): New type.
10041 (linux_read_loadmap): New function.
10042 (linux_target_ops): Add linux_read_loadmap.
10043 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
10044 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
10045 to NULL.
78d85199 10046
a959a88d
EZ
100472011-08-05 Eli Zaretskii <eliz@gnu.org>
10048
10049 * win32-low.c: Include <stdint.h>.
10050
1ced966e
PA
100512011-07-22 Pedro Alves <pedro@codesourcery.com>
10052
10053 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10054 to the inferior here.
10055 (i386_remove_aligned_watchpoint): Ditto.
10056 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10057 fit part of the watchpoint in the debug registers.
10058 (i386_update_inferior_debug_regs): New.
10059 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10060 registers, and only update the inferior on success.
10061 (i386_low_remove_watchpoint): Ditto.
10062
d26e3629
KY
100632011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10064
10065 * linux-low.c (compare_ints, unique, list_threads, show_process,
10066 linux_core_of_thread): Delete.
10067 (linux_target_ops): Change linux_core_of_thread to
10068 linux_common_core_of_thread.
10069 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10070 * utils.c (malloc_failure): Change type of argument.
10071 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10072 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10073 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10074 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10075 (IPA_OBJS): Add common-utils-ipa.o.
10076 (ptid_h, linux_osdata_h): New macros.
10077 (server_h): Add common/common-utils.h, common/xml-utils.h,
10078 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10079 common/ptid.h.
10080 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10081 ptid.o, buffer.o): New rules.
10082 (linux-low.o): Add common/linux-osdata.h as a dependency.
10083 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10084 * configure.ac: Add AC_HEADER_DIRENT check.
10085 * config.in: Regenerate.
10086 * configure: Regenerate.
10087 * remote-utils.c (xml_escape_text): Delete.
10088 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10089 buffer_xml_printf): Move to common/buffer.c.
10090 * server.c (main): Remove call to initialize_inferiors.
10091 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10092 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10093 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10094 internal_error, gdb_assert, gdb_assert_fail): Delete.
10095 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10096 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10097 common/buffer.h.
10098 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10099 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10100 initialize_inferiors): Delete.
10101
2275a1a7
PA
101022011-07-20 Pedro Alves <pedro@codesourcery.com>
10103
10104 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10105 symbol error.
10106
0a5b1e09
PA
101072011-05-31 Pedro Alves <pedro@codesourcery.com>
10108
10109 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10110 assertion.
10111 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10112
6938fd34
YQ
101132011-05-26 Yao Qi <yao@codesourcery.com>
10114
10115 * Makefile.in (thread-db.o): Track dependence to
10116 common/gdb_thread_db.h.
10117 * thread-db.c: include gdb_thread_db.h from right place.
10118
b481f9e0
TT
101192011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10120
10121 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10122 __FILE__ and __LINE__ to internal_error.
10123
98a5dd13
DE
101242011-05-13 Doug Evans <dje@google.com>
10125
10126 * thread-db.c (try_thread_db_load_from_sdir): New function.
10127 (try_thread_db_load_from_dir): New function.
10128 (thread_db_load_search): Handle $sdir, ignore $pdir.
10129 Remove trying of system directories if search of
10130 libthread-db-search-path fails, that is now done via $sdir.
10131
d248b706
KY
101322011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10133
10134 * server.c (handle_query): Add EnableDisableTracepoints to the list
10135 of supported features.
43aaf8b6 10136 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10137 tracepoints.
43aaf8b6
PA
10138 (cmd_qtenable_disable): New.
10139 (cmd_qtstart): Install tracepoints even if disabled.
10140 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10141 receiving a QTEnable or QTDisable packet.
10142 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10143 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10144 tracepoints.
10145 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10146
84e578fb
DE
101472011-05-10 Doug Evans <dje@google.com>
10148
10149 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10150
71f55dd8
DE
101512011-05-04 Doug Evans <dje@google.com>
10152
10153 * linux-low.c (linux_join): Skip process lookup.
10154 * spu-low.c (spu_join): Ditto.
10155 * server.c (join_inferiors_callback): Delete.
10156 (process_serial_event): For 'D' packet (detach) call join_inferior
10157 directly.
10158
4d393d60
JM
101592011-05-04 Joseph Myers <joseph@codesourcery.com>
10160
10161 * README: Don't mention xscale*-*-linux*.
10162 * configure.srv (xscale*-*-linux*): Don't handle target.
10163
b00ad6ff
NF
101642011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10165
10166 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10167 casting pointers.
10168 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10169 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10170 (i386_emit_void_call_2): Likewise.
10171
af96c192
YQ
101722011-04-26 Yao Qi <yao@codesourcery.com>
10173
43aaf8b6
PA
10174 * linux-low.c: Move common macros to linux-ptrace.h.
10175 Include linux-ptrace.h.
af96c192
YQ
10176 * Makefile.in (linux_ptrace_h): New.
10177 (linux-low.o): Depends on linux-ptrace.h.
10178
03f2bd59
JK
101792011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10180
10181 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10182 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10183 (remote_prepare): New function with most of the TCP code from ...
10184 (remote_open): ... here. Detect PORT here unconditionally. Move also
10185 setting transport_is_reliable.
10186 * server.c (run_once): New variable.
10187 (gdbserver_usage): Document it.
10188 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10189 the first run if RUN_ONCE.
10190 * server.h (run_once, remote_prepare): New declarations.
10191
7a9dd1b2
TT
101922011-04-19 Tom Tromey <tromey@redhat.com>
10193
10194 * win32-low.c (handle_load_dll): Remove duplicate "the".
10195
81239425
PM
101962011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10197
10198 Remove support for old Cygwin 1.5 versions.
10199 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10200 function to avoid warning.
10201 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10202 warning.
10203
9e0627f1
PM
102042011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10205
10206 * gdbserver/server.h (Macro _): Define it if not available.
10207
588eebee
MS
102082011-03-14 Michael Snyder <msnyder@vmware.com>
10209
348af9f7 10210 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10211
43f70d4c
JB
102122011-03-10 Joel Brobecker <brobecker@adacore.com>
10213
10214 * Makefile.in (maintainer-clean realclean distclean): Remove
10215 "make ... subdir_do" command.
10216
348af9f7
MS
102172011-03-10 Michael Snyder <msnyder@vmware.com>
10218
10219 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10220
10221 * server.c (handle_v_run): Free alloced buffer on early return.
10222
e637a4f5
YQ
102232011-03-09 Yao Qi <yao@codesourcery.com>
10224
10225 Revert:
10226 2011-03-04 Yao Qi <yao@codesourcery.com>
10227
10228 * Makefile.in: Remove GNU make feature --directory.
10229
10230 2011-03-05 Yao Qi <yao@codesourcery.com>
10231
10232 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10233 (subdir_do): New make target. Copied from gdb/Makefile.
10234 (maintainer-clean, realclean, distclean, clean): Call corresponding
10235 make targets in common/Makefile.
10236
10237 2011-02-11 Yao Qi <yao@codesourcery.com>
10238
10239 * configure.ac: Call AC_PROG_RANLIB.
10240 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10241 * configure: Regenerate.
10242
e6edda56
JK
102432011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10244
10245 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10246
e5141119
JB
102472011-03-06 Yao Qi <yao@codesourcery.com>
10248
10249 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10250
64794aa4
JB
102512011-03-05 Yao Qi <yao@codesourcery.com>
10252
10253 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10254 (subdir_do): New make target. Copied from gdb/Makefile.
10255 (maintainer-clean, realclean, distclean, clean): Call corresponding
10256 make targets in common/Makefile.
10257
7a762829
YQ
102582011-03-04 Yao Qi <yao@codesourcery.com>
10259
10260 * Makefile.in: Remove GNU make feature --directory.
10261
348af9f7
MS
102622011-03-04 Michael Snyder <msnyder@vmware.com>
10263
10264 * server.c (queue_stop_reply): Call xmalloc not malloc.
10265
102662011-03-02 Michael Snyder <msnyder@vmware.com>
10267
10268 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10269
9f72fee2
MS
102702011-02-28 Michael Snyder <msnyder@vmware.com>
10271
588eebee
MS
10272 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10273 (cmd_qtframe): Ditto.
10274 (cmd_qtbuffer): Ditto.
10275 (cmd_bigqtbuffer): Ditto.
10276
9f72fee2
MS
10277 * utils.c (decimal2str): Initialize 'width' to nine, then
10278 don't mess with it.
10279
8040bd49
UW
102802011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10281
10282 * hostio.c (require_data): Free *data, not data.
10283
7e52cbd0
JK
102842011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10285
10286 * hostio.c (require_data): Use free, not xfree.
10287
9130f83e
MS
102882011-02-27 Michael Snyder <msnyder@vmware.com>
10289
4b812f4e
MS
10290 * server.c (handle_query): Discard unused value.
10291
9130f83e
MS
10292 * hostio.c (require_data): Free malloc memory before returning
10293 error.
10294
69d37113
MS
102952011-02-26 Michael Snyder <msnyder@vmware.com>
10296
10297 * linux-low.c (list_threads): Call closedir for dirent.
10298
35f5825a
MS
102992011-02-27 Michael Snyder <msnyder@vmware.com>
10300
2a589cef
MS
10301 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10302 a case statement falls through.
10303
0adea5f7
MS
10304 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10305
35f5825a
MS
10306 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10307 in comparison.
10308
238f1c74
MS
103092011-02-26 Michael Snyder <msnyder@vmware.com>
10310
10311 * utils.c (decimal2str): Eliminate dead code and dead param.
10312 (pulongest): Drop dead param from call to decimal2str.
10313 (plongest): Ditto.
10314
633ff500
JB
103152011-02-24 Joel Brobecker <brobecker@adacore.com>
10316
10317 Revert the following patch (not approved yet):
10318 2011-02-21 Hui Zhu <teawater@gmail.com>
10319 * tracepoint.c (tp_printf): New function.
10320 (eval_agent_expr): Handle gdb_agent_op_printf.
10321
f9c6ff72
HZ
103222011-02-21 Hui Zhu <teawater@gmail.com>
10323
10324 * tracepoint.c (tp_printf): New function.
10325 (eval_agent_expr): Handle gdb_agent_op_printf.
10326
94d5e490
TT
103272011-02-18 Tom Tromey <tromey@redhat.com>
10328
10329 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10330 (tracepoint.o): Likewise.
10331 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10332 (gdb_agent_op_names): Likewise.
10333
c7f96d2b
TT
103342011-02-18 Tom Tromey <tromey@redhat.com>
10335
10336 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10337 gdb_agent_op_rot>: New constants.
10338 (gdb_agent_op_names): Add pick and roll.
10339 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10340 cases.
10341
0feedb2c
JK
103422011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10343
10344 * aclocal.m4: Regenerated with aclocal-1.11.1.
10345
b3b9301e
PA
103462011-02-14 Pedro Alves <pedro@codesourcery.com>
10347
10348 * server.c (handle_qxfer_traceframe_info): New.
10349 (qxfer_packets): Register "traceframe-info".
10350 (handle_query): Report support for qXfer:traceframe-info:read+.
10351 * tracepoint.c (match_blocktype): New.
10352 (traceframe_find_block_type): Rename to ...
10353 (traceframe_walk_blocks): ... this. Add callback filter argument,
10354 and use it.
10355 (traceframe_find_block_type): New, reimplemented on top of
10356 traceframe_walk_blocks.
10357 (build_traceframe_info_xml): New.
10358 (traceframe_read_info): New.
10359 * server.h (traceframe_read_info): Declare.
10360
4f3e6fb7
YQ
103612011-02-11 Yao Qi <yao@codesourcery.com>
10362
10363 * configure.ac: Call AC_PROG_RANLIB.
10364 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10365 * configure: Regenerate.
10366
764880b7
PA
103672011-02-07 Pedro Alves <pedro@codesourcery.com>
10368
10369 * server.c (gdb_read_memory): Change return semantics to allow
10370 partial transfers.
10371 (handle_search_memory_1): Adjust.
10372 (process_serial_event) <'m' packet>: Handle partial transfers.
10373 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10374
1c79eb8a
PA
103752011-01-28 Pedro Alves <pedro@codesourcery.com>
10376
10377 * regcache.c (init_register_cache): Initialize
10378 regcache->register_status.
10379 (free_register_cache): Release regcache->register_status.
10380 (regcache_cpy): Copy register_status.
10381 (registers_to_string): Print 'x's for unavailable registers.
10382 (supply_register): Mark the register's status valid or
10383 unavailable, depending on whether a buffer was passed in or not.
10384 (supply_register_zeroed): New.
10385 (supply_regblock): Mark the registers' status valid or
10386 unavailable, depending on whether a buffer was passed in or not.
10387 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10388 (struct regcache): New `register_status' field.
10389 (supply_register_zeroed): Declare.
10390 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10391 supply_register_zeroed, rather than passing a NULL buffer to
10392 supply_register.
10393 * tracepoint.c (fetch_traceframe_registers): Update comment.
10394
85724a0e
PA
103952011-01-28 Pedro Alves <pedro@codesourcery.com>
10396
10397 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10398 buffer explicit.
10399
d08aafef
PA
104002011-01-25 Pedro Alves <pedro@codesourcery.com>
10401
10402 * server.h (decode_xfer_write): Change prototype.
10403 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10404 and don't extract the annex here.
10405 * server.c (decode_xfer_read): Remove `annex' parameter,
10406 and don't extract the annex here.
10407 (decode_xfer): New.
10408 (struct qxfer): New.
10409 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10410 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10411 (handle_qxfer_statictrace): New functions, abstracted out from
10412 handle_query, and made to use the struct qxfer interface.
10413 (handle_threads_qxfer_proper): Rename to ...
10414 (handle_qxfer_threads_proper): ... this.
10415 (handle_threads_qxfer): Rename to ...
10416 (handle_qxfer_threads): ... this. Adjust.
10417 (qxfer_packets): New array.
10418 (handle_qxfer): New function.
10419 (handle_query): Use handle_qxfer.
10420
493e2a69
MS
104212011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10422
10423 * gdbreplay.c: Shorten lines of >= 80 columns.
10424 * linux-low.c: Ditto.
10425 * linux-ppc-low.c: Ditto.
10426 * linux-s390-low.c: Ditto.
10427 * linux-sparc-low.c: Ditto.
10428 * linux-x86-low.c: Ditto.
10429 * linux-xtensa-low.c: Ditto.
10430 * mem-break.c: Ditto.
10431 * nto-low.c: Ditto.
10432 * regcache.h: Ditto.
10433 * remote-utils.c: Ditto.
10434 * server.c: Ditto.
10435 * server.h: Ditto.
10436 * thread-db.c: Ditto.
10437 * tracepoint.c: Ditto.
10438 * utils.c: Ditto.
10439 * win32-low.h: Ditto.
10440
44944448
JB
104412011-01-05 Joel Brobecker <brobecker@adacore.com>
10442
10443 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10444 update.
10445
71ce852c
JB
104462011-01-01 Joel Brobecker <brobecker@adacore.com>
10447
10448 * server.c (gdbserver_version): Update copyright year in version
10449 output.
10450 * gdbreplay.c (gdbreplay_version): Ditto.
10451
eb826dc6
MF
104522010-12-29 Jie Zhang <jie.zhang@analog.com>
10453
10454 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10455 * linux-bfin-low.c: New file.
10456 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10457 PT_DATA_ADDR for BFIN targets.
10458 * Makefile.in (SFILES): Add linux-bfin-low.c.
10459 (clean): Remove reg-bfin.c.
10460 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10461 * README: Mention supported Blackfin targets.
10462
39ab222a
MF
104632010-12-23 Mike Frysinger <vapier@gentoo.org>
10464
10465 * .gitignore: New file.
10466
a1f2ce7d
MF
104672010-11-16 Mike Frysinger <vapier@gentoo.org>
10468
10469 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10470
f474844c
JZ
104712010-10-22 Jie Zhang <jie@codesourcery.com>
10472
10473 * Makefile.in: Add FLAGS_TO_PASS variable.
10474 (install): Remove dependency of install-only and recursively
10475 invoke make for install-only.
10476
f1048712
DE
104772010-10-04 Doug Evans <dje@google.com>
10478
10479 * Makefile.in (uninstall): Use $(DESTDIR).
10480
b53a1623
PA
104812010-09-24 Pedro Alves <pedro@codesourcery.com>
10482
e6ee044d
PA
10483 PR gdb/11842
10484
b53a1623
PA
10485 * linux-x86-low.c (compat_siginfo_from_siginfo)
10486 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10487 si_code is < 0. Check for si_code == SI_TIMER before checking for
10488 si_code < 0.
10489
fa1bd1e4
JB
104902010-09-13 Joel Brobecker <brobecker@adacore.com>
10491
10492 * lynx-i386-low.c: New file.
10493 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10494
47fac8f8
JB
104952010-09-13 Joel Brobecker <brobecker@adacore.com>
10496
10497 * lynx-low.c (ptrace_request_to_str): Remove handling for
10498 request values that have been removed in LynxOS 5.x.
10499
1adfc54d
JB
105002010-09-13 Joel Brobecker <brobecker@adacore.com>
10501
10502 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10503 <ptrace.h>
10504
c2a66c29
NS
105052010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10506
10507 * configure.ac: Add --enable-inprocess-agent option.
10508 * configure: Rebuilt.
10509
32fcada3
YQ
105102010-09-06 Yao Qi <yao@codesourcery.com>
10511
10512 * linux-low.c (linux_kill): Remove unused variable.
10513 (linux_stabilize_threads): Likewise.
10514 * server.c (start_inferior): Likewise.
10515 (queue_stop_reply_callback): Likewise.
10516 * tracepoint.c (do_action_at_tracepoint): Likewise.
10517
0cccb683
YQ
105182010-09-06 Yao Qi <yao@codesourcery.com>
10519
10520 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10521 on return.
10522
423ec54c
JK
105232010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10524
10525 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10526
12ac6819
PA
105272010-09-06 Pedro Alves <pedro@codesourcery.com>
10528
10529 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10530 "$(IPA_DEPFILES)".
10531
8ed54b31
JB
105322010-09-01 Joel Brobecker <brobecker@adacore.com>
10533
10534 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10535 gdbserver/lynx-ppc-low.c: New files.
10536 * Makefile.in (lynx_low_h): New variable.
10537 (lynx-low.o, lynx-ppc-low.o): New rules.
10538 * configure.ac: On LynxOS, link with -lnetinet.
10539 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10540 * configure: regenerate.
10541
bb0116a4
JB
105422010-09-01 Joel Brobecker <brobecker@adacore.com>
10543
10544 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10545 * configure.ac: Add check for vasprintf and vsnprintf.
10546 * configure, config.in: Regenerate.
10547 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10548
a778ab81 105492010-09-01 Joel Brobecker <brobecker@adacore.com>
10550
10551 * gdbreplay.c: Move include of alloca.h up, next to include of
10552 malloc.h.
10553 * server.h: Add include of malloc.h.
10554 * mem-break.c: Remove include of malloc.h.
10555 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10556
8b034a19 105572010-09-01 Joel Brobecker <brobecker@adacore.com>
10558
10559 * Makefile.in (memmem.o): Build with -Wno-error.
10560
105612010-09-01 Joel Brobecker <brobecker@adacore.com>
10562
10563 * utils.c (xsnprintf): Make non-static.
10564 * server.h: Add xsnprintf declaration.
10565 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10566 replace calls to snprintf by calls to xsnprintf throughout.
10567
105682010-09-01 Joel Brobecker <brobecker@adacore.com>
10569
10570 * configure.ac: Add configure check for alloca.
10571 * configure, config.in: Regenerate.
10572 * server.h: Include alloca.h if it exists.
10573 * gdbreplay.c: Include alloca.h if it exists.
10574
1a981360
PA
105752010-08-28 Pedro Alves <pedro@codesourcery.com>
10576
10577 * linux-low.c (__SIGRTMIN): Define if not already defined.
10578 (linux_create_inferior): Check for __ANDROID__ rather than
10579 __SIGRTMIN.
10580 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10581 are already deferred.
10582 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10583 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10584 stopped and already has a pending signal to report.
10585 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10586 a pending signal to report or is moving out of a jump pad.
10587 (linux_init_signals): Check for __ANDROID__ rather than
10588 __SIGRTMIN.
10589
b4d51a55
PA
105902010-08-28 Pedro Alves <pedro@codesourcery.com>
10591
10592 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10593 debug_threads check. Avoid a linear search when not doing debug
10594 output.
10595
ec48365d
PA
105962010-08-27 Pedro Alves <pedro@codesourcery.com>
10597
10598 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10599 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10600 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10601 (process_event): Change local fd's type to gdb_fildes_t.
10602 (create_file_handler): Adjust prototype.
10603 (delete_file_handler): Adjust prototype.
10604 (handle_file_event): Adjust prototype. Use pfildes.
10605 (create_file_event): Adjsut prototype.
10606 * remote-utils.c (remote_desc, listen_desc): Change type to
10607 gdb_fildes_t.
10608 * server.h: New gdb_fildes_t typedef.
10609 [USE_WIN32API]: Include winsock2.h.
10610 (delete_file_handler, add_file_handler): Adjust prototypes.
10611 (pfildes): Declare.
10612 * utils.c (pfildes): New.
10613
854d88f0
PA
106142010-08-27 Pedro Alves <pedro@codesourcery.com>
10615
10616 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10617 * configure: Regenerate.
10618
0146f85b
PA
106192010-08-27 Pedro Alves <pedro@codesourcery.com>
10620
10621 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10622 (linux_done_accessing_memory): ... this.
10623 (linux_target_ops): Adjust.
10624 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10625 * nto-low.c (nto_target_ops): Adjust comment.
10626 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10627 * spu-low.c (spu_target_ops): Adjust comment.
10628 * target.h (target_ops): Rename unprepare_to_access_memory field
10629 to done_accessing_memory.
10630 (unprepare_to_access_memory): Rename to ...
10631 (done_accessing_memory): ... this.
10632
90d74c30
PA
106332010-08-26 Pedro Alves <pedro@codesourcery.com>
10634
10635 * linux-low.c (linux_prepare_to_access_memory): New.
10636 (linux_unprepare_to_access_memory): New.
10637 (linux_target_ops): Install them.
10638 * server.c (read_memory): Rename to ...
10639 (gdb_read_memory): ... this. Use
10640 prepare_to_access_memory/prepare_to_access_memory.
10641 (write_memory): Rename to ...
10642 (gdb_write_memory): ... this. Use
10643 prepare_to_access_memory/prepare_to_access_memory.
10644 (handle_search_memory_1): Adjust.
10645 (process_serial_event): Adjust.
10646 * target.h (struct target_ops): New fields
10647 prepare_to_access_memory and unprepare_to_access_memory.
10648 (prepare_to_access_memory, unprepare_to_access_memory): New.
10649 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10650 prepare_to_access_memory/prepare_to_access_memory.
10651 * nto-low.c (nto_target_ops): Adjust.
10652 * spu-low.c (spu_target_ops): Adjust.
10653 * win32-low.c (win32_target_ops): Adjust.
10654
fd467969
PA
106552010-08-26 Pedro Alves <pedro@codesourcery.com>
10656
10657 * Makefile.in (WARN_CFLAGS): Get it from configure.
10658 (WERROR_CFLAGS): New.
10659 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10660 * configure.ac: Introduce --enable-werror, which adds -Werror to
10661 the compiler command line. Enabled by default. Disable with
10662 --disable-werror. Add -Wdeclaration-after-statement
10663 Wpointer-arith and -Wformat-nonliteral to warning flags.
10664 * configure: Regenerate.
10665
331e2f5f
PA
106662010-08-26 Pedro Alves <pedro@codesourcery.com>
10667
10668 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10669
e581f2b4
PA
106702010-08-26 Pedro Alves <pedro@codesourcery.com>
10671
10672 * gdbreplay.c (remote_error): New.
10673 (gdbchar): New.
10674 (expect): Use gdbchar. Check for error reading from GDB.
10675 Clarify sync error output.
10676 (play): Check for errors writing to GDB.
10677 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10678 * remote-utils.c (getpkt): Check for errors writing to the remote
10679 descriptor.
10680
3c11dd79
PA
106812010-08-25 Pedro Alves <pedro@codesourcery.com>
10682
10683 * linux-low.c (linux_wait_1): Move non-debugging code out of
10684 `debug_threads' control.
10685
d20a8ad9
PA
106862010-08-25 Pedro Alves <pedro@codesourcery.com>
10687
10688 * linux-low.c (linux_wait_1): Don't set last_status here.
10689 * server.c (push_event, queue_stop_reply_callback): Assert we're
10690 not pushing a TARGET_WAITKIND_IGNORE event.
10691 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10692 (myresume, handle_target_event): Set the thread's last_resume_kind
10693 and last_status from the target returned status.
10694
964e4306
PA
106952010-08-25 Pedro Alves <pedro@codesourcery.com>
10696
10697 PR threads/10729
10698
10699 * linux-x86-low.c (update_debug_registers_callback): New.
10700 (i386_dr_low_set_addr): Use it.
10701 (i386_dr_low_get_addr): New.
10702 (i386_dr_low_set_control): Use update_debug_registers_callback.
10703 (i386_dr_low_get_control): New.
10704 (i386_dr_low_get_status): Adjust.
10705 * linux-low.c (linux_stop_lwp): New.
10706 * linux-low.h (linux_stop_lwp): Declare.
10707
10708 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10709 argument instead of a i386_debug_reg_state.
10710 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10711 a i386_debug_reg_state.
10712 (i386_insert_aligned_watchpoint): Adjust.
10713 (i386_remove_aligned_watchpoint): Adjust.
10714 (i386_low_stopped_data_address): Read the debug registers from the
10715 inferior instead of from the mirrors.
10716 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10717 (i386_dr_low_get_addr): Declare.
10718 (i386_dr_low_get_control): Declare.
10719 (i386_dr_low_get_status): Change prototype.
10720
10721 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10722 (i386_dr_low_get_addr): New.
10723 (i386_dr_low_get_control): New.
10724 (i386_dr_low_get_status): Adjust prototype. Return
10725 dr_status_mirror.
10726 (i386_initial_stuff): Clear dr_status_mirror and
10727 dr_control_mirror.
10728 (i386_get_thread_context): Adjust.
10729 (i386_set_thread_context): Adjust.
10730 (i386_thread_added): Adjust.
10731
5f21a75b
PA
107322010-08-24 Pedro Alves <pedro@codesourcery.com>
10733
10734 * linux-low.h (linux_thread_area): Delete declaration.
10735
3e4c1235
TS
107362010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10737
10738 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10739 after its termination.
10740
1971b033
PA
107412010-08-09 Pedro Alves <pedro@codesourcery.com>
10742
10743 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10744 (gdb_wants_all_stopped): Delete.
10745 (linux_wait_1): Don't call them.
10746 * server.c (handle_v_cont): Tag all threads as want-stopped.
10747 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10748 stopped as "client-wants-stopped".
10749
310444ac
PA
107502010-07-31 Pedro Alves <pedro@codesourcery.com>
10751
10752 * Makefile.in (signals_h): New.
10753 (server_h): Depend on it.
10754 (server.o): Don't depend on $(signals_def).
10755 (signals.o): Depend on $(signals_def).
10756
a19cae16
JK
107572010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10758
10759 * Makefile.in (signals_def): New.
10760 (server_h): Append include/gdb/signals.h and signals_def.
10761 (server.o): Append signals_def.
10762
30d50328
JK
107632010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10764
10765 * server.c (handle_target_event): Use target_signal_to_host for
10766 resume_info.sig initialization.
10767 * target.h (struct thread_resume) <sig>: New comment.
10768
5c3216e2
OS
107692010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10770
c6f46ca0
OS
10771 * server.c (handle_query): strcpy() the returned string from paddress()
10772 instead of sprintf().
5c3216e2
OS
10773 * utils.c (paddress): Return phex_nz().
10774
6bd31874
JB
107752010-07-07 Joel Brobecker <brobecker@adacore.com>
10776
10777 * server.c (handle_v_cont): Call mourn_inferior if process
10778 just exited.
10779 (myresume): Likewise.
10780
0fb4aa4b
PA
107812010-07-01 Pedro Alves <pedro@codesourcery.com>
10782
10783 Static tracepoints, and integration with UST.
10784
10785 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10786 * mem-break.c (uninsert_all_breakpoints)
10787 (reinsert_all_breakpoints): New.
10788 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10789 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10790 (gdb_agent_ust_loaded, helper_thread_id)
10791 (gdb_agent_helper_thread_id): New macros.
10792 (struct ipa_sym_addresses): Add addr_ust_loaded,
10793 addr_helper_thread_id, addr_cmd_buf.
10794 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10795 (in_process_agent_loaded_ust): New.
10796 (write_e_ust_not_loaded): New.
10797 (maybe_write_ipa_ust_not_loaded): New.
10798 (struct collect_static_trace_data_action): New.
10799 (enum tracepoint_type) <static_tracepoint>: New.
10800 (struct tracepoint) <handle>: Mention static tracepoints.
10801 (struct static_tracepoint_ctx): New.
10802 (CMD_BUF_SIZE): New.
10803 (add_tracepoint_action): Handle static tracepoint actions.
10804 (unprobe_marker_at): New.
10805 (clear_installed_tracepoints): Handle static tracepoints.
10806 (cmd_qtdp): Handle static tracepoints.
10807 (probe_marker_at): New.
10808 (cmd_qtstart): Handle static tracepoints.
10809 (response_tracepoint): Handle static tracepoints.
10810 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10811 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10812 (get_context_regcache): Handle static tracepoints.
10813 (do_action_at_tracepoint): Handle static tracepoint actions.
10814 (traceframe_find_block_type): Handle static trace data blocks.
10815 (traceframe_read_sdata): New.
10816 (download_tracepoints): Download static tracepoint actions.
10817 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10818 (GDB_PROBE_NAME): New.
10819 (ust_ops): New.
10820 (GET_UST_SYM): New.
10821 (USTF): New.
10822 (dlsym_ust): New.
10823 (ust_marker_to_static_tracepoint): New.
10824 (gdb_probe): New.
10825 (collect_ust_data_at_tracepoint): New.
10826 (gdb_ust_probe): New.
10827 (UNIX_PATH_MAX, SOCK_DIR): New.
10828 (gdb_ust_connect_sync_socket): New.
10829 (resume_thread, stop_thread): New.
10830 (run_inferior_command): New.
10831 (init_named_socket): New.
10832 (gdb_ust_socket_init): New.
10833 (cstr_to_hexstr): New.
10834 (next_st): New.
10835 (first_marker, next_marker): New.
10836 (response_ust_marker): New.
10837 (cmd_qtfstm, cmd_qtsstm): New.
10838 (unprobe_marker_at, probe_marker_at): New.
10839 (cmd_qtstmat, gdb_ust_thread): New.
10840 (gdb_ust_init): New.
10841 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10842 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10843 (ST_REGENTRY): New.
10844 (x86_64_st_collect_regmap): New.
10845 (X86_64_NUM_ST_COLLECT_GREGS): New.
10846 (AMD64_RIP_REGNUM): New.
10847 (supply_static_tracepoint_registers): New.
10848 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10849 (ST_REGENTRY): New.
10850 (i386_st_collect_regmap): New.
10851 (i386_NUM_ST_COLLECT_GREGS): New.
10852 (supply_static_tracepoint_registers): New.
10853 * server.c (handle_query): Handle qXfer:statictrace:read.
10854 <qSupported>: Report support for StaticTracepoints, and
10855 qXfer:statictrace:read features.
10856 * server.h (traceframe_read_sdata)
10857 (supply_static_tracepoint_registers): Declare.
10858 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10859 (unpack_varlen_hex): Include in IPA build.
10860 * Makefile.in (ustlibs, ustinc): New.
10861 (IPA_OBJS): Add remote-utils-ipa.o.
10862 ($(IPA_LIB)): Link -ldl and -lpthread.
10863 (UST_CFLAGS): New.
10864 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10865 * config.in, configure: Regenerate.
10866
9e4344e5
PA
108672010-06-20 Ian Lance Taylor <iant@google.com>
10868 Pedro Alves <pedro@codesourcery.com>
10869
10870 * linux-x86-low.c (always_true): Delete.
10871 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10872 trying to fool the compiler with always_true.
10873
c6beb2cb
PA
108742010-06-20 Pedro Alves <pedro@codesourcery.com>
10875
10876 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10877 conditions in gdbserver.
10878
d2ed6730
UW
108792010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10880
10881 * spu-low.c (spu_read_memory): Wrap around local store limit.
10882 (spu_write_memory): Likewise.
10883
4e29fb54
PA
108842010-06-15 Pedro Alves <pedro@codesourcery.com>
10885
10886 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10887 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10888 LONGEST uses.
10889 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10890 uses.
10891 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10892 uses with LONGEST uses.
10893
6a271cae
PA
108942010-06-14 Stan Shebs <stan@codesourcery.com>
10895 Pedro Alves <pedro@codesourcery.com>
10896
10897 Bytecode compiler.
10898
10899 * linux-x86-low.c: Include limits.h.
10900 (add_insns): New.
10901 (always_true): New.
10902 (EMIT_ASM): New.
10903 (EMIT_ASM32): New.
10904 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10905 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10906 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10907 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10908 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10909 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10910 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10911 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10912 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10913 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10914 (amd64_emit_void_call_2): New.
10915 (amd64_emit_ops): New.
10916 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10917 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10918 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10919 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10920 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10921 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10922 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10923 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10924 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10925 (i386_emit_stack_adjust, i386_emit_int_call_1)
10926 (i386_emit_void_call_2): New.
10927 (i386_emit_ops): New.
10928 (x86_emit_ops): New.
10929 (the_low_target): Install x86_emit_ops.
10930 * server.h (struct emit_ops): New.
10931 (get_raw_reg_func_addr): Declare.
10932 (current_insn_ptr, emit_error): Declare.
10933 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10934 (set_trace_state_variable_value): New defines.
10935 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10936 addr_get_trace_state_variable_value and
10937 addr_set_trace_state_variable_value.
10938 (symbol_list): New fields for get_raw_reg,
10939 get_trace_state_variable_value and set_trace_state_variable_value.
10940 (condfn): New typedef.
10941 (struct tracepoint): New field `compiled_cond'.
10942 (do_action_at_tracepoint): Clear compiled_cond.
10943 (get_trace_state_variable_value, set_trace_state_variable_value):
10944 Export in the IPA.
10945 (condition_true_at_tracepoint): If there's a compiled condition,
10946 run that.
10947 (current_insn_ptr, emit_error): New globals.
10948 (struct bytecode_address): New.
10949 (get_raw_reg_func_addr): New.
10950 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10951 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10952 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10953 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10954 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10955 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10956 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10957 (compile_tracepoint_condition, compile_bytecodes): New.
10958 * target.h (emit_ops): Forward declare.
10959 (struct target_ops): New field emit_ops.
10960 (target_emit_ops): New.
10961 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10962 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10963 * linux-low.c (linux_emit_ops): New.
10964 (linux_target_ops): Install it.
10965 * linux-low.h (struct linux_target_ops): New field emit_ops.
10966
92b72907
UW
109672010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10968
10969 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10970 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10971
fa593d66
PA
109722010-06-01 Pedro Alves <pedro@codesourcery.com>
10973 Stan Shebs <stan@codesourcery.com>
10974
10975 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10976 (all): Depend on $(extra_libraries).
10977 (install-only): Install the IPA.
10978 (IPA_OBJS, IPA_LIB): New.
10979 (clean): Remove the IPA lib.
10980 (IPAGENT_CFLAGS): New.
10981 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10982 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10983 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10984 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10985 * configure.ac: Check for atomic builtins support in the compiler.
10986 (IPA_DEPFILES, extra_libraries): Define.
10987 * configure.srv (ipa_obj): Add description.
10988 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10989 (i[34567]86-*-linux*): Set ipa_obj.
10990 (x86_64-*-linux*): Set ipa_obj.
10991 * linux-low.c (stabilizing_threads): New.
10992 (supports_fast_tracepoints): New.
10993 (linux_detach): Stabilize threads before detaching.
10994 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10995 the lwp is either not stabilizing, or is moving out of a jump pad.
10996 (linux_fast_tracepoint_collecting): New.
10997 (maybe_move_out_of_jump_pad): New.
10998 (enqueue_one_deferred_signal): New.
10999 (dequeue_one_deferred_signal): New.
11000 (linux_wait_for_event_1): If moving out of a jump pad, defer
11001 pending signals to later.
11002 (linux_stabilize_threads): New.
11003 (linux_wait_1): Check if threads need moving out of jump pads, and
11004 do it if so.
11005 (stuck_in_jump_pad_callback): New.
11006 (move_out_of_jump_pad_callback): New.
11007 (lwp_running): New.
11008 (linux_resume_one_lwp): Handle moving out of jump pads.
11009 (linux_set_resume_request): Dequeue deferred signals.
11010 (need_step_over_p): Also step over fast tracepoint jumps.
11011 (start_step_over): Also uninsert fast tracepoint jumps.
11012 (finish_step_over): Also reinsert fast tracepoint jumps.
11013 (linux_install_fast_tracepoint_jump): New.
11014 (linux_target_ops): Install linux_stabilize_threads and
11015 linux_install_fast_tracepoint_jump_pad.
11016 * linux-low.h (linux_target_ops) <get_thread_area,
11017 install_fast_tracepoint_jump_pad>: New fields.
11018 (struct lwp_info) <collecting_fast_tracepoint,
11019 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11020 (linux_get_thread_area): Declare.
11021 * linux-x86-low.c (jump_insn): New.
11022 (x86_get_thread_area): New.
11023 (append_insns): New.
11024 (push_opcode): New.
11025 (amd64_install_fast_tracepoint_jump_pad): New.
11026 (i386_install_fast_tracepoint_jump_pad): New.
11027 (x86_install_fast_tracepoint_jump_pad): New.
11028 (the_low_target): Install x86_get_thread_area and
11029 x86_install_fast_tracepoint_jump_pad.
11030 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
11031 (struct fast_tracepoint_jump): New.
11032 (fast_tracepoint_jump_insn): New.
11033 (fast_tracepoint_jump_shadow): New.
11034 (find_fast_tracepoint_jump_at): New.
11035 (fast_tracepoint_jump_here): New.
11036 (delete_fast_tracepoint_jump): New.
11037 (set_fast_tracepoint_jump): New.
11038 (uninsert_fast_tracepoint_jumps_at): New.
11039 (reinsert_fast_tracepoint_jumps_at): New.
11040 (set_breakpoint_at): Use write_inferior_memory.
11041 (uninsert_raw_breakpoint): Use write_inferior_memory.
11042 (check_mem_read): Mask out fast tracepoint jumps.
11043 (check_mem_write): Mask out fast tracepoint jumps.
11044 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
11045 (set_fast_tracepoint_jump): Declare.
11046 (delete_fast_tracepoint_jump)
11047 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11048 (reinsert_fast_tracepoint_jumps_at): Declare.
11049 * regcache.c: Don't compile many functions when building the
11050 in-process agent library.
11051 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11052 the register buffer in the heap.
11053 (free_register_cache): If the register buffer isn't owned by the
11054 regcache, don't free it.
11055 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11056 pre-existing register caches.
11057 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11058 type.
11059 (convert_ascii_to_int): : Constify `from' parameter type.
11060 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11061 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11062 the needed buffer in-place.
11063 (relocate_instruction): New.
11064 * server.c (handle_query) <qSymbols>: If the target supports
11065 tracepoints, give it a chance of looking up symbols. Report
11066 support for fast tracepoints.
11067 (handle_status): Stabilize threads.
11068 (process_serial_event): Adjust.
11069 * server.h (struct fast_tracepoint_jump): Forward declare.
11070 (struct process_info) <fast_tracepoint_jumps>: New field.
11071 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11072 (decode_X_packet, decode_M_packet): Adjust.
11073 (relocate_instruction): Declare.
11074 (in_process_agent_loaded): Declare.
11075 (tracepoint_look_up_symbols): Declare.
11076 (struct fast_tpoint_collect_status): Declare.
11077 (fast_tracepoint_collecting): Declare.
11078 (force_unlock_trace_buffer): Declare.
11079 (handle_tracepoint_bkpts): Declare.
11080 (initialize_low_tracepoint)
11081 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11082 * target.h (struct target_ops) <stabilize_threads,
11083 install_fast_tracepoint_jump_pad>: New fields.
11084 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11085 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11086 [HAVE_STDINT_H]: Include stdint.h.
11087 (trace_debug_1): Rename to ...
11088 (trace_vdebug): ... this.
11089 (trace_debug): Rename to ...
11090 (trace_debug_1): ... this. Add `level' parameter.
11091 (trace_debug): New.
11092 (ATTR_USED, ATTR_NOINLINE): New.
11093 (IP_AGENT_EXPORT): New.
11094 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11095 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11096 (about_to_request_buffer_space, trace_buffer_is_full)
11097 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11098 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11099 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11100 (traceframe_write_count, traceframes_created)
11101 (trace_state_variables)
11102 New renaming defines.
11103 (struct ipa_sym_addresses): New.
11104 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11105 (symbol_list): New.
11106 (ipa_sym_addrs): New.
11107 (all_tracepoint_symbols_looked_up): New.
11108 (in_process_agent_loaded): New.
11109 (write_e_ipa_not_loaded): New.
11110 (maybe_write_ipa_not_loaded): New.
11111 (tracepoint_look_up_symbols): New.
11112 (debug_threads) [IN_PROCESS_AGENT]: New.
11113 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11114 (UNKNOWN_SIDE_EFFECTS): New.
11115 (stop_tracing): New.
11116 (flush_trace_buffer): New.
11117 (stop_tracing_bkpt): New.
11118 (flush_trace_buffer_bkpt): New.
11119 (read_inferior_integer): New.
11120 (read_inferior_uinteger): New.
11121 (read_inferior_data_pointer): New.
11122 (write_inferior_data_pointer): New.
11123 (write_inferior_integer): New.
11124 (write_inferior_uinteger): New.
11125 (struct collect_static_trace_data_action): Delete.
11126 (enum tracepoint_type): New.
11127 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11128 <actions_str, step_actions, step_actions_str>: Only include in
11129 GDBserver.
fa593d66
PA
11130 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11131 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11132 (tracepoints): Use IP_AGENT_EXPORT.
11133 (last_tracepoint): Don't include in the IPA.
11134 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11135 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11136 (alloced_trace_state_variables): New.
11137 (trace_state_variables): Use IP_AGENT_EXPORT.
11138 (traceframe_t): Delete unused variable.
11139 (circular_trace_buffer): Don't include in the IPA.
11140 (trace_buffer_start): Delete.
11141 (struct trace_buffer_control): New.
11142 (trace_buffer_free): Delete.
11143 (struct ipa_trace_buffer_control): New.
11144 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11145 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11146 New.
11147 (trace_buffer_ctrl): New.
11148 (TRACE_BUFFER_CTRL_CURR): New.
11149 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11150 Reimplement as macros.
11151 (trace_buffer_wrap): Delete.
11152 (traceframe_write_count, traceframe_read_count)
11153 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11154 (struct tracepoint_hit_ctx) <type>: New field.
11155 (struct fast_tracepoint_ctx): New.
11156 (memory_barrier): New.
11157 (cmpxchg): New.
11158 (record_tracepoint_error): Update atomically in the IPA.
11159 (clear_inferior_trace_buffer): New.
11160 (about_to_request_buffer_space): New.
11161 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11162 updating the same buffer.
11163 (add_tracepoint): Default the tracepoint's type to trap
11164 tracepoint, and orig_size to -1.
11165 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11166 internal variables.
11167 (create_trace_state_variable): New parameter `gdb'. Handle it.
11168 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11169 (cmd_qtdp): Handle fast tracepoints.
11170 (cmd_qtdv): Adjust.
11171 (max_jump_pad_size): New.
11172 (gdb_jump_pad_head): New.
11173 (get_jump_space_head): New.
11174 (claim_jump_space): New.
11175 (sort_tracepoints): New.
11176 (MAX_JUMP_SIZE): New.
11177 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11178 IPA.
11179 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11180 support. Upload fast traceframes, and delete internal IPA
11181 breakpoints.
11182 (stop_tracing_handler): New.
11183 (flush_trace_buffer_handler): New.
11184 (cmd_qtstop): Upload fast tracepoints.
11185 (response_tracepoint): Handle fast tracepoints.
11186 (tracepoint_finished_step): Upload fast traceframes. Set the
11187 tracepoint hit context's tracepoint type.
11188 (handle_tracepoint_bkpts): New.
11189 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11190 type. Add comment about fast tracepoints.
11191 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11192 non-existing action_str field.
11193 (get_context_regcache): Handle fast tracepoints.
11194 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11195 to the regcache.
11196 (fast_tracepoint_from_jump_pad_address): New.
11197 (fast_tracepoint_from_ipa_tpoint_address): New.
11198 (collecting_t): New.
11199 (force_unlock_trace_buffer): New.
11200 (fast_tracepoint_collecting): New.
11201 (collecting): New.
11202 (gdb_collect): New.
11203 (write_inferior_data_ptr): New.
11204 (target_tp_heap): New.
11205 (target_malloc): New.
11206 (download_agent_expr): New.
11207 (UALIGN): New.
11208 (download_tracepoints): New.
11209 (download_trace_state_variables): New.
11210 (upload_fast_traceframes): New.
11211 (IPA_FIRST_TRACEFRAME): New.
11212 (IPA_NEXT_TRACEFRAME_1): New.
11213 (IPA_NEXT_TRACEFRAME): New.
11214 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11215 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11216 (gdb_jump_pad_buffer_end): New.
11217 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11218 (initialize_tracepoint): Adjust.
11219 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11220 buffer. Initialize the low module.
11221 * utils.c (PREFIX, TOOLNAME): New.
11222 (malloc_failure): Use PREFIX.
11223 (error): In the IPA, an error causes an exit.
11224 (fatal, warning): Use PREFIX.
11225 (internal_error): Use TOOLNAME.
11226 (NUMCELLS): Increase to 10.
11227 * configure, config.in: Regenerate.
11228
d149dd1d
PA
112292010-06-01 Pedro Alves <pedro@codesourcery.com>
11230
11231 * server.c (handle_query) <qSupported>: Do two passes over the
11232 qSupported string to avoid nesting strtok.
11233
f6528abd
JK
112342010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11235
11236 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11237 (CDEPS): New.
11238 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11239 -Wl,--dynamic-list.
11240 * configure: Regenerate.
11241 * proc-service.list: New.
11242
ca2a87a0
JK
112432010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11244
11245 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11246 New comment.
11247
363a6e9f
OS
112482010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11249
11250 * gdbreplay.c (remote_open): Check error return from socket() call by
11251 its equality to -1 not by it being negative.
11252 * remote-utils.c (remote_open): Likewise.
11253
d23b6cb1
PA
112542010-05-23 Pedro Alves <pedro@codesourcery.com>
11255
11256 * config.h: Regenerate.
11257
28d3cf85
MK
112582010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11259
11260 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11261 doesn't provide PTRACE_GET_THREAD_AREA.
11262
fea36a59
MK
112632010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11264
11265 * linux-m68k-low.c: Include <asm/ptrace.h>
11266 (ps_get_thread_area): Implement.
11267
24b066ba
DE
112682010-05-03 Doug Evans <dje@google.com>
11269
11270 * event-loop.c (struct callback_event): New struct.
11271 (callback_list): New global.
11272 (append_callback_event, delete_callback_event): New functions.
11273 (process_callback): New function.
11274 (start_event_loop): Call it.
11275 * remote-utils.c (NOT_SCHEDULED): Define.
11276 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11277 moved out of readchar.
11278 (readchar): Rewrite. Call reschedule before returning.
11279 (reset_readchar): New function.
11280 (remote_close): Call it.
11281 (process_remaining, reschedule): New functions.
11282 * server.h (callback_handler_func): New typedef.
11283 (append_callback_event, delete_callback_event): Declare.
11284
9836d6ea
PA
112852010-05-03 Pedro Alves <pedro@codesourcery.com>
11286
11287 * proc-service.c (ps_pglobal_lookup): Use
11288 thread_db_look_up_one_symbol.
11289 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11290 parameter. Use it instead of all_symbols_looked_up.
11291 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11292 field.
11293 (all_symbols_looked_up): Don't declare.
11294 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11295 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11296 field.
11297 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11298 Set all_symbols_looked_up here.
11299 (thread_db_look_up_one_symbol): New.
11300 (thread_db_get_tls_address): Adjust.
11301 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11302 thread_db object on the heap, and tentatively set it in the
11303 process structure.
11304 (thread_db_init): Don't set all_symbols_looked_up here.
11305 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11306
7984d532
PA
113072010-05-03 Pedro Alves <pedro@codesourcery.com>
11308
11309 * linux-low.c (linux_kill, linux_detach): Adjust.
11310 (status_pending_p_callback): Remove redundant statement. Check
11311 for !TARGET_WAITIKIND_IGNORE, instead of
11312 TARGET_WAITKIND_STOPPED.
11313 (handle_tracepoints): Make sure LWP is locked. Adjust.
11314 (linux_wait_for_event_1): Adjust.
11315 (linux_cancel_breakpoints): New.
11316 (unsuspend_one_lwp): New.
11317 (unsuspend_all_lwps): New.
11318 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11319 (send_sigstop_callback): Change return type to int, add new
11320 `except' parameter and handle it.
11321 (suspend_and_send_sigstop_callback): New.
11322 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11323 pass them down. If SUSPEND, also increment the lwp's suspend
11324 count.
11325 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11326 (need_step_over_p): Don't consider suspended LWPs.
11327 (start_step_over): Adjust.
11328 (proceed_one_lwp): Change return type to int, add new `except'
11329 parameter and handle it.
11330 (unsuspend_and_proceed_one_lwp): New.
11331 (proceed_all_lwps): Use find_inferior instead of
11332 for_each_inferior.
11333 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11334 also decrement the suspend count of LWPs. Pass `except' down,
11335 instead of hacking its suspend count.
11336 (linux_pause_all): Add `freeze' parameter. Adjust.
11337 (linux_unpause_all): New.
11338 (linux_target_ops): Install linux_unpause_all.
11339 * server.c (handle_status): Adjust.
11340 * target.h (struct target_ops): New fields `unpause_all' and
11341 `cancel_breakpoints'. Add new parameter to `pause_all'.
11342 (pause_all): Add new `freeze' parameter.
11343 (unpause_all): New.
11344 (cancel_breakpoints): New.
11345 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11346 cancel breakpoints.
11347 (cmd_qtstart): Pause threads.
11348 (stop_tracing): Pause threads, and cancel breakpoints.
11349 * win32-low.c (win32_target_ops): Adjust.
11350
e471f25b
PA
113512010-05-03 Pedro Alves <pedro@codesourcery.com>
11352
11353 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11354 the inferior right away from here...
11355 (linux_wait_1): ... to here, and adjust to check the thread's
11356 last_resume_kind instead of the lwp's step or stop_expected flags.
11357
1915ef4f
PA
113582010-05-02 Pedro Alves <pedro@codesourcery.com>
11359
11360 * README: Use consistent `GDB' and `GDBserver' spellings.
11361
f9e39928
PA
113622010-05-02 Pedro Alves <pedro@codesourcery.com>
11363
11364 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11365 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11366 (linux_detach_one_lwp): Assume the lwp is stopped.
11367 (any_thread_of): Delete.
11368 (linux_detach): Stop all lwps here. Don't blindly delete all
11369 breakpoints.
11370 (delete_lwp_callback): New.
11371 (linux_mourn): Delete all lwps of the process that is gone.
11372 (linux_wait_1): Don't delete the last lwp of the process here.
11373 * mem-break.h (mark_breakpoints_out): Declare.
11374 * mem-break.c (mark_breakpoints_out): New.
11375 (free_all_breakpoints): Use it.
11376 * server.c (handle_target_event): If the process is gone, mark
11377 breakpoints out.
11378 * thread-db.c (struct thread_db) <create_bp>: New field.
11379 (thread_db_enable_reporting): Fix prototype. Store a thread event
11380 breakpoint reference in the thread_db struct.
11381 (thread_db_load_search): Clear the thread_db object.
11382 (try_thread_db_load_1): Ditto.
11383 (switch_to_process): New.
11384 (disable_thread_event_reporting): Use it.
11385 (remove_thread_event_breakpoints): New.
11386 (thread_db_detach, thread_db_mourn): Use it.
11387
1e7fc18c
PA
113882010-05-01 Pedro Alves <pedro@codesourcery.com>
11389
11390 * linux-low.c (linux_enable_event_reporting): New.
11391 (linux_wait_for_event_1, handle_extended_wait): Use it.
11392
02fc4de7
PA
113932010-04-30 Pedro Alves <pedro@codesourcery.com>
11394
11395 * linux-low.c (linux_kill_one_lwp, linux_kill)
11396 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11397 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11398 SIGSTOP even if the LWP is stopped.
11399 (send_sigstop_callback): New.
11400 (stop_all_lwps): Use send_sigstop_callback instead.
11401 (linux_resume_one_thread): Adjust.
11402 (proceed_one_lwp): Still proceed an LWP that the client has
11403 requested to stop, if we haven't reported it as stopped yet. Make
11404 sure that LWPs the client want stopped, have a pending SIGSTOP.
11405
bc3b5632
DE
114062010-04-26 Doug Evans <dje@google.com>
11407
ae1ada35
DE
11408 * server.c (handle_general_set): Make static.
11409
bc3b5632
DE
11410 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11411 Print received char after testing for error/eof instead of before.
11412 (input_interrupt): Tweak comment.
11413
65730243
DE
114142010-04-23 Doug Evans <dje@google.com>
11415
11416 * server.c (start_inferior): Print inferior argv if --debug.
11417
a8ae7dc0
AR
114182010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11419
11420 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11421 * nto-x86-low.c: Include server.h
11422
1c07cc19
PM
114232010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11424
11425 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11426 be consistent with other sources of this directory.
11427 (init_registers_amd64): Correct name of source file of this function
11428 in the comment.
11429
e0a61e09
PM
114302010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11431
11432 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11433 64-bit executables.
11434
54709339
PM
114352010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11436
11437 * win32-i386-low.c: Add 64-bit support.
11438 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11439 (init_registers_amd64): Declare.
11440 (mappings): Add 64-bit version of array.
11441 (init_windows_x86): New function.
11442 (the_low_target): Change init_arch field to init_windows_x86.
11443
e8f0053d
PM
114442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11445
11446 * win32-low.c: Adapt to support also 64-bit architecture.
11447 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11448 (get_image_name): Use SIZE_T type for local variable `done'.
11449 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11450 (toolhelp_get_dll_name): Idem.
11451 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11452 Use uintptr_t typecast to avoid warning.
11453 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11454 (handle_exception): Use phex_nz to avoid warning.
11455 (win32_wait): Remove unused local variable `process'.
11456
c481e77e
PM
114572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11458
11459 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11460 `amd64-avx.o'.
11461
12ea4b69
PM
114622010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11463
11464 * configure.ac: Use `ws2_32' library for srv_mingw.
11465 * configure: Regenerate.
11466 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11467 * remote-utils.c: Likewise.
11468
f6d1620c
L
114692010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11470
11471 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11472 if __x86_64__ is defined.
11473
8e642873
PM
114742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11475
11476 * configure: Regenerate.
11477
711e434b
PM
114782010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11479
11480 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11481 * target.h (target_ops): New get_tib_address field.
11482 * win32-low.h (win32_thread_info): Add thread_local_base field.
11483 * win32-low.c (child_add_thread): Add tlb argument.
11484 Set thread_local_base field to TLB.
11485 (get_child_debug_event): Adapt to child_add_thread change.
11486 (win32_get_tib_address): New function.
11487 (win32_target_ops): Set get_tib_address field to
11488 win32_get_tib_address.
11489 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11490
505106cd
PA
114912010-04-12 Pedro Alves <pedro@codesourcery.com>
11492
505106cd
PA
11493 * linux-low.c (linux_mourn): Also remove the process.
11494 * server.c (handle_target_event): Don't remove the process here.
11495 * nto-low.c (nto_mourn): New.
11496 (nto_target_ops): Install it.
11497 * spu-low.c (spu_mourn): New.
11498 (spu_target_ops): Install it.
11499 * win32-low.c (win32_mourn): New.
11500 (win32_target_ops): Install it.
11501
e8470a06
PA
115022010-04-12 Pedro Alves <pedro@codesourcery.com>
11503
11504 * server.h (buffer_xml_printf): Remove redundant `;'.
11505
45ba0d02
PA
115062010-04-12 Pedro Alves <pedro@codesourcery.com>
11507
11508 * regcache.c (set_register_cache): Invalidate regcaches before
11509 changing the register cache layout.
11510 (regcache_invalidate_one): Allow a NULL regcache.
11511 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11512 regcaches before changing the register cache layout or the target
11513 regsets.
11514
59e04013
L
115152010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11516
11517 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11518 variable warning on Linux/x86-64.
11519
8336d594
PA
115202010-04-11 Pedro Alves <pedro@codesourcery.com>
11521
11522 GDBserver disconnected tracing support.
11523
11524 * linux-low.c (linux_remove_process): Delete.
11525 (add_lwp): Don't set last_resume_kind here.
11526 (linux_kill): Use `mourn'.
11527 (linux_detach): Use `thread_db_detach', and `mourn'.
11528 (linux_mourn): New.
11529 (linux_attach_lwp_1): Adjust comment.
11530 (linux_attach): last_resume_kind moved the thread_info; adjust.
11531 (status_pending_p_callback): Adjust.
11532 (linux_wait_for_event_1): Adjust.
11533 (count_events_callback, select_singlestep_lwp_callback)
11534 (select_event_lwp_callback, cancel_breakpoints_callback)
11535 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11536 (proceed_one_lwp): Adjust.
11537 (linux_async): Add debug output.
11538 (linux_thread_stopped): New.
11539 (linux_pause_all): New.
11540 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11541 linux_pause_all.
11542 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11543 (thread_db_free): Delete declaration.
11544 (thread_db_detach, thread_db_mourn): Declare.
11545 * thread-db.c (thread_db_init): Use thread_db_mourn.
11546 (thread_db_free): Delete, split in two.
11547 (disable_thread_event_reporting): New.
11548 (thread_db_detach): New.
11549 (thread_db_mourn): New.
11550
11551 * server.h (struct thread_info) <last_resume_kind>: New field.
11552 <attached>: Add comment.
11553 <gdb_detached>: New field.
11554 (handler_func): Change return type to int.
11555 (handle_serial_event, handle_target_event): Ditto.
11556 (gdb_connected): Declare.
11557 (tracing): Delete.
11558 (disconnected_tracing): Declare.
11559 (stop_tracing): Declare.
11560
11561 * server.c (handle_query) <qSupported>: Report support for
11562 disconnected tracing.
11563 (queue_stop_reply_callback): Account for running threads.
11564 (gdb_wants_thread_stopped): New.
11565 (gdb_wants_all_threads_stopped): New.
11566 (gdb_reattached_process): New.
11567 (handle_status): Clear the `gdb_detached' flag of all processes.
11568 In all-stop, stop all threads.
11569 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11570 (process_serial_event): If the remote connection breaks, or if an
11571 exit was forced with "monitor exit", force an event loop exit.
11572 Handle disconnected tracing on detach.
11573 (handle_serial_event): Adjust.
11574 (handle_target_event): If GDB isn't connected, forward events back
11575 to the inferior, unless the last process exited, in which case,
11576 exit gdbserver. Adjust interface.
11577
11578 * remote-utils.c (remote_open): Don't block in accept. Instead
11579 register an event loop source on the listen socket file
11580 descriptor. Refactor bits into ...
11581 (listen_desc): ... this new global.
11582 (gdb_connected): ... this new function.
11583 (enable_async_notification): ... this new function.
11584 (handle_accept_event): ... this new function.
11585 (remote_close): Clear remote_desc.
11586
11587 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11588
11589 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11590 New fields.
11591 (mourn_inferior): Define.
11592 (target_process_qsupported): Avoid the dangling else problem.
11593 (thread_stopped): Define.
11594 (pause_all): Define.
11595 (target_waitstatus_to_string): Declare.
11596 * target.c (target_waitstatus_to_string): New.
11597
11598 * tracepoint.c (tracing): Make extern.
11599 (disconnected_tracing): New.
11600 (stop_tracing): Make extern. Handle tracing stops due to GDB
11601 disconnecting.
11602 (cmd_qtdisconnected): New.
11603 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11604 (handle_tracepoint_general_set): Handle QTDisconnected.
11605
11606 * event-loop.c (event_handler_func): Change return type to int.
11607 (process_event): Bail out if the event handler wants the event
11608 loop to stop.
11609 (handle_file_event): Ditto.
11610 (start_event_loop): Bail out if the event handler wants the event
11611 loop to stop.
11612
11613 * nto-low.c (nto_target_ops): Adjust.
11614 * spu-low.c (spu_wait): Don't remove the process here.
11615 (spu_target_ops): Adjust.
11616 * win32-low.c (win32_wait): Don't remove the process here.
11617 (win32_target_ops): Adjust.
11618
5d267c4c
PA
116192010-04-11 Pedro Alves <pedro@codesourcery.com>
11620
11621 * regcache.c (realloc_register_cache): Invalidate inferior's
11622 regcache before recreating it.
11623
623ccd72
PA
116242010-04-09 Pedro Alves <pedro@codesourcery.com>
11625
11626 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11627
219f2f23
PA
116282010-04-09 Stan Shebs <stan@codesourcery.com>
11629 Pedro Alves <pedro@codesourcery.com>
11630
11631 * server.h (LONGEST): New.
11632 (struct thread_info) <while_stepping>: New field.
11633 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11634 Declare.
11635 (initialize_tracepoint, handle_tracepoint_general_set)
11636 (handle_tracepoint_query, tracepoint_finished_step)
11637 (tracepoint_was_hit, release_while_stepping_state_list):
11638 (current_traceframe): Declare.
11639 * server.c (handle_general_set): Handle tracepoint packets.
11640 (read_memory): New.
11641 (write_memory): New.
11642 (handle_search_memory_1): Use read_memory.
11643 (handle_query): Report support for conditional tracepoints, trace
11644 state variables, and tracepoint sources. Handle tracepoint
11645 queries.
11646 (main): Initialize the tracepoints module.
11647 (process_serial_event): Handle traceframe reads/writes.
11648
11649 * linux-low.c (handle_tracepoints): New.
11650 (linux_wait_1): Call it.
11651 (linux_resume_one_lwp): Handle while-stepping.
11652 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11653 (linux_target_ops): Install them.
11654 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11655 New field.
11656 * linux-x86-low.c (x86_supports_tracepoints): New.
11657 (the_low_target). Install it.
11658
11659 * mem-break.h (delete_breakpoint): Declare.
11660 * mem-break.c (delete_breakpoint): Make external.
11661
11662 * target.h (struct target_ops): Add `supports_tracepoints',
11663 `read_pc', and `write_pc' fields.
11664 (target_supports_tracepoints): Define.
11665 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11666 (phex_nz): New.
11667
11668 * regcache.h (struct regcache) <registers_owned>: New field.
11669 (init_register_cache, regcache_cpy): Declare.
11670 (regcache_read_pc, regcache_write_pc): Declare.
11671 (register_cache_size): Declare.
11672 (supply_regblock): Declare.
11673 * regcache.c (init_register_cache): New.
11674 (new_register_cache): Use it.
11675 (regcache_cpy): New.
11676 (register_cache_size): New.
11677 (supply_regblock): New.
11678 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11679
219f2f23
PA
11680 * tracepoint.c: New.
11681
11682 * Makefile.in (OBS): Add tracepoint.o.
11683 (tracepoint.o): New rule.
11684
3a13a53b
L
116852010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11686
11687 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11688 (i386-mmx.o): New.
11689 (i386-mmx.c): Likewise.
11690 (i386-mmx-linux.o): Likewise.
11691 (i386-mmx-linux.c): Likewise.
11692
11693 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11694 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11695 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11696 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11697
11698 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11699 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11700 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11701
1570b33e
L
117022010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11703
11704 * Makefile.in (clean): Updated.
11705 (i386-avx.o): New.
11706 (i386-avx.c): Likewise.
11707 (i386-avx-linux.o): Likewise.
11708 (i386-avx-linux.c): Likewise.
11709 (amd64-avx.o): Likewise.
11710 (amd64-avx.c): Likewise.
11711 (amd64-avx-linux.o): Likewise.
11712 (amd64-avx-linux.c): Likewise.
11713
11714 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11715 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11716 (srv_amd64_regobj): Add amd64-avx.o.
11717 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11718 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11719 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11720 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11721 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11722 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11723 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11724
11725 * i387-fp.c: Include "i386-xstate.h".
11726 (i387_xsave): New.
11727 (i387_cache_to_xsave): Likewise.
11728 (i387_xsave_to_cache): Likewise.
11729 (x86_xcr0): Likewise.
11730
11731 * i387-fp.h (i387_cache_to_xsave): Likewise.
11732 (i387_xsave_to_cache): Likewise.
11733 (x86_xcr0): Likewise.
11734
11735 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11736 * linux-crisv32-low.c (target_regsets): Likewise.
11737 * linux-m68k-low.c (target_regsets): Likewise.
11738 * linux-mips-low.c (target_regsets): Likewise.
11739 * linux-ppc-low.c (target_regsets): Likewise.
11740 * linux-s390-low.c (target_regsets): Likewise.
11741 * linux-sh-low.c (target_regsets): Likewise.
11742 * linux-sparc-low.c (target_regsets): Likewise.
11743 * linux-xtensa-low.c (target_regsets): Likewise.
11744
11745 * linux-low.c: Include <sys/uio.h>.
11746 (regsets_fetch_inferior_registers): Support nt_type.
11747 (regsets_store_inferior_registers): Likewise.
11748 (linux_process_qsupported): New.
11749 (linux_target_ops): Add linux_process_qsupported.
11750
11751 * linux-low.h (regset_info): Add nt_type.
11752 (linux_target_ops): Add process_qsupported.
11753
11754 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11755 and <sys/uio.h>.
11756 (init_registers_i386_avx_linux): New.
11757 (init_registers_amd64_avx_linux): Likewise.
11758 (xmltarget_i386_linux_no_xml): Likewise.
11759 (xmltarget_amd64_linux_no_xml): Likewise.
11760 (PTRACE_GETREGSET): Likewise.
11761 (PTRACE_SETREGSET): Likewise.
11762 (x86_fill_xstateregset): Likewise.
11763 (x86_store_xstateregset): Likewise.
11764 (use_xml): Likewise.
11765 (x86_linux_update_xmltarget): Likewise.
11766 (x86_linux_process_qsupported): Likewise.
11767 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11768 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11769 init_registers_i386_linux here. Call
11770 x86_linux_update_xmltarget.
11771 (the_low_target): Add x86_linux_process_qsupported.
11772
11773 * server.c (handle_query): Call target_process_qsupported.
11774
11775 * target.h (target_ops): Add process_qsupported.
11776 (target_process_qsupported): New.
11777
fc7238bb
PA
117782010-04-03 Pedro Alves <pedro@codesourcery.com>
11779
11780 * inferiors.c (add_thread): Set last_status kind to
11781 TARGET_WAITKIND_IGNORE.
11782 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11783 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11784 (linux_wait_1): Move `thread' local definition to block that uses
11785 it. Don't NULL initialize `event_child'.
11786 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11787 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11788 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11789
bdabb078
PA
117902010-04-01 Pedro Alves <pedro@codesourcery.com>
11791
11792 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11793 an extended waitstatus, or by a watchpoint.
11794 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11795 thread was stepping or has been stopped by a watchpoint.
11796
d3bbe7a0
PA
117972010-04-01 Pedro Alves <pedro@codesourcery.com>
11798
11799 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11800 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11801 of another, then delete the previous, and validate all
11802 breakpoints.
11803 (validate_inserted_breakpoint): New.
11804 (delete_disabled_breakpoints): New.
11805 (validate_breakpoints): New.
11806 (check_mem_read): Validate breakpoints before trusting their
11807 shadow. Delete disabled breakpoints.
11808 (check_mem_write): Validate breakpoints before trusting they
11809 should be inserted. Delete disabled breakpoints.
11810 * mem-break.h (validate_breakpoints):
11811 * server.c (handle_query): Validate breakpoints when we see a
11812 qSymbol query.
11813
8b07ae33
PA
118142010-04-01 Pedro Alves <pedro@codesourcery.com>
11815
11816 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11817 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11818 if we could tell there's a GDB breakpoint at stop_pc.
11819 (need_step_over_p): Don't do a step over if we find a GDB
11820 breakpoint at the resume PC.
11821
11822 * mem-break.c (struct raw_breakpoint): New.
11823 (enum bkpt_type): New type `gdb_breakpoint'.
11824 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11825 fields. New field `raw'.
11826 (find_raw_breakpoint_at): New.
11827 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11828 breakpoint instead.
11829 (set_breakpoint_at): Adjust.
11830 (delete_raw_breakpoint): New.
11831 (release_breakpoint): New.
11832 (delete_breakpoint): Rename to...
11833 (delete_breakpoint_1): ... this. Add proc parameter. Use
11834 release_breakpoint. Return ENOENT.
11835 (delete_breakpoint): Reimplement.
11836 (find_breakpoint_at): Delete.
11837 (find_gdb_breakpoint_at): New.
11838 (delete_breakpoint_at): Delete.
11839 (set_gdb_breakpoint_at): New.
11840 (delete_gdb_breakpoint_at): New.
11841 (gdb_breakpoint_here): New.
11842 (set_reinsert_breakpoint): Use release_breakpoint.
11843 (uninsert_breakpoint): Rename to ...
11844 (uninsert_raw_breakpoint): ... this.
11845 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11846 (reinsert_raw_breakpoint): Change parameter type to
11847 raw_breakpoint.
11848 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11849 instead.
11850 (check_breakpoints): Adjust. Use release_breakpoint.
11851 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11852 (breakpoint_inserted_here): Ditto.
11853 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11854 Don't trust the breakpoint's shadow if it is not inserted.
11855 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11856 (delete_all_breakpoints): Adjust.
11857 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11858 use delete_breakpoint_1.
11859
11860 * mem-break.h (breakpoints_supported): Delete declaration.
11861 (set_gdb_breakpoint_at): Declare.
11862 (gdb_breakpoint_here): Declare.
11863 (delete_breakpoint_at): Delete.
11864 (delete_gdb_breakpoint_at): Declare.
11865
11866 * server.h (struct raw_breakpoint): Forward declare.
11867 (struct process_info): New field `raw_breakpoints'.
11868
11869 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11870 breakpoints.
11871
6bf5e0ba
PA
118722010-03-24 Pedro Alves <pedro@codesourcery.com>
11873
11874 * linux-low.c (status_pending_p_callback): Fix comment.
11875 (linux_wait_for_event_1): Move most of the internal breakpoint
11876 handling from here...
11877 (linux_wait_1): ... to here.
11878 (count_events_callback): New.
11879 (select_singlestep_lwp_callback): New.
11880 (select_event_lwp_callback): New.
11881 (cancel_breakpoints_callback): New.
11882 (select_event_lwp): New.
11883 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11884 priority to all LWPs that have had events that should be reported
11885 to the client. Cancel breakpoints when about to reporting the
11886 event to the client, not while stopping lwps. No longer cancel
11887 finished single-steps here.
11888 (cancel_finished_single_step): Delete.
11889 (cancel_finished_single_steps): Delete.
11890
414a389f
PA
118912010-03-24 Pedro Alves <pedro@codesourcery.com>
11892
11893 * mem-break.c (enum bkpt_type): New.
11894 (struct breakpoint): New field `type'.
11895 (set_breakpoint_at): Change return type to struct breakpoint
11896 pointer. Set type to `other_breakpoint' by default.
11897 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11898 in the breakpoint list.
11899 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11900 (reinsert_breakpoint): Rename to ...
11901 (reinsert_raw_breakpoint): ... this.
11902 (reinsert_breakpoints_at): Adjust.
11903 * mem-break.h (struct breakpoint): Declare.
11904 (set_breakpoint_at): Change return type to struct breakpoint
11905 pointer.
11906
2280c721
PA
119072010-03-24 Pedro Alves <pedro@codesourcery.com>
11908
11909 * server.c (handle_query): Assign, not compare.
11910
d50171e4
PA
119112010-03-24 Pedro Alves <pedro@codesourcery.com>
11912
11913 Teach linux gdbserver to step-over-breakpoints.
11914
11915 * linux-low.c (can_hardware_single_step): New.
11916 (supports_breakpoints): New.
11917 (handle_extended_wait): If stopping threads, read the stop pc of
11918 the new cloned LWP.
11919 (get_pc): New.
11920 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11921 low target doesn't support retrieving the PC.
11922 (add_lwp): Set last_resume_kind to resume_continue.
11923 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11924 (linux_attach): Don't clear stop_expected. Set the lwp's
11925 last_resume_kind to resume_stop.
11926 (linux_detach_one_lwp): Don't check for removed breakpoints.
11927 (check_removed_breakpoint): Delete.
11928 (status_pending_p): Rename to ...
11929 (status_pending_p_callback): ... this. Don't check for removed
11930 breakpoints. Don't consider threads that are stopped from GDB's
11931 perspective.
11932 (linux_wait_for_lwp): Always read the stop_pc here.
11933 (cancel_breakpoint): New.
11934 (step_over_bkpt): New global.
11935 (linux_wait_for_event_1): Implement stepping over breakpoints.
11936 (gdb_wants_lwp_stopped): New.
11937 (gdb_wants_all_stopped): New.
11938 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11939 single-step traps here. Store the thread's last reported target
11940 wait status.
11941 (send_sigstop): Don't clear stop_expected. Always set it,
11942 instead.
11943 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11944 (cancel_finished_single_step): New.
11945 (cancel_finished_single_steps): New.
11946 (wait_for_sigstop): Don't cancel finished single-step traps here.
11947 (linux_resume_one_lwp): Don't check for removed breakpoints.
11948 Don't set `step' on non-hardware step archs.
11949 (linux_set_resume_request): Ignore resume_stop requests if already
11950 stopping or stopped. Set the lwp's last_resume_kind.
11951 (resume_status_pending_p): Don't check for removed breakpoints.
11952 (need_step_over_p): New.
11953 (start_step_over): New.
11954 (finish_step_over): New.
11955 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11956 requests. Clear the thread's last reported target waitstatus.
11957 Don't use the `suspended' flag. Don't consider pending breakpoints.
11958 (linux_resume): Start a step-over if necessary.
11959 (proceed_one_lwp): New.
11960 (proceed_all_lwps): New.
11961 (unstop_all_lwps): New.
11962 * linux-low.h (struct lwp_info): Rewrite comment for the
11963 `suspended' flag. Add the `stop_pc' field. Delete the
11964 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11965 Add `'last_resume_kind' and `need_step_over' fields.
11966 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11967 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11968 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11969 (set_raw_breakpoint_at): New.
11970 (set_breakpoint_at): Rewrite to use it.
11971 (reinsert_breakpoint_handler): Delete.
11972 (set_reinsert_breakpoint): New.
11973 (reinsert_breakpoint_by_bp): Delete.
11974 (delete_reinsert_breakpoints): New.
11975 (uninsert_breakpoint): Rewrite.
11976 (uninsert_breakpoints_at): New.
11977 (reinsert_breakpoint): Rewrite.
11978 (reinsert_breakpoints_at): New.
11979 (check_breakpoints): Rewrite.
11980 (breakpoint_here): New.
11981 (breakpoint_inserted_here): New.
11982 (check_mem_read): Adjust.
11983 * mem-break.h (breakpoints_supported, breakpoint_here)
11984 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11985 (reinsert_breakpoint_by_bp): Delete declaration.
11986 (delete_reinsert_breakpoints): Declare.
11987 (reinsert_breakpoint): Delete declaration.
11988 (reinsert_breakpoints_at): Declare.
11989 (uninsert_breakpoint): Delete declaration.
11990 (uninsert_breakpoints_at): Declare.
11991 (check_breakpoints): Adjust prototype.
11992 * server.h: Adjust include order.
11993 (struct thread_info): Declare here. Add a `last_status' field.
11994
30ba68cb
MS
119952010-03-23 Michael Snyder <msnyder@vmware.com>
11996
11997 * server.c (crc32): New function.
11998 (handle_query): Add handling for 'qCRC:' request.
11999
b9a881c2
PA
120002010-03-23 Pedro Alves <pedro@codesourcery.com>
12001
12002 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12003 lwp had been stopped by a watchpoint.
12004
e92d13d5
PA
120052010-03-16 Pedro Alves <pedro@codesourcery.com>
12006
12007 * server.h (internal_error): Declare.
12008 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12009 * utils.c (internal_error): New function.
12010
64daa791
AS
120112010-03-15 Andreas Schwab <schwab@redhat.com>
12012
12013 * configure.srv: Fix typo setting srv_regobj.
12014
f52cd8cd
PA
120152010-03-15 Pedro Alves <pedro@codesourcery.com>
12016
12017 * linux-low.c (fetch_register): Avoid passing a non string literal
12018 format to `error'.
12019 (usr_store_inferior_registers): Ditto.
12020
93ae6fdc
PA
120212010-03-14 Pedro Alves <pedro@codesourcery.com>
12022
12023 * linux-low.c (linux_write_memory): Bail out early if peeking
12024 memory failed.
12025
c3adc08c
PA
120262010-03-14 Pedro Alves <pedro@codesourcery.com>
12027
12028 * linux-low.h (struct lwp_info): New fields
12029 `stopped_by_watchpoint' and `stopped_data_address'.
12030 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
12031 here, and cache them in the lwp object.
12032 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
12033 directly.
12034 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
12035 field.
12036 (linux_stopped_by_watchpoint): Rewrite.
12037 (linux_stopped_data_address): Rewrite.
12038
bce522a2
PA
120392010-03-06 Simo Melenius <simo.melenius@iki.fi>
12040
12041 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
12042 switching the current inferior, not before.
12043
90884b2b
L
120442010-03-01 H.J. Lu <hongjiu.lu@intel.com>
12045
12046 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12047 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12048 i386-linux.c and amd64-linux.c.
12049 (reg-i386.o): Removed.
12050 (reg-i386.c): Likewise.
12051 (reg-i386-linux.o): Likewise.
12052 (reg-i386-linux.c): Likewise.
12053 (reg-x86-64.o): Likewise.
12054 (reg-x86-64.c): Likewise.
12055 (reg-x86-64-linux.o): Likewise.
12056 (reg-x86-64-linux.c): Likewise.
12057 (i386.o): New.
12058 (i386.c): Likewise.
12059 (i386-linux.o): Likewise.
12060 (i386-linux.c): Likewise.
12061 (amd64.o): Likewise.
12062 (amd64.c): Likewise.
12063 (amd64-linux.o): Likewise.
12064 (amd64-linux.c): Likewise.
12065
12066 * configure.srv (srv_i386_regobj): New.
12067 (srv_i386_linux_regobj): Likewise.
12068 (srv_amd64_regobj): Likewise.
12069 (srv_amd64_linux_regobj): Likewise.
12070 (srv_i386_32bit_xmlfiles): Likewise.
12071 (srv_i386_64bit_xmlfiles): Likewise.
12072 (srv_i386_xmlfiles): Likewise.
12073 (srv_amd64_xmlfiles): Likewise.
12074 (srv_i386_linux_xmlfiles): Likewise.
12075 (srv_amd64_linux_xmlfiles): Likewise.
12076 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12077 srv_xmlfiles to $srv_i386_xmlfiles.
12078 (i[34567]86-*-mingw32ce*): Likewise.
12079 (i[34567]86-*-mingw*): Likewise.
12080 (i[34567]86-*-nto*): Likewise.
12081 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12082 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12083 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12084 (x86_64-*-linux*): Likewise.
12085
12086 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12087 (init_registers_amd64_linux): New.
12088 (x86_arch_setup): Replace init_registers_x86_64_linux with
12089 init_registers_amd64_linux.
12090
193f13e6
MK
120912010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12092
12093 * configure.ac: Check for libdl. If it is not available link against
12094 static libthread_db.
12095 * configure: Regenerate.
12096
85d721b8
PA
120972010-02-22 Pedro Alves <pedro@codesourcery.com>
12098
12099 PR9605
12100
12101 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12102 handing a read watchpoint.
12103 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12104
6076632b
DE
121052010-02-12 Doug Evans <dje@google.com>
12106
12107 * linux-low.c (linux_supports_tracefork_flag): Document.
12108 (linux_look_up_symbols): Add comment.
12109
3327ccf7
L
121102010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12111
12112 * regcache.c (supply_register): Clear regcache if buf is NULL.
12113
0718675c 121142010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12115 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12116
12117 * inferiors.c (find_inferior): Add function documentation.
12118 (unloaded_dll): Handle the case where the unloaded dll has not
12119 been previously registered in the dll list.
12120
177321bd
DJ
121212010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12122
12123 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12124 (thumb2_breakpoint): New.
12125 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12126
2b009048
DJ
121272010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12128
12129 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12130 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12131 breakpoints.
12132
3be029c7
PA
121332010-01-21 Pedro Alves <pedro@codesourcery.com>
12134
12135 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12136
18f5de3b
JK
121372010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12138
12139 * linux-s390-low.c (s390_collect_ptrace_register)
12140 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12141
3743bb4f
DE
121422010-01-21 Doug Evans <dje@google.com>
12143
14ce3065
DE
12144 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12145 (PTRACE_ARG4_TYPE): New macro.
12146 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12147 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12148 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12149 (usr_store_inferior_registers): Ditto.
12150 (linux_read_memory, linux_write_memory): Ditto.
12151 (linux_test_for_tracefork): Ditto.
12152
3743bb4f
DE
12153 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12154 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12155
8b315be5
PA
121562010-01-21 Pedro Alves <pedro@codesourcery.com>
12157
12158 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12159 target.
12160
85492558
PA
121612010-01-21 Pedro Alves <pedro@codesourcery.com>
12162
12163 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12164 prototype to take a regcache. Adjust.
12165
442ea881
PA
121662010-01-20 Pedro Alves <pedro@codesourcery.com>
12167
12168 * regcache.h (struct thread_info): Forward declare.
12169 (struct regcache): New.
12170 (new_register_cache): Adjust prototype.
12171 (get_thread_regcache): Declare.
12172 (free_register_cache): Adjust prototype.
12173 (registers_to_string, registers_from_string): Ditto.
12174 (supply_register, supply_register_by_name, collect_register)
12175 (collect_register_as_string, collect_register_by_name): Ditto.
12176 * regcache.c (struct inferior_regcache_data): Delete.
12177 (get_regcache): Rename to ...
12178 (get_thread_regcache): ... this. Adjust. Switch inferior before
12179 fetching registers.
12180 (regcache_invalidate_one): Adjust.
12181 (regcache_invalidate): Fix prototype.
12182 (new_register_cache): Return the new register cache.
12183 (free_register_cache): Change prototype.
12184 (realloc_register_cache): Adjust.
12185 (registers_to_string): Change prototype to take a regcache. Adjust.
12186 (registers_from_string): Ditto.
12187 (register_data): Ditto.
12188 (supply_register): Ditto.
12189 (supply_register_by_name): Ditto.
12190 (collect_register): Ditto.
12191 (collect_register_as_string): Ditto.
12192 (collect_register_by_name): Ditto.
12193 * server.c (process_serial_event): Adjust.
12194 * linux-low.h (regset_fill_func, regset_store_func): Change
12195 prototype.
12196 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12197 Change prototype.
12198 * linux-low.c (get_stop_pc): Adjust.
12199 (check_removed_breakpoint): Adjust.
12200 (linux_wait_for_event): Adjust.
12201 (linux_resume_one_lwp): Adjust.
12202 (fetch_register): Add regcache parameter. Adjust.
12203 (usr_store_inferior_registers): Ditto.
12204 (regsets_fetch_inferior_registers): Ditto.
12205 (regsets_store_inferior_registers): Ditto.
12206 (linux_fetch_registers, linux_store_registers): Ditto.
12207 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12208 regcache. Adjust.
43aaf8b6
PA
12209 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12210 Ditto.
442ea881
PA
12211 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12212 prototype to take a regcache.
12213 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12214 * remote-utils.c (convert_ascii_to_int, outreg)
12215 (prepare_resume_reply): Change prototype to take a regcache.
12216 Adjust.
12217 * target.h (struct target_ops) <fetch_registers, store_registers>:
12218 Change prototype to take a regcache.
12219 (fetch_inferior_registers, store_inferior_registers): Change
12220 prototype to take a regcache. Adjust.
12221 * proc-service.c (ps_lgetregs): Adjust.
12222 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12223 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12224 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12225 take a regcache. Adjust.
12226 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12227 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12228 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12229 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12230 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12231 (cris_cannot_fetch_register):
12232 (cris_breakpoint_at): Change prototype to take a regcache.
12233 Adjust.
12234 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12235 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12236 to take a regcache. Adjust.
12237 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12238 Adjust.
12239 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12240 take a regcache. Adjust.
12241 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12242 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12243 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12244 * linux-mips-low.c (mips_get_pc):
12245 (mips_set_pc): Change prototype to take a regcache. Adjust.
12246 (mips_reinsert_addr): Adjust.
12247 (mips_collect_register): Change prototype to take a regcache.
12248 Adjust.
12249 (mips_supply_register):
12250 (mips_collect_register_32bit, mips_supply_register_32bit)
12251 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12252 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12253 * linux-ppc-low.c (ppc_supply_ptrace_register)
12254 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12255 (parse_spufs_run): Adjust.
12256 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12257 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12258 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12259 take a regcache. Adjust.
12260 * linux-s390-low.c (s390_collect_ptrace_register)
12261 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12262 (s390_set_pc): Change prototype to take a regcache. Adjust.
12263 (s390_arch_setup): Adjust.
12264 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12265 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12266 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12267 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12268 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12269 regcache. Adjust.
12270 (sparc_breakpoint_at): Adjust.
12271 * linux-xtensa-low.c (xtensa_fill_gregset):
12272 (xtensa_store_gregset):
12273 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12274 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12275 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12276 prototype to take a regcache. Adjust.
12277 * win32-arm-low.c (arm_fetch_inferior_register)
12278 (arm_store_inferior_register): Change prototype to take a
12279 regcache. Adjust.
12280 * win32-i386-low.c (i386_fetch_inferior_register)
12281 (i386_store_inferior_register): Change prototype to take a
12282 regcache. Adjust.
12283 * win32-low.c (child_fetch_inferior_registers)
12284 (child_store_inferior_registers): Change prototype to take a
12285 regcache. Adjust.
12286 (win32_wait): Adjust.
12287 (win32_fetch_inferior_registers): Change prototype to take a
12288 regcache. Adjust.
12289 (win32_store_inferior_registers): Adjust.
12290 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12291 store_inferior_register>: Change prototype to take a regcache.
12292
60c3d7b0
DE
122932010-01-20 Doug Evans <dje@google.com>
12294
12295 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12296 #ifdef.
12297 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12298 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12299
dc146f7c
VP
123002010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12301
12302 * linux-low.c (linux_core_of_thread): New.
12303 (compare_ints, show_process, list_threads): New.
12304 (linux_qxfer_osdata): Report threads and cores.
12305 (linux_target_op): Register linux_core_of_thread.
12306 * remote-utils.c (prepare_resume_reply): Report the core.
12307 (buffer_xml_printf): Support %d specifier.
12308 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12309 New.
12310 (handle_query): Handle qXfer:threads. Announce availability
12311 thereof.
12312 * target.h (struct target_ops): New field core_of_thread.
12313
7803799a
UW
123142010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12315
12316 * Makefile.in (clean): Remove new generated files.
12317 (reg-s390.o, reg-s390.c): Remove rules.
12318 (reg-s390x.o, reg-s390x.c): Likewise.
12319 (s390-linux32.o, s390-linux32.c): Add rules.
12320 (s390-linux64.o, s390-linux64.c): Likewise.
12321 (s390x-linux64.o, s390x-linux64.c): Likewise.
12322 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12323 * linux-s390-low.c: Include <elf.h>.
12324 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12325 (init_registers_s390): Remove prototype.
12326 (init_registers_s390x): Likewise.
12327 (init_registers_s390_linux32): Add prototype.
12328 (init_registers_s390_linux64): Likewise.
12329 (init_registers_s390x_linux64): Likewise.
12330 (s390_num_regs_3264): New define.
12331 (s390_regmap_3264): New global variable.
12332 (s390_cannot_fetch_register): Remove obsolete check.
12333 (s390_cannot_store_register): Likewise.
12334 (s390_collect_ptrace_register): Handle upper/lower register halves.
12335 (s390_supply_ptrace_register): Likewise.
12336 (s390_fill_gregset): Update to register number changes.
12337 (s390_get_hwcap): New routine.
12338 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12339 Install appropriate regmap and register set.
12340
6e7ffa39
JB
123412010-01-01 Joel Brobecker <brobecker@adacore.com>
12342
12343 * server.c (gdbserver_version): Update copyright year to 2010.
12344 * gdbreplay.c (gdbreplay_version): Likewise.
12345
957f3f49
DE
123462009-12-28 Doug Evans <dje@google.com>
12347
12348 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12349 elf/external.h. Include <elf.h> instead but only if necessary.
12350
ca5c370d
PA
123512009-12-28 Pedro Alves <pedro@codesourcery.com>
12352
12353 * linux-low.c (linux_remove_process): Remove `detaching'
12354 parameter. Don't release/detach from thread_db here.
12355 (linux_kill): Release/detach from thread_db here, ...
12356 (linux_detach): ... and here, before actually detaching.
12357 (linux_wait_1): ... and here, when a process exits.
12358 * thread-db.c (any_thread_of): New.
12359 (thread_db_free): Switch the current inferior to a thread of the
12360 passed in process.
12361
4ee62156
DE
123622009-12-21 Doug Evans <dje@google.com>
12363
d90e6a88
DE
12364 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12365
c5f62d5f
DE
12366 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12367 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12368 warning ifndef __NR_tkill. Move setting of errno there too.
12369 Delete unnecessary resetting of errno after syscall.
12370 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12371
10e86dd7
DE
12372 * configure.ac: Check for dladdr.
12373 * config.in: Regenerate.
12374 * configure: Regenerate.
12375 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12376 (try_thread_db_load): Update.
12377
4ee62156
DE
12378 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12379
00f515da
DE
123802009-12-18 Doug Evans <dje@google.com>
12381
e9464885
DE
12382 * event-loop.c: Include unistd.h if it exists.
12383
07d4f67e
DE
12384 * linux-low.c (my_waitpid): Move definition away from being in
12385 between linux_tracefork_child/linux_test_for_tracefork.
12386
00f515da
DE
12387 * gdb_proc_service.h (psaddr_t): Fix type.
12388 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12389 signature to match glibc.
12390
1de1badb
DE
123912009-12-16 Doug Evans <dje@google.com>
12392
12393 * linux-low.c (linux_read_memory): Fix argument to read.
12394
aeeb81d1
PA
123952009-11-26 Pedro Alves <pedro@codesourcery.com>
12396
12397 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12398 events, don't leave current_inferior pointing at null.
12399
10357975
PA
124002009-11-26 Pedro Alves <pedro@codesourcery.com>
12401
12402 * win32-low.c (LOG): Delete.
12403 (OUTMSG): Output to stderr.
12404 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12405 on compile time LOG macro.
12406 (win32_wait): Fix debug output.
12407
cf6e3471
PA
124082009-11-26 Pedro Alves <pedro@codesourcery.com>
12409
12410 * win32-low.c (win32_add_one_solib): If the dll name is
12411 "ntdll.dll", prepend the system directory to the dll path.
12412
0c85e18e
MK
124132009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12414
12415 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12416
9ac544ce 124172009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12418 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12419
12420 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12421 * configure.ac: Check for __mcoldfire__ and set
12422 gdb_cv_m68k_is_coldfire.
12423 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12424 reg-cf.o and reg-m68k.o.
12425 * configure: Regenerated.
12426
fd7dd3e6
PA
124272009-11-16 Pedro Alves <pedro@codesourcery.com>
12428
12429 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12430 Pass it to thread_db_free.
12431 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12432 proper `detaching' argument to linux_remove_process.
12433 * linux-low.h (thread_db_free): Add `detaching' parameter.
12434 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12435 to thread_db_free.
12436 (thread_db_free): Add `detaching' parameter. Only
12437 call td_ta_clear_event if detaching from process.
12438
75aa492e
MK
124392009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12440
12441 * thread-db.c (thread_db_free): Fix typo.
12442
21e1bee4
PP
124432009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12444
12445 PR gdb/10838
12446 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12447
8838b45e
NS
124482009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12449
12450 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12451 with an i686 compiler.
12452 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12453 needed.
12454 * configure: Rebuilt.
12455
8a35fb51
SL
124562009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12457
12458 PR gdb/10783
12459
12460 * server.c (handle_search_memory_1): Correct read_addr initialization
12461 in loop for searching subsequent chunks.
12462
96f15937
PP
124632009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12464
12465 * configure.ac: New --with-libthread-db option.
12466 * thread-db.c: Allow direct dependence on libthread_db.
12467 (thread_db_free): Adjust.
12468 * config.in: Regenerate.
12469 * configure: Likewise.
889bf7c5 12470
5f7d1694
PP
124712009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12472
12473 PR gdb/10757
12474 * thread-db.c (attach_thread): New function.
12475 (maybe_attach_thread): Return success/failure.
12476 (find_new_threads_callback): Adjust.
889bf7c5
PA
12477 (thread_db_find_new_threads): Loop until no new threads.
12478
88e3b899
PA
124792009-10-13 Pedro Alves <pedro@codesourcery.com>
12480
12481 * proc-service.c (ps_lgetregs): Formatting.
12482
cdbfd419
PP
124832009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12484
12485 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12486 * configure.ac: Adjust.
12487 * linux-low.h (struct process_info_private): Move members to struct
12488 thread_db.
12489 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12490 * linux-low.c (linux_remove_process): Adjust.
12491 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12492 * server.c (handle_query): Move code ...
12493 (handle_monitor_command): ... here. New function.
12494 * target.h (struct target_ops): New member.
12495 * thread-db.c (struct thread_db): New.
12496 (libthread_db_search_path): New variable.
12497 (thread_db_create_event, thread_db_enable_reporting)
12498 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12499 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12500 (try_thread_db_load_1, dladdr_to_soname): New functions.
12501 (try_thread_db_load, thread_db_load_search): New functions.
12502 (thread_db_init): Search for libthread_db.
12503 (thread_db_free): New function.
12504 (thread_db_handle_monitor_command): Likewise.
12505 * config.in: Regenerate.
12506 * configure: Regenerate.
889bf7c5 12507
4168d2d6
UW
125082009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12509
12510 * spu-low.c (spu_kill): Wait for inferior to terminate.
12511 Call clear_inferiors.
12512 (spu_detach): Call clear_inferiors.
12513
81ecdfbb
RW
125142009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12515
12516 * aclocal.m4: Regenerate.
12517 * config.in: Likewise.
12518 * configure: Likewise.
12519
0b9ff2c0
UW
125202009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12521
12522 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12523 (parse_spufs_run): New function.
12524 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12525 (ppc_breakpoint_at): Handle SPU breakpoints.
12526
efcbbd14
UW
125272009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12528
12529 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12530 (SPUFS_MAGIC): Define.
12531 (spu_enumerate_spu_ids): New function.
12532 (linux_qxfer_spu): New function.
12533 (linux_target_ops): Install linux_qxfer_spu.
12534
f4d9bade
UW
125352009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12536
12537 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12538 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12539 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12540 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12541 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12542 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12543 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12544 (init_registers_powerpc_cell32l): Add prototype.
12545 (init_registers_powerpc_cell64l): Likewise.
12546 (ppc_arch_setup): Detect Cell/B.E. architecture.
12547
96e946ca
RW
125482009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12549
12550 * Makefile.in (datarootdir): New variable.
12551
58d6951d
DJ
125522009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12553
12554 * linux-low.c (linux_write_memory): Update debugging output.
12555 * Makefile.in (clean): Add new descriptions.
12556 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12557 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12558 * configure.srv: Add new files for arm*-*-linux*.
12559 * linux-arm-low.c: Add new declarations.
12560 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12561 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12562 (HWCAP_VFPv3D16): New.
12563 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12564 instead of __IWMMXT__.
12565 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12566 (arm_arch_setup): New.
12567 (target_regsets): Remove #ifdef. Add VFP regset.
12568 (the_low_target): Use arm_arch_setup.
12569
12b42a12
DJ
125702009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12571
12572 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12573 the main thread again.
12574
ac8c974e
AR
125752009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12576
12577 Adding Neutrino gdbserver.
12578 * configure: Regenerated.
12579 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12580 * configure.srv (i[34567]86-*-nto*): New target.
12581 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12582 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12583 (nto_comctrl) [__QNX__]: New function.
12584 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12585
4424e0c3 125862009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12587
12588 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12589 srv_tgtobj.
12590
912cf4ba
PA
125912009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12592 Pedro Alves <pedro@codesourcery.com>
12593
12594 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12595 don't support CONTEXT_EXTENDED_REGISTERS.
12596 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12597 (the_low_target): Install them.
12598 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12599 failing with ERROR_PIPE_NOT_CONNECTED.
12600
aa5ca48f
DE
126012009-06-30 Doug Evans <dje@google.com>
12602 Pierre Muller <muller@ics.u-strasbg.fr>
12603
12604 Add h/w watchpoint support to x86-linux, win32-i386.
12605 * Makefile.in (SFILES): Add i386-low.c
12606 (i386_low_h): Define.
12607 (i386-low.o): Add dependencies.
12608 (linux-x86-low.o): Add i386-low.h dependency.
12609 (win32-i386-low.o): Ditto.
12610 * i386-low.c: New file.
12611 * i386-low.h: New file.
12612 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12613 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12614 * linux-low.c (linux_add_process): Initialize arch_private.
12615 (linux_remove_process): Free arch_private.
12616 (add_lwp): Initialize arch_private.
12617 (delete_lwp): Free arch_private.
12618 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12619 provided.
12620 * linux-low.h (process_info_private): New member arch_private.
12621 (lwp_info): New member arch_private.
12622 (linux_target_ops): New members new_process, new_thread,
12623 prepare_to_resume.
12624 (ptid_of): New macro.
12625 * linux-x86-low.c: Include stddef.h, i386-low.h.
12626 (arch_process_info): New struct.
12627 (arch_lwp_info): New struct.
12628 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12629 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12630 (i386_dr_low_get_status): New function.
12631 (x86_insert_point, x86_remove_point): New functions.
12632 (x86_stopped_by_watchpoint): New function.
12633 (x86_stopped_data_address): New function.
12634 (x86_linux_new_process, x86_linux_new_thread): New functions.
12635 (x86_linux_prepare_to_resume): New function.
12636 (the_low_target): Add entries for insert_point, remove_point,
12637 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12638 prepare_to_resume.
12639 * server.c (debug_hw_points): New global.
12640 (monitor_show_help): Document set debug-hw-points.
12641 (handle_query): Process "set debug-hw-points".
12642 * server.h (debug_hw_points): Declare.
12643 (paddress): Declare.
12644 * utils.c (NUMCELLS, CELLSIZE): New macros.
12645 (get_sell, xsnprintf, paddress): New functions.
12646 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12647 remove_point, stopped_by_watchpoint, stopped_data_address.
12648 * win32-i386-low.c: Include i386-low.h.
12649 (debug_reg_state): Replaces dr.
12650 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12651 (i386_dr_low_get_status): New function.
12652 (i386_insert_point, i386_remove_point): New functions.
12653 (i386_stopped_by_watchpoint): New function.
12654 (i386_stopped_data_address): New function.
12655 (i386_initial_stuff): Update.
12656 (get_thread_context,set_thread_context,i386_thread_added): Update.
12657 (the_low_target): Add entries for insert_point,
12658 remove_point, stopped_by_watchpoint, stopped_data_address.
12659 * win32-low.c (win32_insert_watchpoint): New function.
12660 (win32_remove_watchpoint): New function.
12661 (win32_stopped_by_watchpoint): New function.
12662 (win32_stopped_data_address): New function.
12663 (win32_target_ops): Add entries for insert_watchpoint,
12664 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12665 * win32-low.h (win32_target_ops): New members insert_point,
12666 remove_point, stopped_by_watchpoint, stopped_data_address.
12667
d993e290
PA
126682009-06-25 Pedro Alves <pedro@codesourcery.com>
12669
12670 * server.c (process_serial_event): Re-return unsupported, not
12671 error, if the type isn't recognized. Re-allow supporting only
12672 insert or remove packets. Also call require_running for
12673 breakpoints. Add missing break statement to default case. Tidy.
12674 * target.h (struct target_ops): Rename insert_watchpoint to
12675 insert_point, and remove_watchpoint to remove_point.
12676
12677 * linux-low.h (struct linux_target_ops): Likewise.
12678 * linux-low.c (linux_insert_watchpoint): Rename to ...
12679 (linux_insert_point): ... this. Adjust.
12680 (linux_remove_watchpoint): Rename to ...
12681 (linux_remove_point): ... this. Adjust.
12682 (linux_target_ops): Adjust.
12683 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12684 (cris_insert_point): ... this.
12685 (cris_remove_watchpoint): Rename to ...
12686 (cris_remove_point): ... this.
12687 (the_low_target): Adjust.
12688
0f54c268
PM
126892009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12690
12691 * server.c (handle_v_kill): Pass signal_pid to
12692 kill_inferior if multi_process is zero.
12693
c6314022
AR
126942009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12695
12696 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12697 * target.h (target_ops): Comment for *_watchpoint to make it clear
12698 the functions can get types '0' and '1'.
12699
4463ce24
AR
127002009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12701
12702 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12703 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12704 * regcache.c (get_regcache): Likewise.
12705 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12706 * win32-low.c (child_fetch_inferior_registers): Remove check for
12707 regno 0.
12708
cf8fd78b
PA
127092009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12710 Pedro Alves <pedro@codesourcery.com>
12711
12712 * target.h (struct target_ops) <supports_multi_process>: New
12713 callback.
12714 (target_supports_multi_process): New.
12715 * server.c (handle_query): Even if GDB reports support, only
12716 enable multi-process if the target also supports it. Report
12717 multi-process support only if the target backend supports it.
12718 * linux-low.c (linux_supports_multi_process): New function.
12719 (linux_target_ops): Install it as target_supports_multi_process
12720 callback.
12721
47c0c975
DE
127222009-05-24 Doug Evans <dje@google.com>
12723
e09875d4
DE
12724 Global renaming of find_thread_pid to find_thread_ptid.
12725 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12726 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12727 All callers updated.
12728
e27d73f6
DE
12729 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12730 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12731 directly.
12732
47c0c975
DE
12733 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12734 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12735 (linux_resume_one_lwp): Ditto.
12736
2acc282a
DE
127372009-05-23 Doug Evans <dje@google.com>
12738
12739 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12740 from struct inferior_list_entry * to struct lwp_info *.
12741 All callers updated.
12742
9f1036c1
DE
127432009-05-13 Doug Evans <dje@google.com>
12744
12745 * linux-x86-low.c: Don't include assert.h.
12746 (x86_siginfo_fixup): Use fatal, not assert.
12747 (x86_arch_setup): Fix comment.
12748
d0722149
DE
127492009-05-12 Doug Evans <dje@google.com>
12750
12751 Biarch support for i386/amd64 gdbserver.
12752 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12753 Add linux-x86-low.c.
12754 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12755 (linux-x86-low.o): Add.
12756 * linux-x86-64-low.c: Delete.
12757 * linux-i386-low.c: Delete.
12758 * linux-x86-low.c: New file.
12759 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12760 linux-x86-low.o.
12761 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12762 linux-x86-low.o.
12763 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12764 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12765 (linux_child_pid_to_exec_file): New function.
12766 (elf_64_header_p, elf_64_file_p): New functions.
12767 (siginfo_fixup): New function.
12768 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12769 give target a chance to convert layout.
12770 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12771 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12772
fdeb2a12
DE
127732009-05-07 Doug Evans <dje@google.com>
12774
12775 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12776 (regsets_store_inferior_registers): Ditto.
12777
a6dbe5df
PA
127782009-05-06 Pedro Alves <pedro@codesourcery.com>
12779
12780 PR server/10048
12781
12782 * linux-low.c (must_set_ptrace_flags): Delete.
12783 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12784 of the global.
12785 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12786 `lwp->must_set_ptrace_flags' instead.
ba42693b 12787 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12788 (linux_wait_1): ... not here.
12789
5091eb23
DE
127902009-04-30 Doug Evans <dje@google.com>
12791
9f767825
DE
12792 * inferiors.c (started_inferior_callback): New function.
12793 (attached_inferior_callback): New function.
12794 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12795 * server.c (print_started_pid, print_attached_pid): New functions.
12796 (detach_or_kill_for_exit): New function.
12797 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12798 * server.h (have_started_inferiors_p): Declare.
12799 (have_attached_inferiors_p): Declare.
12800
5091eb23
DE
12801 * inferiors.c (remove_process): Fix memory leak, free process.
12802 * linux-low.c (linux_remove_process): New function.
12803 (linux_kill): Call it instead of remove_process.
12804 (linux_detach, linux_wait_1): Ditto.
12805
155c8968
PA
128062009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12807
12808 * configure.srv: Add x86 Windows CE target.
12809
7fe519cb
UW
128102009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12811
12812 * inferiors.c (get_thread_process): Make global.
12813 * server.h (get_thread_process): Add prototype.
12814 * thread-db.c (find_one_thread): Use get_thread_process
12815 instead of current_process.
12816 (thread_db_get_tls_address): Do not crash if called when
12817 thread layer is not yet initialized.
12818
5472f405
UW
128192009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12820
12821 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12822 * spu-low.c (current_tid): Rename to ...
12823 (current_ptid): ... this.
12824 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12825 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12826 ptid_get_lwp (current_ptid) instead of current_tid.
12827 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12828 instead of current_tid. Use find_process_pid to verify pid
12829 argument is valid. Pass proper argument to remove_process.
12830 (spu_thread_alive): Compare current_ptid instead of current_tid.
12831 (spu_resume): Likewise.
12832
55ac2b99
PA
128332009-04-02 Pedro Alves <pedro@codesourcery.com>
12834
12835 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12836 variable.
12837
95954743
PA
128382009-04-01 Pedro Alves <pedro@codesourcery.com>
12839
12840 Implement the multiprocess extensions, and add linux multiprocess
12841 support.
12842
12843 * server.h (ULONGEST): Declare.
12844 (struct ptid, ptid_t): New.
12845 (minus_one_ptid, null_ptid): Declare.
12846 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12847 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12848 (struct inferior_list_entry): Change `id' type from unsigned from
12849 to ptid_t.
12850 (struct sym_cache, struct breakpoint, struct
12851 process_info_private): Forward declare.
12852 (struct process_info): Declare.
12853 (current_process): Declare.
12854 (all_processes): Declare.
12855 (initialize_inferiors): Declare.
12856 (add_thread): Adjust to use ptid_t.
12857 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12858 (add_process, remove_process, find_thread_pid): Declare.
12859 (find_inferior_id): Adjust to use ptid_t.
12860 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12861 (multi_process): Declare.
12862 (push_event): Adjust to use ptid_t.
12863 (read_ptid, write_ptid): Declare.
12864 (prepare_resume_reply): Adjust to use ptid_t.
12865 (clear_symbol_cache): Declare.
12866 * inferiors.c (all_processes): New.
12867 (null_ptid, minus_one_ptid): New.
12868 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12869 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12870 (add_thread): Change unsigned long to ptid. Remove gdb_id
12871 parameter. Adjust.
12872 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12873 (gdb_id_to_thread): Rename to ...
12874 (find_thread_pid): ... this. Change unsigned long to ptid.
12875 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12876 (loaded_dll, pull_pid_from_list): Adjust.
12877 (add_process, remove_process, find_process_pid)
12878 (get_thread_process, current_process, initialize_inferiors): New.
12879 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12880 (struct target_waitstatus) <related_pid>: Ditto.
12881 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12882 return type to int.
12883 (struct target_ops) <join>: Add `pid' argument.
12884 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12885 (struct target_ops) <wait>: Add `ptid' field. Change return type
12886 to ptid.
12887 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12888 (mywait): Add `ptid' argument. Change return type to ptid_t.
12889 (target_pid_to_str): Declare.
12890 * target.c (set_desired_inferior): Adjust to use ptids.
12891 (mywait): Add new `ptid' argument. Adjust.
12892 (target_pid_to_str): New.
12893 * mem-break.h (free_all_breakpoints): Declare.
12894 * mem-break.c (breakpoints): Delelete.
12895 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12896 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12897 to use per-process breakpoint list.
12898 (free_all_breakpoints): New.
12899 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12900 (symbol_cache, all_symbols_looked_up): Delete.
12901 (hexchars): New.
12902 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12903 read_ptid): New.
12904 (prepare_resume_reply): Change ptid argument's type from unsigned
12905 long to ptid_t. Adjust. Implement W;process and X;process.
12906 (free_sym_cache, clear_symbol_cache): New.
12907 (look_up_one_symbol): Adjust to per-process symbol cache. *
12908 * server.c (cont_thread, general_thread, step_thread): Change type
12909 to ptid_t.
12910 (attached): Delete.
12911 (multi_process): New.
12912 (last_ptid): Change type to ptid_t.
12913 (struct vstop_notif) <ptid>: Change type to ptid_t.
12914 (queue_stop_reply, push_event): Change `ptid' argument's type to
12915 ptid_t.
12916 (discard_queued_stop_replies): Add `pid' argument.
12917 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12918 changes. Don't reference the `attached' global.
12919 (attach_inferior): Adjust to mywait interface changes.
12920 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12921 features. Handle and report "multiprocess+". Handle
12922 "qAttached:PID".
12923 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12924 changes.
12925 (handle_v_kill): New.
12926 (handle_v_stopped): Adjust to use target_pid_to_str.
12927 (handle_v_requests): Allow multiple attaches and runs when
12928 multiprocess extensions are in effect. Handle "vKill".
12929 (myresume): Adjust to use ptids.
12930 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12931 (handle_status): Adjust to discard_queued_stop_replies interface
12932 change.
12933 (first_thread_of, kill_inferior_callback)
12934 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12935 (main): Call initialize_inferiors. Adjust to use ptids, killing
12936 and detaching from all inferiors. Handle multiprocess packet
12937 variants.
12938 * linux-low.h: Include gdb_proc_service.h.
12939 (struct process_info_private): New.
12940 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12941 <lwpid_of>: Use ptid_get_lwp.
12942 (get_lwp_thread): Adjust.
12943 (struct lwp_info): Add `dead' member.
12944 (find_lwp_pid): Declare.
12945 * linux-low.c (thread_db_active): Delete.
12946 (new_inferior): Adjust comment.
12947 (inferior_pid): Delete.
12948 (linux_add_process): New.
12949 (handle_extended_wait): Adjust.
12950 (add_lwp): Change unsigned long to ptid.
12951 (linux_create_inferior): Add process to processes table. Adjust
12952 to use ptids. Don't set new_inferior here.
12953 (linux_attach_lwp): Rename to ...
12954 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12955 it. Adjust to use ptids.
12956 (linux_attach_lwp): New.
12957 (linux_attach): Add process to processes table. Don't set
12958 new_inferior here.
12959 (struct counter): New.
12960 (second_thread_of_pid_p, last_thread_of_process_p): New.
12961 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12962 multiple processes.
12963 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12964 processes. Remove process from process table.
12965 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12966 to multiple processes.
12967 (any_thread_of): New.
12968 (linux_detach): Add `pid' argument, and handle it. Remove process
12969 from processes table.
12970 (linux_join): Add `pid' argument. Handle it.
12971 (linux_thread_alive): Change unsighed long argument to ptid_t.
12972 Consider dead lwps as not being alive.
12973 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12974 threads we're not interested in.
12975 (same_lwp, find_lwp_pid): New.
12976 (linux_wait_for_lwp): Change `pid' argument's type from int to
12977 ptid_t. Adjust.
12978 (linux_wait_for_event): Rename to ...
12979 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12980 from int to ptid_t. Adjust.
12981 (linux_wait_for_event): New.
12982 (linux_wait_1): Add `ptid' argument. Change return type to
12983 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12984 that exit from the process table.
12985 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12986 Adjust.
12987 (mark_lwp_dead): New.
12988 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12989 stopping all threads, mark its main lwp as dead.
12990 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12991 ptids.
12992 (fetch_register, usr_store_inferior_registers)
12993 (regsets_fetch_inferior_registers)
12994 (regsets_store_inferior_registers, linux_read_memory)
12995 (linux_write_memory): Inline `inferior_pid'.
12996 (linux_look_up_symbols): Adjust to use per-process
12997 `thread_db_active'.
12998 (linux_request_interrupt): Adjust to use ptids.
12999 (linux_read_auxv): Inline `inferior_pid'.
13000 (initialize_low): Don't reference thread_db_active.
13001 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13002 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13003 (ps_getpid): Return the pid of the current inferior.
13004 * thread-db.c (proc_handle, thread_agent): Delete.
13005 (thread_db_create_event, thread_db_enable_reporting): Adjust to
13006 per-process data.
13007 (find_one_thread): Change argument type to ptid_t. Adjust to
13008 per-process data.
13009 (maybe_attach_thread): Adjust to per-process data and ptids.
13010 (thread_db_find_new_threads): Ditto.
13011 (thread_db_init): Ditto.
13012 * spu-low.c (spu_create_inferior, spu_attach): Add process to
13013 processes table. Adjust to use ptids.
13014 (spu_kill, spu_detach): Adjust interface. Remove process from
13015 processes table.
13016 (spu_join, spu_thread_alive): Adjust interface.
13017 (spu_wait): Adjust interface. Remove process from processes
13018 table. Adjust to use ptids.
13019 * win32-low.c (current_inferior_tid): Delete.
13020 (current_inferior_ptid): New.
13021 (debug_event_ptid): New.
13022 (thread_rec): Take a ptid. Adjust.
13023 (child_add_thread): Add `pid' argument. Adjust to use ptids.
13024 (child_delete_thread): Ditto.
13025 (do_initial_child_stuff): Add `attached' argument. Add process to
13026 processes table.
13027 (child_fetch_inferior_registers, child_store_inferior_registers):
13028 Adjust.
13029 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
13030 (win32_attach): Pass 1 to do_initial_child_stuff.
13031 (win32_kill): Adjust interface. Remove process from processes
13032 table.
13033 (win32_detach): Ditto.
13034 (win32_join): Adjust interface.
13035 (win32_thread_alive): Take a ptid.
13036 (win32_resume): Adjust to use ptids.
13037 (get_child_debug_event): Ditto.
13038 (win32_wait): Adjust interface. Remove exiting process from
13039 processes table.
13040
bd99dc85
PA
130412009-04-01 Pedro Alves <pedro@codesourcery.com>
13042
13043 Non-stop mode support.
13044
13045 * server.h (non_stop): Declare.
13046 (gdb_client_data, handler_func): Declare.
13047 (delete_file_handler, add_file_handler, start_event_loop):
13048 Declare.
13049 (handle_serial_event, handle_target_event, push_event)
13050 (putpkt_notif): Declare.
13051 * target.h (enum resume_kind): New.
13052 (struct thread_resume): Replace `step' field by `kind' field.
13053 (TARGET_WNOHANG): Define.
13054 (struct target_ops) <wait>: Add `options' argument.
13055 <supports_non_stop, async, start_non_stop>: New fields.
13056 (target_supports_non_stop, target_async): New.
13057 (start_non_stop): Declare.
13058 (mywait): Add `options' argument.
13059 * target.c (mywait): Add `options' argument. Print child exit
13060 notifications here.
13061 (start_non_stop): New.
13062 * server.c (non_stop, own_buf, mem_buf): New globals.
13063 (struct vstop_notif): New.
13064 (notif_queue): New global.
13065 (queue_stop_reply, push_event, discard_queued_stop_replies)
13066 (send_next_stop_reply): New.
13067 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13068 interface changes.
13069 (attach_inferior): In non-stop mode, don't wait for the target
13070 here.
13071 (handle_general_set): Handle QNonStop.
13072 (handle_query): When handling qC, return the current general
13073 thread, instead of the first thread of the list.
13074 (handle_query): If the backend supports non-stop mode, include
13075 QNonStop+ in the qSupported query response.
13076 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13077 and non-stop mode.
13078 (handle_v_attach, handle_v_run): Handle non-stop mode.
13079 (handle_v_stopped): New.
13080 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13081 (myresume): Adjust to use resume_kind. Handle non-stop.
13082 (queue_stop_reply_callback): New.
13083 (handle_status): Handle non-stop mode.
13084 (main): Clear non_stop flag on reconnection. Use the event-loop.
13085 Refactor serial protocol handling from here ...
13086 (process_serial_event): ... to this new function. When GDB
13087 selects any thread, select one here. In non-stop mode, wait until
13088 GDB acks all pending events before exiting.
13089 (handle_serial_event, handle_target_event): New.
13090 * remote-utils.c (remote_open): Install remote_desc in the event
13091 loop.
13092 (remote_close): Remove remote_desc from the event loop.
13093 (putpkt_binary): Rename to...
13094 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13095 (putpkt_binary): New as wrapper around putpkt_binary_1.
13096 (putpkt_notif): New.
13097 (prepare_resume_reply): In non-stop mode, don't change the
13098 general_thread.
13099 * event-loop.c: New.
13100 * Makefile.in (OBJ): Add event-loop.o.
13101 (event-loop.o): New rule.
13102
13103 * linux-low.h (pid_of): Moved here.
13104 (lwpid_of): New.
13105 (get_lwp_thread): Use lwpid_of.
13106 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13107 * linux-low.c (pid_of): Delete.
13108 (inferior_pid): Use lwpid_of.
13109 (linux_event_pipe): New.
13110 (target_is_async_p): New.
13111 (delete_lwp): New.
13112 (handle_extended_wait): Use lwpid_of.
13113 (add_lwp): Don't set lwpid field.
13114 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13115 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13116 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13117 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13118 first. Adjust to linux_wait_for_event interface changes. Use
13119 lwpid_of.
13120 (linux_detach): Don't delete the main lwp here.
13121 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13122 (status_pending_p): Don't consider explicitly suspended lwps.
13123 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13124 pointer. Add OPTIONS argument. Change return type to int. Use
13125 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13126 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13127 pointer. Add status pointer argument. Return a pid instead of a
13128 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13129 changes. In non-stop mode, don't switch to a random thread.
13130 (linux_wait): Rename to...
13131 (linux_wait_1): ... this. Add target_options argument, and handle
13132 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13133 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13134 clean exit and signal exit code. Don't stop all threads in
13135 non-stop mode. In all-stop mode, only stop all threads when
13136 reporting a stop to GDB. Handle explicit thread stop requests.
13137 (async_file_flush, async_file_mark): New.
13138 (linux_wait): New.
13139 (send_sigstop): Use lwpid_of.
13140 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13141 interface changes. In non-stop mode, don't switch to a random
13142 thread.
13143 (linux_resume_one_lwp): Use lwpid_of.
13144 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13145 (linux_resume_one_thread): ... this. Handle resume_stop. In
13146 non-stop mode, don't look for pending flag in all threads.
13147 (resume_status_pending_p): Don't consider explicitly suspended
13148 threads.
13149 (my_waitpid): Reimplement. Emulate __WALL.
13150 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13151 Use lwpid_of.
13152 (sigchld_handler, linux_supports_non_stop, linux_async)
13153 (linux_start_non_stop): New.
13154 (linux_target_ops): Register linux_supports_non_stop, linux_async
13155 and linux_start_non_stop.
13156 (initialize_low): Install SIGCHLD handler.
13157 * thread-db.c (thread_db_create_event, find_one_thread)
13158 (thread_db_get_tls_address): Use lwpid_of.
13159 * win32-low.c (win32_detach): Adjust to use resume_kind.
13160 (win32_wait): Add `options' argument.
13161 * spu-low.c (spu_resume): Adjust to use resume_kind.
13162 (spu_wait): Add `options' argument.
13163
5b1c542e
PA
131642009-04-01 Pedro Alves <pedro@codesourcery.com>
13165
13166 Decouple target code from remote protocol.
13167
13168 * target.h (enum target_waitkind): New.
13169 (struct target_waitstatus): New.
13170 (struct target_ops) <wait>: Return an unsigned long. Take a
13171 target_waitstatus pointer instead of a char pointer.
13172 (mywait): Likewise.
13173 * target.c (mywait): Change prototype to return an unsigned long.
13174 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13175 * server.h (thread_from_wait, old_thread_from_wait): Delete
13176 declarations.
13177 (prepare_resume_reply): Change prototype to take a
13178 target_waitstatus.
13179 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13180 (last_status, last_ptid): New.
13181 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13182 pid instead of a signal.
13183 (attach_inferior): Remove "status" and "signal" parameters.
13184 Adjust.
13185 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13186 not as an address.
13187 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13188 (handle_v_requests, myresume): Remove "status" and "signal"
13189 parameters. Adjust.
13190 (handle_status): New.
13191 (main): Delete local `status'. Adjust.
13192 * remote-utils.c: Include target.h.
13193 (prepare_resume_reply): Change prototype to take a
13194 target_waitstatus. Adjust.
13195
13196 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13197 interface.
13198 * spu-low.c (spu_wait): Adjust.
13199 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13200 Delete.
13201 (win32_wait): Adjust.
13202
2bd7c093
PA
132032009-04-01 Pedro Alves <pedro@codesourcery.com>
13204
13205 * target.h (struct thread_resume): Delete leave_stopped member.
13206 (struct target_ops): Add a `n' argument to the `resume' callback.
13207 * server.c (start_inferior): Adjust.
13208 (handle_v_cont, myresume): Adjust.
13209 * linux-low.c (check_removed_breakpoint): Adjust to resume
13210 interface change, and to removed leave_stopped field.
13211 (resume_ptr): Delete.
13212 (struct thread_resume_array): New.
13213 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13214 resume interface change.
13215 (linux_continue_one_thread, linux_queue_one_thread)
13216 (resume_status_pending_p): Check if the resume field is NULL
13217 instead of checking the leave_stopped member.
13218 (linux_resume): Adjust to the target resume interface change.
13219 * spu-low.c (spu_resume): Adjust to the target resume interface
13220 change.
13221 * win32-low.c (win32_detach, win32_resume): Ditto.
13222
c35fafde
PA
132232009-04-01 Pedro Alves <pedro@codesourcery.com>
13224
13225 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13226 flag.
13227 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13228 pending.
13229 (linux_continue_one_thread): Only preserve the stepping flag if
13230 there's a pending breakpoint.
13231
0a59d50b
PA
132322009-03-31 Pedro Alves <pedro@codesourcery.com>
13233
13234 * server.c (main): After the inferior having exited, call
13235 remote_close before exiting gdbserver.
13236
f04c6d38
TJB
132372009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13238
13239 Fix size of FPSCR in Power 7 processors.
13240 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13241 (PPC_FEATURE_HAS_DFP): New #define.
13242 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13243 size of the FPSCR.
13244
78e5cee6
PA
132452009-03-23 Pedro Alves <pedro@codesourcery.com>
13246
13247 * server.c (handle_query) Whitespace and formatting.
13248
1b3f6016
PA
132492009-03-22 Pedro Alves <pedro@codesourcery.com>
13250
13251 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13252 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13253 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13254 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13255 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13256 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13257 Makefile.in, configure.ac: Fix whitespace throughout.
13258 * configure: Regenerate.
13259
a07b2135
PA
132602009-03-22 Pedro Alves <pedro@codesourcery.com>
13261
13262 * inferiors.c (find_inferior): Make it safe for the callback
13263 function to delete the currently iterated inferior.
13264
67cc2626
PA
132652009-03-22 Pedro Alves <pedro@codesourcery.com>
13266
13267 * Makefile.in (linuw_low_h): Move higher.
13268 (thread-db.o): Depend on $(linux_low_h).
13269
54a0b537
PA
132702009-03-17 Pedro Alves <pedro@codesourcery.com>
13271
13272 Rename "process" to "lwp" throughout.
13273
13274 * linux-low.c (all_processes): Rename to...
13275 (all_lwps): ... this.
13276 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13277 (add_process): Rename to ...
13278 (add_lwp): ... this. Adjust.
13279 (linux_create_inferior): Adjust.
13280 (linux_attach_lwp): Adjust.
13281 (linux_attach): Adjust.
13282 (linux_kill_one_process): Rename to ...
13283 (linux_kill_one_lwp): ... this. Adjust.
13284 (linux_kill): Adjust.
13285 (linux_detach_one_process): Rename to ...
13286 (linux_detach_one_lwp): ... this. Adjust.
13287 (linux_detach): Adjust.
13288 (check_removed_breakpoint): Adjust.
13289 (status_pending_p): Adjust.
13290 (linux_wait_for_process): Rename to ...
13291 (linux_wait_for_lwp): ... this. Adjust.
13292 (linux_wait_for_event): Adjust.
13293 (send_sigstop): Adjust.
13294 (wait_for_sigstop): Adjust.
13295 (stop_all_processes): Rename to ...
13296 (stop_all_lwps): ... this.
13297 (linux_resume_one_process): Rename to ...
13298 (linux_resume_one_lwp): ... this. Adjust.
13299 (linux_set_resume_request, linux_continue_one_thread)
13300 (linux_queue_one_thread, resume_status_pending_p)
13301 (usr_store_inferior_registers, regsets_store_inferior_registers)
13302 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13303 Adjust.
13304 * linux-low.h (get_process): Rename to ...
13305 (get_lwp): ... this. Adjust.
13306 (get_thread_process): Rename to ...
13307 (get_thread_lwp): ... this. Adjust.
13308 (get_process_thread): Rename to ...
13309 (get_lwp_thread): ... this. Adjust.
13310 (struct process_info): Rename to ...
13311 (struct lwp_info): ... this.
13312 (all_processes): Rename to ...
13313 (all_lwps): ... this.
13314 * proc-service.c (ps_lgetregs): Adjust.
13315 * thread-db.c (thread_db_create_event, find_one_thread)
13316 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13317
0b16c5cf
PA
133182009-03-14 Pedro Alves <pedro@codesourcery.com>
13319
13320 * server.c (handle_query): Handle "qAttached".
13321
32de4b9d
NS
133222009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13323
13324 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13325 GPLv3, update license URL.
13326
2aecd87f
DE
133272009-03-01 Doug Evans <dje@google.com>
13328
93efd302 13329 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13330 (server_h): Add gdb_signals.h.
13331 (signals.o): Update.
13332 * server.h (target_signal_from_host,target_signal_to_host_p)
13333 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13334
86b1f9c5
PM
133352009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13336
13337 * remote-utils.c (getpkt): Also generate remote-debug
13338 information if noack_mode is set.
13339
4aa995e1
PA
133402009-02-06 Pedro Alves <pedro@codesourcery.com>
13341
13342 * server.c (handle_query): Report qXfer:siginfo:read and
13343 qXfer:siginfo:write as supported and handle them.
13344 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13345 * linux-low.c (linux_xfer_siginfo): New.
13346 (linux_target_ops): Set it.
13347
62709adf
PA
133482009-01-26 Pedro Alves <pedro@codesourcery.com>
13349
13350 * server.c (gdbserver_usage): Mention --remote-debug.
13351 (main): Accept '--remote-debug' switch.
13352
aef93bd7
DE
133532009-01-18 Doug Evans <dje@google.com>
13354
13355 * regcache.c (new_register_cache): No need to check result of xcalloc.
13356 * server.c (handle_search_memory): Back out calls to xmalloc,
13357 result is checked and error is returned to user upon failure.
13358 (handle_query): Ditto. Add more checks for result of malloc.
13359 (handle_v_cont): Check result of malloc, report error back to
13360 user upon failure.
13361 (handle_v_run): Ditto. Call freeargv.
13362 * server.h (freeargv): Declare.
13363 * utils.c (freeargv): New fn.
13364
54363045
DE
133652009-01-15 Doug Evans <dje@google.com>
13366
f626972c
DE
13367 * gdbreplay.c (perror_with_name): Make arg const char *.
13368 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13369 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13370 * utils.c (perror_with_name): Make arg const char *.
54363045 13371
18aae699
PA
133722009-01-14 Pedro Alves <pedro@codesourcery.com>
13373
13374 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13375 when handling a EXIT_PROCESS_DEBUG_EVENT.
13376
ff703abe
JB
133772009-01-06 Joel Brobecker <brobecker@adacore.com>
13378
13379 * gdbreplay.c (gdbreplay_version): Update copyright year.
13380 * server.c (gdbserver_version): Likewise.
13381
f21cc1a2 133822009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13383
13384 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13385 (handle_extended_wait): Improve comment.
0e21c1ec 13386
bca929d3
DE
133872008-12-13 Doug Evans <dje@google.com>
13388
13389 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13390 * server.h (ATTR_MALLOC): New macro.
13391 (xmalloc,xcalloc,xstrdup): Declare.
13392 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13393 * inferiors.c: Ditto.
13394 * linux-low.c: Ditto.
13395 * mem-break.c: Ditto.
13396 * regcache.c: Ditto.
13397 * remote-utils.c: Ditto.
13398 * server.c: Ditto.
13399 * target.c: Ditto.
13400 * win32-low.c: Ditto.
13401
97438e3f
DE
134022008-12-12 Doug Evans <dje@google.com>
13403
896c7fbb
DE
13404 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13405 in debugging printf.
13406
97438e3f
DE
13407 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13408
e3b886f8
DE
134092008-12-09 Doug Evans <dje@google.com>
13410
13411 * linux-low.h (struct process_info): Delete member tid, unused.
13412 * thread-db.c (find_one_thread): Update.
13413 (maybe_attach_thread): Update.
13414
07e059b5
VP
134152008-12-02 Pedro Alves <pedro@codesourcery.com>
13416
889bf7c5
PA
13417 * target.h (struct target_ops): Add qxfer_osdata member.
13418 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13419 and dirent.h.
13420 (linux_qxfer_osdata): New functions.
13421 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13422 callback.
13423 * server.c (handle_query): Handle "qXfer:osdata:read:".
13424 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13425 (buffer_xml_printf): New functions.
13426 * server.h (struct buffer): New.
13427 (buffer_grow_str, buffer_grow_str0): New macros.
13428 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13429 (buffer_xml_printf): Declare.
07e059b5 13430
4cab47ab
DE
134312008-11-24 Doug Evans <dje@google.com>
13432
13433 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13434
f142445f
DJ
134352008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13436
13437 * server.c (handle_v_run): Always use the supplied argument list.
13438
d0107bb6 134392008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13440
d0107bb6
BW
13441 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13442 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13443
2c4ad781
TJB
134442008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13445
13446 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13447 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13448 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13449 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13450 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13451 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13452 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13453 XML target descriptions.
13454 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13455 when inferior is running on an ISA 2.05 or later processor. Add
13456 special case to return offset for full 64-bit slot of FPSCR when
13457 in 32-bits.
13458
dfb64f85
DJ
134592008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13460
13461 * Makefile.in (SFILES, clean): Added sparc64 files.
13462 (reg-sparc64.o, reg-sparc64.c): New.
13463 * configure.srv (sparc*-*-linux*): New configuration.
13464 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13465 syscall arguments for SPARC.
13466 (regsets_store_inferior_registers): Likewise.
13467 * linux-sparc-low.c: New file.
13468
66b6e1dd
DE
134692008-10-21 Doug Evans <dje@google.com>
13470
13471 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13472 (READLINE_DIR,READLINE_DEP): Delete.
13473 (INTERNAL_CFLAGS): Update.
13474 (LINTFLAGS): Update.
13475
9b710a42
PA
134762008-10-10 Pedro Alves <pedro@codesourcery.com>
13477
13478 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13479 whole argv from the last run, not just argv[0].
13480
5822d809
PA
134812008-09-08 Pedro Alves <pedro@codesourcery.com>
13482
13483 * regcache.c (new_register_cache): Return NULL if the register
13484 cache size isn't known yet.
13485 (free_register_cache): Avoid dereferencing a NULL regcache.
13486
74aac56f
DJ
134872008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13488
13489 * configure.srv: Merge MIPS and MIPS64.
13490
400b20f5
MR
134912008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13492
13493 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13494
677c5bb1
LM
134952008-08-18 Luis Machado <luisgpm@br.ibm.com>
13496
13497 * Makefile.in: Add required vsx dependencies.
13498
13499 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13500 Declare init_registers_powerpc_vsx32l.
13501 Declare init_registers_powerpc_vsx64l.
13502 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13503 (ppc_arch_setup): Check for VSX in hwcap.
13504 (ppc_fill_vsxregset): New function.
13505 (ppc_store_vsxregset): New function.
13506 Add new VSX entry in regset_info target_regsets.
13507
13508 * configure.srv: Add new VSX dependencies.
13509
a6f3e723
SL
135102008-08-12 Pedro Alves <pedro@codesourcery.com>
13511
13512 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13513 (remote_open): Set or clear transport_is_reliable.
13514 (putpkt_binary): Don't expect acks in noack mode.
13515 (getpkt): Don't send ack/nac in noack mode.
13516 * server.c (handle_general_set): Handle QStartNoAckMode.
13517 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13518 qSupported.
13519 (main): Reset noack_mode on every connection.
13520 * server.h (noack_mode): Declare.
13521
a417dc56
RW
135222008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13523
13524 * Makefile.in (GDBREPLAY_OBS): New variable.
13525 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13526
3221518c
UW
135272008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13528 Daniel Jacobowitz <dan@codesourcery.com>
13529
13530 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13531 (usr_store_inferior_registers): Likewise.
13532 (regsets_store_inferior_registers): Likewise.
13533
ec56be1b
PA
135342008-07-31 Rolf Jansen <rj@surtec.com>
13535 Pedro Alves <pedro@codesourcery.com>
13536
13537 * configure.ac: Check for memmem declaration.
13538 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13539 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13540 (disable_packet_qfThreadInfo): Unconditionally compile.
13541 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13542 * configure, config.in: Regenerate.
13543
2fe5e3ff
DE
135442008-07-28 Doug Kwan <dougkwan@google.com>
13545
13546 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13547 (linux_write_memory): Remove declaration of errno.
13548
836acd6d
UW
135492008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13550
13551 * linux-low.c (handle_extended_wait): Do not use "status"
13552 variable uninitialized.
13553
aeba519e
PA
135542008-07-07 Pedro Alves <pedro@codesourcery.com>
13555
13556 * server.c (handle_v_attach): Inhibit reporting dll changes.
13557
db42f210
PA
135582008-06-27 Pedro Alves <pedro@codesourcery.com>
13559
13560 * remote-utils.c (prepare_resume_reply): If requested, don't
13561 output "thread:TID" in the T stop reply.
13562
13563 * server.c (disable_packet_vCont, disable_packet_Tthread)
13564 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13565 (handle_query): If requested, disable support for qC, qfThreadInfo
13566 and qsThreadInfo.
13567 (handle_v_requests): If requested, disable support for vCont.
13568 (gdbserver_show_disableable): New.
13569 (main): Handle --disable-packet and --disable-packet=LIST.
13570
13571 * server.h (disable_packet_vCont, disable_packet_Tthread)
13572 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13573
8e4c5421
CD
135742008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13575
13576 * server.c (gdbserver_usage): Mention --version.
13577
6e23a804
DJ
135782008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13579
13580 * Makefile.in (gdbreplay.o): New rule.
13581
90aa6a40
JM
135822008-06-06 Joseph Myers <joseph@codesourcery.com>
13583
13584 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13585 message, not gdbserver.
13586
c16158bc 135872008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13588 Nathan Sidwell <nathan@codesourcery.com>
13589 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13590
13591 * acinclude.m4: Include ../../config/acx.m4.
13592 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13593 * configure, config.in: Regenerate.
13594 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13595 * server.c (gdbserver_version): Print PKGVERSION.
13596 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13597 (main): Adjust gdbserver_usage calls.
13598 * gdbreplay.c (version, host_name): Add declarations.
13599 (gdbreplay_version, gdbreplay_usage): New.
13600 (main): Accept --version and --help options.
13601
aeb75bf5
DJ
136022008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13603
13604 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13605 (arm_breakpoint_at): Handle Thumb.
13606 (the_low_target): Add comment.
13607
76b233dd
UW
136082008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13609
13610 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13611
08388c79
DE
136122008-05-09 Doug Evans <dje@google.com>
13613
a3c83fae
DE
13614 * server.h (decode_search_memory_packet): Declare.
13615 * remote-utils.c (decode_search_memory_packet): New fn.
13616 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13617 (handle_search_memory): New fn.
13618 (handle_query): Process qSearch:memory packets.
13619
bb9c3d36
UW
136202008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13621
13622 * regcache.c (registers_length): Remove.
13623 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13624 full register packet.
13625 * regcache.h (registers_length): Remove prototype.
13626 * server.h (PBUFSIZ): Define to 16384.
13627
7284e1be
UW
136282008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13629
13630 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13631 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13632 powerpc-64l.o, and powerpc-altivec64l.o.
13633 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13634 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13635 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13636 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13637 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13638 to srv_xmlfiles.
13639
13640 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13641 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13642 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13643 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13644 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13645 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13646 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13647 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13648 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13649 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13650 (clean): Update.
13651
13652 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13653 (init_registers_powerpc_32l): ... this new prototype.
13654 (init_registers_powerpc_32): Remove, replace by ...
13655 (init_registers_powerpc_altivec32l): ... this new prototype.
13656 (init_registers_powerpc_e500): Remove, replace by ...
13657 (init_registers_powerpc_e500l): ... this new prototype.
13658 (init_registers_ppc64): Remove, replace by ...
13659 (init_registers_powerpc_64l): ... this new prototype.
13660 (init_registers_powerpc_64): Remove, replace by ...
13661 (init_registers_powerpc_altivec64l): ... this new prototype.
13662 (ppc_num_regs): Set to 73.
13663 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13664 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13665 (ppc_cannot_store_register): Handle orig_r3 and trap.
13666 (ppc_arch_setup): Update init_registers_... calls.
13667 (ppc_fill_gregset): Handle orig_r3 and trap.
13668
13669 * inferiors.c (clear_inferiors): Reset current_inferior.
13670
fdc59709
PB
136712008-04-23 Paolo Bonzini <bonzini@gnu.org>
13672
889bf7c5
PA
13673 * acinclude.m4: Add override.m4.
13674 * configure: Regenerate.
fdc59709 13675
c9b2f845
UW
136762008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13677
13678 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13679 initial call to init_register_ppc64.
13680
550512b8
UW
136812008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13682
43aaf8b6
PA
13683 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13684 single powerpc*-*-linux* case.
550512b8
UW
13685 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13686
b6430ec3
UW
136872008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13688
13689 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13690 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13691 from reg_xmlfiles.
13692 * linux-ppc-low.c: Include <elf.h>.
13693 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13694 (ppc_hwcap): New global variable.
13695 (ppc_regmap): Remove __SPE__ #ifdef sections.
13696 (ppc_regmap_e500): New global variable.
13697 (ppc_cannot_store_register): Update __SPE__ special case.
13698 (ppc_get_hwcap): New function.
13699 (ppc_arch_setup): Use it to determine whether inferior supports
13700 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13701 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13702 Do not access registers if target does not support AltiVec.
13703 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13704 Do not access registers if target does not support SPE.
13705 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13706
52fa2412
UW
137072008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13708
13709 * linux-low.c (disabled_regsets, num_regsets): New.
13710 (use_regsets_p): Delete.
13711 (linux_wait_for_process): Clear disabled_regsets.
13712 (regsets_fetch_inferior_registers): Check and set it.
13713 (regsets_store_inferior_registers): Likewise.
13714 (linux_fetch_registers, linux_store_registers): Do not use
13715 use_regsets_p.
13716 (initialize_low): Allocate disabled_regsets.
13717
e28b3332
DJ
137182008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13719
13720 * Makefile.in (LIBOBJS): New.
13721 (OBS): Use LIBOBJS.
13722 (memmem.o): New rule.
13723 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13724 * configure: Regenerated.
13725
4536995d
UW
137262008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13727
13728 * server.c (handle_query): Never return "unsupported" for
13729 qXfer:features:read queries.
13730
221c031f
UW
137312008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13732
13733 * server.c (get_features_xml): Fix inverted condition.
13734 (handle_query): Always support qXfer:feature:read.
13735
ccd213ac
DJ
137362008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13737
13738 * server.c (wrapper_argv): New.
13739 (start_inferior): Handle wrapper_argv. If set, expect an extra
13740 trap.
13741 (gdbserver_usage): Document --wrapper.
13742 (main): Parse --wrapper.
13743
6fe305f7
UW
137442008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13745
13746 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13747 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13748 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13749 (ppc_set_pc): Likewise.
13750 (ppc_arch_setup): New function.
13751 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13752 of collect_register.
889bf7c5 13753 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13754
5b0a002e
UW
137552008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13756
13757 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13758 instead of linux-ppc64-low.o.
13759 * linux-ppc64-low.c: Remove file.
13760 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13761 (linux-ppc64-low.o): Remove rule.
13762
13763 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13764 (init_registers_powerpc_64): Likewise.
13765 (ppc_regmap): Conditionally define depending on __powerpc64__.
13766 (ppc_cannot_store_register): Do not special-case "fpscr" when
13767 compiled on __powerpc64__.
13768 (ppc_collect_ptrace_register): New function.
13769 (ppc_supply_ptrace_register): New function.
13770 (ppc_breakpoint): Change type to "unsigned int".
13771 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13772 (the_low_target): Conditionally provide initializers for the
889bf7c5 13773 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13774 collect_ptrace_register and supply_ptrace_register members.
13775
9b4b61c8
UW
137762008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13777
13778 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13779 * server.c (gdbserver_xmltarget): Define.
13780 (get_features_xml): Use it to replace "target.xml" and arch_string.
13781
13782 * configure.srv: Remove srv_xmltarget. Add XML files that were
13783 mentioned there to srv_xmlfiles instead. Remove conditional tests
13784 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13785 srv_xmlfiles and srv_regobj to include all possible choices.
13786 * configure.ac (srv_xmltarget): Remove.
13787 (srv_xmlfiles): Do not add "target.xml".
13788 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13789 checks for supplementary target information.
13790 * configure: Regenerate.
13791 * Makefile.in (XML_TARGET): Remove.
13792 (target.xml): Remove rule.
13793 (clean): Do not clean up target.xml.
13794 (.PRECIOUS): Do not mention target.xml.
13795
13796 * target.h (struct target_ops): Remove arch_string member.
13797 * linux-low.c (linux_arch_string): Remove.
13798 (linux_target_ops): Remove arch_string initializer.
13799 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13800 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13801 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13802 * spu-low.c (spu_arch_string): Remove.
13803 (spu_target_ops): Remove arch_string initializer.
13804 * win32-low.c (win32_arch_string): Remove.
13805 (win32_target_ops): Remove arch_string initializer.
13806 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13807 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13808 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13809
ee1a7ae4
UW
138102008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13811
13812 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13813 by collect_ptrace_register and supply_ptrace_register hooks.
13814 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13815 instead of checking for the_low_target.left_pad_xfer.
13816 (usr_store_inferior_registers): Use collect_ptrace_register callback
13817 instead of checking for the_low_target.left_pad_xfer.
13818
13819 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13820 (s390_supply_ptrace_register): Likewise.
13821 (s390_fill_gregset): Call s390_collect_ptrace_register.
13822 (the_low_target): Update.
13823
13824 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13825 (ppc_supply_ptrace_register): Likewise.
13826 (the_low_target): Update.
13827
13828 * linux-i386-low.c (the_low_target): Update.
13829 * linux-x86-64-low.c (the_low_target): Update.
13830
d61ddec4
UW
138312008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13832
13833 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13834 reg-s390.o and reg-s390x.o.
13835
13836 * linux-low.c (new_inferior): New global variable.
13837 (linux_create_inferior, linux_attach): Set it.
13838 (linux_wait_for_process): Call the_low_target.arch_setup after the
13839 target has stopped for the first time.
13840 (initialize_low): Do not call the_low_target.arch_setup.
13841
13842 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13843 (s390_set_pc): Likewise.
13844 (s390_arch_setup): New function.
13845 (the_low_target): Use s390_arch_setup as arch_setup routine.
13846
13847 * regcache.c (realloc_register_cache): New function.
13848 (set_register_cache): Call it for each existing regcache.
13849
d05b4ac3
UW
138502008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13851
13852 * server.h (init_registers): Remove prototype.
13853
13854 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13855 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13856 instead of init_registers ().
13857 * linux-arm-low.c (init_registers_arm): Add prototype.
13858 (init_registers_arm_with_iwmmxt): Likewise.
13859 (the_low_target): Add initializer for arch_setup field.
13860 * linux-cris-low.c (init_registers_cris): Add prototype.
13861 (the_low_target): Add initializer for arch_setup field.
13862 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13863 (the_low_target): Add initializer for arch_setup field.
13864 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13865 (the_low_target): Add initializer for arch_setup field.
13866 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13867 (the_low_target): Add initializer for arch_setup field.
13868 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13869 (the_low_target): Add initializer for arch_setup field.
13870 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13871 (the_low_target): Add initializer for arch_setup field.
13872 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13873 (init_registers_mips64_linux): Likewise.
13874 (the_low_target): Add initializer for arch_setup field.
13875 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13876 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13877 (the_low_target): Add initializer for arch_setup field.
13878 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13879 (init_registers_powerpc_64): Likewise.
13880 (the_low_target): Add initializer for arch_setup field.
13881 * linux-s390-low.c (init_registers_s390): Add prototype.
13882 (init_registers_s390x): Likewise.
13883 (the_low_target): Add initializer for arch_setup field.
13884 * linux-sh-low.c (init_registers_sh): Add prototype.
13885 (the_low_target): Add initializer for arch_setup field.
13886 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13887 (the_low_target): Add initializer for arch_setup field.
13888 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13889 (the_low_target): Add initializer for arch_setup field.
13890
13891 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13892 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13893 instead of init_registers ().
13894 * win32-arm-low.c (init_registers_arm): Add prototype.
13895 (the_low_target): Add initializer for arch_setup field.
13896 * win32-i386-low.c (init_registers_i386): Add prototype.
13897 (the_low_target): Add initializer for arch_setup field.
13898
13899 * spu-low.c (init_registers_spu): Add prototype.
13900 (initialize_low): Call initialie_registers_spu () instead of
13901 initialize_registers ().
13902
fd96d250
PA
139032008-02-19 Pedro Alves <pedro@codesourcery.com>
13904
13905 * server.c (handle_v_requests): When handling the vRun and vAttach
13906 packets, if already debugging a process, don't kill it. Return an
13907 error instead.
13908
d41b6bb4
DJ
139092008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13910
13911 * server.c (handle_query): Correct length check.
13912
5ac588cf
PA
139132008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13914
13915 * win32-low.c (do_initial_child_stuff): Add process handle
13916 parameter. Set current_process_handle and current_process_id from the
13917 parameters. Clear globals.
13918 (win32_create_inferior): Don't set current_process_handle and
13919 current_process_id here. Instead pass them on the call to
13920 do_initial_child_stuff.
13921 (win32_attach): Likewise.
13922 (win32_clear_inferiors): New.
13923 (win32_kill): Don't close the current process handle or the
13924 current thread handle here. Instead call win32_clear_inferiors.
13925 (win32_detach): Don't open a new handle to the process. Call
13926 win32_clear_inferiors.
13927 (win32_join): Don't rely on current_process_handle; open a new
13928 handle using the process id.
13929 (win32_wait): Call win32_clear_inferiors when the inferior process
13930 has exited.
13931
ecd7ecbc
DJ
139322008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13933
13934 * server.c (monitor_show_help): Add "exit".
13935
1525d545
MG
139362008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13937
ecd7ecbc 13938 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13939 (clean): Add reg-xtensa.c.
13940 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13941 * configure.srv (xtensa*-*-linux*) New target.
13942 * linux-xtensa-low.c: New.
13943 * xtensa-xtregs.c: New.
1525d545 13944
59a016f0
PA
139452008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13946
13947 * hostio.c: Don't include errno.h.
13948 (errno_to_fileio_errno): Move to hostio-errno.
13949 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13950 error number outputting to the target->hostio_last_error callback.
13951 (hostio_packet_error): Use FILEIO_EINVAL directly.
13952 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13953 calls to hostio_error.
13954 * hostio-errno.c: New.
13955 * server.h (hostio_last_error_from_errno): Declare.
13956 * target.h (target_ops): Add hostio_last_error member.
13957 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13958 as hostio_last_error handler.
889bf7c5 13959 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13960 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13961 (wince_hostio_last_error): New functions.
13962 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13963 as hostio_last_error handler.
13964 (win32_target_ops) [!_WIN32_WCE]: Register
13965 hostio_last_error_from_errno as hostio_last_error handler.
13966 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13967 (hostio-errno.o): New rule.
13968 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13969 * configure.srv (srv_hostio_err_objs): New variable. Default to
13970 hostio-errno.o.
13971 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13972 * configure: Regenerate.
13973
2d717e4f
DJ
139742008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13975
13976 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13977 (linux_kill, linux_detach): Clean up the process list.
13978 * remote-utils.c (remote_open): Improve port number parsing.
13979 (putpkt_binary, input_interrupt): Only send interrupts if the target
13980 is running.
13981 * server.c (extended_protocol): Make static.
13982 (attached): Define earlier.
13983 (exit_requested, response_needed, program_argv): New variables.
13984 (target_running): New.
13985 (start_inferior): Clear attached here.
13986 (attach_inferior): Set attached here.
13987 (require_running): Define.
13988 (handle_query): Use require_running and target_running. Implement
13989 "monitor exit".
13990 (handle_v_attach, handle_v_run): New.
13991 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13992 (gdbserver_usage): Update.
13993 (main): Redo argument parsing. Handle --debug and --multi. Handle
13994 --attach along with other options or after the port. Save
13995 program_argv. Support no initial program. Resynchronize
13996 communication with GDB after an error. Handle "monitor exit".
13997 Use require_running and target_running. Always allow the extended
13998 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13999 restart in extended mode.
14000 * README: Refer to the GDB manual. Update --attach usage.
14001
7407e2de
AS
140022007-12-20 Andreas Schwab <schwab@suse.de>
14003
14004 * linux-low.c (STACK_SIZE): Define.
14005 (linux_tracefork_child): Use it. Use __clone2 on ia64.
14006 (linux_test_for_tracefork): Likewise.
14007
b65d95c5
DJ
140082007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
14009
14010 * linux-low.c (linux_wait_for_event): Update messages. Do not
14011 reinsert auto-delete breakpoints.
14012 * mem-break.c (struct breakpoint): Change return type of handler to
14013 int.
14014 (set_breakpoint_at): Update handler type.
14015 (reinsert_breakpoint_handler): Return 1 instead of calling
14016 delete_breakpoint.
14017 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14018 setting a new one.
14019 (check_breakpoints): Delete auto-delete breakpoints and return 2.
14020 * mem-break.h (set_breakpoint_at): Update handler type.
14021 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14022 * win32-low.c (auto_delete_breakpoint): New.
14023 (get_child_debug_event): Use it.
14024
4e799345
DJ
140252007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
14026
14027 * configure.ac: Check for pread and pwrite.
14028 * hostio.c (handle_pread): Fall back to lseek and read.
14029 (handle_pwrite): Fall back to lseek and write.
14030 * config.in, configure: Regenerated.
14031
27524b67
DJ
140322007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
14033
14034 * server.c (myresume): Add own_buf argument.
14035 (main): Update calls.
14036
a20d5e98
DJ
140372007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
14038
14039 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
14040 * remote-utils.c (remote_open): Do not call disable_async_io.
14041 (block_async_io): Delete.
14042 (unblock_async_io): Make static.
14043 (initialize_async_io): New.
14044 * server.c (handle_v_cont): Handle async I/O here.
14045 (myresume): Likewise. Move other common resume tasks here...
14046 (main): ... from here. Call initialize_async_io. Disable async
14047 I/O before the main loop.
14048 * server.h (initialize_async_io): Declare.
14049 (block_async_io, unblock_async_io): Delete prototypes.
14050 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14051
b79d787e
DJ
140522007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14053
14054 * remote-utils.c (readchar): Allow binary data in received messages.
14055
d97903b2
PA
140562007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14057
14058 * win32-low.c (attaching): New global.
14059 (win32_create_inferior): Clear the `attaching' global.
14060 (win32_attach): Set the `attaching' global.
14061 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14062 attaching. Only set a breakpoint at the entry point if not
14063 attaching.
14064
311de423
PA
140652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14066
14067 * server.c (main): Don't report dll events on the initial
14068 connection on attaches.
14069
6c2d16d2
PA
140702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14071
14072 * server.c (main): Relax numerical bases supported for the pid of
14073 the --attach command line argument.
14074
5ca906e6
PA
140752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14076
14077 * win32-low.c (win32_attach): Call OpenProcess before
14078 DebugActiveProcess, not after. Add last error output to error
14079 call.
14080
9c6c8194
PA
140812007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14082
14083 * win32-low.c (win32_get_thread_context)
14084 (win32_set_thread_context): New functions.
14085 (thread_rec): Use win32_get_thread_context.
14086 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14087 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14088 field.
14089
4d5d1aaa
PA
140902007-12-03 Leo Zayas
14091 Pedro Alves <pedro_alves@portugalmail.pt>
14092
14093 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14094 global variables.
14095 (child_add_thread): Minor cleanup.
14096 (child_continue): Resume artificially suspended threads before
14097 calling ContinueDebugEvent.
14098 (suspend_one_thread): New.
14099 (fake_breakpoint_event): New.
14100 (get_child_debug_event): Change return type to int. Check here if
14101 gdb sent an interrupt request. If a soft interrupt was requested,
14102 fake a breakpoint event. Return 0 if there is no event to handle,
14103 and 1 otherwise.
14104 (win32_wait): Don't check here if gdb sent an interrupt request.
14105 Ensure there is a valid event to handle.
14106 (win32_request_interrupt): Add soft interruption method as last
14107 resort.
14108
c436e841
PA
141092007-12-03 Leo Zayas
14110 Pedro Alves <pedro_alves@portugalmail.pt>
14111
14112 * win32-low.h (win32_thread_info): Add descriptions to the
14113 structure members. Replace `suspend_count' counter by a
14114 `suspended' flag.
14115 * win32-low.c (thread_rec): Update condition of when to get the
14116 context from the inferior. Rely on ContextFlags being set if it
14117 has already been retrieved. Only suspend the inferior thread if
14118 we haven't already. Warn if that fails.
14119 (continue_one_thread): s/suspend_count/suspended/. Only call
14120 ResumeThread once. Warn if that fails.
14121
e7b5fa67
PA
141222007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14123
14124 * win32-low.c (win32_wait): Don't read from the inferior when it
14125 has already exited.
14126
a385171d
PA
141272007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14128
14129 * Makefile.in (win32_low_h): New variable.
14130 (win32-low.o): Add dependency on $(win32_low_h).
14131 (win32-arm-low.o, win32-i386-low.o): New rules.
14132
f80c84b3
DJ
141332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14134
14135 * hostio.c: Correct copyright year.
14136
a6b151f1
DJ
141372007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14138
14139 * Makefile.in (OBS): Add hostio.o.
14140 (hostio.o): New rule.
14141 * server.h (handle_vFile): Declare.
14142 * hostio.c: New file.
14143 * server.c (handle_v_requests): Take packet_len and new_packet_len
14144 for binary packets. Call handle_vFile.
14145 (main): Update call to handle_v_requests.
14146
f9387fc3
DJ
141472007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14148
14149 * linux-low.c: Include <sched.h>.
14150
51c2684e
DJ
141512007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14152
14153 * linux-low.c (linux_tracefork_grandchild): New.
14154 (linux_tracefork_child): Use clone.
14155 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14156
75f83163
JB
141572007-10-31 Joel Brobecker <brobecker@adacore.com>
14158
14159 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14160
da5898ce
DJ
141612007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14162
14163 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14164
24a09b5f
DJ
141652007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14166
14167 * inferiors.c (change_inferior_id): Delete.
14168 (add_pid_to_list, pull_pid_from_list): New.
14169 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14170 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14171 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14172 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14173 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14174 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14175 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14176 (using_threads): Always set to 1.
14177 (handle_extended_wait): New.
14178 (add_process): Do not set TID.
14179 (linux_create_inferior): Set must_set_ptrace_flags.
14180 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14181 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14182 (linux_thread_alive): Rename TID argument to LWPID.
14183 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14184 (linux_wait_for_event): Do not use TID or check using_threads. Update
14185 call to dead_thread_notify. Call handle_extended_wait.
14186 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14187 (send_sigstop): Delete sigstop_sent.
14188 (wait_for_sigstop): Avoid TID.
14189 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14190 (linux_test_for_tracefork): New.
14191 (linux_lookup_signals): Use thread_db_active and
14192 linux_supports_tracefork_flag.
14193 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14194 * linux-low.h (get_process_thread): Avoid TID.
14195 (struct process_ifo): Move thread_known and tid to the end. Remove
14196 sigstop_sent.
14197 (linux_attach_lwp, thread_db_init): Update prototypes.
14198 * server.h (change_inferior_id): Delete prototype.
14199 (add_pid_to_list, pull_pid_from_list): New prototypes.
14200 * thread-db.c (thread_db_use_events): New.
14201 (find_first_thread): Rename to...
14202 (find_one_thread): ...this. Update callers and messages. Do not
14203 call fatal. Check thread_db_use_events. Do not call
14204 change_inferior_id or new_thread_notify.
14205 (maybe_attach_thread): Update. Do not call new_thread_notify.
14206 (thread_db_init): Set thread_db_use_events. Check use_events.
14207 * utils.c (fatal, warning): Correct message prefix.
14208
30ed0a8f
DJ
142092007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14210
14211 * Makefile.in (clean): Remove new files.
14212 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14213 (powerpc-64.o, powerpc-64.c): New rules.
14214 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14215 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14216 with SPE.
14217 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14218 SPE targets.
14219 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14220 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14221 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14222 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14223 (target_regsets): Add AltiVec and SPE register sets.
14224 * configure.ac: Check for AltiVec and SPE.
14225 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14226 (ppc_fill_vrregset, ppc_store_vrregset): New.
14227 (target_regsets): Add AltiVec register set.
14228 * configure: Regenerated.
14229
fd462a61
DJ
142302007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14231
14232 * linux-low.c (O_LARGEFILE): Define.
14233 (linux_read_memory): Use /proc/PID/mem.
14234 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14235 * configure, config.in: Regenerated.
14236
69f223ed
DJ
142372007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14238
14239 * linux-low.c (linux_wait_for_event): Do not pass signals while
14240 single-stepping.
14241
aec18585
PA
142422007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14243
14244 * win32-low.c (create_process): New.
14245 (win32_create_inferior): Use create_process instead of
14246 CreateProcess. If create_process failed retry appending an ".exe"
14247 suffix. Store the GetLastError result immediatelly after
14248 create_process calls and use it on the call to error.
14249
34d86ddd
PA
142502007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14251
14252 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14253
5a0e3bd0
JB
142542007-08-23 Joel Brobecker <brobecker@adacore.com>
14255
14256 * configure.ac: Switch license to GPLv3.
14257
f88c79e6
MS
142582007-08-01 Michael Snyder <msnyder@access-company.com>
14259
14260 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14261
6b3d9b83
PA
142622007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14263
14264 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14265 typedef.
14266 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14267 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14268 CloseToolhelp32Snapshot.
14269 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14270 CloseToolhelp32Snapshot.
14271
c588c53c
MS
142722007-07-27 Michael Snyder <michael.snyder@access-company.com>
14273
14274 * server.c (main): Check for inferior exit before main loop.
14275
aa0403d9
PA
142762007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14277
14278 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14279 instead of on tmp_desc.
14280
255e7678
DJ
142812007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14282 Daniel Jacobowitz <dan@codesourcery.com>
14283
14284 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14285 (add_thread): Minor cleanups.
14286 (clear_inferiors): Move lower in the file. Clear the DLL
14287 list.
14288 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14289 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14290 (xml_escape_text): New.
14291 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14292 for qSupported.
14293 (handle_v_cont): Report errors.
14294 (gdbserver_version): Update.
14295 (main): Correct size of own_buf. Do not report initial DLL events.
14296 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14297 (unloaded_dll, xml_escape_text): New.
14298 * win32-low.c (enum target_waitkind): Update comments.
14299 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14300 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14301 (win32_EnumProcessModules, win32_GetModuleInformation)
14302 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14303 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14304 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14305 (win32_Module32First, win32_Module32Next, load_toolhelp)
14306 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14307 (get_child_debug_event): Handle DLL events.
14308 (win32_wait): Likewise.
14309
0d37add9
DJ
143102007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14311
14312 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14313 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14314
45e2715e
PA
143152007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14316
14317 * win32-low.c (handle_output_debug_string): Ignore event if not
14318 waiting.
14319
c5674cf1
PA
143202007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14321
14322 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14323
2bbe3cc1
DJ
143242007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14325
14326 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14327
ae13219e
DJ
143282007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14329
14330 * inferiors.c (change_inferior_id): Add comment.
14331 * linux-low.c (check_removed_breakpoint): Add an early
14332 prototype. Improve debug output.
14333 (linux_attach): Doc update.
14334 (linux_detach_one_process, linux_detach): Clean up before releasing
14335 each process.
14336 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14337 * linux-low.h (struct process_info): Doc improvement.
14338 * mem-break.c (delete_all_breakpoints): New.
14339 * mem-break.h (delete_all_breakpoints): New prototype.
14340 * thread-db.c (find_first_thread): New.
14341 (thread_db_create_event): Call it instead of
14342 thread_db_find_new_threads. Clean up unused variables.
14343 (maybe_attach_thread): Remove first thread handling.
14344 (thread_db_find_new_threads): Use find_first_thread.
14345 (thread_db_get_tls_address): Likewise.
14346
4105de34
DJ
143472007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14348
14349 * thread-db.c (thread_db_find_new_threads): Add prototype.
14350 (thread_db_create_event): Check for the main thread before adding
14351 a new thread.
14352 (maybe_attach_thread): Only enable event reporting if TID == 0.
14353 (thread_db_get_tls_address): Check for new threads.
14354
2b876972
DJ
143552007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14356
14357 * linux-low.c (linux_create_inferior): Try execv before execvp.
14358 * spu-low.c (spu_create_inferior): Likewise.
14359
7a245884
DJ
143602007-06-13 Mike Frysinger <vapier@gentoo.org>
14361
14362 * linux-low.c (linux_create_inferior): Change execv to execvp.
14363 * spu-low.c (spu_create_inferior): Likewies.
14364
117ce543
DJ
143652007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14366
14367 * Makefile.in (clean): Clean new files instead of deleted ones.
14368 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14369 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14370 rules.
14371 * configure.srv: Specify XML files and new regformats for MIPS and
14372 MIPS64 GNU/Linux.
14373 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14374 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14375 an entry for the restart register.
14376 (mips_cannot_fetch_register, mips_cannot_store_register)
14377 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14378 register names to match the XML descriptions.
14379 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14380 restart register instead of $0.
14381
0e7f50da
UW
143822007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14383 Markus Deuling <deuling@de.ibm.com>
14384
14385 * remote-utils.c (decode_xfer_write): New function.
14386 * server.h (decode_xfer_write): Add prototype.
14387 * server.c (handle_query): Add PACKET_LEN argument. Support
14388 qXfer:spu:read and qXfer:spu:write packets.
14389 (main): Pass packet_len to handle_query.
14390 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14391 * target.h (target_ops): Add qxfer_spu.
14392
374c1d38
UW
143932007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14394
14395 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14396 accessing non-seekable spufs files.
14397
bb63802a
UW
143982007-05-16 Markus Deuling <deuling@de.ibm.com>
14399
889bf7c5 14400 * server.c (handle_query): Add reply for qC packet.
bb63802a 14401
7390519e
PA
144022007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14403 Leo Zayas <lerele@champenstudios@com>
14404
14405 * server.h (check_remote_input_interrupt_request): New function.
14406 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14407 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14408 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14409 (check_remote_input_interrupt_request): New function.
14410 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14411 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14412 winapi_GenerateConsoleCtrlEvent): New typedefs.
14413 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14414 to 250 ms.
14415 (win32_wait): Check for remote interrupt request
14416 with check_remote_input_interrupt_request.
14417 (win32_request_interrupt): New function.
14418 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14419
34b34921
PA
144202007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14421
14422 * win32-low.c (debug_registers_changed,
14423 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14424 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14425 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14426 (thread_rec): Get context using the low target.
14427 (child_add_thread): Call thread_added on the low target,
14428 which does the same thing.
14429 (regptr): Delete.
14430 (do_initial_child_stuff): Remove debug registers references.
14431 Set context using the low target. Resume threads after
14432 setting the contexts.
14433 (child_continue): Remove dead variable. Remove debug
14434 registers references.
14435 (child_fetch_inferior_registers): Go through the low target.
14436 (do_child_store_inferior_registers): Remove.
14437 (child_store_inferior_registers): Go through the low target.
14438 (win32_resume): Remove debug registers references.
14439 Set context using the low target.
14440 (handle_exception): Change return type to void. Don't record
14441 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14442 first chance exception.
889bf7c5 14443 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14444 goto loop. Always return after waiting for debug event.
14445 (win32_wait): Convert to switch statement. Handle spurious
14446 events.
14447
14448 * win32-i386-low.c (debug_registers_changed,
14449 debug_registers_used): New.
14450 (initial_stuff): Rename to ...
14451 (i386_initial_stuff): ... this. Clear debug registers
14452 state variables.
14453 (store_debug_registers): Delete.
14454 (i386_get_thread_context): New.
14455 (load_debug_registers): Delete.
14456 (i386_set_thread_context): New.
14457 (i386_thread_added): New.
14458 (single_step): Rename to ...
14459 (i386_single_step): ... this.
14460 (do_fetch_inferior_registers): Rename to ...
14461 (i386_fetch_inferior_register): ... this.
14462 (i386_store_inferior_register): New.
14463 (the_low_target): Adapt to new interface.
14464
14465 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14466 (arm_get_thread_context): New.
14467 (arm_set_thread_context): New.
14468 (regptr): New.
14469 (do_fetch_inferior_registers): Rename to ...
14470 (arm_fetch_inferior_register): ... this.
14471 (arm_store_inferior_register): New.
14472 (arm_wince_breakpoint): Reimplement as unsigned long.
14473 (arm_wince_breakpoint_len): Define.
14474 (the_low_target): Adapt to new interface.
14475
14476 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14477 load_debug_registers. Add get_thread_context, set_thread_context,
14478 thread_added and store_inferior_register. Rename
14479 fetch_inferior_registers to fetch_inferior_register.
14480 (regptr): Remove declaration.
14481
dd6953e1
PA
144822007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14483
14484 * linux-low.c (linux_detach): Change return type to int. Return 0.
14485 * spu-low.c (spu_detach): Likewise.
14486
444d6139
PA
144872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14488
14489 * target.h (target_ops): Change return type of detach to int.
14490 Add join.
14491 (join_inferior): New.
14492 * server.c (main): Don't skip detach support on mingw32.
14493 If the inferior doesn't support detaching return error.
14494 Call join_inferior instead of using waitpid.
14495 * linux-low.c (linux_join): New.
14496 (linux_target_op): Add linux_join.
14497 * spu-low.c (spu_join): New.
14498 (spu_target_ops): Add spu_join.
14499 * win32-low.c (win32_detach): Adapt to new interface.
14500 Reopen current_process_handle before detaching. Issue a child
14501 resume before detaching.
14502 (win32_join): New.
14503 (win32_target_op): Add win32_join.
14504
1d5315fe
PA
145052007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14506
14507 * win32-low.c (win32-attach): Fix return value.
14508 * target.h (target_ops): Describe ATTACH return values.
14509
bf914831
PA
145102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14511
14512 * win32-low.c (GETPROCADDRESS): Define.
14513 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14514 (winapi_DebugSetProcessKillOnExit): Likewise.
14515 (win32_create_inferior): Force usage of ansi CreateProcessA.
14516 (win32_attach): Use GETPROCADDRESS.
14517 (win32_detach): Likewise.
14518
f72f3e60
PA
145192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14520
14521 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14522
ed50f18f
PA
145232007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14524
14525 * win32-low.c: Commit leftover changes from 2007-03-29.
14526
0c2ead7e
DJ
145272007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14528
14529 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14530 fields short instead of int. Add explicit padding.
14531 (i387_cache_to_fsave): Remove unnecessary casts.
14532 (i387_fsave_to_cache): Doc fix.
14533 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14534
73725ff3
DJ
145352007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14536
14537 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14538 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14539
d99f33d8
PA
145402007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14541
14542 * configure.srv (arm*-*-mingw32ce*): Move near the other
14543 arm targets.
14544
68070c10
PA
145452007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14546
2482afc6 14547 * configure.ac: Add errno checking.
68070c10
PA
14548 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14549 sys/file.h and malloc.h.
14550 (AC_CHECK_DECLS): Add perror.
14551 (srv_mingwce): Handle.
2482afc6 14552 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14553 win32-i386-low.o to srv_tgtobj.
14554 (i[34567]86-*-mingw*): Likewise.
14555 (arm*-*-mingw32ce*): Add case.
14556 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14557 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14558 [__MINGW32CE__] (strerror): New function.
14559 [__MINGW32CE__] (errno): Define to GetLastError.
14560 [__MINGW32CE__] (COUNTOF): New macro.
14561 (remote_open): Remove extra close call.
14562 * mem-break.c (delete_breakpoint_at): New function.
14563 * mem-break.h (delete_breakpoint_at): Declare.
14564 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14565 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14566 [USE_WIN32API] (read, write): Add char* casts.
14567 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14568 * server.h: Include wincecompat.h on Windows CE.
14569 [HAVE_ERRNO_H]: Check.
14570 (perror): Declare if not declared.
14571 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14572 (perror_with_name): Remove errno declaration.
14573 * wincecompat.h: New.
14574 * wincecompat.c: New.
14575 * win32-low.h: New.
14576 * win32-arm-low.c: New.
14577 * win32-i386-low.c: New.
14578 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14579 (OUTMSG2): Make it safe.
14580 (_T): New macro.
14581 (COUNTOF): New macro.
14582 (NUM_REGS): Get it from the low target.
14583 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14584 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14585 (thread_rec): Let low target handle debug registers.
14586 (child_add_thread): Likewise.
14587 (child_init_thread_list): Likewise.
14588 (continue_one_thread): Likewise.
14589 (regptr): New.
14590 (do_child_fetch_inferior_registers): Move to ...
14591 * win32-i386-low.c: ... here, and rename to ...
14592 (do_fetch_inferior_registers): ... this.
889bf7c5 14593 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14594 Go through the low target.
14595 (do_child_store_inferior_registers): Use regptr.
14596 (strwinerror): New function.
14597 (win32_create_inferior): Handle Windows CE.
14598 Use strwinerror instead of strerror on Windows error
14599 codes. Add program to the error output.
14600 Don't close the main thread handle on Windows CE.
14601 (win32_attach): Use coredll.dll on Windows CE.
14602 (win32_kill): Close current process and current
14603 thread handles.
14604 (win32_detach): Use coredll.dll on Windows CE.
14605 (win32_resume): Let low target handle debug registers, and
14606 step request.
14607 (handle_exception): Add/Remove initial breakpoint. Avoid
14608 non-existant WSTOPSIG on Windows CE.
14609 (win32_read_inferior_memory): Cast to remove warning.
14610 (win32_arch_string): Go through the low target.
14611 (initialize_low): Call set_breakpoint_data with the low
14612 target's breakpoint.
14613 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14614 FOP_REGNUM, mappings): Move to ...
14615 * win32-i386-low.c: ... here.
14616 * win32-low.c (win32_thread_info): Move to ...
14617 * win32-low.h: ... here.
14618 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14619 win32-arm-low.c and wincecompat.c.
14620 (all:): Add $EXEEXT.
14621 (install-only:): Likewise.
14622 (gdbserver:): Likewise.
14623 (gdbreplay:): Likewise.
14624 * config.in: Regenerate.
14625 * configure: Regenerate.
14626
41093d81
PA
146272007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14628
14629 * win32-low.c: Rename typedef thread_info to
14630 win32_thread_info throughout.
14631
544afa54
PA
146322007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14633
14634 * win32-i386-low.c: Rename to ...
14635 * win32-low.c: ... this.
14636 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14637 * Makefile.in: Likewise.
14638
bce7165d
PA
146392007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14640
14641 * remote-utils.c (monitor_output): Constify msg parameter.
14642 * server.h (monitor_output): Likewise.
14643 * win32-i386-low.c (handle_output_debug_string): New.
14644 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14645 handle_output_debug_string.
14646 (get_child_debug_event): Likewise.
14647
506c7aa0
DJ
146482007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14649
14650 * server.c (main): Correct strtoul check.
14651
42c81e2a
DJ
146522007-03-27 Jon Ringle <jon@ringle.org>
14653
14654 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14655
9453113a
DJ
146562007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14657
14658 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14659
64a69107
DJ
146602007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14661
14662 * terminal.h: Check HAVE_SGTTY_H.
14663
146642007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14665
14666 * remote-utils.c (remote_open): Print out the assigned port number.
14667
c74d0ad8
DJ
146682007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14669
14670 * remote-utils.c (monitor_output): New function.
14671 * server.c (debug_threads): Define here.
14672 (monitor_show_help): New function.
14673 (handle_query): Handle qRcmd.
14674 (main): Do not handle 'd' packet.
14675 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14676 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14677 of debug_threads.
14678
de7c3b4a
PA
146792007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14680
14681 * Makefile.in (EXEEXT): New.
14682 (clean): Use $(EXEEXT).
14683
ef57601b
PA
146842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14685
14686 * target.h (target_ops): Rename send_signal to request_interrupt,
14687 and remove enum target_signal parameter.
14688 * linux-low.c (linux_request_interrupt): Rename from
14689 linux_send_signal, and always send SIGINT.
14690 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14691 and always send SIGINT.
14692 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14693 of send_signal.
14694 (input_interrupt): Likewise.
14695
820f2bda
PA
146962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14697
14698 * server.c (get_features_xml): Check if target implemented
14699 arch_string.
14700 * win32-i386-low.c (win32_arch_string): New.
14701 (win32_target_ops): Add win32_arch_string as arch_string member.
14702
ab39bf24
UW
147032007-02-22 Markus Deuling <deuling@de.ibm.com>
14704
14705 * spu-low.c (spu_arch_string): New.
14706 (spu_target_ops): Add spu_arch_string.
14707
61ff6e04
DJ
147082007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14709
14710 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14711 * configure.ac: Do not check for terminal.h.
14712 * configure, config.in: Regenerated.
14713
fb1e4ffc
DJ
147142007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14715
14716 * Makefile.in (OBS): Add $(XML_BUILTIN).
14717 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14718 (clean): Update.
14719 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14720 (arm-with-iwmmxt.c): New.
14721 * config.in, configure: Regenerate.
14722 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14723 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14724 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14725 (arm*-*-linux*): Add iWMMXt and regset support.
14726 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14727 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14728 (arm_store_wmmxregset, target_regsets): New.
14729 * server.c (get_features_xml): Take annex argument. Check builtin
14730 XML documents.
14731 (handle_query): Handle multiple annexes.
14732
0f48aa01
DJ
147332007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14734
14735 * remote-utils.c [USE_WIN32API] (read, write): Define.
14736 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14737 write.
14738
23181151
DJ
147392007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14740
14741 * linux-i386-low.c (the_low_target): Set arch_string.
14742 * linux-x86-64-low.c (the_low_target): Likewise.
14743 * linux-low.c (linux_arch_string): New.
14744 (linux_target_ops): Add it.
14745 * linux-low.h (struct linux_target_ops): Add arch_string.
14746 * server.c (write_qxfer_response): Use const void * for DATA.
14747 (get_features_xml): New.
14748 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14749 * target.h (struct target_ops): Add arch_string method.
14750
9d606399
DJ
147512007-01-03 Denis Pilat <denis.pilat@st.com>
14752 Daniel Jacobowitz <dan@codesourcery.com>
14753
14754 * linux-low.c (linux_kill): Handle being called with no threads.
14755 * win32-i386-low.c (win32_kill): Likewise.
14756 (get_child_debug_event): Clear current_process_handle.
14757
147582006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14759 Daniel Jacobowitz <dan@codesourcery.com>
14760
14761 * remote-utils.c (remote_open): Check the type of specified
14762 serial port devices before opening them.
14763 * server.c (main): Kill the inferior if an error occurs during
14764 the first remote_open.
14765
a5e13d24
DJ
147662006-12-05 Markus Deuling <deuling@de.ibm.com>
14767
14768 * README: Update supported targets.
14769
186947f7
DJ
147702006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14771
14772 * Makefile.in (clean): Remove reg-mips64.c.
14773 (reg-mips64.c, reg-mips64.o): New rules.
14774 * configure.srv: Handle mips64. Include regset support for mips.
14775 * linux-mips-low.c (union mips_register): New.
14776 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14777 (mips_breakpoint, mips_breakpoint_at): Use int.
14778 (mips_collect_register, mips_supply_register)
14779 (mips_collect_register_32bit, mips_supply_register_32bit)
14780 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14781 (mips_store_fpregset, target_regsets): New.
14782 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14783
a13e2c95
UW
147842006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14785
14786 * configure.srv: Add target "spu*-*-*".
14787 * Makefile.in (clean): Remove reg-spu.c.
14788 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14789 * spu-low.c: New file.
14790
cb7283db
DJ
147912006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14792
14793 * configure.ac: Correct td_thr_tls_get_addr test.
14794 * configure: Regenerated.
14795
89be2091
DJ
147962006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14797
14798 * linux-low.c (linux_wait_for_event): Reformat. Use the
14799 pass_signals array.
14800 * remote-utils.c (decode_address_to_semicolon): New.
14801 * server.c (pass_signals, handle_general_set): New.
14802 (handle_query): Mention QPassSignals for qSupported.
14803 (main): Call handle_general_set.
14804 * server.h (pass_signals, decode_address_to_semicolon): New.
14805
000ef4f0
DJ
148062006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14807
14808 * server.c (handle_query): Correct error handling for read_auxv.
14809
b7149293
UW
148102005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14811
14812 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14813 and srv_linux_thread_db to yes.
14814 * linux-s390-low.c (s390_fill_gregset): New function.
14815 (target_regsets): Define data structure.
14816
dae5f5cf
DJ
148172006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14818
14819 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14820 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14821 * config.in, configure: Regenerated.
14822 * inferiors.c (gdb_id_to_thread): New function.
14823 (gdb_id_to_thread_id): Use it.
14824 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14825 * linux-low.h (struct process_info): Add th member.
14826 (thread_db_get_tls_address): New prototype.
14827 * remote-utils.c (decode_address): Make non-static.
14828 * server.c (handle_query): Handle qGetTLSAddr.
14829 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14830 * target.h (struct target_ops): Add get_tls_address.
14831 * thread-db.c (maybe_attach_thread): Save the thread handle.
14832 (thread_db_get_tls_address): New.
14833
32ca6d61
DJ
148342006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14835
14836 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14837 (linux_resume_one_process): Take a siginfo_t *. Update all
14838 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14839 (struct pending_signals): Add a siginfo_t.
14840 (linux_wait_for_process): Always set last_status.
14841 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14842 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14843 * linux-low.h (struct process_info): Add last_status.
14844
5ffff7c1
DJ
148452006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14846
14847 * remote-utils.c (try_rle): New function.
14848 (putpkt_binary): Use it.
14849
8695c747
DJ
148502006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14851
14852 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14853 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14854 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14855 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14856 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14857 point registers.
14858
290fadea
RS
148592006-08-08 Richard Sandiford <richard@codesourcery.com>
14860
14861 * server.c (terminal_fd): New variable.
14862 (old_foreground_pgrp): Likewise.
14863 (restore_old_foreground_pgrp): New function.
14864 (start_inferior): Record the terminal file descriptor in terminal_fd
14865 and its original foreground group in old_foreground_pgrp. Register
14866 restore_old_foreground_pgrp with atexit().
14867
9f2e1e63
DJ
148682006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14869
14870 * server.c (handle_query): Correct qPart to qXfer.
14871
b80864fb
DJ
148722006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14873
14874 * configure.ac: Check for more headers which are missing on
14875 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14876 * configure.srv: Add Cygwin and mingw32.
14877 * remote-utils.c: Don't include headers unconditionally which
14878 are missing on mingw32. Include <winsock.h> for mingw32.
14879 (remote_open): Adjust for mingw32 support. Flush
14880 standard error after writing to it.
14881 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14882 (unblock_async_io, enable_async_io, disable_async_io)
14883 (readchar, getpkt): Update for Winsock support.
14884 (prepare_resume_reply): Expect a protocol signal number.
14885 * server.c: Disable <sys/wait.h> on mingw32.
14886 (start_inferior): Adjust for mingw32 support. Flush
14887 standard error after writing to it.
14888 (attach_inferior): Likewise. Use protocol signal
14889 numbers.
14890 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14891 and names.
14892 * win32-i386-low.c: New file.
14893 * Makefile.in (XM_CLIBS): Set.
14894 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14895 (win32-i386-low.o): New dependency rule.
14896 * linux-low.c (linux_wait): Use target signal numbers.
14897 * target.h (struct target_ops): Doc fix.
14898 * server.h (target_signal_to_name): New prototype.
14899 * gdbreplay.c: Don't include headers unconditionally which
14900 are missing on mingw32. Include <winsock.h> for mingw32.
14901 (remote_close, remote_open): Adjust for Winsock support.
14902 * configure, config.in: Regenerated.
14903
0876f84a
DJ
149042006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14905
14906 * server.c (decode_xfer_read, write_qxfer_response): New.
14907 (handle_query): Take a packet length argument. Handle
14908 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14909 the qSupported response.
14910 (main): Update call to handle_query.
14911
01f9e8fa
DJ
149122006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14913
14914 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14915 (putpkt_binary): Renamed from putpkt and adjusted for binary
14916 data.
14917 (putpkt): New wrapper for putpkt_binary.
14918 (readchar): Don't mask off the high bit.
14919 (decode_X_packet): New function.
14920 * server.c (main): Call putpkt_binary if a handler sets the packet
14921 length. Save the length of the incoming packet. Handle 'X'.
14922 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14923
be2a5f71
DJ
149242006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14925
14926 * server.c (handle_query): Handle qSupported.
14927
ea025f5f
DJ
149282006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14929
14930 * remote-utils.c (all_symbols_looked_up): New variable.
14931 (look_up_one_symbol): Check it.
14932 * server.h (look_up_one_symbol): New declaration.
14933 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14934
9308fc88
DJ
149352006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14936
14937 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14938 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14939 (PTRACE_GET_THREAD_AREA): Define.
14940 (ps_get_thread_area): New function.
14941
52fb6437
NS
149422006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14943
14944 * configure.srv (m68k*-*-uclinux*): New target.
14945 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14946 (linux_resume_one_process): Remove extraneous cast.
14947 (linux_read_offsets): New.
14948 (linux_target_op): Add linux_read_offsets on mmuless systems.
14949 * server.c (handle_query): Add qOffsets logic.
14950 * target.h (struct target_ops): Add read_offsets.
14951
21b0f40c
DJ
149522006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14953
14954 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14955 (PTRACE_GET_THREAD_AREA): Define.
14956 (ps_get_thread_area): New function.
14957 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14958 (linux-x86-64-low.o): Update.
14959
0050a760
DJ
149602006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14961
14962 * configure.ac: Remove checks for prfpregset_t.
14963 * gdb_proc_service.h: New file.
14964 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14965 new "gdb_proc_service.h".
14966 * proc-service.c: Likewise.
14967 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14968 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14969 * Makefile.in (gdb_proc_service_h): Updated.
14970 * configure, config.in: Regenerated.
14971
b92a518e
DJ
149722006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14973
14974 * remote-utils.c (prepare_resume_reply): Move declaration
14975 of gdb_id_from_wait to the top of the block.
14976
545587ee
DJ
149772006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14978
14979 * linux-low.c (regsets_store_inferior_registers): Read the regset
14980 from the target before filling it.
14981
9db87ebd
DJ
149822006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14983
14984 * server.c (attach_inferior): Return SIGTRAP for a successful
14985 attach.
14986
dd24457d
DJ
149872006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14988
14989 * Makefile.in (OBS): Add version.o.
14990 (STAGESTUFF): Delete.
14991 (version.o): Add dependencies.
14992 (version.c): Replace rule.
14993 (clean): Remove version.c.
14994 * server.c (gdbserver_version): New.
14995 (gdbserver_usage): Use printf.
14996 (main): Handle --version and --help.
14997 * server.h (version, host_name): Add declarations.
14998
6f0f660e
EZ
149992005-12-23 Eli Zaretskii <eliz@gnu.org>
15000
889bf7c5
PA
15001 * linux-arm-low.c:
15002 * linux-arm-low.c:
15003 * inferiors.c:
15004 * i387-fp.h:
15005 * i387-fp.c:
15006 * gdbreplay.c:
15007 * regcache.c:
15008 * proc-service.c:
15009 * mem-break.h:
15010 * mem-break.c:
15011 * linux-x86-64-low.c:
15012 * linux-sh-low.c:
15013 * linux-s390-low.c:
15014 * linux-ppc64-low.c:
15015 * linux-ppc-low.c:
15016 * linux-mips-low.c:
15017 * linux-m68k-low.c:
15018 * linux-m32r-low.c:
15019 * linux-low.h:
15020 * linux-low.c:
15021 * linux-ia64-low.c:
15022 * linux-i386-low.c:
15023 * linux-crisv32-low.c:
15024 * thread-db.c:
15025 * terminal.h:
15026 * target.h:
15027 * target.c:
15028 * server.h:
15029 * server.c:
15030 * remote-utils.c:
15031 * regcache.h:
15032 * utils.c:
15033 * Makefile.in:
15034 * configure.ac:
6f0f660e
EZ
15035 * gdbserver.1: Add (C) after Copyright. Update the FSF
15036 address.
15037
9d1fb177
DJ
150382005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
15039
15040 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
15041 (arm_breakpoint_at): Recognize both breakpoints.
15042 (the_low_target): Use the correct breakpoint instruction.
15043
011a70c2
DJ
150442005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
15045
15046 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15047 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15048 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15049 (the_low_target): Update.
15050
7fb85e41
AS
150512005-10-25 Andreas Schwab <schwab@suse.de>
15052
15053 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15054
15055 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15056 (ia64_num_regs): Reduce to 462.
15057
3db0444b
DJ
150582005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15059
15060 * acinclude.m4: Correct quoting.
15061 * aclocal.m4: Regenerated.
15062
15063 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15064 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15065 (thread_db_init): Call thread_db_err_str.
15066 * configure.ac: Check for TD_VERSION.
15067 * config.in, configure: Regenerated.
15068
bee0189a
DJ
150692005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15070
15071 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15072
e9d25b98
DJ
150732005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15074
15075 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15076 is not available. Define HAVE_PTRACE_GETREGS if it is.
15077 * config.in, configure: Regenerated.
15078 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15079 * linux-i386-low.c, linux-m68k-low.c: Update to use
15080 HAVE_PTRACE_GETREGS.
15081 * linux-low.c (regsets_fetch_inferior_registers)
15082 (regsets_store_inferior_registers): Only return 0 if we processed
15083 GENERAL_REGS.
15084 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15085 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15086
a06660f7
DJ
150872005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15088
15089 * inferiors.c (struct thread_info): Add gdb_id.
15090 (add_thread): Add gdb_id argument.
15091 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15092 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15093 calls to add_thread.
15094 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15095 * server.c (handle_query): Use thread_to_gdb_id.
15096 (handle_v_cont, main): Use gdb_id_to_thread_id.
15097 * server.h (add_thread): Update prototype.
15098 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15099 prototypes.
15100
5a1f5858
DJ
151012005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15102
15103 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15104 left-padded registers.
15105 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15106 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15107
e122f1f5
SE
151082005-07-01 Steve Ellcey <sje@cup.hp.com>
15109
15110 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15111 * configure: Regenerate.
15112 * config.in: Regenerate.
15113 * server.h (NEED_DECLARATION_STRERROR):
15114 Replace with !HAVE_DECL_STRERROR.
15115
d592fa2f
DJ
151162005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15117
15118 * linux-low.c (linux_wait, linux_send_signal): Don't test
15119 an unsigned long variable for > 0 if it could be MAX_ULONG.
15120 * server.c (myresume): Likewise.
15121 * target.c (set_desired_inferior): Likewise.
15122
ccbd4912
MK
151232005-06-13 Mark Kettenis <kettenis@gnu.org>
15124
15125 * configure.ac: Simplify and improve check for socklen_t.
15126 * configure, config.in: Regenerate.
15127
f450004a
DJ
151282005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15129
15130 * acconfig.h: Remove.
15131 * configure.ac: Add a test for socklen_t. Use three-argument
15132 AC_DEFINE throughout.
15133 * config.in: Regenerated using autoheader 2.59.
15134 * configure: Regenerated.
15135
15136 * gdbreplay.c (socklen_t): Provide a default.
15137 (remote_open): Use socklen_t.
15138 * remote-utils.c (socklen_t): Provide a default.
15139 (remote_open): Use socklen_t.
15140 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15141 unsigned char.
15142
15143 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15144 char for buffers.
15145 * linux-low.c (linux_read_memory, linux_write_memory)
15146 (linux_read_auxv): Likewise.
15147 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15148 (check_mem_write): Likewise.
15149 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15150 Likewise.
15151 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15152 (registers_from_string, register_data): Likewise.
15153 * server.c (handle_query, main): Likewise.
15154 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15155 (decode_M_packet): Likewise.
15156 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15157 * target.h (struct target_ops): Update read_memory, write_memory,
15158 and read_auxv.
15159 (read_inferior_memory, write_inferior_memory): Update.
15160 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15161 to unsigned char *.
15162 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15163 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15164 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15165 linux-s390-low.c, linux-sh-low.c: Update for changes in
15166 read_inferior_memory and the_low_target->breakpoint.
15167
eee84df1
DJ
151682005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15169
15170 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15171 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15172 * configure.srv: Add powerpc64-*-linux*.
15173 * linux-ppc64-low.c: New file.
15174
45b134e5
OF
151752005-05-23 Orjan Friberg <orjanf@axis.com>
15176
15177 * linux-cris-low.c: New file with support for CRIS.
15178 * linux-crisv32-low.c: Ditto for CRISv32.
15179 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15180 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15181 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15182 reg-crisv32.o, and reg-crisv32.c to make rules.
15183 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15184 recognized targets.
15185
48d93c75
UW
151862005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15187
15188 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15189 of sizeof (PTRACE_XFER_TYPE).
15190 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15191
e013ee27
OF
151922005-05-12 Orjan Friberg <orjanf@axis.com>
15193
889bf7c5 15194 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15195 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15196 pointers for hardware watchpoint support.
15197 * linux-low.h (struct linux_target_ops): Ditto.
15198 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15199 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15200 to linux_target_ops.
15201 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15202 reply packet.
15203 * server.c (main): Recognize 'Z' and 'z' packets.
15204
b0ded00b
UW
152052005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15206
15207 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15208 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15209 (the_low_target): Add new members.
15210
8643e2ad
DJ
152112005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15212
15213 * proc-service.c (ps_lgetregs): Search all_processes instead of
15214 all_threads.
15215
fc620387
DJ
152162005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15217
15218 * server.c (start_inferior): Change return type to int.
15219 (attach_inferior): Change sigptr to int *.
15220 (handle_v_cont, handle_v_requests): Change signal to int *.
15221 (main): Change signal to int.
15222
152232005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15224
15225 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15226 * configure.srv: Add m32r*-*-linux*.
15227 * linux-m32r-low.c: New file.
15228
e0e76420
DJ
152292005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15230
15231 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15232
a1928bad
DJ
152332005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15234
15235 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15236 Take unsigned long arguments for PIDs.
15237 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15238 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15239 (wait_for_sigstop, linux_resume_one_process)
15240 (regsets_fetch_inferior_registers, linux_send_signal)
15241 (linux_read_auxv): Likewise. Update the types of variables holding
15242 PIDs. Update format string specifiers.
15243 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15244 * remote-utils.c (prepare_resume_reply): Likewise.
15245 * server.c (cont_thread, general_thread, step_thread)
15246 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15247 unsigned long.
15248 (handle_query): Update format specifiers.
15249 (handle_v_cont, main): Use strtoul for thread IDs.
15250 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15251 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15252 (general_thread, step_thread, thread_from_wait)
15253 (old_thread_from_wait): Update.
15254 * target.h (struct thread_resume): Use unsigned long for THREAD.
15255 (struct target_ops): Use unsigned long for arguments to attach and
15256 thread_alive.
15257
dcdb98d2
DJ
152582005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15259
15260 * acinclude.m4: Include bfd/bfd.m4 directly.
15261 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15262 <agriffis@toolchain.org>.
15263 * aclocal.m4, configure: Regenerated.
15264
bec39cab
AC
152652005-01-07 Andrew Cagney <cagney@gnu.org>
15266
15267 * configure.ac: Rename configure.in, require autoconf 2.59.
15268 * configure: Re-generate.
15269
434c4c77
DJ
152702004-12-08 Daniel Jacobowitz <dan@debian.org>
15271
15272 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15273 LIBS when finished.
15274 * aclocal.m4: Regenerated.
15275 * configure: Regenerated.
15276
db1d3e1b
AS
152772004-11-21 Andreas Schwab <schwab@suse.de>
15278
15279 * linux-m68k-low.c (m68k_num_gregs): Define.
15280 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15281 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15282 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15283 (m68k_breakpoint_at): New. Add to the_low_target.
15284
15285 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15286 srv_linux_thread_db to yes.
15287
43360365
JB
152882004-10-20 Joel Brobecker <brobecker@gnat.com>
15289
15290 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15291 (ARCH_SET_FS): Likewise.
15292 (ARCH_GET_FS): Likewise.
15293 (ARCH_GET_GS): Likewise.
15294
fd500816
DJ
152952004-10-16 Daniel Jacobowitz <dan@debian.org>
15296
15297 * linux-i386-low.c (ps_get_thread_area): New.
15298 * linux-x86-64-low.c (ps_get_thread_area): New.
15299 * linux-low.c: Include <sys/syscall.h>.
15300 (linux_kill_one_process): Don't kill the first thread here.
15301 (linux_kill): Kill the first thread here.
15302 (kill_lwp): New function.
15303 (send_sigstop, linux_send_signal): Use it.
15304 * proc-service.c: Clean up #ifdefs.
15305 (fpregset_info): Delete.
15306 (ps_lgetregs): Update and enable implementation.
15307 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15308 implementations.
15309 * remote-utils.c (struct sym_cache, symbol_cache): New.
15310 (input_interrupt): Print a clearer message.
15311 (async_io_enabled): New variable.
15312 (enable_async_io, disable_async_io): Use it. Update comments.
15313 (look_up_one_symbol): Use the symbol cache.
15314 * thread-db.c (thread_db_look_up_symbols): New function.
15315 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15316
f6de3c42
DJ
153172004-10-16 Daniel Jacobowitz <dan@debian.org>
15318
15319 * configure.in: Test for -rdynamic.
15320 * configure: Regenerated.
15321 * Makefile (INTERNAL_LDFLAGS): New.
15322 (gdbserver, gdbreplay): Use it.
15323
2c0fc042
AC
153242004-09-02 Andrew Cagney <cagney@gnu.org>
15325
15326 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15327
075b3282
DJ
153282004-03-23 Daniel Jacobowitz <drow@mvista.com>
15329
15330 * linux-low.c (linux_wait): Clear all_processes list also.
15331
fa6a77dc
DJ
153322004-03-12 Daniel Jacobowitz <drow@mvista.com>
15333
15334 * linux-low.c: Include <errno.h>. Remove extern declaration of
15335 errno.
15336
6d782a97
DJ
153372004-03-12 Daniel Jacobowitz <drow@mvista.com>
15338
15339 * gdbreplay.c, server.h, utils.c: Update copyright years.
15340
3a7fb99b
DJ
153412004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15342
15343 * server.c (main): Print child status or termination signal from
15344 variable 'signal', not 'sig'.
15345
c3e735a6
DJ
153462004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15347
15348 * linux-low.c (linux_read_memory): Change return type to
15349 int. Check for and return error from ptrace().
15350 * target.c (read_inferior_memory): Change return type to int. Pass
15351 back return status from the_target->read_memory().
15352 * target.h (struct target_ops): Adapt *read_memory() prototype.
15353 Update comment.
15354 (read_inferior_memory): Adapt prototype.
15355 * server.c (main): Return an error packet if
15356 read_inferior_memory() returns an error.
15357
a59d1c82
DJ
153582004-03-04 Daniel Jacobowitz <drow@mvista.com>
15359
15360 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15361 Unify with other clean targets.
15362
dc3f8883
DJ
153632004-02-29 Daniel Jacobowitz <drow@mvista.com>
15364
15365 * server.c (handle_v_cont): Call set_desired_inferior.
15366
89a208da
DJ
153672004-02-29 Daniel Jacobowitz <drow@mvista.com>
15368
15369 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15370
62ea82f5
DJ
153712004-02-29 Daniel Jacobowitz <drow@mvista.com>
15372
15373 * linux-low.c (linux_wait): Unblock async I/O.
15374 (linux_resume): Block and enable async I/O.
15375 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15376 * server.h (block_async_io, unblock_async_io): Add prototypes.
15377
6910d122
DJ
153782004-02-29 Daniel Jacobowitz <drow@mvista.com>
15379
15380 * remote-utils.c (remote_open): Print a status notice after
15381 opening a TCP port.
15382 * server.c (attach_inferior): Print a status notice after
15383 attaching.
15384
153852004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15386
15387 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15388
c89dc5d4
DJ
153892004-02-26 Daniel Jacobowitz <drow@mvista.com>
15390
15391 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15392 error packet.
15393 * server.c, target.h: Update copyright years.
15394
4b8dad4a
RM
153952004-02-25 Roland McGrath <roland@redhat.com>
15396
15397 * target.h (struct target_ops): New member `read_auxv'.
15398 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15399 * linux-low.c (linux_read_auxv): New function.
15400 (linux_target_ops): Initialize `read_auxv' member to that.
15401
d7446758
JB
154022004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15403
15404 Committed by Jim Blandy <jimb@redhat.com>.
15405
15406 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15407 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15408 instead of GPR_SIZE to distiguish s390 and s390x targets.
15409
5544ad89
DJ
154102004-01-31 Daniel Jacobowitz <drow@mvista.com>
15411
15412 * linux-low.c: Update copyright year.
15413 (check_removed_breakpoint): Clear pending_is_breakpoint.
15414 (linux_set_resume_request, linux_queue_one_thread)
15415 (resume_status_pending_p): New functions.
15416 (linux_continue_one_thread): Use process->resume.
15417 (linux_resume): Only resume threads if there are no pending events.
15418 * linux-low.h (struct process_info): Add resume request
15419 pointer.
15420
2a68b70e
DJ
154212004-01-30 Daniel Jacobowitz <drow@mvista.com>
15422
15423 * regcache.c (new_register_cache): Clear the allocated register
15424 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15425
64386c31
DJ
154262003-10-13 Daniel Jacobowitz <drow@mvista.com>
15427
15428 * linux-low.c (linux_resume): Take a struct thread_resume *
15429 argument.
15430 (linux_wait): Update call.
15431 (resume_ptr): New static variable.
15432 (linux_continue_one_thread): Renamed from
15433 linux_continue_one_process. Use resume_ptr.
15434 (linux_resume): Use linux_continue_one_thread.
15435 * server.c (handle_v_cont, handle_v_requests): New functions.
15436 (myresume): New function.
15437 (main): Handle 'v' case.
15438 * target.h (struct thread_resume): New type.
15439 (struct target_ops): Change argument of "resume" to struct
15440 thread_resume *.
15441 (myresume): Delete macro.
15442
c938e9b0
L
154432003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15444
15445 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15446 (uninstall): Support DESTDIR.
15447
7f313d07
BC
15448Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15449
15450 * configure.srv: Add xscale*linux copy of arm*linux entry.
15451
3b2fc2ea
DJ
154522003-07-24 Daniel Jacobowitz <drow@mvista.com>
15453
15454 * linux-arm-low.c (arm_reinsert_addr): New function.
15455 (the_low_target): Add arm_reinsert_addr.
15456
1c0a559e
MK
154572003-07-08 Mark Kettenis <kettenis@gnu.org>
15458
15459 * mem-break.c: Remove whitespace at end of file.
15460
43d5792c
DJ
154612003-06-28 Daniel Jacobowitz <drow@mvista.com>
15462
15463 * configure.in: Check whether we need to prototype strerror.
15464 * server.h: Optionally prototype strerror.
15465 * gdbreplay.c (perror_with_name): Use strerror.
15466 * linux-low.c (linux_attach_lwp): Use strerror.
15467 * utils.c (perror_with_name): Use strerror.
15468 * config.in, configure: Regenerated.
15469
c8a86edf
DJ
154702003-06-28 Daniel Jacobowitz <drow@mvista.com>
15471
15472 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15473 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15474
73d37363
DJ
154752003-06-20 Daniel Jacobowitz <drow@mvista.com>
15476
15477 * Makefile.in (SFILES): Update.
15478 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15479 low-sun3.c: Remove files.
15480
6ad8ae5c
DJ
154812003-06-17 Daniel Jacobowitz <drow@mvista.com>
15482
15483 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15484 (linux_detach_one_process, linux_detach): New functions.
15485 (linux_target_ops): Add linux_detach.
15486 * server.c (main): Handle 'D' packet.
15487 * target.h (struct target_ops): Add "detach" member.
15488 (detach_inferior): Define.
15489
1581182a
MK
154902003-06-13 Mark Kettenis <kettenis@gnu.org>
15491
15492 From Kelley Cook <kelleycook@wideopenwest.com>:
15493 * configure.srv: Accept i[34567]86 variants.
15494
e5379b03
DJ
154952003-06-05 Daniel Jacobowitz <drow@mvista.com>
15496
15497 * linux-low.c (linux_wait_for_event): Correct comment typos.
15498 (linux_resume_one_process): Call check_removed_breakpoint.
15499 (linux_send_signal): New function.
15500 (linux_target_ops): Add linux_send_signal.
15501 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15502 of kill.
15503 * target.h (struct target_ops): Add send_signal.
15504
2ff29de4
JB
155052003-05-29 Jim Blandy <jimb@redhat.com>
15506
15507 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15508 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15509 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15510 away part of the register's value.
15511
254787d4
DJ
155122003-03-26 Daniel Jacobowitz <drow@mvista.com>
15513
15514 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15515 (linux_wait_for_event, linux_init_signals): Likewise.
15516
94e10508
DJ
155172003-03-17 Daniel Jacobowitz <drow@mvista.com>
15518
15519 * configure.in: Check for stdlib.h.
15520 * configure: Regenerated.
15521 * config.in: Regenerated.
15522
4c0711e0
DJ
155232003-01-04 Andreas Schwab <schwab@suse.de>
15524
15525 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15526
ef66e766
AC
155272003-01-02 Andrew Cagney <ac131313@redhat.com>
15528
15529 * Makefile.in: Remove obsolete code.
15530
a1358604
DJ
155312002-11-20 Daniel Jacobowitz <drow@mvista.com>
15532
15533 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15534 defined(PT_FPR0_HI).
15535
23ce3b1c
DJ
155362002-11-17 Stuart Hughes <seh@zee2.com>
15537
15538 * linux-arm-low.c (arm_num_regs): Increase.
15539 (arm_regmap): Include status register.
15540
155412002-11-17 Daniel Jacobowitz <drow@mvista.com>
15542
15543 * linux-low.c (register_addr): Remove incorrect -1 check.
15544
a9fa9f7d
DJ
155452002-08-29 Daniel Jacobowitz <drow@mvista.com>
15546
15547 * linux-low.c (linux_create_inferior): Call setpgid. Return
15548 the new PID.
15549 (unstopped_p, linux_signal_pid): Remove.
15550 (linux_target_ops): Remove linux_signal_pid.
15551 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15552 global instead of target method.
15553 * target.h (struct target_ops): Remove signal_pid. Update comment
15554 for create_inferior.
15555 * server.c (signal_pid): New variable.
15556 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15557 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15558 (attach_inferior): Set signal_pid.
15559
17574093
DJ
155602002-08-23 Daniel Jacobowitz <drow@mvista.com>
15561
15562 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15563
155642002-08-20 Jim Blandy <jimb@redhat.com>
15565
15566 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15567 default for this.
15568
155692002-08-01 Andrew Cagney <cagney@redhat.com>
15570
15571 * Makefile.in: Make chill references obsolete.
15572
155732002-07-24 Kevin Buettner <kevinb@redhat.com>
15574
15575 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15576 * configure: Regenerate.
15577 * config.in: Regenerate.
15578
155792002-07-09 David O'Brien <obrien@FreeBSD.org>
15580
15581 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15582 (perror_with_name, remote_close, remote_open, expect, play): Static.
15583
155842002-07-04 Michal Ludvig <mludvig@suse.cz>
15585
4b8dad4a 15586 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15587 byte offsets instead of an array of indexes.
15588 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15589
155902002-06-13 Daniel Jacobowitz <drow@mvista.com>
15591
15592 * regcache.c: Add comment.
15593
155942002-06-11 Daniel Jacobowitz <drow@mvista.com>
15595
15596 * thread-db.c: New file.
15597 * proc-service.c: New file.
15598 * acinclude.m4: New file.
15599 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15600 proc-service.o, and thread-db.o.
15601 (linux-low.o): Add USE_THREAD_DB.
15602 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15603 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15604 * aclocal.m4: Regenerated.
15605 * config.in: Regenerated.
15606 * configure: Regenerated.
15607 * configure.in: Check for proc_service.h, sys/procfs.h,
15608 thread_db.h, and linux/elf.h headrs.
15609 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15610 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15611 Check for -lthread_db and thread support.
15612 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15613 PowerPC, and SuperH.
15614 * i387-fp.c: Constify arguments.
15615 * i387-fp.h: Likewise.
15616 * inferiors.c: (struct thread_info): Renamed from
15617 `struct inferior_info'. Remove PID member. Use generic inferior
15618 list header. All uses updated.
15619 (inferiors, signal_pid): Removed.
15620 (all_threads): New variable.
15621 (get_thread): Define.
15622 (add_inferior_to_list): New function.
15623 (for_each_inferior): New function.
15624 (change_inferior_id): New function.
15625 (add_inferior): Removed.
15626 (remove_inferior): New function.
15627 (add_thread): New function.
15628 (free_one_thread): New function.
15629 (remove_thread): New function.
15630 (clear_inferiors): Use for_each_inferior and free_one_thread.
15631 (find_inferior): New function.
15632 (find_inferior_id): New function.
15633 (inferior_target_data): Update argument type.
15634 (set_inferior_target_data): Likewise.
15635 (inferior_regcache_data): Likewise.
15636 (set_inferior_regcache_data): Likewise.
15637 * linux-low.c (linux_bp_reinsert): Remove.
15638 (all_processes, stopping_threads, using_thrads)
15639 (struct pending_signals, debug_threads, pid_of): New.
15640 (inferior_pid): Replace with macro.
15641 (struct inferior_linux_data): Remove.
15642 (get_stop_pc, add_process): New functions.
15643 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15644 Use add_process and add_thread.
15645 (linux_attach_lwp): New function, based on old linux_attach. Use
15646 add_process and add_thread. Set stop_expected for new threads.
15647 (linux_attach): New function.
15648 (linux_kill_one_process): New function.
15649 (linux_kill): Kill all LWPs.
15650 (linux_thread_alive): Use find_inferior_id.
15651 (check_removed_breakpoints, status_pending_p): New functions.
15652 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15653 Update. Use WNOHANG. Wait for cloned processes also. Update process
15654 struct for the found process.
15655 (linux_wait_for_event): New function.
15656 (linux_wait): Use it. Support LWPs.
15657 (send_sigstop, wait_for_sigstop, stop_all_processes)
15658 (linux_resume_one_process, linux_continue_one_process): New functions.
15659 (linux_resume): Support LWPs.
15660 (REGISTER_RAW_SIZE): Remove.
15661 (fetch_register): Use register_size instead. Call supply_register.
15662 (usr_store_inferior_registers): Likewise. Call collect_register.
15663 Fix recursive case.
15664 (regsets_fetch_inferior_registers): Improve error message.
15665 (regsets_store_inferior_registers): Add debugging.
15666 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15667 (unstopped_p, linux_signal_pid): New functions.
15668 (linux_target_ops): Add linux_signal_pid.
15669 (linux_init_signals): New function.
15670 (initialize_low): Call it. Initialize using_threads.
15671 * regcache.c (inferior_regcache_data): Add valid
15672 flag.
15673 (get_regcache): Fetch registers lazily. Add fetch argument
15674 and update all callers.
15675 (regcache_invalidate_one, regcache_invalidate): New
15676 functions.
15677 (new_register_cache): Renamed from create_register_cache.
15678 Return the new regcache.
15679 (free_register_cache): Change argument to a void *.
15680 (registers_to_string, registers_from_string): Call get_regcache
15681 with fetch flag set.
15682 (register_data): Make static. Pass fetch flag to get_regcache.
15683 (supply_register): Call get_regcache with fetch flag clear.
15684 (collect_register): Call get_regcache with fetch flag set.
15685 (collect_register_as_string): New function.
15686 * regcache.h: Update.
15687 * remote-utils.c (putpkt): Flush after debug output and use
15688 stderr.
15689 Handle input interrupts while waiting for an ACK.
15690 (input_interrupt): Use signal_pid method.
15691 (getpkt): Flush after debug output and use stderr.
15692 (outreg): Use collect_register_as_string.
15693 (new_thread_notify, dead_thread_notify): New functions.
15694 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15695 and general_thread.
15696 (look_up_one_symbol): Flush after debug output.
15697 * server.c (step_thread, server_waiting): New variables.
15698 (start_inferior): Don't use signal_pid. Update call to mywait.
15699 (attach_inferior): Update call to mywait.
15700 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15701 (main): Don't fetch/store registers explicitly. Use
15702 set_desired_inferior. Support proposed ``Hs'' packet. Update
15703 calls to mywait.
15704 * server.h: Update.
15705 (struct inferior_list, struct_inferior_list_entry): New.
15706 * target.c (set_desired_inferior): New.
15707 (write_inferior_memory): Constify.
15708 (mywait): New function.
15709 * target.h: Update.
15710 (struct target_ops): New signal_pid method.
15711 (mywait): Removed macro, added prototype.
15712
15713 * linux-low.h (regset_func): Removed.
15714 (regset_fill_func, regset_store_func): New.
15715 (enum regset_type): New.
15716 (struct regset_info): Add type field. Use new operation types.
15717 (struct linux_target_ops): stop_pc renamed to get_pc.
15718 Add decr_pc_after_break and breakpoint_at.
15719 (get_process, get_thread_proess, get_process_thread)
15720 (strut process_info, all_processes, linux_attach_lwp)
15721 (thread_db_init): New.
15722
15723 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15724 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15725 (the_low_target): Add new members.
15726 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15727 (i386_store_fpxregset): Constify.
15728 (target_regsets): Add new kind identifier.
15729 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15730 (i386_set_pc): Add debugging.
15731 (i386_breakpoint_at): New function.
15732 (the_low_target): Add new members.
15733 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15734 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15735 (mips_breakpoint_at): New.
15736 (the_low_target): Add new members.
15737 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15738 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15739 (the_low_target): Add new members.
15740 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15741 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15742 (the_low_target): Add new members.
15743 * linux-x86-64-low.c (target_regsets): Add new kind
15744 identifier.
15745
157462002-05-15 Daniel Jacobowitz <drow@mvista.com>
15747
15748 From Martin Pool <mbp@samba.org>:
15749 * server.c (gdbserver_usage): New function.
15750 (main): Call it.
15751
157522002-05-14 Daniel Jacobowitz <drow@mvista.com>
15753
15754 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15755 stop_at -> stop_pc.
15756
157572002-05-04 Andrew Cagney <ac131313@redhat.com>
15758
15759 * Makefile.in: Remove obsolete code.
15760
157612002-04-24 Michal Ludvig <mludvig@suse.cz>
15762
15763 * linux-low.c (regsets_fetch_inferior_registers),
15764 (regsets_store_inferior_registers): Removed cast to int from
15765 ptrace() calls.
15766 * regcache.h: Added declaration of struct inferior_info.
15767
157682002-04-20 Daniel Jacobowitz <drow@mvista.com>
15769
15770 * inferiors.c (struct inferior_info): Add regcache_data.
15771 (add_inferior): Call create_register_cache.
15772 (clear_inferiors): Call free_register_cache.
15773 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15774 * regcache.c (struct inferior_regcache_data): New.
15775 (registers): Remove.
15776 (get_regcache): New function.
15777 (create_register_cache, free_register_cache): New functions.
15778 (set_register_cache): Don't initialize the register cache here.
15779 (registers_to_string, registers_from_string, register_data): Call
15780 get_regcache.
15781 * regcache.h: Add prototypes.
15782 * server.h: Likewise.
15783
157842002-04-20 Daniel Jacobowitz <drow@mvista.com>
15785
15786 * mem-break.c: New file.
15787 * mem-break.h: New file.
15788 * Makefile.in: Add mem-break.o rule; update server.h
15789 dependencies.
15790 * inferiors.c (struct inferior_info): Add target_data
15791 member.
15792 (clear_inferiors): Free target_data member if set.
15793 (inferior_target_data, set_inferior_target_data): New functions.
15794 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15795 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15796 * linux-low.c (linux_bp_reinsert): New variable.
15797 (struct inferior_linux_data): New.
15798 (linux_create_inferior): Use set_inferior_target_data.
15799 (linux_attach): Likewise. Call add_inferior.
15800 (linux_wait_for_one_inferior): New function.
15801 (linux_wait): Call it.
15802 (linux_write_memory): Add const.
15803 (initialize_low): Call set_breakpoint_data.
15804 * linux-low.h (struct linux_target_ops): Add breakpoint
15805 handling members.
15806 * server.c (attach_inferior): Remove extra add_inferior
15807 call.
15808 * server.h: Include mem-break.h. Update inferior.c
15809 prototypes.
15810 * target.c (read_inferior_memory)
15811 (write_inferior_memory): New functions.
15812 * target.h (read_inferior_memory)
15813 (write_inferior_memory): Change macros to prototypes.
15814 (struct target_ops): Update comments. Add const to write_memory
15815 definition.
15816
158172002-04-11 Daniel Jacobowitz <drow@mvista.com>
15818
15819 * linux-low.c (usr_store_inferior_registers): Support
15820 registers which are allowed to fail to store.
15821 * linux-low.h (linux_target_ops): Likewise.
15822 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15823 (ppc_cannot_store_register): FPSCR may not be storable.
15824
158252002-04-09 Daniel Jacobowitz <drow@mvista.com>
15826
15827 * server.h: Include <string.h> if HAVE_STRING_H.
15828 * ChangeLog: Correct paths in last ChangeLog entry.
15829
158302002-04-09 Daniel Jacobowitz <drow@mvista.com>
15831
15832 * linux-low.h: Remove obsolete prototypes.
15833 (struct linux_target_ops): New.
15834 (extern the_low_target): New.
15835 * linux-low.c (num_regs, regmap): Remove declarations.
15836 (register_addr): Use the_low_target explicitly.
15837 (fetch_register): Likewise.
15838 (usr_fetch_inferior_registers): Likewise.
15839 (usr_store_inferior_registers): Likewise.
15840 * linux-arm-low.c (num_regs): Remove.
15841 (arm_num_regs): Define.
15842 (arm_regmap): Renamed from regmap, made static.
15843 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15844 made static.
15845 (arm_cannot_store_register): Renamed from cannot_store_register,
15846 made static.
15847 (the_low_target): New.
15848 * linux-i386-low.c (num_regs): Remove.
15849 (i386_num_regs): Define.
15850 (i386_regmap): Renamed from regmap, made static.
15851 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15852 made static.
15853 (i386_cannot_store_register): Renamed from cannot_store_register,
15854 made static.
15855 (the_low_target): New.
15856 * linux-ia64-low.c (num_regs): Remove.
15857 (ia64_num_regs): Define.
15858 (ia64_regmap): Renamed from regmap, made static.
15859 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15860 made static.
15861 (ia64_cannot_store_register): Renamed from cannot_store_register,
15862 made static.
15863 (the_low_target): New.
15864 * linux-m68k-low.c (num_regs): Remove.
15865 (m68k_num_regs): Define.
15866 (m68k_regmap): Renamed from regmap, made static.
15867 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15868 made static.
15869 (m68k_cannot_store_register): Renamed from cannot_store_register,
15870 made static.
15871 (the_low_target): New.
15872 * linux-mips-low.c (num_regs): Remove.
15873 (mips_num_regs): Define.
15874 (mips_regmap): Renamed from regmap, made static.
15875 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15876 made static.
15877 (mips_cannot_store_register): Renamed from cannot_store_register,
15878 made static.
15879 (the_low_target): New.
15880 * linux-ppc-low.c (num_regs): Remove.
15881 (ppc_num_regs): Define.
15882 (ppc_regmap): Renamed from regmap, made static.
15883 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15884 made static.
15885 (ppc_cannot_store_register): Renamed from cannot_store_register,
15886 made static.
15887 (the_low_target): New.
15888 * linux-s390-low.c (num_regs): Remove.
15889 (s390_num_regs): Define.
15890 (s390_regmap): Renamed from regmap, made static.
15891 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15892 made static.
15893 (s390_cannot_store_register): Renamed from cannot_store_register,
15894 made static.
15895 (the_low_target): New.
15896 * linux-sh-low.c (num_regs): Remove.
15897 (sh_num_regs): Define.
15898 (sh_regmap): Renamed from regmap, made static.
15899 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15900 made static.
15901 (sh_cannot_store_register): Renamed from cannot_store_register,
15902 made static.
15903 (the_low_target): New.
15904 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15905 (the_low_target): New.
15906
159072002-04-09 Daniel Jacobowitz <drow@mvista.com>
15908
15909 * Makefile.in: Add stamp-h target.
15910 * configure.in: Create stamp-h.
15911 * configure: Regenerated.
15912
159132002-04-09 Daniel Jacobowitz <drow@mvista.com>
15914
15915 * inferiors.c: New file.
15916 * target.c: New file.
15917 * target.h: New file.
15918 * Makefile.in: Add target.o and inferiors.o. Update
15919 dependencies.
15920 * linux-low.c (inferior_pid): New static variable,
15921 moved from server.c.
15922 (linux_create_inferior): Renamed from create_inferior.
15923 Call add_inferior. Return 0 on success instead of a PID.
15924 (linux_attach): Renamed from myattach.
15925 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15926 (linux_thread_alive): Renamed from mythread_alive.
15927 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15928 child dies.
15929 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15930 (regsets_store_inferior_registers): Correct error message.
15931 Add missing ``return 0''.
15932 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15933 (linux_store_registers): Renamed from store_inferior_registers.
15934 (linux_read_memory): Renamed from read_inferior_memory.
15935 (linux_write_memory): Renamed from write_inferior_memory.
15936 (linux_target_ops): New structure.
15937 (initialize_low): Call set_target_ops ().
15938 * remote-utils.c (unhexify): New function.
15939 (hexify): New function.
15940 (input_interrupt): Send signals to ``signal_pid''.
15941 * server.c (inferior_pid): Remove.
15942 (start_inferior): Update create_inferior call.
15943 (attach_inferior): Call add_inferior.
15944 (handle_query): New function.
15945 (main): Call handle_query for `q' packets.
15946 * server.h: Include "target.h". Remove obsolete prototypes.
15947 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15948
159492002-04-09 Daniel Jacobowitz <drow@mvista.com>
15950
15951 * Makefile.in: Add WARN_CFLAGS. Update configury
15952 dependencies.
15953 * configure.in: Check for <string.h>
15954 * configure: Regenerate.
15955 * config.in: Regenerate.
15956 * gdbreplay.c: Include needed system headers.
15957 (remote_open): Remove strchr prototype.
15958 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15959 * regcache.c (supply_register): Change buf argument to const void *.
15960 (supply_register_by_name): Likewise.
15961 (collect_register): Change buf argument to void *.
15962 (collect_register_by_name): Likewise.
15963 * regcache.h: Add missing prototypes.
15964 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15965 * server.c (handle_query): New function.
15966 (attached): New static variable, moved out of main.
15967 (main): Quiet longjmp clobber warnings.
15968 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15969 * utils.c (error): Remove NORETURN.
15970 (fatal): Likewise.
This page took 1.849709 seconds and 4 git commands to generate.