[ARC] Fix handling of ARCv2 H-register class.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
578290ec
SM
12017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2
3 * linux-low.c (kill_one_lwp_callback): Return void, take
4 argument directly, don't filter on pid.
5 (linux_kill): Use for_each_thread.
6
eca55aec
SM
72017-11-19 Simon Marchi <simon.marchi@ericsson.com>
8
9 * linux-low.c (need_step_over_p): Return bool, remove dummy
10 argument.
11 (linux_resume, proceed_all_lwps): Use find_thread.
12
25c28b4d
SM
132017-11-19 Simon Marchi <simon.marchi@ericsson.com>
14
15 * linux-low.c (resume_status_pending_p): Return bool, remove
16 flag_p argument.
17 (linux_resume): Use find_thread.
18
5fdda392
SM
192017-11-19 Simon Marchi <simon.marchi@ericsson.com>
20
21 * linux-low.c (struct thread_resume_array): Remove.
22 (linux_set_resume_request): Return void, take arguments
23 directly.
24 (linux_resume): Use for_each_thread.
25
fcb056a5
SM
262017-11-19 Simon Marchi <simon.marchi@ericsson.com>
27
28 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
29 return bool, remove data argument.
30 (linux_stabilize_threads): Use find_thread.
31
139720c5
SM
322017-11-19 Simon Marchi <simon.marchi@ericsson.com>
33
34 * linux-low.c (unsuspend_one_lwp): Remove.
35 (unsuspend_all_lwps): Use for_each_thread, inline code from
36 unsuspend_one_lwp.
37
6d1e5673
SM
382017-11-19 Simon Marchi <simon.marchi@ericsson.com>
39
40 * gdbthread.h (find_thread): Add overload with ptid_t filter.
41 * linux-low.c (struct iterate_over_lwps_args): Remove.
42 (iterate_over_lwps_filter): Remove.
43 (iterate_over_lwps): Use find_thread.
44
bbf550d5
SM
452017-11-19 Simon Marchi <simon.marchi@ericsson.com>
46
47 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
48 (linux_handle_new_gdb_connection): Use for_each_thread, inline
49 code from reset_lwp_ptrace_options_callback.
50
00192f77
SM
512017-11-19 Simon Marchi <simon.marchi@ericsson.com>
52
53 * linux-arm-low.c (struct update_registers_data): Remove.
54 (update_registers_callback): Return void, take arguments
55 directly, don't check thread's pid.
56 (arm_insert_point, arm_remove_point): Use for_each_thread.
57
2bee2b6c
SM
582017-11-19 Simon Marchi <simon.marchi@ericsson.com>
59
60 * win32-low.c (continue_one_thread): Return void, take argument
61 directly.
62 (child_continue): Use for_each_thread.
63
0b360f19
SM
642017-11-19 Simon Marchi <simon.marchi@ericsson.com>
65
66 * win32-i386-low.c (update_debug_registers_callback): Rename
67 to ...
68 (update_debug_registers): ... this, return void, remove pid_p arg.
69 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
70
f27866ba
SM
712017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
72
73 * inferiors.h (struct process_info): Add constructor, initialize
74 fields..
75 <syscalls_to_catch>: Change type to std::vector<int>.
76 * inferiors.c (add_process): Allocate process_info with new.
77 (remove_process): Free process_info with delete.
78 * linux-low.c (handle_extended_wait): Adjust.
79 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
80 * server.c (handle_general_set): Adjust.
81
e849ea89
PA
822017-11-16 Pedro Alves <palves@redhat.com>
83
84 * remote-utils.c (remote_close): Block SIGIO signals instead of
85 uninstalling the SIGIO handler.
86
1d0aa65c
AH
872017-11-16 Alan Hayward <alan.hayward@arm.com>
88
89 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
90
3491a34c
YQ
912017-11-16 Yao Qi <yao.qi@linaro.org>
92
93 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
94 (tic6x_store_gregset): Likewise.
95 (tic6x_usrregs_info): Move it up.
96
a602f924
AH
972017-11-15 Alan Hayward <alan.hayward@arm.com>
98
99 * Makefile.in: Update arch rules.
100 * configure.srv: Explicitly mark arch/ files.
101
5616b6c3
AS
1022017-11-13 Andreas Schwab <schwab@suse.de>
103
104 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
105 function.
106 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
107
d1928160
PA
1082017-11-06 Pedro Alves <palves@redhat.com>
109
110 * config.in, configure: Regenerate.
111
bac608e7
SM
1122017-10-27 Simon Marchi <simon.marchi@ericsson.com>
113
114 * target.c (struct thread_search): Remove.
115 (thread_search_callback): Remove.
116 (prepare_to_access_memory): Use for_each_thread instead of
117 find_inferior. Inline code from thread_search_callback.
118
eaddb425
SM
1192017-10-27 Simon Marchi <simon.marchi@ericsson.com>
120
121 * server.c (struct visit_actioned_threads_data): Remove.
122 (visit_actioned_threads): Change prototype to take arguments
123 directly.
124 (resume): Use find_thread instead of find_inferior.
125
99078d34
SM
1262017-10-27 Simon Marchi <simon.marchi@ericsson.com>
127
128 * server.c (queue_stop_reply_callback): Change prototype, return
129 void.
130 (find_status_pending_thread_callback): Remove.
131 (handle_status): Replace find_inferior with find_thread and
132 for_each_thread.
133
cc628f3d
AH
1342017-10-25 Alan Hayward <alan.hayward@arm.com>
135
136 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
137 with REGNO.
138 (aarch64_store_gregset): Likewise.
139 (aarch64_fill_fpregset): Likewise.
140 (aarch64_store_fpregset): Likewise.
141
4d3bb80e
SM
1422017-10-21 Simon Marchi <simon.marchi@ericsson.com>
143
144 * gdbthread.h (find_thread, for_each_thread): New functions.
145 * inferiors.c (thread_of_pid): Remove.
146 (find_any_thread_of_pid): Use find_thread.
147 * linux-low.c (num_lwps): Use for_each_thread.
148
7a7cdfa0
YQ
1492017-10-17 Yao Qi <yao.qi@linaro.org>
150
151 * Makefile.in: Remove one rule.
152 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
153
e675d170
YQ
1542017-10-17 Yao Qi <yao.qi@linaro.org>
155
156 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
157 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
158
7eb4e0f9
YQ
1592017-10-17 Yao Qi <yao.qi@linaro.org>
160
161 * configure.srv: Rename arm.o with arch/arm.o.
162
60d6cfc9
YQ
1632017-10-17 Yao Qi <yao.qi@linaro.org>
164
165 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
166 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
167 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
168 (arch-i386.o, arch-amd64.o): Remove rules.
169 (arch/%.o): New rule.
170 Update POSTCOMPILE and COMPILE.pre.
171 * configure.ac: Invoke AC_CONFIG_COMMANDS.
172 * configure: Re-generated.
173 * configure.srv: Replace arch-i386.o with arch/i386.o.
174 Replace arch-amd64.o with arch/amd64.o.
175
5bfda255
YQ
1762017-10-16 Yao Qi <yao.qi@linaro.org>
177
178 * configure: Regenerated.
179
9c80ecd6
SM
1802017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
181
182 * inferiors.h: (struct inferior_list): Remove.
183 (struct inferior_list_entry); Remove.
184 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
185 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
186 get_first_inferior): Remove.
187 (for_each_inferior, for_each_inferior_with_data, find_inferior,
188 find_inferior_id, find_inferior_in_random): Change signature.
189 * inferiors.c (all_threads): Change type to
190 std::list<thread_info *>.
191 (get_thread): Remove macro.
192 (find_inferior, find_inferior_id): Change signature, implement
193 using find_thread.
194 (find_inferior_in_random): Change signature, implement using
195 find_thread_in_random.
196 (for_each_inferior, for_each_inferior_with_data): Change
197 signature, implement using for_each_thread.
198 (add_inferior_to_list, remove_inferior): Remove.
199 (add_thread, get_first_thread, thread_of_pid,
200 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
201 (get_first_inferior, one_inferior_p, clear_inferior_list):
202 Remove.
203 (clear_inferiors, get_thread_process): Update.
204 * gdbthread.h: Include <list>.
205 (struct thread_info) <entry>: Remove field.
206 <id>: New field.
207 (all_threads): Change type to std::list<thread_info *>.
208 (get_first_inferior): Add doc.
209 (find_thread, for_each_thread, find_thread_in_random): New
210 functions.
211 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
212 * linux-arm-low.c (update_registers_callback): Update.
213 * linux-low.c (second_thread_of_pid_p): Update.
214 (kill_one_lwp_callback, linux_detach_lwp_callback,
215 delete_lwp_callback, status_pending_p_callback, same_lwp,
216 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
217 iterate_over_lwps, not_stopped_callback,
218 resume_stopped_resumed_lwps, count_events_callback,
219 select_singlestep_lwp_callback, select_event_lwp_callback,
220 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
221 suspend_and_send_sigstop_callback, wait_for_sigstop,
222 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
223 lwp_running, linux_set_resume_request, resume_status_pending_p,
224 need_step_over_p, start_step_over, linux_resume_one_thread,
225 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
226 reset_lwp_ptrace_options_callback): Update.
227 * linux-mips-low.c (update_watch_registers_callback): Update.
228 * regcache.c (regcache_invalidate_one, regcache_invalidate):
229 Update.
230 (free_register_cache_thread_one): Remove.
231 (regcache_release): Update.
232 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
233 handle_qxfer_threads_worker): Update.
234 (handle_query): Update, use list iterator.
235 (visit_actioned_threads, handle_pending_status,
236 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
237 clear_pending_status_callback, set_pending_status_callback,
238 find_status_pending_thread_callback, handle_status,
239 process_serial_event): Update.
240 * target.c (thread_search_callback): Update.
241 * thread-db.c (thread_db_get_tls_address): Update.
242 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
243 Update.
244 * win32-i386-low.c (update_debug_registers_callback): Update.
245 * win32-low.c (delete_thread_info, child_delete_thread,
246 continue_one_thread, suspend_one_thread,
247 get_child_debug_event): Adjust.
248
9179355e
SM
2492017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
250
251 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
252 * inferiors.h: Include <list>.
253 (struct process_info) <entry>: Remove field.
254 <pid>: New field.
255 (pid_of): Change macro to function.
256 (ptid_of, lwpid_of): Remove macro.
257 (all_processes): Change type to std::list<process_info *>.
258 (ALL_PROCESSES): Remove macro.
259 (for_each_process, find_process): New function.
260 * inferiors.c (all_processes): Change type to
261 std::list<process_info *>.
262 (find_thread_process): Adjust.
263 (add_process): Likewise.
264 (remove_process): Likewise.
265 (find_process_pid): Likewise.
266 (get_first_process): Likewise.
267 (started_inferior_callback): Remove.
268 (have_started_inferiors_p): Adjust.
269 (attached_inferior_callback): Remove.
270 (have_attached_inferiors_p): Adjust.
271 * linux-low.c (check_zombie_leaders): Likewise.
272 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
273 (x86_linux_update_xmltarget): Adjust.
274 * server.c (handle_query): Likewise.
275 (gdb_reattached_process): Remove.
276 (handle_status): Adjust.
277 (kill_inferior_callback): Likewise.
278 (detach_or_kill_inferior): Remove.
279 (print_started_pid): Likewise.
280 (print_attached_pid): Likewise.
281 (detach_or_kill_for_exit): Update.
282 (process_serial_event): Likewise.
283 * linux-arm-low.c (arm_new_fork): Likewise.
284
c9cb8905
SM
2852017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
286
287 * dll.h: Include <list>.
288 (struct dll_info): Add constructor.
289 <entry>: Remove field.
290 (all_dlls): Change type to std::list<dll_info>.
291 * dll.c: Include <algorithm>.
292 (get_dll): Remove macro.
293 (all_dlls): Change type to std::list<dll_info *>.
294 (free_one_dll): Remove.
295 (match_dll): Likewise.
296 (loaded_dll): Adjust.
297 (unloaded_dll): Adjust to all_dlls type change, use
298 std::find_if. Inline code from match_dll.
299 (clear_dlls): Adjust to all_dlls type change.
300 * server.c (emit_dll_description): Remove.
301 (handle_qxfer_libraries): Adjust to all_dlls type change,
302 integrate emit_dll_description's functionality.
303
04ec7890
SM
3042017-10-12 Simon Marchi <simon.marchi@ericsson.com>
305
306 * linux-low.h (struct linux_target_ops) <delete_process>: New
307 field.
308 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
309 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
310 (struct linux_target_ops): Add delete_process callback.
311 * linux-arm-low.c (arm_delete_process): New.
312 (struct linux_target_ops): Add delete_process callback.
313 * linux-bfin-low.c (struct linux_target_ops): Likewise.
314 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
315 * linux-m32r-low.c (struct linux_target_ops): Likewise.
316 * linux-mips-low.c (mips_linux_delete_process): New.
317 (struct linux_target_ops): Add delete_process callback.
318 * linux-ppc-low.c (struct linux_target_ops): Likewise.
319 * linux-s390-low.c (struct linux_target_ops): Likewise.
320 * linux-sh-low.c (struct linux_target_ops): Likewise.
321 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
322 * linux-tile-low.c (struct linux_target_ops): Likewise.
323 * linux-x86-low.c (x86_linux_delete_process): New.
324 (struct linux_target_ops): Add delete_process callback.
325 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
326
466eecee
SM
3272017-10-12 Simon Marchi <simon.marchi@ericsson.com>
328
329 * linux-aarch64-low.c (the_low_target): Add thread delete
330 callback.
331 * linux-arm-low.c (arm_delete_thread): New function.
332 (the_low_target): Add thread delete callback.
333 * linux-bfin-low.c (the_low_target): Likewise.
334 * linux-crisv32-low.c (the_low_target): Likewise.
335 * linux-low.c (delete_lwp): Invoke delete_thread callback if
336 set.
337 * linux-low.h (struct linux_target_ops) <delete_thread>: New
338 field.
339 * linux-m32r-low.c (the_low_target): Add thread delete callback.
340 * linux-mips-low.c (mips_linux_delete_thread): New function.
341 (the_low_target): Add thread delete callback.
342 * linux-ppc-low.c (the_low_target): Likewise.
343 * linux-s390-low.c (the_low_target): Likewise.
344 * linux-sh-low.c (the_low_target): Likewise.
345 * linux-tic6x-low.c (the_low_target): Likewise.
346 * linux-tile-low.c (the_low_target): Likewise.
347 * linux-x86-low.c (the_low_target): Likewise.
348 * linux-xtensa-low.c (the_low_target): Likewise.
349
b79f7801
YZ
3502017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
351
352 * win32-low.c: Include "common-inferior.h".
353
bc3b087d
SDJ
3542017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
355
356 * inferiors.c (set_inferior_cwd): New function.
357 * server.c (handle_general_set): Handle QSetWorkingDir packet.
358 (handle_query): Inform that QSetWorkingDir is supported.
359 * win32-low.c (create_process): Pass the inferior's cwd to
360 CreateProcess.
361
d092c5a2
SDJ
3622017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
363
364 * inferiors.c (current_inferior_cwd): New global variable.
365 (get_inferior_cwd): New function.
366 * inferiors.h (struct process_info) <cwd>: New field.
367
7da0a886
SDJ
3682017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
369
370 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
371 (OBS): Add gdb_tilde_expand.o.
372
289a6840
SM
3732017-10-02 Simon Marchi <simon.marchi@ericsson.com>
374
375 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
376 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
377
256642e8
PA
3782017-09-29 Pedro Alves <palves@redhat.com>
379
380 * ax.c (gdb_parse_agent_expr): Constify.
381 * ax.h (gdb_parse_agent_expr): Constify.
382 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
383 Constify.
384 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
385 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
386 * remote-utils.h (read_ptid): Constify.
387 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
388 (process_point_options, process_serial_event): Constify.
389 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
390 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
391 (cmd_qtbuffer): Constify.
392
5b9ca4d4
PA
3932017-09-29 Pedro Alves <palves@redhat.com>
394
395 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
396 fails.
397
94c207e0
PA
3982017-09-29 Pedro Alves <palves@redhat.com>
399
400 * linux-low.c (handle_extended_wait): Pass parent thread instead
401 of process to thread_db_notice_clone.
402 * linux-low.h (thread_db_notice_clone): Replace parent process
403 parameter with parent thread parameter.
404 * thread-db.c (find_one_thread): Add comment.
405 (thread_db_notice_clone): Replace parent process parameter with
406 parent thread parameter. Temporarily switch to the parent thread.
407
75352e28
SDJ
4082017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
409
410 * gdbthread.h: Include "common-gdbthread.h".
411 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
412 "if" when validating the ptid.
413 * remote-utils.c: Include "gdbthread.h".
414 (prepare_resume_reply): Use "switch_to_thread".
415 * target.c (done_accessing_memory): Likewise.
416
ad339634
AA
4172017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
418
419 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
420 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
421 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
422 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
423 s390x-gs-linux64-ipa.o to ipa_obj.
424 * linux-s390-low.c (HWCAP_S390_GS): New define.
425 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
426 New functions.
427 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
428 (s390_arch_setup): Check for guarded-storage support and choose
429 appropriate tdesc.
430 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
431 init_registers_s390x_gs_linux64.
432 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
433 enum value.
434 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
435 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
436
cc4d742f
SM
4372017-09-22 Simon Marchi <simon.marchi@ericsson.com>
438
439 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
440
f6327dcb
KB
4412017-09-21 Kevin Buettner <kevinb@redhat.com>
442
443 * linux-low.h (struct lwp_info): Add new field, thread_handle.
444 (thread_db_thread_handle): Declare.
445 * linux-low.c (linux_target_ops): Initialize thread_handle.
446 * server.c (handle_qxfer_threads_worker): Add support for
447 "handle" attribute.
448 * target.h (struct target_ops): Add new function pointer,
449 thread_handle.
450 (target_thread_handle): Define.
451 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
452 field in lwp.
453 (thread_db_thread_handle): New function.
454
86299109
KB
4552017-09-21 Kevin Buettner <kevinb@redhat.com>
456
457 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
458 * linux-low.h (thread_db_notice_clone): Declare.
459 * thread-db.c (thread_db_notice_clone): New function.
460
f557a88a
PA
4612017-09-21 Pedro Alves <palves@redhat.com>
462
463 * server.c (gdb_read_memory, handle_status, process_serial_event)
464 (handle_serial_event, handle_target_event): Adjust to
465 set_desired_thread prototype change.
466 * target.c (set_desired_thread): Remove 'use_general' parameter
467 and adjust.
468 * target.h (set_desired_thread): Remove 'use_general' parameter.
469
223ffa71
TT
4702017-09-20 Tom Tromey <tom@tromey.com>
471
472 * target.c (target_terminal::terminal_state): Define.
473 (target_terminal::init): Rename from target_terminal_init.
474 (target_terminal::inferior): Rename from
475 target_terminal_inferior.
476 (target_terminal::ours): Rename from target_terminal_ours.
477 (target_terminal::ours_for_output, target_terminal::info): New.
478
04fd3ba9
SM
4792017-09-16 Simon Marchi <simon.marchi@ericsson.com>
480
481 * server.c (accumulate_file_name_length): Remove.
482 (emit_dll_description): Adjust to std::string change.
483 (handle_qxfer_libraries): Use std::string to hold document.
484
5e187554
SM
4852017-09-16 Simon Marchi <simon.marchi@ericsson.com>
486
487 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
488 return type of xml_escape_text.
489 * server.c (emit_dll_description): Likewise.
490
1526853e
SM
4912017-09-16 Simon Marchi <simon.marchi@ericsson.com>
492
493 * server.c (captured_main): Accept argument for --selftest.
494 Update run_tests call.
495 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
496 when registering selftests.
497
c4dfafab
SDJ
4982017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
499
500 * regcache.c (get_thread_regcache): Update code to use "std::vector"
501 instead of "VEC" for "target_desc.reg_defs".
502 (regcache_cpy): Likewise.
503 (registers_to_string): Likewise.
504 (registers_from_string): Likewise.
505 (find_regno): Likewise.
506 (supply_regblock): Likewise.
507 (regcache_raw_read_unsigned): Likewise.
508 * tdesc.c (init_target_desc): Likewise.
509 (tdesc_create_reg): Likewise.
510 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
511 (struct target_desc) <reg_defs>: Convert to "std::vector".
512 (target_desc): Do not initialize "reg_defs".
513 (~target_desc): Update code to use "std::vector" instead of "VEC"
514 for "target_desc.reg_defs".
515 (operator==): Likewise.
516
124aceb4
SM
5172017-09-15 Simon Marchi <simon.marchi@ericsson.com>
518
519 * inferiors.h (thread_to_gdb_id): Remove.
520 * inferiors.c (thread_to_gdb_id): Remove.
521 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
522 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
523 lynx_store_registers, lynx_read_memory, lynx_write_memory):
524 Likewise.
525 * nto-low.c (nto_fetch_registers, nto_store_registers,
526 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
527
96cde54f
SM
5282017-09-15 Simon Marchi <simon.marchi@ericsson.com>
529
530 * inferiors.h (gdb_id_to_thread_id): Remove.
531 * inferiors.c (gdb_id_to_thread_id): Remove.
532 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
533 removal. Move pid declaration closer to where it's used.
534
e8ca139e
SM
5352017-09-15 Simon Marchi <simon.marchi@ericsson.com>
536
537 * server.c (handle_detach): New function.
538 (process_serial_event): Move code out, call handle_detach.
539
f8a4e119
SM
5402017-09-15 Simon Marchi <simon.marchi@ericsson.com>
541
542 * server.c (require_running): Rename to ...
543 (require_running_or_return): ... this ...
544 (require_running_or_break): ... and this.
545 (handle_query, process_serial_event): Adjust.
546
0eb0a407
SM
5472017-09-15 Simon Marchi <simon.marchi@ericsson.com>
548
549 * linux-low.c (linux_set_resume_request): Remove unused
550 variables.
551
785922a5
SM
5522017-09-15 Simon Marchi <simon.marchi@ericsson.com>
553
554 * server.c (first_thread_of): Remove.
555 (process_serial_event): Replace usage of first_thread_of with
556 find_any_thread_of_pid.
557 * tracepoint.c (same_process_p): Remove.
558 (gdb_agent_about_to_close): Replace usage of same_process_p with
559 find_any_thread_of_pid.
560 * linux-x86-low.c (same_process_callback): Remove.
561 (x86_arch_setup_process_callback): Replace usage of
562 same_process_callback with find_any_thread_of_pid.
563 * thread-db.c (any_thread_of): Remove.
564 (switch_to_process): Replace usage of any_thread_of with
565 find_any_thread_of_pid.
566 * inferiors.c (thread_pid_matches_callback): Remove.
567 (find_thread_process): Adjust to use find_any_thread_of_pid.
568
a059f00c
SDJ
5692017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
570
571 * regcache.c (get_thread_regcache): Guard calls to "memset"
572 with "!VEC_empty".
573
cc397f3a
SDJ
5742017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
575
576 * linux-low.c (handle_extended_wait): Use
577 "allocate_target_description" instead of "XNEW".
578 * linux-x86-low.c (initialize_low_arch): Likewise.
579
22916b07
YQ
5802017-09-05 Yao Qi <yao.qi@linaro.org>
581
582 * configure.srv (srv_i386_regobj): Remove.
583 (srv_amd64_regobj): Remove.
584 (srv_regobj): Set it to "" for x86 non-linux targets.
585 * linux-x86-tdesc.c (i386_linux_read_description):
586 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
587 (init_registers_i386): Remove the declaration.
588 (tdesc_i386): Remove the declaration.
589 (lynx_i386_arch_setup): Call i386_create_target_description.
590 * nto-x86-low.c: Likewise.
591 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
592 [!__x86_64__]: include arch/i386.h.
593 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
594
38602d55
YQ
5952017-09-05 Yao Qi <yao.qi@linaro.org>
596
597 * configure.srv (srv_amd64_linux_xmlfiles): Remove
598 i386/amd64-XXX-linux from it.
599
44b886ff
YQ
6002017-09-05 Yao Qi <yao.qi@linaro.org>
601
602 * configure.srv: Empty srv_amd64_linux_regobj if $development is
603 false.
604 (ipa_amd64_linux_regobj): Remove.
605 (ipa_x32_linux_regobj): Remove.
606
b4570e4b
YQ
6072017-09-05 Yao Qi <yao.qi@linaro.org>
608
609 * Makefile.in (arch-amd64.o): New rule.
610 * configure.srv: Append arch-amd64.o.
611 * linux-amd64-ipa.c: Include common/x86-xstate.h.
612 (get_ipa_tdesc): Call amd64_linux_read_description.
613 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
614 and init_registers_amd64_XXX.
615 * linux-x86-low.c (x86_linux_read_description): Call
616 amd64_linux_read_description.
617 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
618 (initialize_low_arch): Don't call init_registers_x32_XXX and
619 init_registers_amd64_XXX.
620 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
621 and tdesc_amd64_XXX.
622 [__x86_64__] (amd64_tdesc_test): New function.
623 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
624 and init_registers_amd64_XXX.
625 * linux-x86-tdesc.c: Include arch/amd64.h.
626 (xcr0_to_tdesc_idx): New function.
627 (i386_linux_read_description): New function.
628 (amd64_get_ipa_tdesc_idx): New function.
629 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
630 (amd64_get_ipa_tdesc): Declare.
631
d1f28ea2
YQ
6322017-09-05 Yao Qi <yao.qi@linaro.org>
633
634 * configure.srv (srv_i386_linux_xmlfiles): Remove
635 i386/i386-XXX-linux.xml from it.
636
25a93583
YQ
6372017-09-05 Yao Qi <yao.qi@linaro.org>
638
639 * configure.srv: Set srv_i386_linux_regobj empty if $development
640 is false.
641 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
642 initialize_low_tdesc.
643 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
644 with #if initialize_low_tdesc.
645 * linux-x86-tdesc-selftest.c: New file.
646 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
647
5f035c07
YQ
6482017-09-05 Yao Qi <yao.qi@linaro.org>
649
650 * Makefile.in (arch-i386.o): New rule.
651 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
652 (x86_64-*-linux*): Likewise.
653 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
654 include arch/i386.h.
655 (i386_linux_read_description): Remove code and call
656 i386_create_target_description.
657 * tdesc.c (allocate_target_description): New function.
658 * tdesc.h (set_tdesc_architecture): Remove declaration.
659 (set_tdesc_osabi): Likewise.
660
0abe8a89
YQ
6612017-09-05 Yao Qi <yao.qi@linaro.org>
662
663 * linux-x86-tdesc.c: Don't include <inttypes.h>.
664 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
665 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
666 .xmltarget.
667 * server.c (get_features_xml): Call tdesc_get_features_xml.
668 * tdesc.c (set_tdesc_architecture): New function.
669 (set_tdesc_osabi): New function.
670 (tdesc_get_features_xml): New function.
671 (tdesc_create_feature): Add an argument.
672 * tdesc.h (struct target_desc) <features>: New field.
673 <arch, osabi>: New field.
674 (~target_desc): xfree features, arch, and osabi.
675 (target_desc::oerator==): Don't compare .xmltarget.
676 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
677 (set_tdesc_osabi): Likewise.
678 (tdesc_get_features_xml): Likewise.
679
0a188386
YQ
6802017-09-05 Yao Qi <yao.qi@linaro.org>
681
682 * linux-x86-tdesc.c: Include selftest.h.
683 (i386_tdesc_test): New function.
684 (initialize_low_tdesc): Call selftests::register_test.
685 * tdesc.h: Include regdef.h.
686 (target_desc): Override operator == and !=.
687
f49ff000
YQ
6882017-09-05 Yao Qi <yao.qi@linaro.org>
689
690 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
691 (ipa_obj): Likewise.
692 * linux-i386-ipa.c: Include common/x86-xstate.h
693 (get_ipa_tdesc): Call i386_linux_read_description.
694 (initialize_low_tracepoint): Don't call init_registers_XXX
695 functions, call initialize_low_tdesc instead.
696 * linux-x86-low.c (x86_linux_read_description): Call
697 i386_linux_read_description.
698 (initialize_low_arch): Don't call init_registers_i386_XXX
699 functions, call initialize_low_tdesc.
700 * linux-x86-tdesc.c: New file.
701 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
702 (i386_get_ipa_tdesc_idx): Declare.
703 (i386_get_ipa_tdesc): Declare.
704 (initialize_low_tdesc): Declare.
705
2b68ef2f
YQ
7062017-09-05 Yao Qi <yao.qi@linaro.org>
707
708 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
709 instead of 0.
710
f7000548
YQ
7112017-09-05 Yao Qi <yao.qi@linaro.org>
712
713 * Makefile.in (IPA_OBJS): Add vec-ipa.o
714 * regcache.c (get_thread_regcache): Use VEC_length.
715 (init_register_cache): Likewise.
716 (regcache_cpy): Likewise.
717 (registers_to_string): Iterate reg_defs via VEC_iterate.
718 (find_regno): Likewise.
719 (find_register_by_number): Use VEC_index.
720 (register_size): Call find_register_by_number.
721 (register_data): Call find_register_by_number.
722 (supply_regblock): Use VEC_length.
723 (regcache_raw_read_unsigned): Likewise.
724 * tdesc.c (init_target_desc): Iterate reg_defs via
725 VEC_iterate.
726 (default_description): Update initializer.
727 (copy_target_description): Don't update field num_registers.
728 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
729 <num_registers>: Remove.
730
50a421ac
SM
7312017-09-04 Simon Marchi <simon.marchi@ericsson.com>
732
733 * Makefile.in (.SECONDARY): Define target.
734
23fdd69e
SM
7352017-09-03 Simon Marchi <simon.marchi@ericsson.com>
736
737 * linux-low.c (linux_wait_1): Adjust.
738 * server.c (queue_stop_reply_callback): Adjust.
739
0a2dde4a
SDJ
7402017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
741
742 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
743 QEnvironmentUnset and QEnvironmentReset packets.
744 (handle_query): Inform remote that QEnvironmentHexEncoded,
745 QEnvironmentUnset and QEnvironmentReset are supported.
746
6afd337d
SM
7472017-08-25 Simon Marchi <simon.marchi@ericsson.com>
748
749 * inferiors.h (inferior_target_data): Rename to ...
750 (thread_target_data): ... this.
751 (inferior_regcache_data): Rename to ...
752 (thread_regcache_data): ... this.
753 (set_inferior_regcache_data): Rename to ...
754 (set_thread_regcache_data): ... this.
755 * inferiors.c (inferior_target_data): Rename to ...
756 (thread_target_data): ... this.
757 (inferior_regcache_data): Rename to ...
758 (thread_regcache_data): ... this.
759 (set_inferior_regcache_data): Rename to ...
760 (set_thread_regcache_data): ... this.
761 (free_one_thread): Update.
762 * linux-low.h (get_thread_lwp): Update.
763 * regcache.c (get_thread_regcache): Update.
764 (regcache_invalidate_thread): Update.
765 (free_register_cache_thread): Update.
766 * win32-i386-low.c (update_debug_registers_callback): Update.
767 (win32_get_current_dr): Update.
768 * win32-low.c (thread_rec): Update.
769 (delete_thread_info): Update.
770 (continue_one_thread): Update.
771 (suspend_one_thread): Update.
772
a160cc46
SM
7732017-08-24 Simon Marchi <simon.marchi@ericsson.com>
774
775 * inferiors.c (set_inferior_target_data): Remove.
776 * inferiors.h (set_inferior_target_data): Remove.
777
6d580b63
YQ
7782017-08-18 Yao Qi <yao.qi@linaro.org>
779
780 * Makefile.in (OBS): Add selftest.o.
781 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
782 * configure, config.in: Re-generated.
783 * server.c: Include common/sefltest.h.
784 (captured_main): Handle option --selftest.
785
f5a29eb0
YQ
7862017-08-09 Yao Qi <yao.qi@linaro.org>
787
788 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
789 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
790 i386-avx-mpx.o and i386-mmx.o.
791 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
792 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
793 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
794 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
795 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
796 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
797 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
798 i386/amd64-avx-mpx.xml.
799
57757c2f
YQ
8002017-08-09 Yao Qi <yao.qi@linaro.org>
801
802 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
803 and x32-avx-avx512.o.
804 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
805 i386/x32-avx-avx512.xml.
806
229d26fc
SM
8072017-07-26 Simon Marchi <simon.marchi@ericsson.com>
808
809 * tracepoint.h (enum class fast_tpoint_collect_result): New
810 enumeration.
811 (fast_tracepoint_collecting): Change return type to
812 fast_tpoint_collect_result.
813 * tracepoint.c (fast_tracepoint_collecting): Likewise.
814 * linux-low.h: Include tracepoint.h.
815 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
816 fast_tpoint_collect_result.
817 * linux-low.c (handle_tracepoints): Adjust.
818 (linux_fast_tracepoint_collecting): Change return type to
819 fast_tpoint_collect_result.
820 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
821 linux_wait_1, stuck_in_jump_pad_callback,
822 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
823 proceed_one_lwp): Adjust to type change.
824
2e1e43e1
YQ
8252017-07-10 Yao Qi <yao.qi@linaro.org>
826
827 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
828
adc764e7
YQ
8292017-06-29 Yao Qi <yao.qi@linaro.org>
830
831 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
832 Remove.
833 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
834
a206891a
SM
8352017-06-20 Simon Marchi <simon.marchi@ericsson.com>
836
837 * Makefile.in (IPA_OBJS): Sort and format one item per line.
838
9a6c7d9c
SDJ
8392017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
840
841 * linux-low.c (linux_create_inferior): Adjust code to access the
842 environment information via 'gdb_environ' class.
843 * lynx-low.c (lynx_create_inferior): Likewise.
844 * server.c (our_environ): Make it an instance of 'gdb_environ'.
845 (get_environ): Return a pointer to 'our_environ'.
846 (captured_main): Initialize 'our_environ'.
847 * server.h (get_environ): Adjust prototype.
848 * spu-low.c (spu_create_inferior): Adjust code to access the
849 environment information via 'gdb_environ' class.
850
ae3e2ccf
SM
8512017-06-17 Simon Marchi <simon.marchi@ericsson.com>
852
853 * linux-low.c (linux_read_memory, linux_write_memory): Remove
854 usage of "register" keyword.
855
3e019bdc
SM
8562017-06-17 Simon Marchi <simon.marchi@ericsson.com>
857
858 * configure: Re-generate.
859
8465943a
SM
8602017-06-17 Simon Marchi <simon.marchi@ericsson.com>
861
862 * configure: Re-generate.
863
cf0dd6f0
SM
8642017-06-17 Simon Marchi <simon.marchi@ericsson.com>
865
866 * Makefile.in (COMPILE.pre): Add "-x c++".
867
9845682b
SDJ
8682017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
869
870 * fork-child.c: Conditionally include <signal.h>.
871
aefd8b33
SDJ
8722017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
873
874 * server.c (handle_general_set): Handle new packet
875 "QStartupWithShell".
876 (handle_query): Add "QStartupWithShell" to the list of supported
877 packets.
878 (gdbserver_usage): Add help text explaining the
879 new "--startup-with-shell" and "--no-startup-with-shell" CLI
880 options.
881 (captured_main): Recognize and act upon the presence of the new
882 CLI options.
883
2090129c
SDJ
8842017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
885 Pedro Alves <palves@redhat.com>
886
887 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
888 * configure: Regenerate.
889 * configure.srv (srv_linux_obj): Add "fork-child.o" and
890 "fork-inferior.o".
891 (i[34567]86-*-lynxos*): Likewise.
892 (spu*-*-*): Likewise.
893 * fork-child.c: New file.
894 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
895 and "environ.h".
896 (linux_ptrace_fun): New function.
897 (linux_create_inferior): Adjust function prototype to reflect
898 change on "target.h". Adjust function code to use
899 "fork_inferior".
900 (linux_request_interrupt): Delete "signal_pid".
901 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
902 (lynx_ptrace_fun): New function.
903 (lynx_create_inferior): Adjust function prototype to reflect
904 change on "target.h". Adjust function code to use
905 "fork_inferior".
906 * nto-low.c (nto_create_inferior): Adjust function prototype and
907 code to reflect change on "target.h". Update comments.
908 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
909 "common-terminal.h" and "environ.h".
910 (terminal_fd): Moved to fork-child.c.
911 (old_foreground_pgrp): Likewise.
912 (restore_old_foreground_pgrp): Likewise.
913 (last_status): Make it global.
914 (last_ptid): Likewise.
915 (our_environ): New variable.
916 (startup_with_shell): Likewise.
917 (program_name): Likewise.
918 (program_argv): Rename to...
919 (program_args): ...this.
920 (wrapper_argv): New variable.
921 (start_inferior): Delete function.
922 (get_exec_wrapper): New function.
923 (get_exec_file): Likewise.
924 (get_environ): Likewise.
925 (prefork_hook): Likewise.
926 (post_fork_inferior): Likewise.
927 (postfork_hook): Likewise.
928 (postfork_child_hook): Likewise.
929 (handle_v_run): Update code to deal with arguments coming from the
930 remote host. Update calls from "start_inferior" to
931 "create_inferior".
932 (captured_main): Likewise. Initialize environment variable. Call
933 "have_job_control".
934 * server.h (post_fork_inferior): New prototype.
935 (get_environ): Likewise.
936 (last_status): Declare.
937 (last_ptid): Likewise.
938 (signal_pid): Likewise.
939 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
940 (spu_ptrace_fun): New function.
941 (spu_create_inferior): Adjust function prototype to reflect change
942 on "target.h". Adjust function code to use "fork_inferior".
943 * target.c (target_terminal_init): New function.
944 (target_terminal_inferior): Likewise.
945 (target_terminal_ours): Likewise.
946 * target.h: Include <vector>.
947 (struct target_ops) <create_inferior>: Update prototype.
948 (create_inferior): Update macro.
949 * utils.c (gdb_flush_out_err): New function.
950 * win32-low.c (win32_create_inferior): Adjust function prototype
951 and code to reflect change on "target.h".
952
043a4934
SDJ
9532017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
954
955 * inferiors.c (switch_to_thread): New function.
956
15652511
SDJ
9572017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
958
959 * Makefile.in (SFILE): Add "common/job-control.c".
960 (OBS): Add "job-control.o".
961
21ea5acd
SDJ
9622017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
963
964 * Makefile: Remove "@host_makefile_frag@".
965
e13cb306
PA
9662017-05-05 Pedro Alves <palves@redhat.com>
967
968 * configure: Regenerate.
969
c94fee56
SDJ
9702017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
971
972 * configure: Regenerate.
973
a0ff9e1a
SM
9742017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
975
976 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
977 software_single_step change of return type to
978 std::vector<CORE_ADDR>.
979 * linux-low.c (install_software_single_step_breakpoints):
980 Likewise.
981 * linux-low.h (install_software_single_step_breakpoints):
982 Likewise.
983
be628ab8
SDJ
9842017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
985
986 * remote-utils.c: Include "gdb_termios.h" instead of
987 "terminal.h".
988 * terminal.h: Delete file.
989
7c5ded6a
SDJ
9902017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
991
992 * server.c: Include <vector>.
993 <program_argv, wrapper_argv>: Convert to std::vector.
994 (start_inferior): Rewrite function to use C++.
995 (handle_v_run): Likewise. Update code that calculates the argv
996 based on the vRun packet; use C++.
997 (captured_main): Likewise.
998
436252de
SM
9992017-04-06 Simon Marchi <simon.marchi@ericsson.com>
1000
1001 * server.c (handle_v_cont): Initialize thread_resume::thread
1002 with null_ptid.
1003
9bf2a700
PA
10042017-04-05 Pedro Alves <palves@redhat.com>
1005
1006 * configure: Regenerate.
1007
a121b7c1
PA
10082017-04-05 Pedro Alves <palves@redhat.com>
1009
1010 * gdbreplay.c (sync_error): Constify.
1011 * linux-x86-low.c (push_opcode): Constify.
1012
21c8a587
PA
10132017-04-05 Pedro Alves <palves@redhat.com>
1014
1015 * win32-low.c (get_child_debug_event)
1016 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
1017 Report TARGET_WAITKIND_SPURIOUS instead.
1018
fb32b4f7
PA
10192017-04-05 Pedro Alves <palves@redhat.com>
1020
1021 * remote-utils.c (remote_prepare, remote_open): Constify.
1022 * remote-utils.h (remote_prepare, remote_open): Constify.
1023 * server.c (captured_main): Constify 'port' handling.
1024
65dd1e59
SM
10252017-04-04 Simon Marchi <simon.marchi@ericsson.com>
1026
1027 * Makefile.in (clean): Clear .deps.
1028
8fa5b777
SM
10292017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
1030
1031 * .gitignore: Remove generated files, replace with wildcard.
1032 * (clean): Replace removal of generated files with wildcard.
1033 (version.c): Replace with...
1034 (version-generated.c): ...this.
1035 (xml-builtin.c): Replace with...
1036 (xml-builtin-generated.c): ...this.
1037 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
1038 (%.c: *regformats*): Replace with...
1039 (%-generated.c: *regformats*): ...this.
1040
a12e714b
MF
10412017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1042
1043 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
1044 (xtensa_fill_gregset): Call collect_register_by_name for
1045 threadptr register.
1046 (xtensa_store_gregset): Call supply_register_by_name for
1047 threadptr register.
1048
1a09b50a
MF
10492017-03-27 Max Filippov <jcmvbkbc@gmail.com>
1050
1051 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
1052 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
1053 (xtensa_store_gregset): Call supply_register for all registers in
1054 a0_regnum..a0_regnum + C0_NREGS range.
1055
1a01e7c6
SM
10562017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1057
1058 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1059 (ax-ipa.o: ax.c): Remove.
1060 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1061 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1062 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1063 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1064 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1065
36bc18a8
SM
10662017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1067
1068 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1069 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1070 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1071 (errors-ipa.o: ../common/errors.c): Remove.
1072 (format-ipa.o: ../common/format.c): Remove.
1073 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1074
a8ebe3d5
SM
10752017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1076
1077 * Makefile.in (%-ipa.o: %.c): New rule.
1078 (tracepoint-ipa.o: tracepoint.c): Remove.
1079 (utils-ipa.o: utils.c): Remove.
1080 (remote-utils-ipa.o: remote-utils.c): Remove.
1081 (regcache-ipa.o: regcache.c): Remove.
1082 (i386-linux-ipa.o: i386-linux.c): Remove.
1083 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1084 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1085 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1086 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1087 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1088 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1089 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1090 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1091 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1092 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1093 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1094 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1095 (aarch64-ipa.o: aarch64.c): Remove.
1096 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1097 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1098 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1099 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1100 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1101 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1102 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1103 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1104 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1105 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1106 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1107 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1108 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1109 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1110 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1111 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1112 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1113 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1114 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1115 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1116 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1117 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1118 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1119 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1120 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1121 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1122 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1123 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1124 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1125 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1126 (tdesc-ipa.o: tdesc.c): Remove.
1127 (x32-linux-ipa.o: x32-linux.c): Remove.
1128 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1129 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1130
50cfacb7
SM
11312017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1132
1133 * Makefile.in (%.o: ../arch/%.c): New rule.
1134 (arm.o: ../arch/arm.c): Remove.
1135 (arm-linux.o: ../arch/arm-linux.c): Remove.
1136 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1137 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1138
c5a22423
SM
11392017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1140
1141 * Makefile.in (%.o: ../nat/%.c): New rule.
1142 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1143 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1144 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1145 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1146 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1147 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1148 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1149 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1150 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1151 (linux-personality.o: ../nat/linux-personality.c): Remove.
1152 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1153 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1154 (x86-linux.o: ../nat/x86-linux.c): Remove.
1155 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1156 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1157
6bda016b
SM
11582017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1159
1160 * Makefile.in (%.o: ../common/%.c): New rule.
1161 (signals.o: ../common/signals.c): Remove.
1162 (print-utils.o: ../common/print-utils.c): Remove.
1163 (rsp-low.o: ../common/rsp-low.c): Remove.
1164 (common-utils.o: ../common/common-utils.c): Remove.
1165 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1166 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1167 (vec.o: ../common/vec.c): Remove.
1168 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1169 (xml-utils.o: ../common/xml-utils.c): Remove.
1170 (ptid.o: ../common/ptid.c): Remove.
1171 (buffer.o: ../common/buffer.c): Remove.
1172 (format.o: ../common/format.c): Remove.
1173 (filestuff.o: ../common/filestuff.c): Remove.
1174 (agent.o: ../common/agent.c): Remove.
1175 (errors.o: ../common/errors.c): Remove.
1176 (environ.o: ../common/environ.c): Remove.
1177 (common-debug.o: ../common/common-debug.c): Remove.
1178 (cleanups.o: ../common/cleanups.c): Remove.
1179 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1180 (fileio.o: ../common/fileio.c): Remove.
1181 (common-regcache.o: ../common/common-regcache.c): Remove.
1182 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1183 (new-op.o: ../common/new-op.c): Remove.
1184 (btrace-common.o: ../common/btrace-common.c): Remove.
1185
21122961
SM
11862017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1187
1188 * Makefile.in (%.o: ../target/%.c): New rule.
1189 (waitstatus.o: ../target/waitstatus.c): Remove.
1190
c362e621
SM
11912017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1192
1193 * Makefile.in
1194 (%.c: ../regformats/%.dat,
1195 (%.c: ../regformats/arm/%.dat,
1196 (%.c: ../regformats/i386/%.dat,
1197 (%.c: ../regformats/rs6000/%.dat): New rules.
1198 (aarch64.c): Remove.
1199 (reg-arm.c): Remove.
1200 (arm-with-iwmmxt.c): Remove.
1201 (arm-with-vfpv2.c): Remove.
1202 (arm-with-vfpv3.c): Remove.
1203 (arm-with-neon.c): Remove.
1204 (reg-bfin.c): Remove.
1205 (reg-cris.c): Remove.
1206 (reg-crisv32.c): Remove.
1207 (i386.c): Remove.
1208 (i386-linux.c): Remove.
1209 (i386-avx.c): Remove.
1210 (i386-avx-linux.c): Remove.
1211 (i386-avx-avx512.c): Remove.
1212 (i386-avx-avx512-linux.c): Remove.
1213 (i386-mpx.c): Remove.
1214 (i386-mpx-linux.c): Remove.
1215 (i386-avx-mpx-avx512-pku.c): Remove.
1216 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1217 (i386-avx-mpx.c): Remove.
1218 (i386-avx-mpx-linux.c): Remove.
1219 (i386-mmx.c): Remove.
1220 (i386-mmx-linux.c): Remove.
1221 (reg-ia64.c): Remove.
1222 (reg-m32r.c): Remove.
1223 (reg-m68k.c): Remove.
1224 (reg-cf.c): Remove.
1225 (mips-linux.c): Remove.
1226 (mips-dsp-linux.c): Remove.
1227 (mips64-linux.c): Remove.
1228 (mips64-dsp-linux.c): Remove.
1229 (nios2-linux.c): Remove.
1230 (powerpc-32.c): Remove.
1231 (powerpc-32l.c): Remove.
1232 (powerpc-altivec32l.c): Remove.
1233 (powerpc-cell32l.c): Remove.
1234 (powerpc-vsx32l.c): Remove.
1235 (powerpc-isa205-32l.c): Remove.
1236 (powerpc-isa205-altivec32l.c): Remove.
1237 (powerpc-isa205-vsx32l.c): Remove.
1238 (powerpc-e500l.c): Remove.
1239 (powerpc-64l.c): Remove.
1240 (powerpc-altivec64l.c): Remove.
1241 (powerpc-cell64l.c): Remove.
1242 (powerpc-vsx64l.c): Remove.
1243 (powerpc-isa205-64l.c): Remove.
1244 (powerpc-isa205-altivec64l.c): Remove.
1245 (powerpc-isa205-vsx64l.c): Remove.
1246 (s390-linux32.c): Remove.
1247 (s390-linux32v1.c): Remove.
1248 (s390-linux32v2.c): Remove.
1249 (s390-linux64.c): Remove.
1250 (s390-linux64v1.c): Remove.
1251 (s390-linux64v2.c): Remove.
1252 (s390-te-linux64.c): Remove.
1253 (s390-vx-linux64.c): Remove.
1254 (s390-tevx-linux64.c): Remove.
1255 (s390x-linux64.c): Remove.
1256 (s390x-linux64v1.c): Remove.
1257 (s390x-linux64v2.c): Remove.
1258 (s390x-te-linux64.c): Remove.
1259 (s390x-vx-linux64.c): Remove.
1260 (s390x-tevx-linux64.c): Remove.
1261 (tic6x-c64xp-linux.c): Remove.
1262 (tic6x-c64x-linux.c): Remove.
1263 (tic6x-c62x-linux.c): Remove.
1264 (reg-sh.c): Remove.
1265 (reg-sparc64.c): Remove.
1266 (reg-spu.c): Remove.
1267 (amd64.c): Remove.
1268 (amd64-linux.c): Remove.
1269 (amd64-avx.c): Remove.
1270 (amd64-avx-linux.c): Remove.
1271 (amd64-avx-avx512.c): Remove.
1272 (amd64-avx-avx512-linux.c): Remove.
1273 (amd64-mpx.c): Remove.
1274 (amd64-mpx-linux.c): Remove.
1275 (amd64-avx-mpx-avx512-pku.c): Remove.
1276 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1277 (amd64-avx-mpx.c): Remove.
1278 (amd64-avx-mpx-linux.c): Remove.
1279 (x32.c): Remove.
1280 (x32-linux.c): Remove.
1281 (x32-avx.c): Remove.
1282 (x32-avx-linux.c): Remove.
1283 (x32-avx-avx512.c): Remove.
1284 (x32-avx-avx512-linux.c): Remove.
1285 (reg-xtensa.c): Remove.
1286 (reg-tilegx.c): Remove.
1287 (reg-tilegx32.c): Remove.
1288
1672e0d9
SDJ
12892017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1290
1291 * Makefile.in (SFILES): Add "common/environ.c".
1292 (OBJS): Add "common/environ.h".
1293
239b6d10
WT
12942017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1295
1296 * configure.ac: Check if the fs_base and gs_base members of
1297 `struct user_regs_struct' exist.
1298 * config.in: Regenerated.
1299 * configure: Likewise.
1300
694b382c
AT
13012017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1302
1303 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1304 target_read_memory.
1305 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1306 (get_next_pcs_syscall_next_pc): Likewise.
1307
7dc53023
LM
13082016-12-23 Luis Machado <lgustavo@codesourcery.com>
1309
1310 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1311 * nto-x86-low.c: Likewise.
1312
ad02e4fe
SM
13132016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1314
1315 * Makefile.in: Include disable-implicit-rules.mk.
1316
dcb07cfa
PA
13172016-11-23 Pedro Alves <palves@redhat.com>
1318
1319 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1320 (debug_vprintf): Use std::chrono::steady_clock instead of
1321 gettimeofday. Use '.' instead of ':'.
1322 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1323 (get_timestamp): Use std::chrono::steady_clock instead of
1324 gettimeofday.
1325
8629c02c
SM
13262016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1327
1328 * Makefile.in: Fix whitespace formatting.
1329
b593ecca
SM
13302016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1331
1332 * Makefile.in (SFILES, OBS): Flatten list and order
1333 alphabetically.
1334
9986ba08
PA
13352016-11-23 Pedro Alves <palves@redhat.com>
1336
1337 * event-loop.c (handle_file_event): Use warning.
1338 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1339 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1340 Use warning.
1341
4eefa7bc
PA
13422016-11-23 Pedro Alves <palves@redhat.com>
1343
1344 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1345 output.
1346 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1347 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1348 debug_printf and debug_flush for debug output.
1349 * server.c (handle_general_set): Likewise.
1350 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1351 output.
1352
5443506e
SM
13532016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1354
1355 * Makefile.in (.c.o): Replace rule with ...
1356 (%.o: %.c): ... this one.
1357
3b165252
SM
13582016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1359
1360 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1361 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1362 make.
1363 * configure.ac: Remove checks for the make program.
1364 * configure: Re-generate.
1365
0bcda685
PA
13662016-10-28 Pedro Alves <palves@redhat.com>
1367
1368 * Makefile.in (CXX_DIALECT): Get from configure.
1369 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1370 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1371 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1372 * config.in: Regenerate.
1373 * configure: Regenerate.
1374
c3805894
YQ
13752016-10-27 Yao Qi <yao.qi@linaro.org>
1376
1377 * linux-low.c (linux_supports_range_stepping): Return true if
1378 can_software_single_step return true.
1379
89342618
YQ
13802016-10-27 Yao Qi <yao.qi@linaro.org>
1381
1382 * inferiors.c (find_inferior_in_random): New function.
1383 * inferiors.h (find_inferior_in_random): Declare.
1384 * linux-low.c (linux_wait_for_event_filtered): Call
1385 find_inferior_in_random instead of find_inferior.
1386
e3652c84
YQ
13872016-10-27 Yao Qi <yao.qi@linaro.org>
1388
1389 * linux-low.c (linux_wait_1): If single-step breakpoints are
1390 inserted, remove them.
1391
5a04c4cf
PA
13922016-10-26 Pedro Alves <palves@redhat.com>
1393
1394 * linux-low.c (handle_extended_wait): Link parent/child fork
1395 threads.
1396 (linux_wait_1): Unlink them.
1397 (linux_set_resume_request): Ignore resume requests for
1398 already-resumed and unhandled fork child threads.
1399 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1400 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1401 New functions.
1402 (handle_v_requests) <vCont>: Don't call require_running.
1403 * server.h (in_queued_stop_replies): New declaration.
1404
cb93dc7f
YQ
14052016-10-24 Yao Qi <yao.qi@linaro.org>
1406
1407 PR server/20733
1408 * linux-aarch64-low.c (append_insns): Cast the return value to
1409 'uint32_t *'.
1410
a1078bea
YQ
14112016-10-10 Yao Qi <yao.qi@linaro.org>
1412
1413 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1414
1fb77080
SDJ
14152016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1416
1417 * target.c (target_supports_multi_process): New function, moved
1418 from...
1419 * target.h (target_supports_multi_process): ... here. Remove
1420 macro.
1421
39b5a3b9
TT
14222016-10-05 Tom Tromey <tom@tromey.com>
1423
1424 PR remote/20655:
1425 * tracepoint.c (handle_tracepoint_bkpts): Check
1426 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1427
c1d0b70a
YQ
14282016-10-05 Yao Qi <yao.qi@linaro.org>
1429
1430 * configure.srv: Update the path of arm-*.xml files.
1431
0a69eedb
YQ
14322016-10-05 Terry Guo <terry.guo@arm.com>
1433 Yao Qi <yao.qi@linaro.org>
1434
1435 * Makefile.in: Adjust the path of rules.
1436 * configure.srv: Update the path of xml files.
1437 * regformats/arm-with-iwmmxt.dat: Regenerated.
1438 * regformats/arm-with-neon.dat: Likewise.
1439 * regformats/arm-with-vfpv2.dat: Likewise.
1440 * regformats/arm-with-vfpv3.dat Likewise.
1441
17e16485
YQ
14422016-09-30 Yao Qi <yao.qi@linaro.org>
1443
1444 PR gdbserver/20627
1445 * target.c (target_stop_and_wait): Don't call
1446 target_continue_no_signal, use resume_stop instead.
1447
edeeb602
YQ
14482016-09-26 Yao Qi <yao.qi@linaro.org>
1449
1450 * linux-low.c (linux_wait_1): Call debug_exit.
1451
503b1c39
PA
14522016-09-23 Pedro Alves <palves@redhat.com>
1453
1454 * Makefile.in (SFILES): Add common/new-op.c.
1455 (OBS): Add common/new-op.o.
1456 (new-op.o): New rule.
1457
74172ecf
SM
14582016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1459
1460 * .gitinore: Ignore more files.
1461
fc6cda2e
YQ
14622016-09-21 Yao Qi <yao.qi@linaro.org>
1463
1464 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1465 23.
1466
bc1e6c81
SDJ
14672016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1468
1469 * server.c (start_inferior): Call target_mourn_inferior instead of
1470 mourn_inferior; pass ptid_t argument to it.
1471 (resume): Likewise.
1472 (handle_target_event): Likewise.
1473 * target.c (target_mourn_inferior): New function.
1474 * target.h (mourn_inferior): Delete macro.
1475
0e00e962
AA
14762016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1477
1478 * linux-low.c (lwp_is_stepping): New function.
1479
1d8cb77d
CL
14802016-09-06 Carl Love <cel@us.ibm.com>
1481
1482 * server.c (start_inferior): Fixed comment, requested comment change
1483 didn't get updated correctly. Removed reference to ptrace () call as
1484 it is only true on Linux systems.
1485
7313bced
CL
14862016-09-06 Carl Love <cel@us.ibm.com>
1487
1488 * server.c (start_inferior): Do not call
1489 function target_post_create_inferior () if the
1490 inferior process has already exited.
1491
cf6de44d
PA
14922016-09-05 Pedro Alves <palves@redhat.com>
1493
1494 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1495 (COMPILE.pre, CC_LD): Use CXX directly.
1496 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1497 * acinclude.m4: Don't include build-with-cxx.m4.
1498 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1499 * configure: Regenerate.
1500
c1da6748
AT
15012016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1502
1503 PR gdb/19495
1504 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1505 call writing data to own_buf.
1506
f2b9e3df
SDJ
15072016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1508
1509 * target.c (mywait): Call target_wait instead of
1510 the_target->wait.
1511 (target_wait): New function.
1512
049a8570
SDJ
15132016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1514
1515 * server.c (start_inferior): New variable 'ptid'. Replace calls
1516 to the_target->resume by target_continue{,_no_signal}, depending
1517 on the case.
1518 * target.c (target_stop_and_wait): Call target_continue_no_signal
1519 instead of the_target->resume.
1520 (target_continue): New function.
1521
3aa5cfa0
AT
15222016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1523
1524 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1525
754653a7
AZ
15262016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1527
1528 PR server/20491
1529 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1530 ps_prochandle.
1531 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1532 * linux-arm-low.c (ps_get_thread_area): Likewise.
1533 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1534 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1535 * linux-mips-low.c (ps_get_thread_area): Likewise.
1536 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1537 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1538 * linux-x86-low.c (ps_get_thread_area): Likewise.
1539 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1540
ed036b40
PA
15412016-08-19 Pedro Alves <palves@redhat.com>
1542
1543 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1544
c8ef42ee
PA
15452016-08-19 Pedro Alves <palves@redhat.com>
1546
1547 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1548 comment. Use memcpy instead of casting through unsigned long.
1549
9c235a72
PA
15502016-08-19 Pedro Alves <palves@redhat.com>
1551
1552 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1553 allocating around 0x80000000.
1554
201506da
PA
15552016-08-19 Pedro Alves <palves@redhat.com>
1556
1557 PR gdb/20415
1558 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1559 (x32-avx512-linux-ipa.o): New rules.
1560 * configure.ac (x86_64-*-linux*): New x32 check.
1561 * configure.srv (ipa_x32_linux_regobj): New.
1562 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1563 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1564 descriptions.
1565 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1566 descriptions.
1567 * configure: Regenerate.
1568
f348d89a
PA
15692016-08-09 Pedro Alves <palves@redhat.com>
1570
1571 PR gdb/18653
1572 * Makefile.in (OBS): Add signals-state-save-restore.o.
1573 (signals-state-save-restore.o): New rule.
1574 * config.in: Regenerate.
1575 * configure: Regenerate.
1576 * linux-low.c: Include "signals-state-save-restore.h".
1577 (linux_create_inferior): Call
1578 restore_original_signals_state.
1579 * server.c: Include "dispositions-save-restore.h".
1580 (captured_main): Call save_original_signals_state.
1581
1baf5149
PA
15822016-08-05 Pedro Alves <palves@redhat.com>
1583
1584 * configure: Regenerate.
1585
fcd4a73d
YQ
15862016-08-04 Yao Qi <yao.qi@linaro.org>
1587
1588 * linux-low.c (regsets_fetch_inferior_registers): Check
1589 errno is ESRCH or not.
1590
979659d0
YQ
15912016-08-02 Yao Qi <yao.qi@linaro.org>
1592
1593 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1594 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1595 (thread_db_load_search): Update.
1596 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1597 td_ta_set_event and td_ta_event_getmsg.
1598
6598661d
PA
15992016-07-26 Pedro Alves <palves@redhat.com>
1600
1601 PR server/20414
1602 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1603 of unsigned long for 64-bit registers and use uint32_t instead of
1604 unsigned int for 32-bit registers.
1605
9cf12d57
PA
16062016-07-26 Pedro Alves <palves@redhat.com>
1607
1608 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1609 to 'ptrace'.
1610
305450ed
TT
16112016-07-21 Tom Tromey <tom@tromey.com>
1612
1613 * configure: Rebuild.
1614
2583da7c
YQ
16152016-07-21 Yao Qi <yao.qi@linaro.org>
1616
1617 * mem-break.c (find_gdb_breakpoint): Cast bp to
1618 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1619
21536b36
YQ
16202016-07-21 Yao Qi <yao.qi@linaro.org>
1621
1622 * server.c (handle_v_requests): Support s and S actions
1623 if target_supports_software_single_step return true.
1624
8901d193
YQ
16252016-07-21 Yao Qi <yao.qi@linaro.org>
1626
1627 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1628 is resume_step, call maybe_hw_step.
1629 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1630 and unstop them.
1631 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1632 breakpoints or not.
1633 (proceed_one_lwp): If resume request is resume_step, install
1634 reinsert breakpoints and call maybe_hw_step.
1635
0e9a339e
YQ
16362016-07-21 Yao Qi <yao.qi@linaro.org>
1637
1638 * linux-low.c (proceed_one_lwp): Declare.
1639 (linux_resume_one_thread): Remove local variable 'step'.
1640 Lift code enqueue signal. Call proceed_one_lwp instead of
1641 linux_resume_one_lwp.
1642
4281b351
YQ
16432016-07-21 Yao Qi <yao.qi@linaro.org>
1644
1645 * linux-low.c (linux_resume_one_thread): Call
1646 enqueue_pending_signal.
1647
984a2c04
YQ
16482016-07-21 Yao Qi <yao.qi@linaro.org>
1649
1650 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1651 * inferiors.c (do_restore_current_thread_cleanup): New function.
1652 (make_cleanup_restore_current_thread): Likewise.
1653 * linux-low.c (install_software_single_step_breakpoints): Call
1654 make_cleanup_restore_current_thread. Switch current_thread to
1655 thread.
1656
bec903c9
YQ
16572016-07-21 Yao Qi <yao.qi@linaro.org>
1658
1659 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1660 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1661 (clone_one_breakpoint): Likewise.
1662 (delete_reinsert_breakpoints): Change parameter to thread.
1663 Callers updated.
1664 (has_reinsert_breakpoints): Likewise.
1665 (uninsert_reinsert_breakpoints): Likewise.
1666 (reinsert_reinsert_breakpoints): Likewise.
1667 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1668 (delete_reinsert_breakpoints): Likewise.
1669 (reinsert_reinsert_breakpoints): Likewise.
1670 (uninsert_reinsert_breakpoints): Likewise.
1671 (has_reinsert_breakpoints): Likewise.
1672
63c40ec7
YQ
16732016-07-21 Yao Qi <yao.qi@linaro.org>
1674
1675 * inferiors.c (get_thread_process): Make parameter const.
1676 * inferiors.h (get_thread_process): Update declaration.
1677 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1678 Add new parameters child_thread and parent_thread. Callers
1679 updated.
1680 * mem-break.h (clone_all_breakpoints): Update declaration.
1681
9aa76cd0
YQ
16822016-07-21 Yao Qi <yao.qi@linaro.org>
1683
1684 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1685 <command_list, handler>: Remove.
1686 (struct gdb_breakpoint): New.
1687 (struct other_breakpoint): New.
1688 (struct reinsert_breakpoint): New.
1689 (is_gdb_breakpoint): New function.
1690 (any_persistent_commands): Update command_list if
1691 is_gdb_breakpoint returns true.
1692 (set_breakpoint): Create breakpoints according to their types.
1693 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1694 (set_gdb_breakpoint_1): Likewise.
1695 (set_gdb_breakpoint): Likewise.
1696 (clear_breakpoint_conditions): Change parameter type to
1697 'struct gdb_breakpoint *'.
1698 (clear_breakpoint_commands): Likewise.
1699 (clear_breakpoint_conditions_and_commands): Likewise.
1700 (add_condition_to_breakpoint): Likewise.
1701 (add_breakpoint_condition): Likewise.
1702 (add_commands_to_breakpoint): Likewise.
1703 (check_breakpoints): Check other_breakpoint.
1704 (clone_one_breakpoint): Clone breakpopint according to its type.
1705 * mem-break.h (struct gdb_breakpoint): Declare.
1706 (set_gdb_breakpoint): Update declaration.
1707 (clear_breakpoint_conditions_and_commands): Likewise.
1708 (add_breakpoint_condition): Likewise.
1709 (add_breakpoint_commands): Likewise.
1710 * server.c (process_point_options): Change parameter type to
1711 'struct gdb_breakpoint *'.
1712
811f8301
YQ
17132016-07-21 Yao Qi <yao.qi@linaro.org>
1714
1715 * mem-break.c (set_breakpoint_at): Rename it to ...
1716 (set_breakpoint_type_at): ... it.
1717 (set_breakpoint_at): Call set_breakpoint_type_at.
1718 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1719 * mem-break.h (set_breakpoint_at): Update comments.
1720
b1c51e36
CLT
17212016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1722
1723 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1724 to buf parameter.
1725 (nios2_store_gregset): Likewise.
1726
ced2dffb
PA
17272016-07-01 Pedro Alves <palves@redhat.com>
1728 Antoine Tremblay <antoine.tremblay@ericsson.com>
1729
1730 * linux-low.c: Change interface to take the target lwp_info
1731 pointer directly and return void. Handle detaching from a zombie
1732 thread.
1733 (linux_detach_lwp_callback): New function.
1734 (linux_detach): Detach from the leader thread after detaching from
1735 the clone threads.
1736
2ac09a5b
YQ
17372016-06-28 Yao Qi <yao.qi@linaro.org>
1738
1739 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1740 for variable new_offset.
1741 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1742 (aarch64_ftrace_insn_reloc_cb): Likewise.
1743 (aarch64_ftrace_insn_reloc_tb): Likewise.
1744 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1745 PRIx64 instead of PRIx32.
1746
79e7fd4f
YQ
17472016-06-28 Yao Qi <yao.qi@linaro.org>
1748
1749 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1750 (the_low_target): Install arm_get_syscall_trapinfo.
1751
061fc021
YQ
17522016-06-28 Yao Qi <yao.qi@linaro.org>
1753
1754 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1755 function.
1756 (the_low_target): Install aarch64_get_syscall_trapinfo.
1757
4cc32bec
YQ
17582016-06-28 Yao Qi <yao.qi@linaro.org>
1759
1760 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1761 Callers updated.
1762 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1763 Remove parameter sysno.
1764 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1765 sysret.
1766
782c1122
AA
17672016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1768
1769 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1770 (s390_emit_ne_goto): Likewise.
1771 (s390_emit_lt_goto): Likewise.
1772 (s390_emit_le_goto): Likewise.
1773 (s390_emit_gt_goto): Likewise.
1774 (s390_emit_ge_goto): Likewise.
1775 (s390x_emit_eq_goto): Likewise.
1776 (s390x_emit_ne_goto): Likewise.
1777 (s390x_emit_lt_goto): Likewise.
1778 (s390x_emit_le_goto): Likewise.
1779 (s390x_emit_gt_goto): Likewise.
1780 (s390x_emit_ge_goto): Likewise.
1781 (s390_emit_ops_impl): Mark variable static.
1782 (s390x_emit_ops): Likewise.
1783
2e7b624b
YQ
17842016-06-17 Yao Qi <yao.qi@linaro.org>
1785
1786 * linux-low.c (handle_extended_wait): Call
1787 uninsert_reinsert_breakpoints for the parent process. Remove
1788 reinsert breakpoints from the child process. Reinsert them to
1789 the parent process when vfork is done.
1790 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1791 (reinsert_reinsert_breakpoints): New function.
1792 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1793 (reinsert_reinsert_breakpoints): Declare.
1794
8a81c5d7
YQ
17952016-06-17 Yao Qi <yao.qi@linaro.org>
1796
1797 * linux-low.c (handle_extended_wait): If the parent is doing
1798 step-over, remove the reinsert breakpoints from the forked child.
1799
f50bf8e5
YQ
18002016-06-17 Yao Qi <yao.qi@linaro.org>
1801
1802 * linux-low.c (unsuspend_all_lwps): Declare.
1803 (linux_low_filter_event): If thread exited, call finish_step_over.
1804 If step-over is finished, unsuspend other threads.
1805
8376a3cb
YQ
18062016-06-17 Yao Qi <yao.qi@linaro.org>
1807
1808 * linux-low.c (linux_resume_one_lwp_throw): Assert
1809 has_reinsert_breakpoints returns false.
1810 * mem-break.c (delete_disabled_breakpoints): Assert
1811 bp type isn't reinsert_breakpoint.
1812
f79b145d
YQ
18132016-06-17 Yao Qi <yao.qi@linaro.org>
1814
1815 * linux-low.c (maybe_hw_step): New function.
1816 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1817 (finish_step_over): Switch current_thread to lwp temporarily,
1818 and assert has_reinsert_breakpoints returns true.
1819 (proceed_one_lwp): Call maybe_hw_step.
1820 * mem-break.c (has_reinsert_breakpoints): New function.
1821 * mem-break.h (has_reinsert_breakpoints): Declare.
1822
0ae534d2
JT
18232016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1824
1825 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1826
fcdad592
YQ
18272016-05-17 Yao Qi <yao.qi@linaro.org>
1828
1829 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1830 instead of find_inferior.
1831
9e784964
YQ
18322016-05-05 Yao Qi <yao.qi@linaro.org>
1833
1834 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1835 Initialize res to zero.
1836
cf2ebb6e
YQ
18372016-05-05 Yao Qi <yao.qi@linaro.org>
1838
1839 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1840 to uint32_t.
1841
c1aebf87
UW
18422016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1843
1844 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1845 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1846 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1847
35fd2deb 18482016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1849 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1850
1851 * tracepoint.c (write_inferior_int8): New function.
1852 (cmd_qtenable_disable): Write enable flag using
1853 write_inferior_int8.
1854
484b3c32
YQ
18552016-04-25 Yao Qi <yao.qi@linaro.org>
1856
1857 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1858 (need_step_over_p): Return zero if the LWP has pending signals
1859 can be delivered on software single step target.
1860
85ba7d86
YQ
18612016-04-25 Yao Qi <yao.qi@linaro.org>
1862
1863 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1864 return instead of error.
1865
3539aa13
YQ
18662016-04-22 Yao Qi <yao.qi@linaro.org>
1867
1868 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1869 to 23.
1870
5b061e98
YQ
18712016-04-22 Yao Qi <yao.qi@linaro.org>
1872
1873 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1874 signal when stepping over breakpoint with software single
1875 step.
1876
3451269c
PA
18772016-04-21 Pedro Alves <palves@redhat.com>
1878
1879 * linux-s390-low.c (s390_collect_ptrace_register)
1880 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1881 add casts.
1882 (s390_check_regset): Use void * instead of gdb_byte *.
1883
a2358508
PA
18842016-04-20 Pedro Alves <palves@redhat.com>
1885
1886 * configure: Renegerate.
1887
6885166d
YQ
18882016-04-20 Yao Qi <yao.qi@linaro.org>
1889
1890 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1891 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1892 number 16.
1893 (arm_store_gregset): Likewise.
1894
2b863f51
WT
18952016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1896
1897 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1898 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1899 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1900 (amd64-avx-mpx-linux.c): New rules.
1901 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1902 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1903 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1904 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1905 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1906 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1907 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1908 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1909 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1910 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1911 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1912 * linux-x86-low.c (x86_linux_read_description): Add case for
1913 X86_XSTATE_AVX_MPX_MASK.
1914 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1915 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1916 init_registers_i386_avx_mpx_linux.
1917 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1918 (initialize_low_tracepoint): Call
1919 init_registers_i386_avx_mpx_linux.
1920 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1921 (initialize_low_tracepoint): Call
1922 init_registers_amd64_avx_mpx_linux.
1923 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1924 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1925 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1926 declarations.
1927
9b30624b
PA
19282016-04-18 Pedro Alves <palves@redhat.com>
1929
1930 * configure: Regenerate.
1931
45e3745e
AT
19322016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1933
1934 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1935 (aarch64_emit_sub): Likewise.
1936
2afc13ff
PA
19372016-04-12 Pedro Alves <palves@redhat.com>
1938
1939 * utils.c (prepare_to_throw_exception): Delete.
1940
6e774b13
SM
19412016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1942
1943 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1944
4dca19f8
MK
19452016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1946
1947 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1948
d0a9981f
MK
19492016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1950
1951 * linux-aarch64-ipa.c: Add <elf.h> include.
1952 * linux-ppc-ipa.c: Add <elf.h> include.
1953 * linux-s390-ipa.c: Add <elf.h> include.
1954
252db07e
MK
19552016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1956
1957 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1958 (get_raw_reg_ptr): Likewise.
1959 (get_trace_state_variable_value_ptr): Likewise.
1960 (set_trace_state_variable_value_ptr): Likewise.
1961 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1962 char *.
1963
14e2b6d9
MK
19642016-03-31 Wei-cheng Wang <cole945@gmail.com>
1965 Marcin Kościelnicki <koriakin@0x04.net>
1966
1967 PR/17221
1968 * linux-ppc-low.c (emit_insns): New function.
1969 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1970 (ppc_emit_prologue): New function.
1971 (ppc_emit_epilogue): New function.
1972 (ppc_emit_add): New function.
1973 (ppc_emit_sub): New function.
1974 (ppc_emit_mul): New function.
1975 (ppc_emit_lsh): New function.
1976 (ppc_emit_rsh_signed): New function.
1977 (ppc_emit_rsh_unsigned): New function.
1978 (ppc_emit_ext): New function.
1979 (ppc_emit_zero_ext): New function.
1980 (ppc_emit_log_not): New function.
1981 (ppc_emit_bit_and): New function.
1982 (ppc_emit_bit_or): New function.
1983 (ppc_emit_bit_xor): New function.
1984 (ppc_emit_bit_not): New function.
1985 (ppc_emit_equal): New function.
1986 (ppc_emit_less_signed): New function.
1987 (ppc_emit_less_unsigned): New function.
1988 (ppc_emit_ref): New function.
1989 (ppc_emit_const): New function.
1990 (ppc_emit_reg): New function.
1991 (ppc_emit_pop): New function.
1992 (ppc_emit_stack_flush): New function.
1993 (ppc_emit_swap): New function.
1994 (ppc_emit_stack_adjust): New function.
1995 (ppc_emit_call): New function.
1996 (ppc_emit_int_call_1): New function.
1997 (ppc_emit_void_call_2): New function.
1998 (ppc_emit_if_goto): New function.
1999 (ppc_emit_goto): New function.
2000 (ppc_emit_eq_goto): New function.
2001 (ppc_emit_ne_goto): New function.
2002 (ppc_emit_lt_goto): New function.
2003 (ppc_emit_le_goto): New function.
2004 (ppc_emit_gt_goto): New function.
2005 (ppc_emit_ge_goto): New function.
2006 (ppc_write_goto_address): New function.
2007 (ppc_emit_ops_impl): New static variable.
2008 (ppc64v1_emit_prologue): New function.
2009 (ppc64v2_emit_prologue): New function.
2010 (ppc64_emit_epilogue): New function.
2011 (ppc64_emit_add): New function.
2012 (ppc64_emit_sub): New function.
2013 (ppc64_emit_mul): New function.
2014 (ppc64_emit_lsh): New function.
2015 (ppc64_emit_rsh_signed): New function.
2016 (ppc64_emit_rsh_unsigned): New function.
2017 (ppc64_emit_ext): New function.
2018 (ppc64_emit_zero_ext): New function.
2019 (ppc64_emit_log_not): New function.
2020 (ppc64_emit_bit_and): New function.
2021 (ppc64_emit_bit_or): New function.
2022 (ppc64_emit_bit_xor): New function.
2023 (ppc64_emit_bit_not): New function.
2024 (ppc64_emit_equal): New function.
2025 (ppc64_emit_less_signed): New function.
2026 (ppc64_emit_less_unsigned): New function.
2027 (ppc64_emit_ref): New function.
2028 (ppc64_emit_const): New function.
2029 (ppc64v1_emit_reg): New function.
2030 (ppc64v2_emit_reg): New function.
2031 (ppc64_emit_pop): New function.
2032 (ppc64_emit_stack_flush): New function.
2033 (ppc64_emit_swap): New function.
2034 (ppc64v1_emit_call): New function.
2035 (ppc64v2_emit_call): New function.
2036 (ppc64v1_emit_int_call_1): New function.
2037 (ppc64v2_emit_int_call_1): New function.
2038 (ppc64v1_emit_void_call_2): New function.
2039 (ppc64v2_emit_void_call_2): New function.
2040 (ppc64_emit_if_goto): New function.
2041 (ppc64_emit_eq_goto): New function.
2042 (ppc64_emit_ne_goto): New function.
2043 (ppc64_emit_lt_goto): New function.
2044 (ppc64_emit_le_goto): New function.
2045 (ppc64_emit_gt_goto): New function.
2046 (ppc64_emit_ge_goto): New function.
2047 (ppc64v1_emit_ops_impl): New static variable.
2048 (ppc64v2_emit_ops_impl): New static variable.
2049 (ppc_emit_ops): New function.
2050 (linux_low_target): Wire in ppc_emit_ops.
2051
a2174ba4
MK
20522016-03-31 Wei-cheng Wang <cole945@gmail.com>
2053 Marcin Kościelnicki <koriakin@0x04.net>
2054
2055 PR/17221
2056 * Makefile.in: Add powerpc-*-ipa.o
2057 * configure.srv: Add ipa_obj for powerpc*-linux.
2058 * linux-ppc-ipa.c: New file.
2059 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2060 includes.
2061 (PPC_FIELD): New macro.
2062 (PPC_SEXT): New macro.
2063 (PPC_OP6): New macro.
2064 (PPC_BO): New macro.
2065 (PPC_LI): New macro.
2066 (PPC_BD): New macro.
2067 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2068 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2069 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2070 (ppc_get_thread_area): New function.
2071 (is_elfv2_inferior): New function.
2072 (gen_ds_form): New function.
2073 (GEN_STD): New macro.
2074 (GEN_STDU): New macro.
2075 (GEN_LD): New macro.
2076 (GEN_LDU): New macro.
2077 (gen_d_form): New function.
2078 (GEN_ADDI): New macro.
2079 (GEN_ADDIS): New macro.
2080 (GEN_LI): New macro.
2081 (GEN_LIS): New macro.
2082 (GEN_ORI): New macro.
2083 (GEN_ORIS): New macro.
2084 (GEN_LWZ): New macro.
2085 (GEN_STW): New macro.
2086 (GEN_STWU): New macro.
2087 (gen_xfx_form): New function.
2088 (GEN_MFSPR): New macro.
2089 (GEN_MTSPR): New macro.
2090 (GEN_MFCR): New macro.
2091 (GEN_MTCR): New macro.
2092 (GEN_SYNC): New macro.
2093 (GEN_LWSYNC): New macro.
2094 (gen_x_form): New function.
2095 (GEN_OR): New macro.
2096 (GEN_MR): New macro.
2097 (GEN_LWARX): New macro.
2098 (GEN_STWCX): New macro.
2099 (GEN_CMPW): New macro.
2100 (gen_md_form): New function.
2101 (GEN_RLDICL): New macro.
2102 (GEN_RLDICR): New macro.
2103 (gen_i_form): New function.
2104 (GEN_B): New macro.
2105 (GEN_BL): New macro.
2106 (gen_b_form): New function.
2107 (GEN_BNE): New macro.
2108 (GEN_LOAD): New macro.
2109 (GEN_STORE): New macro.
2110 (gen_limm): New function.
2111 (gen_atomic_xchg): New function.
2112 (gen_call): New function.
2113 (ppc_relocate_instruction): New function.
2114 (ppc_install_fast_tracepoint_jump_pad): New function.
2115 (ppc_get_min_fast_tracepoint_insn_len): New function.
2116 (ppc_get_ipa_tdesc_idx): New function.
2117 (the_low_target): Wire in the new functions.
2118 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2119 tdescs.
2120 * linux-ppc-tdesc.h: New file.
2121
a13c4696
MK
21222016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2123
2124 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2125 (alloc_jump_pad_buffer): New function.
2126 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2127 (alloc_jump_pad_buffer): New function.
2128 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2129 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2130 (alloc_jump_pad_buffer): New function.
2131 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2132 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2133 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2134 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2135
1cda1512
MK
21362016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2137
2138 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2139 * linux-amd64-ipa.c: Likewise.
2140 * linux-i386-ipa.c: Likewise.
2141 * linux-s390-ipa.c: Likewise.
2142 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2143 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2144 set_trace_state_variable_value_ptr.
2145 (struct ipa_sym_addresses): Likewise.
2146 (symbol_list): Likewise.
2147 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2148 accessing gdb_collect directly.
2149 (gdb_collect_ptr_type): New typedef.
2150 (get_raw_reg_ptr_type): New typedef.
2151 (get_trace_state_variable_value_ptr_type): New typedef.
2152 (set_trace_state_variable_value_ptr_type): New typedef.
2153 (gdb_collect_ptr): New global.
2154 (get_raw_reg_ptr): New global.
2155 (get_trace_state_variable_value_ptr): New global.
2156 (set_trace_state_variable_value_ptr): New global.
2157 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2158 accessing get_raw_reg directly.
2159 (get_get_tsv_func_addr): Likewise for
2160 get_trace_state_variable_value_ptr.
2161 (get_set_tsv_func_addr): Likewise for
2162 set_trace_state_variable_value_ptr.
2163 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2164
72fb5488
SM
21652016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2166
2167 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2168
28170b88
MK
21692016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2170
2171 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2172 packets.
2173 (relocate_instruction): Remove own_buf.
2174 * server.c (own_buf): Make global.
2175 (handle_v_requests): Make global.
2176 * server.h (own_buf): New declaration.
2177 (handle_v_requests): New prototype.
2178
f39e8743
MK
21792016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2180
2181 PR 18377
2182 * linux-s390-low.c (add_insns): New function.
2183 (s390_emit_prologue): New function.
2184 (s390_emit_epilogue): New function.
2185 (s390_emit_add): New function.
2186 (s390_emit_sub): New function.
2187 (s390_emit_mul): New function.
2188 (s390_emit_lsh): New function.
2189 (s390_emit_rsh_signed): New function.
2190 (s390_emit_rsh_unsigned): New function.
2191 (s390_emit_ext): New function.
2192 (s390_emit_log_not): New function.
2193 (s390_emit_bit_and): New function.
2194 (s390_emit_bit_or): New function.
2195 (s390_emit_bit_xor): New function.
2196 (s390_emit_bit_not): New function.
2197 (s390_emit_equal): New function.
2198 (s390_emit_less_signed): New function.
2199 (s390_emit_less_unsigned): New function.
2200 (s390_emit_ref): New function.
2201 (s390_emit_if_goto): New function.
2202 (s390_emit_goto): New function.
2203 (s390_write_goto_address): New function.
2204 (s390_emit_litpool): New function.
2205 (s390_emit_const): New function.
2206 (s390_emit_call): New function.
2207 (s390_emit_reg): New function.
2208 (s390_emit_pop): New function.
2209 (s390_emit_stack_flush): New function.
2210 (s390_emit_zero_ext): New function.
2211 (s390_emit_swap): New function.
2212 (s390_emit_stack_adjust): New function.
2213 (s390_emit_set_r2): New function.
2214 (s390_emit_int_call_1): New function.
2215 (s390_emit_void_call_2): New function.
2216 (s390_emit_eq_goto): New function.
2217 (s390_emit_ne_goto): New function.
2218 (s390_emit_lt_goto): New function.
2219 (s390_emit_le_goto): New function.
2220 (s390_emit_gt_goto): New function.
2221 (s390_emit_ge_goto): New function.
2222 (s390x_emit_prologue): New function.
2223 (s390x_emit_epilogue): New function.
2224 (s390x_emit_add): New function.
2225 (s390x_emit_sub): New function.
2226 (s390x_emit_mul): New function.
2227 (s390x_emit_lsh): New function.
2228 (s390x_emit_rsh_signed): New function.
2229 (s390x_emit_rsh_unsigned): New function.
2230 (s390x_emit_ext): New function.
2231 (s390x_emit_log_not): New function.
2232 (s390x_emit_bit_and): New function.
2233 (s390x_emit_bit_or): New function.
2234 (s390x_emit_bit_xor): New function.
2235 (s390x_emit_bit_not): New function.
2236 (s390x_emit_equal): New function.
2237 (s390x_emit_less_signed): New function.
2238 (s390x_emit_less_unsigned): New function.
2239 (s390x_emit_ref): New function.
2240 (s390x_emit_if_goto): New function.
2241 (s390x_emit_const): New function.
2242 (s390x_emit_call): New function.
2243 (s390x_emit_reg): New function.
2244 (s390x_emit_pop): New function.
2245 (s390x_emit_stack_flush): New function.
2246 (s390x_emit_zero_ext): New function.
2247 (s390x_emit_swap): New function.
2248 (s390x_emit_stack_adjust): New function.
2249 (s390x_emit_int_call_1): New function.
2250 (s390x_emit_void_call_2): New function.
2251 (s390x_emit_eq_goto): New function.
2252 (s390x_emit_ne_goto): New function.
2253 (s390x_emit_lt_goto): New function.
2254 (s390x_emit_le_goto): New function.
2255 (s390x_emit_gt_goto): New function.
2256 (s390x_emit_ge_goto): New function.
2257 (s390_emit_ops): New function.
2258 (struct linux_target_ops): Fill in emit_ops hook.
2259
abd9baf9
MK
22602016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2261
2262 PR 18377
2263 * Makefile.in: Add s390 IPA files.
2264 * configure.srv: Build IPA for s390.
2265 * linux-s390-ipa.c: New file.
2266 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2267 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2268 (tdesc_s390_linux32): Likewise.
2269 (init_registers_s390_linux32v1): Likewise.
2270 (tdesc_s390_linux32v1): Likewise.
2271 (init_registers_s390_linux32v2): Likewise.
2272 (tdesc_s390_linux32v2): Likewise.
2273 (init_registers_s390_linux64): Likewise.
2274 (tdesc_s390_linux64): Likewise.
2275 (init_registers_s390_linux64v1): Likewise.
2276 (tdesc_s390_linux64v1): Likewise.
2277 (init_registers_s390_linux64v2): Likewise.
2278 (tdesc_s390_linux64v2): Likewise.
2279 (init_registers_s390_te_linux64): Likewise.
2280 (tdesc_s390_te_linux64): Likewise.
2281 (init_registers_s390_vx_linux64): Likewise.
2282 (tdesc_s390_vx_linux64): Likewise.
2283 (init_registers_s390_tevx_linux64): Likewise.
2284 (tdesc_s390_tevx_linux64): Likewise.
2285 (init_registers_s390x_linux64): Likewise.
2286 (tdesc_s390x_linux64): Likewise.
2287 (init_registers_s390x_linux64v1): Likewise.
2288 (tdesc_s390x_linux64v1): Likewise.
2289 (init_registers_s390x_linux64v2): Likewise.
2290 (tdesc_s390x_linux64v2): Likewise.
2291 (init_registers_s390x_te_linux64): Likewise.
2292 (tdesc_s390x_te_linux64): Likewise.
2293 (init_registers_s390x_vx_linux64): Likewise.
2294 (tdesc_s390x_vx_linux64): Likewise.
2295 (init_registers_s390x_tevx_linux64): Likewise.
2296 (tdesc_s390x_tevx_linux64): Likewise.
2297 (have_hwcap_s390_vx): New static variable.
2298 (s390_arch_setup): Fill have_hwcap_s390_vx.
2299 (s390_get_thread_area): New function.
2300 (s390_ft_entry_gpr_esa): New const.
2301 (s390_ft_entry_gpr_zarch): New const.
2302 (s390_ft_entry_misc): New const.
2303 (s390_ft_entry_fr): New const.
2304 (s390_ft_entry_vr): New const.
2305 (s390_ft_main_31): New const.
2306 (s390_ft_main_64): New const.
2307 (s390_ft_exit_fr): New const.
2308 (s390_ft_exit_vr): New const.
2309 (s390_ft_exit_misc): New const.
2310 (s390_ft_exit_gpr_esa): New const.
2311 (s390_ft_exit_gpr_zarch): New const.
2312 (append_insns): New function.
2313 (s390_relocate_instruction): New function.
2314 (s390_install_fast_tracepoint_jump_pad): New function.
2315 (s390_get_min_fast_tracepoint_insn_len): New function.
2316 (s390_get_ipa_tdesc_idx): New function.
2317 (struct linux_target_ops): Wire in the above functions.
2318 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2319 * linux-s390-tdesc.h: New file.
2320
a4105d04
MK
23212016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2322
2323 * linux-s390-low.c (s390_supports_tracepoints): New function.
2324 (struct linux_target_ops): Fill supports_tracepoints hook.
2325
35ac8b3e
YQ
23262016-03-18 Yao Qi <yao.qi@linaro.org>
2327
2328 * linux-low.c (lwp_signal_can_be_delivered): New function.
2329 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2330
94610ec4
YQ
23312016-03-18 Yao Qi <yao.qi@linaro.org>
2332
2333 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2334 0 if signal is enqueued. Remove 'signal' from one debugging
2335 message. Move one debugging message to some lines below.
2336 Remove code setting 'signal' to 0.
2337
80aea927
YQ
23382016-03-18 Yao Qi <yao.qi@linaro.org>
2339
2340 * linux-low.c (linux_low_filter_event): Remove redundant
2341 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2342
b04fd3be
MK
23432016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2344
2345 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2346 (struct linux_target_ops): Wire in the above.
2347
c40c8d4b
YQ
23482016-03-03 Yao Qi <yao.qi@linaro.org>
2349
2350 * linux-low.c: Update comments to start_step_over.
2351
0f8288ae
YQ
23522016-03-03 Yao Qi <yao.qi@linaro.org>
2353
2354 PR server/19736
2355 * linux-low.c (handle_extended_wait): Set child suspended
2356 if event_lwp->bp_reinsert isn't zero.
2357
fdbd04a8
YQ
23582016-03-02 Yao Qi <yao.qi@linaro.org>
2359
2360 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2361 enqueue_pending_signal.
2362
6896a8fa
MK
23632016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2364
2365 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2366 is actually loaded.
2367
ab503087
MK
23682016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2369
2370 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2371 (s390_regmap_3264) [!__s390x__]: New global.
2372 (s390_collect_ptrace_register): Skip map entries containing -1.
2373 (s390_supply_ptrace_register): Ditto.
2374 (s390_fill_gprs_high): New function.
2375 (s390_store_gprs_high): New function.
2376 (s390_regsets): Add NT_S390_HIGH_GPRS.
2377 (s390_get_hwcap): Enable on 31-bit.
2378 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2379 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2380 Detect NT_S390_HIGH_GPRS.
2381 (s390_usrregs_info_3264): Enable on 31-bit.
2382 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2383 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2384
ae91f625
MK
23852016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2386
2387 PR gdb/13808
2388 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2389 * configure.srv: Ditto.
2390 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2391 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2392 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2393 (init_registers_amd64_linux): Remove prototype.
2394 (tdesc_amd64_linux): Remove declaration.
2395 (get_ipa_tdesc): New function.
2396 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2397 initialize remaining tdescs.
2398 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2399 (init_registers_i386_linux): Remove prototype.
2400 (tdesc_i386_linux): Remove declaration.
2401 (get_ipa_tdesc): New function.
2402 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2403 initialize remaining tdescs.
2404 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2405 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2406 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2407 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2408 (x86_get_ipa_tdesc_idx): New function.
2409 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2410 * linux-x86-tdesc.h: New file.
2411 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2412 (target_get_ipa_tdesc_idx): New macro.
2413 * tracepoint.c (ipa_tdesc_idx): New macro.
2414 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2415 (symbol_list): Add ipa_tdesc_idx.
2416 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2417 (ipa_tdesc): Remove.
2418 (ipa_tdesc_idx): New variable.
2419 (get_context_regcache): Use get_ipa_tdesc.
2420 (gdb_collect): Ditto.
2421 (gdb_probe): Ditto.
2422 * tracepoint.h (get_ipa_tdesc): New prototype.
2423 (ipa_tdesc): Remove.
2424
e7ad2f14
PA
24252016-02-24 Pedro Alves <palves@redhat.com>
2426
2427 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2428 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2429 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2430 Factor out common code between the USE_SIGTRAP_SIGINFO and
2431 !USE_SIGTRAP_SIGINFO blocks.
2432 (linux_low_filter_event): Call save_stop_reason instead of
2433 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2434 Update comments.
2435 (linux_wait_1): Update comments.
2436
657f9cde
WW
24372016-02-24 Wei-cheng Wang <cole945@gmail.com>
2438
2439 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2440 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2441 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2442 ppc_insert_point, ppc_remove_point.
2443
b00b61e1
MK
24442016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2445
2446 * linux-s390-low.c (s390_supports_z_point_type): New function.
2447 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2448
553cb527
YQ
24492016-02-16 Yao Qi <yao.qi@linaro.org>
2450
2451 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2452 PC. Get pc from regcache_read_pc.
2453
a5652c21
YQ
24542016-02-12 Yao Qi <yao.qi@linaro.org>
2455
2456 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2457 or linux_get_pc_32bit.
2458 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2459
ed443b61
YQ
24602016-02-12 Yao Qi <yao.qi@linaro.org>
2461
2462 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2463 arm_linux_get_next_pcs_fixup.
2464
020ecd38
MK
24652016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2466
2467 * tracepoint.c (x_tracepoint_action_download): Change
2468 write_inferior_data_ptr to write_inferior_data_pointer.
2469 (cmd_qtstart): Likewise.
2470 (write_inferior_data_ptr): Remove.
2471 (download_agent_expr): Change write_inferior_data_ptr to
2472 write_inferior_data_pointer.
2473 (download_tracepoint_1): Likewise.
2474 (download_tracepoint): Likewise.
2475 (download_trace_state_variables): Likewise.
2476
7cae9051
WW
24772016-02-11 Wei-cheng Wang <cole945@gmail.com>
2478 Marcin Kościelnicki <koriakin@0x04.net>
2479
2480 * tracepoint.c (struct tracepoint_action_ops): Remove.
2481 (struct tracepoint_action): Remove ops.
2482 (m_tracepoint_action_download, r_tracepoint_action_download)
2483 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2484 size and offset accordingly.
2485 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2486 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2487 (tracepoint_action_send, tracepoint_action_download): New functions.
2488 Helpers for trace action handlers.
2489 (add_tracepoint_action): Remove setup actions ops.
2490 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2491
9f6a71b4
YQ
24922016-02-10 Yao Qi <yao.qi@linaro.org>
2493
2494 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2495
1e94266c
SM
24962016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2497
2498 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2499 to AC_OUTPUT.
2500 * configure: Regenerate.
2501
8adce034
SM
25022016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2503
2504 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2505 void * to gdb_byte *.
2506 * linux-low.c (siginfo_fixup): Likewise.
2507 (linux_xfer_siginfo): Likewise.
2508 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2509 Likewise.
2510 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2511
93813b37
WT
25122016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2513
2514 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2515 to srv_tgtobj.
2516 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2517 to srv_tgtobj.
2518 * linux-x86-low.c [__x86_64__]: Include
2519 "nat/amd64-linux-siginfo.h".
2520 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2521 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2522 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2523 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2524 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2525 (cpt_si_fd, si_timerid, si_overrun): Move from
2526 nat/amd64-linux-siginfo.c.
2527 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2528
8424cc97
SM
25292016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2530
2531 * server.c (skip_to_semicolon): Remove.
2532 (process_point_options): Use strchrnul instead of
2533 skip_to_semicolon.
2534
4d18591b
YQ
25352016-01-26 Yao Qi <yao.qi@linaro.org>
2536
2537 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2538 * linux-low.c (install_software_single_step_breakpoints): Don't
2539 call regcache_read_pc.
2540 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2541 argument pc.
2542
d8020970
YQ
25432016-01-26 Yao Qi <yao.qi@linaro.org>
2544
2545 * linux-low.c (install_software_single_step_breakpoints): Call
2546 regcache_read_pc instead of get_pc.
2547
8b207339
YQ
25482016-01-26 Yao Qi <yao.qi@linaro.org>
2549
2550 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2551 (unblock_async_io): Rename to ...
2552 (block_unblock_async_io): ... it. New function.
2553 (enable_async_io): Don't install SIGIO handler. Unblock it
2554 instead.
2555 (disable_async_io): Don't ignore SIGIO. Block it instead.
2556 (initialize_async_io): Install SIGIO handler. Don't call
2557 unblock_async_io.
2558
18879fef
YQ
25592016-01-26 Yao Qi <yao.qi@linaro.org>
2560
2561 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2562 first character is '\003', call *the_target->request_interrupt.
2563
a0f8e08a
YQ
25642016-01-25 Yao Qi <yao.qi@linaro.org>
2565
2566 * remote-utils.c (new_thread_notify): Remove.
2567 (dead_thread_notify): Likewise.
2568 * remote-utils.h (new_thread_notify): Remove declaration.
2569 (dead_thread_notify): Likewise.
2570
cc5fd9ab
MK
25712016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2572
2573 * gdb.trace/pending.exp: Fix expected message on continue.
2574
99e8eb11
MK
25752016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2576
2577 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2578 it works properly on big-endian machines where sizeof (CORE_ADDR)
2579 != sizeof (void *).
2580
a994041d
PA
25812016-01-21 Pedro Alves <palves@redhat.com>
2582
2583 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2584 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2585 * configure: Regenerate.
2586
f7a6a40d
YQ
25872016-01-21 Yao Qi <yao.qi@linaro.org>
2588
2589 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2590 is_thumb and set it according to CPSR saved on the stack.
2591 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2592 arm_sigreturn_next_pc.
2593
6f69e520
YQ
25942016-01-18 Yao Qi <yao.qi@linaro.org>
2595
2596 * linux-low.c (linux_set_pc_64bit): New function.
2597 (linux_get_pc_64bit): New function.
2598 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2599 Declare.
2600 * linux-sparc-low.c (debug_threads): Remove declaration.
2601 (sparc_get_pc): Remove.
2602 (the_low_target): Use linux_get_pc_64bit instead of
2603 sparc_get_pc.
2604 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2605 (the_low_target): Use linux_get_pc_64bit and
2606 linux_set_pc_64bit.
2607
276d4552
YQ
26082016-01-18 Yao Qi <yao.qi@linaro.org>
2609
2610 * linux-arm-low.c (debug_threads): Remove declaration.
2611 (arm_get_pc, arm_set_pc): Remove.
2612 (the_low_target): Use linux_get_pc_32bit and
2613 linux_set_pc_32bit.
2614 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2615 (the_low_target): Use linux_get_pc_32bit and
2616 linux_set_pc_32bit.
2617 * linux-cris-low.c (debug_threads): Remove declaration.
2618 (cris_get_pc, cris_set_pc,): Remove.
2619 (the_low_target): Use linux_get_pc_32bit and
2620 linux_set_pc_32bit.
2621 * linux-crisv32-low.c (debug_threads): Remove declaration.
2622 (cris_get_pc, cris_set_pc): Remove.
2623 (the_low_target): Use linux_get_pc_32bit and
2624 linux_set_pc_32bit.
2625 * linux-low.c: Include inttypes.h.
2626 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2627 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2628 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2629 (the_low_target): Use linux_get_pc_32bit and
2630 linux_set_pc_32bit.
2631 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2632 (the_low_target): Use linux_get_pc_32bit and
2633 linux_set_pc_32bit.
2634 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2635 (the_low_target): Use linux_get_pc_32bit and
2636 linux_set_pc_32bit.
2637 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2638 (the_low_target): Use linux_get_pc_32bit and
2639 linux_set_pc_32bit.
2640 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2641 (the_low_target): Use linux_get_pc_32bit and
2642 linux_set_pc_32bit.
2643
eb0edac8
GB
26442016-01-18 Gary Benson <gbenson@redhat.com>
2645
2646 * configure.ac (AC_FUNC_FORK): New check.
2647 * config.in: Regenerate.
2648 * configure: Likewise.
2649
1b451dda
YQ
26502016-01-14 Yao Qi <yao.qi@linaro.org>
2651
2652 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2653 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2654 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2655 arm_get_next_pcs_ctor.
2656
82075af2
JS
26572016-01-12 Josh Stone <jistone@redhat.com>
2658 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2659
2660 * inferiors.h: Include "gdb_vecs.h".
2661 (struct process_info): Add syscalls_to_catch.
2662 * inferiors.c (remove_process): Free syscalls_to_catch.
2663 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2664 syscall_return stops.
2665 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2666 * server.c (handle_general_set): Handle QCatchSyscalls.
2667 (handle_query): Report support for QCatchSyscalls.
2668 * target.h (struct target_ops): Add supports_catch_syscall.
2669 (target_supports_catch_syscall): New macro.
2670 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2671 (struct lwp_info): Add syscall_state.
2672 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2673 Maintain syscall_state and syscalls_to_catch across exec.
2674 (get_syscall_trapinfo): New function, proxy to the_low_target.
2675 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2676 (linux_low_filter_event): Toggle syscall_state entry/return for
2677 syscall traps, and set it ignored for all others.
2678 (gdb_catching_syscalls_p): New function.
2679 (gdb_catch_this_syscall_p): New function.
2680 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2681 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2682 (linux_supports_catch_syscall): New function.
2683 (linux_target_ops): Install it.
2684 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2685 (the_low_target): Install it.
2686
8f13a3ce
MF
26872016-01-12 Mike Frysinger <vapier@gentoo.org>
2688
2689 * acinclude.m4: Include new ../warning.m4 file.
2690 * configure: Regenerated.
2691 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2692
5b3da067
MF
26932016-01-12 Mike Frysinger <vapier@gentoo.org>
2694
2695 * ax.c (is_goto_target): Mark static.
2696 * linux-low.c (register_addr): Likewise.
2697 (linux_fetch_registers, linux_store_registers): Likewise.
2698 * mem-break.c (any_persistent_commands): Fix old prototype.
2699 (add_commands_to_breakpoint): Mark static.
2700 * regcache.c (find_register_by_name): Delete unused func.
2701 * remote-utils.c (hex_or_minus_one): Mark static.
2702 * server.c (monitor_show_help): Mark static.
2703 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2704 handle_v_requests): Likewise.
2705
bc504a31
PA
27062016-01-12 Pedro Alves <palves@redhat.com>
2707
2708 Remove use of the registered trademark symbol throughout.
2709
5a0dd67a
YQ
27102016-01-08 Yao Qi <yao.qi@linaro.org>
2711
2712 * remote-utils.c (getpkt): If c is '\003', call target hook
2713 request_interrupt.
2714
b2ca446f
YQ
27152016-01-06 Yao Qi <yao.qi@linaro.org>
2716
2717 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2718 linux-aarch32-low.c.
2719 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2720 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2721 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2722 (thumb2_breakpoint): Declare.
2723 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2724 linux-aarch32-low.h.
2725 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2726 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2727 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2728
edd88788
JB
27292016-01-01 Joel Brobecker <brobecker@adacore.com>
2730
2731 * gdbreplay.c (gdbreplay_version): Change copyright year in
2732 version message.
2733 * server.c (gdbserver_version): Likewise.
2734
65da7f14
PP
27352015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2736
2737 * server.c (crc32_table): Delete.
2738 (crc32): Use libiberty's xcrc32 function.
2739
4abd5ed2
JB
27402015-12-22 Joel Brobecker <brobecker@adacore.com>
2741
2742 * lynx-low.c (lynx_delete_thread_callback): New function.
2743 (lynx_mourn): Properly delete our process and all of its
2744 threads. Remove call to clear_inferiors.
2745
0e50fe5c
JB
27462015-12-22 Joel Brobecker <brobecker@adacore.com>
2747
2748 * target.c (thread_search_callback): Add check that
2749 the thread_stopped target callback is not NULL before
2750 calling it.
2751
35adc03f
YQ
27522015-12-21 Yao Qi <yao.qi@linaro.org>
2753
2754 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2755 arm breakpoint.
2756
bd2b2909
AT
27572015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2758
2759 * server.c (handle_query): Call target_supports_software_single_step.
2760
7fe5e27e
AT
27612015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2762
2763 * linux-low.c (single_step): New function.
2764 (linux_resume_one_lwp_throw): Call single_step.
2765 (start_step_over): Likewise.
2766
d9311bfa
AT
27672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2768
2769 * Makefile.in (SFILES): Append arch/arm-linux.c,
2770 arch/arm-get-next-pcs.c.
2771 (arm-linux.o): New rule.
2772 (arm-get-next-pcs.o): New rule.
2773 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2774 arm-linux.o.
2775 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2776 to linux-aarch32-low.c.
2777 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2778 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2779 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2780 (thumb2_breakpoint_len): Likewise.
2781 (arm_is_thumb_mode): Make non-static.
2782 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2783 from linux-aarch32-low.c.
2784 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2785 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2786 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2787 (thumb2_breakpoint_len): Likewise.
2788 (arm_is_thumb_mode): New declaration.
2789 * linux-arm-low.c: Include arch/arm-linux.h
2790 aarch/arm-get-next-pcs.h, sys/syscall.h.
2791 (get_next_pcs_ops): New struct.
2792 (get_next_pcs_addr_bits_remove): New function.
2793 (get_next_pcs_is_thumb): New function.
2794 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2795 (arm_sigreturn_next_pc): Likewise.
2796 (get_next_pcs_syscall_next_pc): Likewise.
2797 (arm_gdbserver_get_next_pcs): Likewise.
2798 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2799 Initialize.
2800 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2801 * server.h: Include gdb_vecs.h.
2802
68ce2059
AT
28032015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2804
2805 * Makefile.in (SFILES): Append common/common-regcache.c.
2806 (OBS): Append common-regcache.o.
2807 (common-regcache.o): New rule.
2808 * regcache.c (init_register_cache): Initialize cache to
2809 REG_UNAVAILABLE.
2810 (regcache_raw_read_unsigned): New function.
2811 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2812 register_status enum.
2813
fa5308bd
AT
28142015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2815
2816 * linux-aarch64-low.c (the_low_targets): Rename
2817 breakpoint_reinsert_addr to get_next_pcs.
2818 * linux-arm-low.c (the_low_targets): Likewise.
2819 * linux-bfin-low.c (the_low_targets): Likewise.
2820 * linux-cris-low.c (the_low_targets): Likewise.
2821 * linux-crisv32-low.c (the_low_targets): Likewise.
2822 * linux-low.c (can_software_single_step): Likewise.
2823 (install_software_single_step_breakpoints): New function.
2824 (start_step_over): Use install_software_single_step_breakpoints.
2825 * linux-low.h: New CORE_ADDR vector.
2826 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2827 get_next_pcs.
2828 * linux-mips-low.c (the_low_targets): Likewise.
2829 * linux-nios2-low.c (the_low_targets): Likewise.
2830 * linux-sparc-low.c (the_low_targets): Likewise.
2831
4a6ed09b
PA
28322015-12-17 Pedro Alves <palves@redhat.com>
2833
2834 * linux-low.c (linux_kill_one_lwp): Remove references to
2835 LinuxThreads.
2836 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2837 to 'kill'.
2838 (linux_init_signals): Delete.
2839 (initialize_low): Adjust.
2840 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2841
7544db95
PA
28422015-12-16 Pedro Alves <palves@redhat.com>
2843
2844 * configure.ac (compiler warning flags): When testing a
2845 -Wno-foo option, check whether -Wfoo works instead.
2846 * configure: Regenerate.
2847
8020350c
DB
28482015-12-11 Don Breazeal <donb@codesourcery.com>
2849
2850 * server.c (process_serial_event): Don't exit from gdbserver
2851 in remote mode if there are still active inferiors.
2852
db91f502
YQ
28532015-12-11 Yao Qi <yao.qi@linaro.org>
2854
2855 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2856 arm_breakpoint_at if the process is 32-bit.
2857
b37a6290
YQ
28582015-12-11 Yao Qi <yao.qi@linaro.org>
2859
2860 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2861 arm breakpoint.
2862
17b1509a
YQ
28632015-12-07 Yao Qi <yao.qi@linaro.org>
2864
2865 * configure.srv: Append arm.o to srv_tgtobj for
2866 aarch64*-*-linux* target.
2867 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2868 from linux-arm-low.c.
2869 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2870 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2871 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2872 (thumb2_breakpoint_len): Likewise.
2873 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2874 (arm_breakpoint_kinds): Likewise.
2875 (arm_breakpoint_kind_from_pc): Likewise.
2876 (arm_sw_breakpoint_from_kind): Likewise.
2877 (arm_breakpoint_kind_from_current_state): Likewise.
2878 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2879 (arm_sw_breakpoint_from_kind): Declare.
2880 (arm_breakpoint_kind_from_current_state): Declare.
2881 (arm_breakpoint_at): Declare.
2882 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2883 arm_sw_breakpoint_from_kind if process is 32-bit.
2884 (aarch64_breakpoint_kind_from_pc): New function.
2885 (aarch64_breakpoint_kind_from_current_state): New function.
2886 (the_low_target): Initialize fields breakpoint_kind_from_pc
2887 and breakpoint_kind_from_current_state.
2888 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2889 linux-aarch32-low.c.
2890 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2891 (arm_breakpoint, arm_breakpoint_len): Likewise.
2892 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2893 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2894 (arm_is_thumb_mode): Likewise.
2895 (arm_breakpoint_at): Likewise.
2896 (arm_breakpoint_kind_from_pc): Likewise.
2897 (arm_sw_breakpoint_from_kind): Likewise.
2898 (arm_breakpoint_kind_from_current_state): Likewise.
2899
2900 Revert:
2901 2015-08-04 Yao Qi <yao.qi@linaro.org>
2902
2903 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2904 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2905 * server.c (extended_protocol): Remove "static".
2906 * server.h (extended_protocol): Declare it.
2907
ece66d65
JS
29082015-12-04 Josh Stone <jistone@redhat.com>
2909
2910 * target.h (struct target_ops) <arch_setup>: Rename to ...
2911 (struct target_ops) <post_create_inferior>: ... this.
2912 (target_arch_setup): Rename to ...
2913 (target_post_create_inferior): ... this, calling post_create_inferior.
2914 * server.c (start_inferior): Update target_arch_setup calls to
2915 target_post_create_inferior.
2916 * linux-low.c (linux_low_ptrace_options): Forward declare.
2917 (linux_arch_setup): Update its comment for general use.
2918 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2919 (struct linux_target_ops): Use linux_post_create_inferior.
2920 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2921 to post_create_inferior.
2922 * nto-low.c (struct nto_target_ops): Likewise.
2923 * spu-low.c (struct spu_target_ops): Likewise.
2924 * win32-low.c (struct win32_target_ops): Likewise.
2925
e58c48b4
AT
29262015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2927
2928 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2929
fbec8956
AT
29302015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2931
2932 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2933 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2934 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2935 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2936 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2937 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2938 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2939 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2940 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2941 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2942 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2943 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2944
9b4c5f87
AT
29452015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2946
2947 * linux-low.c (linux_look_up_symbols): Don't call
2948 linux_supports_traceclone.
2949 * linux-low.h (thread_db_init): Remove use_events argument.
2950 * thread-db.c (thread_db_use_event): Remove global variable.
2951 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2952 (struct thread_db) <td_create_bp>: Remove field.
2953 (thread_db_create_event): Remove function.
2954 (thread_db_enable_reporting): Likewise.
2955 (find_one_thread): Don't check for thread_db_use_events.
2956 (attach_thread): Likewise.
2957 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2958 (try_thread_db_load_1): Don't check for thread_db_use_events.
2959 (thread_db_init): Remove use_events argument and thread events
2960 handling.
2961 (remove_thread_event_breakpoints): Remove function.
2962 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2963
7d00775e
AT
29642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2965
2966 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2967 New function.
2968 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2969 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2970 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2971 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2972 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2973 Initialize.
2974 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2975 New function.
2976 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2977 * linux-low.c (can_hardware_single_step): Use
2978 supports_hardware_single_step.
2979 (can_software_single_step): New function.
2980 (start_step_over): Call can_software_single_step.
2981 (linux_supports_hardware_single_step): New function.
2982 (struct target_ops) <supports_software_single_step>: Initialize.
2983 * linux-low.h (struct linux_target_ops)
2984 <supports_hardware_single_step>: Initialize.
2985 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2986 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2987 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2988 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2989 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2990 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2991 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2992 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2993 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2994 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2995 Initialize.
2996 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2997 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2998 Initialize.
2999 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
3000 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3001 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
3002 New function.
3003 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3004 * target.h (struct target_ops): <supports_software_single_step>:
3005 New field.
3006 (target_supports_software_single_step): New macro.
3007
2d97cd35
AT
30082015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3009
3010 * linux-low.c (linux_wait_1): Fix pc advance condition.
3011 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
3012 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
3013
769ef81f
AT
30142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
3015
3016 * linux-arm-low.c (arm_is_thumb_mode): New function.
3017 (arm_breakpoint_at): Use arm_is_thumb_mode.
3018 (arm_breakpoint_kind_from_current_state): New function.
3019 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
3020 Initialize.
3021 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
3022 (linux_breakpoint_kind_from_current_state): New function.
3023 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
3024 * linux-low.h (struct linux_target_ops)
3025 <breakpoint_kind_from_current_state>: New field.
3026 * target.h (struct target_ops): Likewise.
3027 (target_breakpoint_kind_from_current_state): New macro.
3028
1bebeeca
PA
30292015-11-30 Pedro Alves <palves@redhat.com>
3030
3031 * linux-low.c (linux_resume): Wake up the event loop before
3032 returning.
3033
a67a9fae
PA
30342015-11-30 Pedro Alves <palves@redhat.com>
3035
3036 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
3037 check.
3038 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
3039 to -1.
3040 * target.c (struct thread_search): New structure.
3041 (thread_search_callback): New function.
3042 (prev_general_thread): New global.
3043 (prepare_to_access_memory, done_accessing_memory): New functions.
3044 * target.h (prepare_to_access_memory, done_accessing_memory):
3045 Replace macros with function declarations.
3046
f2faf941
PA
30472015-11-30 Pedro Alves <palves@redhat.com>
3048
3049 PR 14618
3050 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
3051 report TARGET_WAITKIND_NO_RESUMED.
3052 * remote-utils.c (prepare_resume_reply): Handle
3053 TARGET_WAITKIND_NO_RESUMED.
3054 * server.c (report_no_resumed): New global.
3055 (handle_query) <qSupported>: Handle "no-resumed+". Report
3056 "no-resumed+" support.
3057 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3058 return error if the client doesn't support no-resumed events.
3059 (push_stop_notification): New function.
3060 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3061 events if the client supports them.
3062
a681f9c9
PA
30632015-11-30 Pedro Alves <palves@redhat.com>
3064
3065 * linux-low.c (thread_still_has_status_pending_p): Don't check
3066 vCont;t here.
3067 (lwp_resumed): New function.
3068 (status_pending_p_callback): Return early if the LWP is not
3069 supposed to be resumed.
3070
65706a29
PA
30712015-11-30 Pedro Alves <palves@redhat.com>
3072
3073 * linux-low.c (handle_extended_wait): Assert that the LWP's
3074 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3075 thread create events, leave the new child's status pending.
3076 (linux_low_filter_event): If GDB wants to hear about thread exit
3077 events, leave the LWP marked dead and don't delete it.
3078 (linux_wait_for_event_filtered): Don't check for thread exit.
3079 (filter_exit_event): New function.
3080 (linux_wait_1): Use it, when returning an exit event.
3081 (linux_resume_one_lwp_throw): Assert that the LWP's
3082 waitstatus is TARGET_WAITKIND_IGNORE.
3083 * remote-utils.c (prepare_resume_reply): Handle
3084 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3085 * server.c (report_thread_events): New global.
3086 (handle_general_set): Handle QThreadEvents.
3087 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3088 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3089 TARGET_WAITKIND_THREAD_EXITED.
3090 * server.h (report_thread_events): Declare.
3091
56cf4bed
PA
30922015-11-30 Pedro Alves <palves@redhat.com>
3093
3094 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3095 the thread's last_resume_kind was resume_stop.
3096
500c1d85
PA
30972015-11-30 Pedro Alves <palves@redhat.com>
3098
3099 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3100 before returning.
3101
de979965
PA
31022015-11-30 Pedro Alves <palves@redhat.com>
3103
3104 * server.c (handle_v_requests): Handle vCtrlC.
3105
34c65914
PA
31062015-11-30 Pedro Alves <palves@redhat.com>
3107
3108 * gdbthread.h (find_any_thread_of_pid): Declare.
3109 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3110 functions.
3111 * server.c (handle_query): If current_thread is NULL, look for
3112 another thread of the selected process.
3113
79efa585 31142015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3115 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3116
3117 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3118 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3119 name in reply.
3120 * target.h (struct target_ops) <thread_name>: New field.
3121 (target_thread_name): New macro.
3122
80d82c19
JB
31232015-11-23 Joel Brobecker <brobecker@adacore.com>
3124
3125 * regcache.h (regcache_invalidate_pid): Add declaration.
3126 * regcache.c (regcache_invalidate_pid): New function, extracted
3127 from regcache_invalidate.
3128 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3129 Add trivial documentation comment.
3130 * lynx-low.c: Use regcache_invalidate_pid instead of
3131 regcache_invalidate.
3132
64da5dd5
JB
31332015-11-23 Joel Brobecker <brobecker@adacore.com>
3134
3135 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3136 and Elf64_auxv_t if the target is Android.
3137
37ce4055
DE
31382015-11-22 Doug Evans <xdje42@gmail.com>
3139
3140 * target.h: #include <sys/types.h>.
3141
06e03fff
PA
31422015-11-19 Pedro Alves <palves@redhat.com>
3143
3144 * linux-low.c (linux_process_qsupported): Change prototype.
3145 Adjust.
3146 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3147 Change prototype.
3148 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3149 and adjust to loop over all features.
3150 * server.c (handle_query) <qSupported>: Adjust to call
3151 target_process_qsupported once, passing it a vector of unprocessed
3152 features.
3153 * target.h (struct target_ops) <process_qsupported>: Change
3154 prototype.
3155 (target_process_qsupported): Adjust.
3156
9a084706
PA
31572015-11-19 Pedro Alves <palves@redhat.com>
3158
3159 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3160 mode.
3161 * configure: Regenerate.
3162
dad44a1f
PA
31632015-11-19 Pedro Alves <palves@redhat.com>
3164
3165 * configure: Regenerate.
3166
231c0592
YQ
31672015-11-19 Yao Qi <yao.qi@linaro.org>
3168
3169 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3170 type to uint32_t.
3171
6c1c9a8b
YQ
31722015-11-19 Yao Qi <yao.qi@linaro.org>
3173
3174 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3175 (struct aarch64_operand): Move enum out.
3176
9caa3311
YQ
31772015-11-19 Yao Qi <yao.qi@linaro.org>
3178
3179 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3180 struct user_fpsimd_state *.
3181 (aarch64_store_fpregset): Likewise.
3182
6a69a054
YQ
31832015-11-19 Yao Qi <yao.qi@linaro.org>
3184
3185 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3186 struct user_pt_regs *.
3187 (aarch64_store_gregset): Likewise.
3188
1798301e
PA
31892015-11-18 Pedro Alves <palves@redhat.com>
3190
3191 * Makefile.in (all_object_files): Add $IPA_OBJS.
3192
ce7715e2
PA
31932015-11-17 Pedro Alves <palves@redhat.com>
3194
3195 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3196 GDB_SIGNAL_0 and gdb_signal_to_string.
3197
c0879059
PA
31982015-11-17 Pedro Alves <palves@redhat.com>
3199
3200 * win32-low.c (handle_output_debug_string): Remove parameter.
3201 (win32_kill): Remove our_status local and adjust call to
3202 handle_output_debug_string.
3203 (get_child_debug_event): Adjust call to
3204 handle_output_debug_string.
3205
1996e237
SM
32062015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3207
3208 * linux-mips-low.c (mips_fill_gregset): Add cast.
3209 (mips_store_gregset): Likewise.
3210 (mips_fill_fpregset): Likewise.
3211 (mips_store_fpregset): Likewise.
3212
cbec665b
SM
32132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3214
3215 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3216 priv.
3217
eb3e3c67
SM
32182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3219
3220 * linux-mips-low.c (mips_linux_new_thread): Change type of
3221 watch_type to enum target_hw_bp_type.
3222
171de4b8
SM
32232015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3224
3225 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3226 Change return type to arm_hwbp_type.
3227
04248ead
SM
32282015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3229
3230 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3231 (arm_store_gregset): Likewise.
3232 * linux-arm-low.c (arm_get_hwcap): Likewise.
3233 (arm_read_description): Likewise.
3234
04b3479c
SM
32352015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3236
3237 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3238
2bc84e8a
SM
32392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3240
3241 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3242 (ppc_fill_vsxregset): Likewise.
3243 (ppc_store_vsxregset): Likewise.
3244 (ppc_fill_vrregset): Likewise.
3245 (ppc_store_vrregset): Likewise.
3246 (ppc_fill_evrregset): Likewise.
3247 (ppc_store_evrregset): Likewise.
3248
e6c5bb05
SM
32492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3250
3251 * linux-ppc-low.c (ppc_usrregs_info): Remove
3252 forward-declaration.
3253 (ppc_arch_setup): Move lower in file.
3254
7ea45d72
SM
32552015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3256
3257 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3258 (ps_pdwrite): Likewise.
3259
69291610
HW
32602015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3261
3262 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3263 to after assert checks.
3264
b42945fd
SM
32652015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3266
3267 * proc-service.c (ps_pdread): Add/adjust casts.
3268 (ps_pdwrite): Add/adjust casts.
3269
d6f85c84
SM
32702015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3271
3272 * server.c (handle_search_memory_1): Cast return value of
3273 memmem.
3274
f98cd059
SM
32752015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3276
3277 * server.c (write_qxfer_response): Change type of data to
3278 gdb_byte *.
3279
d2412fa5
PA
32802015-10-29 Pedro Alves <palves@redhat.com>
3281
3282 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3283
c17414a2
PA
32842015-10-29 Pedro Alves <palves@redhat.com>
3285
3286 * tracepoint.c (clear_installed_tracepoints): Add casts.
3287
e053fbc4
PA
32882015-10-29 Pedro Alves <palves@redhat.com>
3289
3290 * server.c (handle_v_cont, process_serial_event): Add enum
3291 gdb_signal casts to signal parsing code.
3292
add67df8
PA
32932015-10-29 Pedro Alves <palves@redhat.com>
3294
3295 * linux-low.h (NULL_REGSET): Define.
3296 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3297 * linux-arm-low.c (arm_regsets): Likewise.
3298 * linux-crisv32-low.c (cris_regsets): Likewise.
3299 * linux-m68k-low.c (m68k_regsets): Likewise.
3300 * linux-mips-low.c (mips_regsets): Likewise.
3301 * linux-nios2-low.c (nios2_regsets): Likewise.
3302 * linux-ppc-low.c (ppc_regsets): Likewise.
3303 * linux-s390-low.c (s390_regsets): Likewise.
3304 * linux-sh-low.c (sh_regsets): Likewise.
3305 * linux-sparc-low.c (sparc_regsets): Likewise.
3306 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3307 * linux-tile-low.c (tile_regsets): Likewise.
3308 * linux-x86-low.c (x86_regsets): Likewise.
3309 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3310
50bc912a
PA
33112015-10-29 Pedro Alves <palves@redhat.com>
3312
3313 * linux-low.h (NULL_REGSET): Define.
3314 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3315 * linux-arm-low.c (arm_regsets): Likewise.
3316 * linux-crisv32-low.c (cris_regsets): Likewise.
3317 * linux-m68k-low.c (m68k_regsets): Likewise.
3318 * linux-mips-low.c (mips_regsets): Likewise.
3319 * linux-nios2-low.c (nios2_regsets): Likewise.
3320 * linux-ppc-low.c (ppc_regsets): Likewise.
3321 * linux-s390-low.c (s390_regsets): Likewise.
3322 * linux-sh-low.c (sh_regsets): Likewise.
3323 * linux-sparc-low.c (sparc_regsets): Likewise.
3324 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3325 * linux-tile-low.c (tile_regsets): Likewise.
3326 * linux-x86-low.c (x86_regsets): Likewise.
3327 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3328
682b2546
DE
33292015-10-26 Doug Evans <dje@google.com>
3330
3331 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3332
963843d4
DE
33332015-10-26 Doug Evans <dje@google.com>
3334
3335 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3336
d41401ac
DE
33372015-10-26 Doug Evans <dje@google.com>
3338
3339 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3340 for debug_printf.
3341 (attach_thread, find_new_threads_callback): Ditto.
3342
3db28855
AT
33432015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3344
3345 * mem-break.h (set_breakpoint_data): Remove.
3346
fb78e89c
AT
33472015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3348
3349 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3350 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3351 (initialize_low): Remove set_breakpoint_data call.
3352 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3353 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3354 (initialize_low): Remove set_breakpoint_data call.
3355 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3356 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3357 (initialize_low): Remove set_breakpoint_data call.
3358
2e6ee069
AT
33592015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3360
3361 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3362 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3363 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3364 * target.h (target_breakpoint_kind_from_pc): New macro.
3365
1652a986
AT
33662015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3367
3368 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3369 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3370 the default breakpoint kind.
3371
abeead09
AT
33722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3373
3374 * linux-arm-low.c (arm_supports_z_point_type): Add software
3375 breakpoint support.
3376
b0b4b501
AT
33772015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3378
3379 * linux-arm-low.c: Refactor breakpoint definitions.
3380 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3381 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3382
8689682c
AT
33832015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3384
3385 * Makefile.in: Add arm.c/o.
3386 * configure.srv: Likewise.
3387 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3388 (arm_breakpoint_kind_from_pc): New function.
3389 (arm_sw_breakpoint_from_kind): Return proper kind.
3390 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3391
27165294
AT
33922015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3393
3394 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3395 removal.
3396 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3397 (struct raw_breakpoint) <size>: Remove.
3398 (struct raw_breakpoint) <kind>: Add.
3399 (bp_size): New function.
3400 (bp_opcode): Likewise.
3401 (find_raw_breakpoint_at): Adjust for kind.
3402 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3403 (remove_memory_breakpoint): Adjust for kind call bp_size.
3404 (set_raw_breakpoint_at): Adjust for kind.
3405 (set_breakpoint): Likewise.
3406 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3407 (delete_raw_breakpoint): Adjust for kind.
3408 (delete_breakpoint): Likewise.
3409 (find_gdb_breakpoint): Likewise.
3410 (set_gdb_breakpoint_1): Likewise.
3411 (set_gdb_breakpoint): Likewise.
3412 (delete_gdb_breakpoint_1): Likewise.
3413 (delete_gdb_breakpoint): Likewise.
3414 (uninsert_raw_breakpoint): Likewise.
3415 (reinsert_raw_breakpoint): Likewise.
3416 (set_breakpoint_data): Remove.
3417 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3418 (check_mem_read): Adjust for kind call bp_size.
3419 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3420 (clone_one_breakpoint): Adjust for kind.
3421 * mem-break.h (set_gdb_breakpoint): Likewise.
3422 (delete_gdb_breakpoint): Likewise.
3423 * server.c (process_serial_event): Likewise.
3424
dd373349
AT
34252015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3426
3427 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3428 (struct linux_target_ops) <breakpoint>: Remove.
3429 (struct linux_target_ops) <breakpoint_len>: Remove.
3430 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3431 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3432 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3433 (arm_sw_breakpoint_from_kind): New function.
3434 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3435 (struct linux_target_ops) <breakpoint>: Remove.
3436 (struct linux_target_ops) <breakpoint_len>: Remove.
3437 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3438 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3439 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3440 (struct linux_target_ops) <breakpoint>: Remove.
3441 (struct linux_target_ops) <breakpoint_len>: Remove.
3442 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3443 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3444 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3445 (struct linux_target_ops) <breakpoint>: Remove.
3446 (struct linux_target_ops) <breakpoint_len>: Remove.
3447 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3448 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3449 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3450 and sw_breakpoint_from_kind to increment the pc.
3451 (linux_breakpoint_kind_from_pc): New function.
3452 (linux_sw_breakpoint_from_kind): New function.
3453 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3454 (initialize_low): Call breakpoint_kind_from_pc and
3455 sw_breakpoint_from_kind to replace breakpoint_data/len.
3456 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3457 New field.
3458 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3459 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3460 (struct linux_target_ops) <breakpoint>: Remove.
3461 (struct linux_target_ops) <breakpoint_len>: Remove.
3462 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3463 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3464 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3465 (struct linux_target_ops) <breakpoint>: Remove.
3466 (struct linux_target_ops) <breakpoint_len>: Remove.
3467 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3468 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3469 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3470 (struct linux_target_ops) <breakpoint>: Remove.
3471 (struct linux_target_ops) <breakpoint_len>: Remove.
3472 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3473 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3474 * linux-nios2-low.c (nios2_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-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3480 (struct linux_target_ops) <breakpoint>: Remove.
3481 (struct linux_target_ops) <breakpoint_len>: Remove.
3482 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3483 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3484 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
3485 (struct linux_target_ops) <breakpoint>: Remove.
3486 (struct linux_target_ops) <breakpoint_len>: Remove.
3487 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3488 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3489 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3490 (struct linux_target_ops) <breakpoint>: Remove.
3491 (struct linux_target_ops) <breakpoint_len>: Remove.
3492 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3493 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3494 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3495 (struct linux_target_ops) <breakpoint>: Remove.
3496 (struct linux_target_ops) <breakpoint_len>: Remove.
3497 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3498 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3499 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3500 (struct linux_target_ops) <breakpoint>: Remove.
3501 (struct linux_target_ops) <breakpoint_len>: Remove.
3502 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3503 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3504 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3505 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3506 (struct linux_target_ops) <breakpoint>: Remove.
3507 (struct linux_target_ops) <breakpoint_len>: Remove.
3508 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3509 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3510 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3511 (struct linux_target_ops) <breakpoint>: Remove.
3512 (struct linux_target_ops) <breakpoint_len>: Remove.
3513 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3514 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3515
4cd98a19
AT
35162015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3517
3518 * linux-cris-low.c (cris_get_pc): Remove void arg.
3519
774ee6d2
AR
35202015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3521
3522 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3523 variable name.
3524
833dcd29
AR
35252015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3526
3527 * inferiors.c (thread_pid_matches_callback): New function.
3528 (find_thread_process): New function.
3529 (remove_thread): Reset current_thread.
3530 (remove_process): Assert threads have been removed first.
3531
8d689ee5
YQ
35322015-10-15 Yao Qi <yao.qi@linaro.org>
3533
3534 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3535 if it is 3.
3536 (aarch64_remove_point): Likewise.
3537 * regcache.c (regcache_register_size): New function.
3538
1c2e1515
YQ
35392015-10-12 Yao Qi <yao.qi@linaro.org>
3540
3541 * linux-aarch64-low.c: Update all callers as emit_load_store
3542 is renamed to aarch64_emit_load_store.
3543
e1c587c3
YQ
35442015-10-12 Yao Qi <yao.qi@linaro.org>
3545
3546 * linux-aarch64-low.c: Update all callers of function renaming
3547 from emit_insn to aarch64_emit_insn.
3548
b6542f81
YQ
35492015-10-12 Yao Qi <yao.qi@linaro.org>
3550
3551 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3552 arch/aarch64-insn.h.
3553 (struct aarch64_memory_operand): Likewise.
3554 (ENCODE): Likewise.
3555 (emit_insn): Move to arch/aarch64-insn.c.
3556 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3557 (emit_load_store): Move to arch/aarch64-insn.c.
3558 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3559 (can_encode_int32): Remove.
3560
246994ce
YQ
35612015-10-12 Yao Qi <yao.qi@linaro.org>
3562
3563 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3564 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3565 (aarch64_relocate_instruction): Likewise.
3566 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3567 (struct aarch64_insn_visitor): Likewise.
3568
0badd99f
YQ
35692015-10-12 Yao Qi <yao.qi@linaro.org>
3570
3571 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3572 (struct aarch64_insn_visitor): New.
3573 (struct aarch64_insn_relocation_data): New.
3574 (aarch64_ftrace_insn_reloc_b): New function.
3575 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3576 (aarch64_ftrace_insn_reloc_cb): Likewise.
3577 (aarch64_ftrace_insn_reloc_tb): Likewise.
3578 (aarch64_ftrace_insn_reloc_adr): Likewise.
3579 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3580 (aarch64_ftrace_insn_reloc_others): Likewise.
3581 (visitor): New.
3582 (aarch64_relocate_instruction): Use visitor.
3583
dfaffe9d
YQ
35842015-10-12 Yao Qi <yao.qi@linaro.org>
3585
3586 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3587 int. Add argument buf.
3588 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3589 aarch64_relocate_instruction.
3590
70b439f0
YQ
35912015-10-12 Yao Qi <yao.qi@linaro.org>
3592
3593 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3594 argument insn. Remove local variable insn. Don't call
3595 target_read_uint32.
3596 (aarch64_install_fast_tracepoint_jump_pad): Call
3597 target_read_uint32.
3598
7781c06f
YQ
35992015-09-30 Yao Qi <yao.qi@linaro.org>
3600
3601 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3602 (emit_load_store_pair): Likewise.
3603
9a3c8263
SM
36042015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3605
3606 * dll.c (match_dll): Add cast(s).
3607 (unloaded_dll): Likewise.
3608 * linux-low.c (second_thread_of_pid_p): Likewise.
3609 (delete_lwp_callback): Likewise.
3610 (count_events_callback): Likewise.
3611 (select_event_lwp_callback): Likewise.
3612 (linux_set_resume_request): Likewise.
3613 * server.c (accumulate_file_name_length): Likewise.
3614 (emit_dll_description): Likewise.
3615 (handle_qxfer_threads_worker): Likewise.
3616 (visit_actioned_threads): Likewise.
3617 * thread-db.c (any_thread_of): Likewise.
3618 * tracepoint.c (same_process_p): Likewise.
3619 (match_blocktype): Likewise.
3620 (build_traceframe_info_xml): Likewise.
3621
224c3ddb
SM
36222015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3623
3624 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3625 assignment.
3626 (gdb_unparse_agent_expr): Likewise.
3627 * hostio.c (require_data): Likewise.
3628 (handle_pread): Likewise.
3629 * linux-low.c (disable_regset): Likewise.
3630 (fetch_register): Likewise.
3631 (store_register): Likewise.
3632 (get_dynamic): Likewise.
3633 (linux_qxfer_libraries_svr4): Likewise.
3634 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3635 (set_fast_tracepoint_jump): Likewise.
3636 (uninsert_fast_tracepoint_jumps_at): Likewise.
3637 (reinsert_fast_tracepoint_jumps_at): Likewise.
3638 (validate_inserted_breakpoint): Likewise.
3639 (clone_agent_expr): Likewise.
3640 * regcache.c (init_register_cache): Likewise.
3641 * remote-utils.c (putpkt_binary_1): Likewise.
3642 (decode_M_packet): Likewise.
3643 (decode_X_packet): Likewise.
3644 (look_up_one_symbol): Likewise.
3645 (relocate_instruction): Likewise.
3646 (monitor_output): Likewise.
3647 * server.c (handle_search_memory): Likewise.
3648 (handle_qxfer_exec_file): Likewise.
3649 (handle_qxfer_libraries): Likewise.
3650 (handle_qxfer): Likewise.
3651 (handle_query): Likewise.
3652 (handle_v_cont): Likewise.
3653 (handle_v_run): Likewise.
3654 (captured_main): Likewise.
3655 * target.c (write_inferior_memory): Likewise.
3656 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3657 * tracepoint.c (init_trace_buffer): Likewise.
3658 (add_tracepoint_action): Likewise.
3659 (add_traceframe): Likewise.
3660 (add_traceframe_block): Likewise.
3661 (cmd_qtdpsrc): Likewise.
3662 (cmd_qtdv): Likewise.
3663 (cmd_qtstatus): Likewise.
3664 (response_source): Likewise.
3665 (response_tsv): Likewise.
3666 (cmd_qtnotes): Likewise.
3667 (gdb_collect): Likewise.
3668 (initialize_tracepoint): Likewise.
3669
afbe19f8
PL
36702015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3671
3672 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3673 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3674 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3675 <NOP>: New.
3676 (enum aarch64_condition_codes): New enum.
3677 (w0): New static global.
3678 (fp): Likewise.
3679 (lr): Likewise.
3680 (struct aarch64_memory_operand) <type>: New
3681 MEMORY_OPERAND_POSTINDEX type.
3682 (postindex_memory_operand): New helper function.
3683 (emit_ret): New function.
3684 (emit_load_store_pair): New function, factored out of emit_stp
3685 with support for MEMORY_OPERAND_POSTINDEX.
3686 (emit_stp): Rewrite using emit_load_store_pair.
3687 (emit_ldp): New function.
3688 (emit_load_store): Likewise.
3689 (emit_ldr): Mention post-index instruction in comment.
3690 (emit_ldrh): New function.
3691 (emit_ldrb): New function.
3692 (emit_ldrsw): Mention post-index instruction in comment.
3693 (emit_str): Likewise.
3694 (emit_subs): New function.
3695 (emit_cmp): Likewise.
3696 (emit_and): Likewise.
3697 (emit_orr): Likewise.
3698 (emit_orn): Likewise.
3699 (emit_eor): Likewise.
3700 (emit_mvn): Likewise.
3701 (emit_lslv): Likewise.
3702 (emit_lsrv): Likewise.
3703 (emit_asrv): Likewise.
3704 (emit_mul): Likewise.
3705 (emit_sbfm): Likewise.
3706 (emit_sbfx): Likewise.
3707 (emit_ubfm): Likewise.
3708 (emit_ubfx): Likewise.
3709 (emit_csinc): Likewise.
3710 (emit_cset): Likewise.
3711 (emit_nop): Likewise.
3712 (emit_ops_insns): New helper function.
3713 (emit_pop): Likewise.
3714 (emit_push): Likewise.
3715 (aarch64_emit_prologue): New function.
3716 (aarch64_emit_epilogue): Likewise.
3717 (aarch64_emit_add): Likewise.
3718 (aarch64_emit_sub): Likewise.
3719 (aarch64_emit_mul): Likewise.
3720 (aarch64_emit_lsh): Likewise.
3721 (aarch64_emit_rsh_signed): Likewise.
3722 (aarch64_emit_rsh_unsigned): Likewise.
3723 (aarch64_emit_ext): Likewise.
3724 (aarch64_emit_log_not): Likewise.
3725 (aarch64_emit_bit_and): Likewise.
3726 (aarch64_emit_bit_or): Likewise.
3727 (aarch64_emit_bit_xor): Likewise.
3728 (aarch64_emit_bit_not): Likewise.
3729 (aarch64_emit_equal): Likewise.
3730 (aarch64_emit_less_signed): Likewise.
3731 (aarch64_emit_less_unsigned): Likewise.
3732 (aarch64_emit_ref): Likewise.
3733 (aarch64_emit_if_goto): Likewise.
3734 (aarch64_emit_goto): Likewise.
3735 (aarch64_write_goto_address): Likewise.
3736 (aarch64_emit_const): Likewise.
3737 (aarch64_emit_call): Likewise.
3738 (aarch64_emit_reg): Likewise.
3739 (aarch64_emit_pop): Likewise.
3740 (aarch64_emit_stack_flush): Likewise.
3741 (aarch64_emit_zero_ext): Likewise.
3742 (aarch64_emit_swap): Likewise.
3743 (aarch64_emit_stack_adjust): Likewise.
3744 (aarch64_emit_int_call_1): Likewise.
3745 (aarch64_emit_void_call_2): Likewise.
3746 (aarch64_emit_eq_goto): Likewise.
3747 (aarch64_emit_ne_goto): Likewise.
3748 (aarch64_emit_lt_goto): Likewise.
3749 (aarch64_emit_le_goto): Likewise.
3750 (aarch64_emit_gt_goto): Likewise.
3751 (aarch64_emit_ge_got): Likewise.
3752 (aarch64_emit_ops_impl): New static global variable.
3753 (aarch64_emit_ops): New target function, return
3754 &aarch64_emit_ops_impl.
3755 (struct linux_target_ops): Install it.
3756
bb903df0
PL
37572015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3758
3759 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3760 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3761 aarch64-ipa.o.
3762 * linux-aarch64-ipa.c: New file.
3763 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3764 and endian.h.
3765 (aarch64_get_thread_area): New target method.
3766 (extract_signed_bitfield): New helper function.
3767 (aarch64_decode_ldr_literal): New function.
3768 (enum aarch64_opcodes): New enum.
3769 (struct aarch64_register): New struct.
3770 (struct aarch64_operand): New struct.
3771 (x0): New static global.
3772 (x1): Likewise.
3773 (x2): Likewise.
3774 (x3): Likewise.
3775 (x4): Likewise.
3776 (w2): Likewise.
3777 (ip0): Likewise.
3778 (sp): Likewise.
3779 (xzr): Likewise.
3780 (aarch64_register): New helper function.
3781 (register_operand): Likewise.
3782 (immediate_operand): Likewise.
3783 (struct aarch64_memory_operand): New struct.
3784 (offset_memory_operand): New helper function.
3785 (preindex_memory_operand): Likewise.
3786 (enum aarch64_system_control_registers): New enum.
3787 (ENCODE): New macro.
3788 (emit_insn): New helper function.
3789 (emit_b): New function.
3790 (emit_bcond): Likewise.
3791 (emit_cb): Likewise.
3792 (emit_tb): Likewise.
3793 (emit_blr): Likewise.
3794 (emit_stp): Likewise.
3795 (emit_ldp_q_offset): Likewise.
3796 (emit_stp_q_offset): Likewise.
3797 (emit_load_store): Likewise.
3798 (emit_ldr): Likewise.
3799 (emit_ldrsw): Likewise.
3800 (emit_str): Likewise.
3801 (emit_ldaxr): Likewise.
3802 (emit_stxr): Likewise.
3803 (emit_stlr): Likewise.
3804 (emit_data_processing_reg): Likewise.
3805 (emit_data_processing): Likewise.
3806 (emit_add): Likewise.
3807 (emit_sub): Likewise.
3808 (emit_mov): Likewise.
3809 (emit_movk): Likewise.
3810 (emit_mov_addr): Likewise.
3811 (emit_mrs): Likewise.
3812 (emit_msr): Likewise.
3813 (emit_sevl): Likewise.
3814 (emit_wfe): Likewise.
3815 (append_insns): Likewise.
3816 (can_encode_int32_in): New helper function.
3817 (aarch64_relocate_instruction): New function.
3818 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3819 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3820 (struct linux_target_ops): Install aarch64_get_thread_area,
3821 aarch64_install_fast_tracepoint_jump_pad and
3822 aarch64_get_min_fast_tracepoint_insn_len.
3823
787749ea
PL
38242015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3825
3826 * Makefile.in (aarch64-insn.o): New rule.
3827 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3828
9812b2e6
YQ
38292015-09-21 Yao Qi <yao.qi@linaro.org>
3830
3831 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3832
18fe412b
YQ
38332015-09-21 Yao Qi <yao.qi@linaro.org>
3834
3835 * tracepoint.c (max_jump_pad_size): Remove.
3836
a0cc84cd
YQ
38372015-09-18 Yao Qi <yao.qi@linaro.org>
3838
3839 * linux-aarch64-low.c: Don't include sys/uio.h.
3840 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3841
d78908cf
WW
38422015-09-16 Wei-cheng Wang <cole945@gmail.com>
3843
3844 * tracepoint.c (eval_result_type): Change prototype.
3845 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3846
d57e0d50
PA
38472015-09-15 Pedro Alves <palves@redhat.com>
3848
3849 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3850 Check whether to report exec events instead of checking whether
3851 multiprocess is enabled.
3852
5a676acc
PA
38532015-09-15 Pedro Alves <palves@redhat.com>
3854
3855 PR remote/18965
3856 * remote-utils.c (prepare_resume_reply): Merge
3857 TARGET_WAITKIND_VFORK_DONE switch case with the
3858 TARGET_WAITKIND_FORKED case.
3859
7c5d0fad
YQ
38602015-09-15 Yao Qi <yao.qi@linaro.org>
3861
3862 * server.c (handle_query): Check string comparison using
3863 "else if" instead of "if".
3864
750ce8d1
YQ
38652015-09-15 Yao Qi <yao.qi@linaro.org>
3866
3867 * server.c (vCont_supported): New global variable.
3868 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3869 matches. Append ";vContSupported+" to own_buf.
3870 (handle_v_requests): Append ";s;S" to own_buf if target supports
3871 hardware single step or vCont_supported is false.
3872 (capture_main): Set vCont_supported to zero.
3873
70b90b91
YQ
38742015-09-15 Yao Qi <yao.qi@linaro.org>
3875
3876 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3877 it to ...
3878 (linux_supports_hardware_single_step): ... New function.
3879 (linux_target_ops): Update.
3880 * lynx-low.c (lynx_target_ops): Set field
3881 supports_hardware_single_step to target_can_do_hardware_single_step.
3882 * nto-low.c (nto_target_ops): Likewise.
3883 * spu-low.c (spu_target_ops): Likewise.
3884 * win32-low.c (win32_target_ops): Likewise.
3885 * target.c (target_can_do_hardware_single_step): New function.
3886 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3887 Remove. <supports_hardware_single_step>: New field.
3888 (target_supports_conditional_breakpoints): Remove.
3889 (target_supports_hardware_single_step): New macro.
3890 (target_can_do_hardware_single_step): Declare.
3891 * server.c (handle_query): Use target_supports_hardware_single_step
3892 instead of target_supports_conditional_breakpoints.
3893
ade90bde
YQ
38942015-09-15 Yao Qi <yao.qi@linaro.org>
3895
3896 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3897 function.
3898 (struct linux_target_ops the_low_target): Install
3899 aarch64_linux_siginfo_fixup.
3900
94585166
DB
39012015-09-11 Don Breazeal <donb@codesourcery.com>
3902 Luis Machado <lgustavo@codesourcery.com>
3903
3904 * linux-low.c (linux_mourn): Static declaration.
3905 (linux_arch_setup): Move in front of
3906 handle_extended_wait.
3907 (linux_arch_setup_thread): New function.
3908 (handle_extended_wait): Handle exec events. Call
3909 linux_arch_setup_thread. Make event_lwp argument a
3910 pointer-to-a-pointer.
3911 (check_zombie_leaders): Do not check stopped threads.
3912 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3913 (linux_low_filter_event): Add lwp and thread for exec'ing
3914 non-leader thread if leader thread has been deleted.
3915 Refactor code into linux_arch_setup_thread and call it.
3916 Pass child lwp pointer by reference to handle_extended_wait.
3917 (linux_wait_for_event_filtered): Update comment.
3918 (linux_wait_1): Prevent clobbering exec event status.
3919 (linux_supports_exec_events): New function.
3920 (linux_target_ops) <supports_exec_events>: Initialize new member.
3921 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3922 new member.
3923 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3924 * server.c (report_exec_events): New global variable.
3925 (handle_query): Handle qSupported query for exec-events feature.
3926 (captured_main): Initialize report_exec_events.
3927 * server.h (report_exec_events): Declare new global variable.
3928 * target.h (struct target_ops) <supports_exec_events>: New
3929 member.
3930 (target_supports_exec_events): New macro.
3931 * win32-low.c (win32_target_ops) <supports_exec_events>:
3932 Initialize new member.
3933
0568462b
MM
39342015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3935
3936 * linux-low.c (linux_low_enable_btrace): Remove.
3937 (linux_target_ops): Replace linux_low_enable_btrace with
3938 linux_enable_btrace.
3939
39edd165
YQ
39402015-09-03 Yao Qi <yao.qi@linaro.org>
3941
3942 * linux-aarch64-low.c (aarch64_insert_point): Call
3943 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3944 returns true.
3945
1db33b5a
UW
39462015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3947
3948 * linux-low.c (check_stopped_by_breakpoint): Use
3949 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3950
ab290430
PA
39512015-08-27 Pedro Alves <palves@redhat.com>
3952
3953 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3954
8d749320
SM
39552015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3956
6711b7f8
SM
3957 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3958 the XNEW-family equivalent.
8d749320
SM
3959 (compile_bytecodes): Likewise.
3960 * dll.c (loaded_dll): Likewise.
3961 * event-loop.c (append_callback_event): Likewise.
3962 (create_file_handler): Likewise.
3963 (create_file_event): Likewise.
3964 * hostio.c (handle_open): Likewise.
3965 * inferiors.c (add_thread): Likewise.
3966 (add_process): Likewise.
3967 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3968 * linux-arm-low.c (arm_new_process): Likewise.
3969 (arm_new_thread): Likewise.
3970 * linux-low.c (add_to_pid_list): Likewise.
3971 (linux_add_process): Likewise.
3972 (handle_extended_wait): Likewise.
3973 (add_lwp): Likewise.
3974 (enqueue_one_deferred_signal): Likewise.
3975 (enqueue_pending_signal): Likewise.
3976 (linux_resume_one_lwp_throw): Likewise.
3977 (linux_resume_one_thread): Likewise.
3978 (linux_read_memory): Likewise.
3979 (linux_write_memory): Likewise.
3980 * linux-mips-low.c (mips_linux_new_process): Likewise.
3981 (mips_linux_new_thread): Likewise.
3982 (mips_add_watchpoint): Likewise.
3983 * linux-x86-low.c (initialize_low_arch): Likewise.
3984 * lynx-low.c (lynx_add_process): Likewise.
3985 * mem-break.c (set_raw_breakpoint_at): Likewise.
3986 (set_breakpoint): Likewise.
3987 (add_condition_to_breakpoint): Likewise.
3988 (add_commands_to_breakpoint): Likewise.
3989 (clone_agent_expr): Likewise.
3990 (clone_one_breakpoint): Likewise.
3991 * regcache.c (new_register_cache): Likewise.
3992 * remote-utils.c (look_up_one_symbol): Likewise.
3993 * server.c (queue_stop_reply): Likewise.
3994 (start_inferior): Likewise.
3995 (queue_stop_reply_callback): Likewise.
3996 (handle_target_event): Likewise.
3997 * spu-low.c (fetch_ppc_memory): Likewise.
3998 (store_ppc_memory): Likewise.
3999 * target.c (set_target_ops): Likewise.
4000 * thread-db.c (thread_db_load_search): Likewise.
4001 (try_thread_db_load_1): Likewise.
4002 * tracepoint.c (add_tracepoint): Likewise.
4003 (add_tracepoint_action): Likewise.
4004 (create_trace_state_variable): Likewise.
4005 (cmd_qtdpsrc): Likewise.
4006 (cmd_qtro): Likewise.
4007 (add_while_stepping_state): Likewise.
4008 * win32-low.c (child_add_thread): Likewise.
4009 (get_image_name): Likewise.
4010
ed8b7b42
YQ
40112015-08-25 Yao Qi <yao.qi@linaro.org>
4012
4013 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
4014
db3cb7cb
YQ
40152015-08-25 Yao Qi <yao.qi@linaro.org>
4016
4017 * Makefile.in (aarch64-linux.o): New rule.
4018 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
4019 srv_tgtobj.
4020 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
4021 (aarch64_init_debug_reg_state): Make it extern.
4022 (aarch64_linux_prepare_to_resume): Remove.
4023
f6011a1c
YQ
40242015-08-25 Yao Qi <yao.qi@linaro.org>
4025
4026 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
4027 lwp_arch_private_info and ptid_of_lwp.
4028
88e2cf7e
YQ
40292015-08-25 Yao Qi <yao.qi@linaro.org>
4030
4031 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
4032 Find proc_info by find_process_pid. All callers updated.
4033
5e35436e
YQ
40342015-08-25 Yao Qi <yao.qi@linaro.org>
4035
4036 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
4037 Remove.
4038 (debug_reg_change_callback): Remove.
4039 (aarch64_notify_debug_reg_change): Remove.
4040
4a8a7965
YQ
40412015-08-25 Yao Qi <yao.qi@linaro.org>
4042
4043 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
4044 Call current_lwp_ptid.
4045
32a271ee
YQ
40462015-08-25 Yao Qi <yao.qi@linaro.org>
4047
4048 * linux-aarch64-low.c (debug_reg_change_callback): Use
4049 debug_printf.
4050
0d51c8d7
YQ
40512015-08-25 Yao Qi <yao.qi@linaro.org>
4052
4053 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
4054
31a43dd5
YQ
40552015-08-25 Yao Qi <yao.qi@linaro.org>
4056
4057 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4058
8ee52567
YQ
40592015-08-25 Yao Qi <yao.qi@linaro.org>
4060
4061 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4062 the code.
4063
ff3f0f45
YQ
40642015-08-25 Yao Qi <yao.qi@linaro.org>
4065
4066 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4067 Remove.
4068 (debug_reg_change_callback): Remove argument entry and add argument
4069 lwp. Remove local variable thread. Don't print thread id in the
4070 debugging output. Don't check whether pid of thread equals to pid.
4071 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4072 iterate_over_lwps instead find_inferior.
4073
3d40fbb5
PA
40742015-08-24 Pedro Alves <palves@redhat.com>
4075
4076 * inferiors.c (get_first_process): New function.
4077 * inferiors.h (get_first_process): New declaration.
4078 * remote-utils.c (read_ptid): Default to the first process in the
4079 list, instead of to the current thread's process.
4080
438e1e42
PA
40812015-08-24 Pedro Alves <palves@redhat.com>
4082
4083 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4084 * event-loop.c: Likewise.
4085 * remote-utils.c: Likewise.
4086 * tracepoint.c: Likewise.
4087
a8c6d4fc
PA
40882015-08-24 Pedro Alves <palves@redhat.com>
4089
4090 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4091 ptid_get_lwp.
4092
99b0bb12
PA
40932015-08-21 Pedro Alves <palves@redhat.com>
4094
4095 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4096 instead of literal 1.
4097
f8904751
PA
40982015-08-21 Pedro Alves <palves@redhat.com>
4099
4100 * tdesc.c (default_description): Explicitly zero-initialize.
4101
465a859e
PA
41022015-08-21 Pedro Alves <palves@redhat.com>
4103
4104 PR gdb/18749
4105 * inferiors.c (remove_thread): Discard any pending stop reply for
4106 this thread.
4107 * server.c (remove_all_on_match_pid): Rename to ...
4108 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4109 instead of a pid.
4110 (discard_queued_stop_replies): Change parameter to a ptid. Now
4111 extern.
4112 (handle_v_kill, kill_inferior_callback, captured_main)
4113 (process_serial_event): Adjust.
4114 * server.h (discard_queued_stop_replies): Declare.
4115
f0db101d
PA
41162015-08-21 Pedro Alves <palves@redhat.com>
4117
4118 * linux-low.c (wait_for_sigstop): Always switch to no thread
4119 selected if the previously current thread dies.
4120 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4121 process instead of the current thread's.
4122 * remote-utils.c (input_interrupt): Don't check if there's no
4123 current thread.
4124 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4125 current thread to the general thread fails, error out.
4126 (handle_qxfer_auxv, handle_qxfer_libraries)
4127 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4128 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4129 (handle_query): Check if there's a thread selected instead of
4130 checking whether there's any thread in the thread list.
4131 (handle_qxfer_threads, handle_qxfer_btrace)
4132 (handle_qxfer_btrace_conf): Don't error out early if there's no
4133 thread in the thread list.
4134 (handle_v_cont, myresume): Don't set the current thread to the
4135 continue thread.
4136 (process_serial_event) <Hg handling>: Also set thread_id if the
4137 previous general thread is still alive.
4138 (process_serial_event) <g/G handling>: If setting the current
4139 thread to the general thread fails, error out.
4140 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4141 thread's lwp instead of the current thread's.
4142 * target.c (set_desired_thread): If the desired thread was not
4143 found, leave the current thread pointing to NULL. Return an int
4144 (boolean) indicating success.
4145 * target.h (set_desired_thread): Change return type to int.
4146
40045d91
MF
41472015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4148
4149 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4150 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4151 #includes.
4152 (ps_get_thread_area): New function.
4153
45face3b
GB
41542015-08-19 Gary Benson <gbenson@redhat.com>
4155
4156 * hostio.c (handle_pread): Do not attempt to read more data
4157 than hostio_reply_with_data can fit in a packet.
4158
16d5f642
JB
41592015-08-18 Joel Brobecker <brobecker@adacore.com>
4160
4161 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4162
a738da3a
MF
41632015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4164
4165 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4166
33ebda9d
PA
41672015-08-06 Pedro Alves <palves@redhat.com>
4168
4169 * tracepoint.c (expr_eval_result): Now an int.
4170
a44892be
PA
41712015-08-06 Pedro Alves <palves@redhat.com>
4172
4173 * gdbthread.h (struct regcache): Forward declare.
4174 (struct thread_info) <regcache_data>: Now a struct regcache
4175 pointer.
4176 * inferiors.c (inferior_regcache_data)
4177 (set_inferior_regcache_data): Now work with struct regcache
4178 pointers.
4179 * inferiors.h (struct regcache): Forward declare.
4180 (inferior_regcache_data, set_inferior_regcache_data): Now work
4181 with struct regcache pointers.
4182 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4183 (free_register_cache_thread): Remove struct regcache pointer
4184 casts.
4185
608a1e46
PA
41862015-08-06 Pedro Alves <palves@redhat.com>
4187
4188 * server.c (captured_main): On error, print the exception message
4189 to stderr, and if run_once is set, throw a quit.
4190
f0ce0d3a
PA
41912015-08-06 Pedro Alves <palves@redhat.com>
4192
4193 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4194 the current thread.
4195
bf47e248
PA
41962015-08-06 Pedro Alves <palves@redhat.com>
4197
4198 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4199 reading beyond the passed in buffer length.
4200
b6b9ffcc
PL
42012015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4202
4203 * tracepoint.c (symbol_list) <required>: Remove.
4204
863d01bd
PA
42052015-08-06 Pedro Alves <palves@redhat.com>
4206
4207 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4208 count if stopping and suspending threads.
4209 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4210 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4211 (linux_detach): Complete an ongoing step-over.
4212 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4213 throughout.
4214 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4215 (linux_wait_1): If passing a signal to the inferior after
4216 finishing a step-over, unsuspend and re-resume all lwps. If we
4217 see a single-step event but the thread should be continuing, don't
4218 pass the trap to gdb.
4219 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4220 internal_error instead of gdb_assert.
4221 (enqueue_pending_signal): New function.
4222 (check_ptrace_stopped_lwp_gone): Add debug output.
4223 (start_step_over): Use internal_error instead of gdb_assert.
4224 (complete_ongoing_step_over): New function.
4225 (linux_resume_one_thread): Don't resume a suspended thread.
4226 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4227 it stepping.
4228
00db26fa
PA
42292015-08-06 Pedro Alves <palves@redhat.com>
4230
4231 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4232 (linux_thread_alive): Use lwp_is_marked_dead.
4233 (extended_event_reported): Delete.
4234 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4235 instead of extended_event_reported.
4236 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4237 as well.
4238 (lwp_is_marked_dead): New function.
4239 (lwp_running): Use lwp_is_marked_dead.
4240 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4241 comment.
4242
ad071a30
PA
42432015-08-06 Pedro Alves <palves@redhat.com>
4244
4245 * linux-low.c (linux_wait_1): Move fork event output out of the
4246 !report_to_gdb check. Pass event_child->waitstatus to
4247 target_waitstatus_to_string instead of ourstatus.
4248
524b57e6
YQ
42492015-08-04 Yao Qi <yao.qi@linaro.org>
4250
4251 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4252 if current_thread is 32 bit.
4253
6085d6f6
YQ
42542015-08-04 Yao Qi <yao.qi@linaro.org>
4255
4256 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4257 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4258 * server.c (extended_protocol): Remove "static".
4259 * server.h (extended_protocol): Declare it.
4260
8a7e4587
YQ
42612015-08-04 Yao Qi <yao.qi@linaro.org>
4262
4263 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4264 both aarch64 and aarch32.
4265 (aarch64_set_pc): Likewise.
4266
3b53ae99
YQ
42672015-08-04 Yao Qi <yao.qi@linaro.org>
4268
4269 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4270 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4271 arm-with-neon.xml to srv_xmlfiles.
4272 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4273 (is_64bit_tdesc): New function.
4274 (aarch64_linux_read_description): New function.
4275 (aarch64_arch_setup): Call aarch64_linux_read_description.
4276 (regs_info): Rename to regs_info_aarch64.
4277 (aarch64_regs_info): Return right regs_info.
4278 (initialize_low_arch): Call initialize_low_arch_aarch32.
4279
bd9e6534
YQ
42802015-08-04 Yao Qi <yao.qi@linaro.org>
4281
4282 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4283 * linux-aarch32-low.c: New file.
4284 * linux-aarch32-low.h: New file.
4285 * linux-arm-low.c (arm_fill_gregset): Move it to
4286 linux-aarch32-low.c.
4287 (arm_store_gregset): Likewise.
4288 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4289 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4290 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4291 (regs_info): Rename to regs_info_arm.
4292 (arm_regs_info): Return regs_info_aarch32 if
4293 have_ptrace_getregset is 1 and target description is
4294 arm_with_neon or arm_with_vfpv3.
4295 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4296 Call initialize_low_arch_aarch32 instead.
4297
ded48a5e
YQ
42982015-08-04 Yao Qi <yao.qi@linaro.org>
4299
4300 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4301 * linux-low.c: ... here.
4302 * linux-low.h (have_ptrace_getregset): Declare it.
4303
96e9210f
PA
43042015-08-04 Pedro Alves <palves@redhat.com>
4305
4306 * thread-db.c (struct thread_db): Use new typedefs.
4307 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4308 CHK calls.
4309 (disable_thread_event_reporting): Cast result of dlsym to
4310 destination function pointer type.
4311 (thread_db_mourn): Use td_ta_delete_ftype.
4312
af60a1ef
SL
43132015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4314
4315 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4316 arch variant.
4317 (CDX_BREAKPOINT): Define for R2.
4318 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4319 (the_low_target): Add comments.
4320
e8b41681
YQ
43212015-07-30 Yao Qi <yao.qi@linaro.org>
4322
4323 * linux-arm-low.c (arm_hwcap): Remove it.
4324 (arm_read_description): New local variable arm_hwcap. Don't
4325 set arm_hwcap to zero.
4326
89abb039
YQ
43272015-07-30 Yao Qi <yao.qi@linaro.org>
4328
4329 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4330 Use regcache->tdesc instead.
4331 (arm_store_wmmxregset): Likewise.
4332 (arm_fill_vfpregset): Likewise.
4333 (arm_store_vfpregset): Likewise.
4334
deca266c
YQ
43352015-07-30 Yao Qi <yao.qi@linaro.org>
4336
4337 * linux-arm-low.c: Include arch/arm.h.
4338 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4339 (arm_store_gregset): Likewise.
4340
aa58a496
SM
43412015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4342
4343 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4344 ptrace's 4th parameter.
4345
50904b25
YQ
43462015-07-27 Yao Qi <yao.qi@linaro.org>
4347
4348 * configure.srv (case aarch64*-*-linux*): Don't set
4349 srv_linux_usrregs.
4350
5826e159
PA
43512015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4352
4353 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4354 sys/ptrace.h.
4355 * linux-arm-low.c: Likewise.
4356 * linux-cris-low.c: Likewise.
4357 * linux-crisv32-low.c: Likewise.
4358 * linux-low.c: Likewise.
4359 * linux-m68k-low.c: Likewise.
4360 * linux-mips-low.c: Likewise.
4361 * linux-nios2-low.c: Likewise.
4362 * linux-s390-low.c: Likewise.
4363 * linux-sparc-low.c: Likewise.
4364 * linux-tic6x-low.c: Likewise.
4365 * linux-tile-low.c: Likewise.
4366 * linux-x86-low.c: Likewise.
4367
54019719
PA
43682015-07-24 Pedro Alves <palves@redhat.com>
4369
4370 * config.in: Regenerate.
4371 * configure: Regenerate.
4372
eb7aa561
PA
43732015-07-24 Pedro Alves <palves@redhat.com>
4374
4375 * acinclude.m4: Include ../ptrace.m4.
4376 * configure.ac: Call GDB_AC_PTRACE.
4377 * config.in, configure: Regenerate.
4378
55d7b841
YQ
43792015-07-24 Yao Qi <yao.qi@linaro.org>
4380
4381 * linux-low.c (linux_create_inferior): Remove setting to
4382 proc->priv->new_inferior.
4383 (linux_attach): Likewise.
4384 (linux_low_filter_event): Likewise.
4385 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4386
c06cbd92
YQ
43872015-07-24 Yao Qi <yao.qi@linaro.org>
4388
4389 * linux-low.c (linux_arch_setup): New function.
4390 (linux_low_filter_event): If proc->tdesc is NULL and
4391 proc->attached is true, call the_low_target.arch_setup.
4392 Otherwise, keep status pending, and return.
4393 (linux_resume_one_lwp_throw): Don't call get_pc if
4394 thread->while_stepping isn't NULL. Don't call
4395 get_thread_regcache if proc->tdesc is NULL.
4396 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4397 (linux_target_ops): Install arch_setup.
4398 * server.c (start_inferior): Call the_target->arch_setup.
4399 * target.h (struct target_ops) <arch_setup>: New field.
4400 (target_arch_setup): New marco.
4401 * lynx-low.c (lynx_target_ops): Update.
4402 * nto-low.c (nto_target_ops): Update.
4403 * spu-low.c (spu_target_ops): Update.
4404 * win32-low.c (win32_target_ops): Update.
4405
5ae3ebba
YQ
44062015-07-24 Yao Qi <yao.qi@linaro.org>
4407
4408 * linux-low.c (linux_add_process): Don't set
4409 proc->priv->new_inferior.
4410 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4411 (linux_attach): Likewise.
4412
eb97750b
YQ
44132015-07-24 Yao Qi <yao.qi@linaro.org>
4414
4415 * server.c (start_inferior): Code refactor.
4416
51aee833
YQ
44172015-07-24 Yao Qi <yao.qi@linaro.org>
4418
4419 * server.c (process_serial_event): Set general_thread.
4420
af1b22f3
YQ
44212015-07-21 Yao Qi <yao.qi@linaro.org>
4422
4423 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4424 aarch64_linux_get_debug_reg_capacity.
4425
554717a3
YQ
44262015-07-17 Yao Qi <yao.qi@linaro.org>
4427
4428 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4429 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4430 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4431 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4432 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4433 (AARCH64_HWP_ALIGNMENT): Likewise.
4434 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4435 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4436 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4437 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4438 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4439 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4440 (struct aarch64_debug_reg_state): Likewise.
4441 (struct arch_lwp_info): Likewise.
4442 (aarch64_align_watchpoint): Likewise.
4443 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4444 (aarch64_watchpoint_length): Likewise.
4445 (aarch64_point_encode_ctrl_reg): Likewise
4446 (aarch64_point_is_aligned): Likewise.
4447 (aarch64_align_watchpoint): Likewise.
4448 (aarch64_linux_set_debug_regs):
4449 (aarch64_dr_state_insert_one_point): Likewise.
4450 (aarch64_dr_state_remove_one_point): Likewise.
4451 (aarch64_handle_breakpoint): Likewise.
4452 (aarch64_handle_aligned_watchpoint): Likewise.
4453 (aarch64_handle_unaligned_watchpoint): Likewise.
4454 (aarch64_handle_watchpoint): Likewise.
4455
c67ca4de
YQ
44562015-07-17 Yao Qi <yao.qi@linaro.org>
4457
4458 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4459 and don't aarch64_get_debug_reg_state. All callers update.
4460 (aarch64_handle_aligned_watchpoint): Likewise.
4461 (aarch64_handle_unaligned_watchpoint): Likewise.
4462 (aarch64_handle_watchpoint): Likewise.
4463 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4464 (aarch64_remove_point): Likewise.
4465
25abf979
YQ
44662015-07-17 Yao Qi <yao.qi@linaro.org>
4467
4468 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4469 debug_printf.
4470 (aarch64_handle_unaligned_watchpoint): Likewise.
4471
db1ff28b
JK
44722015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4473
4474 Revert the previous 3 commits:
4475 Move gdb_regex* to common/
4476 Move linux_find_memory_regions_full & co.
4477 gdbserver build-id attribute generator
4478
700ca40f
JK
44792015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4480 Jan Kratochvil <jan.kratochvil@redhat.com>
4481
4482 gdbserver build-id attribute generator.
4483 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4484 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4485 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4486 (find_phdr): New.
4487 (get_dynamic): Use find_pdhr to traverse program headers.
4488 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4489 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4490 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4491 (get_hex_build_id): New.
4492 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4493 to reply XML document.
4494
9904185c
JK
44952015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4496 Jan Kratochvil <jan.kratochvil@redhat.com>
4497
4498 * target.c: Include target/target-utils.h and fcntl.h.
4499 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4500 (target_fileio_read_stralloc): New functions.
4501
6e5b4429
JK
45022015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4503
4504 * Makefile.in (OBS): Add gdb_regex.o.
4505 (gdb_regex.o): New.
4506 * config.in: Rebuilt.
4507 * configure: Rebuilt.
4508
ddc98fbf
JK
45092015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4510 Jan Kratochvil <jan.kratochvil@redhat.com>
4511
4512 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4513 * Makefile.in (OBS): Add target-utils.o.
4514 (linux-maps.o, target-utils.o): New.
4515 * configure.srv (srv_linux_obj): Add linux-maps.o.
4516
e57bb7a0
PL
45172015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4518
4519 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4520 function, return 1.
4521 (the_low_target): Install it.
4522
586b02a9
PA
45232015-07-14 Pedro Alves <palves@redhat.com>
4524
4525 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4526 Instead, ignore ECHILD, and throw an error for other errnos.
4527
58c1b36c
PA
45282015-07-10 Pedro Alves <palves@redhat.com>
4529
4530 * event-loop.c (struct callback_event) <data>: Change type to
4531 gdb_client_data instance instead of gdb_client_data pointer.
4532 (append_callback_event): Adjust.
4533
421530db
PL
45342015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4535
4536 * linux-aarch64-low.c: Add comments for each linux_target_ops
4537 method. Remove comments already covered in target_ops and
4538 linux_target_ops definitions.
4539 (the_low_target): Add comments for each unimplemented method.
4540
c2d65f38
YQ
45412015-07-09 Yao Qi <yao.qi@linaro.org>
4542
4543 * linux-aarch64-low.c (aarch64_regmap): Remove.
4544 (aarch64_usrregs_info): Remove.
4545 (regs_info): Set field usrregs to NULL.
4546
b20a6524
MM
45472015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4548
4549 * linux-low.c: Include "rsp-low.h"
4550 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4551 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4552 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4553 (handle_btrace_enable_pt): New.
4554 (handle_btrace_general_set): Support "pt".
4555 (handle_btrace_conf_general_set): Support "pt:size".
4556
96c97461
PL
45572015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4558
4559 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4560 Z_PACKET_SW_BP.
4561
37d66942
PL
45622015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4563
4564 * linux-aarch64-low.c: Remove comment about endianness.
4565 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4566 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4567 memcmp.
4568
dc06243f
GB
45692015-06-24 Gary Benson <gbenson@redhat.com>
4570
4571 * linux-i386-ipa.c (stdint.h): Do not include.
4572 * lynx-i386-low.c (stdint.h): Likewise.
4573 * lynx-ppc-low.c (stdint.h): Likewise.
4574 * mem-break.c (stdint.h): Likewise.
4575 * thread-db.c (stdint.h): Likewise.
4576 * tracepoint.c (stdint.h): Likewise.
4577 * win32-low.c (stdint.h): Likewise.
4578
124e13d9
SM
45792015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4580
4581 * server.c (write_qxfer_response): Update call to
4582 remote_escape_output.
4583
909c2cda
JK
45842015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4585 Jan Kratochvil <jan.kratochvil@redhat.com>
4586
4587 Merge multiple hex conversions.
4588 * gdbreplay.c (tohex): Rename to 'fromhex'.
4589 (logchar): Use fromhex.
4590
24c05f46
JK
45912015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4592
4593 * server.c (handle_qxfer_libraries): Set `version' attribute for
4594 <library-list>.
4595
14d2069a
GB
45962015-06-10 Gary Benson <gbenson@redhat.com>
4597
4598 * target.h (struct target_ops) <multifs_open>: New field.
4599 <multifs_unlink>: Likewise.
4600 <multifs_readlink>: Likewise.
4601 * linux-low.c (nat/linux-namespaces.h): New include.
4602 (linux_target_ops): Initialize the_target->multifs_open,
4603 the_target->multifs_unlink and the_target->multifs_readlink.
4604 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4605 * hostio.c (hostio_fs_pid): New static variable.
4606 (hostio_handle_new_gdb_connection): New function.
4607 (handle_setfs): Likewise.
4608 (handle_open): Use the_target->multifs_open as appropriate.
4609 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4610 (handle_readlink): Use the_target->multifs_readlink as
4611 appropriate.
4612 (handle_vFile): Handle vFile:setfs packets.
4613 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4614 after target_handle_new_gdb_connection.
4615
4b8b5e72
GB
46162015-06-10 Gary Benson <gbenson@redhat.com>
4617
4618 * configure.ac (AC_CHECK_FUNCS): Add setns.
4619 * config.in: Regenerate.
4620 * configure: Likewise.
4621 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4622 (linux-namespaces.o): New rule.
4623 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4624
3ac2e371
GB
46252015-06-09 Gary Benson <gbenson@redhat.com>
4626
4627 * hostio.c (handle_open): Process mode argument with
4628 fileio_to_host_mode.
4629
ca9b78ce
YQ
46302015-06-01 Yao Qi <yao.qi@linaro.org>
4631
4632 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4633 * linux-x86-low.c: Likewise.
4634
bfacd19d
DB
46352015-05-28 Don Breazeal <donb@codesourcery.com>
4636
4637 * linux-low.c (handle_extended_wait): Initialize
4638 thread_info.last_resume_kind for new fork children.
4639
452003ef
PA
46402015-05-15 Pedro Alves <palves@redhat.com>
4641
4642 * target.h (target_handle_new_gdb_connection): Rewrite using if
4643 wrapped in do/while.
4644
1041a03c
JB
46452015-05-14 Joel Brobecker <brobecker@adacore.com>
4646
4647 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4648 * configure, config.in: Regenerate.
4649 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4650 Declare typedef.
4651
c269dbdb
DB
46522015-05-12 Don Breazeal <donb@codesourcery.com>
4653
4654 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4655 PTRACE_EVENT_VFORK_DONE.
4656 (linux_low_ptrace_options, extended_event_reported): Add vfork
4657 events.
4658 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4659 and "vforkdone" for RSP 'T' Stop Reply Packet.
4660 * server.h (report_vfork_events): Declare
4661 global variable.
4662
3a8a0396
DB
46632015-05-12 Don Breazeal <donb@codesourcery.com>
4664
4665 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4666 (the_low_target) <new_fork>: Initialize new member.
4667 * linux-arm-low.c (arm_new_fork): New function.
4668 (the_low_target) <new_fork>: Initialize new member.
4669 * linux-low.c (handle_extended_wait): Call new target function
4670 new_fork.
4671 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4672 * linux-mips-low.c (mips_add_watchpoint): New function
4673 extracted from mips_insert_point.
4674 (the_low_target) <new_fork>: Initialize new member.
4675 (mips_linux_new_fork): New function.
4676 (mips_insert_point): Call mips_add_watchpoint.
4677 * linux-x86-low.c (x86_linux_new_fork): New function.
4678 (the_low_target) <new_fork>: Initialize new member.
4679
de0d863e
DB
46802015-05-12 Don Breazeal <donb@codesourcery.com>
4681
4682 * linux-low.c (handle_extended_wait): Implement return value,
4683 rename argument 'event_child' to 'event_lwp', handle
4684 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4685 (linux_low_ptrace_options): New function.
4686 (linux_low_filter_event): Call linux_low_ptrace_options,
4687 use different argument fo linux_enable_event_reporting,
4688 use return value from handle_extended_wait.
4689 (extended_event_reported): New function.
4690 (linux_wait_1): Call extended_event_reported and set
4691 status to report fork events.
4692 (linux_write_memory): Add pid to debug message.
4693 (reset_lwp_ptrace_options_callback): New function.
4694 (linux_handle_new_gdb_connection): New function.
4695 (linux_target_ops): Initialize new structure member.
4696 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4697 * lynx-low.c: Initialize new structure member.
4698 * remote-utils.c (prepare_resume_reply): Implement stop reason
4699 "fork" for "T" stop message.
4700 * server.c (handle_query): Call handle_new_gdb_connection.
4701 * server.h (report_fork_events): Declare global flag.
4702 * target.h (struct target_ops) <handle_new_gdb_connection>:
4703 New member.
4704 (target_handle_new_gdb_connection): New macro.
4705 * win32-low.c: Initialize new structure member.
4706
ddcbc397
DB
47072015-05-12 Don Breazeal <donb@codesourcery.com>
4708
4709 * mem-break.c (APPEND_TO_LIST): Define macro.
4710 (clone_agent_expr): New function.
4711 (clone_one_breakpoint): New function.
4712 (clone_all_breakpoints): New function.
4713 * mem-break.h: Declare new functions.
4714
89245bc0
DB
47152015-05-12 Don Breazeal <donb@codesourcery.com>
4716
4717 * linux-low.c (linux_supports_fork_events): New function.
4718 (linux_supports_vfork_events): New function.
4719 (linux_target_ops): Initialize new structure members.
4720 (initialize_low): Call linux_check_ptrace_features.
4721 * lynx-low.c (lynx_target_ops): Initialize new structure
4722 members.
4723 * server.c (report_fork_events, report_vfork_events):
4724 New global flags.
4725 (handle_query): Add new features to qSupported packet and
4726 response.
4727 (captured_main): Initialize new global variables.
4728 * target.h (struct target_ops) <supports_fork_events>:
4729 New member.
4730 <supports_vfork_events>: New member.
4731 (target_supports_fork_events): New macro.
4732 (target_supports_vfork_events): New macro.
4733 * win32-low.c (win32_target_ops): Initialize new structure
4734 members.
4735
835205d0
GB
47362015-05-12 Gary Benson <gbenson@redhat.com>
4737
4738 * server.c (handle_qxfer_exec_file): Use current process
4739 if annex is empty.
4740
21e94bd9
SL
47412015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4742
4743 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4744 Remove HAVE_PTRACE_GETREGS conditionals.
4745 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4746 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4747
45614f15
YQ
47482015-05-08 Yao Qi <yao.qi@linaro.org>
4749
4750 * linux-low.c (linux_supports_conditional_breakpoints): New
4751 function.
4752 (linux_target_ops): Install new target method.
4753 * lynx-low.c (lynx_target_ops): Install NULL hook for
4754 supports_conditional_breakpoints.
4755 * nto-low.c (nto_target_ops): Likewise.
4756 * spu-low.c (spu_target_ops): Likewise.
4757 * win32-low.c (win32_target_ops): Likewise.
4758 * server.c (handle_query): Check
4759 target_supports_conditional_breakpoints.
4760 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4761 New field.
4762 (target_supports_conditional_breakpoints): New macro.
4763
80ad801e
PA
47642015-05-06 Pedro Alves <palves@redhat.com>
4765
4766 PR server/18081
4767 * server.c (start_inferior): If the process exits, mourn it.
4768
819843c7
GB
47692015-04-21 Gary Benson <gbenson@redhat.com>
4770
4771 * hostio.c (fileio_open_flags_to_host): Factored out to
4772 fileio_to_host_openflags in common/fileio.c. Single use
4773 updated.
4774
a2d5a9d7
MF
47752015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4776
4777 * linux-xtensa-low.c (xtensa_fill_gregset)
4778 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4779 XCHAL_HAVE_LOOP.
4780
deb44829
MF
47812015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4782
4783 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4784 (regs_info): Replace usrregs pointer with NULL.
4785
e57f1de3
GB
47862015-04-17 Gary Benson <gbenson@redhat.com>
4787
4788 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4789 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4790 * server.c (handle_qxfer_exec_file): New function.
4791 (qxfer_packets): Add exec-file entry.
4792 (handle_query): Report qXfer:exec-file:read as supported packet.
4793
62828379
RN
47942015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4795
4796 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4797
b88bb450
GB
47982015-04-09 Gary Benson <gbenson@redhat.com>
4799
4800 * hostio-errno.c (errno_to_fileio_error): Remove function.
4801 Update caller to use remote_fileio_to_fio_error.
4802
c8f4bfdd
YQ
48032015-04-09 Yao Qi <yao.qi@linaro.org>
4804
4805 * linux-low.c (linux_insert_point): Call
4806 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4807 (linux_remove_point): Call remove_memory_breakpoint if type is
4808 raw_bkpt_type_sw.
4809 * linux-x86-low.c (x86_insert_point): Don't call
4810 insert_memory_breakpoint.
4811 (x86_remove_point): Don't call remove_memory_breakpoint.
4812
41f98f02
PA
48132015-04-01 Pedro Alves <palves@redhat.com>
4814 Cleber Rosa <crosa@redhat.com>
4815
4816 * server.c (gdbserver_usage): Reorganize and extend the usage
4817 message.
4818
2bf6fb9d
PA
48192015-03-24 Pedro Alves <palves@redhat.com>
4820
4821 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4822 output. Also dump TRAP_TRACE.
4823 (linux_low_filter_event): In debug output, distinguish a
4824 resume_stop SIGSTOP from a delayed SIGSTOP.
4825
369f6daa
GB
48262015-03-24 Gary Benson <gbenson@redhat.com>
4827
4828 * linux-x86-low.c (x86_linux_new_thread): Moved to
4829 nat/x86-linux.c.
4830 (x86_linux_prepare_to_resume): Likewise.
4831
8e5d4070
GB
48322015-03-24 Gary Benson <gbenson@redhat.com>
4833
4834 * Makefile.in (x86-linux-dregs.o): New rule.
4835 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4836 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4837 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4838 (x86_linux_dr_get): Likewise.
4839 (x86_linux_dr_set): Likewise.
4840 (update_debug_registers_callback): Likewise.
4841 (x86_linux_dr_set_addr): Likewise.
4842 (x86_linux_dr_get_addr): Likewise.
4843 (x86_linux_dr_set_control): Likewise.
4844 (x86_linux_dr_get_control): Likewise.
4845 (x86_linux_dr_get_status): Likewise.
4846 (x86_linux_update_debug_registers): Likewise.
4847
2b95d440
GB
48482015-03-24 Gary Benson <gbenson@redhat.com>
4849
4850 * linux-x86-low.c (x86_linux_update_debug_registers):
4851 New function, factored out from...
4852 (x86_linux_prepare_to_resume): ...this.
4853
14b0bc68
GB
48542015-03-24 Gary Benson <gbenson@redhat.com>
4855
4856 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4857 (x86_linux_dr_set): Likewise.
4858 (update_debug_registers_callback): Likewise.
4859 (x86_linux_dr_set_addr): Likewise.
4860 (x86_linux_dr_get_addr): Likewise.
4861 (x86_linux_dr_set_control): Likewise.
4862 (x86_linux_dr_get_control): Likewise.
4863 (x86_linux_dr_get_status): Likewise.
4864 (x86_linux_prepare_to_resume): Likewise.
4865
5dfe6ca8
GB
48662015-03-24 Gary Benson <gbenson@redhat.com>
4867
4868 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4869 Use perror_with_name. Pass string through gettext.
4870 (x86_linux_dr_set): Likewise.
4871
d33472ad
GB
48722015-03-24 Gary Benson <gbenson@redhat.com>
4873
4874 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4875 (x86_linux_dr_set_addr): ...this.
4876 (x86_dr_low_get_addr): Rename to...
4877 (x86_linux_dr_get_addr): ...this.
4878 (x86_dr_low_set_control): Rename to...
4879 (x86_linux_dr_set_control): ...this.
4880 (x86_dr_low_get_control): Rename to...
4881 (x86_linux_dr_get_control): ...this.
4882 (x86_dr_low_get_status): Rename to...
4883 (x86_linux_dr_get_status): ...this.
4884 (x86_dr_low): Update with new function names.
4885
4b134ca1
GB
48862015-03-24 Gary Benson <gbenson@redhat.com>
4887
4888 * Makefile.in (x86-linux.o): New rule.
4889 * configure.srv: Add x86-linux.o to relevant targets.
4890 * linux-low.c (lwp_set_arch_private_info): New function.
4891 (lwp_arch_private_info): Likewise.
4892 * linux-x86-low.c: Include nat/x86-linux.h.
4893 (arch_lwp_info): Removed structure.
4894 (update_debug_registers_callback):
4895 Use lwp_set_debug_registers_changed.
4896 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4897 and lwp_set_debug_registers_changed.
4898 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4899
34c703da
GB
49002015-03-24 Gary Benson <gbenson@redhat.com>
4901
4902 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4903 * linux-arm-low.c (arm_new_thread): Likewise.
4904 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4905 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4906 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4907 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4908
cff068da
GB
49092015-03-24 Gary Benson <gbenson@redhat.com>
4910
4911 * linux-low.c (ptid_of_lwp): New function.
4912 (lwp_is_stopped): Likewise.
4913 (lwp_stop_reason): Likewise.
4914 * linux-x86-low.c (update_debug_registers_callback):
4915 Use lwp_is_stopped.
4916 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4917 lwp_stop_reason.
4918
b2f7c7e8
GB
49192015-03-24 Gary Benson <gbenson@redhat.com>
4920
4921 * linux-low.h (linux_stop_lwp): Remove declaration.
4922
6d4ee8c6
GB
49232015-03-24 Gary Benson <gbenson@redhat.com>
4924
4925 * linux-low.h: Include nat/linux-nat.h.
4926 * linux-low.c (iterate_over_lwps_args): New structure.
4927 (iterate_over_lwps_filter): New function.
4928 (iterate_over_lwps): Likewise.
4929 * linux-x86-low.c (update_debug_registers_callback):
4930 Update signature to what iterate_over_lwps expects.
4931 Remove PID check that iterate_over_lwps now performs.
4932 (x86_dr_low_set_addr): Use iterate_over_lwps.
4933 (x86_dr_low_set_control): Likewise.
4934
70a0bb6b
GB
49352015-03-24 Gary Benson <gbenson@redhat.com>
4936
4937 * linux-x86-low.c (x86_debug_reg_state): New function.
4938 (x86_linux_prepare_to_resume): Use the above.
4939
7b669087
GB
49402015-03-24 Gary Benson <gbenson@redhat.com>
4941
4942 * linux-low.c (current_lwp_ptid): New function.
4943 * linux-x86-low.c: Include nat/linux-nat.h.
4944 (x86_dr_low_get_addr): Use current_lwp_ptid.
4945 (x86_dr_low_get_control): Likewise.
4946 (x86_dr_low_get_status): Likewise.
4947
eef49a3d
PA
49482015-03-20 Pedro Alves <palves@redhat.com>
4949
4950 * tracepoint.c (cmd_qtstatus): Make "str" const.
4951
b2333d22
PA
49522015-03-20 Pedro Alves <palves@redhat.com>
4953
4954 * server.c (handle_general_set): Make "req_str" const.
4955
23f238d3
PA
49562015-03-19 Pedro Alves <palves@redhat.com>
4957
4958 * linux-low.c (linux_resume_one_lwp): Rename to ...
4959 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4960 instead call perror_with_name.
4961 (check_ptrace_stopped_lwp_gone): New function.
4962 (linux_resume_one_lwp): Reimplement as wrapper around
4963 linux_resume_one_lwp_throw that swallows errors if the LWP is
4964 gone.
4965
91baf43f
PA
49662015-03-19 Pedro Alves <palves@redhat.com>
4967
4968 * linux-low.c (count_events_callback, select_event_lwp_callback):
4969 No longer check whether the thread has resume_stop as last resume
4970 kind.
4971
8bf3b159
PA
49722015-03-19 Pedro Alves <palves@redhat.com>
4973
4974 * linux-low.c (count_events_callback, select_event_lwp_callback):
4975 Use the lwp's status_pending_p field, not the thread's.
4976
b90fc188
PA
49772015-03-19 Pedro Alves <palves@redhat.com>
4978
4979 * linux-low.c (select_event_lwp_callback): Update comments to
4980 no longer mention SIGTRAP.
4981
464b0089
GB
49822015-03-18 Gary Benson <gbenson@redhat.com>
4983
4984 * server.c (handle_query): Do not report vFile:fstat as supported.
4985
aa9e327f
GB
49862015-03-11 Gary Benson <gbenson@redhat.com>
4987
4988 * hostio.c (sys/types.h): New include.
4989 (sys/stat.h): Likewise.
4990 (common-remote-fileio.h): Likewise.
4991 (handle_fstat): New function.
4992 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4993
791c0056
GB
49942015-03-11 Gary Benson <gbenson@redhat.com>
4995
4996 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4997 struct stat.st_blocks and struct stat.st_blksize.
4998 * configure: Regenerate.
4999 * config.in: Likewise.
5000 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
5001 (OBS): Add common-remote-fileio.o.
5002 (common-remote-fileio.o): New rule.
5003
9a9df970
PA
50042015-03-09 Pedro Alves <palves@redhat.com>
5005
5006 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
5007 'struct sockaddr' pointer in 'accept' call.
5008
9eb1356e
PA
50092015-03-09 Pedro Alves <palves@redhat.com>
5010
5011 Revert:
5012 2015-03-07 Pedro Alves <palves@redhat.com>
5013 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5014 or <winsock2.h> here. Instead include "gdb_socket.h".
5015 (remote_open): Use union gdb_sockaddr_u.
5016 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5017 or <winsock2.h> here. Instead include "gdb_socket.h".
5018 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5019 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5020 or <sys/un.h>.
5021 (init_named_socket, gdb_agent_helper_thread): Use union
5022 gdb_sockaddr_u.
5023
aac331e4
PA
50242015-03-07 Pedro Alves <palves@redhat.com>
5025
5026 * configure.ac (build_warnings): Move
5027 -Wdeclaration-after-statement to the C-specific set.
5028 * configure: Regenerate.
5029
366c75fc
PA
50302015-03-07 Pedro Alves <palves@redhat.com>
5031
5032 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
5033 or <winsock2.h> here. Instead include "gdb_socket.h".
5034 (remote_open): Use union gdb_sockaddr_u.
5035 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
5036 or <winsock2.h> here. Instead include "gdb_socket.h".
5037 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
5038 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
5039 or <sys/un.h>.
5040 (init_named_socket, gdb_agent_helper_thread): Use union
5041 gdb_sockaddr_u.
5042
492d29ea
PA
50432015-03-07 Pedro Alves <palves@redhat.com>
5044
5045 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
5046 instead.
5047
60a191ed
YQ
50482015-03-06 Yao Qi <yao.qi@linaro.org>
5049
5050 * linux-aarch64-low.c (aarch64_insert_point): Use
5051 show_debug_regs as a boolean.
5052 (aarch64_remove_point): Likewise.
5053
f5771b1d
PA
50542015-03-05 Pedro Alves <palves@redhat.com>
5055
5056 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5057 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5058 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5059 * nto-low.c (nto_target_ops): Likewise.
5060 * spu-low.c (spu_target_ops): Likewise.
5061 * win32-low.c (win32_target_ops): Likewise.
5062
3e572f71
PA
50632015-03-04 Pedro Alves <palves@redhat.com>
5064
72f4393d 5065 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5066 Decide whether a breakpoint triggered based on the SIGTRAP's
5067 siginfo.si_code.
72f4393d
L
5068 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5069 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5070 (linux_low_filter_event): Check for breakpoints before checking
5071 watchpoints.
5072 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5073 siginfo.si_code.
72f4393d
L
5074 (linux_stopped_by_sw_breakpoint)
5075 (linux_supports_stopped_by_sw_breakpoint)
5076 (linux_stopped_by_hw_breakpoint)
5077 (linux_supports_stopped_by_hw_breakpoint): New functions.
5078 (linux_target_ops): Install new target methods.
3e572f71 5079
1ec68e26
PA
50802015-03-04 Pedro Alves <palves@redhat.com>
5081
5082 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5083 * server.c (swbreak_feature, hwbreak_feature): New globals.
5084 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5085 (captured_main): Clear swbreak_feature and hwbreak_feature.
5086 * server.h (swbreak_feature, hwbreak_feature): Declare.
5087 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5088 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5089 supports_stopped_by_hw_breakpoint>: New fields.
5090 (target_supports_stopped_by_sw_breakpoint)
5091 (target_stopped_by_sw_breakpoint)
5092 (target_supports_stopped_by_hw_breakpoint)
5093 (target_stopped_by_hw_breakpoint): Declare.
5094
15c66dd6
PA
50952015-03-04 Pedro Alves <palves@redhat.com>
5096
5097 enum lwp_stop_reason -> enum target_stop_reason
5098 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5099 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5100 (linux_wait_1, stuck_in_jump_pad_callback)
5101 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5102 (linux_stopped_by_watchpoint):
5103 * linux-low.h (enum lwp_stop_reason): Delete.
5104 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5105 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5106
98fc70d6
YQ
51072015-03-04 Yao Qi <yao.qi@linaro.org>
5108
5109 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5110
dd2ac174
GB
51112015-03-03 Gary Benson <gbenson@redhat.com>
5112
5113 * hostio.c (handle_vFile): Fix prefix lengths.
5114
d68e53f4
MM
51152015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5116
5117 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5118 ptr_bits.
5119
bf2d68ab
AA
51202015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5121
5122 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5123 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5124 (clean): Add "rm -f" for above C files.
5125 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5126 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5127 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5128 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5129 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5130 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5131 (init_registers_s390x_vx_linux64)
5132 (init_registers_s390x_tevx_linux64)
5133 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5134 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5135 declarations.
5136 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5137 (s390_store_vxrs_high): New functions.
5138 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5139 NT_S390_VXRS_HIGH.
5140 (s390_arch_setup): Add logic for selecting one of the new target
5141 descriptions. Activate the new vector regsets if applicable.
5142 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5143 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5144 and init_registers_s390x_tevx_linux64.
5145
c966a859
PA
51462015-03-01 Pedro Alves <palves@redhat.com>
5147
5148 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5149 parameter.
5150
4180215b
PA
51512015-02-27 Pedro Alves <palves@redhat.com>
5152
5153 * linux-x86-low.c (u_debugreg_offset): New function.
5154 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5155
749bab01
PA
51562015-02-27 Pedro Alves <palves@redhat.com>
5157
5158 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5159 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5160 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5161 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5162 (ps_lsetfpregs, ps_getpid)
5163 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5164 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5165 (ps_lsetxregs, ps_plog): Declare.
5166
3c14e5a3
PA
51672015-02-27 Pedro Alves <palves@redhat.com>
5168
5169 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5170 IP_AGENT_EXPORT_FUNC.
5171 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5172 IP_AGENT_EXPORT_FUNC.
5173 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5174 (IP_AGENT_EXPORT): Delete.
5175 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5176 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5177 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5178 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5179 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5180 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5181 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5182 (traceframe_read_count, traceframe_write_count)
5183 (traceframes_created, trace_state_variables, get_raw_reg)
5184 (get_trace_state_variable_value, set_trace_state_variable_value)
5185 (ust_loaded, helper_thread_id, cmd_buf): Use
5186 IPA_SYM_EXPORTED_NAME.
5187 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5188 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5189 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5190 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5191 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5192 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5193 EXTERN_C_PUSH/EXTERN_C_POP.
5194 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5195 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5196 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5197 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5198 (traceframe_write_count, traceframe_read_count)
5199 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5200 (about_to_request_buffer_space, get_trace_state_variable_value)
5201 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5202 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5203 EXTERN_C_PUSH/EXTERN_C_POP.
5204 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5205 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5206 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5207 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5208 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5209 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5210 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5211 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5212 Define.
5213 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5214 (IP_AGENT_EXPORT_VAR_DECL): Define.
5215 (tracing): Declare.
5216 (gdb_agent_get_raw_reg): Declare.
5217
fe978cb0
PA
52182015-02-27 Tom Tromey <tromey@redhat.com>
5219 Pedro Alves <palves@redhat.com>
5220
5221 Rename symbols whose names are reserved C++ keywords throughout.
5222
3bc3d82a
PA
52232015-02-27 Pedro Alves <palves@redhat.com>
5224
5225 * Makefile.in (COMPILER): New, get it from autoconf.
5226 (CXX): Get from autoconf instead.
5227 (COMPILE.pre): Use COMPILER.
5228 (CC-LD): Rename to ...
5229 (CC_LD): ... this. Use COMPILER.
5230 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5231 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5232 * acinclude.m4: Include build-with-cxx.m4.
5233 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5234 Disable -Werror by default if building in C++ mode.
5235 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5236 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5237 the C++ compiler. Save/restore CXXFLAGS too.
5238 * configure: Regenerate.
5239
07697489
PA
52402015-02-27 Pedro Alves <palves@redhat.com>
5241
5242 * acinclude.m4: Include libiberty.m4.
5243 * configure.ac: Call libiberty_INIT.
5244 * config.in, configure: Regenerate.
5245
9beb7c4e
PA
52462015-02-26 Pedro Alves <palves@redhat.com>
5247
5248 * linux-low.c (linux_wait_1): When incrementing the PC past a
5249 program breakpoint always use the_low_target.breakpoint_len as
5250 increment, rather than the maximum between that and
5251 the_low_target.decr_pc_after_break.
5252
8090aef2
PA
52532015-02-23 Pedro Alves <palves@redhat.com>
5254
5255 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5256 thread was doing a step-over; always adjust the PC if
5257 we stepped over a permanent breakpoint.
5258 (linux_wait_1): If we stepped over breakpoint that was on top of a
5259 permanent breakpoint, manually advance the PC past it.
5260
bc9540e8
PA
52612015-02-23 Pedro Alves <palves@redhat.com>
5262
5263 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5264 modes.
5265 (x86_fill_gregset, x86_store_gregset): Use it when handling
5266 $orig_eax.
5267
2db9a427
PA
52682015-02-20 Pedro Alves <palves@redhat.com>
5269
5270 * thread-db.c: Include "nat/linux-procfs.h".
5271 (thread_db_init): Skip listing new threads if the kernel supports
5272 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5273
afa8d396
PA
52742015-02-20 Pedro Alves <palves@redhat.com>
5275
5276 * linux-low.c (status_pending_p_callback): Use ptid_match.
5277
c9587f88
AT
52782015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5279
5280 PR breakpoints/16812
5281 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5282 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5283 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5284
b05ec7a5
AT
52852015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5286
5287 PR breakpoints/15956
5288 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5289
d33501a5
MM
52902015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5291
5292 * linux-low.c (linux_low_btrace_conf): Print size.
5293 * server.c (handle_btrace_conf_general_set): New.
5294 (hanle_general_set): Call handle_btrace_conf_general_set.
5295 (handle_query): Report Qbtrace-conf:bts:size as supported.
5296
f4abbc16
MM
52972015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5298
5299 * linux-low.c (linux_low_enable_btrace): Update parameters.
5300 (linux_low_btrace_conf): New.
5301 (linux_target_ops)<to_btrace_conf>: Initialize.
5302 * server.c (current_btrace_conf): New.
5303 (handle_btrace_enable): Rename to ...
5304 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5305 to target_enable_btrace. Update comment. Update users.
5306 (handle_qxfer_btrace_conf): New.
5307 (qxfer_packets): Add btrace-conf entry.
5308 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5309 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5310 (target_ops)<read_btrace_conf>: New.
5311 (target_enable_btrace): Update parameters.
5312 (target_read_btrace_conf): New.
5313
043c3577
MM
53142015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5315
5316 * server.c (handle_btrace_general_set): Remove call to
5317 target_supports_btrace.
5318 (supported_btrace_packets): New.
5319 (handle_query): Call supported_btrace_packets.
5320 * target.h: include btrace-common.h.
5321 (btrace_target_info): Removed.
5322 (supports_btrace, target_supports_btrace): Update parameters.
5323
734b0e4b
MM
53242015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5325
5326 * Makefile.in (SFILES): Add common/btrace-common.c.
5327 (OBS): Add common/btrace-common.o.
5328 (btrace-common.o): Add build rules.
5329 * linux-low: Include btrace-common.h.
5330 (linux_low_read_btrace): Use struct btrace_data. Call
5331 btrace_data_init and btrace_data_fini.
5332
d6c146e9
PA
53332015-02-06 Pedro Alves <palves@redhat.com>
5334
5335 * thread-db.c (find_new_threads_callback): Add debug output.
5336
20ba1ce6
PA
53372015-02-04 Pedro Alves <palves@redhat.com>
5338
5339 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5340 (resume_stopped_resumed_lwps): New function.
5341 (linux_wait_for_event_filtered): Use it.
5342
8cc73a39
SDJ
53432015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5344
5345 * Makefile.in (SFILES): Add linux-personality.c.
5346 (linux-personality.o): New rule.
5347 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5348 list of objects to be built.
5349 * linux-low.c: Include nat/linux-personality.h.
5350 (linux_create_inferior): Remove code to disable address space
5351 randomization (moved to ../nat/linux-personality.c). Create
5352 cleanup to disable address space randomization.
5353
fb23d554
SDJ
53542015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5355
5356 * Makefile.in (posix-strerror.o): New rule.
5357 (mingw-strerror.o): Likewise.
5358 * configure: Regenerated.
5359 * configure.ac: Source file ../common/common.host. Initialize new
5360 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5361
cdf43629
YQ
53622015-01-14 Yao Qi <yao@codesourcery.com>
5363
5364 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5365 (ppc-linux.o): New rule.
5366 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5367 * configure.ac: AC_CHECK_FUNCS(getauxval).
5368 * config.in: Re-generated.
5369 * configure: Re-generated.
5370 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5371 ppc64_64bit_inferior_p
5372
514c5338
YQ
53732015-01-14 Yao Qi <yao@codesourcery.com>
5374
5375 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5376 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5377 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5378 (PT_ORIG_R3, PT_TRAP): Likewise.
5379 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5380 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5381 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5382
3368c1e5
JB
53832015-01-10 Joel Brobecker <brobecker@adacore.com>
5384
5385 * i387-fp.c (i387_cache_to_xsave): In look over
5386 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5387 zmmh_low_space field by use of zmmh_high_space.
5388
582511be
PA
53892015-01-09 Pedro Alves <palves@redhat.com>
5390
5391 * linux-low.c (step_over_bkpt): Move higher up in the file.
5392 (handle_extended_wait): Don't store the stop_pc here.
5393 (get_stop_pc): Adjust comments and rename to ...
5394 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5395 stopped for a software breakpoint or hardware breakpoint.
5396 (thread_still_has_status_pending_p): New function.
5397 (status_pending_p_callback): Use
5398 thread_still_has_status_pending_p. If the event is no longer
5399 interesting, resume the LWP.
5400 (handle_tracepoints): Add assert.
5401 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5402 (wstatus_maybe_breakpoint): New function.
5403 (cancel_breakpoint): Delete function.
5404 (check_stopped_by_watchpoint): New function, factored out from
5405 linux_low_filter_event.
5406 (lp_status_maybe_breakpoint): Delete function.
5407 (linux_low_filter_event): Remove filter_ptid argument.
5408 Leave thread group exits pending here. Store the LWP's stop PC.
5409 Always leave events pending.
5410 (linux_wait_for_event_filtered): Pull all events out of the
5411 kernel, and leave them all pending.
5412 (count_events_callback, select_event_lwp_callback): Consider all
5413 events.
5414 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5415 (select_event_lwp): Only give preference to the stepping LWP in
5416 all-stop mode. Adjust comments.
5417 (ignore_event): New function.
5418 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5419 references to cancel_breakpoints. Adjust to renames. Also give
5420 equal priority to all LWPs that have had events in non-stop mode.
5421 If reporting a software breakpoint event, unadjust the LWP's PC.
5422 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5423 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5424 Adjust.
5425 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5426 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5427 (linux_stopped_by_watchpoint): Adjust.
5428 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5429 * linux-low.h (enum lwp_stop_reason): New.
5430 (struct lwp_info) <stop_pc>: Adjust comment.
5431 <stopped_by_watchpoint>: Delete field.
5432 <stop_reason>: New field.
5433 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5434 * mem-break.c (software_breakpoint_inserted_here)
5435 (hardware_breakpoint_inserted_here): New function.
5436 * mem-break.h (software_breakpoint_inserted_here)
5437 (hardware_breakpoint_inserted_here): Declare.
5438 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5439 (cancel_breakpoints): Delete.
5440 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5441 (upload_fast_traceframes): Remove references to
5442 cancel_breakpoints.
5443
a33e3959
PA
54442015-01-09 Pedro Alves <palves@redhat.com>
5445
5446 * thread-db.c (find_new_threads_callback): Ignore thread if the
5447 kernel thread ID is -1.
5448
8784d563
PA
54492015-01-09 Pedro Alves <palves@redhat.com>
5450
5451 * linux-low.c (linux_attach_fail_reason_string): Move to
5452 nat/linux-ptrace.c, and rename.
5453 (linux_attach_lwp): Update comment.
5454 (attach_proc_task_lwp_callback): New function.
5455 (linux_attach): Adjust to rename and use
5456 linux_proc_attach_tgid_threads.
5457 (linux_attach_fail_reason_string): Delete declaration.
5458
76f2b779
JB
54592015-01-01 Joel Brobecker <brobecker@adacore.com>
5460
5461 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5462 * server.c (gdbserver_version): Likewise.
5463
fafcc06a
SDJ
54642014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5465
5466 * remote-utils.c: Include ctype.h.
5467 (input_interrupt): Explicitly handle the case when the char
5468 received is the NUL byte. Improve the printing of non-ASCII
5469 characters.
5470
beed38b8
JB
54712014-12-16 Joel Brobecker <brobecker@adacore.com>
5472
5473 * linux-low.c (linux_low_filter_event): Update call to
5474 linux_enable_event_reporting following the addition of
5475 a new parameter to that function.
5476
bf330350
CU
54772014-12-16 Catalin Udma <catalin.udma@freescale.com>
5478
5479 PR server/17457
5480 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5481 (AARCH64_FPCR_REGNO): Likewise.
5482 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5483 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5484 (aarch64_store_fpregset): Likewise.
5485
5227d625
JB
54862014-12-15 Joel Brobecker <brobecker@adacore.com>
5487
5488 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5489 Remove FIXME comment about assumption about N.
5490
f93b65a0
JB
54912014-12-13 Joel Brobecker <brobecker@adacore.com>
5492
5493 * configure.ac: If large-file support is disabled in GDBserver,
5494 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5495 * configure: Regenerate.
5496
e5a9158d
AA
54972014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5498
5499 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5500 warning upon ENODATA from ptrace.
5501 * linux-s390-low.c (s390_store_tdb): New.
5502 (s390_regsets): Add regset for NT_S390_TDB.
5503
feea5f36
AA
55042014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5505
5506 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5507 without a fill_function.
5508 * linux-s390-low.c (s390_fill_last_break): Remove.
5509 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5510 (s390_arch_setup): Use regset's size instead of fill_function for
5511 loop end condition.
5512
098dbe61
AA
55132014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5514
5515 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5516 the regset's store function when ptrace returned an error.
5517 * regcache.c (get_thread_regcache): Invalidate register cache
5518 before fetching inferior's registers.
5519
28eef672
AA
55202014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5521
5522 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5523 while-loop as for-loop.
5524 (regsets_store_inferior_registers): Likewise.
5525
bdca27a2
YQ
55262014-11-28 Yao Qi <yao@codesourcery.com>
5527
5528 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5529 * config.in, configure: Re-generate.
5530 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5531 is defined.
5532
9c232dda
YQ
55332014-11-21 Yao Qi <yao@codesourcery.com>
5534
5535 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5536 (AC_CHECK_HEADERS): Remove malloc.h.
5537 * configure: Re-generated.
5538 * config.in: Re-generated.
5539 * server.h: Don't include alloca.h and malloc.h.
5540 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5541 Don't include malloc.h.
5542
43968415
JB
55432014-11-17 Joel Brobecker <brobecker@adacore.com>
5544
5545 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5546 corresponding ERRNO check in same block.
5547
40e91bc7
PA
55482014-11-12 Pedro Alves <palves@redhat.com>
5549
5550 * server.c (cont_thread): Update comment.
5551 (start_inferior, attach_inferior): No longer clear cont_thread.
5552 (handle_v_cont): No longer set cont_thread.
5553 (captured_main): Clear cont_thread each time a GDB connects.
5554
c2c118cf
PA
55552014-11-12 Pedro Alves <palves@redhat.com>
5556
5557 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5558 thread, and don't resume all threads if the Hc thread has exited.
5559
78708b7c
PA
55602014-11-12 Pedro Alves <palves@redhat.com>
5561
5562 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5563 the process group instead of to a specific LWP.
5564
a2abc7de
PA
55652014-10-15 Pedro Alves <palves@redhat.com>
5566
5567 PR server/17487
5568 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5569 parameter.
5570 (arm_set_thread_context): Delete.
5571 (the_low_target): Adjust.
5572 * win32-i386-low.c (debug_registers_changed)
5573 (debug_registers_used): Delete.
5574 (update_debug_registers_callback): New function.
5575 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5576 needing to update their debug registers.
5577 (win32_get_current_dr): New function.
5578 (x86_dr_low_get_addr, x86_dr_low_get_control)
5579 (x86_dr_low_get_status): Fetch the debug register from the thread
5580 record's context.
5581 (i386_initial_stuff): Adjust.
5582 (i386_get_thread_context): Remove current_event parameter. Don't
5583 clear debug_registers_changed nor copy DR values to
5584 debug_reg_state.
5585 (i386_set_thread_context): Delete.
5586 (i386_prepare_to_resume): New function.
5587 (i386_thread_added): Mark the thread as needing to update irs
5588 debug registers.
5589 (the_low_target): Remove i386_set_thread_context and install
5590 i386_prepare_to_resume.
5591 * win32-low.c (win32_get_thread_context): Adjust.
5592 (win32_set_thread_context): Use SetThreadContext
5593 directly.
5594 (win32_prepare_to_resume): New function.
5595 (win32_require_context): New function, factored out from ...
5596 (thread_rec): ... this.
5597 (continue_one_thread): Call win32_prepare_to_resume on each thread
5598 we're about to continue.
5599 (win32_resume): Call win32_prepare_to_resume on the event thread.
5600 * win32-low.h (struct win32_thread_info)
5601 <debug_registers_changed>: New field.
5602 (struct win32_target_ops): Change prototype of set_thread_context,
5603 delete set_thread_context and add prepare_to_resume.
5604 (win32_require_context): New declaration.
5605
a442d071
GB
56062014-10-08 Gary Benson <gbenson@redhat.com>
5607
5608 * server.h: Do not include common-exceptions.h.
5609
6f1947e8
GB
56102014-10-08 Gary Benson <gbenson@redhat.com>
5611
5612 * server.h: Do not include cleanups.h.
5613
63b434a4
JH
56142014-09-30 James Hogan <james.hogan@imgtec.com>
5615
5616 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5617 mips64-dsp-linux.c.
5618
c4d9ceb6
YQ
56192014-09-23 Yao Qi <yao@codesourcery.com>
5620
5621 * linux-low.c (lp_status_maybe_breakpoint): New function.
5622 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5623 (count_events_callback): Likewise.
5624 (select_event_lwp_callback): Likewise.
5625 (cancel_breakpoints_callback): Likewise.
5626
89a5711c
DB
56272014-09-19 Don Breazeal <donb@codesourcery.com>
5628
5629 * linux-low.c (handle_extended_wait): Call
5630 linux_ptrace_get_extended_event.
5631 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5632 linux_is_extended_waitstatus.
5633
bffc0964
JB
56342014-09-16 Joel Brobecker <brobecker@adacore.com>
5635
5636 * Makefile.in (CPPFLAGS): Define.
5637 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5638 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5639
0bfdf32f
GB
56402014-09-16 Gary Benson <gbenson@redhat.com>
5641
5642 * inferiors.h (current_inferior): Renamed as...
5643 (current_thread): New variable. All uses updated.
5644 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5645 (maybe_move_out_of_jump_pad): Likewise.
5646 (cancel_breakpoint): Likewise.
5647 (linux_low_filter_event): Likewise.
5648 (wait_for_sigstop): Likewise.
5649 (linux_resume_one_lwp): Likewise.
5650 (need_step_over_p): Likewise.
5651 (start_step_over): Likewise.
5652 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5653 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5654 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5655 and save_inferior as saved_thread.
5656 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5657 saved_thread.
5658 (regcache_invalidate_thread): Likewise.
5659 * remote-utils.c (prepare_resume_reply): Likewise.
5660 * thread-db.c (thread_db_get_tls_address): Likewise.
5661 (disable_thread_event_reporting): Likewise.
5662 (remove_thread_event_breakpoints): Likewise.
5663 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5664 as saved_thread.
5665 * target.h (set_desired_inferior): Renamed as...
5666 (set_desired_thread): New declaration. All uses updated.
5667 * server.c (myresume): Updated comment to reference thread instead
5668 of inferior.
5669 (handle_serial_event): Likewise.
5670 (handle_target_event): Likewise.
5671
361c8ade
GB
56722014-09-12 Tom Tromey <tromey@redhat.com>
5673 Gary Benson <gbenson@redhat.com>
5674
5675 * regcache.h: Include common-regcache.h.
5676 (regcache_read_pc): Don't declare.
5677 * regcache.c (get_thread_regcache_for_ptid): New function.
5678
bd9269f7
GB
56792014-09-11 Tom Tromey <tromey@redhat.com>
5680 Gary Benson <gbenson@redhat.com>
5681
5682 * symbol.c: New file.
5683 * Makefile.in (SFILES): Add symbol.c.
5684 (OBS): Add symbol.o.
5685
f8c1d06b
GB
56862014-09-11 Gary Benson <gbenson@redhat.com>
5687
5688 * target.c (target_stop_ptid, target_continue_ptid): New
5689 functions.
5690
721ec300
GB
56912014-09-11 Tom Tromey <tromey@redhat.com>
5692 Gary Benson <gbenson@redhat.com>
5693
5694 * target.h: Include target/target.h.
5695 * target.c (target_read_memory, target_read_uint32)
5696 (target_write_memory): New functions.
5697
c5e92cca
GB
56982014-09-11 Gary Benson <gbenson@redhat.com>
5699
5700 * server.h (debug_hw_points): Don't declare.
5701 * server.c (debug_hw_points): Don't define. Replace all uses
5702 with show_debug_regs.
5703 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5704 all uses with show_debug_regs.
5705
2e4bb98a
EBM
57062014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5707
5708 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5709 endianness into account.
5710 (ppc_supply_ptrace_register): Likewise.
5711
ac740bc7
JH
57122014-09-03 James Hogan <james.hogan@imgtec.com>
5713
5714 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5715 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5716
97ea6506
GB
57172014-09-03 Gary Benson <gbenson@redhat.com>
5718
5719 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5720 ALL_DEBUG_ADDRESS_REGISTERS.
5721
df7e5265
GB
57222014-09-02 Gary Benson <gbenson@redhat.com>
5723
5724 * i386-low.h: Renamed as...
5725 * x86-low.h: New file. All type, function and variable name
5726 prefixes changed from "i386_" to "x86_". All references updated.
5727 * i386-low.c: Renamed as...
5728 * x86-low.c: New file. All type, function and variable name
5729 prefixes changed from "i386_" to "x86_". All references updated.
5730
ed859da7
GB
57312014-09-02 Gary Benson <gbenson@redhat.com>
5732
5733 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5734 (x86_linux_new_thread): Likewise.
5735
860789c7
GB
57362014-08-29 Gary Benson <gbenson@redhat.com>
5737
5738 * server.h (setjmp.h): Do not include.
5739 (toplevel): Do not declare.
5740 (common-exceptions.h): Include.
5741 (cleanups.h): Likewise.
5742 * server.c (toplevel): Do not define.
5743 (exit_code): New static global.
5744 (detach_or_kill_for_exit_cleanup): New function.
5745 (main): New function. Original main renamed to...
5746 (captured_main): New function.
5747 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5748
ff55e1b5
GB
57492014-08-29 Gary Benson <gbenson@redhat.com>
5750
5751 * Makefile.in (SFILES): Add common/common-exceptions.c.
5752 (OBS): Add common-exceptions.o.
5753 (common-exceptions.o): New rule.
5754 * utils.c (prepare_to_throw_exception): New function.
5755
e9bcb658
GB
57562014-08-29 Gary Benson <gbenson@redhat.com>
5757
5758 * config.in: Regenerate.
5759 * configure: Likewise.
5760
e3180625
GB
57612014-08-29 Gary Benson <gbenson@redhat.com>
5762
5763 * Makefile.in (SFILES): Add common/cleanups.c.
5764 (OBS): cleanups.o.
5765 (cleanups.o): New rule.
5766
e3d6ba5d
GB
57672014-08-29 Gary Benson <gbenson@redhat.com>
5768
5769 * utils.c (internal_vwarning): New function.
5770
7096e886
GB
57712014-08-28 Gary Benson <gbenson@redhat.com>
5772
5773 * utils.h (fatal): Remove declaration.
5774 * utils.c (fatal): Remove function.
5775
14ce3192
GB
57762014-08-28 Gary Benson <gbenson@redhat.com>
5777
5778 * tracepoint.c (gdb_agent_init): Replace fatal with
5779 perror_with_name.
5780 (initialize_tracepoint): Likewise.
5781
50278d59
GB
57822014-08-28 Gary Benson <gbenson@redhat.com>
5783
5784 * remote-utils.c (remote_prepare): Replace fatal with error.
5785
aa96c426
GB
57862014-08-28 Gary Benson <gbenson@redhat.com>
5787
5788 * linux-low.c (linux_async): Replace fatal with warning.
5789 Tidy up and return.
5790 (linux_start_non_stop): Return -1 if linux_async failed.
5791
f7160e97
GB
57922014-08-28 Gary Benson <gbenson@redhat.com>
5793
5794 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5795 gdb_assert.
5796 (i386_dr_low_get_addr): Remove vague comment.
5797 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5798 gdb_assert.
5799
38e08fca
GB
58002014-08-28 Gary Benson <gbenson@redhat.com>
5801
5802 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5803 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5804 internal_error.
5805 (linux_resume_one_lwp): Likewise.
5806 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5807 gdb_assert.
5808 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5809 with internal_error.
5810 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5811 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5812 (find_register_by_name): Replace fatal with internal_error.
5813 (find_regno): Likewise.
5814 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5815 * thread-db.c (thread_db_create_event): Likewise.
5816 (thread_db_load_search): Likewise.
5817 (try_thread_db_load_1): Likewise.
5818 * tracepoint.c (get_jump_space_head): Replace fatal with
5819 internal_error.
5820 (claim_trampoline_space): Likewise.
5821 (have_fast_tracepoint_trampoline_buffer): Likewise.
5822 (cmd_qtstart): Likewise.
5823 (stop_tracing): Likewise.
5824 (fast_tracepoint_collecting): Likewise.
5825 (target_malloc): Likewise.
5826 (download_tracepoint): Likewise.
5827 (download_trace_state_variables): Replace check with gdb_assert.
5828 (upload_fast_traceframes): Replace fatal with internal_error.
5829
34abf635
GB
58302014-08-19 Tom Tromey <tromey@redhat.com>
5831 Gary Benson <gbenson@redhat.com>
5832
5833 * Makefile.in (SFILES): Add common/common-debug.c.
5834 (OBS): Add common-debug.o.
5835 (common-debug.o): New rule.
5836 * debug.h (debug_printf): Don't declare.
5837 * debug.c (debug_printf): Renamed and rewritten as...
5838 (debug_vprintf): New function.
5839
f6e94d78
GB
58402014-08-19 Gary Benson <gbenson@redhat.com>
5841
5842 * utils.h: Do not include print-utils.h.
5843
9239eeab
GB
58442014-08-19 Tom Tromey <tromey@redhat.com>
5845 Gary Benson <gbenson@redhat.com>
5846
5847 * server.h: Add static assertion.
5848 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5849
ef87c8bb
GB
58502014-08-19 Tom Tromey <tromey@redhat.com>
5851 Gary Benson <gbenson@redhat.com>
5852
5853 * Makefile.in (SFILES): Add common/errors.c.
5854 (OBS): Add errors.o.
5855 (IPA_OBS): Add errors-ipa.o.
5856 (errors.o): New rule.
5857 (errors-ipa.o): Likewise.
5858 * utils.h (perror_with_name, error, warning): Don't declare.
5859 * utils.c (warning): Renamed and rewritten as...
5860 (vwarning): New function.
5861 (error): Renamed and rewritten as...
5862 (verror): New function.
5863 (internal_error): Renamed and rewritten as...
5864 (internal_verror): New function.
5865
bb974a24
GB
58662014-08-07 Gary Benson <gbenson@redhat.com>
5867
5868 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5869 * configure: Regenerate.
5870 * config.in: Likewise.
5871 * server.h: Do not include errno.h.
5872 * event-loop.c: Likewise.
5873 * hostio-errno.c: Likewise.
5874 * linux-low.c: Likewise.
5875 * remote-utils.c: Likewise.
5876 * spu-low.c: Likewise.
5877 * utils.c: Likewise.
5878 * gdbreplay.c: Unconditionally include errno.h.
5879
6d3d12eb
GB
58802014-08-07 Gary Benson <gbenson@redhat.com>
5881
5882 * server.h: Do not include string.h.
5883 * event-loop.c: Likewise.
5884 * linux-low.c: Likewise.
5885 * regcache.c: Likewise.
5886 * remote-utils.c: Likewise.
5887 * spu-low.c: Likewise.
5888 * utils.c: Likewise.
5889
dccbb609
GB
58902014-08-07 Gary Benson <gbenson@redhat.com>
5891
5892 * server.h: Do not include gdb_assert.h.
5893
e76df0d0
GB
58942014-08-07 Gary Benson <gbenson@redhat.com>
5895
5896 * server.h: Do not include common-utils.h.
5897
4cb9c816
GB
58982014-08-07 Gary Benson <gbenson@redhat.com>
5899
5900 * server.h: Do not include ptid.h.
5901 * notif.h: Likewise.
5902
3995eeee
GB
59032014-08-07 Gary Benson <gbenson@redhat.com>
5904
5905 * server.h: Do not include gdb_locale.h.
5906
cb9f1a9b
GB
59072014-08-07 Gary Benson <gbenson@redhat.com>
5908
5909 * server.h: Do not include gdb/signals.h.
5910 * win32-low.c: Likewise.
5911
a5fceff8
GB
59122014-08-07 Gary Benson <gbenson@redhat.com>
5913
5914 * server.h: Do not include pathmax.h.
5915
b9391142
GB
59162014-08-07 Gary Benson <gbenson@redhat.com>
5917
5918 * server.h: Do not include libiberty.h.
5919 * linux-bfin-low.c: Likewise.
5920
0e443c87
GB
59212014-08-07 Gary Benson <gbenson@redhat.com>
5922
5923 * server.h: Do not include ansidecl.h.
5924
8ebb3f56
GB
59252014-08-07 Gary Benson <gbenson@redhat.com>
5926
5927 * linux-x86-low.c: Do not include stddef.h.
5928 * lynx-ppc-low.c: Likewise.
5929 * tracepoint.c: Likewise.
5930
8980bdf6
GB
59312014-08-07 Gary Benson <gbenson@redhat.com>
5932
5933 * server.h: Do not include stdarg.h.
5934 * nto-low.c: Likewise.
5935
d7096f71
GB
59362014-08-07 Gary Benson <gbenson@redhat.com>
5937
5938 * server.h: Do not include stdlib.h.
5939 * inferiors.c: Likewise.
5940 * linux-low.c: Likewise.
5941 * regcache.c: Likewise.
5942 * spu-low.c: Likewise.
5943 * tracepoint.c: Likewise.
5944 * utils.c: Likewise.
5945
d02f550d
GB
59462014-08-07 Gary Benson <gbenson@redhat.com>
5947
5948 * server.h: Do not include stdio.h.
5949 * linux-low.c: Likewise.
5950 * remote-utils.c: Likewise.
5951 * spu-low.c: Likewise.
5952 * utils.c: Likewise.
5953 * wincecompat.c: Likewise.
5954
87f6c4e3
GB
59552014-08-06 Gary Benson <gbenson@redhat.com>
5956
5957 * regcache.c (init_register_cache): Move conditionals inside if.
5958
7089dca4
GB
59592014-08-06 Gary Benson <gbenson@redhat.com>
5960
5961 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5962
462f517e
GB
59632014-07-31 Gary Benson <gbenson@redhat.com>
5964
5965 * ax.h: Do not include server.h.
5966 * gdbthread.h: Likewise.
5967 * lynx-low.h: Likewise.
5968 * notif.h: Likewise.
5969
976411d6
GB
59702014-07-30 Gary Benson <gbenson@redhat.com>
5971
5972 * server.h: Include common-defs.h.
5973 Do not include config.h or build-gnulib-gdbserver/config.h.
5974
d41f6d8e
GB
59752014-07-30 Gary Benson <gbenson@redhat.com>
5976
5977 * hostio-errno.c: Move server.h to top of includes list.
5978 * inferiors.c: Likewise.
5979 * linux-x86-low.c: Likewise.
5980 * notif.c: Include server.h.
5981
314c6a35
TT
59822014-07-24 Tom Tromey <tromey@redhat.com>
5983 Gary Benson <gbenson@redhat.com>
5984
5985 * server.h (CORE_ADDR): Now unsigned.
5986
69ff6be5
PA
59872014-07-16 Pedro Alves <palves@redhat.com>
5988
5989 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5990
ce9e3fe7
PA
59912014-07-15 Pedro Alves <palves@redhat.com>
5992
5993 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5994 copy.
5995
e76126e8
PA
59962014-07-11 Pedro Alves <palves@redhat.com>
5997
5998 * linux-low.c (kill_wait_lwp): New function, based on
5999 kill_one_lwp_callback, but use my_waitpid directly.
6000 (kill_one_lwp_callback, linux_kill): Use it.
6001
8e9db26e
PA
60022014-06-23 Pedro Alves <palves@redhat.com>
6003
6004 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
6005 before setting DR0..DR3.
6006
698b3e08
GB
60072014-06-20 Gary Benson <gbenson@redhat.com>
6008
6009 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
6010 * configure: Regenerated.
6011 * config.in: Likewise.
6012
125f8a3d
GB
60132014-06-20 Gary Benson <gbenson@redhat.com>
6014
6015 * Makefile.in (SFILES): Update locations for files moved
6016 from common to nat.
6017 (object file files): Reordered.
6018
42995dbd
GB
60192014-06-20 Gary Benson <gbenson@redhat.com>
6020
6021 * i386-low.h (i386_dr_low_can_set_addr): Removed.
6022 (i386_dr_low_set_addr): Likewise.
6023 (i386_dr_low_get_addr): Likewise.
6024 (i386_dr_low_can_set_control): Likewise.
6025 (i386_dr_low_set_control): Likewise.
6026 (i386_dr_low_get_control): Likewise.
6027 (i386_dr_low_get_status): Likewise.
6028 (i386_get_debug_register_length): Likewise.
6029 * linux-x86-low.c (i386_dr_low_set_addr):
6030 Changed signature. Made static.
6031 (i386_dr_low_get_addr): Likewise.
6032 (i386_dr_low_set_control): Likewise.
6033 (i386_dr_low_get_control): Likewise.
6034 (i386_dr_low_get_status): Likewise.
6035 (i386_dr_low): New global variable.
6036 * win32-i386-low.c (i386_dr_low_set_addr):
6037 Changed signature. Made static.
6038 (i386_dr_low_get_addr): Likewise.
6039 (i386_dr_low_set_control): Likewise.
6040 (i386_dr_low_get_control): Likewise.
6041 (i386_dr_low_get_status): Likewise.
6042 (i386_dr_low): New global variable.
6043
e1d2394b
MS
60442014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
6045
6046 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
6047 * Makefile.in (AR, AR_FLAGS): Define.
6048 * configure: Regenerate.
6049
3a8ee006
GB
60502014-06-19 Gary Benson <gbenson@redhat.com>
6051
6052 * Makefile.in (i386-dregs.o): New rule.
6053 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
6054 * i386-low.c (target.h): Remove include.
6055 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
6056 (DR_CONTROL_SHIFT): Likewise.
6057 (DR_CONTROL_SIZE): Likewise.
6058 (DR_RW_EXECUTE): Likewise.
6059 (DR_RW_WRITE): Likewise.
6060 (DR_RW_READ): Likewise.
6061 (DR_RW_IORW): Likewise.
6062 (DR_LEN_1): Likewise.
6063 (DR_LEN_2): Likewise.
6064 (DR_LEN_4): Likewise.
6065 (DR_LEN_8): Likewise.
6066 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6067 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6068 (DR_ENABLE_SIZE): Likewise.
6069 (DR_LOCAL_SLOWDOWN): Likewise.
6070 (DR_GLOBAL_SLOWDOWN): Likewise.
6071 (DR_CONTROL_RESERVED): Likewise.
6072 (I386_DR_CONTROL_MASK): Likewise.
6073 (I386_DR_VACANT): Likewise.
6074 (I386_DR_LOCAL_ENABLE): Likewise.
6075 (I386_DR_GLOBAL_ENABLE): Likewise.
6076 (I386_DR_DISABLE): Likewise.
6077 (I386_DR_SET_RW_LEN): Likewise.
6078 (I386_DR_GET_RW_LEN): Likewise.
6079 (I386_DR_WATCH_HIT): Likewise.
6080 (i386_wp_op_t): Likewise.
6081 (i386_show_dr): Likewise.
6082 (i386_length_and_rw_bits): Likewise.
6083 (i386_insert_aligned_watchpoint): Likewise.
6084 (i386_remove_aligned_watchpoint): Likewise.
6085 (i386_handle_nonaligned_watchpoint): Likewise.
6086 i386_update_inferior_debug_regs(): Likewise.
6087 (i386_dr_insert_watchpoint): Likewise.
6088 (i386_dr_remove_watchpoint): Likewise.
6089 (i386_dr_region_ok_for_watchpoint): Likewise.
6090 (i386_dr_stopped_data_address): Likewise.
6091 (i386_dr_stopped_by_watchpoint): Likewise.
6092
8f26655c
GB
60932014-06-19 Gary Benson <gbenson@redhat.com>
6094
6095 * i386-low.c (i386_dr_show): Renamed to
6096 i386_show_dr and made static. All uses updated.
6097 (i386_dr_length_and_rw_bits): Renamed to
6098 i386_length_and_rw_bits and made static.
6099 All uses updated.
6100 (i386_dr_insert_aligned_watchpoint): Renamed to
6101 i386_insert_aligned_watchpoint and made static.
6102 All uses updated.
6103 (i386_dr_remove_aligned_watchpoint): Renamed to
6104 i386_remove_aligned_watchpoint and made static.
6105 All uses updated.
6106 (i386_dr_update_inferior_debug_regs): Renamed to
6107 i386_update_inferior_debug_regs and made static.
6108 All uses updated.
6109
b9228891
GB
61102014-06-18 Gary Benson <gbenson@redhat.com>
6111
5171def3
GB
6112 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6113 (i386_dr_low_can_set_control): Likewise.
6114 (i386_get_debug_register_length): Likewise.
6115 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6116 (i386_dr_low_can_set_control): Likewise.
6117 (i386_get_debug_register_length): Likewise.
6118
61192014-06-17 Gary Benson <gbenson@redhat.com>
6120
b9228891
GB
6121 * i386-low.h (i386-dregs.h): New include.
6122 (DR_FIRSTADDR): Now in i386-dregs.h.
6123 (DR_LASTADDR): Likewise.
6124 (DR_NADDR): Likewise.
6125 (DR_STATUS): Likewise.
6126 (DR_CONTROL): Likewise.
6127 (i386_debug_reg_state): Likewise.
6128 (i386_dr_insert_watchpoint): Likewise.
6129 (i386_dr_remove_watchpoint): Likewise.
6130 (i386_dr_region_ok_for_watchpoint): Likewise.
6131 (i386_dr_stopped_data_address): Likewise.
6132 (i386_dr_stopped_by_watchpoint): Likewise.
6133 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6134
4be83cc2
GB
61352014-06-18 Gary Benson <gbenson@redhat.com>
6136
6137 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6138 i386_dr_insert_watchpoint.
6139 (i386_low_remove_watchpoint): Renamed to
6140 i386_dr_remove_watchpoint.
6141 (i386_low_region_ok_for_watchpoint): Renamed to
6142 i386_dr_region_ok_for_watchpoint.
6143 (i386_low_stopped_data_address): Renamed to
6144 i386_dr_stopped_data_address.
6145 (i386_low_stopped_by_watchpoint): Renamed to
6146 i386_dr_stopped_by_watchpoint.
6147 * i386-low.c (i386_show_dr): Renamed to
6148 i386_dr_show and made nonstatic. All uses updated.
6149 (i386_length_and_rw_bits): Renamed to
6150 i386_dr_length_and_rw_bits and made nonstatic.
6151 All uses updated.
6152 (i386_insert_aligned_watchpoint): Renamed to
6153 i386_dr_insert_aligned_watchpoint and made nonstatic.
6154 All uses updated.
6155 (i386_remove_aligned_watchpoint): Renamed to
6156 i386_dr_remove_aligned_watchpoint and made nonstatic.
6157 All uses updated.
6158 (i386_update_inferior_debug_regs): Renamed to
6159 i386_dr_update_inferior_debug_regs and made nonstatic.
6160 All uses updated.
6161 (i386_low_insert_watchpoint): Renamed to
6162 i386_dr_insert_watchpoint. All uses updated.
6163 (i386_low_remove_watchpoint): Renamed to
6164 i386_dr_remove_watchpoint. All uses updated.
6165 (i386_low_region_ok_for_watchpoint): Renamed to
6166 i386_dr_region_ok_for_watchpoint. All uses updated.
6167 (i386_low_stopped_data_address): Renamed to
6168 i386_dr_stopped_data_address. All uses updated.
6169 (i386_low_stopped_by_watchpoint): Renamed to
6170 i386_dr_stopped_by_watchpoint. All uses updated.
6171
131aa0d4
GB
61722014-06-18 Gary Benson <gbenson@redhat.com>
6173
6174 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6175 (i386_dr_low_can_set_control): Likewise.
6176 (i386_insert_aligned_watchpoint): New check.
6177
d9305f7f
GB
61782014-06-18 Gary Benson <gbenson@redhat.com>
6179
6180 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6181 Renamed to state.
6182
e927c9fc
GB
61832014-06-18 Gary Benson <gbenson@redhat.com>
6184
6185 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6186 instead of fatal and error.
6187 (i386_handle_nonaligned_watchpoint): Likewise.
6188
1b6d4134
GB
61892014-06-18 Gary Benson <gbenson@redhat.com>
6190
6191 * i386-low.c (i386_get_debug_register_length): New macro.
6192 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6193 (i386_show_dr): Use debug_printf instead of fprintf. Use
6194 phex to format values.
6195
6e62758f
GB
61962014-06-18 Gary Benson <gbenson@redhat.com>
6197
6198 * i386-low.h: Comment changes.
6199 * i386-low.c: Likewise.
6200
fc6e2f03
GB
62012014-06-18 Gary Benson <gbenson@redhat.com>
6202
6203 * i386-low.c: Whitespace changes.
6204
f9d1eeed
TT
62052014-06-12 Tom Tromey <tromey@redhat.com>
6206
6207 * utils.c (freeargv): Remove.
6208
0b04e523
TT
62092014-06-12 Tom Tromey <tromey@redhat.com>
6210
6211 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6212 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6213 (parse_debug_format_options): Likewise.
6214 (gdbserver_usage): Likewise.
6215 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6216 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6217 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6218 against libiberty.
6219 ($(LIBGNU)): Depend on libiberty.
6220 (all-lib): Recurse into all subdirs.
6221 (install-only): Invoke "install" target in subdirs.
6222 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6223 targets.
6224 * configure: Rebuild.
6225 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6226 for vasprintf, vsnprintf, or gettimeofday.
6227 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6228 srv_tgtobj.
6229
270c9937
JB
62302014-06-05 Joel Brobecker <brobecker@adacore.com>
6231
6232 * development.sh: Delete.
6233 * Makefile.in (config.status): Adjust dependency on development.sh.
6234 * configure.ac: Adjust development.sh source call.
6235 * configure: Regenerate.
6236
0a261ed8
PA
62372014-06-02 Pedro Alves <palves@redhat.com>
6238
6239 * ax.c (gdb_free_agent_expr): New function.
6240 * ax.h (gdb_free_agent_expr): New declaration.
6241 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6242 list.
6243 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6244 static.
6245 (clear_breakpoint_conditions_and_commands): New function.
6246 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6247 (clear_breakpoint_conditions_and_commands): New declaration.
6248
e9dae05e
RR
62492014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6250
6251 * linux-aarch64-low.c (asm/ptrace.h): Include.
6252
5876f503
JK
62532014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6254
6255 Fix TLS access for -static -pthread.
6256 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6257 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6258 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6259
802e8e6d
PA
62602014-05-20 Pedro Alves <palves@redhat.com>
6261
6262 * linux-aarch64-low.c (aarch64_insert_point)
6263 (aarch64_remove_point): No longer check whether the type is
6264 supported here. Adjust to new interface.
6265 (the_low_target): Install aarch64_supports_z_point_type as
6266 supports_z_point_type method.
6267 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6268 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6269 instead of a Z packet char. Adjust.
6270 (arm_supports_z_point_type): New function.
6271 (arm_insert_point, arm_remove_point): Adjust to new interface.
6272 (the_low_target): Install arm_supports_z_point_type.
6273 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6274 (cris_insert_point, cris_remove_point): Adjust to new interface.
6275 Don't check whether the type is supported here.
6276 (the_low_target): Install cris_supports_z_point_type.
6277 * linux-low.c (linux_supports_z_point_type): New function.
6278 (linux_insert_point, linux_remove_point): Adjust to new interface.
6279 * linux-low.h (struct linux_target_ops) <insert_point,
6280 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6281 raw_breakpoint pointer parameter.
6282 <supports_z_point_type>: New method.
6283 * linux-mips-low.c (mips_supports_z_point_type): New function.
6284 (mips_insert_point, mips_remove_point): Adjust to new interface.
6285 Use mips_supports_z_point_type.
6286 (the_low_target): Install mips_supports_z_point_type.
6287 * linux-ppc-low.c (the_low_target): Install NULL as
6288 supports_z_point_type method.
6289 * linux-s390-low.c (the_low_target): Install NULL as
6290 supports_z_point_type method.
6291 * linux-sparc-low.c (the_low_target): Install NULL as
6292 supports_z_point_type method.
6293 * linux-x86-low.c (x86_supports_z_point_type): New function.
6294 (x86_insert_point): Adjust to new insert_point interface. Use
6295 insert_memory_breakpoint. Adjust to new
6296 i386_low_insert_watchpoint interface.
6297 (x86_remove_point): Adjust to remove_point interface. Use
6298 remove_memory_breakpoint. Adjust to new
6299 i386_low_remove_watchpoint interface.
6300 (the_low_target): Install x86_supports_z_point_type.
6301 * lynx-low.c (lynx_target_ops): Install NULL as
6302 supports_z_point_type callback.
6303 * nto-low.c (nto_supports_z_point_type): New.
6304 (nto_insert_point, nto_remove_point): Adjust to new interface.
6305 (nto_target_ops): Install nto_supports_z_point_type.
6306 * mem-break.c: Adjust intro comment.
6307 (struct raw_breakpoint) <raw_type, size>: New fields.
6308 <inserted>: Update comment.
6309 <shlib_disabled>: Delete field.
6310 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6311 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6312 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6313 (raw_bkpt_type_to_target_hw_bp_type): New function.
6314 (find_enabled_raw_code_breakpoint_at): New function.
6315 (find_raw_breakpoint_at): New type and size parameters. Use them.
6316 (insert_memory_breakpoint): New function, based off
6317 set_raw_breakpoint_at.
6318 (remove_memory_breakpoint): New function.
6319 (set_raw_breakpoint_at): Reimplement.
6320 (set_breakpoint): New, based on set_breakpoint_at.
6321 (set_breakpoint_at): Reimplement.
6322 (delete_raw_breakpoint): Go through the_target->remove_point
6323 instead of assuming memory breakpoints.
6324 (find_gdb_breakpoint_at): Delete.
6325 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6326 (find_gdb_breakpoint): New function.
6327 (set_gdb_breakpoint_at): Delete.
6328 (z_type_supported): New function.
6329 (set_gdb_breakpoint_1): New function, loosely based off
6330 set_gdb_breakpoint_at.
6331 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6332 (delete_gdb_breakpoint_at): Delete.
6333 (delete_gdb_breakpoint_1): New function, loosely based off
6334 delete_gdb_breakpoint_at.
6335 (delete_gdb_breakpoint): New function.
6336 (clear_gdb_breakpoint_conditions): Rename to ...
6337 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6338 breakpoint.
6339 (add_condition_to_breakpoint): Make static.
6340 (add_breakpoint_condition): Take a struct breakpoint pointer
6341 instead of an address. Adjust.
6342 (gdb_condition_true_at_breakpoint): Rename to ...
6343 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6344 z_type parameter.
6345 (gdb_condition_true_at_breakpoint): Reimplement.
6346 (add_breakpoint_commands): Take a struct breakpoint pointer
6347 instead of an address. Adjust.
6348 (gdb_no_commands_at_breakpoint): Rename to ...
6349 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6350 parameter. Return true if no breakpoint was found. Change debug
6351 output.
6352 (gdb_no_commands_at_breakpoint): Reimplement.
6353 (run_breakpoint_commands): Rename to ...
6354 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6355 and change return type to boolean.
6356 (run_breakpoint_commands): New function.
6357 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6358 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6359 breakpoint. Go through the_target->remove_point instead of
6360 assuming memory breakpoint.
6361 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6362 software and hardware breakpoints.
6363 (reinsert_raw_breakpoint): Go through the_target->insert_point
6364 instead of assuming memory breakpoint.
6365 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6366 software and hardware breakpoints.
6367 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6368 Check both software and hardware breakpoints.
6369 (validate_inserted_breakpoint): Assert the breakpoint is a
6370 software breakpoint. Set the inserted flag to -1 instead of
6371 setting shlib_disabled.
6372 (delete_disabled_breakpoints): Adjust.
6373 (validate_breakpoints): Only validate software breakpoints.
6374 Adjust to inserted flag change.
6375 (check_mem_read, check_mem_write): Skip breakpoint types other
6376 than software breakpoints. Adjust to inserted flag change.
6377 * mem-break.h (enum raw_bkpt_type): New enum.
6378 (raw_breakpoint, struct process_info): Forward declare.
6379 (Z_packet_to_target_hw_bp_type): Delete declaration.
6380 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6381 (set_gdb_breakpoint, delete_gdb_breakpoint)
6382 (clear_breakpoint_conditions): New declarations.
6383 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6384 (breakpoint_inserted_here): Update comment.
6385 (add_breakpoint_condition, add_breakpoint_commands): Replace
6386 address parameter with a breakpoint pointer parameter.
6387 (gdb_breakpoint_here): Update comment.
6388 (delete_gdb_breakpoint_at): Delete.
6389 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6390 * server.c (process_point_options): Take a struct breakpoint
6391 pointer instead of an address. Adjust.
6392 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6393 delete_gdb_breakpoint.
6394 * spu-low.c (spu_target_ops): Install NULL as
6395 supports_z_point_type method.
6396 * target.h: Include mem-break.h.
6397 (struct target_ops) <prepare_to_access_memory>: Update comment.
6398 <supports_z_point_type>: New field.
6399 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6400 instead of a char. Also take a raw breakpoint pointer.
6401 * win32-arm-low.c (the_low_target): Install NULL as
6402 supports_z_point_type.
6403 * win32-i386-low.c (i386_supports_z_point_type): New function.
6404 (i386_insert_point, i386_remove_point): Adjust to new interface.
6405 (the_low_target): Install i386_supports_z_point_type.
6406 * win32-low.c (win32_supports_z_point_type): New function.
6407 (win32_insert_point, win32_remove_point): Adjust to new interface.
6408 (win32_target_ops): Install win32_supports_z_point_type.
6409 * win32-low.h (struct win32_target_ops):
6410 <supports_z_point_type>: New method.
6411 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6412 instead of a char. Also take a raw breakpoint pointer.
6413
932539e3
PA
64142014-05-20 Pedro Alves <palves@redhat.com>
6415
6416 * mem-break.h: Include break-common.h.
6417 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6418 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6419 (Z_packet_to_target_hw_bp_type): New declaration.
6420 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6421 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6422 (Z_PACKET_ACCESS_WP): Delete macros.
6423 (Z_packet_to_hw_type): Delete function.
6424 * i386-low.h: Don't include break-common.h here.
6425 (Z_packet_to_hw_type): Delete declaration.
6426 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6427 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6428 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6429 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6430 * linux-aarch64-low.c: Don't include break-common.h here.
6431 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6432 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6433 (Z_packet_to_target_hw_bp_type): Delete function.
6434 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6435 function.
6436 (mips_insert_point, mips_remove_point): Use
6437 Z_packet_to_target_hw_bp_type.
6438
4ff0d3d8
PA
64392014-05-20 Pedro Alves <palves@redhat.com>
6440
6441 * linux-aarch64-low.c: Include break-common.h.
6442 (enum target_point_type): Delete.
6443 (Z_packet_to_point_type): Rename to ...
6444 (Z_packet_to_target_hw_bp_type): ... this, and return a
6445 target_hw_bp_type instead.
6446 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6447 instead of an enum target_point_type.
6448 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6449 breakpoint type.
6450 (aarch64_dr_state_insert_one_point)
6451 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6452 (aarch64_handle_aligned_watchpoint)
6453 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6454 Take an enum target_hw_bp_type instead of an enum
6455 target_point_type.
6456 (aarch64_supports_z_point_type): New function.
6457 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6458 use Z_packet_to_target_hw_bp_type.
6459
786dc519
JB
64602014-05-20 Joel Brobecker <brobecker@adacore.com>
6461
6462 * configure.ac: Only use -Werror by default when DEVELOPMENT
6463 is true.
6464 * configure: Regenerate.
6465
9e0aa64f
JK
64662014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6467
6468 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6469 * linux-x86-low.c (X86_64_USER_REGS): New.
6470 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6471
2b577b92
YQ
64722014-04-28 Yao Qi <yao@codesourcery.com>
6473
6474 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6475 name.
6476
94611da2
PA
64772014-04-25 Pedro Alves <palves@redhat.com>
6478
6479 PR server/16255
6480 * linux-low.c (linux_attach_fail_reason_string): New function.
6481 (linux_attach_lwp): Delete.
6482 (linux_attach_lwp_1): Rename to ...
6483 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6484 argument. Remove "initial" parameter. Return int instead of
6485 void. Don't error or warn here.
6486 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6487 failure to attach to the tgid. Call warning when failing to
6488 attach to an lwp.
6489 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6490 argument. Remove "initial" parameter. Return int instead of
6491 void. Don't error or warn here.
6492 (linux_attach_fail_reason_string): New declaration.
6493 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6494 interface change. Use linux_attach_fail_reason_string.
6495
01f9f808
MS
64962014-04-24 Michael Sturm <michael.sturm@mintel.com>
6497 Walfred Tedeschi <walfred.tedeschi@intel.com>
6498
6499 * Makefile.in: Added rules to handle new files
6500 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6501 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6502 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6503 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6504 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6505 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6506 x32-avx512-linux.o.
6507 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6508 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6509 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6510 i386/x32-avx512.xml.
6511 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6512 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6513 i386/x32-avx512-linux.xml.
6514 * i387-fp.c (num_avx512_k_registers): New constant for number
6515 of K registers.
6516 (num_avx512_zmmh_low_registers): New constant for number of
6517 lower ZMM registers (0-15).
6518 (num_avx512_zmmh_high_registers): New constant for number of
6519 higher ZMM registers (16-31).
6520 (num_avx512_ymmh_registers): New contant for number of higher
6521 YMM registers (ymm16-31 added by avx521 on x86_64).
6522 (num_avx512_xmm_registers): New constant for number of higher
6523 XMM registers (xmm16-31 added by AVX512 on x86_64).
6524 (struct i387_xsave): Add space for AVX512 registers.
6525 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6526 Add code to handle AVX512 registers.
6527 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6528 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6529 prototypei from generated file.
6530 (tdesc_amd64_avx512_linux): Likewise.
6531 (init_registers_x32_avx512_linux): Likewise.
6532 (tdesc_x32_avx512_linux): Likewise.
6533 (init_registers_i386_avx512_linux): Likewise.
6534 (tdesc_i386_avx512_linux): Likewise.
6535 (x86_64_regmap): Add AVX512 registers.
6536 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6537 mask.
6538 (initialize_low_arch): Add code to initialize AVX512 registers.
6539
51aa91f9
PA
65402014-04-23 Pedro Alves <palves@redhat.com>
6541
6542 * mem-break.c (find_gdb_breakpoint_at): Make static.
6543 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6544
a4165e94
PA
65452014-04-23 Pedro Alves <palves@redhat.com>
6546
6547 * i386-low.c: Don't include break-common.h here.
6548 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6549 prototype to take target_hw_bp_type as argument instead of a Z
6550 packet char.
6551 * i386-low.h: Include break-common.h here.
6552 (Z_packet_to_hw_type): Declare.
6553 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6554 prototypes.
6555 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6556 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6557 (x86_remove_point): Convert the packet number to a
6558 target_hw_bp_type before calling i386_low_remove_watchpoint.
6559 * win32-i386-low.c (i386_insert_point): Convert the packet number
6560 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6561 (i386_remove_point): Convert the packet number to a
6562 target_hw_bp_type before calling i386_low_remove_watchpoint.
6563
b8acf843
PA
65642014-04-23 Pedro Alves <palves@redhat.com>
6565
6566 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6567
d708bcd1
PA
65682014-04-10 Pedro Alves <palves@redhat.com>
6569
6570 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6571 Check if the condition or command is NULL before checking if the
6572 breakpoint is known. On success, return true.
6573 * mem-break.h (add_breakpoint_condition): Document return.
6574 (add_breakpoint_commands): Add describing comment.
6575 * server.c (skip_to_semicolon): New function.
6576 (process_point_options): Use it.
6577
2eec7d5b
PA
65782014-04-09 Pedro Alves <palves@redhat.com>
6579
6580 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6581 to lwpid_of.
6582
fa96cb38
PA
65832014-02-27 Pedro Alves <palves@redhat.com>
6584
6585 PR 12702
6586 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6587 macros.
6588 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6589 output.
6590 (last_thread_of_process_p): Take a PID argument instead of a
6591 thread pointer.
6592 (linux_wait_for_lwp): Delete.
6593 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6594 functions.
6595 (linux_low_filter_event): New function, party factored out from
6596 linux_wait_for_event.
6597 (linux_wait_for_event): Rename to ...
6598 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6599 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6600 sigsuspend. Check for zombie leaders.
6601 (linux_wait_for_event): Reimplement as wrapper around
6602 linux_wait_for_event_filtered.
6603 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6604 a normal or signal exit is seen, it's the whole process exiting.
6605 (wait_for_sigstop): No longer a for_each_inferior callback.
6606 Rewrite on top of linux_wait_for_event_filtered.
6607 (stop_all_lwps): Call wait_for_sigstop directly.
6608 * server.c (resume, handle_target_event): Handle
6609 TARGET_WAITKIND_NO_RESUMED.
6610
d763de10
JB
66112014-02-26 Joel Brobecker <brobecker@adacore.com>
6612
6613 * win32-low.c (psapi_get_dll_name,
6614 * win32_CreateToolhelp32Snapshot): Delete.
6615 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6616 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6617 Delete.
6618 (handle_load_dll): Add function description.
6619 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6620
850a0f76
JB
66212014-02-26 Joel Brobecker <brobecker@adacore.com>
6622
6623 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6624 Add comment.
6625 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6626 base address when calling win32_add_one_solib.
6627 (handle_load_dll): Delete local variable load_addr.
6628 Remove 0x1000 offset applied to DLL base address when calling
6629 win32_add_one_solib.
6630 (handle_unload_dll): Add comment.
6631
f25b3fc3
JB
66322014-02-26 Joel Brobecker <brobecker@adacore.com>
6633
6634 * win32-low.c (win32_add_all_dlls): Renames
6635 win32_ensure_ntdll_loaded. Rewrite function documentation.
6636 Adjust implementation to always load all DLLs.
6637 Add 0x1000 offset to DLL base address when calling
6638 win32_add_one_solib.
6639 (child_initialization_done): New static global.
6640 (do_initial_child_stuff): Set child_initialization_done to
6641 zero during child initialization, and 1 after. Replace call
6642 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6643 Add comment.
6644 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6645 (handle_unload_dll): Add function documentation.
6646 (get_child_debug_event): Ignore load and unload DLL events
6647 during child initialization.
6648
d86d4aaf
DE
66492014-02-20 Doug Evans <dje@google.com>
6650
3bc32da3 6651 Remove global all_lwps.
d86d4aaf
DE
6652 * inferiors.h (ptid_of): Move here from linux-low.h.
6653 (pid_of, lwpid_of): Ditto.
6654 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6655 parameter is a struct thread_info * now.
6656 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6657 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6658 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6659 directly.
6660 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6661 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6662 * linux-arm-low.c (update_registers_callback): Update, "entry"
6663 parameter is a struct thread_info * now.
6664 Fetch lwpid from current_inferior directly.
6665 (arm_insert_point): Pass &all_threads to find_inferior instead of
6666 &all_lwps.
6667 (arm_remove_point): Ditto.
6668 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6669 (arm_prepare_to_resume): Fetch pid from thread.
6670 (arm_read_description): Fetch lwpid from current_inferior directly.
6671 * linux-low.c (all_lwps): Delete.
6672 (delete_lwp): Delete call to remove_inferior.
6673 (handle_extended_wait): Fetch lwpid from thread.
6674 (add_lwp): Don't set lwp->entry.id. Remove call to
6675 add_inferior_to_list.
6676 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6677 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6678 (kill_one_lwp_callback): Ditto.
6679 (linux_kill): Don't dereference NULL pointer.
6680 Fetch ptid,lwpid from thread.
6681 (get_detach_signal): Fetch ptid from thread.
6682 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6683 Simplify call to regcache_invalidate_thread.
6684 (delete_lwp_callback): Update, "entry" parameter is a
6685 struct thread_info * now. Fetch pid from thread.
6686 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6687 (status_pending_p_callback): Update, "entry" parameter is a
6688 struct thread_info * now. Fetch ptid from thread.
6689 (find_lwp_pid): Update, "entry" parameter is a
6690 struct thread_info * now.
6691 (linux_wait_for_lwp): Fetch pid from thread.
6692 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6693 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6694 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6695 (dequeue_one_deferred_signal): Ditto.
6696 (cancel_breakpoint): Fetch ptid from current_inferior.
6697 (linux_wait_for_event): Pass &all_threads to find_inferior,
6698 not &all_lwps. Fetch ptid, lwpid from thread.
6699 (count_events_callback): Update, "entry" parameter is a
6700 struct thread_info * now.
6701 (select_singlestep_lwp_callback): Ditto.
6702 (select_event_lwp_callback): Ditto.
6703 (cancel_breakpoints_callback): Ditto.
6704 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6705 not &all_lwps.
6706 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6707 (unsuspend_one_lwp): Update, "entry" parameter is a
6708 struct thread_info * now.
6709 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6710 not &all_lwps.
6711 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6712 Fetch lwpid from thread, not lwp.
6713 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6714 Pass &all_threads to find_inferior, not &all_lwps.
6715 (send_sigstop): Fetch lwpid from thread, not lwp.
6716 (send_sigstop_callback): Update, "entry" parameter is a
6717 struct thread_info * now.
6718 (suspend_and_send_sigstop_callback): Ditto.
6719 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6720 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6721 struct thread_info * now.
6722 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6723 from thread, lwp.
6724 (lwp_running): Update, "entry" parameter is a
6725 struct thread_info * now.
6726 (stop_all_lwps): Fetch ptid from thread.
6727 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6728 (linux_resume_one_lwp): Fetch lwpid from thread.
6729 (linux_set_resume_request): Update, "entry" parameter is a
6730 struct thread_info * now. Fetch pid, lwpid from thread.
6731 (resume_status_pending_p): Update, "entry" parameter is a
6732 struct thread_info * now.
6733 (need_step_over_p): Ditto. Fetch lwpid from thread.
6734 (start_step_over): Fetch lwpid from thread.
6735 (linux_resume_one_thread): Update, "entry" parameter is a
6736 struct thread_info * now. Fetch lwpid from thread.
6737 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6738 (proceed_one_lwp): Update, "entry" parameter is a
6739 struct thread_info * now. Fetch lwpid from thread.
6740 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6741 struct thread_info * now.
6742 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6743 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6744 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6745 directly.
6746 (regsets_store_inferior_registers): Ditto.
6747 (fetch_register, store_register): Ditto.
6748 (linux_read_memory, linux_write_memory): Ditto.
6749 (linux_request_interrupt): Ditto.
6750 (linux_read_auxv): Ditto.
6751 (linux_xfer_siginfo): Ditto.
6752 (linux_qxfer_spu): Ditto.
6753 (linux_qxfer_libraries_svr4): Ditto.
6754 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6755 moved to inferiors.h.
6756 (get_lwp): Delete.
6757 (get_thread_lwp): Update.
6758 (struct lwp_info): Delete member "entry". Simplify comment for
6759 member "thread".
6760 (all_lwps): Delete.
6761 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6762 current_inferior directly.
6763 (update_watch_registers_callback): Update, "entry" parameter is a
6764 struct thread_info * now. Fetch pid from thread.
6765 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6766 (mips_insert_point): Fetch lwpid from current_inferior.
6767 Pass &all_threads to find_inferior, not &all_lwps.
6768 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6769 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6770 directly.
6771 (mips_stopped_data_address): Ditto.
6772 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6773 directly.
6774 * linux-tile-low.c (tile_arch_setup): Ditto.
6775 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6776 (update_debug_registers_callback): Update, "entry" parameter is a
6777 struct thread_info * now. Fetch pid from thread.
6778 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6779 Pass &all_threads to find_inferior, not &all_lwps.
6780 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6781 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6782 Pass &all_threads to find_inferior, not &all_lwps.
6783 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6784 (i386_dr_low_get_status): Ditto.
6785 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6786 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6787 (x86_linux_read_description): Ditto.
6788 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6789
3b8361aa
DE
67902014-02-20 Doug Evans <dje@google.com>
6791
6792 * inferiors.c (get_first_inferior): Fix buglet.
6793
f7667f0d
DE
67942014-02-19 Doug Evans <dje@google.com>
6795
6796 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6797 * inferiors.c (add_thread): Change result type to struct thread_info *.
6798 All callers updated.
6799 (add_lwp): Call add_thread here instead of in callers.
6800 All callers updated.
6801 * linux-low.h (get_lwp_thread): Rewrite.
6802 (struct lwp_info): New member "thread".
6803
b3312d80
DE
68042014-02-19 Doug Evans <dje@google.com>
6805
6806 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6807 All callers updated.
6808
ecc6f45c
DE
68092014-02-19 Doug Evans <dje@google.com>
6810
6811 * inferiors.c (add_thread): Fix whitespace.
6812
649ebbca
DE
68132014-02-19 Doug Evans <dje@google.com>
6814
6815 * dll.c (clear_dlls): Replace accessing list implemention details
6816 with API function.
6817 * gdbthread.h (get_first_thread): Declare.
6818 * inferiors.c (for_each_inferior_with_data): New function.
6819 (get_first_thread): New function.
6820 (find_thread_ptid): Simplify.
6821 (get_first_inferior): New function.
6822 (clear_list): Delete.
6823 (one_inferior_p): New function.
6824 (clear_inferior_list): New function.
6825 (clear_inferiors): Update.
6826 * inferiors.h (for_each_inferior_with_data): Declare.
6827 (clear_inferior_list): Declare.
6828 (one_inferior_p): Declare.
6829 (get_first_inferior): Declare.
6830 * linux-low.c (linux_wait_for_event): Replace accessing list
6831 implemention details with API function.
6832 * server.c (target_running): Ditto.
6833 (accumulate_file_name_length): New function.
6834 (emit_dll_description): New function.
6835 (handle_qxfer_libraries): Replace accessing list implemention
6836 details with API function.
6837 (handle_qxfer_threads_worker): New function.
6838 (handle_qxfer_threads_proper): Replace accessing list implemention
6839 details with API function.
6840 (handle_query): Ditto.
6841 (visit_actioned_threads_callback_ftype): New typedef.
6842 (visit_actioned_threads_data): New struct.
6843 (visit_actioned_threads): Rewrite to be find_inferior callback.
6844 (resume): Call find_inferior.
6845 (handle_status): Replace accessing list implemention
6846 details with API function.
6847 (process_serial_event): Replace accessing list implemention details
6848 with API function.
6849 * target.c (set_desired_inferior): Replace accessing list implemention
6850 details with API function.
6851 * tracepoint.c (same_process_p): New function.
6852 (gdb_agent_about_to_close): Replace accessing list implemention
6853 details with API function.
6854 * win32-low.c (child_delete_thread): Replace accessing list
6855 implemention details with API function.
6856 (match_dll_by_basename): New function.
6857 (dll_is_loaded_by_basename): New function.
6858 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6859 details call to dll_is_loaded_by_basename.
6860
80894984
DE
68612014-02-19 Doug Evans <dje@google.com>
6862
6863 * dll.h (struct dll_info): Add comment.
6864 * gdbthread.h (struct thread_info): Add comment.
6865 (current_ptid): Simplify.
6866 * inferiors.c (add_process): Update.
6867 (remove_process): Update.
6868 * inferiors.h (struct process_info): Rename member "head" to "entry".
6869 * linux-low.c (delete_lwp): Update.
6870 (add_lwp): Update.
6871 (last_thread_of_process_p): Update.
6872 (kill_one_lwp_callback, linux_kill): Update.
6873 (status_pending_p_callback): Update.
6874 (wait_for_sigstop): Update. Simplify read of ptid.
6875 (start_step_over): Update.
6876 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6877 (get_lwp_thread): Update.
6878 (struct lwp_info): Rename member "head" to "entry".
6879 * regcache.h (inferior_list_entry): Delete.
6880 * server.c (kill_inferior_callback): Update.
6881 (detach_or_kill_inferior_callback): Update.
6882 (print_started_pid): Update.
6883 (print_attached_pid): Update.
6884 (process_serial_event): Simplify read of ptid.
6885 * thread-db.c (thread_db_create_event): Update.
6886 (thread_db_get_tls_address): Update.
6887 * win32-low.c (current_inferior_ptid): Simplify.
6888
46917d26
TT
68892014-02-19 Tom Tromey <tromey@redhat.com>
6890
6891 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6892 argument.
6893 (target_supports_btrace): Update.
6894
0759a81e
YQ
68952014-02-14 Yao Qi <yao@codesourcery.com>
6896
6897 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6898 (rsp-low-ipa.o): New target.
6899
a7191e8b
TT
69002014-02-12 Tom Tromey <tromey@redhat.com>
6901
6902 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6903 convert_ascii_to_int.
6904 * regcache.c (registers_to_string): Likewise.
6905 * remote-utils.c (decode_M_packet): Likewise.
6906 * server.c (process_serial_event): Likewise.
6907
ff0e980e
TT
69082014-02-12 Tom Tromey <tromey@redhat.com>
6909
6910 * server.c (handle_query, handle_v_run): Use hex2bin, not
6911 unhexify.
6912 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6913
e9371aff
TT
69142014-02-12 Tom Tromey <tromey@redhat.com>
6915
6916 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6917 convert_int_to_ascii.
6918 * regcache.c (registers_to_string, collect_register_as_string):
6919 Likewise.
6920 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6921 Likewise.
6922 * server.c (process_serial_event): Likewise.
6923 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6924 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6925
971dc0b8
TT
69262014-02-12 Tom Tromey <tromey@redhat.com>
6927
6928 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6929 bin2hex, not hexify.
6930 * tracepoint.c (cmd_qtstatus): Likewise.
6931
0a822afb
TT
69322014-02-12 Tom Tromey <tromey@redhat.com>
6933
6934 * remote-utils.c (monitor_output): Pass explicit length to
6935 hexify.
6936
9c3d6531
TT
69372014-02-12 Tom Tromey <tromey@redhat.com>
6938
6939 * tracepoint.c: Include rsp-low.h.
6940 * server.c: Include rsp-low.h.
6941 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6942 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6943 declare.
6944 * remote-utils.c: Include rsp-low.h.
6945 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6946 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6947 (convert_int_to_ascii, convert_ascii_to_int): Move to
6948 common/rsp-low.c.
6949 * regcache.c: Include rsp-low.h.
6950 * ax.c: Include rsp-low.h.
6951 * Makefile.in (SFILES): Add common/rsp-low.c.
6952 (OBS): Add rsp-low.o.
6953 (rsp-low.o): New target.
6954
01fd3ea5
TT
69552014-02-12 Tom Tromey <tromey@redhat.com>
6956
6957 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6958 Include print-utils.h.
6959 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6960 (plongest, thirty_two, phex_nz): Remove.
6961 * Makefile.in (SFILES): Add common/print-utils.c.
6962 (OBS): Add print-utils.o.
6963 (print-utils-ipa.o): New target.
6964 (print-utils.o): New target.
6965 (IPA_OBJS): Add print-utils-ipa.o.
6966
e99dc820
TT
69672014-02-06 Tom Tromey <tromey@redhat.com>
6968
6969 * Makefile.in (SFILES): Fix indentation.
6970
ee1e2d4f
DE
69712014-02-05 Doug Evans <dje@google.com>
6972
6973 * linux-low.c (linux_wait_for_event): Improve comment.
6974 (linux_wait_1): Keep current_inferior in sync with event_child.
6975
f5a02773
DE
69762014-01-22 Doug Evans <dje@google.com>
6977
6978 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6979
87ce2a04
DE
69802014-01-22 Doug Evans <dje@google.com>
6981
6982 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6983 * configure: Regenerate.
6984 * config.in: Regenerate.
6985 * Makefile.in (SFILES): Add debug.c.
6986 (OBS): Add debug.o.
6987 * debug.c: New file.
6988 * debug.h: New file.
6989 * linux-aarch64-low.c (*): Update all debugging printfs to use
6990 debug_printf instead of fprintf.
6991 * linux-arm-low.c (*): Ditto.
6992 * linux-cris-low.c (*): Ditto.
6993 * linux-crisv32-low.c (*): Ditto.
6994 * linux-m32r-low.c (*): Ditto.
6995 * linux-sparc-low.c (*): Ditto.
6996 * linux-x86.c (*): Ditto.
6997 * linux-low.c (*): Ditto.
6998 (linux_wait_1): Add calls to debug_enter, debug_exit.
6999 (linux_wait): Remove redundant debugging printf.
7000 (stop_all_lwps): Add calls to debug_enter, debug_exit.
7001 (linux_resume, unstop_all_lwps): Ditto.
7002 * mem-break.c (*): Update all debugging printfs to use
7003 debug_printf instead of fprintf.
7004 * remote-utils.c (*): Ditto.
7005 * thread-db.c (*): Ditto.
7006 * server.c #include <ctype.h>, "gdb_vecs.h".
7007 (debug_threads): Moved to debug.c.
7008 (*): Update all debugging printfs to use debug_printf instead of
7009 fprintf.
7010 (start_inferior): Replace call to fflush with call to debug_flush.
7011 (monitor_show_help): Mention set debug-format.
7012 (parse_debug_format_options): New function.
7013 (handle_monitor_command): Handle "monitor set debug-format".
7014 (gdbserver_usage): Mention --debug-format.
7015 (main): Parse --debug-format.
7016 * server.h (debug_threads): Declaration moved to debug.h.
7017 #include "debug.h".
7018 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
7019 trace_debug_1 that uses debug_printf.
7020 (tracepoint_look_up_symbols): Update all debugging printfs to use
7021 debug_printf instead of fprintf.
7022
e671835b
BS
70232014-01-20 Baruch Siach <baruch@tkos.co.il>
7024
7025 * linux-xtensa-low.c: Include asm/ptrace.h instead of
7026 sys/ptrace.h.
7027
b5737fa9
PA
70282014-01-17 Pedro Alves <palves@redhat.com>
7029
ea38d2a9 7030 PR build/16445
c7faa97a
PA
7031 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
7032 defined after including gdb_proc_service.h.
b5737fa9 7033
40ed484e
DE
70342014-01-16 Doug Evans <dje@google.com>
7035
7036 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
7037 (match_dll): Use it.
7038
969c39fb
MM
70392014-01-16 Markus Metzger <markus.t.metzger@intel.com>
7040
7041 * target.h (target_ops) <read_btrace>: Change parameters and
7042 return type to allow error reporting.
7043 * server.c (handle_qxfer_btrace): Support delta reads. Pass
7044 trace reading errors on.
7045 * linux-low.c (linux_low_read_btrace): Pass trace reading
7046 errors on.
7047 (linux_low_disable_btrace): New.
7048
ab7f45ba
DE
70492014-01-15 Doug Evans <dje@google.com>
7050
7051 * inferiors.c (thread_id_to_gdb_id): Delete.
7052 * inferiors.h (thread_id_to_gdb_id): Delete.
7053
66af0f44
EZ
70542014-01-13 Eli Zaretskii <eliz@gnu.org>
7055
7056 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7057 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7058 versions.
7059
9939e131
PA
70602014-01-08 Pedro Alves <palves@redhat.com>
7061
7062 * server.c (handle_status): Don't discard previous queued stop
7063 replies or thread's pending status here.
7064 (main) <disconnection>: Do it here instead.
7065
b7ea362b
PA
70662014-01-08 Pedro Alves <palves@redhat.com>
7067
7068 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7069 * server.c (visit_actioned_threads, handle_pending_status): New
7070 function.
7071 (handle_v_cont): Factor out parts to ...
7072 (resume): ... this new function. If in all-stop, and a thread
7073 being resumed has a pending status, report it without actually
7074 resuming.
7075 (myresume): Adjust to use the new 'resume' function.
7076 (clear_pending_status_callback, set_pending_status_callback)
7077 (find_status_pending_thread_callback): New functions.
7078 (handle_status): Handle the case of multiple threads having
7079 interesting statuses to report. Report threads' real last signal
7080 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7081 with an interesting thread to report the status for, instead of
7082 always reporting the status of the first thread.
7083
28498c42
JB
70842014-01-01 Joel Brobecker <brobecker@adacore.com>
7085
7086 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7087 * gdbreplay.c (gdbreplay_version): Likewise.
7088
f45c82da
YZ
70892013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7090
7091 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7092 iov.iov_len with the real length in use.
7093
379a5e2d
JB
70942013-12-13 Joel Brobecker <brobecker@adacore.com>
7095
7096 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7097 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7098 for all targets that use win32-low.c.
7099 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7100 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7101
4210d83e
PA
71022013-12-13 Pedro Alves <palves@redhat.com>
7103
7104 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7105 if equal to TARGET_WAITKIND_LOADED.
7106 * win32-low.c (cached_status): New static global.
7107 (win32_wait): Add declaration.
7108 (do_initial_child_stuff): Flush all initial pending debug events
7109 up to the initial breakpoint.
7110 (win32_wait): If CACHED_STATUS was set, return that instead
7111 of doing a real wait. Remove the code resuming the execution
7112 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7113 during the initial phase. Also remove the code changing
7114 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7115 TARGET_WAITKIND_STOPPED.
7116
e7f0d979
YQ
71172013-12-11 Yao Qi <yao@codesourcery.com>
7118
7119 * notif.c (handle_notif_ack): Return 0 if no notification
7120 matches.
7121
ebcf782c
DE
71222013-11-20 Doug Evans <dje@google.com>
7123
7124 * linux-low.c (linux_set_resume_request): Fix comment.
7125
20ad9378
DE
71262013-11-20 Doug Evans <dje@google.com>
7127
7128 * linux-low.c (resume_status_pending_p): Tweak comment.
7129
a196ebeb
WT
71302013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7131
7132 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7133 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7134 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7135 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7136 (srv_amd64_regobj): Add amd64-mpx.o.
7137 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7138 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7139 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7140 * i387-fp.c (num_pl_bnd_register) Added constant.
7141 (num_pl_bnd_cfg_registers) Added constant.
7142 (struct i387_xsave) Added reserved area and MPX fields.
7143 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7144 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7145 function.
7146 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7147 (init_registers_amd64_mpx_linux): Declare new function.
7148 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7149 (x86_64_regmap): Add MPX registers.
7150 (x86_linux_read_description): Add MPX case.
7151 (initialize_low_arch): Initialize MPX targets.
7152
0080a2f6
TT
71532013-11-18 Tom Tromey <tromey@redhat.com>
7154
7155 * configure: Rebuild.
7156 * configure.ac: Don't check for stdlib.h.
7157 * gdbreplay.c: Unconditionally include stdlib.h.
7158
2978b111
TT
71592013-11-18 Tom Tromey <tromey@redhat.com>
7160
7161 * config.in: Rebuild.
7162 * configure: Rebuild.
7163 * configure.ac: Don't use AC_HEADER_DIRENT.
7164
a3d08894
TT
71652013-11-18 Tom Tromey <tromey@redhat.com>
7166
7167 * server.h: Don't check HAVE_STRING_H.
7168 * gdbreplay.c: Don't check HAVE_STRING_H.
7169 * configure: Rebuild.
7170
0a5dd17d
TT
71712013-11-18 Tom Tromey <tromey@redhat.com>
7172
7173 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7174 LIBGNU.
7175
1bd2f0ba
TT
71762013-11-08 Tom Tromey <tromey@redhat.com>
7177
7178 * configure, config.in: Rebuild.
7179 * configure.ac: Remove unused configury.
7180
3266f10b
TT
71812013-11-08 Tom Tromey <tromey@redhat.com>
7182
7183 * acinclude.m4: Include common.m4, codeset.m4.
7184 * configure, config.in: Rebuild.
7185 * configure.ac: Use GDB_AC_COMMON.
7186
6682d959
AA
71872013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7188
7189 * linux-s390-low.c (HWCAP_S390_TE): New define.
7190 (s390_arch_setup): Consider the TE field in the HWCAP for
7191 determining 'have_regset_tdb'.
7192
fd0a4d76
SDJ
71932013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7194
7195 PR gdb/16014
7196 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7197 call to sizeof.
7198
1a3d890b
PA
71992013-10-02 Pedro Alves <palves@redhat.com>
7200
7201 * server.c (process_serial_event): Don't output "GDBserver
7202 exiting" if GDB is connected through stdio.
7203 * target.c (mywait): Likewise, be silent if GDB is connected
7204 through stdio.
7205
97ad4581
JB
72062013-10-01 Joel Brobecker <brobecker@adacore.com>
7207
7208 * lynx-low.c (lynx_add_threads_after_attach): New function.
7209 (lynx_attach): Remove call to add_thread. Add call to
7210 lynx_add_threads_after_attach instead.
7211
5b4e221c
MF
72122013-09-28 Mike Frysinger <vapier@gentoo.org>
7213
7214 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7215 * config.in, configure: Regenerated.
7216
ee47b2f8
YQ
72172013-09-18 Yao Qi <yao@codesourcery.com>
7218
7219 PR server/15959
7220 * server.c (start_inferior): Clear 'resume_info'.
7221
d6707650 72222013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7223
d6707650
JW
7224 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7225 for each register.
7226
9243dd0e 72272013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7228
9243dd0e
JW
7229 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7230 linux-tile-low.o to srv_tgtobj.
7231
c623a6ef
WN
72322013-09-16 Will Newton <will.newton@linaro.org>
7233
7234 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7235 out regs.
7236
fb71d39e
PA
72372013-09-06 Pedro Alves <palves@redhat.com>
7238
7239 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7240 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7241 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7242 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7243 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7244 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7245
8e7e9910
PA
72462013-09-06 Pedro Alves <palves@redhat.com>
7247
7248 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7249 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7250
7c3a12ca
PA
72512013-09-06 Pedro Alves <palves@redhat.com>
7252
7253 * linux-amd64-ipa.c: Include tracepoint.h.
7254 * linux-i386-ipa.c: Include tracepoint.h.
7255
8eb3d7b6
RW
72562013-09-06 Ricard Wanderlof <ricardw@axis.com>
7257
7258 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7259 (ps_get_thread_area): New function.
7260
eddddb9d
RW
72612013-09-06 Ricard Wanderlof <ricardw@axis.com>
7262
7263 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7264 (initialize_low_arch): Call init_registers_crisv32 rather than
7265 init_register_crisv32.
7266
533b0600
PA
72672013-09-05 Pedro Alves <palves@redhat.com>
7268
7269 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7270 to ...
7271 * hostio.h: ... this new file.
7272 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7273 win32-low.c: Include hostio.h.
7274
0ce3d3b5
PA
72752013-09-05 Pedro Alves <palves@redhat.com>
7276
7277 * server.h (gdb_client_data, handler_func, callback_handler_func)
7278 (delete_file_handler, add_file_handler, append_callback_event)
7279 (delete_callback_event, start_event_loop, initialize_event_loop):
7280 Move to event-loop.h and include it.
7281 * event-loop.h: New file.
7282
799cdc37
PA
72832013-09-05 Pedro Alves <palves@redhat.com>
7284
7285 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7286 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7287 (loaded_dll, unloaded_dll): Move to ...
7288 * dll.h: ... this new file.
7289 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7290
6a6bbd9d
PA
72912013-09-05 Pedro Alves <palves@redhat.com>
7292
7293 * server.h (current_process, get_thread_process, all_processes)
7294 (add_inferior_to_list, for_each_inferior, current_inferior)
7295 (remove_inferior, add_process, remove_process, find_process_pid)
7296 (have_started_inferiors_p, have_attached_inferiors_p)
7297 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7298 (clear_inferiors, find_inferior, find_inferior_id)
7299 (inferior_target_data, set_inferior_target_data)
7300 (inferior_regcache_data, set_inferior_regcache_data): Move to
7301 inferiors.h, and include it.
7302 * inferiors.h: New file.
7303
f699aaba
PA
73042013-09-05 Pedro Alves <palves@redhat.com>
7305
7306 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7307 Move ...
72f4393d 7308 * ax.h: ... here.
f699aaba 7309
c144c7a0
PA
73102013-09-05 Pedro Alves <palves@redhat.com>
7311
7312 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7313 tracepoint.h.
7314 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7315 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7316 (handle_tracepoint_general_set, handle_tracepoint_query)
7317 (tracepoint_finished_step, tracepoint_was_hit)
7318 (release_while_stepping_state_list, current_traceframe)
7319 (in_readonly_region, traceframe_read_mem)
7320 (fetch_traceframe_registers, traceframe_read_sdata)
7321 (traceframe_read_info, struct fast_tpoint_collect_status)
7322 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7323 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7324 (supply_fast_tracepoint_registers)
7325 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7326 (ipa_tdesc, claim_trampoline_space)
7327 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7328 (agent_mem_read, agent_get_trace_state_variable_value)
7329 (agent_set_trace_state_variable_value, agent_tsv_read)
7330 (agent_mem_read_string, get_raw_reg_func_addr)
7331 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7332 * tracepoint.h: ... this new file.
7333
ff42e6ab
PA
73342013-09-05 Pedro Alves <palves@redhat.com>
7335
7336 * server.h (perror_with_name, error, fatal, warning, paddress)
7337 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7338 include it.
7339 * utils.h: New file.
7340
541af0f4
PA
73412013-09-05 Pedro Alves <palves@redhat.com>
7342
7343 * server.h (remote_debug, noack_mode, transport_is_reliable)
7344 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7345 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7346 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7347 (write_enn, initialize_async_io, enable_async_io)
7348 (disable_async_io, check_remote_input_interrupt_request)
7349 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7350 (dead_thread_notify, prepare_resume_reply)
7351 (decode_address_to_semicolon, decode_address, decode_m_packet)
7352 (decode_M_packet, decode_X_packet, decode_xfer_write)
7353 (decode_search_memory_packet, unhexify, hexify)
7354 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7355 (look_up_one_symbol, relocate_instruction)
7356 (monitor_output): Move to remote-utils.h, and include it.
7357 * remote-utils.h: New file.
7358
eebdf26b
PA
73592013-09-05 Pedro Alves <palves@redhat.com>
7360
7361 * server.h (_): Delete.
7362
3aafd2ff
PA
73632013-09-02 Pedro Alves <palves@redhat.com>
7364
7365 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7366 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7367 allocated.
7368 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7369
cee83bcb
PM
73702013-09-02 Pierre Muller <muller@sourceware.org>
7371
7372 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7373 or WriteProcessMemory complete successfully and handle
7374 ERROR_PARTIAL_COPY error.
7375
9a13b2fa
PA
73762013-09-02 Pedro Alves <palves@redhat.com>
7377
7378 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7379 error instead of EIO.
7380
602e3198
JK
73812013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7382
7383 PR server/15604
7384 * linux-low.c: Include filestuff.h.
7385 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7386 * lynx-low.c: Include filestuff.h.
7387 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7388 * server.c: Include filestuff.h.
7389 (main): Call notice_open_fds.
7390 * spu-low.c: Include filestuff.h.
7391 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7392
96d7229d
LM
73932013-08-22 Luis Machado <lgustavo@codesourcery.com>
7394
7395 * Makefile.in: Explain why ../target and ../nat are not
7396 listed as include file search paths.
7397 (linux-waitpid.o): New object file rule.
7398 * configure.srv (srv_native_linux_obj): New variable.
7399 Replace all occurrences of linux native object files with
7400 $srv_native_linux_obj.
7401 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7402 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7403 (linux_enable_event_reporting): Remove declaration.
7404 (my_waitpid): Moved to common/linux-waitpid.c.
7405 (linux_wait_for_event): Pass ptid when calling
7406 linux_enable_event_reporting.
7407 (linux_supports_tracefork_flag): Remove.
7408 (linux_enable_event_reporting): Likewise.
7409 (linux_tracefork_grandchild): Remove.
7410 (STACK_SIZE): Moved to common/linux-ptrace.c.
7411 (linux_tracefork_child): Remove.
7412 (linux_test_for_tracefork): Remove.
7413 (linux_look_up_symbols): Call linux_supports_traceclone.
7414 (initialize_low): Remove call to linux_test_for_tracefork.
7415 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7416 common/linux-ptrace.h.
7417 (PTRACE_TYPE_ARG4): Likewise.
7418 Include linux-ptrace.h.
7419
32940073
PA
74202013-08-21 Pedro Alves <palves@redhat.com>
7421
7422 * config.in: Renegerate.
7423
33b60d58 74242013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7425
33b60d58
LM
7426 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7427 (SFILES): Remove $(srcdir)/common/target-common.c and
7428 add $(srcdir)/target/waitstatus.c.
7429 (OBS): Remove target-common.o and add waitstatus.o.
7430 (server_h): Remove $(srcdir)/../common/target-common.h and
7431 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7432 and $(srcdir)/../target/waitstatus.h.
7433 (target-common.o): Remove.
7434 (waitstatus.o): New target object file.
7435 * target.h: Do not include target-common.h and
7436 include target/resume.h, target/wait.h and
7437 target/waitstatus.h.
7438
b8e1b30e
LM
74392013-08-13 Luis Machado <lgustavo@codesourcery.com>
7440
7441 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7442 to PTRACE_TYPE_ARG3.
7443 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7444 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7445 PTRACE_TYPE_ARG4.
7446 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7447 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7448
7a60ad40
YQ
74492013-07-27 Jie Zhang <jie@codesourcery.com>
7450 Daniel Jacobowitz <dan@codesourcery.com>
7451 Yao Qi <yao@codesourcery.com>
7452
7453 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7454 (mips-linux-watch.o): New rule.
7455 (mips_linux_watch_h): New variable.
7456 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7457 srv_tgtobj.
7458 * linux-mips-low.c: Include mips-linux-watch.h.
7459 (struct arch_process_info, struct arch_lwp_info): New.
7460 (update_watch_registers_callback): New function.
7461 (mips_linux_new_process, mips_linux_new_thread) New functions.
7462 (mips_linux_prepare_to_resume, mips_insert_point): New
7463 functions.
7464 (mips_remove_point, mips_stopped_by_watchpoint): New
7465 functions.
7466 (rsp_bp_type_to_target_hw_bp_type): New function.
7467 (mips_stopped_data_address): New function.
7468 (the_low_target): Add watchpoint support functions.
7469
de6f69ad
YQ
74702013-07-27 Yao Qi <yao@codesourcery.com>
7471
7472 * i386-low.c: Include break-common.h.
7473 (enum target_hw_bp_type): Remove.
7474
3360c0bf
LM
74752013-07-24 Luis Machado <lgustavo@codesourcery.com>
7476
7477 * Makefile.in (SFILES): /common/target-common.c.
7478 (OBS): Add target-common.o.
7479 (server_h): Add $(srcdir)/../common/target-common.h.
7480 (target-common.o): New target.
7481 * server.c (queue_stop_reply_callback): Free
7482 status string after use.
7483 * target.c (target_waitstatus_to_string): Remove.
7484 * target.h: Include target-common.h.
7485 (resume_kind): Likewise.
7486 (target_waitkind): Likewise.
7487 (target_waitstatus): Likewise.
7488 (TARGET_WNOHANG): Likewise.
7489
bd885420
YQ
74902013-07-04 Yao Qi <yao@codesourcery.com>
7491
7492 * Makefile.in (host_alias): Use @host_noncanonical@.
7493 (target_alias): Use @target_noncanonical@.
7494 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7495 ACX_NONCANONICAL_HOST.
7496 * configure: Regenerated.
7497
7498 Revert:
7499 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7500
7501 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7502 * configure: Rebuild.
7503 * Makefile.in (version_host, version_target): Get from configure.
7504 (version.c): Use $(version_host) and $(version_target).
7505
17ef446e
PA
75062013-07-03 Pedro Alves <palves@redhat.com>
7507
7508 * Makefile.in (config.status): Depend on development.sh.
7509 * acinclude.m4: Include libmcheck.m4.
7510 * configure: Regenerate.
7511
7a9a7487
MG
75122013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7513
7514 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7515 attribute inside the parentheses.
7516 (winapi_DebugSetProcessKillOnExit): Ditto.
7517 (winapi_DebugBreakProcess): Ditto.
7518 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7519
49b64de6
MG
75202013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7521
7522 * notif.h (notif_event): Add a dummy member to avoid compiler
7523 errors.
7524
d5749ee7
PA
75252013-07-01 Pedro Alves <palves@redhat.com>
7526
7527 * hostio.c (HOSTIO_PATH_MAX): Define.
7528 (require_filename, handle_open, handle_unlink, handle_readlink):
7529 Use it.
7530
d8d2a3ee
PA
75312013-07-01 Pedro Alves <palves@redhat.com>
7532
7533 * server.h: Include "pathmax.h".
7534 * linux-low.c: Don't include sys/param.h.
7535 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7536 MAXPATHLEN.
7537 * win32-low.c: Don't include sys/param.h.
7538 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7539
bc7dea8d
PA
75402013-07-01 Pedro Alves <palves@redhat.com>
7541
7542 * event-loop.c: Don't check HAVE_UNISTD_H before including
7543 <unistd.h>.
7544 * gdbreplay.c: Likewise.
7545 * remote-utils.c: Likewise.
7546 * server.c: Likewise.
7547 * configure.ac: Don't check for unistd.h.
7548 * configure: Regenerate.
7549
d6c2da54
TT
75502013-06-28 Tom Tromey <tromey@redhat.com>
7551
7552 * Makefile.in (version.c): Use version.in, not
7553 common/version.in.
7554
257b6bec
MG
75552013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7556
7557 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7558 * configure: Rebuild.
7559 * Makefile.in (version_host, version_target): Get from configure.
7560 (version.c): Use $(version_host) and $(version_target).
7561
86ebe149
DK
75622013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7563
7564 Fix trace-status to output user name without trailing colon.
7565 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7566
f30aa5af
DK
75672013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7568
7569 Fix trace-status to output proper start-time and stop-time.
7570 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7571 output start time and stop time in hex as gdb expects.
7572
28a93511
YQ
75732013-06-26 Pedro Alves <pedro@codesourcery.com>
7574
7575 * tracepoint.c (build_traceframe_info_xml): Output trace state
7576 variables present in the trace buffer.
7577
01208463
TT
75782013-06-24 Tom Tromey <tromey@redhat.com>
7579
7580 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7581 create-version.sh.
7582 (version.o): Remove.
7583 * gdbreplay.c: Include version.h.
7584 (version, host_name): Don't declare.
7585 * server.h: Include version.h.
7586 (version, host_name): Don't declare.
7587
760256f9
PA
75882013-06-12 Pedro Alves <palves@redhat.com>
7589
7590 * linux-x86-low.c (linux_is_elf64): Delete global.
7591 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7592 with local linux_pid_exe_is_elf_64_file use.
7593
030031ee
PA
75942013-06-11 Pedro Alves <palves@redhat.com>
7595
7596 * linux-low.c (regset_disabled, disable_regset): New functions.
7597 (regsets_fetch_inferior_registers)
7598 (regsets_store_inferior_registers): Use them.
7599 (initialize_regsets_info); Don't allocate the disabled_regsets
7600 array here.
7601 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7602 comment.
7603
5da6eb0a
PA
76042013-06-11 Pedro Alves <palves@redhat.com>
7605
7606 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7607 xmalloc.
7608
7e5aaa09
PA
76092013-06-11 Pedro Alves <palves@redhat.com>
7610
7611 * linux-x86-low.c (initialize_low_arch): Call
7612 init_registers_x32_avx_linux.
7613
d878444c
JK
76142013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7615
7616 Fix compatibility with Android Bionic.
7617 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7618 it is not empty.
7619
3aee8918
PA
76202013-06-07 Pedro Alves <palves@redhat.com>
7621
5f2b57b5 7622 PR server/14823
3aee8918
PA
7623 * Makefile.in (OBS): Add tdesc.o.
7624 (IPA_OBJS): Add tdesc-ipa.o.
7625 (tdesc-ipa.o): New rule.
7626 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7627 interface.
7628 * linux-low.c (new_inferior): Delete.
7629 (disabled_regsets, num_regsets): Delete.
7630 (linux_add_process): Adjust to set the new per-process
7631 new_inferior flag.
7632 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7633 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7634 was a stop. When calling arch_setup, switch the current inferior
7635 to the thread that got an event.
7636 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7637 (regsets_fetch_inferior_registers)
7638 (regsets_store_inferior_registers): New regsets_info parameter.
7639 Adjust to use it.
7640 (linux_register_in_regsets): New regs_info parameter. Adjust to
7641 use it.
7642 (register_addr, fetch_register, store_register): New usrregs_info
7643 parameter. Adjust to use it.
7644 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7645 parameter regs_info. Adjust to use it.
7646 (linux_fetch_registers): Get the current inferior's regs_info, and
7647 adjust to use it.
7648 (linux_store_registers): Ditto.
7649 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7650 (initialize_low): Don't initialize the target_regsets here. Call
7651 initialize_low_arch.
7652 * linux-low.h (target_regsets): Delete declaration.
7653 (struct regsets_info): New.
7654 (struct usrregs_info): New.
7655 (struct regs_info): New.
7656 (struct process_info_private) <new_inferior>: New field.
7657 (struct linux_target_ops): Delete the num_regs, regmap, and
7658 regset_bitmap fields. New field regs_info.
7659 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7660 * i387-fp.c (num_xmm_registers): Delete.
7661 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7662 calls to new interface.
7663 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7664 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7665 Infer the number of xmm registers from the regcache's target
7666 description.
7667 * i387-fp.h (num_xmm_registers): Delete.
7668 * inferiors.c (add_thread): Don't install the thread's regcache
7669 here.
7670 * proc-service.c (gregset_info): Fetch the current inferior's
7671 regs_info. Adjust to use it.
7672 * regcache.c: Include tdesc.h.
7673 (register_bytes, reg_defs, num_registers)
7674 (gdbserver_expedite_regs): Delete.
7675 (get_thread_regcache): If the thread doesn't have a regcache yet,
7676 create one, instead of aborting gdbserver.
7677 (regcache_invalidate_one): Rename to ...
7678 (regcache_invalidate_thread): ... this.
7679 (regcache_invalidate_one): New.
7680 (regcache_invalidate): Only invalidate registers of the current
7681 process.
7682 (init_register_cache): Add target_desc parameter, and use it.
7683 (new_register_cache): Ditto. Assert the target description has a
7684 non zero registers_size.
7685 (regcache_cpy): Add assertions. Adjust.
7686 (realloc_register_cache, set_register_cache): Delete.
7687 (registers_to_string, registers_from_string): Adjust.
7688 (find_register_by_name, find_regno, find_register_by_number)
7689 (register_cache_size): Add target_desc parameter, and use it.
7690 (free_register_cache_thread, free_register_cache_thread_one)
7691 (regcache_release, register_cache_size): New.
7692 (register_size): Add target_desc parameter, and use it.
7693 (register_data, supply_register, supply_register_zeroed)
7694 (supply_regblock, supply_register_by_name, collect_register)
7695 (collect_register_as_string, collect_register_by_name): Adjust.
7696 * regcache.h (struct target_desc): Forward declare.
7697 (struct regcache) <tdesc>: New field.
7698 (init_register_cache, new_register_cache): Add target_desc
7699 parameter.
7700 (regcache_invalidate_thread): Declare.
7701 (regcache_invalidate_one): Delete declaration.
7702 (regcache_release): Declare.
7703 (find_register_by_number, register_cache_size, register_size)
7704 (find_regno): Add target_desc parameter.
7705 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7706 declarations.
7707 * remote-utils.c: Include tdesc.h.
7708 (outreg, prepare_resume_reply): Adjust.
7709 * server.c: Include tdesc.h.
7710 (gdbserver_xmltarget): Delete declaration.
7711 (get_features_xml, process_serial_event): Adjust.
7712 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7713 declare.
7714 (struct process_info) <tdesc>: New field.
7715 (ipa_tdesc): Declare.
7716 * tdesc.c: New file.
7717 * tdesc.h: New file.
7718 * tracepoint.c: Include tdesc.h.
7719 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7720 (get_context_regcache): Adjust to pass ipa_tdesc down.
7721 (do_action_at_tracepoint): Adjust to get the register cache size
7722 from the context regcache's description.
7723 (traceframe_walk_blocks): Adjust to get the register cache size
7724 from the current trace frame's description.
7725 (traceframe_get_pc): Adjust to get current trace frame's
7726 description and pass it down.
7727 (gdb_collect): Adjust to get the register cache size from the
7728 IPA's description.
7729 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7730 (gdbserver_xmltarget): Delete.
7731 (initialize_low_tracepoint): Set the ipa's target description.
7732 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7733 (initialize_low_tracepoint): Set the ipa's target description.
7734 * linux-x86-low.c: Include tdesc.h.
7735 [__x86_64__] (is_64bit_tdesc): New.
7736 (ps_get_thread_area, x86_get_thread_area): Use it.
7737 (i386_cannot_store_register): Rename to ...
7738 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7739 (i386_cannot_fetch_register): Rename to ...
7740 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7741 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7742 to new interface.
7743 (target_regsets): Rename to ...
7744 (x86_regsets): ... this.
7745 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7746 interface.
7747 (x86_siginfo_fixup): Use is_64bit_tdesc.
7748 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7749 (tdesc_x32_avx_linux, tdesc_x32_linux)
7750 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7751 Declare.
7752 (x86_linux_update_xmltarget): Delete.
7753 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7754 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7755 (AMD64_LINUX_USER64_CS): New.
7756 (x86_linux_read_description): New, based on
7757 x86_linux_update_xmltarget.
7758 (same_process_callback): New.
7759 (x86_arch_setup_process_callback): New.
7760 (x86_linux_update_xmltarget): New.
7761 (x86_regsets_info): New.
7762 (amd64_linux_regs_info): New.
7763 (i386_linux_usrregs_info): New.
7764 (i386_linux_regs_info): New.
7765 (x86_linux_regs_info): New.
7766 (x86_arch_setup): Reimplement.
7767 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7768 (x86_emit_ops): Ditto.
7769 (the_low_target): Adjust. Install x86_linux_regs_info,
7770 x86_cannot_fetch_register, and x86_cannot_store_register.
7771 (initialize_low_arch): New.
7772 * linux-ia64-low.c (tdesc_ia64): Declare.
7773 (ia64_fetch_register): Adjust.
7774 (ia64_usrregs_info, regs_info): New globals.
7775 (ia64_regs_info): New function.
7776 (the_low_target): Adjust.
7777 (initialize_low_arch): New function.
7778 * linux-sparc-low.c (tdesc_sparc64): Declare.
7779 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7780 Adjust.
7781 (sparc_arch_setup): New function.
7782 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7783 (the_low_target): Adjust.
7784 (initialize_low_arch): New function.
7785 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7786 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7787 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7788 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7789 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7790 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7791 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7792 (tdesc_powerpc_isa205_vsx64l): Declare.
7793 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7794 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7795 (ppc_set_pc, ppc_get_hwcap): Adjust.
7796 (ppc_usrregs_info): Forward declare.
7797 (!__powerpc64__) ppc_regmap_adjusted: New global.
7798 (ppc_arch_setup): Adjust to the current process'es target
7799 description.
7800 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7801 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7802 (ppc_store_evrregset): Adjust.
7803 (target_regsets): Rename to ...
7804 (ppc_regsets): ... this, and make static.
7805 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7806 (ppc_regs_info): New function.
7807 (the_low_target): Adjust.
7808 (initialize_low_arch): New function.
7809 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7810 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7811 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7812 (tdesc_s390x_linux64v2): Declare.
7813 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7814 (s390_fill_gregset, s390_store_last_break): Adjust.
7815 (target_regsets): Rename to ...
7816 (s390_regsets): ... this, and make static.
7817 (s390_get_pc, s390_set_pc): Adjust.
7818 (s390_get_hwcap): New target_desc parameter, and use it.
7819 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7820 (s390_arch_setup): Adjust to set the current process'es target
7821 description. Don't adjust the regmap.
7822 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7823 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7824 (regs_info_3264): New globals.
7825 (s390_regs_info): New function.
7826 (the_low_target): Adjust.
7827 (initialize_low_arch): New function.
7828 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7829 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7830 [__mips64] (init_registers_mips_linux)
7831 (init_registers_mips_dsp_linux): Delete defines.
7832 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7833 (have_dsp): New global.
7834 (mips_read_description): New, based on mips_arch_setup.
7835 (mips_arch_setup): Reimplement.
7836 (get_usrregs_info): New function.
7837 (mips_cannot_fetch_register, mips_cannot_store_register)
7838 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7839 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7840 (target_regsets): Rename to ...
7841 (mips_regsets): ... this, and make static.
7842 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7843 (dsp_regs_info, regs_info): New globals.
7844 (mips_regs_info): New function.
7845 (the_low_target): Adjust.
7846 (initialize_low_arch): New function.
7847 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7848 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7849 Declare.
7850 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7851 (arm_read_description): New, with bits factored from
7852 arm_arch_setup.
7853 (arm_arch_setup): Reimplement.
7854 (target_regsets): Rename to ...
7855 (arm_regsets): ... this, and make static.
7856 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7857 (arm_regs_info): New function.
7858 (the_low_target): Adjust.
7859 (initialize_low_arch): New function.
7860 * linux-m68k-low.c (tdesc_m68k): Declare.
7861 (target_regsets): Rename to ...
7862 (m68k_regsets): ... this, and make static.
7863 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7864 (m68k_regs_info): New function.
7865 (m68k_arch_setup): New function.
7866 (the_low_target): Adjust.
7867 (initialize_low_arch): New function.
7868 * linux-sh-low.c (tdesc_sharch): Declare.
7869 (target_regsets): Rename to ...
7870 (sh_regsets): ... this, and make static.
7871 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7872 (sh_regs_info, sh_arch_setup): New functions.
7873 (the_low_target): Adjust.
7874 (initialize_low_arch): New function.
7875 * linux-bfin-low.c (tdesc_bfin): Declare.
7876 (bfin_arch_setup): New function.
7877 (bfin_usrregs_info, regs_info): New globals.
7878 (bfin_regs_info): New function.
7879 (the_low_target): Adjust.
7880 (initialize_low_arch): New function.
7881 * linux-cris-low.c (tdesc_cris): Declare.
7882 (cris_arch_setup): New function.
7883 (cris_usrregs_info, regs_info): New globals.
7884 (cris_regs_info): New function.
7885 (the_low_target): Adjust.
7886 (initialize_low_arch): New function.
7887 * linux-cris-low.c (tdesc_crisv32): Declare.
7888 (cris_arch_setup): New function.
7889 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7890 (cris_regs_info): New function.
7891 (the_low_target): Adjust.
7892 (initialize_low_arch): New function.
7893 * linux-m32r-low.c (tdesc_m32r): Declare.
7894 (m32r_arch_setup): New function.
7895 (m32r_usrregs_info, regs_info): New globals.
7896 (m32r_regs_info): Adjust.
7897 (initialize_low_arch): New function.
7898 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7899 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7900 (tic6x_usrregs_info): Forward declare.
7901 (tic6x_read_description): New function, based on ...
7902 (tic6x_arch_setup): ... this. Reimplement.
7903 (target_regsets): Rename to ...
7904 (tic6x_regsets): ... this, and make static.
7905 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7906 (tic6x_regs_info): New function.
7907 (the_low_target): Adjust.
7908 (initialize_low_arch): New function.
7909 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7910 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7911 (target_regsets): Rename to ...
7912 (xtensa_regsets): ... this, and make static.
7913 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7914 globals.
7915 (xtensa_arch_setup, xtensa_regs_info): New functions.
7916 (the_low_target): Adjust.
7917 (initialize_low_arch): New function.
7918 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7919 (nios2_arch_setup): Set the current process'es tdesc.
7920 (target_regsets): Rename to ...
7921 (nios2_regsets): ... this.
7922 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7923 (nios2_regs_info): New function.
7924 (the_low_target): Adjust.
7925 (initialize_low_arch): New function.
a261b8f5
PA
7926 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7927 (aarch64_arch_setup): Set the current process'es tdesc.
7928 (target_regsets): Rename to ...
7929 (aarch64_regsets): ... this.
7930 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7931 (aarch64_regs_info): New function.
7932 (the_low_target): Adjust.
7933 (initialize_low_arch): New function.
3aee8918
PA
7934 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7935 globals.
7936 (target_regsets): Rename to ...
7937 (tile_regsets): ... this.
7938 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7939 (tile_regs_info): New function.
7940 (tile_arch_setup): Set the current process'es tdesc.
7941 (the_low_target): Adjust.
7942 (initialize_low_arch): New function.
7943 * spu-low.c (tdesc_spu): Declare.
7944 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7945 * win32-arm-low.c (tdesc_arm): Declare.
7946 (arm_arch_setup): New function.
7947 (the_low_target): Install arm_arch_setup instead of
7948 init_registers_arm.
7949 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7950 (init_windows_x86): Rename to ...
7951 (i386_arch_setup): ... this. Set `win32_tdesc'.
7952 (the_low_target): Adjust.
7953 * win32-low.c (win32_tdesc): New global.
7954 (child_add_thread): Don't create the thread cache here.
7955 (do_initial_child_stuff): Set the new process'es tdesc.
7956 * win32-low.h (struct target_desc): Forward declare.
7957 (win32_tdesc): Declare.
7958 * lynx-i386-low.c (tdesc_i386): Declare global.
7959 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7960 * lynx-low.c (lynx_tdesc): New global.
7961 (lynx_add_process): Set the new process'es tdesc.
7962 * lynx-low.h (struct target_desc): Forward declare.
7963 (lynx_tdesc): Declare global.
7964 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7965 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7966 * nto-low.c (nto_tdesc): New global.
7967 (do_attach): Set the new process'es tdesc.
7968 * nto-low.h (struct target_desc): Forward declare.
7969 (nto_tdesc): Declare.
7970 * nto-x86-low.c (tdesc_i386): Declare.
7971 (nto_x86_arch_setup): Set `nto_tdesc'.
7972
b1fbec62
GB
79732013-06-04 Gary Benson <gbenson@redhat.com>
7974
7975 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7976 to qSupported response when appropriate.
7977 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7978 with nonzero-length annex.
7979 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7980 arguments supplied in annex.
7981
d1ec4ce7
DE
79822013-05-31 Doug Evans <dje@google.com>
7983
ac44adcb 7984 PR server/15594
d1ec4ce7
DE
7985 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7986 64 bits in 64-cross-32 environment.
7987
9b25f2d3
PA
79882013-05-28 Pedro Alves <palves@redhat.com>
7989
7990 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7991 (aarch64-without-fpu.c): Delete rule.
7992 * configure.srv (aarch64*-*-linux*): Remove references to
7993 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7994 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7995 declaration.
7996
6740dc9c
PA
79972013-05-24 Pedro Alves <palves@redhat.com>
7998
7999 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
8000 instead of strchr/decode_address. Error if the range isn't split
8001 with a ','. Don't assume there's be a ':' in the action.
8002
c2d6af84
PA
80032013-05-23 Yao Qi <yao@codesourcery.com>
8004 Pedro Alves <palves@redhat.com>
8005
8006 * linux-low.c (lwp_in_step_range): New function.
8007 (linux_wait_1): If the thread was range stepping and stopped
8008 outside the stepping range, report the stop to GDB. Otherwise,
8009 continue stepping. Add range stepping debug output.
8010 (linux_set_resume_request): Copy the step range from the resume
8011 request to the lwp.
8012 (linux_supports_range_stepping): New.
8013 (linux_target_ops) <supports_range_stepping>: Set to
8014 linux_supports_range_stepping.
8015 * linux-low.h (struct linux_target_ops)
8016 <supports_range_stepping>: New field.
8017 (struct lwp_info) <step_range_start, step_range_end>: New fields.
8018 * linux-x86-low.c (x86_supports_range_stepping): New.
8019 (the_low_target) <supports_range_stepping>: Set to
8020 x86_supports_range_stepping.
8021 * server.c (handle_v_cont): Handle 'r' action.
8022 (handle_v_requests): Append ";r" if the target supports range
8023 stepping.
8024 * target.h (struct thread_resume) <step_range_start,
8025 step_range_end>: New fields.
8026 (struct target_ops) <supports_range_stepping>:
8027 New field.
8028 (target_supports_range_stepping): New macro.
8029
58794e1a
JB
80302013-05-17 Joel Brobecker <brobecker@adacore.com>
8031
8032 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
8033 confusion in comment.
8034
d631c5a7
JB
80352013-05-17 Joel Brobecker <brobecker@adacore.com>
8036
8037 * lynx-low.c (struct process_info_private): New type.
8038 (lynx_add_process): New function.
8039 (lynx_create_inferior, lynx_attach): Replace calls to
8040 add_process by calls to lynx_add_process.
8041 (lynx_resume): If PTID is null, then try using
8042 current_process()->private->last_wait_event_ptid.
8043 Add comments.
8044 (lynx_clear_inferiors): Delete. The contents of that function
8045 has been inlined in lynx_mourn;
8046 (lynx_wait_1): Save the ptid in the process's private data.
8047 (lynx_mourn): Free the process' private data. Replace call
8048 to lynx_clear_inferiors by call to clear_inferiors.
8049
96f7a20f
YQ
80502013-05-17 Yao Qi <yao@codesourcery.com>
8051
8052 * i386-low.c (i386_length_and_rw_bits): Move the comment to
8053 the right place.
8054
db0dfaa0
LM
80552013-05-16 Luis Machado <lgustavo@codesourcery.com>
8056
8057 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8058 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8059 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8060 PT_TEXT_END_ADDR guards. Update comments.
8061 (linux_target_op) <read_offsets>: Conditionally define to
8062 linux_read_offsets if the target is UCLIBC and if it defines
8063 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8064
68f5f838
SL
80652013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8066 Andrew Jenner <andrew@codesourcery.com>
8067
8068 * Makefile.in (SFILES): Add linux-nios2-low.c.
8069 (clean): Add action to delete nios2-linux.c.
8070 (nios2-linux.c): New rule.
8071 * configure.srv: Add nios2*-*-linux*.
8072 * linux-nios2-low.c: New.
8073
1ebff1fd
HAQ
80742013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8075
8076 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8077
f6150862
HZ
80782013-04-25 Hui Zhu <hui@codesourcery.com>
8079
8080 PR gdb/15186
f6150862
HZ
8081 * ax.c (ax_printf): Add fflush.
8082
614c279d
TT
80832013-04-22 Tom Tromey <tromey@redhat.com>
8084
8085 * Makefile.in (SFILES): Add filestuff.c.
8086 (OBS): Add filestuff.o.
8087 (filestuff.o): New target.
8088 * config.in, configure: Rebuild.
8089 * configure.ac: Check for fdwalk, pipe2.
8090
7d4e5717
PA
80912013-04-17 Pedro Alves <palves@redhat.com>
8092
8093 * configure.ac (USE_THREAD_DB): Delete variable.
8094 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8095 Don't AC_SUBST USE_THREAD_DB.
8096 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8097 * config.in, configure: Regenerate.
8098
d5c93e41
PA
80992013-04-16 Pedro Alves <palves@redhat.com>
8100
8101 * linux-low.h (struct lwp_info) <thread_known>: Move under
8102 the USE_THREAD_DB #ifdef.
8103
04f5fe89
PA
81042013-04-16 Pedro Alves <palves@redhat.com>
8105
8106 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8107 (linux-low.o): Delete rule.
8108 * linux-low.h: Always include "gdb_thread_db.h" instead of
8109 conditionally including thread_db.h.
8110 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8111 HAVE_THREAD_DB_H.
8112
480b27bf
JK
81132013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8114
8115 * Makefile.in (install-only): Fix make install regression.
8116
43662968
JK
81172013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8118
8119 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8120 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8121 installation.
8122 * gdbserver.1: Remove.
8123
3e74e146
PA
81242013-03-22 Pedro Alves <palves@redhat.com>
8125
8126 * linux-low.c (handle_extended_wait): Don't call
8127 linux_enable_event_reporting.
8128
a8347a2a
TT
81292013-03-15 Tony Theodore <tonyt@logyst.com>
8130
8131 PR build/9098:
8132 * Makefile.in (SHELL): Use @SHELL@.
8133
eeb56fa7
SDJ
81342013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8135
8136 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8137 compiler warning.
8138
4fa7e2ff
JB
81392013-03-13 Joel Brobecker <brobecker@adacore.com>
8140
8141 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8142 Remove extraneous NULL element.
8143
8ddb1965
YQ
81442013-03-13 Yao Qi <yao@codesourcery.com>
8145
8146 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8147 'V' block in trace frame.
8148
9accd112
MM
81492013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8150
8151 * target.h (struct target_ops): Add btrace ops.
8152 (target_supports_btrace): New macro.
8153 (target_enable_btrace): New macro.
8154 (target_disable_btrace): New macro.
8155 (target_read_btrace): New macro.
8156 * gdbthread.h (struct thread_info): Add btrace field.
8157 * server.c: Include btrace-common.h.
8158 (handle_btrace_general_set): New function.
8159 (handle_btrace_enable): New function.
8160 (handle_btrace_disable): New function.
8161 (handle_general_set): Call handle_btrace_general_set.
8162 (handle_qxfer_btrace): New function.
8163 (struct qxfer qxfer_packets[]): Add btrace entry.
8164 * inferiors.c (remove_thread): Disable btrace.
8165 * linux-low: Include linux-btrace.h.
8166 (linux_low_enable_btrace): New function.
8167 (linux_low_read_btrace): New function.
8168 (linux_target_ops): Add btrace ops.
8169 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8170 Add srv_linux_btrace=yes.
8171 (x86_64-*-linux*): Add linux-btrace.o.
8172 Add srv_linux_btrace=yes.
8173 * configure.ac: Define HAVE_LINUX_BTRACE.
8174 * config.in: Regenerated.
8175 * configure: Regenerated.
8176
5cc22e4c
MM
81772013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8178
8179 * server.c (handle_qxfer): Preserve error message if -3 is
8180 returned.
8181 (qxfer): Document the -3 return value.
8182
7c97f91e
MM
81832013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8184
8185 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8186 (linux_btrace_h): New variable.
8187 (linux-btrace.o): New rule.
8188
be9a119c 81892013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8190 Hafiz Abid Qadeer <abidh@codesourcery.com>
8191
8192 * tracepoint.c (trace_buffer_size): New global.
8193 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8194 (init_trace_buffer): Change to one-argument function. Allocate
8195 trace buffer memory.
8196 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8197 handle QTBuffer:size packet.
8198 (cmd_bigqtbuffer_size): New function.
8199 (initialize_tracepoint): Call init_trace_buffer with
8200 DEFAULT_TRACE_BUFFER_SIZE.
8201 * server.c (handle_query): Add QTBuffer:size in the
8202 supported packets.
8203
e64f7499
YQ
82042013-03-07 Yao Qi <yao@codesourcery.com>
8205
8206 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8207 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8208 of -1.
8209 (cmd_qtsp): Adjust condition. Do post increment.
8210 Set cur_action and cur_step_action back to 0.
8211
f0ae6fc3
PA
82122013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8213
8214 PR server/15236
8215 * linux-low.c (linux_write_memory): Return early success if LEN is
8216 zero.
8217
b5b0b0af
CV
82182013-03-05 Corinna Vinschen <vinschen@redhat.de>
8219
334ad4a8 8220 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8221
589bc927
TT
82222013-02-28 Tom Tromey <tromey@redhat.com>
8223
8224 * configure.ac: Invoke AC_SYS_LARGEFILE.
8225 * configure, config.in: Rebuild.
8226
dfe07582
CV
82272013-02-28 Corinna Vinschen <vinschen@redhat.com>
8228
8229 * win32-low.c: Throughout, fix format strings and casts of
8230 printf-like functions to avoid type related warnings on all
8231 platforms.
8232 (get_child_debug_event): Print dwDebugEventCode as hex since
8233 that's how it's usually documented.
8234
736cd585
YQ
82352013-02-28 Yao Qi <yao@codesourcery.com>
8236
8237 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8238 pulongest.
8239
e1f58301
JW
82402013-02-27 Jiong Wang <jiwang@tilera.com>
8241
8242 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8243 (reg-tilegx32.c): New rule.
8244 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8245 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8246 different register info initializer according to elf class.
8247 (init_registers_tilgx32): New function. The tilegx32 register info
8248 initializer.
8249 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8250 (tile_store_gregset): Likewise.
8251
d171ca78
YQ
82522013-02-27 Yao Qi <yao@codesourcery.com>
8253
8254 * server.c (process_point_options): Print debug message when
8255 debug_threads is true.
8256
282bbdf3
YQ
82572013-02-26 Yao Qi <yao@codesourcery.com>
8258
8259 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8260
aca22551
PA
82612013-02-19 Pedro Alves <palves@redhat.com>
8262 Kai Tietz <ktietz@redhat.com>
8263
8264 PR gdb/15161
8265
8266 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8267 instead of strtoul to extract address from packet.
8268 (process_serial_event) <'z'>: Likewise.
8269
4f3cee1c
YQ
82702013-02-18 Yao Qi <yao@codesourcery.com>
8271
8272 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8273
8e1d55a3
PA
82742013-02-14 Pedro Alves <palves@redhat.com>
8275
8276 Plug memory leak.
8277
8278 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8279 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8280
458820da
PA
82812013-02-14 Pedro Alves <palves@redhat.com>
8282
8283 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8284
baea0dae
PA
82852013-02-14 Pedro Alves <palves@redhat.com>
8286
8287 * tracepoint.c (save_string): Delete.
8288 (add_tracepoint_action): Use savestring instead of save_string.
8289
0b1afbb3
PA
82902013-02-12 Pedro Alves <palves@redhat.com>
8291
8292 * linux-xtensa-low.c: Ditto.
8293 * xtensa-xtregs.c: Ditto.
8294
8a4ac37e
PA
82952013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8296
8297 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8298 thread_db.
8299
148de6bb
MS
83002013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8301
8302 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8303 aarch64_num_wp_regs and aarch64_num_bp_regs to
8304 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8305
55fac6e0
MS
83062013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8307
8308 * linux-aarch64-low.c (ps_get_thread_area): Replace
8309 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8310
176eb98c
MS
83112013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8312 Marcus Shawcroft <marcus.shawcroft@arm.com>
8313 Nigel Stephens <nigel.stephens@arm.com>
8314 Yufeng Zhang <yufeng.zhang@arm.com>
8315
8316 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8317 (aarch64.c, aarch64-without-fpu.c): New targets.
8318 * configure.srv (aarch64*-*-linux*): New.
8319 * linux-aarch64-low.c: New file.
8320
56f7af9c
MS
83212013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8322
43aaf8b6 8323 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8324 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8325 (dequeue_one_deferred_signal, linux_resume_one_thread)
8326 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8327 (linux_tracefork_grandchild, linux_test_for_tracefork)
8328 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8329 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8330 where the argument is 0.
8331
60f662b0
YQ
83322013-01-25 Yao Qi <yao@codesourcery.com>
8333
8334 * event-loop.c: Include "queue.h".
8335 (gdb_event_p): New typedef.
8336 (struct gdb_event) <next_event>: Remove.
8337 (event_queue): Change to QUEUE(gdb_event_p).
8338 (async_queue_event): Remove.
8339 (gdb_event_xfree): New.
8340 (initialize_event_loop): New.
8341 (process_event): Use API from QUEUE.
8342 (wait_for_event): Likewise.
8343 * server.c (main): Call initialize_event_loop.
8344 * server.h (initialize_event_loop): Declare.
8345
5ae4861a
YQ
83462013-01-18 Yao Qi <yao@codesourcery.com>
8347
8348 * ax.h (struct eval_agent_expr_context): New.
8349 (gdb_eval_agent_expr): Update declaration.
8350 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8351 TFRAME. Add new argument CTX.
8352 * server.h (struct eval_agent_expr_context): Declare.
8353 (agent_mem_read, agent_tsv_read): Update declaration.
8354 (agent_mem_read_string): Likewise.
8355 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8356 (add_traceframe_block): Add new argument TPOINT.
8357 Increase TPOINT->traceframe_usage.
8358 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8359 eval_tracepoint_agent_expr.
8360 (condition_true_at_tracepoint): Likewise.
8361 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8362 (agent_mem_read_string, agent_tsv_read): Likewise.
8363
85e00e85
YQ
83642013-01-16 Yao Qi <yao@codesourcery.com>
8365
8366 * linux-low.c (linux_resume_one_lwp): Don't check
8367 'lwp->bp_reinsert != 0'.
8368
4039cf45
JB
83692013-01-07 Joel Brobecker <brobecker@adacore.com>
8370 Pedro Alves <palves@redhat.com>
8371
8372 * lynx-low.c (ptrace_request_to_str): Define a temporary
8373 macro and use it to simplify this function's implementation.
8374
9044dee2
JB
83752013-01-07 Joel Brobecker <brobecker@adacore.com>
8376
8377 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8378 sets errno.
8379
e6352c8f
JB
83802013-01-07 Joel Brobecker <brobecker@adacore.com>
8381
8382 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8383
50681a27
JB
83842013-01-07 Joel Brobecker <brobecker@adacore.com>
8385
8386 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8387
3f6e77ef
JB
83882013-01-07 Joel Brobecker <brobecker@adacore.com>
8389
8390 * lynx-low.c (lynx_resume): Use the resume_info parameter
8391 to determine the ptid for the lynx_ptrace call, unless
8392 it is equal to minus_one_ptid, in which case we use the
8393 ptid of the current_inferior.
8394 (lynx_wait_1): After having received a thread create/exit
8395 event, resume the inferior's execution using the signaling
8396 thread's ptid, rather than the old ptid.
8397
7fda33ae
JB
83982013-01-07 Joel Brobecker <brobecker@adacore.com>
8399
8400 * lynx-low.c (lynx_resume): Delete variable ret.
8401
b9786c74
JB
84022013-01-01 Joel Brobecker <brobecker@adacore.com>
8403
8404 * gdbreplay.c (gdbreplay_version): Update copyright year.
8405 * server.c (gdbserver_version): Likewise.
8406
8b93d60f
JB
84072012-12-17 Joel Brobecker <brobecker@adacore.com>
8408
8409 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8410 new thread.
8411
037335a7
JB
84122012-12-17 Joel Brobecker <brobecker@adacore.com>
8413
8414 * lynx-low.c (ptrace_request_to_str): Add handling for
8415 PTRACE_GETTRACESIG.
8416
52d4cbd8
JB
84172012-12-17 Joel Brobecker <brobecker@adacore.com>
8418
8419 * lynx-low.c (lynx_attach): Delete variable new_process.
8420
ab8f6ca9
JB
84212012-12-17 Joel Brobecker <brobecker@adacore.com>
8422
8423 * lynx-low.c (lynx_create_inferior): Delete variable
8424 new_process.
8425
78cbc024
JB
84262012-12-17 Joel Brobecker <brobecker@adacore.com>
8427
8428 * lynx-low.c (ptrace_request_to_str): Do not handle
8429 PTRACE_GETTHREADLIST if this macro does not exist.
8430
14a00470
YQ
84312012-12-15 Yao Qi <yao@codesourcery.com>
8432
8433 * Makefile.in (OBS): Add notif.o.
8434 * notif.c, notif.h: New.
8435 * server.c: Include "notif.h".
8436 (struct vstop_notif) <next>: Remove.
8437 <base>: New field.
8438 (queue_stop_reply): Update.
8439 (push_event, send_next_stop_reply): Remove.
8440 (discard_queued_stop_replies): Update.
8441 (notif_stop): New variable.
8442 (handle_v_stopped): Remove.
8443 (handle_v_requests): Don't call handle_v_stopped. Call
8444 handle_ack_notif instead.
8445 (queue_stop_reply_callback): Call notif_event_enque instead
8446 of queue_stop_reply.
8447 (handle_status): Don't call send_next_stop_reply, call
8448 notif_write_event instead.
8449 (kill_inferior_callback): Likewise.
8450 (detach_or_kill_inferior_callback): Likewise.
8451 (main): Call initialize_notif.
8452 (process_serial_event): Call QUEUE_is_empty.
8453 (handle_target_event): Call notif_push instead of push event.
8454 * server.h (push_event): Remove declaration.
8455
61c125b9
TT
84562012-12-10 Tom Tromey <tromey@redhat.com>
8457
8458 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8459 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8460 macros.
8461 (.c.o): Rewrite.
8462 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8463 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8464 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8465 (amd64-linux-ipa.o, ax.o): Rewrite.
8466 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8467 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8468 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8469 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8470 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8471 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8472 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8473 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8474 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8475 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8476 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8477 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8478 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8479 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8480 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8481 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8482 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8483 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8484 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8485 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8486 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8487 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8488 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8489 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8490 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8491 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8492 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8493 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8494 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8495 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8496 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8497 (reg-tilegx.o): Remove.
8498 (all_object_files): New macro.
8499 Include .deps files.
8500 * aclocal.m4, configure: Rebuild.
8501 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8502 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8503 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8504
e90e9ad9
TT
85052012-12-05 Tom Tromey <tromey@redhat.com>
8506
8507 PR gdb/14917:
8508 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8509
02d403bf 85102012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8511
8512 * configure.ac: Check for linux/perf_event.h.
8513 * config.in: Regenerated.
8514 * configure: Regenerated.
8515
0270a750
PA
85162012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8517
8518 * hostio.c (handle_readlink): Decrease buffer size
8519 parameter passed to readlink by one byte.
8520
8c29b58e
YQ
85212012-11-26 Yao Qi <yao@codesourcery.com>
8522
8523 * configure.ac (build_warnings): Append '-Wempty-body'.
8524 * configure: Regenerated.
8525 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8526 body.
8527
8bdce1ff
PM
85282012-11-15 Pierre Muller <muller@sourceware.org>
8529
8530 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8531 * config.in: Regenerate.
8532 * configure: Regenerate.
8533 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8534 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8535 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8536 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8537 header.
8538 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8539 instead of <sys/wait.h> header.
8540 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8541
02d403bf 85422012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8543
8544 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8545 (various make rules): Remove -DGDBSERVER
8546
fbd5db48
YQ
85472012-11-09 Yao Qi <yao@codesourcery.com>
8548
8549 * spu-low.c (current_ptid): Move it to ..
8550 * gdbthread.h: ... here. New.
8551 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8552 * server.c (myresume, process_serial_event): Likewise.
8553 * thread-db.c (thread_db_find_new_threads): Likewise.
8554 * tracepoint.c (run_inferior_command): Likewise.
8555
b3dc46ff
AB
85562012-10-01 Andrew Burgess <aburgess@broadcom.com>
8557
8558 * server.c (handle_search_memory_1): Include access length in
8559 warning message.
8560
07c04788
HPN
85612012-09-05 Michael Brandt <michael.brandt@axis.com>
8562
8563 * linux-crisv32-low.c: Fix compile errors.
8564
918d227b
YQ
85652012-09-04 Yao Qi <yao@codesourcery.com>
8566
8567 * tracepoint.c (cmd_qtsv): Adjust debug message.
8568 Don't check CUR_TPOINT.
8569
18c1b81a
YQ
85702012-08-28 Yao Qi <yao@codesourcery.com>
8571
8572 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8573 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8574 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8575 Remove declarations of xmalloc, xreallloc, xstrdup and
8576 freeargv.
8577 * Makefile.in (libiberty_h): New.
8578 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8579 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8580
dc82f37b
YQ
85812012-08-23 Yao Qi <yao@codesourcery.com>
8582
8583 * server.h: Remove declaration of 'xsnprintf'.
8584
406b1477
KS
85852012-08-22 Keith Seitz <keiths@redhat.com>
8586
8587 * server.h: Include build-gnulib-gbserver/config.h.
8588 * gdbreplay.c: Likewise.
8589
e6712ff1
DE
85902012-08-08 Doug Evans <dje@google.com>
8591
8592 * Makefile.in (SFILES): Add gdb_vecs.c.
8593 (OBS): Add gdb_vecs.o.
8594 (gdb_vecs_h, host_defs_h): New variables.
8595 (thread-db.o): Add $(gdb_vecs_h) dependency.
8596 (gdb_vecs.o): New rule.
8597 * thread-db.c: #include "gdb_vecs.h".
8598 (thread_db_load_search): Use a vector to iterate over path elements.
8599 Handle text appearing after "$pdir".
8600
8601 * configure.ac: Add check for strstr.
8602 * config.in: Regenerate.
8603 * configure: Regenerate.
8604
7c3270ae
UW
86052012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8606
8607 * hostio.c (handle_pread): If pread fails, fall back to attempting
8608 lseek/read.
8609 (handle_pwrite): Likewise for pwrite.
8610
b62e2b27
UW
86112012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8612
8613 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8614 between unsupported TYPE and unimplementable ADDR/LEN combination.
8615 (arm_insert_point): Act on new return value.
8616
78a99e91
PA
86172012-07-31 Pedro Alves <palves@redhat.com>
8618
8619 * server.c (process_point_options): Only skip tokens if we find
8620 one that is unrecognized. Don't treat 'X' specially while
8621 skipping unrecognized tokens.
8622
fcf303ab
UW
86232012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8624
8625 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8626 to 4-byte-align HW breakpoint addresses for Thumb.
8627
7255706c
YQ
86282012-07-27 Yao Qi <yao@codesourcery.com>
8629
8630 PR remote/14161.
8631
8632 * server.h: Declare gdb_agent_about_to_close.
8633 * target.c (kill_inferior): Include "agent.h".
8634 New. Send command 'kill'.
8635 * target.h (kill_inferior): Removed macro.
8636 * tracepoint.c (gdb_agent_about_to_close): New.
8637 (gdb_agent_helper_thread): Handle command 'close'.
8638 Wait endlessly until the inferior stops.
8639 Install gdb_agent_remove_socket to atexit hook.
8640 (agent_socket_name): New static variable.
8641 (gdb_agent_socket_init): Replace local variable 'name' with
8642 'agent_socket_name'.
8643 (gdb_agent_remove_socket): New.
8644
5a3f286f
YQ
86452012-07-27 Yao Qi <yao@codesourcery.com>
8646
8647 * server.c (process_point_options): Stop at 'X' when parsing.
8648
961bd387
ME
86492012-07-19 Michael Eager <eager@eagercon.com>
8650
a261b8f5 8651 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8652 to hw_execute.
8653 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8654 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8655 hardware breakpoint.
8656
aa7c7447
JK
86572012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8658
8659 * gdbserver/linux-low.c (initialize_low): Call
8660 linux_ptrace_init_warnings.
8661
7f216e7c
DE
86622012-07-02 Doug Evans <dje@google.com>
8663
8664 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8665 pointer to int.
8666
d3ce09f5
SS
86672012-07-02 Stan Shebs <stan@codesourcery.com>
8668
8669 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8670 (ax.o): Add it to build rule.
8671 (ax-ipa.o): Ditto.
8672 (OBS): Add format.o.
8673 (IPA_OBS): Add format.o.
8674 * server.c (handle_query): Claim support for breakpoint commands.
8675 (process_point_options): Add command case.
8676 (process_serial_event): Leave running if there are printfs in
8677 effect.
8678 * mem-break.h (any_persistent_commands): Declare.
8679 (add_breakpoint_commands): Declare.
8680 (gdb_no_commands_at_breakpoint): Declare.
8681 (run_breakpoint_commands): Declare.
8682 * mem-break.c (struct point_command_list): New struct.
8683 (struct breakpoint): New field command_list.
8684 (any_persistent_commands): New function.
8685 (add_commands_to_breakpoint): New function.
8686 (add_breakpoint_commands): New function.
8687 (gdb_no_commands_at_breakpoint): New function.
8688 (run_breakpoint_commands): New function.
8689 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8690 locally.
8691 * ax.c: Include format.h.
8692 (ax_printf): New function.
8693 (gdb_eval_agent_expr): Add printf opcode.
8694
2f8f6aed
YQ
86952012-06-13 Yao Qi <yao@codesourcery.com>
8696
8697 * server.c (start_inferior): Remove duplicated writes to fields
8698 'last_resume_kind' and 'last_status' of 'current_inferior'.
8699
0c9070b3
YQ
87002012-06-12 Yao Qi <yao@codesourcery.com>
8701 Pedro Alves <palves@redhat.com>
8702
8703 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8704 comment.
8705 * server.c (handle_v_cont): Extend comment.
8706
c52daf70
YQ
87072012-06-11 Yao Qi <yao@codesourcery.com>
8708
8709 * linux-low.c (linux_attach): Add 'static'.
8710
d38bbb0a
YQ
87112012-06-06 Yao Qi <yao@codesourcery.com>
8712
8713 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8714
89dc0afd
JK
87152012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8716
8717 Fix gcc -flto compilation warning.
8718 * server.c (main): Make variable multi_mode and attach volatile.
8719
75f62ce7
TJB
87202012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8721
8722 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8723 if the platform doesn't know about it.
8724
65f479b6
PA
87252012-05-30 Jeff Kenton <jkenton@tilera.com>
8726
8727 * Makefile.in (SFILES): Add linux-tile-low.c.
8728 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8729 * configure.srv: Handle tilegx-*-linux*.
8730 * linux-tile-low.c: New file.
8731
0c5bf5a9
JK
87322012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8733
8734 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8735
a493e3e2
PA
87362012-05-24 Pedro Alves <palves@redhat.com>
8737
8738 PR gdb/7205
8739
43aaf8b6 8740 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8741
2ea28649
PA
87422012-05-24 Pedro Alves <palves@redhat.com>
8743
8744 PR gdb/7205
8745
8746 Replace target_signal with gdb_signal throughout.
8747
8d409d16
MR
87482012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8749
8750 * linux-low.c (linux_store_registers): Avoid the copying sequence
8751 when no data has been retrieved by ptrace.
8752
23512c01
MGD
87532012-05-22 Will Deacon <will.deacon@arm.com>
8754
8755 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8756 Include asm/ptrace.h.
8757 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8758 already defined.
8759
4934b29e
MR
87602012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8761
8762 * linux-low.c (linux_store_registers): Don't re-retrieve data
8763 with ptrace that has already been obtained from /proc. Always
8764 copy any data retrieved with ptrace to the buffer supplied.
8765
bde24c0a
PA
87662012-05-11 Yao Qi <yao@codesourcery.com>
8767 Pedro Alves <palves@redhat.com>
8768
8769 * linux-low.c (enum stopping_threads_kind): New.
8770 (stopping_threads): Change type to `enum stopping_threads_kind'.
8771 (handle_extended_wait): If stopping and suspending threads, leave
8772 the new_lwp suspended too.
8773 (linux_wait_for_event): Adjust.
8774 (stop_all_lwps): Set `stopping_threads' to
8775 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8776 whether we're suspending threads or just stopping them. Assert no
8777 recursion happens.
8778
623b6bdf
YQ
87792012-04-29 Yao Qi <yao@codesourcery.com>
8780
8781 * server.h: Move some code to ...
8782 * gdbthread.h: ... here. New.
8783 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8784 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8785 (nto-low.o, win32-low.o): Likewise.
8786 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8787 * regcache.c, remote-utils.c, server.c: Likewise.
8788 * target.c, tracepoint.c, win32-low.c: Likewise.
8789
f15f9948
TJB
87902012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8791
8792 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8793 (PTRACE_ARG4_TYPE): Likewise.
8794 (PTRACE_XFER_TYPE): Likewise.
8795 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8796 ptrace to PTRACE_ARG3_TYPE.
8797 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8798 (PTRACE_ARG4_TYPE): Likewise.
8799 (PTRACE_XFER_TYPE): Likewise.
8800 (linux_detach_one_lwp): Cast fourth argument of
8801 ptrace to long then PTRACE_ARG4_TYPE.
8802 (regsets_fetch_inferior_registers): Cast third argument of
8803 ptrace to long then PTRACE_ARG3_TYPE.
8804 (regsets_store_inferior_registers): Likewise.
8805
38ea300a
PA
88062012-04-20 Pedro Alves <palves@redhat.com>
8807
8808 * configure: Regenerate.
8809
c971b7fa
PA
88102012-04-19 Pedro Alves <palves@redhat.com>
8811
43aaf8b6 8812 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8813 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8814 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8815 (all, install-only, uninstall, clean-info, all-lib, clean): No
8816 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8817 (maintainer-clean realclean distclean): Use subdir_do.
8818 (subdir_do): New.
8819 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8820 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8821 * acinclude.m4: Include acx_configure_dir.m4.
8822 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8823 calls. Call AC_PROG_RANLIB. Configure gnulib using
8824 ACX_CONFIGURE_DIR.
8825 (GNULIB): New.
8826 (GNULIB_STDINT_H): Adjust.
8827 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8828 * gdbreplay.c: Include build-gnulib/config.h.
8829 * server.h: Likewise.
8830 * aclocal.m4: Regenerate.
8831 * config.in: Regenerate.
8832 * configure: Regenerate.
c971b7fa 8833
809277f8
PA
88342012-04-19 Pedro Alves <palves@redhat.com>
8835
8836 * Makefile.in (LIBGNU, INCGNU): Adjust.
8837 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8838 (all, install-only, uninstall, clean-info, all-lib, clean)
8839 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8840 * configure.ac: Adjust AC_OUTPUT output.
8841 * aclocal.m4: Regenerate.
8842 * configure: Regenerate.
8843
fd9bb8b8
PA
88442012-04-19 Pedro Alves <palves@redhat.com>
8845
8846 * Makefile.in (generated_files): New.
8847 (server_h): Remove the explicit dependency on config.h, and depend
8848 on $generated_files.
8849
1c298c66
PA
88502012-04-19 Pedro Alves <palves@redhat.com>
8851
8852 * Makefile.in (INCGNU): Add -Ignulib.
8853
57c4b50b
PA
88542012-04-19 Pedro Alves <palves@redhat.com>
8855
8856 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8857 (INCGNU): ... this, and spell out -I here.
8858 (GNULIB_LIB): Rename to ...
8859 (LIBGNU): ... this.
8860 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8861
1030e047
PA
88622012-04-19 Pedro Alves <palves@redhat.com>
8863
8864 * config.in: Regenerate.
8865
447d4319
PA
88662012-04-19 Pedro Alves <palves@redhat.com>
8867
8868 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8869 * server.h (memmem): Remove declaration.
8870 * config.in: Regenerate.
8871 * configure: Regenerate.
8872
aad9eab9
YQ
88732012-04-19 Yao Qi <yao@codesourcery.com>
8874
8875 * Makefile.in (SFILES): Add common/vec.c.
8876 (OBS): Add vec.o.
8877 (vec.o): New rule.
8878
3e10640f
YQ
88792012-04-19 Yao Qi <yao@codesourcery.com>
8880
8881 * remote-utils.c (prepare_resume_reply): Replace with macro
8882 target_core_of_thread.
8883 * server.c (handle_qxfer_threads_proper): Likewise.
8884 * target.h (traget_core_of_thread): New macro.
8885
71622373
PA
88862012-04-18 Pedro Alves <palves@redhat.com>
8887
8888 * aclocal.m4: Regenerate.
8889 * configure: Regenerate.
8890
80d26939
YQ
88912012-04-16 Yao Qi <yao@codesourcery.com>
8892
8893 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8894 duplicated on address.
8895
42476b70
YQ
88962012-04-16 Yao Qi <yao@codesourcery.com>
8897
8898 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8899 (struct tracepoint_action_ops) <send>: New field.
8900 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8901 (agent_expr_send, x_tracepoint_action_send): New.
8902 (l_tracepoint_action_send): New.
8903 (cmd_qtdp): Download and install tracepoint
8904 according to `use_agent'.
8905 (run_inferior_command): Add one more parameter `len'.
8906 Update callers.
8907 (tracepoint_send_agent): New.
8908 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8909
7bc83639
YQ
89102012-04-16 Yao Qi <yao@codesourcery.com>
8911
8912 * tracepoint.c (download_tracepoints): Moved to ...
8913 (cmd_qtstart): ... here.
8914
5f18041e
YQ
89152012-04-14 Yao Qi <yao@codesourcery.com>
8916
8917 * tracepoint.c: Include inttypes.h.
8918 (struct collect_memory_action): Use sized types.
8919 (struct tracepoint): Likewise.
8920 (cmd_qtdp, stop_tracing): Update print specifiers.
8921 (cmd_qtp, response_tracepoint): Likewise.
8922 (collect_data_at_tracepoint): Likewise.
8923 (collect_data_at_step): Likewise.
8924
55a8c076
YQ
89252012-04-14 Yao Qi <yao@codesourcery.com>
8926
8927 Import gnulib module inttypes.
8928 * aclocal.m4, config.in, configure: Regenerated.
8929
dc750257
YQ
89302012-04-14 Yao Qi <yao@codesourcery.com>
8931
8932 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8933 Makefile and config.status at last.
8934
0ab5faf9
YQ
89352012-04-13 Yao Qi <yao@codesourcery.com>
8936
8937 * tracepoint.c: Include stdint.h unconditionally.
8938
18f5fd81
TJB
89392012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8940
8941 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8942 on BFD_HAVE_SYS_PROCFS_TYPE.
8943 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8944 * configure: Regenerate.
8945 * config.in: Likewise.
8946
4d47af5c
L
89472012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8948
8949 * Makefile.in (clean): Also remove x32.c x32-linux.c
8950 x32-avx.c x32-avx-linux.c.
8951 (x32.o): New target.
8952 (x32.c): Likewise.
8953 (x32-linux.o): Likewise.
8954 (x32-linux.c): Likewise.
8955 (x32-avx.o): Likewise.
8956 (x32-avx.c): Likewise.
8957 (x32-avx-linux.o): Likewise.
8958 (x32-avx-linux.c): Likewise.
8959
8960 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8961 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8962 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8963 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8964 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8965 i386/x32-avx-linux.xml.
8966
8967 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8968 (init_registers_x32_avx_linux): Likwise.
8969 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8970 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8971
ecedbe58
PA
89722012-04-13 Pedro Alves <palves@redhat.com>
8973
8974 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8975 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8976 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8977 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8978 the sub-make.
8979
c92b5177
L
89802012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8981
8982 * linux-x86-low.c (compat_x32_clock_t): New.
8983 (compat_x32_siginfo_t): Likewise.
8984 (compat_x32_siginfo_from_siginfo): Likewise.
8985 (siginfo_from_compat_x32_siginfo): Likewise.
8986 (linux_is_elf64): Likewise.
8987 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8988 and siginfo_from_compat_x32_siginfo for x32.
8989 (x86_arch_setup): Set linux_is_elf64.
8990
214d508e
L
89912012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8992
8993 PR gdb/13969
8994 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8995 e_machine field.
8996 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8997 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8998 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8999 compatible with process.
9000
c9a1864a
YQ
90012012-04-12 Yao Qi <yao@codesourcery.com>
9002
9003 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
9004 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
9005 (install-only, install-info, clean): Handle sub dir gnulib.
9006 (all-lib, am--refresh): New targets.
9007 (memmem.o): Remove target.
9008 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
9009 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
9010 (AC_REPLACE_FUNCS): Remove memmem.
9011 Invoke gl_INIT and AM_INIT_AUTOMAKE.
9012 (AC_OUTPUT): Generate Makefile in gnulib/.
9013 * aclocal.m4, config.in, configure: Regenerated.
9014
367ba2c2
MR
90152012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
9016
9017 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
9018
9d236627
PA
90192012-04-05 Pedro Alves <palves@redhat.com>
9020
9021 -Werror=strict-aliasing
9022
9023 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
9024 pointer.
9025
111217b3
PA
90262012-04-04 Pedro Alves <palves@redhat.com>
9027
9028 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9029 (sparc_store_gregset_from_stack, sparc_store_gregset)
9030 (sparc_breakpoint_at): Fix formatting.
9031
8365dcf5
TJB
90322012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9033
9034 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
9035 are available.
9036 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
9037 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
9038 * config.in: Regenerate.
9039 * configure: Likewise.
9040
689cc2ae
PA
90412012-03-29 Pedro Alves <palves@redhat.com>
9042
9043 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
9044 Correct ptrace arguments.
9045
c14dfd32
PA
90462012-03-28 Pedro Alves <palves@redhat.com>
9047
9048 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
9049 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
9050 (IA64_FR1_REGNUM): New defines.
9051 (ia64_fetch_register): New.
9052 (the_low_target): Install it.
9053 * linux-low.h (struct linux_target_ops) <fetch_register>: New
9054 field.
9055 * linux-low.c (linux_fetch_registers): Try the
9056 the_low_target.fetch_register hook first.
9057
9058 * linux-arm-low.c (the_low_target): Adjust.
9059 * linux-bfin-low.c (the_low_target): Adjust.
9060 * linux-cris-low.c (the_low_target): Adjust.
9061 * linux-crisv32-low.c (the_low_target): Adjust.
9062 * linux-m32r-low.c (the_low_target): Adjust.
9063 * linux-m68k-low.c (the_low_target): Adjust.
9064 * linux-mips-low.c (the_low_target): Adjust.
9065 * linux-ppc-low.c (the_low_target): Adjust.
9066 * linux-s390-low.c (the_low_target): Adjust.
9067 * linux-sh-low.c (the_low_target): Adjust.
9068 * linux-sparc-low.c (the_low_target): Adjust.
9069 * linux-tic6x-low.c (the_low_target): Adjust.
9070 * linux-x86-low.c (the_low_target): Adjust.
9071 * linux-xtensa-low.c (the_low_target): Adjust.
9072
63c88e13
PA
90732012-03-26 Pedro Alves <palves@redhat.com>
9074
9075 * server.c (handle_qxfer_libraries): Don't bail early if
9076 the_target->qxfer_libraries_svr4 is not NULL.
9077
fb723180
PA
90782012-03-26 Pedro Alves <palves@redhat.com>
9079
9080 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9081
0afae3cf
PA
90822012-03-23 Pedro Alves <palves@redhat.com>
9083
9084 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9085 "library-list-svr4" element's start tag when the the DSO list is
9086 empty.
9087
485f1ee4
PA
90882012-03-23 Pedro Alves <palves@redhat.com>
9089
9090 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9091 a variable whose type size is the same as the inferior's pointer
9092 size.
9093
a5362b9a
TS
90942012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9095
9096 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9097 struct siginfo.
9098 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9099 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9100 * linux-low.h: Include <signal.h>.
9101 (struct siginfo): Remove forward declaration.
9102 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9103 struct siginfo.
9104
d226c142
MF
91052012-03-21 Mike Frysinger <vapier@gentoo.org>
9106
9107 * .gitignore: Ignore more files.
9108
122f36ef
PA
91092012-03-19 Pedro Alves <palves@redhat.com>
9110 Jan Kratochvil <jan.kratochvil@redhat.com>
9111
9112 * server.c (cont_thread, general_thread): Add describing comments.
9113 (start_inferior): Clear `cont_thread'.
9114 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9115 of a process.
9116
fc3e5175
YQ
91172012-03-15 Yao Qi <yao@codesourcery.com>
9118
9119 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9120 handling to ...
9121 (cmd_qtdp): ... here.
9122
8d0d92cd
YQ
91232012-03-15 Yao Qi <yao@codesourcery.com>
9124
9125 * tracepoint.c (struct tracepoint_action_ops): New.
9126 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9127 (m_tracepoint_action_download): New.
9128 (r_tracepoint_action_download): New.
9129 (x_tracepoint_action_download): New.
9130 (l_tracepoint_action_download): New.
9131 (add_tracepoint_action): Install `action->ops' according type.
9132 (download_tracepoint_1): Move code `download' function pointer
9133 of various tracepoint_action_ops.
9134
87b0bb13
JK
91352012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9136
9137 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9138 linux_ptrace_attach_warnings.
9139
5f572dec
JK
91402012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9141
9142 * Makefile.in (linux-ptrace.o): New.
9143 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9144 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9145 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9146 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9147 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9148 of these targets.
9149 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9150
f4647387
YQ
91512012-03-08 Yao Qi <yao@codesourcery.com>
9152 Pedro Alves <palves@redhat.com>
9153
9154 Fix PR server/13392.
9155 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9156 offset of JMP insn.
9157 * tracepoint.c (remove_tracepoint): New.
9158 (cmd_qtdp): Call remove_tracepoint when failed to install.
9159
9b224c5e
PA
91602012-03-07 Pedro Alves <palves@redhat.com>
9161
9162 * linux-low.c (get_detach_signal): New.
9163 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9164 Pass on pending signals to PTRACE_DETACH. Check the result of the
9165 ptrace call.
9166 * server.c (program_signals, program_signals_p): New.
9167 (handle_general_set): Handle QProgramSignals.
9168 * server.h (program_signals, program_signals_p): Declare.
9169
e237a7e2
JK
91702012-03-05 Pedro Alves <palves@redhat.com>
9171 Jan Kratochvil <jan.kratochvil@redhat.com>
9172
9173 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9174 New comment why.
9175
5808517f
YQ
91762012-03-03 Yao Qi <yao@codesourcery.com>
9177
9178 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9179 agent_look_up_symbols.
9180
58b4daa5
YQ
91812012-03-03 Yao Qi <yao@codesourcery.com>
9182
9183 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9184 (linux-x86-low.o): Likewise.
9185 * server.h: Remove in_process_agent_loaded.
9186 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9187 common/agent.c.
9188 Update callers.
9189
8ffcbaaf
YQ
91902012-03-03 Yao Qi <yao@codesourcery.com>
9191
9192 * tracepoint.c (gdb_agent_capability): New global.
9193 (in_process_agent_loaded_ust): Renamed to
9194 `in_process_agent_supports_ust'.
9195 Update callers.
9196 (in_process_agent_supports_ust): Call agent_capability_check.
9197 (clear_installed_tracepoints): Assert that agent supports
9198 agent.
9199
d1feda86
YQ
92002012-03-03 Yao Qi <yao@codesourcery.com>
9201
9202 * linux-low.c (linux_supports_agent): New.
9203 (linux_target_ops): Initialize field `supports_agent' with
9204 linux_supports_agent.
9205 * target.h (struct target_ops) <supports_agent>: New.
9206 (target_supports_agent): New macro.
9207 * server.c (handle_general_set): Handle packet 'QAgent'.
9208 (handle_query): Send `QAgent+'.
9209 * Makefile.in (server.o): Depends on agent.h.
9210
2fa291ac
YQ
92112012-03-03 Yao Qi <yao@codesourcery.com>
9212
9213 * Makefile.in (OBS): Add agent.o.
9214 Add new rule for agent.o.
9215 Track dependence of tracepoint.c on agent.h.
9216 * tracepoint.c (run_inferior_command_1):
9217 (run_inferior_command): Call agent_run_command.
9218 (gdb_ust_connect_sync_socket): Deleted. Move it to
9219 common/agent.c.
9220 (resume_thread, stop_thread): Likewise.
9221 (gdb_ust_socket_init): Renamed to ...
9222 (gdb_agent_socket_init): ... New.
9223 (gdb_ust_thread): Renamed to ...
9224 (gdb_agent_helper_thread): ... New.
9225 (gdb_ust_init): Move some code to ...
9226 (gdb_agent_init): ... here. New.
9227 [HAVE_UST]: Call gdb_ust_init.
9228 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9229 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9230 * config.in, configure: Regenerated.
9231
05044653
PA
92322012-03-02 Pedro Alves <palves@redhat.com>
9233
9234 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9235 * linux-low.c (struct simple_pid_list): New.
9236 (stopped_pids): New a struct simple_pid_list pointer.
9237 (add_to_pid_list, pull_pid_from_list): New.
9238 (handle_extended_wait): Don't assume the first signal new children
9239 report is SIGSTOP. Adjust call to pull_pid_from_list.
9240 (linux_wait_for_lwp): Adjust.
9241
8d00225b
YQ
92422012-03-02 Yao Qi <yao@codesourcery.com>
9243
9244 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9245 debug log.
9246
19560ba5
YQ
92472012-03-02 Yao Qi <yao@codesourcery.com>
9248
9249 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9250 `stop_pc' and `tpoint'. Update caller.
9251
1faeff08
MR
92522012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9253
9254 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9255 * linux-low.c (use_linux_regsets): New macro.
9256 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9257 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9258 (linux_register_in_regsets): New function.
9259 (usr_fetch_inferior_registers): Skip registers covered by
9260 regsets.
9261 (usr_store_inferior_registers): Likewise.
9262 (usr_fetch_inferior_registers): New macro.
9263 (usr_store_inferior_registers): Likewise.
9264 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9265 (linux_store_registers): Likewise.
9266 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9267 prototype.
9268 (init_registers_mips64_dsp_linux): Likewise.
9269 (init_registers_mips_linux): New macro.
9270 (init_registers_mips_dsp_linux): Likewise.
9271 (mips_dsp_num_regs): Likewise.
9272 (DSP_BASE, DSP_CONTROL): New fallback macros.
9273 (mips_base_regs): New macro.
9274 (mips_regmap): Use it. Fix the size.
9275 (mips_dsp_regmap): New variable.
9276 (mips_dsp_regset_bitmap): Likewise.
9277 (mips_arch_setup): New function.
9278 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9279 than mips_regmap.
9280 (mips_cannot_store_register): Likewise.
9281 (the_low_target): Update .arch_setup, .num_regs and .regmap
9282 initializers. Add .regset_bitmap initializer.
9283 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9284 initializer.
9285 * linux-bfin-low.c (the_low_target): Likewise.
9286 * linux-cris-low.c (the_low_target): Likewise.
9287 * linux-crisv32-low.c (the_low_target): Likewise.
9288 * linux-ia64-low.c (the_low_target): Likewise.
9289 * linux-m32r-low.c (the_low_target): Likewise.
9290 * linux-m68k-low.c (the_low_target): Likewise.
9291 * linux-ppc-low.c (the_low_target): Likewise.
9292 * linux-s390-low.c (the_low_target): Likewise.
9293 * linux-sh-low.c (the_low_target): Likewise.
9294 * linux-sparc-low.c (the_low_target): Likewise.
9295 * linux-tic6x-low.c (the_low_target): Likewise.
9296 * linux-x86-low.c (the_low_target): Likewise.
9297 * linux-xtensa-low.c (the_low_target): Likewise.
9298 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9299 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9300 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9301 srv_xmlfiles.
9302 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9303 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9304
c03e6ccc
YQ
93052012-02-29 Yao Qi <yao@codesourcery.com>
9306 Pedro Alves <palves@redhat.com>
9307
9308 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9309 `step_over_finished' is true.
9310
644cebc9
PA
93112012-02-27 Pedro Alves <palves@redhat.com>
9312
9313 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9314 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9315
c14d7ab2
PA
93162012-02-27 Pedro Alves <palves@redhat.com>
9317
9318 PR server/9684
9319 * linux-low.c (pid_is_stopped): New.
9320 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9321
412c89dd
LM
93222012-02-25 Luis Machado <lgustavo@codesourcery.com>
9323
9324 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9325 of conditions.
9326
b745defe
MR
93272012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9328
9329 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9330
9f3a5c85
LM
93312012-02-24 Luis Machado <lgustavo@codesourcery>
9332
9333 * server.c (handle_query): Advertise support for target-side
9334 breakpoint condition evaluation.
9335 (process_point_options): New function.
9336 (process_serial_event): When inserting a breakpoint, check for
9337 a target-side condition that should be evaluated.
9338
9339 * mem-break.c: Include regcache.h and ax.h.
9340 (point_cond_list_t): New data structure.
9341 (breakpoint) <cond_list>: New field.
9342 (find_gdb_breakpoint_at): Make non-static.
9343 (delete_gdb_breakpoint_at): Clear any target-side
9344 conditions.
9345 (clear_gdb_breakpoint_conditions): New function.
9346 (add_condition_to_breakpoint): Likewise.
9347 (add_breakpoint_condition): Likewise.
9348 (gdb_condition_true_at_breakpoint): Likewise.
9349 (gdb_breakpoint_here): Return result directly instead
9350 of going through a local variable.
9351
9352 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9353 (clear_gdb_breakpoint_conditions): Likewise.
9354 (add_breakpoint_condition): Likewise.
9355 (gdb_condition_true_at_breakpoint): Likewise.
9356
9357 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9358 (need_step_over_p): Take target-side breakpoint condition into
9359 consideration.
9360
5e1dc496
LM
93612012-02-24 Luis Machado <lgustavo@codesourcery>
9362
9363 * server.h: Include tracepoint.h.
9364 (agent_mem_read, agent_get_trace_state_variable_value,
9365 agent_set_trace_state_variable_value,
9366 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9367 get_set_tsv_func_addr): New prototypes.
9368
9369 * ax.h: New include file.
9370 * ax.c: New source file.
9371
9372 * tracepoint.c: Include ax.h.
9373 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9374 agent_expr, eval_result_type): Move to ax.h.
9375 (parse_agent_expr): Rename to ...
9376 (gdb_parse_agent_expr): ... this, make it non-static and move
9377 to ax.h.
9378 (unparse_agent_expr) Rename to ...
9379 (gdb_unparse_agent_expr): ... this, make it non-static and move
9380 to ax.h.
9381 (eval_agent_expr): Rename to ...
9382 (eval_tracepoint_agent_expr): ... this.
9383 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9384 forward declarations.
9385 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9386 (agent_get_trace_state_variable_value): New function.
9387 (agent_set_trace_state_variable_value): New function.
9388 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9389 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9390 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9391 (condition_true_at_tracepoint): Likewise.
9392 (parse_agent_expr): Rename to ...
9393 (gdb_parse_agent_expr): ... this and move to ax.c.
9394 (unparse_agent_expr): Rename to ...
9395 (gdb_unparse_agent_expr): ... this and move to ax.c.
9396 (gdb_agent_op_name): Move to ax.c.
9397 (eval_agent_expr): Rename to ...
9398 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9399 and move to ax.c.
9400 (eval_tracepoint_agent_expr): New function.
9401 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9402 non-static.
5e1dc496
LM
9403 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9404 ax.c.
9405 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9406 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9407 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9408 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9409 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9410 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9411 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9412 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9413 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9414 (compile_bytecodes): Remove forward declaration.
9415 (is_goto_target): Move to ax.c.
9416 (compile_bytecodes): Move to ax.c and call
9417 agent_get_trace_state_variable_value (...) and
9418 agent_set_trace_state_variable_value (...).
9419
9420 * Makefile.in: Update ax.c and IPA dependencies.
9421
277e4e52
PA
94222012-02-24 Pedro Alves <palves@redhat.com>
9423
9424 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9425 (cmd_bigqtbuffer_circular): ... this. Only handle
9426 'QTBuffer:circular:'.
9427 (handle_tracepoint_general_set): Adjust.
9428
bf4c19f7
YQ
94292012-02-16 Yao Qi <yao@codesourcery.com>
9430
9431 * inferiors.c: Move code to ...
9432 * dll.c: .... here. New.
9433 * server.h: Declare clear_dlls.
9434 * Makefile.in (SFILES): Add dll.c.
9435 (OBS): Add dll.o
9436 (dll.o): New rule.
9437
d73f2619
YQ
94382012-02-11 Yao Qi <yao@codesourcery.com>
9439
9440 * server.c: (handle_monitor_command): Add a new parameter
9441 `own_buf'.
9442 (handle_query): Update caller.
9443
f8255c2a
JB
94442012-02-09 Joel Brobecker <brobecker@adacore.com>
9445
9446 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9447 * configure, config.in: Regenerate.
9448 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9449 is not defined.
9450
da84f473
PA
94512012-02-02 Pedro Alves <palves@redhat.com>
9452
9453 Try SIGKILL first, then PTRACE_KILL.
9454 * linux-low.c (linux_kill_one_lwp): New.
9455 (linux_kill_one_lwp): Rename to ...
9456 (kill_one_lwp_callback): ... this. Use the new
9457 linux_kill_one_lwp.
9458
e886a173
PA
94592012-02-02 Pedro Alves <palves@redhat.com>
9460
9461 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9462 inferior.
9463
be07f1a2
PA
94642012-01-27 Pedro Alves <palves@redhat.com>
9465
9466 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9467 (elf_64_file_p): Make static.
9468 (linux_pid_exe_is_elf_64_file): New.
9469 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9470 Delete declarations.
9471 (linux_pid_exe_is_elf_64_file): Declare.
9472 * linux-x86-low.c (x86_arch_setup): Use
9473 linux_pid_exe_is_elf_64_file.
9474
d8301ad1
JK
94752012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9476
9477 * linux-low.c (linux_wait_for_event_1): Rename to ...
9478 (linux_wait_for_event): ... here and merge it with former
9479 linux_wait_for_event - new variable wait_ptid, use it.
9480 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9481
01b17894
PA
94822012-01-23 Pedro Alves <palves@redhat.com>
9483
9484 * server.c (main): Avoid yet another case of infinite loop while
9485 detaching/killing after a longjmp.
9486
e825046f
JK
94872012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9488
9489 Code cleanup.
9490 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9491
b9e7b9c3
UW
94922012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9493
9494 * hostio.c (handle_readlink): New function.
9495 (handle_vFile): Call it to handle "vFile:readlink" packets.
9496
901f9912
UW
94972012-01-20 Pedro Alves <palves@redhat.com>
9498 Ulrich Weigand <ulrich.weigand@linaro.org>
9499
9500 * server.c (handle_v_requests): Only support vAttach and vRun to
9501 start multiple processes when in extended protocol mode.
9502
fc1ab1a0
PA
95032012-01-17 Pedro Alves <palves@redhat.com>
9504
9505 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9506 memalign plus mprotect to allocate the scratch buffer.
9507
7d5d4e98
PA
95082012-01-13 Pedro Alves <palves@redhat.com>
9509
9510 * server.c (attach_inferior): Clear `cont_thread'.
9511
f128d5e9
PA
95122012-01-13 Pedro Alves <palves@redhat.com>
9513
9514 * server.c (main): Avoid infinite loop while detaching/killing
9515 after a longjmp.
9516
06db92f0
DE
95172012-01-09 Doug Evans <dje@google.com>
9518
9519 * server.c (start_inferior): Set last_ptid in --wrapper case.
9520
32d92999
YQ
95212012-01-06 Yao Qi <yao@codesourcery.com>
9522
9523 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9524 defined.
9525 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9526
5e0a92a9
YQ
95272012-01-04 Yao Qi <yao@codesourcery.com>
9528
9529 * tracepoint.c (cmd_qtdp): Print debug message
9530 for static tracepoint.
9531
ae639e8c
YQ
95322012-01-04 Yao Qi <yao@codesourcery.com>
9533
9534 * tracepoint.c (trace_vdebug): Differentiate debug message
9535 between gdbserver and IPA.
9536
f72429c5
YQ
95372012-01-03 Yao Qi <yao@codesourcery.com>
9538
9539 * tracepoint.c (tracepoint_was_hit): Don't collect for
9540 static tracepoint.
9541
12c3e59c
JB
95422012-01-02 Joel Brobecker <brobecker@adacore.com>
9543
9544 * terminal.h: Reformat copyright header.
9545
67827812
JB
95462012-01-02 Joel Brobecker <brobecker@adacore.com>
9547
9548 * server.c (gdbserver_version): Update copyright year.
9549 * gdbreplay.c (gdbreplay_version): Likewise.
9550
3e52c33d
JK
95512011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9552
9553 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9554
9555 Revert:
9556 2011-12-18 Hui Zhu <teawater@gmail.com>
9557 * linux-low.c (linux_create_inferior): Save return value to ret.
9558
66f1260e
HZ
95592011-12-18 Hui Zhu <teawater@gmail.com>
9560
9561 * linux-low.c (linux_create_inferior): Save return value to ret.
9562
e77616d7
DE
95632011-12-16 Doug Evans <dje@google.com>
9564
e7b06c57
DE
9565 * linux-low.c (linux_create_inferior): If stdio connection,
9566 redirect stdin from /dev/null, stdout to stderr.
9567 * remote-utils.c (remote_is_stdio): New static global.
9568 (remote_connection_is_stdio): New function.
9569 (remote_prepare): Handle stdio connection.
9570 (remote_open): Ditto.
9571 (remote_close): Don't close stdin for stdio connections.
9572 (read_prim,write_prim): New functions. Replace all calls to
9573 read/write to these.
9574 * server.c (main): Watch for "-" argument. Move call to
9575 remote_prepare before start_inferior.
9576 * server.h (STDIO_CONNECTION_NAME): New macro.
9577 (remote_connection_is_stdio): Declare.
9578
e77616d7
DE
9579 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9580 in debugging output.
9581
82067193
YQ
95822011-12-15 Yao Qi <yao@codesourcery.com>
9583
9584 * tracepoint.c: Include sys/syscall.h.
9585 (gdb_ust_thread): Remove preprocessor conditional.
9586
82bfbe7e
PA
95872011-12-14 Pedro Alves <pedro@codesourcery.com>
9588
9589 * linux-low.c (linux_detach_one_lwp): Call
9590 the_low_target.prepare_to_resume before detaching.
9591
712c6575
YQ
95922011-12-14 Yao Qi <yao@codesourcery.com>
9593
9594 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9595 of write.
9596
d54d1edf
YQ
95972011-12-14 Yao Qi <yao@codesourcery.com>
9598
9599 * i386-low.c (i386_low_stopped_data_address): Initialize local
9600 variable `control'.
9601
6210a125
PA
96022011-12-13 Pedro Alves <pedro@codesourcery.com>
9603
9604 PR remote/13492
9605
9606 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9607 DR_CONTROL unless necessary. Extend comments.
9608 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9609 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9610
2ece8244
YQ
96112011-12-13 Yao Qi <yao@codesourcery.com>
9612
9613 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9614 macros.
9615 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9616
784867a5
JK
96172011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9618
9619 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9620 Print new debug message for such case.
9621
6bf36717
JK
96222011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9623
9624 Fix overlapping memcpy.
9625 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9626 the read_inferior_memory transfer.
9627 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9628 write_inferior_memory transfer.
9629 (set_fast_tracepoint_jump): New variable buf. Use it for the
9630 read_inferior_memory and write_inferior_memory transfers.
9631 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9632 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9633 Use it for the write_inferior_memory transfer.
9634 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9635 buffers.
9636
50275556
MR
96372011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9638
9639 * linux-low.c (fetch_register, store_register): Make code
9640 consistent, fix formatting.
9641
7325beb4
MR
96422011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9643
9644 * linux-low.c (usr_store_inferior_registers): Factor out code
9645 to handle individual registers into...
9646 (store_register): ... this new function.
9647
c642a434
UW
96482011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9649
9650 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9651 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9652 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9653 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9654 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9655 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9656 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9657 (srv_xmlfiles): Add new XML files.
9658
9659 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9660 and <sys/uio.h>.
9661 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9662 (init_registers_s390_linux32v1): Add prototype.
9663 (init_registers_s390_linux32v2): Likewise.
9664 (init_registers_s390_linux64v1): Likewise.
9665 (init_registers_s390_linux64v2): Likewise.
9666 (init_registers_s390x_linux64v1): Likewise.
9667 (init_registers_s390x_linux64v2): Likewise.
9668 (s390_num_regs): Increment to 52.
9669 (s390_regmap): Add orig_r2 register.
9670 (s390_num_regs_3264): Increment to 68.
9671 (s390_regmap_3264): Add orig_r2 register.
9672 (s390_collect_ptrace_register): Handle orig_r2 register.
9673 (s390_supply_ptrace_register): Likewise.
9674 (s390_fill_last_break): New function.
9675 (s390_store_last_break): Likewise.
9676 (s390_fill_system_call): New function.
9677 (s390_store_system_call): Likewise.
9678 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9679 register sets.
9680 (s390_check_regset): New function.
9681 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9682 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9683 Update target_regsets for available register sets.
9684
2268b414
JK
96852011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9686 Jan Kratochvil <jan.kratochvil@redhat.com>
9687
9688 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9689 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9690 New.
9691 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9692 * linux-low.h (struct process_info_private): New member r_debug.
9693 * server.c (handle_qxfer_libraries): Call
9694 the_target->qxfer_libraries_svr4.
9695 (handle_qxfer_libraries_svr4): New function.
9696 (qxfer_packets): New entry "libraries-svr4".
9697 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9698 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9699 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9700 PACKET_qXfer_libraries_svr4.
9701
d6db1fab
UW
97022011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9703
9704 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9705 PSW address/mask between 8-byte and 16-byte formats.
9706 (s390_supply_ptrace_register): Likewise.
9707 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9708 basic addressing mode bit.
9709
242f5f1c
SS
97102011-11-24 Stan Shebs <stan@codesourcery.com>
9711
9712 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9713
f196051f
SS
97142011-11-17 Stan Shebs <stan@codesourcery.com>
9715
9716 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9717 (tracing_start_time): New global.
9718 (tracing_stop_time): New global.
9719 (tracing_user_name): New global.
9720 (tracing_notes): New global.
9721 (tracing_stop_note): New global.
9722 (cmd_qtstart): Set traceframe_usage, start_time.
9723 (stop_tracing): Set stop_time.
9724 (cmd_qtstatus): Report additional status.
9725 (cmd_qtp): New function.
9726 (handle_tracepoint_query): Call it.
9727 (cmd_qtnotes): New function.
9728 (handle_tracepoint_general_set): Call it.
9729 (get_timestamp): Rename from tsv_get_timestamp.
9730
405f8e94
SS
97312011-11-14 Stan Shebs <stan@codesourcery.com>
9732 Kwok Cheung Yeung <kcy@codesourcery.com>
9733
9734 * linux-x86-low.c (small_jump_insn): New.
9735 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9736 trampoline and error message, build a trampoline and issue a small
9737 jump instruction to it.
9738 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9739 trampoline and error message.
9740 (x86_get_min_fast_tracepoint_insn_len): New.
9741 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9742 * linux-low.h (struct linux_target_ops): Add arguments to
9743 install_fast_tracepoint_jump_pad operation, add new operation.
9744 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9745 arguments.
9746 (linux_get_min_fast_tracepoint_insn_len): New function.
9747 (linux_target_op): Add new operation.
9748 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9749 (gdb_trampoline_buffer_end): Ditto.
9750 (gdb_trampoline_buffer_error): Ditto.
9751 (struct ipa_sym_addresses): Add fields for new IPA variables.
9752 (symbol_list): Add entries for new IPA variables.
9753 (struct tracepoint): Add fields to hold the address range of the
9754 trampoline used by the tracepoint.
9755 (trampoline_buffer_head): New static variable.
9756 (trampoline_buffer_tail): Ditto.
9757 (claim_trampoline_space): New function.
9758 (have_fast_tracepoint_trampoline_buffer): New function.
9759 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9760 structure.
9761 (install_fast_tracepoint): Ditto, also add error buffer argument.
9762 (cmd_qtminftpilen): New function.
9763 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9764 (fast_tracepoint_from_trampoline_address): New function.
9765 (fast_tracepoint_collecting): Handle trampoline as part of jump
9766 pad space.
9767 (set_trampoline_buffer_space): New function.
9768 (initialize_tracepoint): Initialize new IPA variables.
9769 * target.h (struct target_ops): Add arguments to
9770 install_fast_tracepoint_jump_pad operation, add new
9771 get_min_fast_tracepoint_insn_len operation.
9772 (target_get_min_fast_tracepoint_insn_len): New.
9773 (install_fast_tracepoint_jump_pad): Add arguments.
9774 * server.h (IPA_BUFSIZ): Define.
9775 * linux-i386-ipa.c: Include extra header files.
9776 (initialize_fast_tracepoint_trampoline_buffer): New function.
9777 (initialize_low_tracepoint): Call it.
9778 * server.h (set_trampoline_buffer_space): Declare.
9779 (claim_trampoline_space): Ditto.
9780 (have_fast_tracepoint_trampoline_buffer): Ditto.
9781
1e4d1764
YQ
97822011-11-14 Yao Qi <yao@codesourcery.com>
9783
9784 * server.c (handle_query): Handle InstallInTrace for qSupported.
9785 * tracepoint.c (add_tracepoint): Sort list.
9786 (install_tracepoint, download_tracepoint): New.
9787 (cmd_qtdp): Call them to install and download tracepoints.
9788 (sort_tracepoints): Removed.
9789 (cmd_qtstart): Update.
9790
5c73ff4e
YQ
97912011-11-14 Yao Qi <yao@codesourcery.com>
9792
9793 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9794 * mem-break.h: Declare.
9795 * tracepoint.c (cmd_qtstart): Move some code to ...
9796 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9797 New.
9798 (download_tracepoints): Move some code to ...
9799 (download_tracepoint_1): ... here. New.
9800
86a30030
YQ
98012011-11-08 Yao Qi <yao@codesourcery.com>
9802
9803 * remote-utils.c (relocate_instruction): A comment fix.
9804
8d26e50c
JB
98052011-11-07 Joel Brobecker <brobecker@adacore.com>
9806
9807 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9808 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9809 dr_status_mirror and dr_control_mirror from debug_reg_state.
9810 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9811 (i386_initial_stuff): Remove use of deleted globals.
9812 (i386_get_thread_context, i386_set_thread_context,
9813 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9814 from debug_reg_state.
9815
a59306a3
YQ
98162011-11-05 Yao Qi <yao@codesourcery.com>
9817
9818 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9819 address as TPOINT's.
9820
3065dfb6
SS
98212011-11-02 Stan Shebs <stan@codesourcery.com>
9822
9823 * tracepoint.c (agent_mem_read_string): New function.
9824 (eval_agent_expr): Call it for tracenz.
9825 * server.c (handle_query): Report support for tracenz.
9826
fd0d8c7c
YQ
98272011-11-02 Yao Qi <yao@codesourcery.com>
9828
9829 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9830
609086b1
YQ
98312011-11-02 Yao Qi <yao@codesourcery.com>
9832
9833 * target.h: Fix a typo in comment.
9834
b9fd1791
PA
98352011-10-31 Pedro Alves <pedro@codesourcery.com>
9836
9837 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9838 clobber the breakpoints' shadows with fast tracepoint jumps.
9839 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9840 * target.c (write_inferior_memory): Also pass MYADDR down to
9841 check_mem_write.
9842
03583c20
UW
98432011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9844
9845 * configure.ac: Check support for personality routine.
9846 * configure: Regenerate.
9847 * config.in: Likewise.
9848 * linux-low.c: Include <sys/personality.h>.
9849 Define ADDR_NO_RANDOMIZE if necessary.
9850 (linux_create_inferior): Disable address space randomization when
9851 forking inferior, if requested.
9852 (linux_supports_disable_randomization): New function.
9853 (linux_target_ops): Install it.
9854 * server.h (disable_randomization): Declare.
9855 * server.c (disable_randomization): New global variable.
9856 (handle_general_set): Handle QDisableRandomization.
9857 (handle_query): Likewise for qSupported.
9858 (main): Support --disable-randomization and --no-disable-randomization
9859 command line arguments.
9860 * target.h (struct target_ops): Add supports_disable_randomization.
9861 (target_supports_disable_randomization): New macro.
9862
723b724b
MF
98632011-09-29 Mike Frysinger <vapier@gentoo.org>
9864
9865 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9866 ifdef check.
9867 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9868 [!PT_GETDSBT] (target_loadmap): New definition.
9869 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9870 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9871 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9872 and PT_GETDSBT to LINUX_LOADMAP.
9873 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9874 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9875
55329a5c 98762011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9877
9878 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9879 (arm_linux_hwbp_cap): New static variable.
9880 (arm_linux_get_hwbp_cap): Replace by ...
9881 (arm_linux_init_hwbp_cap): ... this new function.
9882 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9883 (arm_linux_get_hw_watchpoint_count): Likewise.
9884 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9885 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9886 (arm_prepare_to_resume): Use perror_with_name instead of error.
9887
55329a5c 98882011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9889
9890 * linux-arm-low.c: Include <signal.h>.
9891 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9892 (struct arm_linux_hwbp_cap): New data type.
9893 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9894 (struct arm_linux_hw_breakpoint): New data type.
9895 (MAX_BPTS, MAX_WPTS): Define.
9896 (struct arch_process_info, struct arch_lwp_info): New data types.
9897 (arm_linux_get_hwbp_cap): New function.
9898 (arm_linux_get_hw_breakpoint_count): Likewise.
9899 (arm_linux_get_hw_watchpoint_count): Likewise.
9900 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9901 (arm_hwbp_control_initialize): Likewise.
9902 (arm_hwbp_control_is_enabled): Likewise.
9903 (arm_hwbp_control_is_initialized): Likewise.
9904 (arm_hwbp_control_disable): Likewise.
9905 (arm_linux_hw_breakpoint_equal): Likewise.
9906 (arm_linux_hw_point_initialize): Likewise.
9907 (struct update_registers_data): New data structure.
9908 (update_registers_callback: New function.
9909 (arm_insert_point): Likewise.
9910 (arm_remove_point): Likewise.
9911 (arm_stopped_by_watchpoint): Likewise.
9912 (arm_stopped_data_address): Likewise.
9913 (arm_new_process): Likewise.
9914 (arm_new_thread): Likewise.
9915 (arm_prepare_to_resume): Likewise.
9916 (the_low_target): Register arm_insert_point, arm_remove_point,
9917 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9918 arm_new_thread, and arm_prepare_to_resume.
9919
6b9801d4
SS
99202011-09-15 Stan Shebs <stan@codesourcery.com>
9921
9922 * server.h (struct emit_ops): Add compare-goto fields.
9923 * tracepoint.c (gdb_agent_op_sizes): New table.
9924 (emit_eq_goto): New function.
9925 (emit_ne_goto): New function.
9926 (emit_lt_goto): New function.
9927 (emit_le_goto): New function.
9928 (emit_gt_goto): New function.
9929 (emit_ge_goto): New function.
9930 (is_goto_target): New function.
9931 (compile_bytecodes): Recognize special cases of compare-goto
9932 combinations and call specialized emitters for them.
9933 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9934 (amd64_emit_ne_goto): New function.
9935 (amd64_emit_lt_goto): New function.
9936 (amd64_emit_le_goto): New function.
9937 (amd64_emit_gt_goto): New function.
9938 (amd64_emit_ge_goto): New function.
9939 (amd64_emit_ops): Add the new functions.
9940 (i386_emit_eq_goto): New function.
9941 (i386_emit_ne_goto): New function.
9942 (i386_emit_lt_goto): New function.
9943 (i386_emit_le_goto): New function.
9944 (i386_emit_gt_goto): New function.
9945 (i386_emit_ge_goto): New function.
9946 (i386_emit_ops): Add the new functions.
9947
bf15cbda
SS
99482011-09-08 Stan Shebs <stan@codesourcery.com>
9949
9950 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9951 (i386_emit_epilogue): Restore %ebx.
9952
943ca1dd
JZ
99532011-08-31 Jie Zhang <jzhang918@gmail.com>
9954
9955 * server.c (step_thread): Remove definition.
9956 (process_serial_event): Don't handle Hs.
9957 * server.h (step_thread): Remove declaration.
9958 * target.c (set_desired_inferior): Remove use of step_thread.
9959
e3deef73
LM
99602011-08-24 Luis Machado <lgustavo@codesourcery.com>
9961
9962 * linux-low.c: Include linux-procfs.h.
9963 (linux_attach_lwp_1): Update comments.
9964 (linux_attach): Scan for existing threads when attaching to a
9965 process that is the tgid.
9966 * Makefile.in: Update dependencies.
9967
13da1c97
LM
99682011-08-24 Luis Machado <lgustavo@codesourcery.com>
9969
9970 * configure.srv: Add linux-procfs.o dependencies.
9971
881127c9
YQ
99722011-08-14 Yao Qi <yao@codesourcery.com>
9973
9974 * target.h (struct target_ops): Fix indent.
9975 * win32-low.c (win32_target_ops): Fix comment.
9976
58dbd541
YQ
99772011-08-14 Andrew Jenner <andrew@codesourcery.com>
9978 Yao Qi <yao@codesourcery.com>
9979
9980 * Makefile.in (clean): Remove tic6x-*.c files.
9981 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9982 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9983 (tic6x-c64xp-linux.c): Likewise.
9984 * configure.srv: Add support for tic6x-*-uclinux.
9985 * linux-tic6x-low.c: New.
9986 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9987
78d85199
YQ
99882011-08-14 Andrew Stubbs <ams@codesourcery.com>
9989 Yao Qi <yao@codesourcery.com>
9990
9991 * target.h (struct target_ops): Add read_loadmap.
9992 * linux-low.c (struct target_loadseg): New type.
9993 (struct target_loadmap): New type.
9994 (linux_read_loadmap): New function.
9995 (linux_target_ops): Add linux_read_loadmap.
9996 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9997 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9998 to NULL.
78d85199 9999
a959a88d
EZ
100002011-08-05 Eli Zaretskii <eliz@gnu.org>
10001
10002 * win32-low.c: Include <stdint.h>.
10003
1ced966e
PA
100042011-07-22 Pedro Alves <pedro@codesourcery.com>
10005
10006 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
10007 to the inferior here.
10008 (i386_remove_aligned_watchpoint): Ditto.
10009 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
10010 fit part of the watchpoint in the debug registers.
10011 (i386_update_inferior_debug_regs): New.
10012 (i386_low_insert_watchpoint): Work on a local mirror of the debug
10013 registers, and only update the inferior on success.
10014 (i386_low_remove_watchpoint): Ditto.
10015
d26e3629
KY
100162011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
10017
10018 * linux-low.c (compare_ints, unique, list_threads, show_process,
10019 linux_core_of_thread): Delete.
10020 (linux_target_ops): Change linux_core_of_thread to
10021 linux_common_core_of_thread.
10022 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
10023 * utils.c (malloc_failure): Change type of argument.
10024 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
10025 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
10026 common/linux-osdata.c, common/ptid.c and common/buffer.c.
10027 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
10028 (IPA_OBJS): Add common-utils-ipa.o.
10029 (ptid_h, linux_osdata_h): New macros.
10030 (server_h): Add common/common-utils.h, common/xml-utils.h,
10031 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
10032 common/ptid.h.
10033 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
10034 ptid.o, buffer.o): New rules.
10035 (linux-low.o): Add common/linux-osdata.h as a dependency.
10036 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
10037 * configure.ac: Add AC_HEADER_DIRENT check.
10038 * config.in: Regenerate.
10039 * configure: Regenerate.
10040 * remote-utils.c (xml_escape_text): Delete.
10041 (buffer_grow, buffer_free, buffer_init, buffer_finish,
10042 buffer_xml_printf): Move to common/buffer.c.
10043 * server.c (main): Remove call to initialize_inferiors.
10044 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
10045 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
10046 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
10047 internal_error, gdb_assert, gdb_assert_fail): Delete.
10048 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
10049 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
10050 common/buffer.h.
10051 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
10052 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
10053 initialize_inferiors): Delete.
10054
2275a1a7
PA
100552011-07-20 Pedro Alves <pedro@codesourcery.com>
10056
10057 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10058 symbol error.
10059
0a5b1e09
PA
100602011-05-31 Pedro Alves <pedro@codesourcery.com>
10061
10062 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10063 assertion.
10064 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10065
6938fd34
YQ
100662011-05-26 Yao Qi <yao@codesourcery.com>
10067
10068 * Makefile.in (thread-db.o): Track dependence to
10069 common/gdb_thread_db.h.
10070 * thread-db.c: include gdb_thread_db.h from right place.
10071
b481f9e0
TT
100722011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10073
10074 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10075 __FILE__ and __LINE__ to internal_error.
10076
98a5dd13
DE
100772011-05-13 Doug Evans <dje@google.com>
10078
10079 * thread-db.c (try_thread_db_load_from_sdir): New function.
10080 (try_thread_db_load_from_dir): New function.
10081 (thread_db_load_search): Handle $sdir, ignore $pdir.
10082 Remove trying of system directories if search of
10083 libthread-db-search-path fails, that is now done via $sdir.
10084
d248b706
KY
100852011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10086
10087 * server.c (handle_query): Add EnableDisableTracepoints to the list
10088 of supported features.
43aaf8b6 10089 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10090 tracepoints.
43aaf8b6
PA
10091 (cmd_qtenable_disable): New.
10092 (cmd_qtstart): Install tracepoints even if disabled.
10093 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10094 receiving a QTEnable or QTDisable packet.
10095 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10096 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10097 tracepoints.
10098 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10099
84e578fb
DE
101002011-05-10 Doug Evans <dje@google.com>
10101
10102 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10103
71f55dd8
DE
101042011-05-04 Doug Evans <dje@google.com>
10105
10106 * linux-low.c (linux_join): Skip process lookup.
10107 * spu-low.c (spu_join): Ditto.
10108 * server.c (join_inferiors_callback): Delete.
10109 (process_serial_event): For 'D' packet (detach) call join_inferior
10110 directly.
10111
4d393d60
JM
101122011-05-04 Joseph Myers <joseph@codesourcery.com>
10113
10114 * README: Don't mention xscale*-*-linux*.
10115 * configure.srv (xscale*-*-linux*): Don't handle target.
10116
b00ad6ff
NF
101172011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10118
10119 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10120 casting pointers.
10121 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10122 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10123 (i386_emit_void_call_2): Likewise.
10124
af96c192
YQ
101252011-04-26 Yao Qi <yao@codesourcery.com>
10126
43aaf8b6
PA
10127 * linux-low.c: Move common macros to linux-ptrace.h.
10128 Include linux-ptrace.h.
af96c192
YQ
10129 * Makefile.in (linux_ptrace_h): New.
10130 (linux-low.o): Depends on linux-ptrace.h.
10131
03f2bd59
JK
101322011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10133
10134 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10135 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10136 (remote_prepare): New function with most of the TCP code from ...
10137 (remote_open): ... here. Detect PORT here unconditionally. Move also
10138 setting transport_is_reliable.
10139 * server.c (run_once): New variable.
10140 (gdbserver_usage): Document it.
10141 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10142 the first run if RUN_ONCE.
10143 * server.h (run_once, remote_prepare): New declarations.
10144
7a9dd1b2
TT
101452011-04-19 Tom Tromey <tromey@redhat.com>
10146
10147 * win32-low.c (handle_load_dll): Remove duplicate "the".
10148
81239425
PM
101492011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10150
10151 Remove support for old Cygwin 1.5 versions.
10152 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10153 function to avoid warning.
10154 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10155 warning.
10156
9e0627f1
PM
101572011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10158
10159 * gdbserver/server.h (Macro _): Define it if not available.
10160
588eebee
MS
101612011-03-14 Michael Snyder <msnyder@vmware.com>
10162
348af9f7 10163 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10164
43f70d4c
JB
101652011-03-10 Joel Brobecker <brobecker@adacore.com>
10166
10167 * Makefile.in (maintainer-clean realclean distclean): Remove
10168 "make ... subdir_do" command.
10169
348af9f7
MS
101702011-03-10 Michael Snyder <msnyder@vmware.com>
10171
10172 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10173
10174 * server.c (handle_v_run): Free alloced buffer on early return.
10175
e637a4f5
YQ
101762011-03-09 Yao Qi <yao@codesourcery.com>
10177
10178 Revert:
10179 2011-03-04 Yao Qi <yao@codesourcery.com>
10180
10181 * Makefile.in: Remove GNU make feature --directory.
10182
10183 2011-03-05 Yao Qi <yao@codesourcery.com>
10184
10185 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10186 (subdir_do): New make target. Copied from gdb/Makefile.
10187 (maintainer-clean, realclean, distclean, clean): Call corresponding
10188 make targets in common/Makefile.
10189
10190 2011-02-11 Yao Qi <yao@codesourcery.com>
10191
10192 * configure.ac: Call AC_PROG_RANLIB.
10193 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10194 * configure: Regenerate.
10195
e6edda56
JK
101962011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10197
10198 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10199
e5141119
JB
102002011-03-06 Yao Qi <yao@codesourcery.com>
10201
10202 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10203
64794aa4
JB
102042011-03-05 Yao Qi <yao@codesourcery.com>
10205
10206 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10207 (subdir_do): New make target. Copied from gdb/Makefile.
10208 (maintainer-clean, realclean, distclean, clean): Call corresponding
10209 make targets in common/Makefile.
10210
7a762829
YQ
102112011-03-04 Yao Qi <yao@codesourcery.com>
10212
10213 * Makefile.in: Remove GNU make feature --directory.
10214
348af9f7
MS
102152011-03-04 Michael Snyder <msnyder@vmware.com>
10216
10217 * server.c (queue_stop_reply): Call xmalloc not malloc.
10218
102192011-03-02 Michael Snyder <msnyder@vmware.com>
10220
10221 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10222
9f72fee2
MS
102232011-02-28 Michael Snyder <msnyder@vmware.com>
10224
588eebee
MS
10225 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10226 (cmd_qtframe): Ditto.
10227 (cmd_qtbuffer): Ditto.
10228 (cmd_bigqtbuffer): Ditto.
10229
9f72fee2
MS
10230 * utils.c (decimal2str): Initialize 'width' to nine, then
10231 don't mess with it.
10232
8040bd49
UW
102332011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10234
10235 * hostio.c (require_data): Free *data, not data.
10236
7e52cbd0
JK
102372011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10238
10239 * hostio.c (require_data): Use free, not xfree.
10240
9130f83e
MS
102412011-02-27 Michael Snyder <msnyder@vmware.com>
10242
4b812f4e
MS
10243 * server.c (handle_query): Discard unused value.
10244
9130f83e
MS
10245 * hostio.c (require_data): Free malloc memory before returning
10246 error.
10247
69d37113
MS
102482011-02-26 Michael Snyder <msnyder@vmware.com>
10249
10250 * linux-low.c (list_threads): Call closedir for dirent.
10251
35f5825a
MS
102522011-02-27 Michael Snyder <msnyder@vmware.com>
10253
2a589cef
MS
10254 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10255 a case statement falls through.
10256
0adea5f7
MS
10257 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10258
35f5825a
MS
10259 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10260 in comparison.
10261
238f1c74
MS
102622011-02-26 Michael Snyder <msnyder@vmware.com>
10263
10264 * utils.c (decimal2str): Eliminate dead code and dead param.
10265 (pulongest): Drop dead param from call to decimal2str.
10266 (plongest): Ditto.
10267
633ff500
JB
102682011-02-24 Joel Brobecker <brobecker@adacore.com>
10269
10270 Revert the following patch (not approved yet):
10271 2011-02-21 Hui Zhu <teawater@gmail.com>
10272 * tracepoint.c (tp_printf): New function.
10273 (eval_agent_expr): Handle gdb_agent_op_printf.
10274
f9c6ff72
HZ
102752011-02-21 Hui Zhu <teawater@gmail.com>
10276
10277 * tracepoint.c (tp_printf): New function.
10278 (eval_agent_expr): Handle gdb_agent_op_printf.
10279
94d5e490
TT
102802011-02-18 Tom Tromey <tromey@redhat.com>
10281
10282 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10283 (tracepoint.o): Likewise.
10284 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10285 (gdb_agent_op_names): Likewise.
10286
c7f96d2b
TT
102872011-02-18 Tom Tromey <tromey@redhat.com>
10288
10289 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10290 gdb_agent_op_rot>: New constants.
10291 (gdb_agent_op_names): Add pick and roll.
10292 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10293 cases.
10294
0feedb2c
JK
102952011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10296
10297 * aclocal.m4: Regenerated with aclocal-1.11.1.
10298
b3b9301e
PA
102992011-02-14 Pedro Alves <pedro@codesourcery.com>
10300
10301 * server.c (handle_qxfer_traceframe_info): New.
10302 (qxfer_packets): Register "traceframe-info".
10303 (handle_query): Report support for qXfer:traceframe-info:read+.
10304 * tracepoint.c (match_blocktype): New.
10305 (traceframe_find_block_type): Rename to ...
10306 (traceframe_walk_blocks): ... this. Add callback filter argument,
10307 and use it.
10308 (traceframe_find_block_type): New, reimplemented on top of
10309 traceframe_walk_blocks.
10310 (build_traceframe_info_xml): New.
10311 (traceframe_read_info): New.
10312 * server.h (traceframe_read_info): Declare.
10313
4f3e6fb7
YQ
103142011-02-11 Yao Qi <yao@codesourcery.com>
10315
10316 * configure.ac: Call AC_PROG_RANLIB.
10317 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10318 * configure: Regenerate.
10319
764880b7
PA
103202011-02-07 Pedro Alves <pedro@codesourcery.com>
10321
10322 * server.c (gdb_read_memory): Change return semantics to allow
10323 partial transfers.
10324 (handle_search_memory_1): Adjust.
10325 (process_serial_event) <'m' packet>: Handle partial transfers.
10326 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10327
1c79eb8a
PA
103282011-01-28 Pedro Alves <pedro@codesourcery.com>
10329
10330 * regcache.c (init_register_cache): Initialize
10331 regcache->register_status.
10332 (free_register_cache): Release regcache->register_status.
10333 (regcache_cpy): Copy register_status.
10334 (registers_to_string): Print 'x's for unavailable registers.
10335 (supply_register): Mark the register's status valid or
10336 unavailable, depending on whether a buffer was passed in or not.
10337 (supply_register_zeroed): New.
10338 (supply_regblock): Mark the registers' status valid or
10339 unavailable, depending on whether a buffer was passed in or not.
10340 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10341 (struct regcache): New `register_status' field.
10342 (supply_register_zeroed): Declare.
10343 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10344 supply_register_zeroed, rather than passing a NULL buffer to
10345 supply_register.
10346 * tracepoint.c (fetch_traceframe_registers): Update comment.
10347
85724a0e
PA
103482011-01-28 Pedro Alves <pedro@codesourcery.com>
10349
10350 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10351 buffer explicit.
10352
d08aafef
PA
103532011-01-25 Pedro Alves <pedro@codesourcery.com>
10354
10355 * server.h (decode_xfer_write): Change prototype.
10356 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10357 and don't extract the annex here.
10358 * server.c (decode_xfer_read): Remove `annex' parameter,
10359 and don't extract the annex here.
10360 (decode_xfer): New.
10361 (struct qxfer): New.
10362 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10363 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10364 (handle_qxfer_statictrace): New functions, abstracted out from
10365 handle_query, and made to use the struct qxfer interface.
10366 (handle_threads_qxfer_proper): Rename to ...
10367 (handle_qxfer_threads_proper): ... this.
10368 (handle_threads_qxfer): Rename to ...
10369 (handle_qxfer_threads): ... this. Adjust.
10370 (qxfer_packets): New array.
10371 (handle_qxfer): New function.
10372 (handle_query): Use handle_qxfer.
10373
493e2a69
MS
103742011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10375
10376 * gdbreplay.c: Shorten lines of >= 80 columns.
10377 * linux-low.c: Ditto.
10378 * linux-ppc-low.c: Ditto.
10379 * linux-s390-low.c: Ditto.
10380 * linux-sparc-low.c: Ditto.
10381 * linux-x86-low.c: Ditto.
10382 * linux-xtensa-low.c: Ditto.
10383 * mem-break.c: Ditto.
10384 * nto-low.c: Ditto.
10385 * regcache.h: Ditto.
10386 * remote-utils.c: Ditto.
10387 * server.c: Ditto.
10388 * server.h: Ditto.
10389 * thread-db.c: Ditto.
10390 * tracepoint.c: Ditto.
10391 * utils.c: Ditto.
10392 * win32-low.h: Ditto.
10393
44944448
JB
103942011-01-05 Joel Brobecker <brobecker@adacore.com>
10395
10396 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10397 update.
10398
71ce852c
JB
103992011-01-01 Joel Brobecker <brobecker@adacore.com>
10400
10401 * server.c (gdbserver_version): Update copyright year in version
10402 output.
10403 * gdbreplay.c (gdbreplay_version): Ditto.
10404
eb826dc6
MF
104052010-12-29 Jie Zhang <jie.zhang@analog.com>
10406
10407 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10408 * linux-bfin-low.c: New file.
10409 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10410 PT_DATA_ADDR for BFIN targets.
10411 * Makefile.in (SFILES): Add linux-bfin-low.c.
10412 (clean): Remove reg-bfin.c.
10413 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10414 * README: Mention supported Blackfin targets.
10415
39ab222a
MF
104162010-12-23 Mike Frysinger <vapier@gentoo.org>
10417
10418 * .gitignore: New file.
10419
a1f2ce7d
MF
104202010-11-16 Mike Frysinger <vapier@gentoo.org>
10421
10422 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10423
f474844c
JZ
104242010-10-22 Jie Zhang <jie@codesourcery.com>
10425
10426 * Makefile.in: Add FLAGS_TO_PASS variable.
10427 (install): Remove dependency of install-only and recursively
10428 invoke make for install-only.
10429
f1048712
DE
104302010-10-04 Doug Evans <dje@google.com>
10431
10432 * Makefile.in (uninstall): Use $(DESTDIR).
10433
b53a1623
PA
104342010-09-24 Pedro Alves <pedro@codesourcery.com>
10435
e6ee044d
PA
10436 PR gdb/11842
10437
b53a1623
PA
10438 * linux-x86-low.c (compat_siginfo_from_siginfo)
10439 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10440 si_code is < 0. Check for si_code == SI_TIMER before checking for
10441 si_code < 0.
10442
fa1bd1e4
JB
104432010-09-13 Joel Brobecker <brobecker@adacore.com>
10444
10445 * lynx-i386-low.c: New file.
10446 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10447
47fac8f8
JB
104482010-09-13 Joel Brobecker <brobecker@adacore.com>
10449
10450 * lynx-low.c (ptrace_request_to_str): Remove handling for
10451 request values that have been removed in LynxOS 5.x.
10452
1adfc54d
JB
104532010-09-13 Joel Brobecker <brobecker@adacore.com>
10454
10455 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10456 <ptrace.h>
10457
c2a66c29
NS
104582010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10459
10460 * configure.ac: Add --enable-inprocess-agent option.
10461 * configure: Rebuilt.
10462
32fcada3
YQ
104632010-09-06 Yao Qi <yao@codesourcery.com>
10464
10465 * linux-low.c (linux_kill): Remove unused variable.
10466 (linux_stabilize_threads): Likewise.
10467 * server.c (start_inferior): Likewise.
10468 (queue_stop_reply_callback): Likewise.
10469 * tracepoint.c (do_action_at_tracepoint): Likewise.
10470
0cccb683
YQ
104712010-09-06 Yao Qi <yao@codesourcery.com>
10472
10473 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10474 on return.
10475
423ec54c
JK
104762010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10477
10478 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10479
12ac6819
PA
104802010-09-06 Pedro Alves <pedro@codesourcery.com>
10481
10482 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10483 "$(IPA_DEPFILES)".
10484
8ed54b31
JB
104852010-09-01 Joel Brobecker <brobecker@adacore.com>
10486
10487 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10488 gdbserver/lynx-ppc-low.c: New files.
10489 * Makefile.in (lynx_low_h): New variable.
10490 (lynx-low.o, lynx-ppc-low.o): New rules.
10491 * configure.ac: On LynxOS, link with -lnetinet.
10492 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10493 * configure: regenerate.
10494
bb0116a4
JB
104952010-09-01 Joel Brobecker <brobecker@adacore.com>
10496
10497 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10498 * configure.ac: Add check for vasprintf and vsnprintf.
10499 * configure, config.in: Regenerate.
10500 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10501
a778ab81 105022010-09-01 Joel Brobecker <brobecker@adacore.com>
10503
10504 * gdbreplay.c: Move include of alloca.h up, next to include of
10505 malloc.h.
10506 * server.h: Add include of malloc.h.
10507 * mem-break.c: Remove include of malloc.h.
10508 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10509
8b034a19 105102010-09-01 Joel Brobecker <brobecker@adacore.com>
10511
10512 * Makefile.in (memmem.o): Build with -Wno-error.
10513
105142010-09-01 Joel Brobecker <brobecker@adacore.com>
10515
10516 * utils.c (xsnprintf): Make non-static.
10517 * server.h: Add xsnprintf declaration.
10518 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10519 replace calls to snprintf by calls to xsnprintf throughout.
10520
105212010-09-01 Joel Brobecker <brobecker@adacore.com>
10522
10523 * configure.ac: Add configure check for alloca.
10524 * configure, config.in: Regenerate.
10525 * server.h: Include alloca.h if it exists.
10526 * gdbreplay.c: Include alloca.h if it exists.
10527
1a981360
PA
105282010-08-28 Pedro Alves <pedro@codesourcery.com>
10529
10530 * linux-low.c (__SIGRTMIN): Define if not already defined.
10531 (linux_create_inferior): Check for __ANDROID__ rather than
10532 __SIGRTMIN.
10533 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10534 are already deferred.
10535 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10536 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10537 stopped and already has a pending signal to report.
10538 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10539 a pending signal to report or is moving out of a jump pad.
10540 (linux_init_signals): Check for __ANDROID__ rather than
10541 __SIGRTMIN.
10542
b4d51a55
PA
105432010-08-28 Pedro Alves <pedro@codesourcery.com>
10544
10545 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10546 debug_threads check. Avoid a linear search when not doing debug
10547 output.
10548
ec48365d
PA
105492010-08-27 Pedro Alves <pedro@codesourcery.com>
10550
10551 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10552 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10553 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10554 (process_event): Change local fd's type to gdb_fildes_t.
10555 (create_file_handler): Adjust prototype.
10556 (delete_file_handler): Adjust prototype.
10557 (handle_file_event): Adjust prototype. Use pfildes.
10558 (create_file_event): Adjsut prototype.
10559 * remote-utils.c (remote_desc, listen_desc): Change type to
10560 gdb_fildes_t.
10561 * server.h: New gdb_fildes_t typedef.
10562 [USE_WIN32API]: Include winsock2.h.
10563 (delete_file_handler, add_file_handler): Adjust prototypes.
10564 (pfildes): Declare.
10565 * utils.c (pfildes): New.
10566
854d88f0
PA
105672010-08-27 Pedro Alves <pedro@codesourcery.com>
10568
10569 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10570 * configure: Regenerate.
10571
0146f85b
PA
105722010-08-27 Pedro Alves <pedro@codesourcery.com>
10573
10574 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10575 (linux_done_accessing_memory): ... this.
10576 (linux_target_ops): Adjust.
10577 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10578 * nto-low.c (nto_target_ops): Adjust comment.
10579 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10580 * spu-low.c (spu_target_ops): Adjust comment.
10581 * target.h (target_ops): Rename unprepare_to_access_memory field
10582 to done_accessing_memory.
10583 (unprepare_to_access_memory): Rename to ...
10584 (done_accessing_memory): ... this.
10585
90d74c30
PA
105862010-08-26 Pedro Alves <pedro@codesourcery.com>
10587
10588 * linux-low.c (linux_prepare_to_access_memory): New.
10589 (linux_unprepare_to_access_memory): New.
10590 (linux_target_ops): Install them.
10591 * server.c (read_memory): Rename to ...
10592 (gdb_read_memory): ... this. Use
10593 prepare_to_access_memory/prepare_to_access_memory.
10594 (write_memory): Rename to ...
10595 (gdb_write_memory): ... this. Use
10596 prepare_to_access_memory/prepare_to_access_memory.
10597 (handle_search_memory_1): Adjust.
10598 (process_serial_event): Adjust.
10599 * target.h (struct target_ops): New fields
10600 prepare_to_access_memory and unprepare_to_access_memory.
10601 (prepare_to_access_memory, unprepare_to_access_memory): New.
10602 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10603 prepare_to_access_memory/prepare_to_access_memory.
10604 * nto-low.c (nto_target_ops): Adjust.
10605 * spu-low.c (spu_target_ops): Adjust.
10606 * win32-low.c (win32_target_ops): Adjust.
10607
fd467969
PA
106082010-08-26 Pedro Alves <pedro@codesourcery.com>
10609
10610 * Makefile.in (WARN_CFLAGS): Get it from configure.
10611 (WERROR_CFLAGS): New.
10612 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10613 * configure.ac: Introduce --enable-werror, which adds -Werror to
10614 the compiler command line. Enabled by default. Disable with
10615 --disable-werror. Add -Wdeclaration-after-statement
10616 Wpointer-arith and -Wformat-nonliteral to warning flags.
10617 * configure: Regenerate.
10618
331e2f5f
PA
106192010-08-26 Pedro Alves <pedro@codesourcery.com>
10620
10621 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10622
e581f2b4
PA
106232010-08-26 Pedro Alves <pedro@codesourcery.com>
10624
10625 * gdbreplay.c (remote_error): New.
10626 (gdbchar): New.
10627 (expect): Use gdbchar. Check for error reading from GDB.
10628 Clarify sync error output.
10629 (play): Check for errors writing to GDB.
10630 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10631 * remote-utils.c (getpkt): Check for errors writing to the remote
10632 descriptor.
10633
3c11dd79
PA
106342010-08-25 Pedro Alves <pedro@codesourcery.com>
10635
10636 * linux-low.c (linux_wait_1): Move non-debugging code out of
10637 `debug_threads' control.
10638
d20a8ad9
PA
106392010-08-25 Pedro Alves <pedro@codesourcery.com>
10640
10641 * linux-low.c (linux_wait_1): Don't set last_status here.
10642 * server.c (push_event, queue_stop_reply_callback): Assert we're
10643 not pushing a TARGET_WAITKIND_IGNORE event.
10644 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10645 (myresume, handle_target_event): Set the thread's last_resume_kind
10646 and last_status from the target returned status.
10647
964e4306
PA
106482010-08-25 Pedro Alves <pedro@codesourcery.com>
10649
10650 PR threads/10729
10651
10652 * linux-x86-low.c (update_debug_registers_callback): New.
10653 (i386_dr_low_set_addr): Use it.
10654 (i386_dr_low_get_addr): New.
10655 (i386_dr_low_set_control): Use update_debug_registers_callback.
10656 (i386_dr_low_get_control): New.
10657 (i386_dr_low_get_status): Adjust.
10658 * linux-low.c (linux_stop_lwp): New.
10659 * linux-low.h (linux_stop_lwp): Declare.
10660
10661 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10662 argument instead of a i386_debug_reg_state.
10663 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10664 a i386_debug_reg_state.
10665 (i386_insert_aligned_watchpoint): Adjust.
10666 (i386_remove_aligned_watchpoint): Adjust.
10667 (i386_low_stopped_data_address): Read the debug registers from the
10668 inferior instead of from the mirrors.
10669 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10670 (i386_dr_low_get_addr): Declare.
10671 (i386_dr_low_get_control): Declare.
10672 (i386_dr_low_get_status): Change prototype.
10673
10674 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10675 (i386_dr_low_get_addr): New.
10676 (i386_dr_low_get_control): New.
10677 (i386_dr_low_get_status): Adjust prototype. Return
10678 dr_status_mirror.
10679 (i386_initial_stuff): Clear dr_status_mirror and
10680 dr_control_mirror.
10681 (i386_get_thread_context): Adjust.
10682 (i386_set_thread_context): Adjust.
10683 (i386_thread_added): Adjust.
10684
5f21a75b
PA
106852010-08-24 Pedro Alves <pedro@codesourcery.com>
10686
10687 * linux-low.h (linux_thread_area): Delete declaration.
10688
3e4c1235
TS
106892010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10690
10691 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10692 after its termination.
10693
1971b033
PA
106942010-08-09 Pedro Alves <pedro@codesourcery.com>
10695
10696 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10697 (gdb_wants_all_stopped): Delete.
10698 (linux_wait_1): Don't call them.
10699 * server.c (handle_v_cont): Tag all threads as want-stopped.
10700 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10701 stopped as "client-wants-stopped".
10702
310444ac
PA
107032010-07-31 Pedro Alves <pedro@codesourcery.com>
10704
10705 * Makefile.in (signals_h): New.
10706 (server_h): Depend on it.
10707 (server.o): Don't depend on $(signals_def).
10708 (signals.o): Depend on $(signals_def).
10709
a19cae16
JK
107102010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10711
10712 * Makefile.in (signals_def): New.
10713 (server_h): Append include/gdb/signals.h and signals_def.
10714 (server.o): Append signals_def.
10715
30d50328
JK
107162010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10717
10718 * server.c (handle_target_event): Use target_signal_to_host for
10719 resume_info.sig initialization.
10720 * target.h (struct thread_resume) <sig>: New comment.
10721
5c3216e2
OS
107222010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10723
c6f46ca0
OS
10724 * server.c (handle_query): strcpy() the returned string from paddress()
10725 instead of sprintf().
5c3216e2
OS
10726 * utils.c (paddress): Return phex_nz().
10727
6bd31874
JB
107282010-07-07 Joel Brobecker <brobecker@adacore.com>
10729
10730 * server.c (handle_v_cont): Call mourn_inferior if process
10731 just exited.
10732 (myresume): Likewise.
10733
0fb4aa4b
PA
107342010-07-01 Pedro Alves <pedro@codesourcery.com>
10735
10736 Static tracepoints, and integration with UST.
10737
10738 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10739 * mem-break.c (uninsert_all_breakpoints)
10740 (reinsert_all_breakpoints): New.
10741 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10742 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10743 (gdb_agent_ust_loaded, helper_thread_id)
10744 (gdb_agent_helper_thread_id): New macros.
10745 (struct ipa_sym_addresses): Add addr_ust_loaded,
10746 addr_helper_thread_id, addr_cmd_buf.
10747 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10748 (in_process_agent_loaded_ust): New.
10749 (write_e_ust_not_loaded): New.
10750 (maybe_write_ipa_ust_not_loaded): New.
10751 (struct collect_static_trace_data_action): New.
10752 (enum tracepoint_type) <static_tracepoint>: New.
10753 (struct tracepoint) <handle>: Mention static tracepoints.
10754 (struct static_tracepoint_ctx): New.
10755 (CMD_BUF_SIZE): New.
10756 (add_tracepoint_action): Handle static tracepoint actions.
10757 (unprobe_marker_at): New.
10758 (clear_installed_tracepoints): Handle static tracepoints.
10759 (cmd_qtdp): Handle static tracepoints.
10760 (probe_marker_at): New.
10761 (cmd_qtstart): Handle static tracepoints.
10762 (response_tracepoint): Handle static tracepoints.
10763 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10764 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10765 (get_context_regcache): Handle static tracepoints.
10766 (do_action_at_tracepoint): Handle static tracepoint actions.
10767 (traceframe_find_block_type): Handle static trace data blocks.
10768 (traceframe_read_sdata): New.
10769 (download_tracepoints): Download static tracepoint actions.
10770 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10771 (GDB_PROBE_NAME): New.
10772 (ust_ops): New.
10773 (GET_UST_SYM): New.
10774 (USTF): New.
10775 (dlsym_ust): New.
10776 (ust_marker_to_static_tracepoint): New.
10777 (gdb_probe): New.
10778 (collect_ust_data_at_tracepoint): New.
10779 (gdb_ust_probe): New.
10780 (UNIX_PATH_MAX, SOCK_DIR): New.
10781 (gdb_ust_connect_sync_socket): New.
10782 (resume_thread, stop_thread): New.
10783 (run_inferior_command): New.
10784 (init_named_socket): New.
10785 (gdb_ust_socket_init): New.
10786 (cstr_to_hexstr): New.
10787 (next_st): New.
10788 (first_marker, next_marker): New.
10789 (response_ust_marker): New.
10790 (cmd_qtfstm, cmd_qtsstm): New.
10791 (unprobe_marker_at, probe_marker_at): New.
10792 (cmd_qtstmat, gdb_ust_thread): New.
10793 (gdb_ust_init): New.
10794 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10795 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10796 (ST_REGENTRY): New.
10797 (x86_64_st_collect_regmap): New.
10798 (X86_64_NUM_ST_COLLECT_GREGS): New.
10799 (AMD64_RIP_REGNUM): New.
10800 (supply_static_tracepoint_registers): New.
10801 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10802 (ST_REGENTRY): New.
10803 (i386_st_collect_regmap): New.
10804 (i386_NUM_ST_COLLECT_GREGS): New.
10805 (supply_static_tracepoint_registers): New.
10806 * server.c (handle_query): Handle qXfer:statictrace:read.
10807 <qSupported>: Report support for StaticTracepoints, and
10808 qXfer:statictrace:read features.
10809 * server.h (traceframe_read_sdata)
10810 (supply_static_tracepoint_registers): Declare.
10811 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10812 (unpack_varlen_hex): Include in IPA build.
10813 * Makefile.in (ustlibs, ustinc): New.
10814 (IPA_OBJS): Add remote-utils-ipa.o.
10815 ($(IPA_LIB)): Link -ldl and -lpthread.
10816 (UST_CFLAGS): New.
10817 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10818 * config.in, configure: Regenerate.
10819
9e4344e5
PA
108202010-06-20 Ian Lance Taylor <iant@google.com>
10821 Pedro Alves <pedro@codesourcery.com>
10822
10823 * linux-x86-low.c (always_true): Delete.
10824 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10825 trying to fool the compiler with always_true.
10826
c6beb2cb
PA
108272010-06-20 Pedro Alves <pedro@codesourcery.com>
10828
10829 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10830 conditions in gdbserver.
10831
d2ed6730
UW
108322010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10833
10834 * spu-low.c (spu_read_memory): Wrap around local store limit.
10835 (spu_write_memory): Likewise.
10836
4e29fb54
PA
108372010-06-15 Pedro Alves <pedro@codesourcery.com>
10838
10839 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10840 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10841 LONGEST uses.
10842 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10843 uses.
10844 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10845 uses with LONGEST uses.
10846
6a271cae
PA
108472010-06-14 Stan Shebs <stan@codesourcery.com>
10848 Pedro Alves <pedro@codesourcery.com>
10849
10850 Bytecode compiler.
10851
10852 * linux-x86-low.c: Include limits.h.
10853 (add_insns): New.
10854 (always_true): New.
10855 (EMIT_ASM): New.
10856 (EMIT_ASM32): New.
10857 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10858 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10859 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10860 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10861 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10862 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10863 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10864 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10865 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10866 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10867 (amd64_emit_void_call_2): New.
10868 (amd64_emit_ops): New.
10869 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10870 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10871 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10872 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10873 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10874 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10875 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10876 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10877 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10878 (i386_emit_stack_adjust, i386_emit_int_call_1)
10879 (i386_emit_void_call_2): New.
10880 (i386_emit_ops): New.
10881 (x86_emit_ops): New.
10882 (the_low_target): Install x86_emit_ops.
10883 * server.h (struct emit_ops): New.
10884 (get_raw_reg_func_addr): Declare.
10885 (current_insn_ptr, emit_error): Declare.
10886 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10887 (set_trace_state_variable_value): New defines.
10888 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10889 addr_get_trace_state_variable_value and
10890 addr_set_trace_state_variable_value.
10891 (symbol_list): New fields for get_raw_reg,
10892 get_trace_state_variable_value and set_trace_state_variable_value.
10893 (condfn): New typedef.
10894 (struct tracepoint): New field `compiled_cond'.
10895 (do_action_at_tracepoint): Clear compiled_cond.
10896 (get_trace_state_variable_value, set_trace_state_variable_value):
10897 Export in the IPA.
10898 (condition_true_at_tracepoint): If there's a compiled condition,
10899 run that.
10900 (current_insn_ptr, emit_error): New globals.
10901 (struct bytecode_address): New.
10902 (get_raw_reg_func_addr): New.
10903 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10904 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10905 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10906 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10907 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10908 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10909 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10910 (compile_tracepoint_condition, compile_bytecodes): New.
10911 * target.h (emit_ops): Forward declare.
10912 (struct target_ops): New field emit_ops.
10913 (target_emit_ops): New.
10914 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10915 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10916 * linux-low.c (linux_emit_ops): New.
10917 (linux_target_ops): Install it.
10918 * linux-low.h (struct linux_target_ops): New field emit_ops.
10919
92b72907
UW
109202010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10921
10922 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10923 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10924
fa593d66
PA
109252010-06-01 Pedro Alves <pedro@codesourcery.com>
10926 Stan Shebs <stan@codesourcery.com>
10927
10928 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10929 (all): Depend on $(extra_libraries).
10930 (install-only): Install the IPA.
10931 (IPA_OBJS, IPA_LIB): New.
10932 (clean): Remove the IPA lib.
10933 (IPAGENT_CFLAGS): New.
10934 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10935 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10936 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10937 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10938 * configure.ac: Check for atomic builtins support in the compiler.
10939 (IPA_DEPFILES, extra_libraries): Define.
10940 * configure.srv (ipa_obj): Add description.
10941 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10942 (i[34567]86-*-linux*): Set ipa_obj.
10943 (x86_64-*-linux*): Set ipa_obj.
10944 * linux-low.c (stabilizing_threads): New.
10945 (supports_fast_tracepoints): New.
10946 (linux_detach): Stabilize threads before detaching.
10947 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10948 the lwp is either not stabilizing, or is moving out of a jump pad.
10949 (linux_fast_tracepoint_collecting): New.
10950 (maybe_move_out_of_jump_pad): New.
10951 (enqueue_one_deferred_signal): New.
10952 (dequeue_one_deferred_signal): New.
10953 (linux_wait_for_event_1): If moving out of a jump pad, defer
10954 pending signals to later.
10955 (linux_stabilize_threads): New.
10956 (linux_wait_1): Check if threads need moving out of jump pads, and
10957 do it if so.
10958 (stuck_in_jump_pad_callback): New.
10959 (move_out_of_jump_pad_callback): New.
10960 (lwp_running): New.
10961 (linux_resume_one_lwp): Handle moving out of jump pads.
10962 (linux_set_resume_request): Dequeue deferred signals.
10963 (need_step_over_p): Also step over fast tracepoint jumps.
10964 (start_step_over): Also uninsert fast tracepoint jumps.
10965 (finish_step_over): Also reinsert fast tracepoint jumps.
10966 (linux_install_fast_tracepoint_jump): New.
10967 (linux_target_ops): Install linux_stabilize_threads and
10968 linux_install_fast_tracepoint_jump_pad.
10969 * linux-low.h (linux_target_ops) <get_thread_area,
10970 install_fast_tracepoint_jump_pad>: New fields.
10971 (struct lwp_info) <collecting_fast_tracepoint,
10972 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10973 (linux_get_thread_area): Declare.
10974 * linux-x86-low.c (jump_insn): New.
10975 (x86_get_thread_area): New.
10976 (append_insns): New.
10977 (push_opcode): New.
10978 (amd64_install_fast_tracepoint_jump_pad): New.
10979 (i386_install_fast_tracepoint_jump_pad): New.
10980 (x86_install_fast_tracepoint_jump_pad): New.
10981 (the_low_target): Install x86_get_thread_area and
10982 x86_install_fast_tracepoint_jump_pad.
10983 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10984 (struct fast_tracepoint_jump): New.
10985 (fast_tracepoint_jump_insn): New.
10986 (fast_tracepoint_jump_shadow): New.
10987 (find_fast_tracepoint_jump_at): New.
10988 (fast_tracepoint_jump_here): New.
10989 (delete_fast_tracepoint_jump): New.
10990 (set_fast_tracepoint_jump): New.
10991 (uninsert_fast_tracepoint_jumps_at): New.
10992 (reinsert_fast_tracepoint_jumps_at): New.
10993 (set_breakpoint_at): Use write_inferior_memory.
10994 (uninsert_raw_breakpoint): Use write_inferior_memory.
10995 (check_mem_read): Mask out fast tracepoint jumps.
10996 (check_mem_write): Mask out fast tracepoint jumps.
10997 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10998 (set_fast_tracepoint_jump): Declare.
10999 (delete_fast_tracepoint_jump)
11000 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
11001 (reinsert_fast_tracepoint_jumps_at): Declare.
11002 * regcache.c: Don't compile many functions when building the
11003 in-process agent library.
11004 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
11005 the register buffer in the heap.
11006 (free_register_cache): If the register buffer isn't owned by the
11007 regcache, don't free it.
11008 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
11009 pre-existing register caches.
11010 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
11011 type.
11012 (convert_ascii_to_int): : Constify `from' parameter type.
11013 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
11014 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
11015 the needed buffer in-place.
11016 (relocate_instruction): New.
11017 * server.c (handle_query) <qSymbols>: If the target supports
11018 tracepoints, give it a chance of looking up symbols. Report
11019 support for fast tracepoints.
11020 (handle_status): Stabilize threads.
11021 (process_serial_event): Adjust.
11022 * server.h (struct fast_tracepoint_jump): Forward declare.
11023 (struct process_info) <fast_tracepoint_jumps>: New field.
11024 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
11025 (decode_X_packet, decode_M_packet): Adjust.
11026 (relocate_instruction): Declare.
11027 (in_process_agent_loaded): Declare.
11028 (tracepoint_look_up_symbols): Declare.
11029 (struct fast_tpoint_collect_status): Declare.
11030 (fast_tracepoint_collecting): Declare.
11031 (force_unlock_trace_buffer): Declare.
11032 (handle_tracepoint_bkpts): Declare.
11033 (initialize_low_tracepoint)
11034 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
11035 * target.h (struct target_ops) <stabilize_threads,
11036 install_fast_tracepoint_jump_pad>: New fields.
11037 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
11038 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
11039 [HAVE_STDINT_H]: Include stdint.h.
11040 (trace_debug_1): Rename to ...
11041 (trace_vdebug): ... this.
11042 (trace_debug): Rename to ...
11043 (trace_debug_1): ... this. Add `level' parameter.
11044 (trace_debug): New.
11045 (ATTR_USED, ATTR_NOINLINE): New.
11046 (IP_AGENT_EXPORT): New.
11047 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
11048 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
11049 (about_to_request_buffer_space, trace_buffer_is_full)
11050 (stopping_tracepoint, expr_eval_result, error_tracepoint)
11051 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
11052 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
11053 (traceframe_write_count, traceframes_created)
11054 (trace_state_variables)
11055 New renaming defines.
11056 (struct ipa_sym_addresses): New.
11057 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11058 (symbol_list): New.
11059 (ipa_sym_addrs): New.
11060 (all_tracepoint_symbols_looked_up): New.
11061 (in_process_agent_loaded): New.
11062 (write_e_ipa_not_loaded): New.
11063 (maybe_write_ipa_not_loaded): New.
11064 (tracepoint_look_up_symbols): New.
11065 (debug_threads) [IN_PROCESS_AGENT]: New.
11066 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11067 (UNKNOWN_SIDE_EFFECTS): New.
11068 (stop_tracing): New.
11069 (flush_trace_buffer): New.
11070 (stop_tracing_bkpt): New.
11071 (flush_trace_buffer_bkpt): New.
11072 (read_inferior_integer): New.
11073 (read_inferior_uinteger): New.
11074 (read_inferior_data_pointer): New.
11075 (write_inferior_data_pointer): New.
11076 (write_inferior_integer): New.
11077 (write_inferior_uinteger): New.
11078 (struct collect_static_trace_data_action): Delete.
11079 (enum tracepoint_type): New.
11080 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11081 <actions_str, step_actions, step_actions_str>: Only include in
11082 GDBserver.
fa593d66
PA
11083 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11084 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11085 (tracepoints): Use IP_AGENT_EXPORT.
11086 (last_tracepoint): Don't include in the IPA.
11087 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11088 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11089 (alloced_trace_state_variables): New.
11090 (trace_state_variables): Use IP_AGENT_EXPORT.
11091 (traceframe_t): Delete unused variable.
11092 (circular_trace_buffer): Don't include in the IPA.
11093 (trace_buffer_start): Delete.
11094 (struct trace_buffer_control): New.
11095 (trace_buffer_free): Delete.
11096 (struct ipa_trace_buffer_control): New.
11097 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11098 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11099 New.
11100 (trace_buffer_ctrl): New.
11101 (TRACE_BUFFER_CTRL_CURR): New.
11102 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11103 Reimplement as macros.
11104 (trace_buffer_wrap): Delete.
11105 (traceframe_write_count, traceframe_read_count)
11106 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11107 (struct tracepoint_hit_ctx) <type>: New field.
11108 (struct fast_tracepoint_ctx): New.
11109 (memory_barrier): New.
11110 (cmpxchg): New.
11111 (record_tracepoint_error): Update atomically in the IPA.
11112 (clear_inferior_trace_buffer): New.
11113 (about_to_request_buffer_space): New.
11114 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11115 updating the same buffer.
11116 (add_tracepoint): Default the tracepoint's type to trap
11117 tracepoint, and orig_size to -1.
11118 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11119 internal variables.
11120 (create_trace_state_variable): New parameter `gdb'. Handle it.
11121 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11122 (cmd_qtdp): Handle fast tracepoints.
11123 (cmd_qtdv): Adjust.
11124 (max_jump_pad_size): New.
11125 (gdb_jump_pad_head): New.
11126 (get_jump_space_head): New.
11127 (claim_jump_space): New.
11128 (sort_tracepoints): New.
11129 (MAX_JUMP_SIZE): New.
11130 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11131 IPA.
11132 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11133 support. Upload fast traceframes, and delete internal IPA
11134 breakpoints.
11135 (stop_tracing_handler): New.
11136 (flush_trace_buffer_handler): New.
11137 (cmd_qtstop): Upload fast tracepoints.
11138 (response_tracepoint): Handle fast tracepoints.
11139 (tracepoint_finished_step): Upload fast traceframes. Set the
11140 tracepoint hit context's tracepoint type.
11141 (handle_tracepoint_bkpts): New.
11142 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11143 type. Add comment about fast tracepoints.
11144 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11145 non-existing action_str field.
11146 (get_context_regcache): Handle fast tracepoints.
11147 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11148 to the regcache.
11149 (fast_tracepoint_from_jump_pad_address): New.
11150 (fast_tracepoint_from_ipa_tpoint_address): New.
11151 (collecting_t): New.
11152 (force_unlock_trace_buffer): New.
11153 (fast_tracepoint_collecting): New.
11154 (collecting): New.
11155 (gdb_collect): New.
11156 (write_inferior_data_ptr): New.
11157 (target_tp_heap): New.
11158 (target_malloc): New.
11159 (download_agent_expr): New.
11160 (UALIGN): New.
11161 (download_tracepoints): New.
11162 (download_trace_state_variables): New.
11163 (upload_fast_traceframes): New.
11164 (IPA_FIRST_TRACEFRAME): New.
11165 (IPA_NEXT_TRACEFRAME_1): New.
11166 (IPA_NEXT_TRACEFRAME): New.
11167 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11168 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11169 (gdb_jump_pad_buffer_end): New.
11170 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11171 (initialize_tracepoint): Adjust.
11172 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11173 buffer. Initialize the low module.
11174 * utils.c (PREFIX, TOOLNAME): New.
11175 (malloc_failure): Use PREFIX.
11176 (error): In the IPA, an error causes an exit.
11177 (fatal, warning): Use PREFIX.
11178 (internal_error): Use TOOLNAME.
11179 (NUMCELLS): Increase to 10.
11180 * configure, config.in: Regenerate.
11181
d149dd1d
PA
111822010-06-01 Pedro Alves <pedro@codesourcery.com>
11183
11184 * server.c (handle_query) <qSupported>: Do two passes over the
11185 qSupported string to avoid nesting strtok.
11186
f6528abd
JK
111872010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11188
11189 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11190 (CDEPS): New.
11191 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11192 -Wl,--dynamic-list.
11193 * configure: Regenerate.
11194 * proc-service.list: New.
11195
ca2a87a0
JK
111962010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11197
11198 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11199 New comment.
11200
363a6e9f
OS
112012010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11202
11203 * gdbreplay.c (remote_open): Check error return from socket() call by
11204 its equality to -1 not by it being negative.
11205 * remote-utils.c (remote_open): Likewise.
11206
d23b6cb1
PA
112072010-05-23 Pedro Alves <pedro@codesourcery.com>
11208
11209 * config.h: Regenerate.
11210
28d3cf85
MK
112112010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11212
11213 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11214 doesn't provide PTRACE_GET_THREAD_AREA.
11215
fea36a59
MK
112162010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11217
11218 * linux-m68k-low.c: Include <asm/ptrace.h>
11219 (ps_get_thread_area): Implement.
11220
24b066ba
DE
112212010-05-03 Doug Evans <dje@google.com>
11222
11223 * event-loop.c (struct callback_event): New struct.
11224 (callback_list): New global.
11225 (append_callback_event, delete_callback_event): New functions.
11226 (process_callback): New function.
11227 (start_event_loop): Call it.
11228 * remote-utils.c (NOT_SCHEDULED): Define.
11229 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11230 moved out of readchar.
11231 (readchar): Rewrite. Call reschedule before returning.
11232 (reset_readchar): New function.
11233 (remote_close): Call it.
11234 (process_remaining, reschedule): New functions.
11235 * server.h (callback_handler_func): New typedef.
11236 (append_callback_event, delete_callback_event): Declare.
11237
9836d6ea
PA
112382010-05-03 Pedro Alves <pedro@codesourcery.com>
11239
11240 * proc-service.c (ps_pglobal_lookup): Use
11241 thread_db_look_up_one_symbol.
11242 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11243 parameter. Use it instead of all_symbols_looked_up.
11244 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11245 field.
11246 (all_symbols_looked_up): Don't declare.
11247 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11248 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11249 field.
11250 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11251 Set all_symbols_looked_up here.
11252 (thread_db_look_up_one_symbol): New.
11253 (thread_db_get_tls_address): Adjust.
11254 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11255 thread_db object on the heap, and tentatively set it in the
11256 process structure.
11257 (thread_db_init): Don't set all_symbols_looked_up here.
11258 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11259
7984d532
PA
112602010-05-03 Pedro Alves <pedro@codesourcery.com>
11261
11262 * linux-low.c (linux_kill, linux_detach): Adjust.
11263 (status_pending_p_callback): Remove redundant statement. Check
11264 for !TARGET_WAITIKIND_IGNORE, instead of
11265 TARGET_WAITKIND_STOPPED.
11266 (handle_tracepoints): Make sure LWP is locked. Adjust.
11267 (linux_wait_for_event_1): Adjust.
11268 (linux_cancel_breakpoints): New.
11269 (unsuspend_one_lwp): New.
11270 (unsuspend_all_lwps): New.
11271 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11272 (send_sigstop_callback): Change return type to int, add new
11273 `except' parameter and handle it.
11274 (suspend_and_send_sigstop_callback): New.
11275 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11276 pass them down. If SUSPEND, also increment the lwp's suspend
11277 count.
11278 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11279 (need_step_over_p): Don't consider suspended LWPs.
11280 (start_step_over): Adjust.
11281 (proceed_one_lwp): Change return type to int, add new `except'
11282 parameter and handle it.
11283 (unsuspend_and_proceed_one_lwp): New.
11284 (proceed_all_lwps): Use find_inferior instead of
11285 for_each_inferior.
11286 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11287 also decrement the suspend count of LWPs. Pass `except' down,
11288 instead of hacking its suspend count.
11289 (linux_pause_all): Add `freeze' parameter. Adjust.
11290 (linux_unpause_all): New.
11291 (linux_target_ops): Install linux_unpause_all.
11292 * server.c (handle_status): Adjust.
11293 * target.h (struct target_ops): New fields `unpause_all' and
11294 `cancel_breakpoints'. Add new parameter to `pause_all'.
11295 (pause_all): Add new `freeze' parameter.
11296 (unpause_all): New.
11297 (cancel_breakpoints): New.
11298 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11299 cancel breakpoints.
11300 (cmd_qtstart): Pause threads.
11301 (stop_tracing): Pause threads, and cancel breakpoints.
11302 * win32-low.c (win32_target_ops): Adjust.
11303
e471f25b
PA
113042010-05-03 Pedro Alves <pedro@codesourcery.com>
11305
11306 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11307 the inferior right away from here...
11308 (linux_wait_1): ... to here, and adjust to check the thread's
11309 last_resume_kind instead of the lwp's step or stop_expected flags.
11310
1915ef4f
PA
113112010-05-02 Pedro Alves <pedro@codesourcery.com>
11312
11313 * README: Use consistent `GDB' and `GDBserver' spellings.
11314
f9e39928
PA
113152010-05-02 Pedro Alves <pedro@codesourcery.com>
11316
11317 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11318 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11319 (linux_detach_one_lwp): Assume the lwp is stopped.
11320 (any_thread_of): Delete.
11321 (linux_detach): Stop all lwps here. Don't blindly delete all
11322 breakpoints.
11323 (delete_lwp_callback): New.
11324 (linux_mourn): Delete all lwps of the process that is gone.
11325 (linux_wait_1): Don't delete the last lwp of the process here.
11326 * mem-break.h (mark_breakpoints_out): Declare.
11327 * mem-break.c (mark_breakpoints_out): New.
11328 (free_all_breakpoints): Use it.
11329 * server.c (handle_target_event): If the process is gone, mark
11330 breakpoints out.
11331 * thread-db.c (struct thread_db) <create_bp>: New field.
11332 (thread_db_enable_reporting): Fix prototype. Store a thread event
11333 breakpoint reference in the thread_db struct.
11334 (thread_db_load_search): Clear the thread_db object.
11335 (try_thread_db_load_1): Ditto.
11336 (switch_to_process): New.
11337 (disable_thread_event_reporting): Use it.
11338 (remove_thread_event_breakpoints): New.
11339 (thread_db_detach, thread_db_mourn): Use it.
11340
1e7fc18c
PA
113412010-05-01 Pedro Alves <pedro@codesourcery.com>
11342
11343 * linux-low.c (linux_enable_event_reporting): New.
11344 (linux_wait_for_event_1, handle_extended_wait): Use it.
11345
02fc4de7
PA
113462010-04-30 Pedro Alves <pedro@codesourcery.com>
11347
11348 * linux-low.c (linux_kill_one_lwp, linux_kill)
11349 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11350 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11351 SIGSTOP even if the LWP is stopped.
11352 (send_sigstop_callback): New.
11353 (stop_all_lwps): Use send_sigstop_callback instead.
11354 (linux_resume_one_thread): Adjust.
11355 (proceed_one_lwp): Still proceed an LWP that the client has
11356 requested to stop, if we haven't reported it as stopped yet. Make
11357 sure that LWPs the client want stopped, have a pending SIGSTOP.
11358
bc3b5632
DE
113592010-04-26 Doug Evans <dje@google.com>
11360
ae1ada35
DE
11361 * server.c (handle_general_set): Make static.
11362
bc3b5632
DE
11363 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11364 Print received char after testing for error/eof instead of before.
11365 (input_interrupt): Tweak comment.
11366
65730243
DE
113672010-04-23 Doug Evans <dje@google.com>
11368
11369 * server.c (start_inferior): Print inferior argv if --debug.
11370
a8ae7dc0
AR
113712010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11372
11373 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11374 * nto-x86-low.c: Include server.h
11375
1c07cc19
PM
113762010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11377
11378 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11379 be consistent with other sources of this directory.
11380 (init_registers_amd64): Correct name of source file of this function
11381 in the comment.
11382
e0a61e09
PM
113832010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11384
11385 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11386 64-bit executables.
11387
54709339
PM
113882010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11389
11390 * win32-i386-low.c: Add 64-bit support.
11391 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11392 (init_registers_amd64): Declare.
11393 (mappings): Add 64-bit version of array.
11394 (init_windows_x86): New function.
11395 (the_low_target): Change init_arch field to init_windows_x86.
11396
e8f0053d
PM
113972010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11398
11399 * win32-low.c: Adapt to support also 64-bit architecture.
11400 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11401 (get_image_name): Use SIZE_T type for local variable `done'.
11402 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11403 (toolhelp_get_dll_name): Idem.
11404 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11405 Use uintptr_t typecast to avoid warning.
11406 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11407 (handle_exception): Use phex_nz to avoid warning.
11408 (win32_wait): Remove unused local variable `process'.
11409
c481e77e
PM
114102010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11411
11412 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11413 `amd64-avx.o'.
11414
12ea4b69
PM
114152010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11416
11417 * configure.ac: Use `ws2_32' library for srv_mingw.
11418 * configure: Regenerate.
11419 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11420 * remote-utils.c: Likewise.
11421
f6d1620c
L
114222010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11423
11424 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11425 if __x86_64__ is defined.
11426
8e642873
PM
114272010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11428
11429 * configure: Regenerate.
11430
711e434b
PM
114312010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11432
11433 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11434 * target.h (target_ops): New get_tib_address field.
11435 * win32-low.h (win32_thread_info): Add thread_local_base field.
11436 * win32-low.c (child_add_thread): Add tlb argument.
11437 Set thread_local_base field to TLB.
11438 (get_child_debug_event): Adapt to child_add_thread change.
11439 (win32_get_tib_address): New function.
11440 (win32_target_ops): Set get_tib_address field to
11441 win32_get_tib_address.
11442 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11443
505106cd
PA
114442010-04-12 Pedro Alves <pedro@codesourcery.com>
11445
505106cd
PA
11446 * linux-low.c (linux_mourn): Also remove the process.
11447 * server.c (handle_target_event): Don't remove the process here.
11448 * nto-low.c (nto_mourn): New.
11449 (nto_target_ops): Install it.
11450 * spu-low.c (spu_mourn): New.
11451 (spu_target_ops): Install it.
11452 * win32-low.c (win32_mourn): New.
11453 (win32_target_ops): Install it.
11454
e8470a06
PA
114552010-04-12 Pedro Alves <pedro@codesourcery.com>
11456
11457 * server.h (buffer_xml_printf): Remove redundant `;'.
11458
45ba0d02
PA
114592010-04-12 Pedro Alves <pedro@codesourcery.com>
11460
11461 * regcache.c (set_register_cache): Invalidate regcaches before
11462 changing the register cache layout.
11463 (regcache_invalidate_one): Allow a NULL regcache.
11464 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11465 regcaches before changing the register cache layout or the target
11466 regsets.
11467
59e04013
L
114682010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11469
11470 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11471 variable warning on Linux/x86-64.
11472
8336d594
PA
114732010-04-11 Pedro Alves <pedro@codesourcery.com>
11474
11475 GDBserver disconnected tracing support.
11476
11477 * linux-low.c (linux_remove_process): Delete.
11478 (add_lwp): Don't set last_resume_kind here.
11479 (linux_kill): Use `mourn'.
11480 (linux_detach): Use `thread_db_detach', and `mourn'.
11481 (linux_mourn): New.
11482 (linux_attach_lwp_1): Adjust comment.
11483 (linux_attach): last_resume_kind moved the thread_info; adjust.
11484 (status_pending_p_callback): Adjust.
11485 (linux_wait_for_event_1): Adjust.
11486 (count_events_callback, select_singlestep_lwp_callback)
11487 (select_event_lwp_callback, cancel_breakpoints_callback)
11488 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11489 (proceed_one_lwp): Adjust.
11490 (linux_async): Add debug output.
11491 (linux_thread_stopped): New.
11492 (linux_pause_all): New.
11493 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11494 linux_pause_all.
11495 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11496 (thread_db_free): Delete declaration.
11497 (thread_db_detach, thread_db_mourn): Declare.
11498 * thread-db.c (thread_db_init): Use thread_db_mourn.
11499 (thread_db_free): Delete, split in two.
11500 (disable_thread_event_reporting): New.
11501 (thread_db_detach): New.
11502 (thread_db_mourn): New.
11503
11504 * server.h (struct thread_info) <last_resume_kind>: New field.
11505 <attached>: Add comment.
11506 <gdb_detached>: New field.
11507 (handler_func): Change return type to int.
11508 (handle_serial_event, handle_target_event): Ditto.
11509 (gdb_connected): Declare.
11510 (tracing): Delete.
11511 (disconnected_tracing): Declare.
11512 (stop_tracing): Declare.
11513
11514 * server.c (handle_query) <qSupported>: Report support for
11515 disconnected tracing.
11516 (queue_stop_reply_callback): Account for running threads.
11517 (gdb_wants_thread_stopped): New.
11518 (gdb_wants_all_threads_stopped): New.
11519 (gdb_reattached_process): New.
11520 (handle_status): Clear the `gdb_detached' flag of all processes.
11521 In all-stop, stop all threads.
11522 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11523 (process_serial_event): If the remote connection breaks, or if an
11524 exit was forced with "monitor exit", force an event loop exit.
11525 Handle disconnected tracing on detach.
11526 (handle_serial_event): Adjust.
11527 (handle_target_event): If GDB isn't connected, forward events back
11528 to the inferior, unless the last process exited, in which case,
11529 exit gdbserver. Adjust interface.
11530
11531 * remote-utils.c (remote_open): Don't block in accept. Instead
11532 register an event loop source on the listen socket file
11533 descriptor. Refactor bits into ...
11534 (listen_desc): ... this new global.
11535 (gdb_connected): ... this new function.
11536 (enable_async_notification): ... this new function.
11537 (handle_accept_event): ... this new function.
11538 (remote_close): Clear remote_desc.
11539
11540 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11541
11542 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11543 New fields.
11544 (mourn_inferior): Define.
11545 (target_process_qsupported): Avoid the dangling else problem.
11546 (thread_stopped): Define.
11547 (pause_all): Define.
11548 (target_waitstatus_to_string): Declare.
11549 * target.c (target_waitstatus_to_string): New.
11550
11551 * tracepoint.c (tracing): Make extern.
11552 (disconnected_tracing): New.
11553 (stop_tracing): Make extern. Handle tracing stops due to GDB
11554 disconnecting.
11555 (cmd_qtdisconnected): New.
11556 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11557 (handle_tracepoint_general_set): Handle QTDisconnected.
11558
11559 * event-loop.c (event_handler_func): Change return type to int.
11560 (process_event): Bail out if the event handler wants the event
11561 loop to stop.
11562 (handle_file_event): Ditto.
11563 (start_event_loop): Bail out if the event handler wants the event
11564 loop to stop.
11565
11566 * nto-low.c (nto_target_ops): Adjust.
11567 * spu-low.c (spu_wait): Don't remove the process here.
11568 (spu_target_ops): Adjust.
11569 * win32-low.c (win32_wait): Don't remove the process here.
11570 (win32_target_ops): Adjust.
11571
5d267c4c
PA
115722010-04-11 Pedro Alves <pedro@codesourcery.com>
11573
11574 * regcache.c (realloc_register_cache): Invalidate inferior's
11575 regcache before recreating it.
11576
623ccd72
PA
115772010-04-09 Pedro Alves <pedro@codesourcery.com>
11578
11579 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11580
219f2f23
PA
115812010-04-09 Stan Shebs <stan@codesourcery.com>
11582 Pedro Alves <pedro@codesourcery.com>
11583
11584 * server.h (LONGEST): New.
11585 (struct thread_info) <while_stepping>: New field.
11586 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11587 Declare.
11588 (initialize_tracepoint, handle_tracepoint_general_set)
11589 (handle_tracepoint_query, tracepoint_finished_step)
11590 (tracepoint_was_hit, release_while_stepping_state_list):
11591 (current_traceframe): Declare.
11592 * server.c (handle_general_set): Handle tracepoint packets.
11593 (read_memory): New.
11594 (write_memory): New.
11595 (handle_search_memory_1): Use read_memory.
11596 (handle_query): Report support for conditional tracepoints, trace
11597 state variables, and tracepoint sources. Handle tracepoint
11598 queries.
11599 (main): Initialize the tracepoints module.
11600 (process_serial_event): Handle traceframe reads/writes.
11601
11602 * linux-low.c (handle_tracepoints): New.
11603 (linux_wait_1): Call it.
11604 (linux_resume_one_lwp): Handle while-stepping.
11605 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11606 (linux_target_ops): Install them.
11607 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11608 New field.
11609 * linux-x86-low.c (x86_supports_tracepoints): New.
11610 (the_low_target). Install it.
11611
11612 * mem-break.h (delete_breakpoint): Declare.
11613 * mem-break.c (delete_breakpoint): Make external.
11614
11615 * target.h (struct target_ops): Add `supports_tracepoints',
11616 `read_pc', and `write_pc' fields.
11617 (target_supports_tracepoints): Define.
11618 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11619 (phex_nz): New.
11620
11621 * regcache.h (struct regcache) <registers_owned>: New field.
11622 (init_register_cache, regcache_cpy): Declare.
11623 (regcache_read_pc, regcache_write_pc): Declare.
11624 (register_cache_size): Declare.
11625 (supply_regblock): Declare.
11626 * regcache.c (init_register_cache): New.
11627 (new_register_cache): Use it.
11628 (regcache_cpy): New.
11629 (register_cache_size): New.
11630 (supply_regblock): New.
11631 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11632
219f2f23
PA
11633 * tracepoint.c: New.
11634
11635 * Makefile.in (OBS): Add tracepoint.o.
11636 (tracepoint.o): New rule.
11637
3a13a53b
L
116382010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11639
11640 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11641 (i386-mmx.o): New.
11642 (i386-mmx.c): Likewise.
11643 (i386-mmx-linux.o): Likewise.
11644 (i386-mmx-linux.c): Likewise.
11645
11646 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11647 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11648 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11649 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11650
11651 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11652 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11653 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11654
1570b33e
L
116552010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11656
11657 * Makefile.in (clean): Updated.
11658 (i386-avx.o): New.
11659 (i386-avx.c): Likewise.
11660 (i386-avx-linux.o): Likewise.
11661 (i386-avx-linux.c): Likewise.
11662 (amd64-avx.o): Likewise.
11663 (amd64-avx.c): Likewise.
11664 (amd64-avx-linux.o): Likewise.
11665 (amd64-avx-linux.c): Likewise.
11666
11667 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11668 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11669 (srv_amd64_regobj): Add amd64-avx.o.
11670 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11671 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11672 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11673 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11674 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11675 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11676 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11677
11678 * i387-fp.c: Include "i386-xstate.h".
11679 (i387_xsave): New.
11680 (i387_cache_to_xsave): Likewise.
11681 (i387_xsave_to_cache): Likewise.
11682 (x86_xcr0): Likewise.
11683
11684 * i387-fp.h (i387_cache_to_xsave): Likewise.
11685 (i387_xsave_to_cache): Likewise.
11686 (x86_xcr0): Likewise.
11687
11688 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11689 * linux-crisv32-low.c (target_regsets): Likewise.
11690 * linux-m68k-low.c (target_regsets): Likewise.
11691 * linux-mips-low.c (target_regsets): Likewise.
11692 * linux-ppc-low.c (target_regsets): Likewise.
11693 * linux-s390-low.c (target_regsets): Likewise.
11694 * linux-sh-low.c (target_regsets): Likewise.
11695 * linux-sparc-low.c (target_regsets): Likewise.
11696 * linux-xtensa-low.c (target_regsets): Likewise.
11697
11698 * linux-low.c: Include <sys/uio.h>.
11699 (regsets_fetch_inferior_registers): Support nt_type.
11700 (regsets_store_inferior_registers): Likewise.
11701 (linux_process_qsupported): New.
11702 (linux_target_ops): Add linux_process_qsupported.
11703
11704 * linux-low.h (regset_info): Add nt_type.
11705 (linux_target_ops): Add process_qsupported.
11706
11707 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11708 and <sys/uio.h>.
11709 (init_registers_i386_avx_linux): New.
11710 (init_registers_amd64_avx_linux): Likewise.
11711 (xmltarget_i386_linux_no_xml): Likewise.
11712 (xmltarget_amd64_linux_no_xml): Likewise.
11713 (PTRACE_GETREGSET): Likewise.
11714 (PTRACE_SETREGSET): Likewise.
11715 (x86_fill_xstateregset): Likewise.
11716 (x86_store_xstateregset): Likewise.
11717 (use_xml): Likewise.
11718 (x86_linux_update_xmltarget): Likewise.
11719 (x86_linux_process_qsupported): Likewise.
11720 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11721 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11722 init_registers_i386_linux here. Call
11723 x86_linux_update_xmltarget.
11724 (the_low_target): Add x86_linux_process_qsupported.
11725
11726 * server.c (handle_query): Call target_process_qsupported.
11727
11728 * target.h (target_ops): Add process_qsupported.
11729 (target_process_qsupported): New.
11730
fc7238bb
PA
117312010-04-03 Pedro Alves <pedro@codesourcery.com>
11732
11733 * inferiors.c (add_thread): Set last_status kind to
11734 TARGET_WAITKIND_IGNORE.
11735 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11736 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11737 (linux_wait_1): Move `thread' local definition to block that uses
11738 it. Don't NULL initialize `event_child'.
11739 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11740 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11741 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11742
bdabb078
PA
117432010-04-01 Pedro Alves <pedro@codesourcery.com>
11744
11745 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11746 an extended waitstatus, or by a watchpoint.
11747 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11748 thread was stepping or has been stopped by a watchpoint.
11749
d3bbe7a0
PA
117502010-04-01 Pedro Alves <pedro@codesourcery.com>
11751
11752 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11753 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11754 of another, then delete the previous, and validate all
11755 breakpoints.
11756 (validate_inserted_breakpoint): New.
11757 (delete_disabled_breakpoints): New.
11758 (validate_breakpoints): New.
11759 (check_mem_read): Validate breakpoints before trusting their
11760 shadow. Delete disabled breakpoints.
11761 (check_mem_write): Validate breakpoints before trusting they
11762 should be inserted. Delete disabled breakpoints.
11763 * mem-break.h (validate_breakpoints):
11764 * server.c (handle_query): Validate breakpoints when we see a
11765 qSymbol query.
11766
8b07ae33
PA
117672010-04-01 Pedro Alves <pedro@codesourcery.com>
11768
11769 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11770 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11771 if we could tell there's a GDB breakpoint at stop_pc.
11772 (need_step_over_p): Don't do a step over if we find a GDB
11773 breakpoint at the resume PC.
11774
11775 * mem-break.c (struct raw_breakpoint): New.
11776 (enum bkpt_type): New type `gdb_breakpoint'.
11777 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11778 fields. New field `raw'.
11779 (find_raw_breakpoint_at): New.
11780 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11781 breakpoint instead.
11782 (set_breakpoint_at): Adjust.
11783 (delete_raw_breakpoint): New.
11784 (release_breakpoint): New.
11785 (delete_breakpoint): Rename to...
11786 (delete_breakpoint_1): ... this. Add proc parameter. Use
11787 release_breakpoint. Return ENOENT.
11788 (delete_breakpoint): Reimplement.
11789 (find_breakpoint_at): Delete.
11790 (find_gdb_breakpoint_at): New.
11791 (delete_breakpoint_at): Delete.
11792 (set_gdb_breakpoint_at): New.
11793 (delete_gdb_breakpoint_at): New.
11794 (gdb_breakpoint_here): New.
11795 (set_reinsert_breakpoint): Use release_breakpoint.
11796 (uninsert_breakpoint): Rename to ...
11797 (uninsert_raw_breakpoint): ... this.
11798 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11799 (reinsert_raw_breakpoint): Change parameter type to
11800 raw_breakpoint.
11801 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11802 instead.
11803 (check_breakpoints): Adjust. Use release_breakpoint.
11804 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11805 (breakpoint_inserted_here): Ditto.
11806 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11807 Don't trust the breakpoint's shadow if it is not inserted.
11808 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11809 (delete_all_breakpoints): Adjust.
11810 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11811 use delete_breakpoint_1.
11812
11813 * mem-break.h (breakpoints_supported): Delete declaration.
11814 (set_gdb_breakpoint_at): Declare.
11815 (gdb_breakpoint_here): Declare.
11816 (delete_breakpoint_at): Delete.
11817 (delete_gdb_breakpoint_at): Declare.
11818
11819 * server.h (struct raw_breakpoint): Forward declare.
11820 (struct process_info): New field `raw_breakpoints'.
11821
11822 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11823 breakpoints.
11824
6bf5e0ba
PA
118252010-03-24 Pedro Alves <pedro@codesourcery.com>
11826
11827 * linux-low.c (status_pending_p_callback): Fix comment.
11828 (linux_wait_for_event_1): Move most of the internal breakpoint
11829 handling from here...
11830 (linux_wait_1): ... to here.
11831 (count_events_callback): New.
11832 (select_singlestep_lwp_callback): New.
11833 (select_event_lwp_callback): New.
11834 (cancel_breakpoints_callback): New.
11835 (select_event_lwp): New.
11836 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11837 priority to all LWPs that have had events that should be reported
11838 to the client. Cancel breakpoints when about to reporting the
11839 event to the client, not while stopping lwps. No longer cancel
11840 finished single-steps here.
11841 (cancel_finished_single_step): Delete.
11842 (cancel_finished_single_steps): Delete.
11843
414a389f
PA
118442010-03-24 Pedro Alves <pedro@codesourcery.com>
11845
11846 * mem-break.c (enum bkpt_type): New.
11847 (struct breakpoint): New field `type'.
11848 (set_breakpoint_at): Change return type to struct breakpoint
11849 pointer. Set type to `other_breakpoint' by default.
11850 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11851 in the breakpoint list.
11852 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11853 (reinsert_breakpoint): Rename to ...
11854 (reinsert_raw_breakpoint): ... this.
11855 (reinsert_breakpoints_at): Adjust.
11856 * mem-break.h (struct breakpoint): Declare.
11857 (set_breakpoint_at): Change return type to struct breakpoint
11858 pointer.
11859
2280c721
PA
118602010-03-24 Pedro Alves <pedro@codesourcery.com>
11861
11862 * server.c (handle_query): Assign, not compare.
11863
d50171e4
PA
118642010-03-24 Pedro Alves <pedro@codesourcery.com>
11865
11866 Teach linux gdbserver to step-over-breakpoints.
11867
11868 * linux-low.c (can_hardware_single_step): New.
11869 (supports_breakpoints): New.
11870 (handle_extended_wait): If stopping threads, read the stop pc of
11871 the new cloned LWP.
11872 (get_pc): New.
11873 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11874 low target doesn't support retrieving the PC.
11875 (add_lwp): Set last_resume_kind to resume_continue.
11876 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11877 (linux_attach): Don't clear stop_expected. Set the lwp's
11878 last_resume_kind to resume_stop.
11879 (linux_detach_one_lwp): Don't check for removed breakpoints.
11880 (check_removed_breakpoint): Delete.
11881 (status_pending_p): Rename to ...
11882 (status_pending_p_callback): ... this. Don't check for removed
11883 breakpoints. Don't consider threads that are stopped from GDB's
11884 perspective.
11885 (linux_wait_for_lwp): Always read the stop_pc here.
11886 (cancel_breakpoint): New.
11887 (step_over_bkpt): New global.
11888 (linux_wait_for_event_1): Implement stepping over breakpoints.
11889 (gdb_wants_lwp_stopped): New.
11890 (gdb_wants_all_stopped): New.
11891 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11892 single-step traps here. Store the thread's last reported target
11893 wait status.
11894 (send_sigstop): Don't clear stop_expected. Always set it,
11895 instead.
11896 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11897 (cancel_finished_single_step): New.
11898 (cancel_finished_single_steps): New.
11899 (wait_for_sigstop): Don't cancel finished single-step traps here.
11900 (linux_resume_one_lwp): Don't check for removed breakpoints.
11901 Don't set `step' on non-hardware step archs.
11902 (linux_set_resume_request): Ignore resume_stop requests if already
11903 stopping or stopped. Set the lwp's last_resume_kind.
11904 (resume_status_pending_p): Don't check for removed breakpoints.
11905 (need_step_over_p): New.
11906 (start_step_over): New.
11907 (finish_step_over): New.
11908 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11909 requests. Clear the thread's last reported target waitstatus.
11910 Don't use the `suspended' flag. Don't consider pending breakpoints.
11911 (linux_resume): Start a step-over if necessary.
11912 (proceed_one_lwp): New.
11913 (proceed_all_lwps): New.
11914 (unstop_all_lwps): New.
11915 * linux-low.h (struct lwp_info): Rewrite comment for the
11916 `suspended' flag. Add the `stop_pc' field. Delete the
11917 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11918 Add `'last_resume_kind' and `need_step_over' fields.
11919 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11920 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11921 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11922 (set_raw_breakpoint_at): New.
11923 (set_breakpoint_at): Rewrite to use it.
11924 (reinsert_breakpoint_handler): Delete.
11925 (set_reinsert_breakpoint): New.
11926 (reinsert_breakpoint_by_bp): Delete.
11927 (delete_reinsert_breakpoints): New.
11928 (uninsert_breakpoint): Rewrite.
11929 (uninsert_breakpoints_at): New.
11930 (reinsert_breakpoint): Rewrite.
11931 (reinsert_breakpoints_at): New.
11932 (check_breakpoints): Rewrite.
11933 (breakpoint_here): New.
11934 (breakpoint_inserted_here): New.
11935 (check_mem_read): Adjust.
11936 * mem-break.h (breakpoints_supported, breakpoint_here)
11937 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11938 (reinsert_breakpoint_by_bp): Delete declaration.
11939 (delete_reinsert_breakpoints): Declare.
11940 (reinsert_breakpoint): Delete declaration.
11941 (reinsert_breakpoints_at): Declare.
11942 (uninsert_breakpoint): Delete declaration.
11943 (uninsert_breakpoints_at): Declare.
11944 (check_breakpoints): Adjust prototype.
11945 * server.h: Adjust include order.
11946 (struct thread_info): Declare here. Add a `last_status' field.
11947
30ba68cb
MS
119482010-03-23 Michael Snyder <msnyder@vmware.com>
11949
11950 * server.c (crc32): New function.
11951 (handle_query): Add handling for 'qCRC:' request.
11952
b9a881c2
PA
119532010-03-23 Pedro Alves <pedro@codesourcery.com>
11954
11955 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11956 lwp had been stopped by a watchpoint.
11957
e92d13d5
PA
119582010-03-16 Pedro Alves <pedro@codesourcery.com>
11959
11960 * server.h (internal_error): Declare.
11961 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11962 * utils.c (internal_error): New function.
11963
64daa791
AS
119642010-03-15 Andreas Schwab <schwab@redhat.com>
11965
11966 * configure.srv: Fix typo setting srv_regobj.
11967
f52cd8cd
PA
119682010-03-15 Pedro Alves <pedro@codesourcery.com>
11969
11970 * linux-low.c (fetch_register): Avoid passing a non string literal
11971 format to `error'.
11972 (usr_store_inferior_registers): Ditto.
11973
93ae6fdc
PA
119742010-03-14 Pedro Alves <pedro@codesourcery.com>
11975
11976 * linux-low.c (linux_write_memory): Bail out early if peeking
11977 memory failed.
11978
c3adc08c
PA
119792010-03-14 Pedro Alves <pedro@codesourcery.com>
11980
11981 * linux-low.h (struct lwp_info): New fields
11982 `stopped_by_watchpoint' and `stopped_data_address'.
11983 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11984 here, and cache them in the lwp object.
11985 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11986 directly.
11987 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11988 field.
11989 (linux_stopped_by_watchpoint): Rewrite.
11990 (linux_stopped_data_address): Rewrite.
11991
bce522a2
PA
119922010-03-06 Simo Melenius <simo.melenius@iki.fi>
11993
11994 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11995 switching the current inferior, not before.
11996
90884b2b
L
119972010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11998
11999 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
12000 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
12001 i386-linux.c and amd64-linux.c.
12002 (reg-i386.o): Removed.
12003 (reg-i386.c): Likewise.
12004 (reg-i386-linux.o): Likewise.
12005 (reg-i386-linux.c): Likewise.
12006 (reg-x86-64.o): Likewise.
12007 (reg-x86-64.c): Likewise.
12008 (reg-x86-64-linux.o): Likewise.
12009 (reg-x86-64-linux.c): Likewise.
12010 (i386.o): New.
12011 (i386.c): Likewise.
12012 (i386-linux.o): Likewise.
12013 (i386-linux.c): Likewise.
12014 (amd64.o): Likewise.
12015 (amd64.c): Likewise.
12016 (amd64-linux.o): Likewise.
12017 (amd64-linux.c): Likewise.
12018
12019 * configure.srv (srv_i386_regobj): New.
12020 (srv_i386_linux_regobj): Likewise.
12021 (srv_amd64_regobj): Likewise.
12022 (srv_amd64_linux_regobj): Likewise.
12023 (srv_i386_32bit_xmlfiles): Likewise.
12024 (srv_i386_64bit_xmlfiles): Likewise.
12025 (srv_i386_xmlfiles): Likewise.
12026 (srv_amd64_xmlfiles): Likewise.
12027 (srv_i386_linux_xmlfiles): Likewise.
12028 (srv_amd64_linux_xmlfiles): Likewise.
12029 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
12030 srv_xmlfiles to $srv_i386_xmlfiles.
12031 (i[34567]86-*-mingw32ce*): Likewise.
12032 (i[34567]86-*-mingw*): Likewise.
12033 (i[34567]86-*-nto*): Likewise.
12034 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
12035 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
12036 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
12037 (x86_64-*-linux*): Likewise.
12038
12039 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
12040 (init_registers_amd64_linux): New.
12041 (x86_arch_setup): Replace init_registers_x86_64_linux with
12042 init_registers_amd64_linux.
12043
193f13e6
MK
120442010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
12045
12046 * configure.ac: Check for libdl. If it is not available link against
12047 static libthread_db.
12048 * configure: Regenerate.
12049
85d721b8
PA
120502010-02-22 Pedro Alves <pedro@codesourcery.com>
12051
12052 PR9605
12053
12054 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
12055 handing a read watchpoint.
12056 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12057
6076632b
DE
120582010-02-12 Doug Evans <dje@google.com>
12059
12060 * linux-low.c (linux_supports_tracefork_flag): Document.
12061 (linux_look_up_symbols): Add comment.
12062
3327ccf7
L
120632010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12064
12065 * regcache.c (supply_register): Clear regcache if buf is NULL.
12066
0718675c 120672010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12068 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12069
12070 * inferiors.c (find_inferior): Add function documentation.
12071 (unloaded_dll): Handle the case where the unloaded dll has not
12072 been previously registered in the dll list.
12073
177321bd
DJ
120742010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12075
12076 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12077 (thumb2_breakpoint): New.
12078 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12079
2b009048
DJ
120802010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12081
12082 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12083 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12084 breakpoints.
12085
3be029c7
PA
120862010-01-21 Pedro Alves <pedro@codesourcery.com>
12087
12088 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12089
18f5de3b
JK
120902010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12091
12092 * linux-s390-low.c (s390_collect_ptrace_register)
12093 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12094
3743bb4f
DE
120952010-01-21 Doug Evans <dje@google.com>
12096
14ce3065
DE
12097 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12098 (PTRACE_ARG4_TYPE): New macro.
12099 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12100 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12101 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12102 (usr_store_inferior_registers): Ditto.
12103 (linux_read_memory, linux_write_memory): Ditto.
12104 (linux_test_for_tracefork): Ditto.
12105
3743bb4f
DE
12106 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12107 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12108
8b315be5
PA
121092010-01-21 Pedro Alves <pedro@codesourcery.com>
12110
12111 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12112 target.
12113
85492558
PA
121142010-01-21 Pedro Alves <pedro@codesourcery.com>
12115
12116 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12117 prototype to take a regcache. Adjust.
12118
442ea881
PA
121192010-01-20 Pedro Alves <pedro@codesourcery.com>
12120
12121 * regcache.h (struct thread_info): Forward declare.
12122 (struct regcache): New.
12123 (new_register_cache): Adjust prototype.
12124 (get_thread_regcache): Declare.
12125 (free_register_cache): Adjust prototype.
12126 (registers_to_string, registers_from_string): Ditto.
12127 (supply_register, supply_register_by_name, collect_register)
12128 (collect_register_as_string, collect_register_by_name): Ditto.
12129 * regcache.c (struct inferior_regcache_data): Delete.
12130 (get_regcache): Rename to ...
12131 (get_thread_regcache): ... this. Adjust. Switch inferior before
12132 fetching registers.
12133 (regcache_invalidate_one): Adjust.
12134 (regcache_invalidate): Fix prototype.
12135 (new_register_cache): Return the new register cache.
12136 (free_register_cache): Change prototype.
12137 (realloc_register_cache): Adjust.
12138 (registers_to_string): Change prototype to take a regcache. Adjust.
12139 (registers_from_string): Ditto.
12140 (register_data): Ditto.
12141 (supply_register): Ditto.
12142 (supply_register_by_name): Ditto.
12143 (collect_register): Ditto.
12144 (collect_register_as_string): Ditto.
12145 (collect_register_by_name): Ditto.
12146 * server.c (process_serial_event): Adjust.
12147 * linux-low.h (regset_fill_func, regset_store_func): Change
12148 prototype.
12149 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12150 Change prototype.
12151 * linux-low.c (get_stop_pc): Adjust.
12152 (check_removed_breakpoint): Adjust.
12153 (linux_wait_for_event): Adjust.
12154 (linux_resume_one_lwp): Adjust.
12155 (fetch_register): Add regcache parameter. Adjust.
12156 (usr_store_inferior_registers): Ditto.
12157 (regsets_fetch_inferior_registers): Ditto.
12158 (regsets_store_inferior_registers): Ditto.
12159 (linux_fetch_registers, linux_store_registers): Ditto.
12160 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12161 regcache. Adjust.
43aaf8b6
PA
12162 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12163 Ditto.
442ea881
PA
12164 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12165 prototype to take a regcache.
12166 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12167 * remote-utils.c (convert_ascii_to_int, outreg)
12168 (prepare_resume_reply): Change prototype to take a regcache.
12169 Adjust.
12170 * target.h (struct target_ops) <fetch_registers, store_registers>:
12171 Change prototype to take a regcache.
12172 (fetch_inferior_registers, store_inferior_registers): Change
12173 prototype to take a regcache. Adjust.
12174 * proc-service.c (ps_lgetregs): Adjust.
12175 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12176 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12177 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12178 take a regcache. Adjust.
12179 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12180 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12181 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12182 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12183 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12184 (cris_cannot_fetch_register):
12185 (cris_breakpoint_at): Change prototype to take a regcache.
12186 Adjust.
12187 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12188 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12189 to take a regcache. Adjust.
12190 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12191 Adjust.
12192 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12193 take a regcache. Adjust.
12194 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12195 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12196 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12197 * linux-mips-low.c (mips_get_pc):
12198 (mips_set_pc): Change prototype to take a regcache. Adjust.
12199 (mips_reinsert_addr): Adjust.
12200 (mips_collect_register): Change prototype to take a regcache.
12201 Adjust.
12202 (mips_supply_register):
12203 (mips_collect_register_32bit, mips_supply_register_32bit)
12204 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12205 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12206 * linux-ppc-low.c (ppc_supply_ptrace_register)
12207 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12208 (parse_spufs_run): Adjust.
12209 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12210 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12211 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12212 take a regcache. Adjust.
12213 * linux-s390-low.c (s390_collect_ptrace_register)
12214 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12215 (s390_set_pc): Change prototype to take a regcache. Adjust.
12216 (s390_arch_setup): Adjust.
12217 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12218 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12219 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12220 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12221 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12222 regcache. Adjust.
12223 (sparc_breakpoint_at): Adjust.
12224 * linux-xtensa-low.c (xtensa_fill_gregset):
12225 (xtensa_store_gregset):
12226 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12227 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12228 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12229 prototype to take a regcache. Adjust.
12230 * win32-arm-low.c (arm_fetch_inferior_register)
12231 (arm_store_inferior_register): Change prototype to take a
12232 regcache. Adjust.
12233 * win32-i386-low.c (i386_fetch_inferior_register)
12234 (i386_store_inferior_register): Change prototype to take a
12235 regcache. Adjust.
12236 * win32-low.c (child_fetch_inferior_registers)
12237 (child_store_inferior_registers): Change prototype to take a
12238 regcache. Adjust.
12239 (win32_wait): Adjust.
12240 (win32_fetch_inferior_registers): Change prototype to take a
12241 regcache. Adjust.
12242 (win32_store_inferior_registers): Adjust.
12243 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12244 store_inferior_register>: Change prototype to take a regcache.
12245
60c3d7b0
DE
122462010-01-20 Doug Evans <dje@google.com>
12247
12248 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12249 #ifdef.
12250 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12251 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12252
dc146f7c
VP
122532010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12254
12255 * linux-low.c (linux_core_of_thread): New.
12256 (compare_ints, show_process, list_threads): New.
12257 (linux_qxfer_osdata): Report threads and cores.
12258 (linux_target_op): Register linux_core_of_thread.
12259 * remote-utils.c (prepare_resume_reply): Report the core.
12260 (buffer_xml_printf): Support %d specifier.
12261 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12262 New.
12263 (handle_query): Handle qXfer:threads. Announce availability
12264 thereof.
12265 * target.h (struct target_ops): New field core_of_thread.
12266
7803799a
UW
122672010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12268
12269 * Makefile.in (clean): Remove new generated files.
12270 (reg-s390.o, reg-s390.c): Remove rules.
12271 (reg-s390x.o, reg-s390x.c): Likewise.
12272 (s390-linux32.o, s390-linux32.c): Add rules.
12273 (s390-linux64.o, s390-linux64.c): Likewise.
12274 (s390x-linux64.o, s390x-linux64.c): Likewise.
12275 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12276 * linux-s390-low.c: Include <elf.h>.
12277 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12278 (init_registers_s390): Remove prototype.
12279 (init_registers_s390x): Likewise.
12280 (init_registers_s390_linux32): Add prototype.
12281 (init_registers_s390_linux64): Likewise.
12282 (init_registers_s390x_linux64): Likewise.
12283 (s390_num_regs_3264): New define.
12284 (s390_regmap_3264): New global variable.
12285 (s390_cannot_fetch_register): Remove obsolete check.
12286 (s390_cannot_store_register): Likewise.
12287 (s390_collect_ptrace_register): Handle upper/lower register halves.
12288 (s390_supply_ptrace_register): Likewise.
12289 (s390_fill_gregset): Update to register number changes.
12290 (s390_get_hwcap): New routine.
12291 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12292 Install appropriate regmap and register set.
12293
6e7ffa39
JB
122942010-01-01 Joel Brobecker <brobecker@adacore.com>
12295
12296 * server.c (gdbserver_version): Update copyright year to 2010.
12297 * gdbreplay.c (gdbreplay_version): Likewise.
12298
957f3f49
DE
122992009-12-28 Doug Evans <dje@google.com>
12300
12301 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12302 elf/external.h. Include <elf.h> instead but only if necessary.
12303
ca5c370d
PA
123042009-12-28 Pedro Alves <pedro@codesourcery.com>
12305
12306 * linux-low.c (linux_remove_process): Remove `detaching'
12307 parameter. Don't release/detach from thread_db here.
12308 (linux_kill): Release/detach from thread_db here, ...
12309 (linux_detach): ... and here, before actually detaching.
12310 (linux_wait_1): ... and here, when a process exits.
12311 * thread-db.c (any_thread_of): New.
12312 (thread_db_free): Switch the current inferior to a thread of the
12313 passed in process.
12314
4ee62156
DE
123152009-12-21 Doug Evans <dje@google.com>
12316
d90e6a88
DE
12317 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12318
c5f62d5f
DE
12319 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12320 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12321 warning ifndef __NR_tkill. Move setting of errno there too.
12322 Delete unnecessary resetting of errno after syscall.
12323 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12324
10e86dd7
DE
12325 * configure.ac: Check for dladdr.
12326 * config.in: Regenerate.
12327 * configure: Regenerate.
12328 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12329 (try_thread_db_load): Update.
12330
4ee62156
DE
12331 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12332
00f515da
DE
123332009-12-18 Doug Evans <dje@google.com>
12334
e9464885
DE
12335 * event-loop.c: Include unistd.h if it exists.
12336
07d4f67e
DE
12337 * linux-low.c (my_waitpid): Move definition away from being in
12338 between linux_tracefork_child/linux_test_for_tracefork.
12339
00f515da
DE
12340 * gdb_proc_service.h (psaddr_t): Fix type.
12341 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12342 signature to match glibc.
12343
1de1badb
DE
123442009-12-16 Doug Evans <dje@google.com>
12345
12346 * linux-low.c (linux_read_memory): Fix argument to read.
12347
aeeb81d1
PA
123482009-11-26 Pedro Alves <pedro@codesourcery.com>
12349
12350 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12351 events, don't leave current_inferior pointing at null.
12352
10357975
PA
123532009-11-26 Pedro Alves <pedro@codesourcery.com>
12354
12355 * win32-low.c (LOG): Delete.
12356 (OUTMSG): Output to stderr.
12357 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12358 on compile time LOG macro.
12359 (win32_wait): Fix debug output.
12360
cf6e3471
PA
123612009-11-26 Pedro Alves <pedro@codesourcery.com>
12362
12363 * win32-low.c (win32_add_one_solib): If the dll name is
12364 "ntdll.dll", prepend the system directory to the dll path.
12365
0c85e18e
MK
123662009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12367
12368 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12369
9ac544ce 123702009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12371 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12372
12373 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12374 * configure.ac: Check for __mcoldfire__ and set
12375 gdb_cv_m68k_is_coldfire.
12376 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12377 reg-cf.o and reg-m68k.o.
12378 * configure: Regenerated.
12379
fd7dd3e6
PA
123802009-11-16 Pedro Alves <pedro@codesourcery.com>
12381
12382 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12383 Pass it to thread_db_free.
12384 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12385 proper `detaching' argument to linux_remove_process.
12386 * linux-low.h (thread_db_free): Add `detaching' parameter.
12387 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12388 to thread_db_free.
12389 (thread_db_free): Add `detaching' parameter. Only
12390 call td_ta_clear_event if detaching from process.
12391
75aa492e
MK
123922009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12393
12394 * thread-db.c (thread_db_free): Fix typo.
12395
21e1bee4
PP
123962009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12397
12398 PR gdb/10838
12399 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12400
8838b45e
NS
124012009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12402
12403 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12404 with an i686 compiler.
12405 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12406 needed.
12407 * configure: Rebuilt.
12408
8a35fb51
SL
124092009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12410
12411 PR gdb/10783
12412
12413 * server.c (handle_search_memory_1): Correct read_addr initialization
12414 in loop for searching subsequent chunks.
12415
96f15937
PP
124162009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12417
12418 * configure.ac: New --with-libthread-db option.
12419 * thread-db.c: Allow direct dependence on libthread_db.
12420 (thread_db_free): Adjust.
12421 * config.in: Regenerate.
12422 * configure: Likewise.
889bf7c5 12423
5f7d1694
PP
124242009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12425
12426 PR gdb/10757
12427 * thread-db.c (attach_thread): New function.
12428 (maybe_attach_thread): Return success/failure.
12429 (find_new_threads_callback): Adjust.
889bf7c5
PA
12430 (thread_db_find_new_threads): Loop until no new threads.
12431
88e3b899
PA
124322009-10-13 Pedro Alves <pedro@codesourcery.com>
12433
12434 * proc-service.c (ps_lgetregs): Formatting.
12435
cdbfd419
PP
124362009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12437
12438 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12439 * configure.ac: Adjust.
12440 * linux-low.h (struct process_info_private): Move members to struct
12441 thread_db.
12442 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12443 * linux-low.c (linux_remove_process): Adjust.
12444 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12445 * server.c (handle_query): Move code ...
12446 (handle_monitor_command): ... here. New function.
12447 * target.h (struct target_ops): New member.
12448 * thread-db.c (struct thread_db): New.
12449 (libthread_db_search_path): New variable.
12450 (thread_db_create_event, thread_db_enable_reporting)
12451 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12452 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12453 (try_thread_db_load_1, dladdr_to_soname): New functions.
12454 (try_thread_db_load, thread_db_load_search): New functions.
12455 (thread_db_init): Search for libthread_db.
12456 (thread_db_free): New function.
12457 (thread_db_handle_monitor_command): Likewise.
12458 * config.in: Regenerate.
12459 * configure: Regenerate.
889bf7c5 12460
4168d2d6
UW
124612009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12462
12463 * spu-low.c (spu_kill): Wait for inferior to terminate.
12464 Call clear_inferiors.
12465 (spu_detach): Call clear_inferiors.
12466
81ecdfbb
RW
124672009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12468
12469 * aclocal.m4: Regenerate.
12470 * config.in: Likewise.
12471 * configure: Likewise.
12472
0b9ff2c0
UW
124732009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12474
12475 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12476 (parse_spufs_run): New function.
12477 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12478 (ppc_breakpoint_at): Handle SPU breakpoints.
12479
efcbbd14
UW
124802009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12481
12482 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12483 (SPUFS_MAGIC): Define.
12484 (spu_enumerate_spu_ids): New function.
12485 (linux_qxfer_spu): New function.
12486 (linux_target_ops): Install linux_qxfer_spu.
12487
f4d9bade
UW
124882009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12489
12490 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12491 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12492 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12493 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12494 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12495 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12496 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12497 (init_registers_powerpc_cell32l): Add prototype.
12498 (init_registers_powerpc_cell64l): Likewise.
12499 (ppc_arch_setup): Detect Cell/B.E. architecture.
12500
96e946ca
RW
125012009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12502
12503 * Makefile.in (datarootdir): New variable.
12504
58d6951d
DJ
125052009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12506
12507 * linux-low.c (linux_write_memory): Update debugging output.
12508 * Makefile.in (clean): Add new descriptions.
12509 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12510 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12511 * configure.srv: Add new files for arm*-*-linux*.
12512 * linux-arm-low.c: Add new declarations.
12513 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12514 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12515 (HWCAP_VFPv3D16): New.
12516 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12517 instead of __IWMMXT__.
12518 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12519 (arm_arch_setup): New.
12520 (target_regsets): Remove #ifdef. Add VFP regset.
12521 (the_low_target): Use arm_arch_setup.
12522
12b42a12
DJ
125232009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12524
12525 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12526 the main thread again.
12527
ac8c974e
AR
125282009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12529
12530 Adding Neutrino gdbserver.
12531 * configure: Regenerated.
12532 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12533 * configure.srv (i[34567]86-*-nto*): New target.
12534 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12535 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12536 (nto_comctrl) [__QNX__]: New function.
12537 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12538
4424e0c3 125392009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12540
12541 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12542 srv_tgtobj.
12543
912cf4ba
PA
125442009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12545 Pedro Alves <pedro@codesourcery.com>
12546
12547 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12548 don't support CONTEXT_EXTENDED_REGISTERS.
12549 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12550 (the_low_target): Install them.
12551 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12552 failing with ERROR_PIPE_NOT_CONNECTED.
12553
aa5ca48f
DE
125542009-06-30 Doug Evans <dje@google.com>
12555 Pierre Muller <muller@ics.u-strasbg.fr>
12556
12557 Add h/w watchpoint support to x86-linux, win32-i386.
12558 * Makefile.in (SFILES): Add i386-low.c
12559 (i386_low_h): Define.
12560 (i386-low.o): Add dependencies.
12561 (linux-x86-low.o): Add i386-low.h dependency.
12562 (win32-i386-low.o): Ditto.
12563 * i386-low.c: New file.
12564 * i386-low.h: New file.
12565 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12566 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12567 * linux-low.c (linux_add_process): Initialize arch_private.
12568 (linux_remove_process): Free arch_private.
12569 (add_lwp): Initialize arch_private.
12570 (delete_lwp): Free arch_private.
12571 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12572 provided.
12573 * linux-low.h (process_info_private): New member arch_private.
12574 (lwp_info): New member arch_private.
12575 (linux_target_ops): New members new_process, new_thread,
12576 prepare_to_resume.
12577 (ptid_of): New macro.
12578 * linux-x86-low.c: Include stddef.h, i386-low.h.
12579 (arch_process_info): New struct.
12580 (arch_lwp_info): New struct.
12581 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12582 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12583 (i386_dr_low_get_status): New function.
12584 (x86_insert_point, x86_remove_point): New functions.
12585 (x86_stopped_by_watchpoint): New function.
12586 (x86_stopped_data_address): New function.
12587 (x86_linux_new_process, x86_linux_new_thread): New functions.
12588 (x86_linux_prepare_to_resume): New function.
12589 (the_low_target): Add entries for insert_point, remove_point,
12590 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12591 prepare_to_resume.
12592 * server.c (debug_hw_points): New global.
12593 (monitor_show_help): Document set debug-hw-points.
12594 (handle_query): Process "set debug-hw-points".
12595 * server.h (debug_hw_points): Declare.
12596 (paddress): Declare.
12597 * utils.c (NUMCELLS, CELLSIZE): New macros.
12598 (get_sell, xsnprintf, paddress): New functions.
12599 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12600 remove_point, stopped_by_watchpoint, stopped_data_address.
12601 * win32-i386-low.c: Include i386-low.h.
12602 (debug_reg_state): Replaces dr.
12603 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12604 (i386_dr_low_get_status): New function.
12605 (i386_insert_point, i386_remove_point): New functions.
12606 (i386_stopped_by_watchpoint): New function.
12607 (i386_stopped_data_address): New function.
12608 (i386_initial_stuff): Update.
12609 (get_thread_context,set_thread_context,i386_thread_added): Update.
12610 (the_low_target): Add entries for insert_point,
12611 remove_point, stopped_by_watchpoint, stopped_data_address.
12612 * win32-low.c (win32_insert_watchpoint): New function.
12613 (win32_remove_watchpoint): New function.
12614 (win32_stopped_by_watchpoint): New function.
12615 (win32_stopped_data_address): New function.
12616 (win32_target_ops): Add entries for insert_watchpoint,
12617 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12618 * win32-low.h (win32_target_ops): New members insert_point,
12619 remove_point, stopped_by_watchpoint, stopped_data_address.
12620
d993e290
PA
126212009-06-25 Pedro Alves <pedro@codesourcery.com>
12622
12623 * server.c (process_serial_event): Re-return unsupported, not
12624 error, if the type isn't recognized. Re-allow supporting only
12625 insert or remove packets. Also call require_running for
12626 breakpoints. Add missing break statement to default case. Tidy.
12627 * target.h (struct target_ops): Rename insert_watchpoint to
12628 insert_point, and remove_watchpoint to remove_point.
12629
12630 * linux-low.h (struct linux_target_ops): Likewise.
12631 * linux-low.c (linux_insert_watchpoint): Rename to ...
12632 (linux_insert_point): ... this. Adjust.
12633 (linux_remove_watchpoint): Rename to ...
12634 (linux_remove_point): ... this. Adjust.
12635 (linux_target_ops): Adjust.
12636 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12637 (cris_insert_point): ... this.
12638 (cris_remove_watchpoint): Rename to ...
12639 (cris_remove_point): ... this.
12640 (the_low_target): Adjust.
12641
0f54c268
PM
126422009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12643
12644 * server.c (handle_v_kill): Pass signal_pid to
12645 kill_inferior if multi_process is zero.
12646
c6314022
AR
126472009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12648
12649 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12650 * target.h (target_ops): Comment for *_watchpoint to make it clear
12651 the functions can get types '0' and '1'.
12652
4463ce24
AR
126532009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12654
12655 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12656 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12657 * regcache.c (get_regcache): Likewise.
12658 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12659 * win32-low.c (child_fetch_inferior_registers): Remove check for
12660 regno 0.
12661
cf8fd78b
PA
126622009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12663 Pedro Alves <pedro@codesourcery.com>
12664
12665 * target.h (struct target_ops) <supports_multi_process>: New
12666 callback.
12667 (target_supports_multi_process): New.
12668 * server.c (handle_query): Even if GDB reports support, only
12669 enable multi-process if the target also supports it. Report
12670 multi-process support only if the target backend supports it.
12671 * linux-low.c (linux_supports_multi_process): New function.
12672 (linux_target_ops): Install it as target_supports_multi_process
12673 callback.
12674
47c0c975
DE
126752009-05-24 Doug Evans <dje@google.com>
12676
e09875d4
DE
12677 Global renaming of find_thread_pid to find_thread_ptid.
12678 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12679 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12680 All callers updated.
12681
e27d73f6
DE
12682 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12683 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12684 directly.
12685
47c0c975
DE
12686 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12687 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12688 (linux_resume_one_lwp): Ditto.
12689
2acc282a
DE
126902009-05-23 Doug Evans <dje@google.com>
12691
12692 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12693 from struct inferior_list_entry * to struct lwp_info *.
12694 All callers updated.
12695
9f1036c1
DE
126962009-05-13 Doug Evans <dje@google.com>
12697
12698 * linux-x86-low.c: Don't include assert.h.
12699 (x86_siginfo_fixup): Use fatal, not assert.
12700 (x86_arch_setup): Fix comment.
12701
d0722149
DE
127022009-05-12 Doug Evans <dje@google.com>
12703
12704 Biarch support for i386/amd64 gdbserver.
12705 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12706 Add linux-x86-low.c.
12707 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12708 (linux-x86-low.o): Add.
12709 * linux-x86-64-low.c: Delete.
12710 * linux-i386-low.c: Delete.
12711 * linux-x86-low.c: New file.
12712 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12713 linux-x86-low.o.
12714 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12715 linux-x86-low.o.
12716 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12717 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12718 (linux_child_pid_to_exec_file): New function.
12719 (elf_64_header_p, elf_64_file_p): New functions.
12720 (siginfo_fixup): New function.
12721 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12722 give target a chance to convert layout.
12723 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12724 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12725
fdeb2a12
DE
127262009-05-07 Doug Evans <dje@google.com>
12727
12728 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12729 (regsets_store_inferior_registers): Ditto.
12730
a6dbe5df
PA
127312009-05-06 Pedro Alves <pedro@codesourcery.com>
12732
12733 PR server/10048
12734
12735 * linux-low.c (must_set_ptrace_flags): Delete.
12736 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12737 of the global.
12738 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12739 `lwp->must_set_ptrace_flags' instead.
ba42693b 12740 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12741 (linux_wait_1): ... not here.
12742
5091eb23
DE
127432009-04-30 Doug Evans <dje@google.com>
12744
9f767825
DE
12745 * inferiors.c (started_inferior_callback): New function.
12746 (attached_inferior_callback): New function.
12747 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12748 * server.c (print_started_pid, print_attached_pid): New functions.
12749 (detach_or_kill_for_exit): New function.
12750 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12751 * server.h (have_started_inferiors_p): Declare.
12752 (have_attached_inferiors_p): Declare.
12753
5091eb23
DE
12754 * inferiors.c (remove_process): Fix memory leak, free process.
12755 * linux-low.c (linux_remove_process): New function.
12756 (linux_kill): Call it instead of remove_process.
12757 (linux_detach, linux_wait_1): Ditto.
12758
155c8968
PA
127592009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12760
12761 * configure.srv: Add x86 Windows CE target.
12762
7fe519cb
UW
127632009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12764
12765 * inferiors.c (get_thread_process): Make global.
12766 * server.h (get_thread_process): Add prototype.
12767 * thread-db.c (find_one_thread): Use get_thread_process
12768 instead of current_process.
12769 (thread_db_get_tls_address): Do not crash if called when
12770 thread layer is not yet initialized.
12771
5472f405
UW
127722009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12773
12774 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12775 * spu-low.c (current_tid): Rename to ...
12776 (current_ptid): ... this.
12777 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12778 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12779 ptid_get_lwp (current_ptid) instead of current_tid.
12780 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12781 instead of current_tid. Use find_process_pid to verify pid
12782 argument is valid. Pass proper argument to remove_process.
12783 (spu_thread_alive): Compare current_ptid instead of current_tid.
12784 (spu_resume): Likewise.
12785
55ac2b99
PA
127862009-04-02 Pedro Alves <pedro@codesourcery.com>
12787
12788 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12789 variable.
12790
95954743
PA
127912009-04-01 Pedro Alves <pedro@codesourcery.com>
12792
12793 Implement the multiprocess extensions, and add linux multiprocess
12794 support.
12795
12796 * server.h (ULONGEST): Declare.
12797 (struct ptid, ptid_t): New.
12798 (minus_one_ptid, null_ptid): Declare.
12799 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12800 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12801 (struct inferior_list_entry): Change `id' type from unsigned from
12802 to ptid_t.
12803 (struct sym_cache, struct breakpoint, struct
12804 process_info_private): Forward declare.
12805 (struct process_info): Declare.
12806 (current_process): Declare.
12807 (all_processes): Declare.
12808 (initialize_inferiors): Declare.
12809 (add_thread): Adjust to use ptid_t.
12810 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12811 (add_process, remove_process, find_thread_pid): Declare.
12812 (find_inferior_id): Adjust to use ptid_t.
12813 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12814 (multi_process): Declare.
12815 (push_event): Adjust to use ptid_t.
12816 (read_ptid, write_ptid): Declare.
12817 (prepare_resume_reply): Adjust to use ptid_t.
12818 (clear_symbol_cache): Declare.
12819 * inferiors.c (all_processes): New.
12820 (null_ptid, minus_one_ptid): New.
12821 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12822 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12823 (add_thread): Change unsigned long to ptid. Remove gdb_id
12824 parameter. Adjust.
12825 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12826 (gdb_id_to_thread): Rename to ...
12827 (find_thread_pid): ... this. Change unsigned long to ptid.
12828 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12829 (loaded_dll, pull_pid_from_list): Adjust.
12830 (add_process, remove_process, find_process_pid)
12831 (get_thread_process, current_process, initialize_inferiors): New.
12832 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12833 (struct target_waitstatus) <related_pid>: Ditto.
12834 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12835 return type to int.
12836 (struct target_ops) <join>: Add `pid' argument.
12837 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12838 (struct target_ops) <wait>: Add `ptid' field. Change return type
12839 to ptid.
12840 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12841 (mywait): Add `ptid' argument. Change return type to ptid_t.
12842 (target_pid_to_str): Declare.
12843 * target.c (set_desired_inferior): Adjust to use ptids.
12844 (mywait): Add new `ptid' argument. Adjust.
12845 (target_pid_to_str): New.
12846 * mem-break.h (free_all_breakpoints): Declare.
12847 * mem-break.c (breakpoints): Delelete.
12848 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12849 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12850 to use per-process breakpoint list.
12851 (free_all_breakpoints): New.
12852 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12853 (symbol_cache, all_symbols_looked_up): Delete.
12854 (hexchars): New.
12855 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12856 read_ptid): New.
12857 (prepare_resume_reply): Change ptid argument's type from unsigned
12858 long to ptid_t. Adjust. Implement W;process and X;process.
12859 (free_sym_cache, clear_symbol_cache): New.
12860 (look_up_one_symbol): Adjust to per-process symbol cache. *
12861 * server.c (cont_thread, general_thread, step_thread): Change type
12862 to ptid_t.
12863 (attached): Delete.
12864 (multi_process): New.
12865 (last_ptid): Change type to ptid_t.
12866 (struct vstop_notif) <ptid>: Change type to ptid_t.
12867 (queue_stop_reply, push_event): Change `ptid' argument's type to
12868 ptid_t.
12869 (discard_queued_stop_replies): Add `pid' argument.
12870 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12871 changes. Don't reference the `attached' global.
12872 (attach_inferior): Adjust to mywait interface changes.
12873 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12874 features. Handle and report "multiprocess+". Handle
12875 "qAttached:PID".
12876 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12877 changes.
12878 (handle_v_kill): New.
12879 (handle_v_stopped): Adjust to use target_pid_to_str.
12880 (handle_v_requests): Allow multiple attaches and runs when
12881 multiprocess extensions are in effect. Handle "vKill".
12882 (myresume): Adjust to use ptids.
12883 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12884 (handle_status): Adjust to discard_queued_stop_replies interface
12885 change.
12886 (first_thread_of, kill_inferior_callback)
12887 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12888 (main): Call initialize_inferiors. Adjust to use ptids, killing
12889 and detaching from all inferiors. Handle multiprocess packet
12890 variants.
12891 * linux-low.h: Include gdb_proc_service.h.
12892 (struct process_info_private): New.
12893 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12894 <lwpid_of>: Use ptid_get_lwp.
12895 (get_lwp_thread): Adjust.
12896 (struct lwp_info): Add `dead' member.
12897 (find_lwp_pid): Declare.
12898 * linux-low.c (thread_db_active): Delete.
12899 (new_inferior): Adjust comment.
12900 (inferior_pid): Delete.
12901 (linux_add_process): New.
12902 (handle_extended_wait): Adjust.
12903 (add_lwp): Change unsigned long to ptid.
12904 (linux_create_inferior): Add process to processes table. Adjust
12905 to use ptids. Don't set new_inferior here.
12906 (linux_attach_lwp): Rename to ...
12907 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12908 it. Adjust to use ptids.
12909 (linux_attach_lwp): New.
12910 (linux_attach): Add process to processes table. Don't set
12911 new_inferior here.
12912 (struct counter): New.
12913 (second_thread_of_pid_p, last_thread_of_process_p): New.
12914 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12915 multiple processes.
12916 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12917 processes. Remove process from process table.
12918 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12919 to multiple processes.
12920 (any_thread_of): New.
12921 (linux_detach): Add `pid' argument, and handle it. Remove process
12922 from processes table.
12923 (linux_join): Add `pid' argument. Handle it.
12924 (linux_thread_alive): Change unsighed long argument to ptid_t.
12925 Consider dead lwps as not being alive.
12926 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12927 threads we're not interested in.
12928 (same_lwp, find_lwp_pid): New.
12929 (linux_wait_for_lwp): Change `pid' argument's type from int to
12930 ptid_t. Adjust.
12931 (linux_wait_for_event): Rename to ...
12932 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12933 from int to ptid_t. Adjust.
12934 (linux_wait_for_event): New.
12935 (linux_wait_1): Add `ptid' argument. Change return type to
12936 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12937 that exit from the process table.
12938 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12939 Adjust.
12940 (mark_lwp_dead): New.
12941 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12942 stopping all threads, mark its main lwp as dead.
12943 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12944 ptids.
12945 (fetch_register, usr_store_inferior_registers)
12946 (regsets_fetch_inferior_registers)
12947 (regsets_store_inferior_registers, linux_read_memory)
12948 (linux_write_memory): Inline `inferior_pid'.
12949 (linux_look_up_symbols): Adjust to use per-process
12950 `thread_db_active'.
12951 (linux_request_interrupt): Adjust to use ptids.
12952 (linux_read_auxv): Inline `inferior_pid'.
12953 (initialize_low): Don't reference thread_db_active.
12954 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12955 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12956 (ps_getpid): Return the pid of the current inferior.
12957 * thread-db.c (proc_handle, thread_agent): Delete.
12958 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12959 per-process data.
12960 (find_one_thread): Change argument type to ptid_t. Adjust to
12961 per-process data.
12962 (maybe_attach_thread): Adjust to per-process data and ptids.
12963 (thread_db_find_new_threads): Ditto.
12964 (thread_db_init): Ditto.
12965 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12966 processes table. Adjust to use ptids.
12967 (spu_kill, spu_detach): Adjust interface. Remove process from
12968 processes table.
12969 (spu_join, spu_thread_alive): Adjust interface.
12970 (spu_wait): Adjust interface. Remove process from processes
12971 table. Adjust to use ptids.
12972 * win32-low.c (current_inferior_tid): Delete.
12973 (current_inferior_ptid): New.
12974 (debug_event_ptid): New.
12975 (thread_rec): Take a ptid. Adjust.
12976 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12977 (child_delete_thread): Ditto.
12978 (do_initial_child_stuff): Add `attached' argument. Add process to
12979 processes table.
12980 (child_fetch_inferior_registers, child_store_inferior_registers):
12981 Adjust.
12982 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12983 (win32_attach): Pass 1 to do_initial_child_stuff.
12984 (win32_kill): Adjust interface. Remove process from processes
12985 table.
12986 (win32_detach): Ditto.
12987 (win32_join): Adjust interface.
12988 (win32_thread_alive): Take a ptid.
12989 (win32_resume): Adjust to use ptids.
12990 (get_child_debug_event): Ditto.
12991 (win32_wait): Adjust interface. Remove exiting process from
12992 processes table.
12993
bd99dc85
PA
129942009-04-01 Pedro Alves <pedro@codesourcery.com>
12995
12996 Non-stop mode support.
12997
12998 * server.h (non_stop): Declare.
12999 (gdb_client_data, handler_func): Declare.
13000 (delete_file_handler, add_file_handler, start_event_loop):
13001 Declare.
13002 (handle_serial_event, handle_target_event, push_event)
13003 (putpkt_notif): Declare.
13004 * target.h (enum resume_kind): New.
13005 (struct thread_resume): Replace `step' field by `kind' field.
13006 (TARGET_WNOHANG): Define.
13007 (struct target_ops) <wait>: Add `options' argument.
13008 <supports_non_stop, async, start_non_stop>: New fields.
13009 (target_supports_non_stop, target_async): New.
13010 (start_non_stop): Declare.
13011 (mywait): Add `options' argument.
13012 * target.c (mywait): Add `options' argument. Print child exit
13013 notifications here.
13014 (start_non_stop): New.
13015 * server.c (non_stop, own_buf, mem_buf): New globals.
13016 (struct vstop_notif): New.
13017 (notif_queue): New global.
13018 (queue_stop_reply, push_event, discard_queued_stop_replies)
13019 (send_next_stop_reply): New.
13020 (start_inferior): Adjust to use resume_kind. Adjust to mywait
13021 interface changes.
13022 (attach_inferior): In non-stop mode, don't wait for the target
13023 here.
13024 (handle_general_set): Handle QNonStop.
13025 (handle_query): When handling qC, return the current general
13026 thread, instead of the first thread of the list.
13027 (handle_query): If the backend supports non-stop mode, include
13028 QNonStop+ in the qSupported query response.
13029 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
13030 and non-stop mode.
13031 (handle_v_attach, handle_v_run): Handle non-stop mode.
13032 (handle_v_stopped): New.
13033 (handle_v_requests): Report support for vCont;t. Handle vStopped.
13034 (myresume): Adjust to use resume_kind. Handle non-stop.
13035 (queue_stop_reply_callback): New.
13036 (handle_status): Handle non-stop mode.
13037 (main): Clear non_stop flag on reconnection. Use the event-loop.
13038 Refactor serial protocol handling from here ...
13039 (process_serial_event): ... to this new function. When GDB
13040 selects any thread, select one here. In non-stop mode, wait until
13041 GDB acks all pending events before exiting.
13042 (handle_serial_event, handle_target_event): New.
13043 * remote-utils.c (remote_open): Install remote_desc in the event
13044 loop.
13045 (remote_close): Remove remote_desc from the event loop.
13046 (putpkt_binary): Rename to...
13047 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
13048 (putpkt_binary): New as wrapper around putpkt_binary_1.
13049 (putpkt_notif): New.
13050 (prepare_resume_reply): In non-stop mode, don't change the
13051 general_thread.
13052 * event-loop.c: New.
13053 * Makefile.in (OBJ): Add event-loop.o.
13054 (event-loop.o): New rule.
13055
13056 * linux-low.h (pid_of): Moved here.
13057 (lwpid_of): New.
13058 (get_lwp_thread): Use lwpid_of.
13059 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13060 * linux-low.c (pid_of): Delete.
13061 (inferior_pid): Use lwpid_of.
13062 (linux_event_pipe): New.
13063 (target_is_async_p): New.
13064 (delete_lwp): New.
13065 (handle_extended_wait): Use lwpid_of.
13066 (add_lwp): Don't set lwpid field.
13067 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13068 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13069 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13070 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13071 first. Adjust to linux_wait_for_event interface changes. Use
13072 lwpid_of.
13073 (linux_detach): Don't delete the main lwp here.
13074 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13075 (status_pending_p): Don't consider explicitly suspended lwps.
13076 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13077 pointer. Add OPTIONS argument. Change return type to int. Use
13078 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13079 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13080 pointer. Add status pointer argument. Return a pid instead of a
13081 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13082 changes. In non-stop mode, don't switch to a random thread.
13083 (linux_wait): Rename to...
13084 (linux_wait_1): ... this. Add target_options argument, and handle
13085 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13086 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13087 clean exit and signal exit code. Don't stop all threads in
13088 non-stop mode. In all-stop mode, only stop all threads when
13089 reporting a stop to GDB. Handle explicit thread stop requests.
13090 (async_file_flush, async_file_mark): New.
13091 (linux_wait): New.
13092 (send_sigstop): Use lwpid_of.
13093 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13094 interface changes. In non-stop mode, don't switch to a random
13095 thread.
13096 (linux_resume_one_lwp): Use lwpid_of.
13097 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13098 (linux_resume_one_thread): ... this. Handle resume_stop. In
13099 non-stop mode, don't look for pending flag in all threads.
13100 (resume_status_pending_p): Don't consider explicitly suspended
13101 threads.
13102 (my_waitpid): Reimplement. Emulate __WALL.
13103 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13104 Use lwpid_of.
13105 (sigchld_handler, linux_supports_non_stop, linux_async)
13106 (linux_start_non_stop): New.
13107 (linux_target_ops): Register linux_supports_non_stop, linux_async
13108 and linux_start_non_stop.
13109 (initialize_low): Install SIGCHLD handler.
13110 * thread-db.c (thread_db_create_event, find_one_thread)
13111 (thread_db_get_tls_address): Use lwpid_of.
13112 * win32-low.c (win32_detach): Adjust to use resume_kind.
13113 (win32_wait): Add `options' argument.
13114 * spu-low.c (spu_resume): Adjust to use resume_kind.
13115 (spu_wait): Add `options' argument.
13116
5b1c542e
PA
131172009-04-01 Pedro Alves <pedro@codesourcery.com>
13118
13119 Decouple target code from remote protocol.
13120
13121 * target.h (enum target_waitkind): New.
13122 (struct target_waitstatus): New.
13123 (struct target_ops) <wait>: Return an unsigned long. Take a
13124 target_waitstatus pointer instead of a char pointer.
13125 (mywait): Likewise.
13126 * target.c (mywait): Change prototype to return an unsigned long.
13127 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13128 * server.h (thread_from_wait, old_thread_from_wait): Delete
13129 declarations.
13130 (prepare_resume_reply): Change prototype to take a
13131 target_waitstatus.
13132 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13133 (last_status, last_ptid): New.
13134 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13135 pid instead of a signal.
13136 (attach_inferior): Remove "status" and "signal" parameters.
13137 Adjust.
13138 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13139 not as an address.
13140 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13141 (handle_v_requests, myresume): Remove "status" and "signal"
13142 parameters. Adjust.
13143 (handle_status): New.
13144 (main): Delete local `status'. Adjust.
13145 * remote-utils.c: Include target.h.
13146 (prepare_resume_reply): Change prototype to take a
13147 target_waitstatus. Adjust.
13148
13149 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13150 interface.
13151 * spu-low.c (spu_wait): Adjust.
13152 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13153 Delete.
13154 (win32_wait): Adjust.
13155
2bd7c093
PA
131562009-04-01 Pedro Alves <pedro@codesourcery.com>
13157
13158 * target.h (struct thread_resume): Delete leave_stopped member.
13159 (struct target_ops): Add a `n' argument to the `resume' callback.
13160 * server.c (start_inferior): Adjust.
13161 (handle_v_cont, myresume): Adjust.
13162 * linux-low.c (check_removed_breakpoint): Adjust to resume
13163 interface change, and to removed leave_stopped field.
13164 (resume_ptr): Delete.
13165 (struct thread_resume_array): New.
13166 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13167 resume interface change.
13168 (linux_continue_one_thread, linux_queue_one_thread)
13169 (resume_status_pending_p): Check if the resume field is NULL
13170 instead of checking the leave_stopped member.
13171 (linux_resume): Adjust to the target resume interface change.
13172 * spu-low.c (spu_resume): Adjust to the target resume interface
13173 change.
13174 * win32-low.c (win32_detach, win32_resume): Ditto.
13175
c35fafde
PA
131762009-04-01 Pedro Alves <pedro@codesourcery.com>
13177
13178 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13179 flag.
13180 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13181 pending.
13182 (linux_continue_one_thread): Only preserve the stepping flag if
13183 there's a pending breakpoint.
13184
0a59d50b
PA
131852009-03-31 Pedro Alves <pedro@codesourcery.com>
13186
13187 * server.c (main): After the inferior having exited, call
13188 remote_close before exiting gdbserver.
13189
f04c6d38
TJB
131902009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13191
13192 Fix size of FPSCR in Power 7 processors.
13193 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13194 (PPC_FEATURE_HAS_DFP): New #define.
13195 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13196 size of the FPSCR.
13197
78e5cee6
PA
131982009-03-23 Pedro Alves <pedro@codesourcery.com>
13199
13200 * server.c (handle_query) Whitespace and formatting.
13201
1b3f6016
PA
132022009-03-22 Pedro Alves <pedro@codesourcery.com>
13203
13204 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13205 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13206 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13207 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13208 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13209 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13210 Makefile.in, configure.ac: Fix whitespace throughout.
13211 * configure: Regenerate.
13212
a07b2135
PA
132132009-03-22 Pedro Alves <pedro@codesourcery.com>
13214
13215 * inferiors.c (find_inferior): Make it safe for the callback
13216 function to delete the currently iterated inferior.
13217
67cc2626
PA
132182009-03-22 Pedro Alves <pedro@codesourcery.com>
13219
13220 * Makefile.in (linuw_low_h): Move higher.
13221 (thread-db.o): Depend on $(linux_low_h).
13222
54a0b537
PA
132232009-03-17 Pedro Alves <pedro@codesourcery.com>
13224
13225 Rename "process" to "lwp" throughout.
13226
13227 * linux-low.c (all_processes): Rename to...
13228 (all_lwps): ... this.
13229 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13230 (add_process): Rename to ...
13231 (add_lwp): ... this. Adjust.
13232 (linux_create_inferior): Adjust.
13233 (linux_attach_lwp): Adjust.
13234 (linux_attach): Adjust.
13235 (linux_kill_one_process): Rename to ...
13236 (linux_kill_one_lwp): ... this. Adjust.
13237 (linux_kill): Adjust.
13238 (linux_detach_one_process): Rename to ...
13239 (linux_detach_one_lwp): ... this. Adjust.
13240 (linux_detach): Adjust.
13241 (check_removed_breakpoint): Adjust.
13242 (status_pending_p): Adjust.
13243 (linux_wait_for_process): Rename to ...
13244 (linux_wait_for_lwp): ... this. Adjust.
13245 (linux_wait_for_event): Adjust.
13246 (send_sigstop): Adjust.
13247 (wait_for_sigstop): Adjust.
13248 (stop_all_processes): Rename to ...
13249 (stop_all_lwps): ... this.
13250 (linux_resume_one_process): Rename to ...
13251 (linux_resume_one_lwp): ... this. Adjust.
13252 (linux_set_resume_request, linux_continue_one_thread)
13253 (linux_queue_one_thread, resume_status_pending_p)
13254 (usr_store_inferior_registers, regsets_store_inferior_registers)
13255 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13256 Adjust.
13257 * linux-low.h (get_process): Rename to ...
13258 (get_lwp): ... this. Adjust.
13259 (get_thread_process): Rename to ...
13260 (get_thread_lwp): ... this. Adjust.
13261 (get_process_thread): Rename to ...
13262 (get_lwp_thread): ... this. Adjust.
13263 (struct process_info): Rename to ...
13264 (struct lwp_info): ... this.
13265 (all_processes): Rename to ...
13266 (all_lwps): ... this.
13267 * proc-service.c (ps_lgetregs): Adjust.
13268 * thread-db.c (thread_db_create_event, find_one_thread)
13269 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13270
0b16c5cf
PA
132712009-03-14 Pedro Alves <pedro@codesourcery.com>
13272
13273 * server.c (handle_query): Handle "qAttached".
13274
32de4b9d
NS
132752009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13276
13277 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13278 GPLv3, update license URL.
13279
2aecd87f
DE
132802009-03-01 Doug Evans <dje@google.com>
13281
93efd302 13282 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13283 (server_h): Add gdb_signals.h.
13284 (signals.o): Update.
13285 * server.h (target_signal_from_host,target_signal_to_host_p)
13286 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13287
86b1f9c5
PM
132882009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13289
13290 * remote-utils.c (getpkt): Also generate remote-debug
13291 information if noack_mode is set.
13292
4aa995e1
PA
132932009-02-06 Pedro Alves <pedro@codesourcery.com>
13294
13295 * server.c (handle_query): Report qXfer:siginfo:read and
13296 qXfer:siginfo:write as supported and handle them.
13297 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13298 * linux-low.c (linux_xfer_siginfo): New.
13299 (linux_target_ops): Set it.
13300
62709adf
PA
133012009-01-26 Pedro Alves <pedro@codesourcery.com>
13302
13303 * server.c (gdbserver_usage): Mention --remote-debug.
13304 (main): Accept '--remote-debug' switch.
13305
aef93bd7
DE
133062009-01-18 Doug Evans <dje@google.com>
13307
13308 * regcache.c (new_register_cache): No need to check result of xcalloc.
13309 * server.c (handle_search_memory): Back out calls to xmalloc,
13310 result is checked and error is returned to user upon failure.
13311 (handle_query): Ditto. Add more checks for result of malloc.
13312 (handle_v_cont): Check result of malloc, report error back to
13313 user upon failure.
13314 (handle_v_run): Ditto. Call freeargv.
13315 * server.h (freeargv): Declare.
13316 * utils.c (freeargv): New fn.
13317
54363045
DE
133182009-01-15 Doug Evans <dje@google.com>
13319
f626972c
DE
13320 * gdbreplay.c (perror_with_name): Make arg const char *.
13321 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13322 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13323 * utils.c (perror_with_name): Make arg const char *.
54363045 13324
18aae699
PA
133252009-01-14 Pedro Alves <pedro@codesourcery.com>
13326
13327 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13328 when handling a EXIT_PROCESS_DEBUG_EVENT.
13329
ff703abe
JB
133302009-01-06 Joel Brobecker <brobecker@adacore.com>
13331
13332 * gdbreplay.c (gdbreplay_version): Update copyright year.
13333 * server.c (gdbserver_version): Likewise.
13334
f21cc1a2 133352009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13336
13337 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13338 (handle_extended_wait): Improve comment.
0e21c1ec 13339
bca929d3
DE
133402008-12-13 Doug Evans <dje@google.com>
13341
13342 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13343 * server.h (ATTR_MALLOC): New macro.
13344 (xmalloc,xcalloc,xstrdup): Declare.
13345 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13346 * inferiors.c: Ditto.
13347 * linux-low.c: Ditto.
13348 * mem-break.c: Ditto.
13349 * regcache.c: Ditto.
13350 * remote-utils.c: Ditto.
13351 * server.c: Ditto.
13352 * target.c: Ditto.
13353 * win32-low.c: Ditto.
13354
97438e3f
DE
133552008-12-12 Doug Evans <dje@google.com>
13356
896c7fbb
DE
13357 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13358 in debugging printf.
13359
97438e3f
DE
13360 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13361
e3b886f8
DE
133622008-12-09 Doug Evans <dje@google.com>
13363
13364 * linux-low.h (struct process_info): Delete member tid, unused.
13365 * thread-db.c (find_one_thread): Update.
13366 (maybe_attach_thread): Update.
13367
07e059b5
VP
133682008-12-02 Pedro Alves <pedro@codesourcery.com>
13369
889bf7c5
PA
13370 * target.h (struct target_ops): Add qxfer_osdata member.
13371 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13372 and dirent.h.
13373 (linux_qxfer_osdata): New functions.
13374 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13375 callback.
13376 * server.c (handle_query): Handle "qXfer:osdata:read:".
13377 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13378 (buffer_xml_printf): New functions.
13379 * server.h (struct buffer): New.
13380 (buffer_grow_str, buffer_grow_str0): New macros.
13381 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13382 (buffer_xml_printf): Declare.
07e059b5 13383
4cab47ab
DE
133842008-11-24 Doug Evans <dje@google.com>
13385
13386 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13387
f142445f
DJ
133882008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13389
13390 * server.c (handle_v_run): Always use the supplied argument list.
13391
d0107bb6 133922008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13393
d0107bb6
BW
13394 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13395 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13396
2c4ad781
TJB
133972008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13398
13399 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13400 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13401 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13402 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13403 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13404 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13405 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13406 XML target descriptions.
13407 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13408 when inferior is running on an ISA 2.05 or later processor. Add
13409 special case to return offset for full 64-bit slot of FPSCR when
13410 in 32-bits.
13411
dfb64f85
DJ
134122008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13413
13414 * Makefile.in (SFILES, clean): Added sparc64 files.
13415 (reg-sparc64.o, reg-sparc64.c): New.
13416 * configure.srv (sparc*-*-linux*): New configuration.
13417 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13418 syscall arguments for SPARC.
13419 (regsets_store_inferior_registers): Likewise.
13420 * linux-sparc-low.c: New file.
13421
66b6e1dd
DE
134222008-10-21 Doug Evans <dje@google.com>
13423
13424 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13425 (READLINE_DIR,READLINE_DEP): Delete.
13426 (INTERNAL_CFLAGS): Update.
13427 (LINTFLAGS): Update.
13428
9b710a42
PA
134292008-10-10 Pedro Alves <pedro@codesourcery.com>
13430
13431 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13432 whole argv from the last run, not just argv[0].
13433
5822d809
PA
134342008-09-08 Pedro Alves <pedro@codesourcery.com>
13435
13436 * regcache.c (new_register_cache): Return NULL if the register
13437 cache size isn't known yet.
13438 (free_register_cache): Avoid dereferencing a NULL regcache.
13439
74aac56f
DJ
134402008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13441
13442 * configure.srv: Merge MIPS and MIPS64.
13443
400b20f5
MR
134442008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13445
13446 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13447
677c5bb1
LM
134482008-08-18 Luis Machado <luisgpm@br.ibm.com>
13449
13450 * Makefile.in: Add required vsx dependencies.
13451
13452 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13453 Declare init_registers_powerpc_vsx32l.
13454 Declare init_registers_powerpc_vsx64l.
13455 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13456 (ppc_arch_setup): Check for VSX in hwcap.
13457 (ppc_fill_vsxregset): New function.
13458 (ppc_store_vsxregset): New function.
13459 Add new VSX entry in regset_info target_regsets.
13460
13461 * configure.srv: Add new VSX dependencies.
13462
a6f3e723
SL
134632008-08-12 Pedro Alves <pedro@codesourcery.com>
13464
13465 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13466 (remote_open): Set or clear transport_is_reliable.
13467 (putpkt_binary): Don't expect acks in noack mode.
13468 (getpkt): Don't send ack/nac in noack mode.
13469 * server.c (handle_general_set): Handle QStartNoAckMode.
13470 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13471 qSupported.
13472 (main): Reset noack_mode on every connection.
13473 * server.h (noack_mode): Declare.
13474
a417dc56
RW
134752008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13476
13477 * Makefile.in (GDBREPLAY_OBS): New variable.
13478 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13479
3221518c
UW
134802008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13481 Daniel Jacobowitz <dan@codesourcery.com>
13482
13483 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13484 (usr_store_inferior_registers): Likewise.
13485 (regsets_store_inferior_registers): Likewise.
13486
ec56be1b
PA
134872008-07-31 Rolf Jansen <rj@surtec.com>
13488 Pedro Alves <pedro@codesourcery.com>
13489
13490 * configure.ac: Check for memmem declaration.
13491 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13492 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13493 (disable_packet_qfThreadInfo): Unconditionally compile.
13494 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13495 * configure, config.in: Regenerate.
13496
2fe5e3ff
DE
134972008-07-28 Doug Kwan <dougkwan@google.com>
13498
13499 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13500 (linux_write_memory): Remove declaration of errno.
13501
836acd6d
UW
135022008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13503
13504 * linux-low.c (handle_extended_wait): Do not use "status"
13505 variable uninitialized.
13506
aeba519e
PA
135072008-07-07 Pedro Alves <pedro@codesourcery.com>
13508
13509 * server.c (handle_v_attach): Inhibit reporting dll changes.
13510
db42f210
PA
135112008-06-27 Pedro Alves <pedro@codesourcery.com>
13512
13513 * remote-utils.c (prepare_resume_reply): If requested, don't
13514 output "thread:TID" in the T stop reply.
13515
13516 * server.c (disable_packet_vCont, disable_packet_Tthread)
13517 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13518 (handle_query): If requested, disable support for qC, qfThreadInfo
13519 and qsThreadInfo.
13520 (handle_v_requests): If requested, disable support for vCont.
13521 (gdbserver_show_disableable): New.
13522 (main): Handle --disable-packet and --disable-packet=LIST.
13523
13524 * server.h (disable_packet_vCont, disable_packet_Tthread)
13525 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13526
8e4c5421
CD
135272008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13528
13529 * server.c (gdbserver_usage): Mention --version.
13530
6e23a804
DJ
135312008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13532
13533 * Makefile.in (gdbreplay.o): New rule.
13534
90aa6a40
JM
135352008-06-06 Joseph Myers <joseph@codesourcery.com>
13536
13537 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13538 message, not gdbserver.
13539
c16158bc 135402008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13541 Nathan Sidwell <nathan@codesourcery.com>
13542 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13543
13544 * acinclude.m4: Include ../../config/acx.m4.
13545 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13546 * configure, config.in: Regenerate.
13547 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13548 * server.c (gdbserver_version): Print PKGVERSION.
13549 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13550 (main): Adjust gdbserver_usage calls.
13551 * gdbreplay.c (version, host_name): Add declarations.
13552 (gdbreplay_version, gdbreplay_usage): New.
13553 (main): Accept --version and --help options.
13554
aeb75bf5
DJ
135552008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13556
13557 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13558 (arm_breakpoint_at): Handle Thumb.
13559 (the_low_target): Add comment.
13560
76b233dd
UW
135612008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13562
13563 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13564
08388c79
DE
135652008-05-09 Doug Evans <dje@google.com>
13566
a3c83fae
DE
13567 * server.h (decode_search_memory_packet): Declare.
13568 * remote-utils.c (decode_search_memory_packet): New fn.
13569 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13570 (handle_search_memory): New fn.
13571 (handle_query): Process qSearch:memory packets.
13572
bb9c3d36
UW
135732008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13574
13575 * regcache.c (registers_length): Remove.
13576 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13577 full register packet.
13578 * regcache.h (registers_length): Remove prototype.
13579 * server.h (PBUFSIZ): Define to 16384.
13580
7284e1be
UW
135812008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13582
13583 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13584 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13585 powerpc-64l.o, and powerpc-altivec64l.o.
13586 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13587 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13588 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13589 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13590 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13591 to srv_xmlfiles.
13592
13593 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13594 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13595 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13596 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13597 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13598 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13599 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13600 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13601 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13602 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13603 (clean): Update.
13604
13605 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13606 (init_registers_powerpc_32l): ... this new prototype.
13607 (init_registers_powerpc_32): Remove, replace by ...
13608 (init_registers_powerpc_altivec32l): ... this new prototype.
13609 (init_registers_powerpc_e500): Remove, replace by ...
13610 (init_registers_powerpc_e500l): ... this new prototype.
13611 (init_registers_ppc64): Remove, replace by ...
13612 (init_registers_powerpc_64l): ... this new prototype.
13613 (init_registers_powerpc_64): Remove, replace by ...
13614 (init_registers_powerpc_altivec64l): ... this new prototype.
13615 (ppc_num_regs): Set to 73.
13616 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13617 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13618 (ppc_cannot_store_register): Handle orig_r3 and trap.
13619 (ppc_arch_setup): Update init_registers_... calls.
13620 (ppc_fill_gregset): Handle orig_r3 and trap.
13621
13622 * inferiors.c (clear_inferiors): Reset current_inferior.
13623
fdc59709
PB
136242008-04-23 Paolo Bonzini <bonzini@gnu.org>
13625
889bf7c5
PA
13626 * acinclude.m4: Add override.m4.
13627 * configure: Regenerate.
fdc59709 13628
c9b2f845
UW
136292008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13630
13631 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13632 initial call to init_register_ppc64.
13633
550512b8
UW
136342008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13635
43aaf8b6
PA
13636 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13637 single powerpc*-*-linux* case.
550512b8
UW
13638 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13639
b6430ec3
UW
136402008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13641
13642 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13643 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13644 from reg_xmlfiles.
13645 * linux-ppc-low.c: Include <elf.h>.
13646 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13647 (ppc_hwcap): New global variable.
13648 (ppc_regmap): Remove __SPE__ #ifdef sections.
13649 (ppc_regmap_e500): New global variable.
13650 (ppc_cannot_store_register): Update __SPE__ special case.
13651 (ppc_get_hwcap): New function.
13652 (ppc_arch_setup): Use it to determine whether inferior supports
13653 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13654 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13655 Do not access registers if target does not support AltiVec.
13656 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13657 Do not access registers if target does not support SPE.
13658 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13659
52fa2412
UW
136602008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13661
13662 * linux-low.c (disabled_regsets, num_regsets): New.
13663 (use_regsets_p): Delete.
13664 (linux_wait_for_process): Clear disabled_regsets.
13665 (regsets_fetch_inferior_registers): Check and set it.
13666 (regsets_store_inferior_registers): Likewise.
13667 (linux_fetch_registers, linux_store_registers): Do not use
13668 use_regsets_p.
13669 (initialize_low): Allocate disabled_regsets.
13670
e28b3332
DJ
136712008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13672
13673 * Makefile.in (LIBOBJS): New.
13674 (OBS): Use LIBOBJS.
13675 (memmem.o): New rule.
13676 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13677 * configure: Regenerated.
13678
4536995d
UW
136792008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13680
13681 * server.c (handle_query): Never return "unsupported" for
13682 qXfer:features:read queries.
13683
221c031f
UW
136842008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13685
13686 * server.c (get_features_xml): Fix inverted condition.
13687 (handle_query): Always support qXfer:feature:read.
13688
ccd213ac
DJ
136892008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13690
13691 * server.c (wrapper_argv): New.
13692 (start_inferior): Handle wrapper_argv. If set, expect an extra
13693 trap.
13694 (gdbserver_usage): Document --wrapper.
13695 (main): Parse --wrapper.
13696
6fe305f7
UW
136972008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13698
13699 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13700 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13701 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13702 (ppc_set_pc): Likewise.
13703 (ppc_arch_setup): New function.
13704 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13705 of collect_register.
889bf7c5 13706 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13707
5b0a002e
UW
137082008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13709
13710 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13711 instead of linux-ppc64-low.o.
13712 * linux-ppc64-low.c: Remove file.
13713 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13714 (linux-ppc64-low.o): Remove rule.
13715
13716 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13717 (init_registers_powerpc_64): Likewise.
13718 (ppc_regmap): Conditionally define depending on __powerpc64__.
13719 (ppc_cannot_store_register): Do not special-case "fpscr" when
13720 compiled on __powerpc64__.
13721 (ppc_collect_ptrace_register): New function.
13722 (ppc_supply_ptrace_register): New function.
13723 (ppc_breakpoint): Change type to "unsigned int".
13724 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13725 (the_low_target): Conditionally provide initializers for the
889bf7c5 13726 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13727 collect_ptrace_register and supply_ptrace_register members.
13728
9b4b61c8
UW
137292008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13730
13731 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13732 * server.c (gdbserver_xmltarget): Define.
13733 (get_features_xml): Use it to replace "target.xml" and arch_string.
13734
13735 * configure.srv: Remove srv_xmltarget. Add XML files that were
13736 mentioned there to srv_xmlfiles instead. Remove conditional tests
13737 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13738 srv_xmlfiles and srv_regobj to include all possible choices.
13739 * configure.ac (srv_xmltarget): Remove.
13740 (srv_xmlfiles): Do not add "target.xml".
13741 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13742 checks for supplementary target information.
13743 * configure: Regenerate.
13744 * Makefile.in (XML_TARGET): Remove.
13745 (target.xml): Remove rule.
13746 (clean): Do not clean up target.xml.
13747 (.PRECIOUS): Do not mention target.xml.
13748
13749 * target.h (struct target_ops): Remove arch_string member.
13750 * linux-low.c (linux_arch_string): Remove.
13751 (linux_target_ops): Remove arch_string initializer.
13752 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13753 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13754 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13755 * spu-low.c (spu_arch_string): Remove.
13756 (spu_target_ops): Remove arch_string initializer.
13757 * win32-low.c (win32_arch_string): Remove.
13758 (win32_target_ops): Remove arch_string initializer.
13759 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13760 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13761 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13762
ee1a7ae4
UW
137632008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13764
13765 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13766 by collect_ptrace_register and supply_ptrace_register hooks.
13767 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13768 instead of checking for the_low_target.left_pad_xfer.
13769 (usr_store_inferior_registers): Use collect_ptrace_register callback
13770 instead of checking for the_low_target.left_pad_xfer.
13771
13772 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13773 (s390_supply_ptrace_register): Likewise.
13774 (s390_fill_gregset): Call s390_collect_ptrace_register.
13775 (the_low_target): Update.
13776
13777 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13778 (ppc_supply_ptrace_register): Likewise.
13779 (the_low_target): Update.
13780
13781 * linux-i386-low.c (the_low_target): Update.
13782 * linux-x86-64-low.c (the_low_target): Update.
13783
d61ddec4
UW
137842008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13785
13786 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13787 reg-s390.o and reg-s390x.o.
13788
13789 * linux-low.c (new_inferior): New global variable.
13790 (linux_create_inferior, linux_attach): Set it.
13791 (linux_wait_for_process): Call the_low_target.arch_setup after the
13792 target has stopped for the first time.
13793 (initialize_low): Do not call the_low_target.arch_setup.
13794
13795 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13796 (s390_set_pc): Likewise.
13797 (s390_arch_setup): New function.
13798 (the_low_target): Use s390_arch_setup as arch_setup routine.
13799
13800 * regcache.c (realloc_register_cache): New function.
13801 (set_register_cache): Call it for each existing regcache.
13802
d05b4ac3
UW
138032008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13804
13805 * server.h (init_registers): Remove prototype.
13806
13807 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13808 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13809 instead of init_registers ().
13810 * linux-arm-low.c (init_registers_arm): Add prototype.
13811 (init_registers_arm_with_iwmmxt): Likewise.
13812 (the_low_target): Add initializer for arch_setup field.
13813 * linux-cris-low.c (init_registers_cris): Add prototype.
13814 (the_low_target): Add initializer for arch_setup field.
13815 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13816 (the_low_target): Add initializer for arch_setup field.
13817 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13818 (the_low_target): Add initializer for arch_setup field.
13819 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13820 (the_low_target): Add initializer for arch_setup field.
13821 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13822 (the_low_target): Add initializer for arch_setup field.
13823 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13824 (the_low_target): Add initializer for arch_setup field.
13825 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13826 (init_registers_mips64_linux): Likewise.
13827 (the_low_target): Add initializer for arch_setup field.
13828 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13829 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13830 (the_low_target): Add initializer for arch_setup field.
13831 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13832 (init_registers_powerpc_64): Likewise.
13833 (the_low_target): Add initializer for arch_setup field.
13834 * linux-s390-low.c (init_registers_s390): Add prototype.
13835 (init_registers_s390x): Likewise.
13836 (the_low_target): Add initializer for arch_setup field.
13837 * linux-sh-low.c (init_registers_sh): Add prototype.
13838 (the_low_target): Add initializer for arch_setup field.
13839 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13840 (the_low_target): Add initializer for arch_setup field.
13841 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13842 (the_low_target): Add initializer for arch_setup field.
13843
13844 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13845 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13846 instead of init_registers ().
13847 * win32-arm-low.c (init_registers_arm): Add prototype.
13848 (the_low_target): Add initializer for arch_setup field.
13849 * win32-i386-low.c (init_registers_i386): Add prototype.
13850 (the_low_target): Add initializer for arch_setup field.
13851
13852 * spu-low.c (init_registers_spu): Add prototype.
13853 (initialize_low): Call initialie_registers_spu () instead of
13854 initialize_registers ().
13855
fd96d250
PA
138562008-02-19 Pedro Alves <pedro@codesourcery.com>
13857
13858 * server.c (handle_v_requests): When handling the vRun and vAttach
13859 packets, if already debugging a process, don't kill it. Return an
13860 error instead.
13861
d41b6bb4
DJ
138622008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13863
13864 * server.c (handle_query): Correct length check.
13865
5ac588cf
PA
138662008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13867
13868 * win32-low.c (do_initial_child_stuff): Add process handle
13869 parameter. Set current_process_handle and current_process_id from the
13870 parameters. Clear globals.
13871 (win32_create_inferior): Don't set current_process_handle and
13872 current_process_id here. Instead pass them on the call to
13873 do_initial_child_stuff.
13874 (win32_attach): Likewise.
13875 (win32_clear_inferiors): New.
13876 (win32_kill): Don't close the current process handle or the
13877 current thread handle here. Instead call win32_clear_inferiors.
13878 (win32_detach): Don't open a new handle to the process. Call
13879 win32_clear_inferiors.
13880 (win32_join): Don't rely on current_process_handle; open a new
13881 handle using the process id.
13882 (win32_wait): Call win32_clear_inferiors when the inferior process
13883 has exited.
13884
ecd7ecbc
DJ
138852008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13886
13887 * server.c (monitor_show_help): Add "exit".
13888
1525d545
MG
138892008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13890
ecd7ecbc 13891 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13892 (clean): Add reg-xtensa.c.
13893 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13894 * configure.srv (xtensa*-*-linux*) New target.
13895 * linux-xtensa-low.c: New.
13896 * xtensa-xtregs.c: New.
1525d545 13897
59a016f0
PA
138982008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13899
13900 * hostio.c: Don't include errno.h.
13901 (errno_to_fileio_errno): Move to hostio-errno.
13902 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13903 error number outputting to the target->hostio_last_error callback.
13904 (hostio_packet_error): Use FILEIO_EINVAL directly.
13905 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13906 calls to hostio_error.
13907 * hostio-errno.c: New.
13908 * server.h (hostio_last_error_from_errno): Declare.
13909 * target.h (target_ops): Add hostio_last_error member.
13910 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13911 as hostio_last_error handler.
889bf7c5 13912 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13913 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13914 (wince_hostio_last_error): New functions.
13915 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13916 as hostio_last_error handler.
13917 (win32_target_ops) [!_WIN32_WCE]: Register
13918 hostio_last_error_from_errno as hostio_last_error handler.
13919 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13920 (hostio-errno.o): New rule.
13921 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13922 * configure.srv (srv_hostio_err_objs): New variable. Default to
13923 hostio-errno.o.
13924 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13925 * configure: Regenerate.
13926
2d717e4f
DJ
139272008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13928
13929 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13930 (linux_kill, linux_detach): Clean up the process list.
13931 * remote-utils.c (remote_open): Improve port number parsing.
13932 (putpkt_binary, input_interrupt): Only send interrupts if the target
13933 is running.
13934 * server.c (extended_protocol): Make static.
13935 (attached): Define earlier.
13936 (exit_requested, response_needed, program_argv): New variables.
13937 (target_running): New.
13938 (start_inferior): Clear attached here.
13939 (attach_inferior): Set attached here.
13940 (require_running): Define.
13941 (handle_query): Use require_running and target_running. Implement
13942 "monitor exit".
13943 (handle_v_attach, handle_v_run): New.
13944 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13945 (gdbserver_usage): Update.
13946 (main): Redo argument parsing. Handle --debug and --multi. Handle
13947 --attach along with other options or after the port. Save
13948 program_argv. Support no initial program. Resynchronize
13949 communication with GDB after an error. Handle "monitor exit".
13950 Use require_running and target_running. Always allow the extended
13951 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13952 restart in extended mode.
13953 * README: Refer to the GDB manual. Update --attach usage.
13954
7407e2de
AS
139552007-12-20 Andreas Schwab <schwab@suse.de>
13956
13957 * linux-low.c (STACK_SIZE): Define.
13958 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13959 (linux_test_for_tracefork): Likewise.
13960
b65d95c5
DJ
139612007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13962
13963 * linux-low.c (linux_wait_for_event): Update messages. Do not
13964 reinsert auto-delete breakpoints.
13965 * mem-break.c (struct breakpoint): Change return type of handler to
13966 int.
13967 (set_breakpoint_at): Update handler type.
13968 (reinsert_breakpoint_handler): Return 1 instead of calling
13969 delete_breakpoint.
13970 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13971 setting a new one.
13972 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13973 * mem-break.h (set_breakpoint_at): Update handler type.
13974 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13975 * win32-low.c (auto_delete_breakpoint): New.
13976 (get_child_debug_event): Use it.
13977
4e799345
DJ
139782007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13979
13980 * configure.ac: Check for pread and pwrite.
13981 * hostio.c (handle_pread): Fall back to lseek and read.
13982 (handle_pwrite): Fall back to lseek and write.
13983 * config.in, configure: Regenerated.
13984
27524b67
DJ
139852007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13986
13987 * server.c (myresume): Add own_buf argument.
13988 (main): Update calls.
13989
a20d5e98
DJ
139902007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13991
13992 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13993 * remote-utils.c (remote_open): Do not call disable_async_io.
13994 (block_async_io): Delete.
13995 (unblock_async_io): Make static.
13996 (initialize_async_io): New.
13997 * server.c (handle_v_cont): Handle async I/O here.
13998 (myresume): Likewise. Move other common resume tasks here...
13999 (main): ... from here. Call initialize_async_io. Disable async
14000 I/O before the main loop.
14001 * server.h (initialize_async_io): Declare.
14002 (block_async_io, unblock_async_io): Delete prototypes.
14003 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
14004
b79d787e
DJ
140052007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
14006
14007 * remote-utils.c (readchar): Allow binary data in received messages.
14008
d97903b2
PA
140092007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14010
14011 * win32-low.c (attaching): New global.
14012 (win32_create_inferior): Clear the `attaching' global.
14013 (win32_attach): Set the `attaching' global.
14014 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
14015 attaching. Only set a breakpoint at the entry point if not
14016 attaching.
14017
311de423
PA
140182007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14019
14020 * server.c (main): Don't report dll events on the initial
14021 connection on attaches.
14022
6c2d16d2
PA
140232007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14024
14025 * server.c (main): Relax numerical bases supported for the pid of
14026 the --attach command line argument.
14027
5ca906e6
PA
140282007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14029
14030 * win32-low.c (win32_attach): Call OpenProcess before
14031 DebugActiveProcess, not after. Add last error output to error
14032 call.
14033
9c6c8194
PA
140342007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
14035
14036 * win32-low.c (win32_get_thread_context)
14037 (win32_set_thread_context): New functions.
14038 (thread_rec): Use win32_get_thread_context.
14039 (continue_one_thread, win32_resume): Use win32_set_thread_context.
14040 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
14041 field.
14042
4d5d1aaa
PA
140432007-12-03 Leo Zayas
14044 Pedro Alves <pedro_alves@portugalmail.pt>
14045
14046 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
14047 global variables.
14048 (child_add_thread): Minor cleanup.
14049 (child_continue): Resume artificially suspended threads before
14050 calling ContinueDebugEvent.
14051 (suspend_one_thread): New.
14052 (fake_breakpoint_event): New.
14053 (get_child_debug_event): Change return type to int. Check here if
14054 gdb sent an interrupt request. If a soft interrupt was requested,
14055 fake a breakpoint event. Return 0 if there is no event to handle,
14056 and 1 otherwise.
14057 (win32_wait): Don't check here if gdb sent an interrupt request.
14058 Ensure there is a valid event to handle.
14059 (win32_request_interrupt): Add soft interruption method as last
14060 resort.
14061
c436e841
PA
140622007-12-03 Leo Zayas
14063 Pedro Alves <pedro_alves@portugalmail.pt>
14064
14065 * win32-low.h (win32_thread_info): Add descriptions to the
14066 structure members. Replace `suspend_count' counter by a
14067 `suspended' flag.
14068 * win32-low.c (thread_rec): Update condition of when to get the
14069 context from the inferior. Rely on ContextFlags being set if it
14070 has already been retrieved. Only suspend the inferior thread if
14071 we haven't already. Warn if that fails.
14072 (continue_one_thread): s/suspend_count/suspended/. Only call
14073 ResumeThread once. Warn if that fails.
14074
e7b5fa67
PA
140752007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14076
14077 * win32-low.c (win32_wait): Don't read from the inferior when it
14078 has already exited.
14079
a385171d
PA
140802007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14081
14082 * Makefile.in (win32_low_h): New variable.
14083 (win32-low.o): Add dependency on $(win32_low_h).
14084 (win32-arm-low.o, win32-i386-low.o): New rules.
14085
f80c84b3
DJ
140862007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14087
14088 * hostio.c: Correct copyright year.
14089
a6b151f1
DJ
140902007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14091
14092 * Makefile.in (OBS): Add hostio.o.
14093 (hostio.o): New rule.
14094 * server.h (handle_vFile): Declare.
14095 * hostio.c: New file.
14096 * server.c (handle_v_requests): Take packet_len and new_packet_len
14097 for binary packets. Call handle_vFile.
14098 (main): Update call to handle_v_requests.
14099
f9387fc3
DJ
141002007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14101
14102 * linux-low.c: Include <sched.h>.
14103
51c2684e
DJ
141042007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14105
14106 * linux-low.c (linux_tracefork_grandchild): New.
14107 (linux_tracefork_child): Use clone.
14108 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14109
75f83163
JB
141102007-10-31 Joel Brobecker <brobecker@adacore.com>
14111
14112 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14113
da5898ce
DJ
141142007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14115
14116 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14117
24a09b5f
DJ
141182007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14119
14120 * inferiors.c (change_inferior_id): Delete.
14121 (add_pid_to_list, pull_pid_from_list): New.
14122 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14123 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14124 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14125 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14126 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14127 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14128 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14129 (using_threads): Always set to 1.
14130 (handle_extended_wait): New.
14131 (add_process): Do not set TID.
14132 (linux_create_inferior): Set must_set_ptrace_flags.
14133 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14134 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14135 (linux_thread_alive): Rename TID argument to LWPID.
14136 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14137 (linux_wait_for_event): Do not use TID or check using_threads. Update
14138 call to dead_thread_notify. Call handle_extended_wait.
14139 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14140 (send_sigstop): Delete sigstop_sent.
14141 (wait_for_sigstop): Avoid TID.
14142 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14143 (linux_test_for_tracefork): New.
14144 (linux_lookup_signals): Use thread_db_active and
14145 linux_supports_tracefork_flag.
14146 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14147 * linux-low.h (get_process_thread): Avoid TID.
14148 (struct process_ifo): Move thread_known and tid to the end. Remove
14149 sigstop_sent.
14150 (linux_attach_lwp, thread_db_init): Update prototypes.
14151 * server.h (change_inferior_id): Delete prototype.
14152 (add_pid_to_list, pull_pid_from_list): New prototypes.
14153 * thread-db.c (thread_db_use_events): New.
14154 (find_first_thread): Rename to...
14155 (find_one_thread): ...this. Update callers and messages. Do not
14156 call fatal. Check thread_db_use_events. Do not call
14157 change_inferior_id or new_thread_notify.
14158 (maybe_attach_thread): Update. Do not call new_thread_notify.
14159 (thread_db_init): Set thread_db_use_events. Check use_events.
14160 * utils.c (fatal, warning): Correct message prefix.
14161
30ed0a8f
DJ
141622007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14163
14164 * Makefile.in (clean): Remove new files.
14165 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14166 (powerpc-64.o, powerpc-64.c): New rules.
14167 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14168 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14169 with SPE.
14170 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14171 SPE targets.
14172 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14173 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14174 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14175 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14176 (target_regsets): Add AltiVec and SPE register sets.
14177 * configure.ac: Check for AltiVec and SPE.
14178 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14179 (ppc_fill_vrregset, ppc_store_vrregset): New.
14180 (target_regsets): Add AltiVec register set.
14181 * configure: Regenerated.
14182
fd462a61
DJ
141832007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14184
14185 * linux-low.c (O_LARGEFILE): Define.
14186 (linux_read_memory): Use /proc/PID/mem.
14187 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14188 * configure, config.in: Regenerated.
14189
69f223ed
DJ
141902007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14191
14192 * linux-low.c (linux_wait_for_event): Do not pass signals while
14193 single-stepping.
14194
aec18585
PA
141952007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14196
14197 * win32-low.c (create_process): New.
14198 (win32_create_inferior): Use create_process instead of
14199 CreateProcess. If create_process failed retry appending an ".exe"
14200 suffix. Store the GetLastError result immediatelly after
14201 create_process calls and use it on the call to error.
14202
34d86ddd
PA
142032007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14204
14205 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14206
5a0e3bd0
JB
142072007-08-23 Joel Brobecker <brobecker@adacore.com>
14208
14209 * configure.ac: Switch license to GPLv3.
14210
f88c79e6
MS
142112007-08-01 Michael Snyder <msnyder@access-company.com>
14212
14213 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14214
6b3d9b83
PA
142152007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14216
14217 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14218 typedef.
14219 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14220 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14221 CloseToolhelp32Snapshot.
14222 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14223 CloseToolhelp32Snapshot.
14224
c588c53c
MS
142252007-07-27 Michael Snyder <michael.snyder@access-company.com>
14226
14227 * server.c (main): Check for inferior exit before main loop.
14228
aa0403d9
PA
142292007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14230
14231 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14232 instead of on tmp_desc.
14233
255e7678
DJ
142342007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14235 Daniel Jacobowitz <dan@codesourcery.com>
14236
14237 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14238 (add_thread): Minor cleanups.
14239 (clear_inferiors): Move lower in the file. Clear the DLL
14240 list.
14241 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14242 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14243 (xml_escape_text): New.
14244 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14245 for qSupported.
14246 (handle_v_cont): Report errors.
14247 (gdbserver_version): Update.
14248 (main): Correct size of own_buf. Do not report initial DLL events.
14249 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14250 (unloaded_dll, xml_escape_text): New.
14251 * win32-low.c (enum target_waitkind): Update comments.
14252 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14253 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14254 (win32_EnumProcessModules, win32_GetModuleInformation)
14255 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14256 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14257 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14258 (win32_Module32First, win32_Module32Next, load_toolhelp)
14259 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14260 (get_child_debug_event): Handle DLL events.
14261 (win32_wait): Likewise.
14262
0d37add9
DJ
142632007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14264
14265 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14266 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14267
45e2715e
PA
142682007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14269
14270 * win32-low.c (handle_output_debug_string): Ignore event if not
14271 waiting.
14272
c5674cf1
PA
142732007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14274
14275 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14276
2bbe3cc1
DJ
142772007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14278
14279 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14280
ae13219e
DJ
142812007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14282
14283 * inferiors.c (change_inferior_id): Add comment.
14284 * linux-low.c (check_removed_breakpoint): Add an early
14285 prototype. Improve debug output.
14286 (linux_attach): Doc update.
14287 (linux_detach_one_process, linux_detach): Clean up before releasing
14288 each process.
14289 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14290 * linux-low.h (struct process_info): Doc improvement.
14291 * mem-break.c (delete_all_breakpoints): New.
14292 * mem-break.h (delete_all_breakpoints): New prototype.
14293 * thread-db.c (find_first_thread): New.
14294 (thread_db_create_event): Call it instead of
14295 thread_db_find_new_threads. Clean up unused variables.
14296 (maybe_attach_thread): Remove first thread handling.
14297 (thread_db_find_new_threads): Use find_first_thread.
14298 (thread_db_get_tls_address): Likewise.
14299
4105de34
DJ
143002007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14301
14302 * thread-db.c (thread_db_find_new_threads): Add prototype.
14303 (thread_db_create_event): Check for the main thread before adding
14304 a new thread.
14305 (maybe_attach_thread): Only enable event reporting if TID == 0.
14306 (thread_db_get_tls_address): Check for new threads.
14307
2b876972
DJ
143082007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14309
14310 * linux-low.c (linux_create_inferior): Try execv before execvp.
14311 * spu-low.c (spu_create_inferior): Likewise.
14312
7a245884
DJ
143132007-06-13 Mike Frysinger <vapier@gentoo.org>
14314
14315 * linux-low.c (linux_create_inferior): Change execv to execvp.
14316 * spu-low.c (spu_create_inferior): Likewies.
14317
117ce543
DJ
143182007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14319
14320 * Makefile.in (clean): Clean new files instead of deleted ones.
14321 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14322 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14323 rules.
14324 * configure.srv: Specify XML files and new regformats for MIPS and
14325 MIPS64 GNU/Linux.
14326 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14327 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14328 an entry for the restart register.
14329 (mips_cannot_fetch_register, mips_cannot_store_register)
14330 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14331 register names to match the XML descriptions.
14332 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14333 restart register instead of $0.
14334
0e7f50da
UW
143352007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14336 Markus Deuling <deuling@de.ibm.com>
14337
14338 * remote-utils.c (decode_xfer_write): New function.
14339 * server.h (decode_xfer_write): Add prototype.
14340 * server.c (handle_query): Add PACKET_LEN argument. Support
14341 qXfer:spu:read and qXfer:spu:write packets.
14342 (main): Pass packet_len to handle_query.
14343 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14344 * target.h (target_ops): Add qxfer_spu.
14345
374c1d38
UW
143462007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14347
14348 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14349 accessing non-seekable spufs files.
14350
bb63802a
UW
143512007-05-16 Markus Deuling <deuling@de.ibm.com>
14352
889bf7c5 14353 * server.c (handle_query): Add reply for qC packet.
bb63802a 14354
7390519e
PA
143552007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14356 Leo Zayas <lerele@champenstudios@com>
14357
14358 * server.h (check_remote_input_interrupt_request): New function.
14359 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14360 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14361 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14362 (check_remote_input_interrupt_request): New function.
14363 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14364 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14365 winapi_GenerateConsoleCtrlEvent): New typedefs.
14366 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14367 to 250 ms.
14368 (win32_wait): Check for remote interrupt request
14369 with check_remote_input_interrupt_request.
14370 (win32_request_interrupt): New function.
14371 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14372
34b34921
PA
143732007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14374
14375 * win32-low.c (debug_registers_changed,
14376 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14377 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14378 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14379 (thread_rec): Get context using the low target.
14380 (child_add_thread): Call thread_added on the low target,
14381 which does the same thing.
14382 (regptr): Delete.
14383 (do_initial_child_stuff): Remove debug registers references.
14384 Set context using the low target. Resume threads after
14385 setting the contexts.
14386 (child_continue): Remove dead variable. Remove debug
14387 registers references.
14388 (child_fetch_inferior_registers): Go through the low target.
14389 (do_child_store_inferior_registers): Remove.
14390 (child_store_inferior_registers): Go through the low target.
14391 (win32_resume): Remove debug registers references.
14392 Set context using the low target.
14393 (handle_exception): Change return type to void. Don't record
14394 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14395 first chance exception.
889bf7c5 14396 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14397 goto loop. Always return after waiting for debug event.
14398 (win32_wait): Convert to switch statement. Handle spurious
14399 events.
14400
14401 * win32-i386-low.c (debug_registers_changed,
14402 debug_registers_used): New.
14403 (initial_stuff): Rename to ...
14404 (i386_initial_stuff): ... this. Clear debug registers
14405 state variables.
14406 (store_debug_registers): Delete.
14407 (i386_get_thread_context): New.
14408 (load_debug_registers): Delete.
14409 (i386_set_thread_context): New.
14410 (i386_thread_added): New.
14411 (single_step): Rename to ...
14412 (i386_single_step): ... this.
14413 (do_fetch_inferior_registers): Rename to ...
14414 (i386_fetch_inferior_register): ... this.
14415 (i386_store_inferior_register): New.
14416 (the_low_target): Adapt to new interface.
14417
14418 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14419 (arm_get_thread_context): New.
14420 (arm_set_thread_context): New.
14421 (regptr): New.
14422 (do_fetch_inferior_registers): Rename to ...
14423 (arm_fetch_inferior_register): ... this.
14424 (arm_store_inferior_register): New.
14425 (arm_wince_breakpoint): Reimplement as unsigned long.
14426 (arm_wince_breakpoint_len): Define.
14427 (the_low_target): Adapt to new interface.
14428
14429 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14430 load_debug_registers. Add get_thread_context, set_thread_context,
14431 thread_added and store_inferior_register. Rename
14432 fetch_inferior_registers to fetch_inferior_register.
14433 (regptr): Remove declaration.
14434
dd6953e1
PA
144352007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14436
14437 * linux-low.c (linux_detach): Change return type to int. Return 0.
14438 * spu-low.c (spu_detach): Likewise.
14439
444d6139
PA
144402007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14441
14442 * target.h (target_ops): Change return type of detach to int.
14443 Add join.
14444 (join_inferior): New.
14445 * server.c (main): Don't skip detach support on mingw32.
14446 If the inferior doesn't support detaching return error.
14447 Call join_inferior instead of using waitpid.
14448 * linux-low.c (linux_join): New.
14449 (linux_target_op): Add linux_join.
14450 * spu-low.c (spu_join): New.
14451 (spu_target_ops): Add spu_join.
14452 * win32-low.c (win32_detach): Adapt to new interface.
14453 Reopen current_process_handle before detaching. Issue a child
14454 resume before detaching.
14455 (win32_join): New.
14456 (win32_target_op): Add win32_join.
14457
1d5315fe
PA
144582007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14459
14460 * win32-low.c (win32-attach): Fix return value.
14461 * target.h (target_ops): Describe ATTACH return values.
14462
bf914831
PA
144632007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14464
14465 * win32-low.c (GETPROCADDRESS): Define.
14466 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14467 (winapi_DebugSetProcessKillOnExit): Likewise.
14468 (win32_create_inferior): Force usage of ansi CreateProcessA.
14469 (win32_attach): Use GETPROCADDRESS.
14470 (win32_detach): Likewise.
14471
f72f3e60
PA
144722007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14473
14474 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14475
ed50f18f
PA
144762007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14477
14478 * win32-low.c: Commit leftover changes from 2007-03-29.
14479
0c2ead7e
DJ
144802007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14481
14482 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14483 fields short instead of int. Add explicit padding.
14484 (i387_cache_to_fsave): Remove unnecessary casts.
14485 (i387_fsave_to_cache): Doc fix.
14486 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14487
73725ff3
DJ
144882007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14489
14490 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14491 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14492
d99f33d8
PA
144932007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14494
14495 * configure.srv (arm*-*-mingw32ce*): Move near the other
14496 arm targets.
14497
68070c10
PA
144982007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14499
2482afc6 14500 * configure.ac: Add errno checking.
68070c10
PA
14501 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14502 sys/file.h and malloc.h.
14503 (AC_CHECK_DECLS): Add perror.
14504 (srv_mingwce): Handle.
2482afc6 14505 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14506 win32-i386-low.o to srv_tgtobj.
14507 (i[34567]86-*-mingw*): Likewise.
14508 (arm*-*-mingw32ce*): Add case.
14509 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14510 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14511 [__MINGW32CE__] (strerror): New function.
14512 [__MINGW32CE__] (errno): Define to GetLastError.
14513 [__MINGW32CE__] (COUNTOF): New macro.
14514 (remote_open): Remove extra close call.
14515 * mem-break.c (delete_breakpoint_at): New function.
14516 * mem-break.h (delete_breakpoint_at): Declare.
14517 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14518 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14519 [USE_WIN32API] (read, write): Add char* casts.
14520 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14521 * server.h: Include wincecompat.h on Windows CE.
14522 [HAVE_ERRNO_H]: Check.
14523 (perror): Declare if not declared.
14524 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14525 (perror_with_name): Remove errno declaration.
14526 * wincecompat.h: New.
14527 * wincecompat.c: New.
14528 * win32-low.h: New.
14529 * win32-arm-low.c: New.
14530 * win32-i386-low.c: New.
14531 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14532 (OUTMSG2): Make it safe.
14533 (_T): New macro.
14534 (COUNTOF): New macro.
14535 (NUM_REGS): Get it from the low target.
14536 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14537 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14538 (thread_rec): Let low target handle debug registers.
14539 (child_add_thread): Likewise.
14540 (child_init_thread_list): Likewise.
14541 (continue_one_thread): Likewise.
14542 (regptr): New.
14543 (do_child_fetch_inferior_registers): Move to ...
14544 * win32-i386-low.c: ... here, and rename to ...
14545 (do_fetch_inferior_registers): ... this.
889bf7c5 14546 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14547 Go through the low target.
14548 (do_child_store_inferior_registers): Use regptr.
14549 (strwinerror): New function.
14550 (win32_create_inferior): Handle Windows CE.
14551 Use strwinerror instead of strerror on Windows error
14552 codes. Add program to the error output.
14553 Don't close the main thread handle on Windows CE.
14554 (win32_attach): Use coredll.dll on Windows CE.
14555 (win32_kill): Close current process and current
14556 thread handles.
14557 (win32_detach): Use coredll.dll on Windows CE.
14558 (win32_resume): Let low target handle debug registers, and
14559 step request.
14560 (handle_exception): Add/Remove initial breakpoint. Avoid
14561 non-existant WSTOPSIG on Windows CE.
14562 (win32_read_inferior_memory): Cast to remove warning.
14563 (win32_arch_string): Go through the low target.
14564 (initialize_low): Call set_breakpoint_data with the low
14565 target's breakpoint.
14566 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14567 FOP_REGNUM, mappings): Move to ...
14568 * win32-i386-low.c: ... here.
14569 * win32-low.c (win32_thread_info): Move to ...
14570 * win32-low.h: ... here.
14571 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14572 win32-arm-low.c and wincecompat.c.
14573 (all:): Add $EXEEXT.
14574 (install-only:): Likewise.
14575 (gdbserver:): Likewise.
14576 (gdbreplay:): Likewise.
14577 * config.in: Regenerate.
14578 * configure: Regenerate.
14579
41093d81
PA
145802007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14581
14582 * win32-low.c: Rename typedef thread_info to
14583 win32_thread_info throughout.
14584
544afa54
PA
145852007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14586
14587 * win32-i386-low.c: Rename to ...
14588 * win32-low.c: ... this.
14589 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14590 * Makefile.in: Likewise.
14591
bce7165d
PA
145922007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14593
14594 * remote-utils.c (monitor_output): Constify msg parameter.
14595 * server.h (monitor_output): Likewise.
14596 * win32-i386-low.c (handle_output_debug_string): New.
14597 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14598 handle_output_debug_string.
14599 (get_child_debug_event): Likewise.
14600
506c7aa0
DJ
146012007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14602
14603 * server.c (main): Correct strtoul check.
14604
42c81e2a
DJ
146052007-03-27 Jon Ringle <jon@ringle.org>
14606
14607 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14608
9453113a
DJ
146092007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14610
14611 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14612
64a69107
DJ
146132007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14614
14615 * terminal.h: Check HAVE_SGTTY_H.
14616
146172007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14618
14619 * remote-utils.c (remote_open): Print out the assigned port number.
14620
c74d0ad8
DJ
146212007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14622
14623 * remote-utils.c (monitor_output): New function.
14624 * server.c (debug_threads): Define here.
14625 (monitor_show_help): New function.
14626 (handle_query): Handle qRcmd.
14627 (main): Do not handle 'd' packet.
14628 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14629 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14630 of debug_threads.
14631
de7c3b4a
PA
146322007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14633
14634 * Makefile.in (EXEEXT): New.
14635 (clean): Use $(EXEEXT).
14636
ef57601b
PA
146372007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14638
14639 * target.h (target_ops): Rename send_signal to request_interrupt,
14640 and remove enum target_signal parameter.
14641 * linux-low.c (linux_request_interrupt): Rename from
14642 linux_send_signal, and always send SIGINT.
14643 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14644 and always send SIGINT.
14645 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14646 of send_signal.
14647 (input_interrupt): Likewise.
14648
820f2bda
PA
146492007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14650
14651 * server.c (get_features_xml): Check if target implemented
14652 arch_string.
14653 * win32-i386-low.c (win32_arch_string): New.
14654 (win32_target_ops): Add win32_arch_string as arch_string member.
14655
ab39bf24
UW
146562007-02-22 Markus Deuling <deuling@de.ibm.com>
14657
14658 * spu-low.c (spu_arch_string): New.
14659 (spu_target_ops): Add spu_arch_string.
14660
61ff6e04
DJ
146612007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14662
14663 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14664 * configure.ac: Do not check for terminal.h.
14665 * configure, config.in: Regenerated.
14666
fb1e4ffc
DJ
146672007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14668
14669 * Makefile.in (OBS): Add $(XML_BUILTIN).
14670 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14671 (clean): Update.
14672 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14673 (arm-with-iwmmxt.c): New.
14674 * config.in, configure: Regenerate.
14675 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14676 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14677 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14678 (arm*-*-linux*): Add iWMMXt and regset support.
14679 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14680 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14681 (arm_store_wmmxregset, target_regsets): New.
14682 * server.c (get_features_xml): Take annex argument. Check builtin
14683 XML documents.
14684 (handle_query): Handle multiple annexes.
14685
0f48aa01
DJ
146862007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14687
14688 * remote-utils.c [USE_WIN32API] (read, write): Define.
14689 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14690 write.
14691
23181151
DJ
146922007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14693
14694 * linux-i386-low.c (the_low_target): Set arch_string.
14695 * linux-x86-64-low.c (the_low_target): Likewise.
14696 * linux-low.c (linux_arch_string): New.
14697 (linux_target_ops): Add it.
14698 * linux-low.h (struct linux_target_ops): Add arch_string.
14699 * server.c (write_qxfer_response): Use const void * for DATA.
14700 (get_features_xml): New.
14701 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14702 * target.h (struct target_ops): Add arch_string method.
14703
9d606399
DJ
147042007-01-03 Denis Pilat <denis.pilat@st.com>
14705 Daniel Jacobowitz <dan@codesourcery.com>
14706
14707 * linux-low.c (linux_kill): Handle being called with no threads.
14708 * win32-i386-low.c (win32_kill): Likewise.
14709 (get_child_debug_event): Clear current_process_handle.
14710
147112006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14712 Daniel Jacobowitz <dan@codesourcery.com>
14713
14714 * remote-utils.c (remote_open): Check the type of specified
14715 serial port devices before opening them.
14716 * server.c (main): Kill the inferior if an error occurs during
14717 the first remote_open.
14718
a5e13d24
DJ
147192006-12-05 Markus Deuling <deuling@de.ibm.com>
14720
14721 * README: Update supported targets.
14722
186947f7
DJ
147232006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14724
14725 * Makefile.in (clean): Remove reg-mips64.c.
14726 (reg-mips64.c, reg-mips64.o): New rules.
14727 * configure.srv: Handle mips64. Include regset support for mips.
14728 * linux-mips-low.c (union mips_register): New.
14729 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14730 (mips_breakpoint, mips_breakpoint_at): Use int.
14731 (mips_collect_register, mips_supply_register)
14732 (mips_collect_register_32bit, mips_supply_register_32bit)
14733 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14734 (mips_store_fpregset, target_regsets): New.
14735 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14736
a13e2c95
UW
147372006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14738
14739 * configure.srv: Add target "spu*-*-*".
14740 * Makefile.in (clean): Remove reg-spu.c.
14741 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14742 * spu-low.c: New file.
14743
cb7283db
DJ
147442006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14745
14746 * configure.ac: Correct td_thr_tls_get_addr test.
14747 * configure: Regenerated.
14748
89be2091
DJ
147492006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14750
14751 * linux-low.c (linux_wait_for_event): Reformat. Use the
14752 pass_signals array.
14753 * remote-utils.c (decode_address_to_semicolon): New.
14754 * server.c (pass_signals, handle_general_set): New.
14755 (handle_query): Mention QPassSignals for qSupported.
14756 (main): Call handle_general_set.
14757 * server.h (pass_signals, decode_address_to_semicolon): New.
14758
000ef4f0
DJ
147592006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14760
14761 * server.c (handle_query): Correct error handling for read_auxv.
14762
b7149293
UW
147632005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14764
14765 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14766 and srv_linux_thread_db to yes.
14767 * linux-s390-low.c (s390_fill_gregset): New function.
14768 (target_regsets): Define data structure.
14769
dae5f5cf
DJ
147702006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14771
14772 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14773 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14774 * config.in, configure: Regenerated.
14775 * inferiors.c (gdb_id_to_thread): New function.
14776 (gdb_id_to_thread_id): Use it.
14777 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14778 * linux-low.h (struct process_info): Add th member.
14779 (thread_db_get_tls_address): New prototype.
14780 * remote-utils.c (decode_address): Make non-static.
14781 * server.c (handle_query): Handle qGetTLSAddr.
14782 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14783 * target.h (struct target_ops): Add get_tls_address.
14784 * thread-db.c (maybe_attach_thread): Save the thread handle.
14785 (thread_db_get_tls_address): New.
14786
32ca6d61
DJ
147872006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14788
14789 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14790 (linux_resume_one_process): Take a siginfo_t *. Update all
14791 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14792 (struct pending_signals): Add a siginfo_t.
14793 (linux_wait_for_process): Always set last_status.
14794 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14795 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14796 * linux-low.h (struct process_info): Add last_status.
14797
5ffff7c1
DJ
147982006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14799
14800 * remote-utils.c (try_rle): New function.
14801 (putpkt_binary): Use it.
14802
8695c747
DJ
148032006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14804
14805 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14806 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14807 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14808 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14809 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14810 point registers.
14811
290fadea
RS
148122006-08-08 Richard Sandiford <richard@codesourcery.com>
14813
14814 * server.c (terminal_fd): New variable.
14815 (old_foreground_pgrp): Likewise.
14816 (restore_old_foreground_pgrp): New function.
14817 (start_inferior): Record the terminal file descriptor in terminal_fd
14818 and its original foreground group in old_foreground_pgrp. Register
14819 restore_old_foreground_pgrp with atexit().
14820
9f2e1e63
DJ
148212006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14822
14823 * server.c (handle_query): Correct qPart to qXfer.
14824
b80864fb
DJ
148252006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14826
14827 * configure.ac: Check for more headers which are missing on
14828 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14829 * configure.srv: Add Cygwin and mingw32.
14830 * remote-utils.c: Don't include headers unconditionally which
14831 are missing on mingw32. Include <winsock.h> for mingw32.
14832 (remote_open): Adjust for mingw32 support. Flush
14833 standard error after writing to it.
14834 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14835 (unblock_async_io, enable_async_io, disable_async_io)
14836 (readchar, getpkt): Update for Winsock support.
14837 (prepare_resume_reply): Expect a protocol signal number.
14838 * server.c: Disable <sys/wait.h> on mingw32.
14839 (start_inferior): Adjust for mingw32 support. Flush
14840 standard error after writing to it.
14841 (attach_inferior): Likewise. Use protocol signal
14842 numbers.
14843 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14844 and names.
14845 * win32-i386-low.c: New file.
14846 * Makefile.in (XM_CLIBS): Set.
14847 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14848 (win32-i386-low.o): New dependency rule.
14849 * linux-low.c (linux_wait): Use target signal numbers.
14850 * target.h (struct target_ops): Doc fix.
14851 * server.h (target_signal_to_name): New prototype.
14852 * gdbreplay.c: Don't include headers unconditionally which
14853 are missing on mingw32. Include <winsock.h> for mingw32.
14854 (remote_close, remote_open): Adjust for Winsock support.
14855 * configure, config.in: Regenerated.
14856
0876f84a
DJ
148572006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14858
14859 * server.c (decode_xfer_read, write_qxfer_response): New.
14860 (handle_query): Take a packet length argument. Handle
14861 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14862 the qSupported response.
14863 (main): Update call to handle_query.
14864
01f9e8fa
DJ
148652006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14866
14867 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14868 (putpkt_binary): Renamed from putpkt and adjusted for binary
14869 data.
14870 (putpkt): New wrapper for putpkt_binary.
14871 (readchar): Don't mask off the high bit.
14872 (decode_X_packet): New function.
14873 * server.c (main): Call putpkt_binary if a handler sets the packet
14874 length. Save the length of the incoming packet. Handle 'X'.
14875 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14876
be2a5f71
DJ
148772006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14878
14879 * server.c (handle_query): Handle qSupported.
14880
ea025f5f
DJ
148812006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14882
14883 * remote-utils.c (all_symbols_looked_up): New variable.
14884 (look_up_one_symbol): Check it.
14885 * server.h (look_up_one_symbol): New declaration.
14886 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14887
9308fc88
DJ
148882006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14889
14890 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14891 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14892 (PTRACE_GET_THREAD_AREA): Define.
14893 (ps_get_thread_area): New function.
14894
52fb6437
NS
148952006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14896
14897 * configure.srv (m68k*-*-uclinux*): New target.
14898 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14899 (linux_resume_one_process): Remove extraneous cast.
14900 (linux_read_offsets): New.
14901 (linux_target_op): Add linux_read_offsets on mmuless systems.
14902 * server.c (handle_query): Add qOffsets logic.
14903 * target.h (struct target_ops): Add read_offsets.
14904
21b0f40c
DJ
149052006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14906
14907 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14908 (PTRACE_GET_THREAD_AREA): Define.
14909 (ps_get_thread_area): New function.
14910 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14911 (linux-x86-64-low.o): Update.
14912
0050a760
DJ
149132006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14914
14915 * configure.ac: Remove checks for prfpregset_t.
14916 * gdb_proc_service.h: New file.
14917 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14918 new "gdb_proc_service.h".
14919 * proc-service.c: Likewise.
14920 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14921 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14922 * Makefile.in (gdb_proc_service_h): Updated.
14923 * configure, config.in: Regenerated.
14924
b92a518e
DJ
149252006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14926
14927 * remote-utils.c (prepare_resume_reply): Move declaration
14928 of gdb_id_from_wait to the top of the block.
14929
545587ee
DJ
149302006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14931
14932 * linux-low.c (regsets_store_inferior_registers): Read the regset
14933 from the target before filling it.
14934
9db87ebd
DJ
149352006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14936
14937 * server.c (attach_inferior): Return SIGTRAP for a successful
14938 attach.
14939
dd24457d
DJ
149402006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14941
14942 * Makefile.in (OBS): Add version.o.
14943 (STAGESTUFF): Delete.
14944 (version.o): Add dependencies.
14945 (version.c): Replace rule.
14946 (clean): Remove version.c.
14947 * server.c (gdbserver_version): New.
14948 (gdbserver_usage): Use printf.
14949 (main): Handle --version and --help.
14950 * server.h (version, host_name): Add declarations.
14951
6f0f660e
EZ
149522005-12-23 Eli Zaretskii <eliz@gnu.org>
14953
889bf7c5
PA
14954 * linux-arm-low.c:
14955 * linux-arm-low.c:
14956 * inferiors.c:
14957 * i387-fp.h:
14958 * i387-fp.c:
14959 * gdbreplay.c:
14960 * regcache.c:
14961 * proc-service.c:
14962 * mem-break.h:
14963 * mem-break.c:
14964 * linux-x86-64-low.c:
14965 * linux-sh-low.c:
14966 * linux-s390-low.c:
14967 * linux-ppc64-low.c:
14968 * linux-ppc-low.c:
14969 * linux-mips-low.c:
14970 * linux-m68k-low.c:
14971 * linux-m32r-low.c:
14972 * linux-low.h:
14973 * linux-low.c:
14974 * linux-ia64-low.c:
14975 * linux-i386-low.c:
14976 * linux-crisv32-low.c:
14977 * thread-db.c:
14978 * terminal.h:
14979 * target.h:
14980 * target.c:
14981 * server.h:
14982 * server.c:
14983 * remote-utils.c:
14984 * regcache.h:
14985 * utils.c:
14986 * Makefile.in:
14987 * configure.ac:
6f0f660e
EZ
14988 * gdbserver.1: Add (C) after Copyright. Update the FSF
14989 address.
14990
9d1fb177
DJ
149912005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14992
14993 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14994 (arm_breakpoint_at): Recognize both breakpoints.
14995 (the_low_target): Use the correct breakpoint instruction.
14996
011a70c2
DJ
149972005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14998
14999 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
15000 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
15001 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
15002 (the_low_target): Update.
15003
7fb85e41
AS
150042005-10-25 Andreas Schwab <schwab@suse.de>
15005
15006 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
15007
15008 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
15009 (ia64_num_regs): Reduce to 462.
15010
3db0444b
DJ
150112005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
15012
15013 * acinclude.m4: Correct quoting.
15014 * aclocal.m4: Regenerated.
15015
15016 Suggested by SZOKOVACS Robert <szo@ies.hu>:
15017 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
15018 (thread_db_init): Call thread_db_err_str.
15019 * configure.ac: Check for TD_VERSION.
15020 * config.in, configure: Regenerated.
15021
bee0189a
DJ
150222005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
15023
15024 * server.h (error, fatal, warning): Add ATTR_FORMAT.
15025
e9d25b98
DJ
150262005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15027
15028 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
15029 is not available. Define HAVE_PTRACE_GETREGS if it is.
15030 * config.in, configure: Regenerated.
15031 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
15032 * linux-i386-low.c, linux-m68k-low.c: Update to use
15033 HAVE_PTRACE_GETREGS.
15034 * linux-low.c (regsets_fetch_inferior_registers)
15035 (regsets_store_inferior_registers): Only return 0 if we processed
15036 GENERAL_REGS.
15037 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
15038 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
15039
a06660f7
DJ
150402005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15041
15042 * inferiors.c (struct thread_info): Add gdb_id.
15043 (add_thread): Add gdb_id argument.
15044 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
15045 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
15046 calls to add_thread.
15047 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
15048 * server.c (handle_query): Use thread_to_gdb_id.
15049 (handle_v_cont, main): Use gdb_id_to_thread_id.
15050 * server.h (add_thread): Update prototype.
15051 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
15052 prototypes.
15053
5a1f5858
DJ
150542005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
15055
15056 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15057 left-padded registers.
15058 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15059 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15060
e122f1f5
SE
150612005-07-01 Steve Ellcey <sje@cup.hp.com>
15062
15063 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15064 * configure: Regenerate.
15065 * config.in: Regenerate.
15066 * server.h (NEED_DECLARATION_STRERROR):
15067 Replace with !HAVE_DECL_STRERROR.
15068
d592fa2f
DJ
150692005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15070
15071 * linux-low.c (linux_wait, linux_send_signal): Don't test
15072 an unsigned long variable for > 0 if it could be MAX_ULONG.
15073 * server.c (myresume): Likewise.
15074 * target.c (set_desired_inferior): Likewise.
15075
ccbd4912
MK
150762005-06-13 Mark Kettenis <kettenis@gnu.org>
15077
15078 * configure.ac: Simplify and improve check for socklen_t.
15079 * configure, config.in: Regenerate.
15080
f450004a
DJ
150812005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15082
15083 * acconfig.h: Remove.
15084 * configure.ac: Add a test for socklen_t. Use three-argument
15085 AC_DEFINE throughout.
15086 * config.in: Regenerated using autoheader 2.59.
15087 * configure: Regenerated.
15088
15089 * gdbreplay.c (socklen_t): Provide a default.
15090 (remote_open): Use socklen_t.
15091 * remote-utils.c (socklen_t): Provide a default.
15092 (remote_open): Use socklen_t.
15093 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15094 unsigned char.
15095
15096 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15097 char for buffers.
15098 * linux-low.c (linux_read_memory, linux_write_memory)
15099 (linux_read_auxv): Likewise.
15100 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15101 (check_mem_write): Likewise.
15102 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15103 Likewise.
15104 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15105 (registers_from_string, register_data): Likewise.
15106 * server.c (handle_query, main): Likewise.
15107 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15108 (decode_M_packet): Likewise.
15109 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15110 * target.h (struct target_ops): Update read_memory, write_memory,
15111 and read_auxv.
15112 (read_inferior_memory, write_inferior_memory): Update.
15113 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15114 to unsigned char *.
15115 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15116 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15117 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15118 linux-s390-low.c, linux-sh-low.c: Update for changes in
15119 read_inferior_memory and the_low_target->breakpoint.
15120
eee84df1
DJ
151212005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15122
15123 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15124 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15125 * configure.srv: Add powerpc64-*-linux*.
15126 * linux-ppc64-low.c: New file.
15127
45b134e5
OF
151282005-05-23 Orjan Friberg <orjanf@axis.com>
15129
15130 * linux-cris-low.c: New file with support for CRIS.
15131 * linux-crisv32-low.c: Ditto for CRISv32.
15132 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15133 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15134 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15135 reg-crisv32.o, and reg-crisv32.c to make rules.
15136 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15137 recognized targets.
15138
48d93c75
UW
151392005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15140
15141 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15142 of sizeof (PTRACE_XFER_TYPE).
15143 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15144
e013ee27
OF
151452005-05-12 Orjan Friberg <orjanf@axis.com>
15146
889bf7c5 15147 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15148 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15149 pointers for hardware watchpoint support.
15150 * linux-low.h (struct linux_target_ops): Ditto.
15151 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15152 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15153 to linux_target_ops.
15154 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15155 reply packet.
15156 * server.c (main): Recognize 'Z' and 'z' packets.
15157
b0ded00b
UW
151582005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15159
15160 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15161 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15162 (the_low_target): Add new members.
15163
8643e2ad
DJ
151642005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15165
15166 * proc-service.c (ps_lgetregs): Search all_processes instead of
15167 all_threads.
15168
fc620387
DJ
151692005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15170
15171 * server.c (start_inferior): Change return type to int.
15172 (attach_inferior): Change sigptr to int *.
15173 (handle_v_cont, handle_v_requests): Change signal to int *.
15174 (main): Change signal to int.
15175
151762005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15177
15178 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15179 * configure.srv: Add m32r*-*-linux*.
15180 * linux-m32r-low.c: New file.
15181
e0e76420
DJ
151822005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15183
15184 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15185
a1928bad
DJ
151862005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15187
15188 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15189 Take unsigned long arguments for PIDs.
15190 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15191 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15192 (wait_for_sigstop, linux_resume_one_process)
15193 (regsets_fetch_inferior_registers, linux_send_signal)
15194 (linux_read_auxv): Likewise. Update the types of variables holding
15195 PIDs. Update format string specifiers.
15196 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15197 * remote-utils.c (prepare_resume_reply): Likewise.
15198 * server.c (cont_thread, general_thread, step_thread)
15199 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15200 unsigned long.
15201 (handle_query): Update format specifiers.
15202 (handle_v_cont, main): Use strtoul for thread IDs.
15203 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15204 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15205 (general_thread, step_thread, thread_from_wait)
15206 (old_thread_from_wait): Update.
15207 * target.h (struct thread_resume): Use unsigned long for THREAD.
15208 (struct target_ops): Use unsigned long for arguments to attach and
15209 thread_alive.
15210
dcdb98d2
DJ
152112005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15212
15213 * acinclude.m4: Include bfd/bfd.m4 directly.
15214 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15215 <agriffis@toolchain.org>.
15216 * aclocal.m4, configure: Regenerated.
15217
bec39cab
AC
152182005-01-07 Andrew Cagney <cagney@gnu.org>
15219
15220 * configure.ac: Rename configure.in, require autoconf 2.59.
15221 * configure: Re-generate.
15222
434c4c77
DJ
152232004-12-08 Daniel Jacobowitz <dan@debian.org>
15224
15225 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15226 LIBS when finished.
15227 * aclocal.m4: Regenerated.
15228 * configure: Regenerated.
15229
db1d3e1b
AS
152302004-11-21 Andreas Schwab <schwab@suse.de>
15231
15232 * linux-m68k-low.c (m68k_num_gregs): Define.
15233 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15234 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15235 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15236 (m68k_breakpoint_at): New. Add to the_low_target.
15237
15238 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15239 srv_linux_thread_db to yes.
15240
43360365
JB
152412004-10-20 Joel Brobecker <brobecker@gnat.com>
15242
15243 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15244 (ARCH_SET_FS): Likewise.
15245 (ARCH_GET_FS): Likewise.
15246 (ARCH_GET_GS): Likewise.
15247
fd500816
DJ
152482004-10-16 Daniel Jacobowitz <dan@debian.org>
15249
15250 * linux-i386-low.c (ps_get_thread_area): New.
15251 * linux-x86-64-low.c (ps_get_thread_area): New.
15252 * linux-low.c: Include <sys/syscall.h>.
15253 (linux_kill_one_process): Don't kill the first thread here.
15254 (linux_kill): Kill the first thread here.
15255 (kill_lwp): New function.
15256 (send_sigstop, linux_send_signal): Use it.
15257 * proc-service.c: Clean up #ifdefs.
15258 (fpregset_info): Delete.
15259 (ps_lgetregs): Update and enable implementation.
15260 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15261 implementations.
15262 * remote-utils.c (struct sym_cache, symbol_cache): New.
15263 (input_interrupt): Print a clearer message.
15264 (async_io_enabled): New variable.
15265 (enable_async_io, disable_async_io): Use it. Update comments.
15266 (look_up_one_symbol): Use the symbol cache.
15267 * thread-db.c (thread_db_look_up_symbols): New function.
15268 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15269
f6de3c42
DJ
152702004-10-16 Daniel Jacobowitz <dan@debian.org>
15271
15272 * configure.in: Test for -rdynamic.
15273 * configure: Regenerated.
15274 * Makefile (INTERNAL_LDFLAGS): New.
15275 (gdbserver, gdbreplay): Use it.
15276
2c0fc042
AC
152772004-09-02 Andrew Cagney <cagney@gnu.org>
15278
15279 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15280
075b3282
DJ
152812004-03-23 Daniel Jacobowitz <drow@mvista.com>
15282
15283 * linux-low.c (linux_wait): Clear all_processes list also.
15284
fa6a77dc
DJ
152852004-03-12 Daniel Jacobowitz <drow@mvista.com>
15286
15287 * linux-low.c: Include <errno.h>. Remove extern declaration of
15288 errno.
15289
6d782a97
DJ
152902004-03-12 Daniel Jacobowitz <drow@mvista.com>
15291
15292 * gdbreplay.c, server.h, utils.c: Update copyright years.
15293
3a7fb99b
DJ
152942004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15295
15296 * server.c (main): Print child status or termination signal from
15297 variable 'signal', not 'sig'.
15298
c3e735a6
DJ
152992004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15300
15301 * linux-low.c (linux_read_memory): Change return type to
15302 int. Check for and return error from ptrace().
15303 * target.c (read_inferior_memory): Change return type to int. Pass
15304 back return status from the_target->read_memory().
15305 * target.h (struct target_ops): Adapt *read_memory() prototype.
15306 Update comment.
15307 (read_inferior_memory): Adapt prototype.
15308 * server.c (main): Return an error packet if
15309 read_inferior_memory() returns an error.
15310
a59d1c82
DJ
153112004-03-04 Daniel Jacobowitz <drow@mvista.com>
15312
15313 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15314 Unify with other clean targets.
15315
dc3f8883
DJ
153162004-02-29 Daniel Jacobowitz <drow@mvista.com>
15317
15318 * server.c (handle_v_cont): Call set_desired_inferior.
15319
89a208da
DJ
153202004-02-29 Daniel Jacobowitz <drow@mvista.com>
15321
15322 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15323
62ea82f5
DJ
153242004-02-29 Daniel Jacobowitz <drow@mvista.com>
15325
15326 * linux-low.c (linux_wait): Unblock async I/O.
15327 (linux_resume): Block and enable async I/O.
15328 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15329 * server.h (block_async_io, unblock_async_io): Add prototypes.
15330
6910d122
DJ
153312004-02-29 Daniel Jacobowitz <drow@mvista.com>
15332
15333 * remote-utils.c (remote_open): Print a status notice after
15334 opening a TCP port.
15335 * server.c (attach_inferior): Print a status notice after
15336 attaching.
15337
153382004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15339
15340 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15341
c89dc5d4
DJ
153422004-02-26 Daniel Jacobowitz <drow@mvista.com>
15343
15344 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15345 error packet.
15346 * server.c, target.h: Update copyright years.
15347
4b8dad4a
RM
153482004-02-25 Roland McGrath <roland@redhat.com>
15349
15350 * target.h (struct target_ops): New member `read_auxv'.
15351 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15352 * linux-low.c (linux_read_auxv): New function.
15353 (linux_target_ops): Initialize `read_auxv' member to that.
15354
d7446758
JB
153552004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15356
15357 Committed by Jim Blandy <jimb@redhat.com>.
15358
15359 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15360 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15361 instead of GPR_SIZE to distiguish s390 and s390x targets.
15362
5544ad89
DJ
153632004-01-31 Daniel Jacobowitz <drow@mvista.com>
15364
15365 * linux-low.c: Update copyright year.
15366 (check_removed_breakpoint): Clear pending_is_breakpoint.
15367 (linux_set_resume_request, linux_queue_one_thread)
15368 (resume_status_pending_p): New functions.
15369 (linux_continue_one_thread): Use process->resume.
15370 (linux_resume): Only resume threads if there are no pending events.
15371 * linux-low.h (struct process_info): Add resume request
15372 pointer.
15373
2a68b70e
DJ
153742004-01-30 Daniel Jacobowitz <drow@mvista.com>
15375
15376 * regcache.c (new_register_cache): Clear the allocated register
15377 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15378
64386c31
DJ
153792003-10-13 Daniel Jacobowitz <drow@mvista.com>
15380
15381 * linux-low.c (linux_resume): Take a struct thread_resume *
15382 argument.
15383 (linux_wait): Update call.
15384 (resume_ptr): New static variable.
15385 (linux_continue_one_thread): Renamed from
15386 linux_continue_one_process. Use resume_ptr.
15387 (linux_resume): Use linux_continue_one_thread.
15388 * server.c (handle_v_cont, handle_v_requests): New functions.
15389 (myresume): New function.
15390 (main): Handle 'v' case.
15391 * target.h (struct thread_resume): New type.
15392 (struct target_ops): Change argument of "resume" to struct
15393 thread_resume *.
15394 (myresume): Delete macro.
15395
c938e9b0
L
153962003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15397
15398 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15399 (uninstall): Support DESTDIR.
15400
7f313d07
BC
15401Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15402
15403 * configure.srv: Add xscale*linux copy of arm*linux entry.
15404
3b2fc2ea
DJ
154052003-07-24 Daniel Jacobowitz <drow@mvista.com>
15406
15407 * linux-arm-low.c (arm_reinsert_addr): New function.
15408 (the_low_target): Add arm_reinsert_addr.
15409
1c0a559e
MK
154102003-07-08 Mark Kettenis <kettenis@gnu.org>
15411
15412 * mem-break.c: Remove whitespace at end of file.
15413
43d5792c
DJ
154142003-06-28 Daniel Jacobowitz <drow@mvista.com>
15415
15416 * configure.in: Check whether we need to prototype strerror.
15417 * server.h: Optionally prototype strerror.
15418 * gdbreplay.c (perror_with_name): Use strerror.
15419 * linux-low.c (linux_attach_lwp): Use strerror.
15420 * utils.c (perror_with_name): Use strerror.
15421 * config.in, configure: Regenerated.
15422
c8a86edf
DJ
154232003-06-28 Daniel Jacobowitz <drow@mvista.com>
15424
15425 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15426 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15427
73d37363
DJ
154282003-06-20 Daniel Jacobowitz <drow@mvista.com>
15429
15430 * Makefile.in (SFILES): Update.
15431 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15432 low-sun3.c: Remove files.
15433
6ad8ae5c
DJ
154342003-06-17 Daniel Jacobowitz <drow@mvista.com>
15435
15436 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15437 (linux_detach_one_process, linux_detach): New functions.
15438 (linux_target_ops): Add linux_detach.
15439 * server.c (main): Handle 'D' packet.
15440 * target.h (struct target_ops): Add "detach" member.
15441 (detach_inferior): Define.
15442
1581182a
MK
154432003-06-13 Mark Kettenis <kettenis@gnu.org>
15444
15445 From Kelley Cook <kelleycook@wideopenwest.com>:
15446 * configure.srv: Accept i[34567]86 variants.
15447
e5379b03
DJ
154482003-06-05 Daniel Jacobowitz <drow@mvista.com>
15449
15450 * linux-low.c (linux_wait_for_event): Correct comment typos.
15451 (linux_resume_one_process): Call check_removed_breakpoint.
15452 (linux_send_signal): New function.
15453 (linux_target_ops): Add linux_send_signal.
15454 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15455 of kill.
15456 * target.h (struct target_ops): Add send_signal.
15457
2ff29de4
JB
154582003-05-29 Jim Blandy <jimb@redhat.com>
15459
15460 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15461 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15462 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15463 away part of the register's value.
15464
254787d4
DJ
154652003-03-26 Daniel Jacobowitz <drow@mvista.com>
15466
15467 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15468 (linux_wait_for_event, linux_init_signals): Likewise.
15469
94e10508
DJ
154702003-03-17 Daniel Jacobowitz <drow@mvista.com>
15471
15472 * configure.in: Check for stdlib.h.
15473 * configure: Regenerated.
15474 * config.in: Regenerated.
15475
4c0711e0
DJ
154762003-01-04 Andreas Schwab <schwab@suse.de>
15477
15478 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15479
ef66e766
AC
154802003-01-02 Andrew Cagney <ac131313@redhat.com>
15481
15482 * Makefile.in: Remove obsolete code.
15483
a1358604
DJ
154842002-11-20 Daniel Jacobowitz <drow@mvista.com>
15485
15486 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15487 defined(PT_FPR0_HI).
15488
23ce3b1c
DJ
154892002-11-17 Stuart Hughes <seh@zee2.com>
15490
15491 * linux-arm-low.c (arm_num_regs): Increase.
15492 (arm_regmap): Include status register.
15493
154942002-11-17 Daniel Jacobowitz <drow@mvista.com>
15495
15496 * linux-low.c (register_addr): Remove incorrect -1 check.
15497
a9fa9f7d
DJ
154982002-08-29 Daniel Jacobowitz <drow@mvista.com>
15499
15500 * linux-low.c (linux_create_inferior): Call setpgid. Return
15501 the new PID.
15502 (unstopped_p, linux_signal_pid): Remove.
15503 (linux_target_ops): Remove linux_signal_pid.
15504 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15505 global instead of target method.
15506 * target.h (struct target_ops): Remove signal_pid. Update comment
15507 for create_inferior.
15508 * server.c (signal_pid): New variable.
15509 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15510 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15511 (attach_inferior): Set signal_pid.
15512
17574093
DJ
155132002-08-23 Daniel Jacobowitz <drow@mvista.com>
15514
15515 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15516
155172002-08-20 Jim Blandy <jimb@redhat.com>
15518
15519 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15520 default for this.
15521
155222002-08-01 Andrew Cagney <cagney@redhat.com>
15523
15524 * Makefile.in: Make chill references obsolete.
15525
155262002-07-24 Kevin Buettner <kevinb@redhat.com>
15527
15528 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15529 * configure: Regenerate.
15530 * config.in: Regenerate.
15531
155322002-07-09 David O'Brien <obrien@FreeBSD.org>
15533
15534 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15535 (perror_with_name, remote_close, remote_open, expect, play): Static.
15536
155372002-07-04 Michal Ludvig <mludvig@suse.cz>
15538
4b8dad4a 15539 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15540 byte offsets instead of an array of indexes.
15541 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15542
155432002-06-13 Daniel Jacobowitz <drow@mvista.com>
15544
15545 * regcache.c: Add comment.
15546
155472002-06-11 Daniel Jacobowitz <drow@mvista.com>
15548
15549 * thread-db.c: New file.
15550 * proc-service.c: New file.
15551 * acinclude.m4: New file.
15552 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15553 proc-service.o, and thread-db.o.
15554 (linux-low.o): Add USE_THREAD_DB.
15555 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15556 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15557 * aclocal.m4: Regenerated.
15558 * config.in: Regenerated.
15559 * configure: Regenerated.
15560 * configure.in: Check for proc_service.h, sys/procfs.h,
15561 thread_db.h, and linux/elf.h headrs.
15562 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15563 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15564 Check for -lthread_db and thread support.
15565 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15566 PowerPC, and SuperH.
15567 * i387-fp.c: Constify arguments.
15568 * i387-fp.h: Likewise.
15569 * inferiors.c: (struct thread_info): Renamed from
15570 `struct inferior_info'. Remove PID member. Use generic inferior
15571 list header. All uses updated.
15572 (inferiors, signal_pid): Removed.
15573 (all_threads): New variable.
15574 (get_thread): Define.
15575 (add_inferior_to_list): New function.
15576 (for_each_inferior): New function.
15577 (change_inferior_id): New function.
15578 (add_inferior): Removed.
15579 (remove_inferior): New function.
15580 (add_thread): New function.
15581 (free_one_thread): New function.
15582 (remove_thread): New function.
15583 (clear_inferiors): Use for_each_inferior and free_one_thread.
15584 (find_inferior): New function.
15585 (find_inferior_id): New function.
15586 (inferior_target_data): Update argument type.
15587 (set_inferior_target_data): Likewise.
15588 (inferior_regcache_data): Likewise.
15589 (set_inferior_regcache_data): Likewise.
15590 * linux-low.c (linux_bp_reinsert): Remove.
15591 (all_processes, stopping_threads, using_thrads)
15592 (struct pending_signals, debug_threads, pid_of): New.
15593 (inferior_pid): Replace with macro.
15594 (struct inferior_linux_data): Remove.
15595 (get_stop_pc, add_process): New functions.
15596 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15597 Use add_process and add_thread.
15598 (linux_attach_lwp): New function, based on old linux_attach. Use
15599 add_process and add_thread. Set stop_expected for new threads.
15600 (linux_attach): New function.
15601 (linux_kill_one_process): New function.
15602 (linux_kill): Kill all LWPs.
15603 (linux_thread_alive): Use find_inferior_id.
15604 (check_removed_breakpoints, status_pending_p): New functions.
15605 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15606 Update. Use WNOHANG. Wait for cloned processes also. Update process
15607 struct for the found process.
15608 (linux_wait_for_event): New function.
15609 (linux_wait): Use it. Support LWPs.
15610 (send_sigstop, wait_for_sigstop, stop_all_processes)
15611 (linux_resume_one_process, linux_continue_one_process): New functions.
15612 (linux_resume): Support LWPs.
15613 (REGISTER_RAW_SIZE): Remove.
15614 (fetch_register): Use register_size instead. Call supply_register.
15615 (usr_store_inferior_registers): Likewise. Call collect_register.
15616 Fix recursive case.
15617 (regsets_fetch_inferior_registers): Improve error message.
15618 (regsets_store_inferior_registers): Add debugging.
15619 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15620 (unstopped_p, linux_signal_pid): New functions.
15621 (linux_target_ops): Add linux_signal_pid.
15622 (linux_init_signals): New function.
15623 (initialize_low): Call it. Initialize using_threads.
15624 * regcache.c (inferior_regcache_data): Add valid
15625 flag.
15626 (get_regcache): Fetch registers lazily. Add fetch argument
15627 and update all callers.
15628 (regcache_invalidate_one, regcache_invalidate): New
15629 functions.
15630 (new_register_cache): Renamed from create_register_cache.
15631 Return the new regcache.
15632 (free_register_cache): Change argument to a void *.
15633 (registers_to_string, registers_from_string): Call get_regcache
15634 with fetch flag set.
15635 (register_data): Make static. Pass fetch flag to get_regcache.
15636 (supply_register): Call get_regcache with fetch flag clear.
15637 (collect_register): Call get_regcache with fetch flag set.
15638 (collect_register_as_string): New function.
15639 * regcache.h: Update.
15640 * remote-utils.c (putpkt): Flush after debug output and use
15641 stderr.
15642 Handle input interrupts while waiting for an ACK.
15643 (input_interrupt): Use signal_pid method.
15644 (getpkt): Flush after debug output and use stderr.
15645 (outreg): Use collect_register_as_string.
15646 (new_thread_notify, dead_thread_notify): New functions.
15647 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15648 and general_thread.
15649 (look_up_one_symbol): Flush after debug output.
15650 * server.c (step_thread, server_waiting): New variables.
15651 (start_inferior): Don't use signal_pid. Update call to mywait.
15652 (attach_inferior): Update call to mywait.
15653 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15654 (main): Don't fetch/store registers explicitly. Use
15655 set_desired_inferior. Support proposed ``Hs'' packet. Update
15656 calls to mywait.
15657 * server.h: Update.
15658 (struct inferior_list, struct_inferior_list_entry): New.
15659 * target.c (set_desired_inferior): New.
15660 (write_inferior_memory): Constify.
15661 (mywait): New function.
15662 * target.h: Update.
15663 (struct target_ops): New signal_pid method.
15664 (mywait): Removed macro, added prototype.
15665
15666 * linux-low.h (regset_func): Removed.
15667 (regset_fill_func, regset_store_func): New.
15668 (enum regset_type): New.
15669 (struct regset_info): Add type field. Use new operation types.
15670 (struct linux_target_ops): stop_pc renamed to get_pc.
15671 Add decr_pc_after_break and breakpoint_at.
15672 (get_process, get_thread_proess, get_process_thread)
15673 (strut process_info, all_processes, linux_attach_lwp)
15674 (thread_db_init): New.
15675
15676 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15677 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15678 (the_low_target): Add new members.
15679 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15680 (i386_store_fpxregset): Constify.
15681 (target_regsets): Add new kind identifier.
15682 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15683 (i386_set_pc): Add debugging.
15684 (i386_breakpoint_at): New function.
15685 (the_low_target): Add new members.
15686 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15687 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15688 (mips_breakpoint_at): New.
15689 (the_low_target): Add new members.
15690 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15691 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15692 (the_low_target): Add new members.
15693 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15694 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15695 (the_low_target): Add new members.
15696 * linux-x86-64-low.c (target_regsets): Add new kind
15697 identifier.
15698
156992002-05-15 Daniel Jacobowitz <drow@mvista.com>
15700
15701 From Martin Pool <mbp@samba.org>:
15702 * server.c (gdbserver_usage): New function.
15703 (main): Call it.
15704
157052002-05-14 Daniel Jacobowitz <drow@mvista.com>
15706
15707 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15708 stop_at -> stop_pc.
15709
157102002-05-04 Andrew Cagney <ac131313@redhat.com>
15711
15712 * Makefile.in: Remove obsolete code.
15713
157142002-04-24 Michal Ludvig <mludvig@suse.cz>
15715
15716 * linux-low.c (regsets_fetch_inferior_registers),
15717 (regsets_store_inferior_registers): Removed cast to int from
15718 ptrace() calls.
15719 * regcache.h: Added declaration of struct inferior_info.
15720
157212002-04-20 Daniel Jacobowitz <drow@mvista.com>
15722
15723 * inferiors.c (struct inferior_info): Add regcache_data.
15724 (add_inferior): Call create_register_cache.
15725 (clear_inferiors): Call free_register_cache.
15726 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15727 * regcache.c (struct inferior_regcache_data): New.
15728 (registers): Remove.
15729 (get_regcache): New function.
15730 (create_register_cache, free_register_cache): New functions.
15731 (set_register_cache): Don't initialize the register cache here.
15732 (registers_to_string, registers_from_string, register_data): Call
15733 get_regcache.
15734 * regcache.h: Add prototypes.
15735 * server.h: Likewise.
15736
157372002-04-20 Daniel Jacobowitz <drow@mvista.com>
15738
15739 * mem-break.c: New file.
15740 * mem-break.h: New file.
15741 * Makefile.in: Add mem-break.o rule; update server.h
15742 dependencies.
15743 * inferiors.c (struct inferior_info): Add target_data
15744 member.
15745 (clear_inferiors): Free target_data member if set.
15746 (inferior_target_data, set_inferior_target_data): New functions.
15747 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15748 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15749 * linux-low.c (linux_bp_reinsert): New variable.
15750 (struct inferior_linux_data): New.
15751 (linux_create_inferior): Use set_inferior_target_data.
15752 (linux_attach): Likewise. Call add_inferior.
15753 (linux_wait_for_one_inferior): New function.
15754 (linux_wait): Call it.
15755 (linux_write_memory): Add const.
15756 (initialize_low): Call set_breakpoint_data.
15757 * linux-low.h (struct linux_target_ops): Add breakpoint
15758 handling members.
15759 * server.c (attach_inferior): Remove extra add_inferior
15760 call.
15761 * server.h: Include mem-break.h. Update inferior.c
15762 prototypes.
15763 * target.c (read_inferior_memory)
15764 (write_inferior_memory): New functions.
15765 * target.h (read_inferior_memory)
15766 (write_inferior_memory): Change macros to prototypes.
15767 (struct target_ops): Update comments. Add const to write_memory
15768 definition.
15769
157702002-04-11 Daniel Jacobowitz <drow@mvista.com>
15771
15772 * linux-low.c (usr_store_inferior_registers): Support
15773 registers which are allowed to fail to store.
15774 * linux-low.h (linux_target_ops): Likewise.
15775 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15776 (ppc_cannot_store_register): FPSCR may not be storable.
15777
157782002-04-09 Daniel Jacobowitz <drow@mvista.com>
15779
15780 * server.h: Include <string.h> if HAVE_STRING_H.
15781 * ChangeLog: Correct paths in last ChangeLog entry.
15782
157832002-04-09 Daniel Jacobowitz <drow@mvista.com>
15784
15785 * linux-low.h: Remove obsolete prototypes.
15786 (struct linux_target_ops): New.
15787 (extern the_low_target): New.
15788 * linux-low.c (num_regs, regmap): Remove declarations.
15789 (register_addr): Use the_low_target explicitly.
15790 (fetch_register): Likewise.
15791 (usr_fetch_inferior_registers): Likewise.
15792 (usr_store_inferior_registers): Likewise.
15793 * linux-arm-low.c (num_regs): Remove.
15794 (arm_num_regs): Define.
15795 (arm_regmap): Renamed from regmap, made static.
15796 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15797 made static.
15798 (arm_cannot_store_register): Renamed from cannot_store_register,
15799 made static.
15800 (the_low_target): New.
15801 * linux-i386-low.c (num_regs): Remove.
15802 (i386_num_regs): Define.
15803 (i386_regmap): Renamed from regmap, made static.
15804 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15805 made static.
15806 (i386_cannot_store_register): Renamed from cannot_store_register,
15807 made static.
15808 (the_low_target): New.
15809 * linux-ia64-low.c (num_regs): Remove.
15810 (ia64_num_regs): Define.
15811 (ia64_regmap): Renamed from regmap, made static.
15812 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15813 made static.
15814 (ia64_cannot_store_register): Renamed from cannot_store_register,
15815 made static.
15816 (the_low_target): New.
15817 * linux-m68k-low.c (num_regs): Remove.
15818 (m68k_num_regs): Define.
15819 (m68k_regmap): Renamed from regmap, made static.
15820 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15821 made static.
15822 (m68k_cannot_store_register): Renamed from cannot_store_register,
15823 made static.
15824 (the_low_target): New.
15825 * linux-mips-low.c (num_regs): Remove.
15826 (mips_num_regs): Define.
15827 (mips_regmap): Renamed from regmap, made static.
15828 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15829 made static.
15830 (mips_cannot_store_register): Renamed from cannot_store_register,
15831 made static.
15832 (the_low_target): New.
15833 * linux-ppc-low.c (num_regs): Remove.
15834 (ppc_num_regs): Define.
15835 (ppc_regmap): Renamed from regmap, made static.
15836 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15837 made static.
15838 (ppc_cannot_store_register): Renamed from cannot_store_register,
15839 made static.
15840 (the_low_target): New.
15841 * linux-s390-low.c (num_regs): Remove.
15842 (s390_num_regs): Define.
15843 (s390_regmap): Renamed from regmap, made static.
15844 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15845 made static.
15846 (s390_cannot_store_register): Renamed from cannot_store_register,
15847 made static.
15848 (the_low_target): New.
15849 * linux-sh-low.c (num_regs): Remove.
15850 (sh_num_regs): Define.
15851 (sh_regmap): Renamed from regmap, made static.
15852 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15853 made static.
15854 (sh_cannot_store_register): Renamed from cannot_store_register,
15855 made static.
15856 (the_low_target): New.
15857 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15858 (the_low_target): New.
15859
158602002-04-09 Daniel Jacobowitz <drow@mvista.com>
15861
15862 * Makefile.in: Add stamp-h target.
15863 * configure.in: Create stamp-h.
15864 * configure: Regenerated.
15865
158662002-04-09 Daniel Jacobowitz <drow@mvista.com>
15867
15868 * inferiors.c: New file.
15869 * target.c: New file.
15870 * target.h: New file.
15871 * Makefile.in: Add target.o and inferiors.o. Update
15872 dependencies.
15873 * linux-low.c (inferior_pid): New static variable,
15874 moved from server.c.
15875 (linux_create_inferior): Renamed from create_inferior.
15876 Call add_inferior. Return 0 on success instead of a PID.
15877 (linux_attach): Renamed from myattach.
15878 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15879 (linux_thread_alive): Renamed from mythread_alive.
15880 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15881 child dies.
15882 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15883 (regsets_store_inferior_registers): Correct error message.
15884 Add missing ``return 0''.
15885 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15886 (linux_store_registers): Renamed from store_inferior_registers.
15887 (linux_read_memory): Renamed from read_inferior_memory.
15888 (linux_write_memory): Renamed from write_inferior_memory.
15889 (linux_target_ops): New structure.
15890 (initialize_low): Call set_target_ops ().
15891 * remote-utils.c (unhexify): New function.
15892 (hexify): New function.
15893 (input_interrupt): Send signals to ``signal_pid''.
15894 * server.c (inferior_pid): Remove.
15895 (start_inferior): Update create_inferior call.
15896 (attach_inferior): Call add_inferior.
15897 (handle_query): New function.
15898 (main): Call handle_query for `q' packets.
15899 * server.h: Include "target.h". Remove obsolete prototypes.
15900 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15901
159022002-04-09 Daniel Jacobowitz <drow@mvista.com>
15903
15904 * Makefile.in: Add WARN_CFLAGS. Update configury
15905 dependencies.
15906 * configure.in: Check for <string.h>
15907 * configure: Regenerate.
15908 * config.in: Regenerate.
15909 * gdbreplay.c: Include needed system headers.
15910 (remote_open): Remove strchr prototype.
15911 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15912 * regcache.c (supply_register): Change buf argument to const void *.
15913 (supply_register_by_name): Likewise.
15914 (collect_register): Change buf argument to void *.
15915 (collect_register_by_name): Likewise.
15916 * regcache.h: Add missing prototypes.
15917 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15918 * server.c (handle_query): New function.
15919 (attached): New static variable, moved out of main.
15920 (main): Quiet longjmp clobber warnings.
15921 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15922 * utils.c (error): Remove NORETURN.
15923 (fatal): Likewise.
This page took 2.707691 seconds and 4 git commands to generate.