Remove usage of find_inferior in win32-low.c
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
2bee2b6c
SM
12017-11-19 Simon Marchi <simon.marchi@ericsson.com>
2
3 * win32-low.c (continue_one_thread): Return void, take argument
4 directly.
5 (child_continue): Use for_each_thread.
6
0b360f19
SM
72017-11-19 Simon Marchi <simon.marchi@ericsson.com>
8
9 * win32-i386-low.c (update_debug_registers_callback): Rename
10 to ...
11 (update_debug_registers): ... this, return void, remove pid_p arg.
12 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
13
f27866ba
SM
142017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
15
16 * inferiors.h (struct process_info): Add constructor, initialize
17 fields..
18 <syscalls_to_catch>: Change type to std::vector<int>.
19 * inferiors.c (add_process): Allocate process_info with new.
20 (remove_process): Free process_info with delete.
21 * linux-low.c (handle_extended_wait): Adjust.
22 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
23 * server.c (handle_general_set): Adjust.
24
e849ea89
PA
252017-11-16 Pedro Alves <palves@redhat.com>
26
27 * remote-utils.c (remote_close): Block SIGIO signals instead of
28 uninstalling the SIGIO handler.
29
1d0aa65c
AH
302017-11-16 Alan Hayward <alan.hayward@arm.com>
31
32 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
33
3491a34c
YQ
342017-11-16 Yao Qi <yao.qi@linaro.org>
35
36 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
37 (tic6x_store_gregset): Likewise.
38 (tic6x_usrregs_info): Move it up.
39
a602f924
AH
402017-11-15 Alan Hayward <alan.hayward@arm.com>
41
42 * Makefile.in: Update arch rules.
43 * configure.srv: Explicitly mark arch/ files.
44
5616b6c3
AS
452017-11-13 Andreas Schwab <schwab@suse.de>
46
47 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
48 function.
49 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
50
d1928160
PA
512017-11-06 Pedro Alves <palves@redhat.com>
52
53 * config.in, configure: Regenerate.
54
bac608e7
SM
552017-10-27 Simon Marchi <simon.marchi@ericsson.com>
56
57 * target.c (struct thread_search): Remove.
58 (thread_search_callback): Remove.
59 (prepare_to_access_memory): Use for_each_thread instead of
60 find_inferior. Inline code from thread_search_callback.
61
eaddb425
SM
622017-10-27 Simon Marchi <simon.marchi@ericsson.com>
63
64 * server.c (struct visit_actioned_threads_data): Remove.
65 (visit_actioned_threads): Change prototype to take arguments
66 directly.
67 (resume): Use find_thread instead of find_inferior.
68
99078d34
SM
692017-10-27 Simon Marchi <simon.marchi@ericsson.com>
70
71 * server.c (queue_stop_reply_callback): Change prototype, return
72 void.
73 (find_status_pending_thread_callback): Remove.
74 (handle_status): Replace find_inferior with find_thread and
75 for_each_thread.
76
cc628f3d
AH
772017-10-25 Alan Hayward <alan.hayward@arm.com>
78
79 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
80 with REGNO.
81 (aarch64_store_gregset): Likewise.
82 (aarch64_fill_fpregset): Likewise.
83 (aarch64_store_fpregset): Likewise.
84
4d3bb80e
SM
852017-10-21 Simon Marchi <simon.marchi@ericsson.com>
86
87 * gdbthread.h (find_thread, for_each_thread): New functions.
88 * inferiors.c (thread_of_pid): Remove.
89 (find_any_thread_of_pid): Use find_thread.
90 * linux-low.c (num_lwps): Use for_each_thread.
91
7a7cdfa0
YQ
922017-10-17 Yao Qi <yao.qi@linaro.org>
93
94 * Makefile.in: Remove one rule.
95 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
96
e675d170
YQ
972017-10-17 Yao Qi <yao.qi@linaro.org>
98
99 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
100 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
101
7eb4e0f9
YQ
1022017-10-17 Yao Qi <yao.qi@linaro.org>
103
104 * configure.srv: Rename arm.o with arch/arm.o.
105
60d6cfc9
YQ
1062017-10-17 Yao Qi <yao.qi@linaro.org>
107
108 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
109 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
110 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
111 (arch-i386.o, arch-amd64.o): Remove rules.
112 (arch/%.o): New rule.
113 Update POSTCOMPILE and COMPILE.pre.
114 * configure.ac: Invoke AC_CONFIG_COMMANDS.
115 * configure: Re-generated.
116 * configure.srv: Replace arch-i386.o with arch/i386.o.
117 Replace arch-amd64.o with arch/amd64.o.
118
5bfda255
YQ
1192017-10-16 Yao Qi <yao.qi@linaro.org>
120
121 * configure: Regenerated.
122
9c80ecd6
SM
1232017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
124
125 * inferiors.h: (struct inferior_list): Remove.
126 (struct inferior_list_entry); Remove.
127 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
128 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
129 get_first_inferior): Remove.
130 (for_each_inferior, for_each_inferior_with_data, find_inferior,
131 find_inferior_id, find_inferior_in_random): Change signature.
132 * inferiors.c (all_threads): Change type to
133 std::list<thread_info *>.
134 (get_thread): Remove macro.
135 (find_inferior, find_inferior_id): Change signature, implement
136 using find_thread.
137 (find_inferior_in_random): Change signature, implement using
138 find_thread_in_random.
139 (for_each_inferior, for_each_inferior_with_data): Change
140 signature, implement using for_each_thread.
141 (add_inferior_to_list, remove_inferior): Remove.
142 (add_thread, get_first_thread, thread_of_pid,
143 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
144 (get_first_inferior, one_inferior_p, clear_inferior_list):
145 Remove.
146 (clear_inferiors, get_thread_process): Update.
147 * gdbthread.h: Include <list>.
148 (struct thread_info) <entry>: Remove field.
149 <id>: New field.
150 (all_threads): Change type to std::list<thread_info *>.
151 (get_first_inferior): Add doc.
152 (find_thread, for_each_thread, find_thread_in_random): New
153 functions.
154 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
155 * linux-arm-low.c (update_registers_callback): Update.
156 * linux-low.c (second_thread_of_pid_p): Update.
157 (kill_one_lwp_callback, linux_detach_lwp_callback,
158 delete_lwp_callback, status_pending_p_callback, same_lwp,
159 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
160 iterate_over_lwps, not_stopped_callback,
161 resume_stopped_resumed_lwps, count_events_callback,
162 select_singlestep_lwp_callback, select_event_lwp_callback,
163 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
164 suspend_and_send_sigstop_callback, wait_for_sigstop,
165 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
166 lwp_running, linux_set_resume_request, resume_status_pending_p,
167 need_step_over_p, start_step_over, linux_resume_one_thread,
168 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
169 reset_lwp_ptrace_options_callback): Update.
170 * linux-mips-low.c (update_watch_registers_callback): Update.
171 * regcache.c (regcache_invalidate_one, regcache_invalidate):
172 Update.
173 (free_register_cache_thread_one): Remove.
174 (regcache_release): Update.
175 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
176 handle_qxfer_threads_worker): Update.
177 (handle_query): Update, use list iterator.
178 (visit_actioned_threads, handle_pending_status,
179 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
180 clear_pending_status_callback, set_pending_status_callback,
181 find_status_pending_thread_callback, handle_status,
182 process_serial_event): Update.
183 * target.c (thread_search_callback): Update.
184 * thread-db.c (thread_db_get_tls_address): Update.
185 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
186 Update.
187 * win32-i386-low.c (update_debug_registers_callback): Update.
188 * win32-low.c (delete_thread_info, child_delete_thread,
189 continue_one_thread, suspend_one_thread,
190 get_child_debug_event): Adjust.
191
9179355e
SM
1922017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
193
194 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
195 * inferiors.h: Include <list>.
196 (struct process_info) <entry>: Remove field.
197 <pid>: New field.
198 (pid_of): Change macro to function.
199 (ptid_of, lwpid_of): Remove macro.
200 (all_processes): Change type to std::list<process_info *>.
201 (ALL_PROCESSES): Remove macro.
202 (for_each_process, find_process): New function.
203 * inferiors.c (all_processes): Change type to
204 std::list<process_info *>.
205 (find_thread_process): Adjust.
206 (add_process): Likewise.
207 (remove_process): Likewise.
208 (find_process_pid): Likewise.
209 (get_first_process): Likewise.
210 (started_inferior_callback): Remove.
211 (have_started_inferiors_p): Adjust.
212 (attached_inferior_callback): Remove.
213 (have_attached_inferiors_p): Adjust.
214 * linux-low.c (check_zombie_leaders): Likewise.
215 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
216 (x86_linux_update_xmltarget): Adjust.
217 * server.c (handle_query): Likewise.
218 (gdb_reattached_process): Remove.
219 (handle_status): Adjust.
220 (kill_inferior_callback): Likewise.
221 (detach_or_kill_inferior): Remove.
222 (print_started_pid): Likewise.
223 (print_attached_pid): Likewise.
224 (detach_or_kill_for_exit): Update.
225 (process_serial_event): Likewise.
226 * linux-arm-low.c (arm_new_fork): Likewise.
227
c9cb8905
SM
2282017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
229
230 * dll.h: Include <list>.
231 (struct dll_info): Add constructor.
232 <entry>: Remove field.
233 (all_dlls): Change type to std::list<dll_info>.
234 * dll.c: Include <algorithm>.
235 (get_dll): Remove macro.
236 (all_dlls): Change type to std::list<dll_info *>.
237 (free_one_dll): Remove.
238 (match_dll): Likewise.
239 (loaded_dll): Adjust.
240 (unloaded_dll): Adjust to all_dlls type change, use
241 std::find_if. Inline code from match_dll.
242 (clear_dlls): Adjust to all_dlls type change.
243 * server.c (emit_dll_description): Remove.
244 (handle_qxfer_libraries): Adjust to all_dlls type change,
245 integrate emit_dll_description's functionality.
246
04ec7890
SM
2472017-10-12 Simon Marchi <simon.marchi@ericsson.com>
248
249 * linux-low.h (struct linux_target_ops) <delete_process>: New
250 field.
251 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
252 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
253 (struct linux_target_ops): Add delete_process callback.
254 * linux-arm-low.c (arm_delete_process): New.
255 (struct linux_target_ops): Add delete_process callback.
256 * linux-bfin-low.c (struct linux_target_ops): Likewise.
257 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
258 * linux-m32r-low.c (struct linux_target_ops): Likewise.
259 * linux-mips-low.c (mips_linux_delete_process): New.
260 (struct linux_target_ops): Add delete_process callback.
261 * linux-ppc-low.c (struct linux_target_ops): Likewise.
262 * linux-s390-low.c (struct linux_target_ops): Likewise.
263 * linux-sh-low.c (struct linux_target_ops): Likewise.
264 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
265 * linux-tile-low.c (struct linux_target_ops): Likewise.
266 * linux-x86-low.c (x86_linux_delete_process): New.
267 (struct linux_target_ops): Add delete_process callback.
268 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
269
466eecee
SM
2702017-10-12 Simon Marchi <simon.marchi@ericsson.com>
271
272 * linux-aarch64-low.c (the_low_target): Add thread delete
273 callback.
274 * linux-arm-low.c (arm_delete_thread): New function.
275 (the_low_target): Add thread delete callback.
276 * linux-bfin-low.c (the_low_target): Likewise.
277 * linux-crisv32-low.c (the_low_target): Likewise.
278 * linux-low.c (delete_lwp): Invoke delete_thread callback if
279 set.
280 * linux-low.h (struct linux_target_ops) <delete_thread>: New
281 field.
282 * linux-m32r-low.c (the_low_target): Add thread delete callback.
283 * linux-mips-low.c (mips_linux_delete_thread): New function.
284 (the_low_target): Add thread delete callback.
285 * linux-ppc-low.c (the_low_target): Likewise.
286 * linux-s390-low.c (the_low_target): Likewise.
287 * linux-sh-low.c (the_low_target): Likewise.
288 * linux-tic6x-low.c (the_low_target): Likewise.
289 * linux-tile-low.c (the_low_target): Likewise.
290 * linux-x86-low.c (the_low_target): Likewise.
291 * linux-xtensa-low.c (the_low_target): Likewise.
292
b79f7801
YZ
2932017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
294
295 * win32-low.c: Include "common-inferior.h".
296
bc3b087d
SDJ
2972017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
298
299 * inferiors.c (set_inferior_cwd): New function.
300 * server.c (handle_general_set): Handle QSetWorkingDir packet.
301 (handle_query): Inform that QSetWorkingDir is supported.
302 * win32-low.c (create_process): Pass the inferior's cwd to
303 CreateProcess.
304
d092c5a2
SDJ
3052017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
306
307 * inferiors.c (current_inferior_cwd): New global variable.
308 (get_inferior_cwd): New function.
309 * inferiors.h (struct process_info) <cwd>: New field.
310
7da0a886
SDJ
3112017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
312
313 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
314 (OBS): Add gdb_tilde_expand.o.
315
289a6840
SM
3162017-10-02 Simon Marchi <simon.marchi@ericsson.com>
317
318 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
319 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
320
256642e8
PA
3212017-09-29 Pedro Alves <palves@redhat.com>
322
323 * ax.c (gdb_parse_agent_expr): Constify.
324 * ax.h (gdb_parse_agent_expr): Constify.
325 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
326 Constify.
327 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
328 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
329 * remote-utils.h (read_ptid): Constify.
330 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
331 (process_point_options, process_serial_event): Constify.
332 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
333 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
334 (cmd_qtbuffer): Constify.
335
5b9ca4d4
PA
3362017-09-29 Pedro Alves <palves@redhat.com>
337
338 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
339 fails.
340
94c207e0
PA
3412017-09-29 Pedro Alves <palves@redhat.com>
342
343 * linux-low.c (handle_extended_wait): Pass parent thread instead
344 of process to thread_db_notice_clone.
345 * linux-low.h (thread_db_notice_clone): Replace parent process
346 parameter with parent thread parameter.
347 * thread-db.c (find_one_thread): Add comment.
348 (thread_db_notice_clone): Replace parent process parameter with
349 parent thread parameter. Temporarily switch to the parent thread.
350
75352e28
SDJ
3512017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
352
353 * gdbthread.h: Include "common-gdbthread.h".
354 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
355 "if" when validating the ptid.
356 * remote-utils.c: Include "gdbthread.h".
357 (prepare_resume_reply): Use "switch_to_thread".
358 * target.c (done_accessing_memory): Likewise.
359
ad339634
AA
3602017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
361
362 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
363 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
364 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
365 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
366 s390x-gs-linux64-ipa.o to ipa_obj.
367 * linux-s390-low.c (HWCAP_S390_GS): New define.
368 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
369 New functions.
370 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
371 (s390_arch_setup): Check for guarded-storage support and choose
372 appropriate tdesc.
373 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
374 init_registers_s390x_gs_linux64.
375 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
376 enum value.
377 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
378 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
379
cc4d742f
SM
3802017-09-22 Simon Marchi <simon.marchi@ericsson.com>
381
382 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
383
f6327dcb
KB
3842017-09-21 Kevin Buettner <kevinb@redhat.com>
385
386 * linux-low.h (struct lwp_info): Add new field, thread_handle.
387 (thread_db_thread_handle): Declare.
388 * linux-low.c (linux_target_ops): Initialize thread_handle.
389 * server.c (handle_qxfer_threads_worker): Add support for
390 "handle" attribute.
391 * target.h (struct target_ops): Add new function pointer,
392 thread_handle.
393 (target_thread_handle): Define.
394 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
395 field in lwp.
396 (thread_db_thread_handle): New function.
397
86299109
KB
3982017-09-21 Kevin Buettner <kevinb@redhat.com>
399
400 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
401 * linux-low.h (thread_db_notice_clone): Declare.
402 * thread-db.c (thread_db_notice_clone): New function.
403
f557a88a
PA
4042017-09-21 Pedro Alves <palves@redhat.com>
405
406 * server.c (gdb_read_memory, handle_status, process_serial_event)
407 (handle_serial_event, handle_target_event): Adjust to
408 set_desired_thread prototype change.
409 * target.c (set_desired_thread): Remove 'use_general' parameter
410 and adjust.
411 * target.h (set_desired_thread): Remove 'use_general' parameter.
412
223ffa71
TT
4132017-09-20 Tom Tromey <tom@tromey.com>
414
415 * target.c (target_terminal::terminal_state): Define.
416 (target_terminal::init): Rename from target_terminal_init.
417 (target_terminal::inferior): Rename from
418 target_terminal_inferior.
419 (target_terminal::ours): Rename from target_terminal_ours.
420 (target_terminal::ours_for_output, target_terminal::info): New.
421
04fd3ba9
SM
4222017-09-16 Simon Marchi <simon.marchi@ericsson.com>
423
424 * server.c (accumulate_file_name_length): Remove.
425 (emit_dll_description): Adjust to std::string change.
426 (handle_qxfer_libraries): Use std::string to hold document.
427
5e187554
SM
4282017-09-16 Simon Marchi <simon.marchi@ericsson.com>
429
430 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
431 return type of xml_escape_text.
432 * server.c (emit_dll_description): Likewise.
433
1526853e
SM
4342017-09-16 Simon Marchi <simon.marchi@ericsson.com>
435
436 * server.c (captured_main): Accept argument for --selftest.
437 Update run_tests call.
438 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
439 when registering selftests.
440
c4dfafab
SDJ
4412017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
442
443 * regcache.c (get_thread_regcache): Update code to use "std::vector"
444 instead of "VEC" for "target_desc.reg_defs".
445 (regcache_cpy): Likewise.
446 (registers_to_string): Likewise.
447 (registers_from_string): Likewise.
448 (find_regno): Likewise.
449 (supply_regblock): Likewise.
450 (regcache_raw_read_unsigned): Likewise.
451 * tdesc.c (init_target_desc): Likewise.
452 (tdesc_create_reg): Likewise.
453 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
454 (struct target_desc) <reg_defs>: Convert to "std::vector".
455 (target_desc): Do not initialize "reg_defs".
456 (~target_desc): Update code to use "std::vector" instead of "VEC"
457 for "target_desc.reg_defs".
458 (operator==): Likewise.
459
124aceb4
SM
4602017-09-15 Simon Marchi <simon.marchi@ericsson.com>
461
462 * inferiors.h (thread_to_gdb_id): Remove.
463 * inferiors.c (thread_to_gdb_id): Remove.
464 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
465 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
466 lynx_store_registers, lynx_read_memory, lynx_write_memory):
467 Likewise.
468 * nto-low.c (nto_fetch_registers, nto_store_registers,
469 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
470
96cde54f
SM
4712017-09-15 Simon Marchi <simon.marchi@ericsson.com>
472
473 * inferiors.h (gdb_id_to_thread_id): Remove.
474 * inferiors.c (gdb_id_to_thread_id): Remove.
475 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
476 removal. Move pid declaration closer to where it's used.
477
e8ca139e
SM
4782017-09-15 Simon Marchi <simon.marchi@ericsson.com>
479
480 * server.c (handle_detach): New function.
481 (process_serial_event): Move code out, call handle_detach.
482
f8a4e119
SM
4832017-09-15 Simon Marchi <simon.marchi@ericsson.com>
484
485 * server.c (require_running): Rename to ...
486 (require_running_or_return): ... this ...
487 (require_running_or_break): ... and this.
488 (handle_query, process_serial_event): Adjust.
489
0eb0a407
SM
4902017-09-15 Simon Marchi <simon.marchi@ericsson.com>
491
492 * linux-low.c (linux_set_resume_request): Remove unused
493 variables.
494
785922a5
SM
4952017-09-15 Simon Marchi <simon.marchi@ericsson.com>
496
497 * server.c (first_thread_of): Remove.
498 (process_serial_event): Replace usage of first_thread_of with
499 find_any_thread_of_pid.
500 * tracepoint.c (same_process_p): Remove.
501 (gdb_agent_about_to_close): Replace usage of same_process_p with
502 find_any_thread_of_pid.
503 * linux-x86-low.c (same_process_callback): Remove.
504 (x86_arch_setup_process_callback): Replace usage of
505 same_process_callback with find_any_thread_of_pid.
506 * thread-db.c (any_thread_of): Remove.
507 (switch_to_process): Replace usage of any_thread_of with
508 find_any_thread_of_pid.
509 * inferiors.c (thread_pid_matches_callback): Remove.
510 (find_thread_process): Adjust to use find_any_thread_of_pid.
511
a059f00c
SDJ
5122017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
513
514 * regcache.c (get_thread_regcache): Guard calls to "memset"
515 with "!VEC_empty".
516
cc397f3a
SDJ
5172017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
518
519 * linux-low.c (handle_extended_wait): Use
520 "allocate_target_description" instead of "XNEW".
521 * linux-x86-low.c (initialize_low_arch): Likewise.
522
22916b07
YQ
5232017-09-05 Yao Qi <yao.qi@linaro.org>
524
525 * configure.srv (srv_i386_regobj): Remove.
526 (srv_amd64_regobj): Remove.
527 (srv_regobj): Set it to "" for x86 non-linux targets.
528 * linux-x86-tdesc.c (i386_linux_read_description):
529 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
530 (init_registers_i386): Remove the declaration.
531 (tdesc_i386): Remove the declaration.
532 (lynx_i386_arch_setup): Call i386_create_target_description.
533 * nto-x86-low.c: Likewise.
534 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
535 [!__x86_64__]: include arch/i386.h.
536 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
537
38602d55
YQ
5382017-09-05 Yao Qi <yao.qi@linaro.org>
539
540 * configure.srv (srv_amd64_linux_xmlfiles): Remove
541 i386/amd64-XXX-linux from it.
542
44b886ff
YQ
5432017-09-05 Yao Qi <yao.qi@linaro.org>
544
545 * configure.srv: Empty srv_amd64_linux_regobj if $development is
546 false.
547 (ipa_amd64_linux_regobj): Remove.
548 (ipa_x32_linux_regobj): Remove.
549
b4570e4b
YQ
5502017-09-05 Yao Qi <yao.qi@linaro.org>
551
552 * Makefile.in (arch-amd64.o): New rule.
553 * configure.srv: Append arch-amd64.o.
554 * linux-amd64-ipa.c: Include common/x86-xstate.h.
555 (get_ipa_tdesc): Call amd64_linux_read_description.
556 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
557 and init_registers_amd64_XXX.
558 * linux-x86-low.c (x86_linux_read_description): Call
559 amd64_linux_read_description.
560 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
561 (initialize_low_arch): Don't call init_registers_x32_XXX and
562 init_registers_amd64_XXX.
563 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
564 and tdesc_amd64_XXX.
565 [__x86_64__] (amd64_tdesc_test): New function.
566 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
567 and init_registers_amd64_XXX.
568 * linux-x86-tdesc.c: Include arch/amd64.h.
569 (xcr0_to_tdesc_idx): New function.
570 (i386_linux_read_description): New function.
571 (amd64_get_ipa_tdesc_idx): New function.
572 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
573 (amd64_get_ipa_tdesc): Declare.
574
d1f28ea2
YQ
5752017-09-05 Yao Qi <yao.qi@linaro.org>
576
577 * configure.srv (srv_i386_linux_xmlfiles): Remove
578 i386/i386-XXX-linux.xml from it.
579
25a93583
YQ
5802017-09-05 Yao Qi <yao.qi@linaro.org>
581
582 * configure.srv: Set srv_i386_linux_regobj empty if $development
583 is false.
584 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
585 initialize_low_tdesc.
586 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
587 with #if initialize_low_tdesc.
588 * linux-x86-tdesc-selftest.c: New file.
589 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
590
5f035c07
YQ
5912017-09-05 Yao Qi <yao.qi@linaro.org>
592
593 * Makefile.in (arch-i386.o): New rule.
594 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
595 (x86_64-*-linux*): Likewise.
596 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
597 include arch/i386.h.
598 (i386_linux_read_description): Remove code and call
599 i386_create_target_description.
600 * tdesc.c (allocate_target_description): New function.
601 * tdesc.h (set_tdesc_architecture): Remove declaration.
602 (set_tdesc_osabi): Likewise.
603
0abe8a89
YQ
6042017-09-05 Yao Qi <yao.qi@linaro.org>
605
606 * linux-x86-tdesc.c: Don't include <inttypes.h>.
607 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
608 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
609 .xmltarget.
610 * server.c (get_features_xml): Call tdesc_get_features_xml.
611 * tdesc.c (set_tdesc_architecture): New function.
612 (set_tdesc_osabi): New function.
613 (tdesc_get_features_xml): New function.
614 (tdesc_create_feature): Add an argument.
615 * tdesc.h (struct target_desc) <features>: New field.
616 <arch, osabi>: New field.
617 (~target_desc): xfree features, arch, and osabi.
618 (target_desc::oerator==): Don't compare .xmltarget.
619 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
620 (set_tdesc_osabi): Likewise.
621 (tdesc_get_features_xml): Likewise.
622
0a188386
YQ
6232017-09-05 Yao Qi <yao.qi@linaro.org>
624
625 * linux-x86-tdesc.c: Include selftest.h.
626 (i386_tdesc_test): New function.
627 (initialize_low_tdesc): Call selftests::register_test.
628 * tdesc.h: Include regdef.h.
629 (target_desc): Override operator == and !=.
630
f49ff000
YQ
6312017-09-05 Yao Qi <yao.qi@linaro.org>
632
633 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
634 (ipa_obj): Likewise.
635 * linux-i386-ipa.c: Include common/x86-xstate.h
636 (get_ipa_tdesc): Call i386_linux_read_description.
637 (initialize_low_tracepoint): Don't call init_registers_XXX
638 functions, call initialize_low_tdesc instead.
639 * linux-x86-low.c (x86_linux_read_description): Call
640 i386_linux_read_description.
641 (initialize_low_arch): Don't call init_registers_i386_XXX
642 functions, call initialize_low_tdesc.
643 * linux-x86-tdesc.c: New file.
644 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
645 (i386_get_ipa_tdesc_idx): Declare.
646 (i386_get_ipa_tdesc): Declare.
647 (initialize_low_tdesc): Declare.
648
2b68ef2f
YQ
6492017-09-05 Yao Qi <yao.qi@linaro.org>
650
651 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
652 instead of 0.
653
f7000548
YQ
6542017-09-05 Yao Qi <yao.qi@linaro.org>
655
656 * Makefile.in (IPA_OBJS): Add vec-ipa.o
657 * regcache.c (get_thread_regcache): Use VEC_length.
658 (init_register_cache): Likewise.
659 (regcache_cpy): Likewise.
660 (registers_to_string): Iterate reg_defs via VEC_iterate.
661 (find_regno): Likewise.
662 (find_register_by_number): Use VEC_index.
663 (register_size): Call find_register_by_number.
664 (register_data): Call find_register_by_number.
665 (supply_regblock): Use VEC_length.
666 (regcache_raw_read_unsigned): Likewise.
667 * tdesc.c (init_target_desc): Iterate reg_defs via
668 VEC_iterate.
669 (default_description): Update initializer.
670 (copy_target_description): Don't update field num_registers.
671 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
672 <num_registers>: Remove.
673
50a421ac
SM
6742017-09-04 Simon Marchi <simon.marchi@ericsson.com>
675
676 * Makefile.in (.SECONDARY): Define target.
677
23fdd69e
SM
6782017-09-03 Simon Marchi <simon.marchi@ericsson.com>
679
680 * linux-low.c (linux_wait_1): Adjust.
681 * server.c (queue_stop_reply_callback): Adjust.
682
0a2dde4a
SDJ
6832017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
684
685 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
686 QEnvironmentUnset and QEnvironmentReset packets.
687 (handle_query): Inform remote that QEnvironmentHexEncoded,
688 QEnvironmentUnset and QEnvironmentReset are supported.
689
6afd337d
SM
6902017-08-25 Simon Marchi <simon.marchi@ericsson.com>
691
692 * inferiors.h (inferior_target_data): Rename to ...
693 (thread_target_data): ... this.
694 (inferior_regcache_data): Rename to ...
695 (thread_regcache_data): ... this.
696 (set_inferior_regcache_data): Rename to ...
697 (set_thread_regcache_data): ... this.
698 * inferiors.c (inferior_target_data): Rename to ...
699 (thread_target_data): ... this.
700 (inferior_regcache_data): Rename to ...
701 (thread_regcache_data): ... this.
702 (set_inferior_regcache_data): Rename to ...
703 (set_thread_regcache_data): ... this.
704 (free_one_thread): Update.
705 * linux-low.h (get_thread_lwp): Update.
706 * regcache.c (get_thread_regcache): Update.
707 (regcache_invalidate_thread): Update.
708 (free_register_cache_thread): Update.
709 * win32-i386-low.c (update_debug_registers_callback): Update.
710 (win32_get_current_dr): Update.
711 * win32-low.c (thread_rec): Update.
712 (delete_thread_info): Update.
713 (continue_one_thread): Update.
714 (suspend_one_thread): Update.
715
a160cc46
SM
7162017-08-24 Simon Marchi <simon.marchi@ericsson.com>
717
718 * inferiors.c (set_inferior_target_data): Remove.
719 * inferiors.h (set_inferior_target_data): Remove.
720
6d580b63
YQ
7212017-08-18 Yao Qi <yao.qi@linaro.org>
722
723 * Makefile.in (OBS): Add selftest.o.
724 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
725 * configure, config.in: Re-generated.
726 * server.c: Include common/sefltest.h.
727 (captured_main): Handle option --selftest.
728
f5a29eb0
YQ
7292017-08-09 Yao Qi <yao.qi@linaro.org>
730
731 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
732 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
733 i386-avx-mpx.o and i386-mmx.o.
734 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
735 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
736 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
737 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
738 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
739 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
740 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
741 i386/amd64-avx-mpx.xml.
742
57757c2f
YQ
7432017-08-09 Yao Qi <yao.qi@linaro.org>
744
745 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
746 and x32-avx-avx512.o.
747 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
748 i386/x32-avx-avx512.xml.
749
229d26fc
SM
7502017-07-26 Simon Marchi <simon.marchi@ericsson.com>
751
752 * tracepoint.h (enum class fast_tpoint_collect_result): New
753 enumeration.
754 (fast_tracepoint_collecting): Change return type to
755 fast_tpoint_collect_result.
756 * tracepoint.c (fast_tracepoint_collecting): Likewise.
757 * linux-low.h: Include tracepoint.h.
758 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
759 fast_tpoint_collect_result.
760 * linux-low.c (handle_tracepoints): Adjust.
761 (linux_fast_tracepoint_collecting): Change return type to
762 fast_tpoint_collect_result.
763 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
764 linux_wait_1, stuck_in_jump_pad_callback,
765 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
766 proceed_one_lwp): Adjust to type change.
767
2e1e43e1
YQ
7682017-07-10 Yao Qi <yao.qi@linaro.org>
769
770 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
771
adc764e7
YQ
7722017-06-29 Yao Qi <yao.qi@linaro.org>
773
774 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
775 Remove.
776 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
777
a206891a
SM
7782017-06-20 Simon Marchi <simon.marchi@ericsson.com>
779
780 * Makefile.in (IPA_OBJS): Sort and format one item per line.
781
9a6c7d9c
SDJ
7822017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
783
784 * linux-low.c (linux_create_inferior): Adjust code to access the
785 environment information via 'gdb_environ' class.
786 * lynx-low.c (lynx_create_inferior): Likewise.
787 * server.c (our_environ): Make it an instance of 'gdb_environ'.
788 (get_environ): Return a pointer to 'our_environ'.
789 (captured_main): Initialize 'our_environ'.
790 * server.h (get_environ): Adjust prototype.
791 * spu-low.c (spu_create_inferior): Adjust code to access the
792 environment information via 'gdb_environ' class.
793
ae3e2ccf
SM
7942017-06-17 Simon Marchi <simon.marchi@ericsson.com>
795
796 * linux-low.c (linux_read_memory, linux_write_memory): Remove
797 usage of "register" keyword.
798
3e019bdc
SM
7992017-06-17 Simon Marchi <simon.marchi@ericsson.com>
800
801 * configure: Re-generate.
802
8465943a
SM
8032017-06-17 Simon Marchi <simon.marchi@ericsson.com>
804
805 * configure: Re-generate.
806
cf0dd6f0
SM
8072017-06-17 Simon Marchi <simon.marchi@ericsson.com>
808
809 * Makefile.in (COMPILE.pre): Add "-x c++".
810
9845682b
SDJ
8112017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
812
813 * fork-child.c: Conditionally include <signal.h>.
814
aefd8b33
SDJ
8152017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
816
817 * server.c (handle_general_set): Handle new packet
818 "QStartupWithShell".
819 (handle_query): Add "QStartupWithShell" to the list of supported
820 packets.
821 (gdbserver_usage): Add help text explaining the
822 new "--startup-with-shell" and "--no-startup-with-shell" CLI
823 options.
824 (captured_main): Recognize and act upon the presence of the new
825 CLI options.
826
2090129c
SDJ
8272017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
828 Pedro Alves <palves@redhat.com>
829
830 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
831 * configure: Regenerate.
832 * configure.srv (srv_linux_obj): Add "fork-child.o" and
833 "fork-inferior.o".
834 (i[34567]86-*-lynxos*): Likewise.
835 (spu*-*-*): Likewise.
836 * fork-child.c: New file.
837 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
838 and "environ.h".
839 (linux_ptrace_fun): New function.
840 (linux_create_inferior): Adjust function prototype to reflect
841 change on "target.h". Adjust function code to use
842 "fork_inferior".
843 (linux_request_interrupt): Delete "signal_pid".
844 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
845 (lynx_ptrace_fun): New function.
846 (lynx_create_inferior): Adjust function prototype to reflect
847 change on "target.h". Adjust function code to use
848 "fork_inferior".
849 * nto-low.c (nto_create_inferior): Adjust function prototype and
850 code to reflect change on "target.h". Update comments.
851 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
852 "common-terminal.h" and "environ.h".
853 (terminal_fd): Moved to fork-child.c.
854 (old_foreground_pgrp): Likewise.
855 (restore_old_foreground_pgrp): Likewise.
856 (last_status): Make it global.
857 (last_ptid): Likewise.
858 (our_environ): New variable.
859 (startup_with_shell): Likewise.
860 (program_name): Likewise.
861 (program_argv): Rename to...
862 (program_args): ...this.
863 (wrapper_argv): New variable.
864 (start_inferior): Delete function.
865 (get_exec_wrapper): New function.
866 (get_exec_file): Likewise.
867 (get_environ): Likewise.
868 (prefork_hook): Likewise.
869 (post_fork_inferior): Likewise.
870 (postfork_hook): Likewise.
871 (postfork_child_hook): Likewise.
872 (handle_v_run): Update code to deal with arguments coming from the
873 remote host. Update calls from "start_inferior" to
874 "create_inferior".
875 (captured_main): Likewise. Initialize environment variable. Call
876 "have_job_control".
877 * server.h (post_fork_inferior): New prototype.
878 (get_environ): Likewise.
879 (last_status): Declare.
880 (last_ptid): Likewise.
881 (signal_pid): Likewise.
882 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
883 (spu_ptrace_fun): New function.
884 (spu_create_inferior): Adjust function prototype to reflect change
885 on "target.h". Adjust function code to use "fork_inferior".
886 * target.c (target_terminal_init): New function.
887 (target_terminal_inferior): Likewise.
888 (target_terminal_ours): Likewise.
889 * target.h: Include <vector>.
890 (struct target_ops) <create_inferior>: Update prototype.
891 (create_inferior): Update macro.
892 * utils.c (gdb_flush_out_err): New function.
893 * win32-low.c (win32_create_inferior): Adjust function prototype
894 and code to reflect change on "target.h".
895
043a4934
SDJ
8962017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
897
898 * inferiors.c (switch_to_thread): New function.
899
15652511
SDJ
9002017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
901
902 * Makefile.in (SFILE): Add "common/job-control.c".
903 (OBS): Add "job-control.o".
904
21ea5acd
SDJ
9052017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
906
907 * Makefile: Remove "@host_makefile_frag@".
908
e13cb306
PA
9092017-05-05 Pedro Alves <palves@redhat.com>
910
911 * configure: Regenerate.
912
c94fee56
SDJ
9132017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
914
915 * configure: Regenerate.
916
a0ff9e1a
SM
9172017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
918
919 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
920 software_single_step change of return type to
921 std::vector<CORE_ADDR>.
922 * linux-low.c (install_software_single_step_breakpoints):
923 Likewise.
924 * linux-low.h (install_software_single_step_breakpoints):
925 Likewise.
926
be628ab8
SDJ
9272017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
928
929 * remote-utils.c: Include "gdb_termios.h" instead of
930 "terminal.h".
931 * terminal.h: Delete file.
932
7c5ded6a
SDJ
9332017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
934
935 * server.c: Include <vector>.
936 <program_argv, wrapper_argv>: Convert to std::vector.
937 (start_inferior): Rewrite function to use C++.
938 (handle_v_run): Likewise. Update code that calculates the argv
939 based on the vRun packet; use C++.
940 (captured_main): Likewise.
941
436252de
SM
9422017-04-06 Simon Marchi <simon.marchi@ericsson.com>
943
944 * server.c (handle_v_cont): Initialize thread_resume::thread
945 with null_ptid.
946
9bf2a700
PA
9472017-04-05 Pedro Alves <palves@redhat.com>
948
949 * configure: Regenerate.
950
a121b7c1
PA
9512017-04-05 Pedro Alves <palves@redhat.com>
952
953 * gdbreplay.c (sync_error): Constify.
954 * linux-x86-low.c (push_opcode): Constify.
955
21c8a587
PA
9562017-04-05 Pedro Alves <palves@redhat.com>
957
958 * win32-low.c (get_child_debug_event)
959 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
960 Report TARGET_WAITKIND_SPURIOUS instead.
961
fb32b4f7
PA
9622017-04-05 Pedro Alves <palves@redhat.com>
963
964 * remote-utils.c (remote_prepare, remote_open): Constify.
965 * remote-utils.h (remote_prepare, remote_open): Constify.
966 * server.c (captured_main): Constify 'port' handling.
967
65dd1e59
SM
9682017-04-04 Simon Marchi <simon.marchi@ericsson.com>
969
970 * Makefile.in (clean): Clear .deps.
971
8fa5b777
SM
9722017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
973
974 * .gitignore: Remove generated files, replace with wildcard.
975 * (clean): Replace removal of generated files with wildcard.
976 (version.c): Replace with...
977 (version-generated.c): ...this.
978 (xml-builtin.c): Replace with...
979 (xml-builtin-generated.c): ...this.
980 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
981 (%.c: *regformats*): Replace with...
982 (%-generated.c: *regformats*): ...this.
983
a12e714b
MF
9842017-03-27 Max Filippov <jcmvbkbc@gmail.com>
985
986 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
987 (xtensa_fill_gregset): Call collect_register_by_name for
988 threadptr register.
989 (xtensa_store_gregset): Call supply_register_by_name for
990 threadptr register.
991
1a09b50a
MF
9922017-03-27 Max Filippov <jcmvbkbc@gmail.com>
993
994 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
995 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
996 (xtensa_store_gregset): Call supply_register for all registers in
997 a0_regnum..a0_regnum + C0_NREGS range.
998
1a01e7c6
SM
9992017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1000
1001 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
1002 (ax-ipa.o: ax.c): Remove.
1003 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
1004 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
1005 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
1006 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
1007 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
1008
36bc18a8
SM
10092017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1010
1011 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
1012 (print-utils-ipa.o: ../common/print-utils.c): Remove.
1013 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
1014 (errors-ipa.o: ../common/errors.c): Remove.
1015 (format-ipa.o: ../common/format.c): Remove.
1016 (common-utils-ipa.o: ../common/common-utils.c): Remove.
1017
a8ebe3d5
SM
10182017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1019
1020 * Makefile.in (%-ipa.o: %.c): New rule.
1021 (tracepoint-ipa.o: tracepoint.c): Remove.
1022 (utils-ipa.o: utils.c): Remove.
1023 (remote-utils-ipa.o: remote-utils.c): Remove.
1024 (regcache-ipa.o: regcache.c): Remove.
1025 (i386-linux-ipa.o: i386-linux.c): Remove.
1026 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
1027 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
1028 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
1029 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
1030 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
1031 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
1032 (amd64-linux-ipa.o: amd64-linux.c): Remove.
1033 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
1034 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
1035 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
1036 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
1037 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
1038 (aarch64-ipa.o: aarch64.c): Remove.
1039 (s390-linux32-ipa.o: s390-linux32.c): Remove.
1040 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
1041 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
1042 (s390-linux64-ipa.o: s390-linux64.c): Remove.
1043 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
1044 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
1045 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
1046 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
1047 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
1048 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
1049 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
1050 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
1051 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
1052 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
1053 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
1054 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
1055 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
1056 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
1057 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
1058 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
1059 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
1060 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
1061 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
1062 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
1063 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
1064 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
1065 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
1066 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
1067 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
1068 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
1069 (tdesc-ipa.o: tdesc.c): Remove.
1070 (x32-linux-ipa.o: x32-linux.c): Remove.
1071 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
1072 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
1073
50cfacb7
SM
10742017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1075
1076 * Makefile.in (%.o: ../arch/%.c): New rule.
1077 (arm.o: ../arch/arm.c): Remove.
1078 (arm-linux.o: ../arch/arm-linux.c): Remove.
1079 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
1080 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
1081
c5a22423
SM
10822017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1083
1084 * Makefile.in (%.o: ../nat/%.c): New rule.
1085 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
1086 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
1087 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
1088 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
1089 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
1090 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
1091 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
1092 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
1093 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
1094 (linux-personality.o: ../nat/linux-personality.c): Remove.
1095 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
1096 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
1097 (x86-linux.o: ../nat/x86-linux.c): Remove.
1098 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
1099 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
1100
6bda016b
SM
11012017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1102
1103 * Makefile.in (%.o: ../common/%.c): New rule.
1104 (signals.o: ../common/signals.c): Remove.
1105 (print-utils.o: ../common/print-utils.c): Remove.
1106 (rsp-low.o: ../common/rsp-low.c): Remove.
1107 (common-utils.o: ../common/common-utils.c): Remove.
1108 (posix-strerror.o: ../common/posix-strerror.c): Remove.
1109 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
1110 (vec.o: ../common/vec.c): Remove.
1111 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
1112 (xml-utils.o: ../common/xml-utils.c): Remove.
1113 (ptid.o: ../common/ptid.c): Remove.
1114 (buffer.o: ../common/buffer.c): Remove.
1115 (format.o: ../common/format.c): Remove.
1116 (filestuff.o: ../common/filestuff.c): Remove.
1117 (agent.o: ../common/agent.c): Remove.
1118 (errors.o: ../common/errors.c): Remove.
1119 (environ.o: ../common/environ.c): Remove.
1120 (common-debug.o: ../common/common-debug.c): Remove.
1121 (cleanups.o: ../common/cleanups.c): Remove.
1122 (common-exceptions.o: ../common/common-exceptions.c): Remove.
1123 (fileio.o: ../common/fileio.c): Remove.
1124 (common-regcache.o: ../common/common-regcache.c): Remove.
1125 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
1126 (new-op.o: ../common/new-op.c): Remove.
1127 (btrace-common.o: ../common/btrace-common.c): Remove.
1128
21122961
SM
11292017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1130
1131 * Makefile.in (%.o: ../target/%.c): New rule.
1132 (waitstatus.o: ../target/waitstatus.c): Remove.
1133
c362e621
SM
11342017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
1135
1136 * Makefile.in
1137 (%.c: ../regformats/%.dat,
1138 (%.c: ../regformats/arm/%.dat,
1139 (%.c: ../regformats/i386/%.dat,
1140 (%.c: ../regformats/rs6000/%.dat): New rules.
1141 (aarch64.c): Remove.
1142 (reg-arm.c): Remove.
1143 (arm-with-iwmmxt.c): Remove.
1144 (arm-with-vfpv2.c): Remove.
1145 (arm-with-vfpv3.c): Remove.
1146 (arm-with-neon.c): Remove.
1147 (reg-bfin.c): Remove.
1148 (reg-cris.c): Remove.
1149 (reg-crisv32.c): Remove.
1150 (i386.c): Remove.
1151 (i386-linux.c): Remove.
1152 (i386-avx.c): Remove.
1153 (i386-avx-linux.c): Remove.
1154 (i386-avx-avx512.c): Remove.
1155 (i386-avx-avx512-linux.c): Remove.
1156 (i386-mpx.c): Remove.
1157 (i386-mpx-linux.c): Remove.
1158 (i386-avx-mpx-avx512-pku.c): Remove.
1159 (i386-avx-mpx-avx512-pku-linux.c): Remove.
1160 (i386-avx-mpx.c): Remove.
1161 (i386-avx-mpx-linux.c): Remove.
1162 (i386-mmx.c): Remove.
1163 (i386-mmx-linux.c): Remove.
1164 (reg-ia64.c): Remove.
1165 (reg-m32r.c): Remove.
1166 (reg-m68k.c): Remove.
1167 (reg-cf.c): Remove.
1168 (mips-linux.c): Remove.
1169 (mips-dsp-linux.c): Remove.
1170 (mips64-linux.c): Remove.
1171 (mips64-dsp-linux.c): Remove.
1172 (nios2-linux.c): Remove.
1173 (powerpc-32.c): Remove.
1174 (powerpc-32l.c): Remove.
1175 (powerpc-altivec32l.c): Remove.
1176 (powerpc-cell32l.c): Remove.
1177 (powerpc-vsx32l.c): Remove.
1178 (powerpc-isa205-32l.c): Remove.
1179 (powerpc-isa205-altivec32l.c): Remove.
1180 (powerpc-isa205-vsx32l.c): Remove.
1181 (powerpc-e500l.c): Remove.
1182 (powerpc-64l.c): Remove.
1183 (powerpc-altivec64l.c): Remove.
1184 (powerpc-cell64l.c): Remove.
1185 (powerpc-vsx64l.c): Remove.
1186 (powerpc-isa205-64l.c): Remove.
1187 (powerpc-isa205-altivec64l.c): Remove.
1188 (powerpc-isa205-vsx64l.c): Remove.
1189 (s390-linux32.c): Remove.
1190 (s390-linux32v1.c): Remove.
1191 (s390-linux32v2.c): Remove.
1192 (s390-linux64.c): Remove.
1193 (s390-linux64v1.c): Remove.
1194 (s390-linux64v2.c): Remove.
1195 (s390-te-linux64.c): Remove.
1196 (s390-vx-linux64.c): Remove.
1197 (s390-tevx-linux64.c): Remove.
1198 (s390x-linux64.c): Remove.
1199 (s390x-linux64v1.c): Remove.
1200 (s390x-linux64v2.c): Remove.
1201 (s390x-te-linux64.c): Remove.
1202 (s390x-vx-linux64.c): Remove.
1203 (s390x-tevx-linux64.c): Remove.
1204 (tic6x-c64xp-linux.c): Remove.
1205 (tic6x-c64x-linux.c): Remove.
1206 (tic6x-c62x-linux.c): Remove.
1207 (reg-sh.c): Remove.
1208 (reg-sparc64.c): Remove.
1209 (reg-spu.c): Remove.
1210 (amd64.c): Remove.
1211 (amd64-linux.c): Remove.
1212 (amd64-avx.c): Remove.
1213 (amd64-avx-linux.c): Remove.
1214 (amd64-avx-avx512.c): Remove.
1215 (amd64-avx-avx512-linux.c): Remove.
1216 (amd64-mpx.c): Remove.
1217 (amd64-mpx-linux.c): Remove.
1218 (amd64-avx-mpx-avx512-pku.c): Remove.
1219 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
1220 (amd64-avx-mpx.c): Remove.
1221 (amd64-avx-mpx-linux.c): Remove.
1222 (x32.c): Remove.
1223 (x32-linux.c): Remove.
1224 (x32-avx.c): Remove.
1225 (x32-avx-linux.c): Remove.
1226 (x32-avx-avx512.c): Remove.
1227 (x32-avx-avx512-linux.c): Remove.
1228 (reg-xtensa.c): Remove.
1229 (reg-tilegx.c): Remove.
1230 (reg-tilegx32.c): Remove.
1231
1672e0d9
SDJ
12322017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
1233
1234 * Makefile.in (SFILES): Add "common/environ.c".
1235 (OBJS): Add "common/environ.h".
1236
239b6d10
WT
12372017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
1238
1239 * configure.ac: Check if the fs_base and gs_base members of
1240 `struct user_regs_struct' exist.
1241 * config.in: Regenerated.
1242 * configure: Likewise.
1243
694b382c
AT
12442017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
1245
1246 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
1247 target_read_memory.
1248 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
1249 (get_next_pcs_syscall_next_pc): Likewise.
1250
7dc53023
LM
12512016-12-23 Luis Machado <lgustavo@codesourcery.com>
1252
1253 * win32-i386-low.c: Fix incorrect reference to a couple source files.
1254 * nto-x86-low.c: Likewise.
1255
ad02e4fe
SM
12562016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
1257
1258 * Makefile.in: Include disable-implicit-rules.mk.
1259
dcb07cfa
PA
12602016-11-23 Pedro Alves <palves@redhat.com>
1261
1262 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
1263 (debug_vprintf): Use std::chrono::steady_clock instead of
1264 gettimeofday. Use '.' instead of ':'.
1265 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
1266 (get_timestamp): Use std::chrono::steady_clock instead of
1267 gettimeofday.
1268
8629c02c
SM
12692016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1270
1271 * Makefile.in: Fix whitespace formatting.
1272
b593ecca
SM
12732016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1274
1275 * Makefile.in (SFILES, OBS): Flatten list and order
1276 alphabetically.
1277
9986ba08
PA
12782016-11-23 Pedro Alves <palves@redhat.com>
1279
1280 * event-loop.c (handle_file_event): Use warning.
1281 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
1282 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1283 Use warning.
1284
4eefa7bc
PA
12852016-11-23 Pedro Alves <palves@redhat.com>
1286
1287 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
1288 output.
1289 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
1290 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
1291 debug_printf and debug_flush for debug output.
1292 * server.c (handle_general_set): Likewise.
1293 * thread-db.c (try_thread_db_load): Use debug_printf for debug
1294 output.
1295
5443506e
SM
12962016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1297
1298 * Makefile.in (.c.o): Replace rule with ...
1299 (%.o: %.c): ... this one.
1300
3b165252
SM
13012016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1302
1303 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
1304 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
1305 make.
1306 * configure.ac: Remove checks for the make program.
1307 * configure: Re-generate.
1308
0bcda685
PA
13092016-10-28 Pedro Alves <palves@redhat.com>
1310
1311 * Makefile.in (CXX_DIALECT): Get from configure.
1312 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
1313 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
1314 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
1315 * config.in: Regenerate.
1316 * configure: Regenerate.
1317
c3805894
YQ
13182016-10-27 Yao Qi <yao.qi@linaro.org>
1319
1320 * linux-low.c (linux_supports_range_stepping): Return true if
1321 can_software_single_step return true.
1322
89342618
YQ
13232016-10-27 Yao Qi <yao.qi@linaro.org>
1324
1325 * inferiors.c (find_inferior_in_random): New function.
1326 * inferiors.h (find_inferior_in_random): Declare.
1327 * linux-low.c (linux_wait_for_event_filtered): Call
1328 find_inferior_in_random instead of find_inferior.
1329
e3652c84
YQ
13302016-10-27 Yao Qi <yao.qi@linaro.org>
1331
1332 * linux-low.c (linux_wait_1): If single-step breakpoints are
1333 inserted, remove them.
1334
5a04c4cf
PA
13352016-10-26 Pedro Alves <palves@redhat.com>
1336
1337 * linux-low.c (handle_extended_wait): Link parent/child fork
1338 threads.
1339 (linux_wait_1): Unlink them.
1340 (linux_set_resume_request): Ignore resume requests for
1341 already-resumed and unhandled fork child threads.
1342 * linux-low.h (struct lwp_info) <fork_relative>: New field.
1343 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
1344 New functions.
1345 (handle_v_requests) <vCont>: Don't call require_running.
1346 * server.h (in_queued_stop_replies): New declaration.
1347
cb93dc7f
YQ
13482016-10-24 Yao Qi <yao.qi@linaro.org>
1349
1350 PR server/20733
1351 * linux-aarch64-low.c (append_insns): Cast the return value to
1352 'uint32_t *'.
1353
a1078bea
YQ
13542016-10-10 Yao Qi <yao.qi@linaro.org>
1355
1356 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
1357
1fb77080
SDJ
13582016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
1359
1360 * target.c (target_supports_multi_process): New function, moved
1361 from...
1362 * target.h (target_supports_multi_process): ... here. Remove
1363 macro.
1364
39b5a3b9
TT
13652016-10-05 Tom Tromey <tom@tromey.com>
1366
1367 PR remote/20655:
1368 * tracepoint.c (handle_tracepoint_bkpts): Check
1369 ipa_error_tracepoint, not ipa_stopping_tracepoint.
1370
c1d0b70a
YQ
13712016-10-05 Yao Qi <yao.qi@linaro.org>
1372
1373 * configure.srv: Update the path of arm-*.xml files.
1374
0a69eedb
YQ
13752016-10-05 Terry Guo <terry.guo@arm.com>
1376 Yao Qi <yao.qi@linaro.org>
1377
1378 * Makefile.in: Adjust the path of rules.
1379 * configure.srv: Update the path of xml files.
1380 * regformats/arm-with-iwmmxt.dat: Regenerated.
1381 * regformats/arm-with-neon.dat: Likewise.
1382 * regformats/arm-with-vfpv2.dat: Likewise.
1383 * regformats/arm-with-vfpv3.dat Likewise.
1384
17e16485
YQ
13852016-09-30 Yao Qi <yao.qi@linaro.org>
1386
1387 PR gdbserver/20627
1388 * target.c (target_stop_and_wait): Don't call
1389 target_continue_no_signal, use resume_stop instead.
1390
edeeb602
YQ
13912016-09-26 Yao Qi <yao.qi@linaro.org>
1392
1393 * linux-low.c (linux_wait_1): Call debug_exit.
1394
503b1c39
PA
13952016-09-23 Pedro Alves <palves@redhat.com>
1396
1397 * Makefile.in (SFILES): Add common/new-op.c.
1398 (OBS): Add common/new-op.o.
1399 (new-op.o): New rule.
1400
74172ecf
SM
14012016-09-21 Simon Marchi <simon.marchi@ericsson.com>
1402
1403 * .gitinore: Ignore more files.
1404
fc6cda2e
YQ
14052016-09-21 Yao Qi <yao.qi@linaro.org>
1406
1407 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
1408 23.
1409
bc1e6c81
SDJ
14102016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
1411
1412 * server.c (start_inferior): Call target_mourn_inferior instead of
1413 mourn_inferior; pass ptid_t argument to it.
1414 (resume): Likewise.
1415 (handle_target_event): Likewise.
1416 * target.c (target_mourn_inferior): New function.
1417 * target.h (mourn_inferior): Delete macro.
1418
0e00e962
AA
14192016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
1420
1421 * linux-low.c (lwp_is_stepping): New function.
1422
1d8cb77d
CL
14232016-09-06 Carl Love <cel@us.ibm.com>
1424
1425 * server.c (start_inferior): Fixed comment, requested comment change
1426 didn't get updated correctly. Removed reference to ptrace () call as
1427 it is only true on Linux systems.
1428
7313bced
CL
14292016-09-06 Carl Love <cel@us.ibm.com>
1430
1431 * server.c (start_inferior): Do not call
1432 function target_post_create_inferior () if the
1433 inferior process has already exited.
1434
cf6de44d
PA
14352016-09-05 Pedro Alves <palves@redhat.com>
1436
1437 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
1438 (COMPILE.pre, CC_LD): Use CXX directly.
1439 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
1440 * acinclude.m4: Don't include build-with-cxx.m4.
1441 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
1442 * configure: Regenerate.
1443
c1da6748
AT
14442016-09-02 Akash Trehan <akash.trehan123@gmail.com>
1445
1446 PR gdb/19495
1447 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
1448 call writing data to own_buf.
1449
f2b9e3df
SDJ
14502016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1451
1452 * target.c (mywait): Call target_wait instead of
1453 the_target->wait.
1454 (target_wait): New function.
1455
049a8570
SDJ
14562016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
1457
1458 * server.c (start_inferior): New variable 'ptid'. Replace calls
1459 to the_target->resume by target_continue{,_no_signal}, depending
1460 on the case.
1461 * target.c (target_stop_and_wait): Call target_continue_no_signal
1462 instead of the_target->resume.
1463 (target_continue): New function.
1464
3aa5cfa0
AT
14652016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
1466
1467 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
1468
754653a7
AZ
14692016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
1470
1471 PR server/20491
1472 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
1473 ps_prochandle.
1474 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
1475 * linux-arm-low.c (ps_get_thread_area): Likewise.
1476 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
1477 * linux-m68k-low.c (ps_get_thread_area): Likewise.
1478 * linux-mips-low.c (ps_get_thread_area): Likewise.
1479 * linux-nios2-low.c (ps_get_thread_area): Likewise.
1480 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
1481 * linux-x86-low.c (ps_get_thread_area): Likewise.
1482 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
1483
ed036b40
PA
14842016-08-19 Pedro Alves <palves@redhat.com>
1485
1486 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
1487
c8ef42ee
PA
14882016-08-19 Pedro Alves <palves@redhat.com>
1489
1490 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
1491 comment. Use memcpy instead of casting through unsigned long.
1492
9c235a72
PA
14932016-08-19 Pedro Alves <palves@redhat.com>
1494
1495 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
1496 allocating around 0x80000000.
1497
201506da
PA
14982016-08-19 Pedro Alves <palves@redhat.com>
1499
1500 PR gdb/20415
1501 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
1502 (x32-avx512-linux-ipa.o): New rules.
1503 * configure.ac (x86_64-*-linux*): New x32 check.
1504 * configure.srv (ipa_x32_linux_regobj): New.
1505 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
1506 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
1507 descriptions.
1508 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
1509 descriptions.
1510 * configure: Regenerate.
1511
f348d89a
PA
15122016-08-09 Pedro Alves <palves@redhat.com>
1513
1514 PR gdb/18653
1515 * Makefile.in (OBS): Add signals-state-save-restore.o.
1516 (signals-state-save-restore.o): New rule.
1517 * config.in: Regenerate.
1518 * configure: Regenerate.
1519 * linux-low.c: Include "signals-state-save-restore.h".
1520 (linux_create_inferior): Call
1521 restore_original_signals_state.
1522 * server.c: Include "dispositions-save-restore.h".
1523 (captured_main): Call save_original_signals_state.
1524
1baf5149
PA
15252016-08-05 Pedro Alves <palves@redhat.com>
1526
1527 * configure: Regenerate.
1528
fcd4a73d
YQ
15292016-08-04 Yao Qi <yao.qi@linaro.org>
1530
1531 * linux-low.c (regsets_fetch_inferior_registers): Check
1532 errno is ESRCH or not.
1533
979659d0
YQ
15342016-08-02 Yao Qi <yao.qi@linaro.org>
1535
1536 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
1537 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
1538 (thread_db_load_search): Update.
1539 (try_thread_db_load_1): Don't look for td_ta_event_addr,
1540 td_ta_set_event and td_ta_event_getmsg.
1541
6598661d
PA
15422016-07-26 Pedro Alves <palves@redhat.com>
1543
1544 PR server/20414
1545 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
1546 of unsigned long for 64-bit registers and use uint32_t instead of
1547 unsigned int for 32-bit registers.
1548
9cf12d57
PA
15492016-07-26 Pedro Alves <palves@redhat.com>
1550
1551 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
1552 to 'ptrace'.
1553
305450ed
TT
15542016-07-21 Tom Tromey <tom@tromey.com>
1555
1556 * configure: Rebuild.
1557
2583da7c
YQ
15582016-07-21 Yao Qi <yao.qi@linaro.org>
1559
1560 * mem-break.c (find_gdb_breakpoint): Cast bp to
1561 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
1562
21536b36
YQ
15632016-07-21 Yao Qi <yao.qi@linaro.org>
1564
1565 * server.c (handle_v_requests): Support s and S actions
1566 if target_supports_software_single_step return true.
1567
8901d193
YQ
15682016-07-21 Yao Qi <yao.qi@linaro.org>
1569
1570 * linux-low.c (resume_stopped_resumed_lwps): If resume request
1571 is resume_step, call maybe_hw_step.
1572 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
1573 and unstop them.
1574 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
1575 breakpoints or not.
1576 (proceed_one_lwp): If resume request is resume_step, install
1577 reinsert breakpoints and call maybe_hw_step.
1578
0e9a339e
YQ
15792016-07-21 Yao Qi <yao.qi@linaro.org>
1580
1581 * linux-low.c (proceed_one_lwp): Declare.
1582 (linux_resume_one_thread): Remove local variable 'step'.
1583 Lift code enqueue signal. Call proceed_one_lwp instead of
1584 linux_resume_one_lwp.
1585
4281b351
YQ
15862016-07-21 Yao Qi <yao.qi@linaro.org>
1587
1588 * linux-low.c (linux_resume_one_thread): Call
1589 enqueue_pending_signal.
1590
984a2c04
YQ
15912016-07-21 Yao Qi <yao.qi@linaro.org>
1592
1593 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
1594 * inferiors.c (do_restore_current_thread_cleanup): New function.
1595 (make_cleanup_restore_current_thread): Likewise.
1596 * linux-low.c (install_software_single_step_breakpoints): Call
1597 make_cleanup_restore_current_thread. Switch current_thread to
1598 thread.
1599
bec903c9
YQ
16002016-07-21 Yao Qi <yao.qi@linaro.org>
1601
1602 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
1603 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
1604 (clone_one_breakpoint): Likewise.
1605 (delete_reinsert_breakpoints): Change parameter to thread.
1606 Callers updated.
1607 (has_reinsert_breakpoints): Likewise.
1608 (uninsert_reinsert_breakpoints): Likewise.
1609 (reinsert_reinsert_breakpoints): Likewise.
1610 * mem-break.h (set_reinsert_breakpoint): Update declaration.
1611 (delete_reinsert_breakpoints): Likewise.
1612 (reinsert_reinsert_breakpoints): Likewise.
1613 (uninsert_reinsert_breakpoints): Likewise.
1614 (has_reinsert_breakpoints): Likewise.
1615
63c40ec7
YQ
16162016-07-21 Yao Qi <yao.qi@linaro.org>
1617
1618 * inferiors.c (get_thread_process): Make parameter const.
1619 * inferiors.h (get_thread_process): Update declaration.
1620 * mem-break.c (clone_all_breakpoints): Remove all parameters.
1621 Add new parameters child_thread and parent_thread. Callers
1622 updated.
1623 * mem-break.h (clone_all_breakpoints): Update declaration.
1624
9aa76cd0
YQ
16252016-07-21 Yao Qi <yao.qi@linaro.org>
1626
1627 * mem-break.c (struct breakpoint) <cond_list>: Remove.
1628 <command_list, handler>: Remove.
1629 (struct gdb_breakpoint): New.
1630 (struct other_breakpoint): New.
1631 (struct reinsert_breakpoint): New.
1632 (is_gdb_breakpoint): New function.
1633 (any_persistent_commands): Update command_list if
1634 is_gdb_breakpoint returns true.
1635 (set_breakpoint): Create breakpoints according to their types.
1636 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
1637 (set_gdb_breakpoint_1): Likewise.
1638 (set_gdb_breakpoint): Likewise.
1639 (clear_breakpoint_conditions): Change parameter type to
1640 'struct gdb_breakpoint *'.
1641 (clear_breakpoint_commands): Likewise.
1642 (clear_breakpoint_conditions_and_commands): Likewise.
1643 (add_condition_to_breakpoint): Likewise.
1644 (add_breakpoint_condition): Likewise.
1645 (add_commands_to_breakpoint): Likewise.
1646 (check_breakpoints): Check other_breakpoint.
1647 (clone_one_breakpoint): Clone breakpopint according to its type.
1648 * mem-break.h (struct gdb_breakpoint): Declare.
1649 (set_gdb_breakpoint): Update declaration.
1650 (clear_breakpoint_conditions_and_commands): Likewise.
1651 (add_breakpoint_condition): Likewise.
1652 (add_breakpoint_commands): Likewise.
1653 * server.c (process_point_options): Change parameter type to
1654 'struct gdb_breakpoint *'.
1655
811f8301
YQ
16562016-07-21 Yao Qi <yao.qi@linaro.org>
1657
1658 * mem-break.c (set_breakpoint_at): Rename it to ...
1659 (set_breakpoint_type_at): ... it.
1660 (set_breakpoint_at): Call set_breakpoint_type_at.
1661 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
1662 * mem-break.h (set_breakpoint_at): Update comments.
1663
b1c51e36
CLT
16642016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
1665
1666 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
1667 to buf parameter.
1668 (nios2_store_gregset): Likewise.
1669
ced2dffb
PA
16702016-07-01 Pedro Alves <palves@redhat.com>
1671 Antoine Tremblay <antoine.tremblay@ericsson.com>
1672
1673 * linux-low.c: Change interface to take the target lwp_info
1674 pointer directly and return void. Handle detaching from a zombie
1675 thread.
1676 (linux_detach_lwp_callback): New function.
1677 (linux_detach): Detach from the leader thread after detaching from
1678 the clone threads.
1679
2ac09a5b
YQ
16802016-06-28 Yao Qi <yao.qi@linaro.org>
1681
1682 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
1683 for variable new_offset.
1684 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1685 (aarch64_ftrace_insn_reloc_cb): Likewise.
1686 (aarch64_ftrace_insn_reloc_tb): Likewise.
1687 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
1688 PRIx64 instead of PRIx32.
1689
79e7fd4f
YQ
16902016-06-28 Yao Qi <yao.qi@linaro.org>
1691
1692 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
1693 (the_low_target): Install arm_get_syscall_trapinfo.
1694
061fc021
YQ
16952016-06-28 Yao Qi <yao.qi@linaro.org>
1696
1697 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
1698 function.
1699 (the_low_target): Install aarch64_get_syscall_trapinfo.
1700
4cc32bec
YQ
17012016-06-28 Yao Qi <yao.qi@linaro.org>
1702
1703 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
1704 Callers updated.
1705 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
1706 Remove parameter sysno.
1707 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
1708 sysret.
1709
782c1122
AA
17102016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1711
1712 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
1713 (s390_emit_ne_goto): Likewise.
1714 (s390_emit_lt_goto): Likewise.
1715 (s390_emit_le_goto): Likewise.
1716 (s390_emit_gt_goto): Likewise.
1717 (s390_emit_ge_goto): Likewise.
1718 (s390x_emit_eq_goto): Likewise.
1719 (s390x_emit_ne_goto): Likewise.
1720 (s390x_emit_lt_goto): Likewise.
1721 (s390x_emit_le_goto): Likewise.
1722 (s390x_emit_gt_goto): Likewise.
1723 (s390x_emit_ge_goto): Likewise.
1724 (s390_emit_ops_impl): Mark variable static.
1725 (s390x_emit_ops): Likewise.
1726
2e7b624b
YQ
17272016-06-17 Yao Qi <yao.qi@linaro.org>
1728
1729 * linux-low.c (handle_extended_wait): Call
1730 uninsert_reinsert_breakpoints for the parent process. Remove
1731 reinsert breakpoints from the child process. Reinsert them to
1732 the parent process when vfork is done.
1733 * mem-break.c (uninsert_reinsert_breakpoints): New function.
1734 (reinsert_reinsert_breakpoints): New function.
1735 * mem-break.h (uninsert_reinsert_breakpoints): Declare
1736 (reinsert_reinsert_breakpoints): Declare.
1737
8a81c5d7
YQ
17382016-06-17 Yao Qi <yao.qi@linaro.org>
1739
1740 * linux-low.c (handle_extended_wait): If the parent is doing
1741 step-over, remove the reinsert breakpoints from the forked child.
1742
f50bf8e5
YQ
17432016-06-17 Yao Qi <yao.qi@linaro.org>
1744
1745 * linux-low.c (unsuspend_all_lwps): Declare.
1746 (linux_low_filter_event): If thread exited, call finish_step_over.
1747 If step-over is finished, unsuspend other threads.
1748
8376a3cb
YQ
17492016-06-17 Yao Qi <yao.qi@linaro.org>
1750
1751 * linux-low.c (linux_resume_one_lwp_throw): Assert
1752 has_reinsert_breakpoints returns false.
1753 * mem-break.c (delete_disabled_breakpoints): Assert
1754 bp type isn't reinsert_breakpoint.
1755
f79b145d
YQ
17562016-06-17 Yao Qi <yao.qi@linaro.org>
1757
1758 * linux-low.c (maybe_hw_step): New function.
1759 (linux_resume_one_lwp_throw): Call maybe_hw_step.
1760 (finish_step_over): Switch current_thread to lwp temporarily,
1761 and assert has_reinsert_breakpoints returns true.
1762 (proceed_one_lwp): Call maybe_hw_step.
1763 * mem-break.c (has_reinsert_breakpoints): New function.
1764 * mem-break.h (has_reinsert_breakpoints): Declare.
1765
0ae534d2
JT
17662016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
1767
1768 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
1769
fcdad592
YQ
17702016-05-17 Yao Qi <yao.qi@linaro.org>
1771
1772 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
1773 instead of find_inferior.
1774
9e784964
YQ
17752016-05-05 Yao Qi <yao.qi@linaro.org>
1776
1777 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
1778 Initialize res to zero.
1779
cf2ebb6e
YQ
17802016-05-05 Yao Qi <yao.qi@linaro.org>
1781
1782 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
1783 to uint32_t.
1784
c1aebf87
UW
17852016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1786
1787 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
1788 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
1789 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
1790
35fd2deb 17912016-04-28 Par Olsson <par.olsson@windriver.com>
cbe14bcf 1792 Simon Marchi <simon.marchi@ericsson.com>
35fd2deb
PO
1793
1794 * tracepoint.c (write_inferior_int8): New function.
1795 (cmd_qtenable_disable): Write enable flag using
1796 write_inferior_int8.
1797
484b3c32
YQ
17982016-04-25 Yao Qi <yao.qi@linaro.org>
1799
1800 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
1801 (need_step_over_p): Return zero if the LWP has pending signals
1802 can be delivered on software single step target.
1803
85ba7d86
YQ
18042016-04-25 Yao Qi <yao.qi@linaro.org>
1805
1806 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
1807 return instead of error.
1808
3539aa13
YQ
18092016-04-22 Yao Qi <yao.qi@linaro.org>
1810
1811 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
1812 to 23.
1813
5b061e98
YQ
18142016-04-22 Yao Qi <yao.qi@linaro.org>
1815
1816 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
1817 signal when stepping over breakpoint with software single
1818 step.
1819
3451269c
PA
18202016-04-21 Pedro Alves <palves@redhat.com>
1821
1822 * linux-s390-low.c (s390_collect_ptrace_register)
1823 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
1824 add casts.
1825 (s390_check_regset): Use void * instead of gdb_byte *.
1826
a2358508
PA
18272016-04-20 Pedro Alves <palves@redhat.com>
1828
1829 * configure: Renegerate.
1830
6885166d
YQ
18312016-04-20 Yao Qi <yao.qi@linaro.org>
1832
1833 * linux-aarch32-low.c: Include "arch/arm-linux.h".
1834 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
1835 number 16.
1836 (arm_store_gregset): Likewise.
1837
2b863f51
WT
18382016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
1839
1840 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
1841 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
1842 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
1843 (amd64-avx-mpx-linux.c): New rules.
1844 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
1845 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
1846 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
1847 (srv_amd64_regobj): Add amd64-avx-mpx.o.
1848 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
1849 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
1850 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
1851 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
1852 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
1853 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
1854 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
1855 * linux-x86-low.c (x86_linux_read_description): Add case for
1856 X86_XSTATE_AVX_MPX_MASK.
1857 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
1858 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
1859 init_registers_i386_avx_mpx_linux.
1860 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1861 (initialize_low_tracepoint): Call
1862 init_registers_i386_avx_mpx_linux.
1863 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
1864 (initialize_low_tracepoint): Call
1865 init_registers_amd64_avx_mpx_linux.
1866 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
1867 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
1868 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
1869 declarations.
1870
9b30624b
PA
18712016-04-18 Pedro Alves <palves@redhat.com>
1872
1873 * configure: Regenerate.
1874
45e3745e
AT
18752016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
1876
1877 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
1878 (aarch64_emit_sub): Likewise.
1879
2afc13ff
PA
18802016-04-12 Pedro Alves <palves@redhat.com>
1881
1882 * utils.c (prepare_to_throw_exception): Delete.
1883
6e774b13
SM
18842016-04-05 Simon Marchi <simon.marchi@ericsson.com>
1885
1886 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
1887
4dca19f8
MK
18882016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
1889
1890 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
1891
d0a9981f
MK
18922016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
1893
1894 * linux-aarch64-ipa.c: Add <elf.h> include.
1895 * linux-ppc-ipa.c: Add <elf.h> include.
1896 * linux-s390-ipa.c: Add <elf.h> include.
1897
252db07e
MK
18982016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
1899
1900 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
1901 (get_raw_reg_ptr): Likewise.
1902 (get_trace_state_variable_value_ptr): Likewise.
1903 (set_trace_state_variable_value_ptr): Likewise.
1904 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
1905 char *.
1906
14e2b6d9
MK
19072016-03-31 Wei-cheng Wang <cole945@gmail.com>
1908 Marcin Kościelnicki <koriakin@0x04.net>
1909
1910 PR/17221
1911 * linux-ppc-low.c (emit_insns): New function.
1912 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
1913 (ppc_emit_prologue): New function.
1914 (ppc_emit_epilogue): New function.
1915 (ppc_emit_add): New function.
1916 (ppc_emit_sub): New function.
1917 (ppc_emit_mul): New function.
1918 (ppc_emit_lsh): New function.
1919 (ppc_emit_rsh_signed): New function.
1920 (ppc_emit_rsh_unsigned): New function.
1921 (ppc_emit_ext): New function.
1922 (ppc_emit_zero_ext): New function.
1923 (ppc_emit_log_not): New function.
1924 (ppc_emit_bit_and): New function.
1925 (ppc_emit_bit_or): New function.
1926 (ppc_emit_bit_xor): New function.
1927 (ppc_emit_bit_not): New function.
1928 (ppc_emit_equal): New function.
1929 (ppc_emit_less_signed): New function.
1930 (ppc_emit_less_unsigned): New function.
1931 (ppc_emit_ref): New function.
1932 (ppc_emit_const): New function.
1933 (ppc_emit_reg): New function.
1934 (ppc_emit_pop): New function.
1935 (ppc_emit_stack_flush): New function.
1936 (ppc_emit_swap): New function.
1937 (ppc_emit_stack_adjust): New function.
1938 (ppc_emit_call): New function.
1939 (ppc_emit_int_call_1): New function.
1940 (ppc_emit_void_call_2): New function.
1941 (ppc_emit_if_goto): New function.
1942 (ppc_emit_goto): New function.
1943 (ppc_emit_eq_goto): New function.
1944 (ppc_emit_ne_goto): New function.
1945 (ppc_emit_lt_goto): New function.
1946 (ppc_emit_le_goto): New function.
1947 (ppc_emit_gt_goto): New function.
1948 (ppc_emit_ge_goto): New function.
1949 (ppc_write_goto_address): New function.
1950 (ppc_emit_ops_impl): New static variable.
1951 (ppc64v1_emit_prologue): New function.
1952 (ppc64v2_emit_prologue): New function.
1953 (ppc64_emit_epilogue): New function.
1954 (ppc64_emit_add): New function.
1955 (ppc64_emit_sub): New function.
1956 (ppc64_emit_mul): New function.
1957 (ppc64_emit_lsh): New function.
1958 (ppc64_emit_rsh_signed): New function.
1959 (ppc64_emit_rsh_unsigned): New function.
1960 (ppc64_emit_ext): New function.
1961 (ppc64_emit_zero_ext): New function.
1962 (ppc64_emit_log_not): New function.
1963 (ppc64_emit_bit_and): New function.
1964 (ppc64_emit_bit_or): New function.
1965 (ppc64_emit_bit_xor): New function.
1966 (ppc64_emit_bit_not): New function.
1967 (ppc64_emit_equal): New function.
1968 (ppc64_emit_less_signed): New function.
1969 (ppc64_emit_less_unsigned): New function.
1970 (ppc64_emit_ref): New function.
1971 (ppc64_emit_const): New function.
1972 (ppc64v1_emit_reg): New function.
1973 (ppc64v2_emit_reg): New function.
1974 (ppc64_emit_pop): New function.
1975 (ppc64_emit_stack_flush): New function.
1976 (ppc64_emit_swap): New function.
1977 (ppc64v1_emit_call): New function.
1978 (ppc64v2_emit_call): New function.
1979 (ppc64v1_emit_int_call_1): New function.
1980 (ppc64v2_emit_int_call_1): New function.
1981 (ppc64v1_emit_void_call_2): New function.
1982 (ppc64v2_emit_void_call_2): New function.
1983 (ppc64_emit_if_goto): New function.
1984 (ppc64_emit_eq_goto): New function.
1985 (ppc64_emit_ne_goto): New function.
1986 (ppc64_emit_lt_goto): New function.
1987 (ppc64_emit_le_goto): New function.
1988 (ppc64_emit_gt_goto): New function.
1989 (ppc64_emit_ge_goto): New function.
1990 (ppc64v1_emit_ops_impl): New static variable.
1991 (ppc64v2_emit_ops_impl): New static variable.
1992 (ppc_emit_ops): New function.
1993 (linux_low_target): Wire in ppc_emit_ops.
1994
a2174ba4
MK
19952016-03-31 Wei-cheng Wang <cole945@gmail.com>
1996 Marcin Kościelnicki <koriakin@0x04.net>
1997
1998 PR/17221
1999 * Makefile.in: Add powerpc-*-ipa.o
2000 * configure.srv: Add ipa_obj for powerpc*-linux.
2001 * linux-ppc-ipa.c: New file.
2002 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
2003 includes.
2004 (PPC_FIELD): New macro.
2005 (PPC_SEXT): New macro.
2006 (PPC_OP6): New macro.
2007 (PPC_BO): New macro.
2008 (PPC_LI): New macro.
2009 (PPC_BD): New macro.
2010 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
2011 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
2012 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
2013 (ppc_get_thread_area): New function.
2014 (is_elfv2_inferior): New function.
2015 (gen_ds_form): New function.
2016 (GEN_STD): New macro.
2017 (GEN_STDU): New macro.
2018 (GEN_LD): New macro.
2019 (GEN_LDU): New macro.
2020 (gen_d_form): New function.
2021 (GEN_ADDI): New macro.
2022 (GEN_ADDIS): New macro.
2023 (GEN_LI): New macro.
2024 (GEN_LIS): New macro.
2025 (GEN_ORI): New macro.
2026 (GEN_ORIS): New macro.
2027 (GEN_LWZ): New macro.
2028 (GEN_STW): New macro.
2029 (GEN_STWU): New macro.
2030 (gen_xfx_form): New function.
2031 (GEN_MFSPR): New macro.
2032 (GEN_MTSPR): New macro.
2033 (GEN_MFCR): New macro.
2034 (GEN_MTCR): New macro.
2035 (GEN_SYNC): New macro.
2036 (GEN_LWSYNC): New macro.
2037 (gen_x_form): New function.
2038 (GEN_OR): New macro.
2039 (GEN_MR): New macro.
2040 (GEN_LWARX): New macro.
2041 (GEN_STWCX): New macro.
2042 (GEN_CMPW): New macro.
2043 (gen_md_form): New function.
2044 (GEN_RLDICL): New macro.
2045 (GEN_RLDICR): New macro.
2046 (gen_i_form): New function.
2047 (GEN_B): New macro.
2048 (GEN_BL): New macro.
2049 (gen_b_form): New function.
2050 (GEN_BNE): New macro.
2051 (GEN_LOAD): New macro.
2052 (GEN_STORE): New macro.
2053 (gen_limm): New function.
2054 (gen_atomic_xchg): New function.
2055 (gen_call): New function.
2056 (ppc_relocate_instruction): New function.
2057 (ppc_install_fast_tracepoint_jump_pad): New function.
2058 (ppc_get_min_fast_tracepoint_insn_len): New function.
2059 (ppc_get_ipa_tdesc_idx): New function.
2060 (the_low_target): Wire in the new functions.
2061 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
2062 tdescs.
2063 * linux-ppc-tdesc.h: New file.
2064
a13c4696
MK
20652016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
2066
2067 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2068 (alloc_jump_pad_buffer): New function.
2069 * linux-amd64-ipa.c: Add <sys/mman.h> include.
2070 (alloc_jump_pad_buffer): New function.
2071 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
2072 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
2073 (alloc_jump_pad_buffer): New function.
2074 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
2075 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
2076 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
2077 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
2078
1cda1512
MK
20792016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2080
2081 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
2082 * linux-amd64-ipa.c: Likewise.
2083 * linux-i386-ipa.c: Likewise.
2084 * linux-s390-ipa.c: Likewise.
2085 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
2086 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
2087 set_trace_state_variable_value_ptr.
2088 (struct ipa_sym_addresses): Likewise.
2089 (symbol_list): Likewise.
2090 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
2091 accessing gdb_collect directly.
2092 (gdb_collect_ptr_type): New typedef.
2093 (get_raw_reg_ptr_type): New typedef.
2094 (get_trace_state_variable_value_ptr_type): New typedef.
2095 (set_trace_state_variable_value_ptr_type): New typedef.
2096 (gdb_collect_ptr): New global.
2097 (get_raw_reg_ptr): New global.
2098 (get_trace_state_variable_value_ptr): New global.
2099 (set_trace_state_variable_value_ptr): New global.
2100 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
2101 accessing get_raw_reg directly.
2102 (get_get_tsv_func_addr): Likewise for
2103 get_trace_state_variable_value_ptr.
2104 (get_set_tsv_func_addr): Likewise for
2105 set_trace_state_variable_value_ptr.
2106 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
2107
72fb5488
SM
21082016-03-30 Simon Marchi <simon.marchi@ericsson.com>
2109
2110 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
2111
28170b88
MK
21122016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
2113
2114 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
2115 packets.
2116 (relocate_instruction): Remove own_buf.
2117 * server.c (own_buf): Make global.
2118 (handle_v_requests): Make global.
2119 * server.h (own_buf): New declaration.
2120 (handle_v_requests): New prototype.
2121
f39e8743
MK
21222016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2123
2124 PR 18377
2125 * linux-s390-low.c (add_insns): New function.
2126 (s390_emit_prologue): New function.
2127 (s390_emit_epilogue): New function.
2128 (s390_emit_add): New function.
2129 (s390_emit_sub): New function.
2130 (s390_emit_mul): New function.
2131 (s390_emit_lsh): New function.
2132 (s390_emit_rsh_signed): New function.
2133 (s390_emit_rsh_unsigned): New function.
2134 (s390_emit_ext): New function.
2135 (s390_emit_log_not): New function.
2136 (s390_emit_bit_and): New function.
2137 (s390_emit_bit_or): New function.
2138 (s390_emit_bit_xor): New function.
2139 (s390_emit_bit_not): New function.
2140 (s390_emit_equal): New function.
2141 (s390_emit_less_signed): New function.
2142 (s390_emit_less_unsigned): New function.
2143 (s390_emit_ref): New function.
2144 (s390_emit_if_goto): New function.
2145 (s390_emit_goto): New function.
2146 (s390_write_goto_address): New function.
2147 (s390_emit_litpool): New function.
2148 (s390_emit_const): New function.
2149 (s390_emit_call): New function.
2150 (s390_emit_reg): New function.
2151 (s390_emit_pop): New function.
2152 (s390_emit_stack_flush): New function.
2153 (s390_emit_zero_ext): New function.
2154 (s390_emit_swap): New function.
2155 (s390_emit_stack_adjust): New function.
2156 (s390_emit_set_r2): New function.
2157 (s390_emit_int_call_1): New function.
2158 (s390_emit_void_call_2): New function.
2159 (s390_emit_eq_goto): New function.
2160 (s390_emit_ne_goto): New function.
2161 (s390_emit_lt_goto): New function.
2162 (s390_emit_le_goto): New function.
2163 (s390_emit_gt_goto): New function.
2164 (s390_emit_ge_goto): New function.
2165 (s390x_emit_prologue): New function.
2166 (s390x_emit_epilogue): New function.
2167 (s390x_emit_add): New function.
2168 (s390x_emit_sub): New function.
2169 (s390x_emit_mul): New function.
2170 (s390x_emit_lsh): New function.
2171 (s390x_emit_rsh_signed): New function.
2172 (s390x_emit_rsh_unsigned): New function.
2173 (s390x_emit_ext): New function.
2174 (s390x_emit_log_not): New function.
2175 (s390x_emit_bit_and): New function.
2176 (s390x_emit_bit_or): New function.
2177 (s390x_emit_bit_xor): New function.
2178 (s390x_emit_bit_not): New function.
2179 (s390x_emit_equal): New function.
2180 (s390x_emit_less_signed): New function.
2181 (s390x_emit_less_unsigned): New function.
2182 (s390x_emit_ref): New function.
2183 (s390x_emit_if_goto): New function.
2184 (s390x_emit_const): New function.
2185 (s390x_emit_call): New function.
2186 (s390x_emit_reg): New function.
2187 (s390x_emit_pop): New function.
2188 (s390x_emit_stack_flush): New function.
2189 (s390x_emit_zero_ext): New function.
2190 (s390x_emit_swap): New function.
2191 (s390x_emit_stack_adjust): New function.
2192 (s390x_emit_int_call_1): New function.
2193 (s390x_emit_void_call_2): New function.
2194 (s390x_emit_eq_goto): New function.
2195 (s390x_emit_ne_goto): New function.
2196 (s390x_emit_lt_goto): New function.
2197 (s390x_emit_le_goto): New function.
2198 (s390x_emit_gt_goto): New function.
2199 (s390x_emit_ge_goto): New function.
2200 (s390_emit_ops): New function.
2201 (struct linux_target_ops): Fill in emit_ops hook.
2202
abd9baf9
MK
22032016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2204
2205 PR 18377
2206 * Makefile.in: Add s390 IPA files.
2207 * configure.srv: Build IPA for s390.
2208 * linux-s390-ipa.c: New file.
2209 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
2210 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
2211 (tdesc_s390_linux32): Likewise.
2212 (init_registers_s390_linux32v1): Likewise.
2213 (tdesc_s390_linux32v1): Likewise.
2214 (init_registers_s390_linux32v2): Likewise.
2215 (tdesc_s390_linux32v2): Likewise.
2216 (init_registers_s390_linux64): Likewise.
2217 (tdesc_s390_linux64): Likewise.
2218 (init_registers_s390_linux64v1): Likewise.
2219 (tdesc_s390_linux64v1): Likewise.
2220 (init_registers_s390_linux64v2): Likewise.
2221 (tdesc_s390_linux64v2): Likewise.
2222 (init_registers_s390_te_linux64): Likewise.
2223 (tdesc_s390_te_linux64): Likewise.
2224 (init_registers_s390_vx_linux64): Likewise.
2225 (tdesc_s390_vx_linux64): Likewise.
2226 (init_registers_s390_tevx_linux64): Likewise.
2227 (tdesc_s390_tevx_linux64): Likewise.
2228 (init_registers_s390x_linux64): Likewise.
2229 (tdesc_s390x_linux64): Likewise.
2230 (init_registers_s390x_linux64v1): Likewise.
2231 (tdesc_s390x_linux64v1): Likewise.
2232 (init_registers_s390x_linux64v2): Likewise.
2233 (tdesc_s390x_linux64v2): Likewise.
2234 (init_registers_s390x_te_linux64): Likewise.
2235 (tdesc_s390x_te_linux64): Likewise.
2236 (init_registers_s390x_vx_linux64): Likewise.
2237 (tdesc_s390x_vx_linux64): Likewise.
2238 (init_registers_s390x_tevx_linux64): Likewise.
2239 (tdesc_s390x_tevx_linux64): Likewise.
2240 (have_hwcap_s390_vx): New static variable.
2241 (s390_arch_setup): Fill have_hwcap_s390_vx.
2242 (s390_get_thread_area): New function.
2243 (s390_ft_entry_gpr_esa): New const.
2244 (s390_ft_entry_gpr_zarch): New const.
2245 (s390_ft_entry_misc): New const.
2246 (s390_ft_entry_fr): New const.
2247 (s390_ft_entry_vr): New const.
2248 (s390_ft_main_31): New const.
2249 (s390_ft_main_64): New const.
2250 (s390_ft_exit_fr): New const.
2251 (s390_ft_exit_vr): New const.
2252 (s390_ft_exit_misc): New const.
2253 (s390_ft_exit_gpr_esa): New const.
2254 (s390_ft_exit_gpr_zarch): New const.
2255 (append_insns): New function.
2256 (s390_relocate_instruction): New function.
2257 (s390_install_fast_tracepoint_jump_pad): New function.
2258 (s390_get_min_fast_tracepoint_insn_len): New function.
2259 (s390_get_ipa_tdesc_idx): New function.
2260 (struct linux_target_ops): Wire in the above functions.
2261 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
2262 * linux-s390-tdesc.h: New file.
2263
a4105d04
MK
22642016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
2265
2266 * linux-s390-low.c (s390_supports_tracepoints): New function.
2267 (struct linux_target_ops): Fill supports_tracepoints hook.
2268
35ac8b3e
YQ
22692016-03-18 Yao Qi <yao.qi@linaro.org>
2270
2271 * linux-low.c (lwp_signal_can_be_delivered): New function.
2272 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
2273
94610ec4
YQ
22742016-03-18 Yao Qi <yao.qi@linaro.org>
2275
2276 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
2277 0 if signal is enqueued. Remove 'signal' from one debugging
2278 message. Move one debugging message to some lines below.
2279 Remove code setting 'signal' to 0.
2280
80aea927
YQ
22812016-03-18 Yao Qi <yao.qi@linaro.org>
2282
2283 * linux-low.c (linux_low_filter_event): Remove redundant
2284 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
2285
b04fd3be
MK
22862016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
2287
2288 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
2289 (struct linux_target_ops): Wire in the above.
2290
c40c8d4b
YQ
22912016-03-03 Yao Qi <yao.qi@linaro.org>
2292
2293 * linux-low.c: Update comments to start_step_over.
2294
0f8288ae
YQ
22952016-03-03 Yao Qi <yao.qi@linaro.org>
2296
2297 PR server/19736
2298 * linux-low.c (handle_extended_wait): Set child suspended
2299 if event_lwp->bp_reinsert isn't zero.
2300
fdbd04a8
YQ
23012016-03-02 Yao Qi <yao.qi@linaro.org>
2302
2303 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
2304 enqueue_pending_signal.
2305
6896a8fa
MK
23062016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
2307
2308 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
2309 is actually loaded.
2310
ab503087
MK
23112016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2312
2313 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
2314 (s390_regmap_3264) [!__s390x__]: New global.
2315 (s390_collect_ptrace_register): Skip map entries containing -1.
2316 (s390_supply_ptrace_register): Ditto.
2317 (s390_fill_gprs_high): New function.
2318 (s390_store_gprs_high): New function.
2319 (s390_regsets): Add NT_S390_HIGH_GPRS.
2320 (s390_get_hwcap): Enable on 31-bit.
2321 (have_hwcap_s390_high_gprs): Enable on 31-bit.
2322 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
2323 Detect NT_S390_HIGH_GPRS.
2324 (s390_usrregs_info_3264): Enable on 31-bit.
2325 (s390_regs_info): Enable regs_info_3264 on 31-bit.
2326 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
2327
ae91f625
MK
23282016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
2329
2330 PR gdb/13808
2331 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
2332 * configure.srv: Ditto.
2333 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
2334 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
2335 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
2336 (init_registers_amd64_linux): Remove prototype.
2337 (tdesc_amd64_linux): Remove declaration.
2338 (get_ipa_tdesc): New function.
2339 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2340 initialize remaining tdescs.
2341 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
2342 (init_registers_i386_linux): Remove prototype.
2343 (tdesc_i386_linux): Remove declaration.
2344 (get_ipa_tdesc): New function.
2345 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
2346 initialize remaining tdescs.
2347 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
2348 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
2349 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
2350 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
2351 (x86_get_ipa_tdesc_idx): New function.
2352 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
2353 * linux-x86-tdesc.h: New file.
2354 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
2355 (target_get_ipa_tdesc_idx): New macro.
2356 * tracepoint.c (ipa_tdesc_idx): New macro.
2357 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
2358 (symbol_list): Add ipa_tdesc_idx.
2359 (cmd_qtstart): Write ipa_tdesc_idx in the target.
2360 (ipa_tdesc): Remove.
2361 (ipa_tdesc_idx): New variable.
2362 (get_context_regcache): Use get_ipa_tdesc.
2363 (gdb_collect): Ditto.
2364 (gdb_probe): Ditto.
2365 * tracepoint.h (get_ipa_tdesc): New prototype.
2366 (ipa_tdesc): Remove.
2367
e7ad2f14
PA
23682016-02-24 Pedro Alves <palves@redhat.com>
2369
2370 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
2371 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
2372 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
2373 Factor out common code between the USE_SIGTRAP_SIGINFO and
2374 !USE_SIGTRAP_SIGINFO blocks.
2375 (linux_low_filter_event): Call save_stop_reason instead of
2376 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
2377 Update comments.
2378 (linux_wait_1): Update comments.
2379
657f9cde
WW
23802016-02-24 Wei-cheng Wang <cole945@gmail.com>
2381
2382 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
2383 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
2384 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
2385 ppc_insert_point, ppc_remove_point.
2386
b00b61e1
MK
23872016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
2388
2389 * linux-s390-low.c (s390_supports_z_point_type): New function.
2390 (struct linux_target_ops): Wire s390_supports_z_point_type in.
2391
553cb527
YQ
23922016-02-16 Yao Qi <yao.qi@linaro.org>
2393
2394 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
2395 PC. Get pc from regcache_read_pc.
2396
a5652c21
YQ
23972016-02-12 Yao Qi <yao.qi@linaro.org>
2398
2399 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
2400 or linux_get_pc_32bit.
2401 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
2402
ed443b61
YQ
24032016-02-12 Yao Qi <yao.qi@linaro.org>
2404
2405 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
2406 arm_linux_get_next_pcs_fixup.
2407
020ecd38
MK
24082016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
2409
2410 * tracepoint.c (x_tracepoint_action_download): Change
2411 write_inferior_data_ptr to write_inferior_data_pointer.
2412 (cmd_qtstart): Likewise.
2413 (write_inferior_data_ptr): Remove.
2414 (download_agent_expr): Change write_inferior_data_ptr to
2415 write_inferior_data_pointer.
2416 (download_tracepoint_1): Likewise.
2417 (download_tracepoint): Likewise.
2418 (download_trace_state_variables): Likewise.
2419
7cae9051
WW
24202016-02-11 Wei-cheng Wang <cole945@gmail.com>
2421 Marcin Kościelnicki <koriakin@0x04.net>
2422
2423 * tracepoint.c (struct tracepoint_action_ops): Remove.
2424 (struct tracepoint_action): Remove ops.
2425 (m_tracepoint_action_download, r_tracepoint_action_download)
2426 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
2427 size and offset accordingly.
2428 (m_tracepoint_action_ops, r_tracepoint_action_ops)
2429 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
2430 (tracepoint_action_send, tracepoint_action_download): New functions.
2431 Helpers for trace action handlers.
2432 (add_tracepoint_action): Remove setup actions ops.
2433 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
2434
9f6a71b4
YQ
24352016-02-10 Yao Qi <yao.qi@linaro.org>
2436
2437 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
2438
1e94266c
SM
24392016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2440
2441 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
2442 to AC_OUTPUT.
2443 * configure: Regenerate.
2444
8adce034
SM
24452016-02-09 Simon Marchi <simon.marchi@ericsson.com>
2446
2447 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
2448 void * to gdb_byte *.
2449 * linux-low.c (siginfo_fixup): Likewise.
2450 (linux_xfer_siginfo): Likewise.
2451 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
2452 Likewise.
2453 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
2454
93813b37
WT
24552016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
2456
2457 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
2458 to srv_tgtobj.
2459 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
2460 to srv_tgtobj.
2461 * linux-x86-low.c [__x86_64__]: Include
2462 "nat/amd64-linux-siginfo.h".
2463 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
2464 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
2465 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
2466 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
2467 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
2468 (cpt_si_fd, si_timerid, si_overrun): Move from
2469 nat/amd64-linux-siginfo.c.
2470 * Makefile.in (amd64-linux-siginfo.o:): New rule.
2471
8424cc97
SM
24722016-01-28 Simon Marchi <simon.marchi@ericsson.com>
2473
2474 * server.c (skip_to_semicolon): Remove.
2475 (process_point_options): Use strchrnul instead of
2476 skip_to_semicolon.
2477
4d18591b
YQ
24782016-01-26 Yao Qi <yao.qi@linaro.org>
2479
2480 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
2481 * linux-low.c (install_software_single_step_breakpoints): Don't
2482 call regcache_read_pc.
2483 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
2484 argument pc.
2485
d8020970
YQ
24862016-01-26 Yao Qi <yao.qi@linaro.org>
2487
2488 * linux-low.c (install_software_single_step_breakpoints): Call
2489 regcache_read_pc instead of get_pc.
2490
8b207339
YQ
24912016-01-26 Yao Qi <yao.qi@linaro.org>
2492
2493 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
2494 (unblock_async_io): Rename to ...
2495 (block_unblock_async_io): ... it. New function.
2496 (enable_async_io): Don't install SIGIO handler. Unblock it
2497 instead.
2498 (disable_async_io): Don't ignore SIGIO. Block it instead.
2499 (initialize_async_io): Install SIGIO handler. Don't call
2500 unblock_async_io.
2501
18879fef
YQ
25022016-01-26 Yao Qi <yao.qi@linaro.org>
2503
2504 * remote-utils.c (getpkt): If the buffer isn't empty, and the
2505 first character is '\003', call *the_target->request_interrupt.
2506
a0f8e08a
YQ
25072016-01-25 Yao Qi <yao.qi@linaro.org>
2508
2509 * remote-utils.c (new_thread_notify): Remove.
2510 (dead_thread_notify): Likewise.
2511 * remote-utils.h (new_thread_notify): Remove declaration.
2512 (dead_thread_notify): Likewise.
2513
cc5fd9ab
MK
25142016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
2515
2516 * gdb.trace/pending.exp: Fix expected message on continue.
2517
99e8eb11
MK
25182016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
2519
2520 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
2521 it works properly on big-endian machines where sizeof (CORE_ADDR)
2522 != sizeof (void *).
2523
a994041d
PA
25242016-01-21 Pedro Alves <palves@redhat.com>
2525
2526 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
2527 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
2528 * configure: Regenerate.
2529
f7a6a40d
YQ
25302016-01-21 Yao Qi <yao.qi@linaro.org>
2531
2532 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
2533 is_thumb and set it according to CPSR saved on the stack.
2534 (get_next_pcs_syscall_next_pc): Pass is_thumb to
2535 arm_sigreturn_next_pc.
2536
6f69e520
YQ
25372016-01-18 Yao Qi <yao.qi@linaro.org>
2538
2539 * linux-low.c (linux_set_pc_64bit): New function.
2540 (linux_get_pc_64bit): New function.
2541 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
2542 Declare.
2543 * linux-sparc-low.c (debug_threads): Remove declaration.
2544 (sparc_get_pc): Remove.
2545 (the_low_target): Use linux_get_pc_64bit instead of
2546 sparc_get_pc.
2547 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
2548 (the_low_target): Use linux_get_pc_64bit and
2549 linux_set_pc_64bit.
2550
276d4552
YQ
25512016-01-18 Yao Qi <yao.qi@linaro.org>
2552
2553 * linux-arm-low.c (debug_threads): Remove declaration.
2554 (arm_get_pc, arm_set_pc): Remove.
2555 (the_low_target): Use linux_get_pc_32bit and
2556 linux_set_pc_32bit.
2557 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
2558 (the_low_target): Use linux_get_pc_32bit and
2559 linux_set_pc_32bit.
2560 * linux-cris-low.c (debug_threads): Remove declaration.
2561 (cris_get_pc, cris_set_pc,): Remove.
2562 (the_low_target): Use linux_get_pc_32bit and
2563 linux_set_pc_32bit.
2564 * linux-crisv32-low.c (debug_threads): Remove declaration.
2565 (cris_get_pc, cris_set_pc): Remove.
2566 (the_low_target): Use linux_get_pc_32bit and
2567 linux_set_pc_32bit.
2568 * linux-low.c: Include inttypes.h.
2569 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
2570 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
2571 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
2572 (the_low_target): Use linux_get_pc_32bit and
2573 linux_set_pc_32bit.
2574 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
2575 (the_low_target): Use linux_get_pc_32bit and
2576 linux_set_pc_32bit.
2577 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
2578 (the_low_target): Use linux_get_pc_32bit and
2579 linux_set_pc_32bit.
2580 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
2581 (the_low_target): Use linux_get_pc_32bit and
2582 linux_set_pc_32bit.
2583 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
2584 (the_low_target): Use linux_get_pc_32bit and
2585 linux_set_pc_32bit.
2586
eb0edac8
GB
25872016-01-18 Gary Benson <gbenson@redhat.com>
2588
2589 * configure.ac (AC_FUNC_FORK): New check.
2590 * config.in: Regenerate.
2591 * configure: Likewise.
2592
1b451dda
YQ
25932016-01-14 Yao Qi <yao.qi@linaro.org>
2594
2595 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
2596 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
2597 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
2598 arm_get_next_pcs_ctor.
2599
82075af2
JS
26002016-01-12 Josh Stone <jistone@redhat.com>
2601 Philippe Waroquiers <philippe.waroquiers@skynet.be>
2602
2603 * inferiors.h: Include "gdb_vecs.h".
2604 (struct process_info): Add syscalls_to_catch.
2605 * inferiors.c (remove_process): Free syscalls_to_catch.
2606 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
2607 syscall_return stops.
2608 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
2609 * server.c (handle_general_set): Handle QCatchSyscalls.
2610 (handle_query): Report support for QCatchSyscalls.
2611 * target.h (struct target_ops): Add supports_catch_syscall.
2612 (target_supports_catch_syscall): New macro.
2613 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
2614 (struct lwp_info): Add syscall_state.
2615 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
2616 Maintain syscall_state and syscalls_to_catch across exec.
2617 (get_syscall_trapinfo): New function, proxy to the_low_target.
2618 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
2619 (linux_low_filter_event): Toggle syscall_state entry/return for
2620 syscall traps, and set it ignored for all others.
2621 (gdb_catching_syscalls_p): New function.
2622 (gdb_catch_this_syscall_p): New function.
2623 (linux_wait_1): Handle SYSCALL_SIGTRAP.
2624 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
2625 (linux_supports_catch_syscall): New function.
2626 (linux_target_ops): Install it.
2627 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
2628 (the_low_target): Install it.
2629
8f13a3ce
MF
26302016-01-12 Mike Frysinger <vapier@gentoo.org>
2631
2632 * acinclude.m4: Include new ../warning.m4 file.
2633 * configure: Regenerated.
2634 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
2635
5b3da067
MF
26362016-01-12 Mike Frysinger <vapier@gentoo.org>
2637
2638 * ax.c (is_goto_target): Mark static.
2639 * linux-low.c (register_addr): Likewise.
2640 (linux_fetch_registers, linux_store_registers): Likewise.
2641 * mem-break.c (any_persistent_commands): Fix old prototype.
2642 (add_commands_to_breakpoint): Mark static.
2643 * regcache.c (find_register_by_name): Delete unused func.
2644 * remote-utils.c (hex_or_minus_one): Mark static.
2645 * server.c (monitor_show_help): Mark static.
2646 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
2647 handle_v_requests): Likewise.
2648
bc504a31
PA
26492016-01-12 Pedro Alves <palves@redhat.com>
2650
2651 Remove use of the registered trademark symbol throughout.
2652
5a0dd67a
YQ
26532016-01-08 Yao Qi <yao.qi@linaro.org>
2654
2655 * remote-utils.c (getpkt): If c is '\003', call target hook
2656 request_interrupt.
2657
b2ca446f
YQ
26582016-01-06 Yao Qi <yao.qi@linaro.org>
2659
2660 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
2661 linux-aarch32-low.c.
2662 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2663 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2664 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2665 (thumb2_breakpoint): Declare.
2666 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
2667 linux-aarch32-low.h.
2668 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2669 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
2670 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2671
edd88788
JB
26722016-01-01 Joel Brobecker <brobecker@adacore.com>
2673
2674 * gdbreplay.c (gdbreplay_version): Change copyright year in
2675 version message.
2676 * server.c (gdbserver_version): Likewise.
2677
65da7f14
PP
26782015-12-28 Patrick Palka <patrick@parcs.ath.cx>
2679
2680 * server.c (crc32_table): Delete.
2681 (crc32): Use libiberty's xcrc32 function.
2682
4abd5ed2
JB
26832015-12-22 Joel Brobecker <brobecker@adacore.com>
2684
2685 * lynx-low.c (lynx_delete_thread_callback): New function.
2686 (lynx_mourn): Properly delete our process and all of its
2687 threads. Remove call to clear_inferiors.
2688
0e50fe5c
JB
26892015-12-22 Joel Brobecker <brobecker@adacore.com>
2690
2691 * target.c (thread_search_callback): Add check that
2692 the thread_stopped target callback is not NULL before
2693 calling it.
2694
35adc03f
YQ
26952015-12-21 Yao Qi <yao.qi@linaro.org>
2696
2697 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
2698 arm breakpoint.
2699
bd2b2909
AT
27002015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2701
2702 * server.c (handle_query): Call target_supports_software_single_step.
2703
7fe5e27e
AT
27042015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2705
2706 * linux-low.c (single_step): New function.
2707 (linux_resume_one_lwp_throw): Call single_step.
2708 (start_step_over): Likewise.
2709
d9311bfa
AT
27102015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2711
2712 * Makefile.in (SFILES): Append arch/arm-linux.c,
2713 arch/arm-get-next-pcs.c.
2714 (arm-linux.o): New rule.
2715 (arm-get-next-pcs.o): New rule.
2716 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
2717 arm-linux.o.
2718 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
2719 to linux-aarch32-low.c.
2720 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2721 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2722 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2723 (thumb2_breakpoint_len): Likewise.
2724 (arm_is_thumb_mode): Make non-static.
2725 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
2726 from linux-aarch32-low.c.
2727 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2728 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2729 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2730 (thumb2_breakpoint_len): Likewise.
2731 (arm_is_thumb_mode): New declaration.
2732 * linux-arm-low.c: Include arch/arm-linux.h
2733 aarch/arm-get-next-pcs.h, sys/syscall.h.
2734 (get_next_pcs_ops): New struct.
2735 (get_next_pcs_addr_bits_remove): New function.
2736 (get_next_pcs_is_thumb): New function.
2737 (get_next_pcs_read_memory_unsigned_integer): Likewise.
2738 (arm_sigreturn_next_pc): Likewise.
2739 (get_next_pcs_syscall_next_pc): Likewise.
2740 (arm_gdbserver_get_next_pcs): Likewise.
2741 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
2742 Initialize.
2743 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
2744 * server.h: Include gdb_vecs.h.
2745
68ce2059
AT
27462015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2747
2748 * Makefile.in (SFILES): Append common/common-regcache.c.
2749 (OBS): Append common-regcache.o.
2750 (common-regcache.o): New rule.
2751 * regcache.c (init_register_cache): Initialize cache to
2752 REG_UNAVAILABLE.
2753 (regcache_raw_read_unsigned): New function.
2754 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
2755 register_status enum.
2756
fa5308bd
AT
27572015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
2758
2759 * linux-aarch64-low.c (the_low_targets): Rename
2760 breakpoint_reinsert_addr to get_next_pcs.
2761 * linux-arm-low.c (the_low_targets): Likewise.
2762 * linux-bfin-low.c (the_low_targets): Likewise.
2763 * linux-cris-low.c (the_low_targets): Likewise.
2764 * linux-crisv32-low.c (the_low_targets): Likewise.
2765 * linux-low.c (can_software_single_step): Likewise.
2766 (install_software_single_step_breakpoints): New function.
2767 (start_step_over): Use install_software_single_step_breakpoints.
2768 * linux-low.h: New CORE_ADDR vector.
2769 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
2770 get_next_pcs.
2771 * linux-mips-low.c (the_low_targets): Likewise.
2772 * linux-nios2-low.c (the_low_targets): Likewise.
2773 * linux-sparc-low.c (the_low_targets): Likewise.
2774
4a6ed09b
PA
27752015-12-17 Pedro Alves <palves@redhat.com>
2776
2777 * linux-low.c (linux_kill_one_lwp): Remove references to
2778 LinuxThreads.
2779 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
2780 to 'kill'.
2781 (linux_init_signals): Delete.
2782 (initialize_low): Adjust.
2783 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
2784
7544db95
PA
27852015-12-16 Pedro Alves <palves@redhat.com>
2786
2787 * configure.ac (compiler warning flags): When testing a
2788 -Wno-foo option, check whether -Wfoo works instead.
2789 * configure: Regenerate.
2790
8020350c
DB
27912015-12-11 Don Breazeal <donb@codesourcery.com>
2792
2793 * server.c (process_serial_event): Don't exit from gdbserver
2794 in remote mode if there are still active inferiors.
2795
db91f502
YQ
27962015-12-11 Yao Qi <yao.qi@linaro.org>
2797
2798 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
2799 arm_breakpoint_at if the process is 32-bit.
2800
b37a6290
YQ
28012015-12-11 Yao Qi <yao.qi@linaro.org>
2802
2803 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
2804 arm breakpoint.
2805
17b1509a
YQ
28062015-12-07 Yao Qi <yao.qi@linaro.org>
2807
2808 * configure.srv: Append arm.o to srv_tgtobj for
2809 aarch64*-*-linux* target.
2810 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
2811 from linux-arm-low.c.
2812 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
2813 (arm_breakpoint_len, thumb_breakpoint): Likewise.
2814 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
2815 (thumb2_breakpoint_len): Likewise.
2816 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
2817 (arm_breakpoint_kinds): Likewise.
2818 (arm_breakpoint_kind_from_pc): Likewise.
2819 (arm_sw_breakpoint_from_kind): Likewise.
2820 (arm_breakpoint_kind_from_current_state): Likewise.
2821 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
2822 (arm_sw_breakpoint_from_kind): Declare.
2823 (arm_breakpoint_kind_from_current_state): Declare.
2824 (arm_breakpoint_at): Declare.
2825 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
2826 arm_sw_breakpoint_from_kind if process is 32-bit.
2827 (aarch64_breakpoint_kind_from_pc): New function.
2828 (aarch64_breakpoint_kind_from_current_state): New function.
2829 (the_low_target): Initialize fields breakpoint_kind_from_pc
2830 and breakpoint_kind_from_current_state.
2831 * linux-arm-low.c (arm_breakpoint_kinds): Move to
2832 linux-aarch32-low.c.
2833 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
2834 (arm_breakpoint, arm_breakpoint_len): Likewise.
2835 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
2836 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
2837 (arm_is_thumb_mode): Likewise.
2838 (arm_breakpoint_at): Likewise.
2839 (arm_breakpoint_kind_from_pc): Likewise.
2840 (arm_sw_breakpoint_from_kind): Likewise.
2841 (arm_breakpoint_kind_from_current_state): Likewise.
2842
2843 Revert:
2844 2015-08-04 Yao Qi <yao.qi@linaro.org>
2845
2846 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2847 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2848 * server.c (extended_protocol): Remove "static".
2849 * server.h (extended_protocol): Declare it.
2850
ece66d65
JS
28512015-12-04 Josh Stone <jistone@redhat.com>
2852
2853 * target.h (struct target_ops) <arch_setup>: Rename to ...
2854 (struct target_ops) <post_create_inferior>: ... this.
2855 (target_arch_setup): Rename to ...
2856 (target_post_create_inferior): ... this, calling post_create_inferior.
2857 * server.c (start_inferior): Update target_arch_setup calls to
2858 target_post_create_inferior.
2859 * linux-low.c (linux_low_ptrace_options): Forward declare.
2860 (linux_arch_setup): Update its comment for general use.
2861 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
2862 (struct linux_target_ops): Use linux_post_create_inferior.
2863 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
2864 to post_create_inferior.
2865 * nto-low.c (struct nto_target_ops): Likewise.
2866 * spu-low.c (struct spu_target_ops): Likewise.
2867 * win32-low.c (struct win32_target_ops): Likewise.
2868
e58c48b4
AT
28692015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
2870
2871 * linux-arm-low.c: Remove duplicate arch/arm.h include.
2872
fbec8956
AT
28732015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2874
2875 * linux-arm-low.c (arm_reinsert_addr): Remove function.
2876 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
2877 * linux-cris-low.c (cris_reinsert_addr> Remove function.
2878 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2879 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
2880 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2881 * linux-mips-low.c (mips_reinsert_addr): Remove function.
2882 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2883 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
2884 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2885 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
2886 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
2887
9b4c5f87
AT
28882015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2889
2890 * linux-low.c (linux_look_up_symbols): Don't call
2891 linux_supports_traceclone.
2892 * linux-low.h (thread_db_init): Remove use_events argument.
2893 * thread-db.c (thread_db_use_event): Remove global variable.
2894 (struct thread_db) <td_thr_event_enable_p>: Remove field.
2895 (struct thread_db) <td_create_bp>: Remove field.
2896 (thread_db_create_event): Remove function.
2897 (thread_db_enable_reporting): Likewise.
2898 (find_one_thread): Don't check for thread_db_use_events.
2899 (attach_thread): Likewise.
2900 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
2901 (try_thread_db_load_1): Don't check for thread_db_use_events.
2902 (thread_db_init): Remove use_events argument and thread events
2903 handling.
2904 (remove_thread_event_breakpoints): Remove function.
2905 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
2906
7d00775e
AT
29072015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2908
2909 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
2910 New function.
2911 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2912 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
2913 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2914 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
2915 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
2916 Initialize.
2917 * linux-crisv32-low.c (cris_supports_hardware_single_step):
2918 New function.
2919 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2920 * linux-low.c (can_hardware_single_step): Use
2921 supports_hardware_single_step.
2922 (can_software_single_step): New function.
2923 (start_step_over): Call can_software_single_step.
2924 (linux_supports_hardware_single_step): New function.
2925 (struct target_ops) <supports_software_single_step>: Initialize.
2926 * linux-low.h (struct linux_target_ops)
2927 <supports_hardware_single_step>: Initialize.
2928 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2929 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2930 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2931 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2932 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2933 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2934 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2935 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2936 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2937 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2938 Initialize.
2939 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2940 (struct linux_target_ops) <tile_supports_hardware_single_step>:
2941 Initialize.
2942 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2943 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2944 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2945 New function.
2946 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2947 * target.h (struct target_ops): <supports_software_single_step>:
2948 New field.
2949 (target_supports_software_single_step): New macro.
2950
2d97cd35
AT
29512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2952
2953 * linux-low.c (linux_wait_1): Fix pc advance condition.
2954 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2955 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2956
769ef81f
AT
29572015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
2958
2959 * linux-arm-low.c (arm_is_thumb_mode): New function.
2960 (arm_breakpoint_at): Use arm_is_thumb_mode.
2961 (arm_breakpoint_kind_from_current_state): New function.
2962 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2963 Initialize.
2964 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2965 (linux_breakpoint_kind_from_current_state): New function.
2966 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2967 * linux-low.h (struct linux_target_ops)
2968 <breakpoint_kind_from_current_state>: New field.
2969 * target.h (struct target_ops): Likewise.
2970 (target_breakpoint_kind_from_current_state): New macro.
2971
1bebeeca
PA
29722015-11-30 Pedro Alves <palves@redhat.com>
2973
2974 * linux-low.c (linux_resume): Wake up the event loop before
2975 returning.
2976
a67a9fae
PA
29772015-11-30 Pedro Alves <palves@redhat.com>
2978
2979 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2980 check.
2981 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2982 to -1.
2983 * target.c (struct thread_search): New structure.
2984 (thread_search_callback): New function.
2985 (prev_general_thread): New global.
2986 (prepare_to_access_memory, done_accessing_memory): New functions.
2987 * target.h (prepare_to_access_memory, done_accessing_memory):
2988 Replace macros with function declarations.
2989
f2faf941
PA
29902015-11-30 Pedro Alves <palves@redhat.com>
2991
2992 PR 14618
2993 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2994 report TARGET_WAITKIND_NO_RESUMED.
2995 * remote-utils.c (prepare_resume_reply): Handle
2996 TARGET_WAITKIND_NO_RESUMED.
2997 * server.c (report_no_resumed): New global.
2998 (handle_query) <qSupported>: Handle "no-resumed+". Report
2999 "no-resumed+" support.
3000 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
3001 return error if the client doesn't support no-resumed events.
3002 (push_stop_notification): New function.
3003 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
3004 events if the client supports them.
3005
a681f9c9
PA
30062015-11-30 Pedro Alves <palves@redhat.com>
3007
3008 * linux-low.c (thread_still_has_status_pending_p): Don't check
3009 vCont;t here.
3010 (lwp_resumed): New function.
3011 (status_pending_p_callback): Return early if the LWP is not
3012 supposed to be resumed.
3013
65706a29
PA
30142015-11-30 Pedro Alves <palves@redhat.com>
3015
3016 * linux-low.c (handle_extended_wait): Assert that the LWP's
3017 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
3018 thread create events, leave the new child's status pending.
3019 (linux_low_filter_event): If GDB wants to hear about thread exit
3020 events, leave the LWP marked dead and don't delete it.
3021 (linux_wait_for_event_filtered): Don't check for thread exit.
3022 (filter_exit_event): New function.
3023 (linux_wait_1): Use it, when returning an exit event.
3024 (linux_resume_one_lwp_throw): Assert that the LWP's
3025 waitstatus is TARGET_WAITKIND_IGNORE.
3026 * remote-utils.c (prepare_resume_reply): Handle
3027 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
3028 * server.c (report_thread_events): New global.
3029 (handle_general_set): Handle QThreadEvents.
3030 (handle_query) <qSupported>: Handle and report QThreadEvents+;
3031 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
3032 TARGET_WAITKIND_THREAD_EXITED.
3033 * server.h (report_thread_events): Declare.
3034
56cf4bed
PA
30352015-11-30 Pedro Alves <palves@redhat.com>
3036
3037 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
3038 the thread's last_resume_kind was resume_stop.
3039
500c1d85
PA
30402015-11-30 Pedro Alves <palves@redhat.com>
3041
3042 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
3043 before returning.
3044
de979965
PA
30452015-11-30 Pedro Alves <palves@redhat.com>
3046
3047 * server.c (handle_v_requests): Handle vCtrlC.
3048
34c65914
PA
30492015-11-30 Pedro Alves <palves@redhat.com>
3050
3051 * gdbthread.h (find_any_thread_of_pid): Declare.
3052 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
3053 functions.
3054 * server.c (handle_query): If current_thread is NULL, look for
3055 another thread of the selected process.
3056
79efa585 30572015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 3058 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
3059
3060 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
3061 * server.c (handle_qxfer_threads_worker): Refactor to include thread
3062 name in reply.
3063 * target.h (struct target_ops) <thread_name>: New field.
3064 (target_thread_name): New macro.
3065
80d82c19
JB
30662015-11-23 Joel Brobecker <brobecker@adacore.com>
3067
3068 * regcache.h (regcache_invalidate_pid): Add declaration.
3069 * regcache.c (regcache_invalidate_pid): New function, extracted
3070 from regcache_invalidate.
3071 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
3072 Add trivial documentation comment.
3073 * lynx-low.c: Use regcache_invalidate_pid instead of
3074 regcache_invalidate.
3075
64da5dd5
JB
30762015-11-23 Joel Brobecker <brobecker@adacore.com>
3077
3078 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
3079 and Elf64_auxv_t if the target is Android.
3080
37ce4055
DE
30812015-11-22 Doug Evans <xdje42@gmail.com>
3082
3083 * target.h: #include <sys/types.h>.
3084
06e03fff
PA
30852015-11-19 Pedro Alves <palves@redhat.com>
3086
3087 * linux-low.c (linux_process_qsupported): Change prototype.
3088 Adjust.
3089 * linux-low.h (struct linux_target_ops) <process_qsupported>:
3090 Change prototype.
3091 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
3092 and adjust to loop over all features.
3093 * server.c (handle_query) <qSupported>: Adjust to call
3094 target_process_qsupported once, passing it a vector of unprocessed
3095 features.
3096 * target.h (struct target_ops) <process_qsupported>: Change
3097 prototype.
3098 (target_process_qsupported): Adjust.
3099
9a084706
PA
31002015-11-19 Pedro Alves <palves@redhat.com>
3101
3102 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
3103 mode.
3104 * configure: Regenerate.
3105
dad44a1f
PA
31062015-11-19 Pedro Alves <palves@redhat.com>
3107
3108 * configure: Regenerate.
3109
231c0592
YQ
31102015-11-19 Yao Qi <yao.qi@linaro.org>
3111
3112 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
3113 type to uint32_t.
3114
6c1c9a8b
YQ
31152015-11-19 Yao Qi <yao.qi@linaro.org>
3116
3117 * linux-aarch64-low.c (enum aarch64_operand_type): New.
3118 (struct aarch64_operand): Move enum out.
3119
9caa3311
YQ
31202015-11-19 Yao Qi <yao.qi@linaro.org>
3121
3122 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
3123 struct user_fpsimd_state *.
3124 (aarch64_store_fpregset): Likewise.
3125
6a69a054
YQ
31262015-11-19 Yao Qi <yao.qi@linaro.org>
3127
3128 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
3129 struct user_pt_regs *.
3130 (aarch64_store_gregset): Likewise.
3131
1798301e
PA
31322015-11-18 Pedro Alves <palves@redhat.com>
3133
3134 * Makefile.in (all_object_files): Add $IPA_OBJS.
3135
ce7715e2
PA
31362015-11-17 Pedro Alves <palves@redhat.com>
3137
3138 * win32-low.c (win32_resume): Use gdb_signal_from_host,
3139 GDB_SIGNAL_0 and gdb_signal_to_string.
3140
c0879059
PA
31412015-11-17 Pedro Alves <palves@redhat.com>
3142
3143 * win32-low.c (handle_output_debug_string): Remove parameter.
3144 (win32_kill): Remove our_status local and adjust call to
3145 handle_output_debug_string.
3146 (get_child_debug_event): Adjust call to
3147 handle_output_debug_string.
3148
1996e237
SM
31492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3150
3151 * linux-mips-low.c (mips_fill_gregset): Add cast.
3152 (mips_store_gregset): Likewise.
3153 (mips_fill_fpregset): Likewise.
3154 (mips_store_fpregset): Likewise.
3155
cbec665b
SM
31562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3157
3158 * linux-mips-low.c (mips_add_watchpoint): Rename private to
3159 priv.
3160
eb3e3c67
SM
31612015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3162
3163 * linux-mips-low.c (mips_linux_new_thread): Change type of
3164 watch_type to enum target_hw_bp_type.
3165
171de4b8
SM
31662015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3167
3168 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
3169 Change return type to arm_hwbp_type.
3170
04248ead
SM
31712015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3172
3173 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
3174 (arm_store_gregset): Likewise.
3175 * linux-arm-low.c (arm_get_hwcap): Likewise.
3176 (arm_read_description): Likewise.
3177
04b3479c
SM
31782015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3179
3180 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
3181
2bc84e8a
SM
31822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3183
3184 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
3185 (ppc_fill_vsxregset): Likewise.
3186 (ppc_store_vsxregset): Likewise.
3187 (ppc_fill_vrregset): Likewise.
3188 (ppc_store_vrregset): Likewise.
3189 (ppc_fill_evrregset): Likewise.
3190 (ppc_store_evrregset): Likewise.
3191
e6c5bb05
SM
31922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
3193
3194 * linux-ppc-low.c (ppc_usrregs_info): Remove
3195 forward-declaration.
3196 (ppc_arch_setup): Move lower in file.
3197
7ea45d72
SM
31982015-10-30 Simon Marchi <simon.marchi@ericsson.com>
3199
3200 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
3201 (ps_pdwrite): Likewise.
3202
69291610
HW
32032015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
3204
3205 * linux-arm-low.c (arm_new_thread): Move pointer dereference
3206 to after assert checks.
3207
b42945fd
SM
32082015-10-29 Simon Marchi <simon.marchi@ericsson.com>
3209
3210 * proc-service.c (ps_pdread): Add/adjust casts.
3211 (ps_pdwrite): Add/adjust casts.
3212
d6f85c84
SM
32132015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3214
3215 * server.c (handle_search_memory_1): Cast return value of
3216 memmem.
3217
f98cd059
SM
32182015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
3219
3220 * server.c (write_qxfer_response): Change type of data to
3221 gdb_byte *.
3222
d2412fa5
PA
32232015-10-29 Pedro Alves <palves@redhat.com>
3224
3225 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
3226
c17414a2
PA
32272015-10-29 Pedro Alves <palves@redhat.com>
3228
3229 * tracepoint.c (clear_installed_tracepoints): Add casts.
3230
e053fbc4
PA
32312015-10-29 Pedro Alves <palves@redhat.com>
3232
3233 * server.c (handle_v_cont, process_serial_event): Add enum
3234 gdb_signal casts to signal parsing code.
3235
add67df8
PA
32362015-10-29 Pedro Alves <palves@redhat.com>
3237
3238 * linux-low.h (NULL_REGSET): Define.
3239 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3240 * linux-arm-low.c (arm_regsets): Likewise.
3241 * linux-crisv32-low.c (cris_regsets): Likewise.
3242 * linux-m68k-low.c (m68k_regsets): Likewise.
3243 * linux-mips-low.c (mips_regsets): Likewise.
3244 * linux-nios2-low.c (nios2_regsets): Likewise.
3245 * linux-ppc-low.c (ppc_regsets): Likewise.
3246 * linux-s390-low.c (s390_regsets): Likewise.
3247 * linux-sh-low.c (sh_regsets): Likewise.
3248 * linux-sparc-low.c (sparc_regsets): Likewise.
3249 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3250 * linux-tile-low.c (tile_regsets): Likewise.
3251 * linux-x86-low.c (x86_regsets): Likewise.
3252 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3253
50bc912a
PA
32542015-10-29 Pedro Alves <palves@redhat.com>
3255
3256 * linux-low.h (NULL_REGSET): Define.
3257 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
3258 * linux-arm-low.c (arm_regsets): Likewise.
3259 * linux-crisv32-low.c (cris_regsets): Likewise.
3260 * linux-m68k-low.c (m68k_regsets): Likewise.
3261 * linux-mips-low.c (mips_regsets): Likewise.
3262 * linux-nios2-low.c (nios2_regsets): Likewise.
3263 * linux-ppc-low.c (ppc_regsets): Likewise.
3264 * linux-s390-low.c (s390_regsets): Likewise.
3265 * linux-sh-low.c (sh_regsets): Likewise.
3266 * linux-sparc-low.c (sparc_regsets): Likewise.
3267 * linux-tic6x-low.c (tic6x_regsets): Likewise.
3268 * linux-tile-low.c (tile_regsets): Likewise.
3269 * linux-x86-low.c (x86_regsets): Likewise.
3270 * linux-xtensa-low.c (xtensa_regsets): Likewise.
3271
682b2546
DE
32722015-10-26 Doug Evans <dje@google.com>
3273
3274 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
3275
963843d4
DE
32762015-10-26 Doug Evans <dje@google.com>
3277
3278 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
3279
d41401ac
DE
32802015-10-26 Doug Evans <dje@google.com>
3281
3282 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
3283 for debug_printf.
3284 (attach_thread, find_new_threads_callback): Ditto.
3285
3db28855
AT
32862015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3287
3288 * mem-break.h (set_breakpoint_data): Remove.
3289
fb78e89c
AT
32902015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3291
3292 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
3293 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3294 (initialize_low): Remove set_breakpoint_data call.
3295 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
3296 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
3297 (initialize_low): Remove set_breakpoint_data call.
3298 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
3299 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
3300 (initialize_low): Remove set_breakpoint_data call.
3301
2e6ee069
AT
33022015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
3303
3304 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
3305 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
3306 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
3307 * target.h (target_breakpoint_kind_from_pc): New macro.
3308
1652a986
AT
33092015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
3310
3311 * linux-low.c (default_breakpoint_kind_from_pc): New function.
3312 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
3313 the default breakpoint kind.
3314
abeead09
AT
33152015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3316
3317 * linux-arm-low.c (arm_supports_z_point_type): Add software
3318 breakpoint support.
3319
b0b4b501
AT
33202015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3321
3322 * linux-arm-low.c: Refactor breakpoint definitions.
3323 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
3324 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
3325
8689682c
AT
33262015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3327
3328 * Makefile.in: Add arm.c/o.
3329 * configure.srv: Likewise.
3330 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
3331 (arm_breakpoint_kind_from_pc): New function.
3332 (arm_sw_breakpoint_from_kind): Return proper kind.
3333 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
3334
27165294
AT
33352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3336
3337 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
3338 removal.
3339 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
3340 (struct raw_breakpoint) <size>: Remove.
3341 (struct raw_breakpoint) <kind>: Add.
3342 (bp_size): New function.
3343 (bp_opcode): Likewise.
3344 (find_raw_breakpoint_at): Adjust for kind.
3345 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
3346 (remove_memory_breakpoint): Adjust for kind call bp_size.
3347 (set_raw_breakpoint_at): Adjust for kind.
3348 (set_breakpoint): Likewise.
3349 (set_breakpoint_at): Call breakpoint_kind_from_pc.
3350 (delete_raw_breakpoint): Adjust for kind.
3351 (delete_breakpoint): Likewise.
3352 (find_gdb_breakpoint): Likewise.
3353 (set_gdb_breakpoint_1): Likewise.
3354 (set_gdb_breakpoint): Likewise.
3355 (delete_gdb_breakpoint_1): Likewise.
3356 (delete_gdb_breakpoint): Likewise.
3357 (uninsert_raw_breakpoint): Likewise.
3358 (reinsert_raw_breakpoint): Likewise.
3359 (set_breakpoint_data): Remove.
3360 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
3361 (check_mem_read): Adjust for kind call bp_size.
3362 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
3363 (clone_one_breakpoint): Adjust for kind.
3364 * mem-break.h (set_gdb_breakpoint): Likewise.
3365 (delete_gdb_breakpoint): Likewise.
3366 * server.c (process_serial_event): Likewise.
3367
dd373349
AT
33682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3369
3370 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
3371 (struct linux_target_ops) <breakpoint>: Remove.
3372 (struct linux_target_ops) <breakpoint_len>: Remove.
3373 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3374 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3375 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
3376 (arm_sw_breakpoint_from_kind): New function.
3377 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
3378 (struct linux_target_ops) <breakpoint>: Remove.
3379 (struct linux_target_ops) <breakpoint_len>: Remove.
3380 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3381 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3382 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
3383 (struct linux_target_ops) <breakpoint>: Remove.
3384 (struct linux_target_ops) <breakpoint_len>: Remove.
3385 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3386 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3387 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
3388 (struct linux_target_ops) <breakpoint>: Remove.
3389 (struct linux_target_ops) <breakpoint_len>: Remove.
3390 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3391 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3392 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
3393 and sw_breakpoint_from_kind to increment the pc.
3394 (linux_breakpoint_kind_from_pc): New function.
3395 (linux_sw_breakpoint_from_kind): New function.
3396 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
3397 (initialize_low): Call breakpoint_kind_from_pc and
3398 sw_breakpoint_from_kind to replace breakpoint_data/len.
3399 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
3400 New field.
3401 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
3402 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
3403 (struct linux_target_ops) <breakpoint>: Remove.
3404 (struct linux_target_ops) <breakpoint_len>: Remove.
3405 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3406 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3407 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
3408 (struct linux_target_ops) <breakpoint>: Remove.
3409 (struct linux_target_ops) <breakpoint_len>: Remove.
3410 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3411 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3412 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
3413 (struct linux_target_ops) <breakpoint>: Remove.
3414 (struct linux_target_ops) <breakpoint_len>: Remove.
3415 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3416 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3417 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
3418 (struct linux_target_ops) <breakpoint>: Remove.
3419 (struct linux_target_ops) <breakpoint_len>: Remove.
3420 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3421 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3422 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
3423 (struct linux_target_ops) <breakpoint>: Remove.
3424 (struct linux_target_ops) <breakpoint_len>: Remove.
3425 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3426 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3427 * linux-s390-low.c (s390_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-sh-low.c (sh_sw_breakpoint_from_kind): New function.
3433 (struct linux_target_ops) <breakpoint>: Remove.
3434 (struct linux_target_ops) <breakpoint_len>: Remove.
3435 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3436 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3437 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
3438 (struct linux_target_ops) <breakpoint>: Remove.
3439 (struct linux_target_ops) <breakpoint_len>: Remove.
3440 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3441 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3442 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
3443 (struct linux_target_ops) <breakpoint>: Remove.
3444 (struct linux_target_ops) <breakpoint_len>: Remove.
3445 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3446 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3447 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
3448 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
3449 (struct linux_target_ops) <breakpoint>: Remove.
3450 (struct linux_target_ops) <breakpoint_len>: Remove.
3451 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3452 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3453 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
3454 (struct linux_target_ops) <breakpoint>: Remove.
3455 (struct linux_target_ops) <breakpoint_len>: Remove.
3456 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
3457 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
3458
4cd98a19
AT
34592015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
3460
3461 * linux-cris-low.c (cris_get_pc): Remove void arg.
3462
774ee6d2
AR
34632015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3464
3465 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
3466 variable name.
3467
833dcd29
AR
34682015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
3469
3470 * inferiors.c (thread_pid_matches_callback): New function.
3471 (find_thread_process): New function.
3472 (remove_thread): Reset current_thread.
3473 (remove_process): Assert threads have been removed first.
3474
8d689ee5
YQ
34752015-10-15 Yao Qi <yao.qi@linaro.org>
3476
3477 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
3478 if it is 3.
3479 (aarch64_remove_point): Likewise.
3480 * regcache.c (regcache_register_size): New function.
3481
1c2e1515
YQ
34822015-10-12 Yao Qi <yao.qi@linaro.org>
3483
3484 * linux-aarch64-low.c: Update all callers as emit_load_store
3485 is renamed to aarch64_emit_load_store.
3486
e1c587c3
YQ
34872015-10-12 Yao Qi <yao.qi@linaro.org>
3488
3489 * linux-aarch64-low.c: Update all callers of function renaming
3490 from emit_insn to aarch64_emit_insn.
3491
b6542f81
YQ
34922015-10-12 Yao Qi <yao.qi@linaro.org>
3493
3494 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
3495 arch/aarch64-insn.h.
3496 (struct aarch64_memory_operand): Likewise.
3497 (ENCODE): Likewise.
3498 (emit_insn): Move to arch/aarch64-insn.c.
3499 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
3500 (emit_load_store): Move to arch/aarch64-insn.c.
3501 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
3502 (can_encode_int32): Remove.
3503
246994ce
YQ
35042015-10-12 Yao Qi <yao.qi@linaro.org>
3505
3506 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
3507 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
3508 (aarch64_relocate_instruction): Likewise.
3509 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
3510 (struct aarch64_insn_visitor): Likewise.
3511
0badd99f
YQ
35122015-10-12 Yao Qi <yao.qi@linaro.org>
3513
3514 * linux-aarch64-low.c (struct aarch64_insn_data): New.
3515 (struct aarch64_insn_visitor): New.
3516 (struct aarch64_insn_relocation_data): New.
3517 (aarch64_ftrace_insn_reloc_b): New function.
3518 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3519 (aarch64_ftrace_insn_reloc_cb): Likewise.
3520 (aarch64_ftrace_insn_reloc_tb): Likewise.
3521 (aarch64_ftrace_insn_reloc_adr): Likewise.
3522 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
3523 (aarch64_ftrace_insn_reloc_others): Likewise.
3524 (visitor): New.
3525 (aarch64_relocate_instruction): Use visitor.
3526
dfaffe9d
YQ
35272015-10-12 Yao Qi <yao.qi@linaro.org>
3528
3529 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
3530 int. Add argument buf.
3531 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
3532 aarch64_relocate_instruction.
3533
70b439f0
YQ
35342015-10-12 Yao Qi <yao.qi@linaro.org>
3535
3536 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
3537 argument insn. Remove local variable insn. Don't call
3538 target_read_uint32.
3539 (aarch64_install_fast_tracepoint_jump_pad): Call
3540 target_read_uint32.
3541
7781c06f
YQ
35422015-09-30 Yao Qi <yao.qi@linaro.org>
3543
3544 * linux-aarch64-low.c (emit_movk): Shorten a long line.
3545 (emit_load_store_pair): Likewise.
3546
9a3c8263
SM
35472015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3548
3549 * dll.c (match_dll): Add cast(s).
3550 (unloaded_dll): Likewise.
3551 * linux-low.c (second_thread_of_pid_p): Likewise.
3552 (delete_lwp_callback): Likewise.
3553 (count_events_callback): Likewise.
3554 (select_event_lwp_callback): Likewise.
3555 (linux_set_resume_request): Likewise.
3556 * server.c (accumulate_file_name_length): Likewise.
3557 (emit_dll_description): Likewise.
3558 (handle_qxfer_threads_worker): Likewise.
3559 (visit_actioned_threads): Likewise.
3560 * thread-db.c (any_thread_of): Likewise.
3561 * tracepoint.c (same_process_p): Likewise.
3562 (match_blocktype): Likewise.
3563 (build_traceframe_info_xml): Likewise.
3564
224c3ddb
SM
35652015-09-25 Simon Marchi <simon.marchi@ericsson.com>
3566
3567 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
3568 assignment.
3569 (gdb_unparse_agent_expr): Likewise.
3570 * hostio.c (require_data): Likewise.
3571 (handle_pread): Likewise.
3572 * linux-low.c (disable_regset): Likewise.
3573 (fetch_register): Likewise.
3574 (store_register): Likewise.
3575 (get_dynamic): Likewise.
3576 (linux_qxfer_libraries_svr4): Likewise.
3577 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
3578 (set_fast_tracepoint_jump): Likewise.
3579 (uninsert_fast_tracepoint_jumps_at): Likewise.
3580 (reinsert_fast_tracepoint_jumps_at): Likewise.
3581 (validate_inserted_breakpoint): Likewise.
3582 (clone_agent_expr): Likewise.
3583 * regcache.c (init_register_cache): Likewise.
3584 * remote-utils.c (putpkt_binary_1): Likewise.
3585 (decode_M_packet): Likewise.
3586 (decode_X_packet): Likewise.
3587 (look_up_one_symbol): Likewise.
3588 (relocate_instruction): Likewise.
3589 (monitor_output): Likewise.
3590 * server.c (handle_search_memory): Likewise.
3591 (handle_qxfer_exec_file): Likewise.
3592 (handle_qxfer_libraries): Likewise.
3593 (handle_qxfer): Likewise.
3594 (handle_query): Likewise.
3595 (handle_v_cont): Likewise.
3596 (handle_v_run): Likewise.
3597 (captured_main): Likewise.
3598 * target.c (write_inferior_memory): Likewise.
3599 * thread-db.c (try_thread_db_load_from_dir): Likewise.
3600 * tracepoint.c (init_trace_buffer): Likewise.
3601 (add_tracepoint_action): Likewise.
3602 (add_traceframe): Likewise.
3603 (add_traceframe_block): Likewise.
3604 (cmd_qtdpsrc): Likewise.
3605 (cmd_qtdv): Likewise.
3606 (cmd_qtstatus): Likewise.
3607 (response_source): Likewise.
3608 (response_tsv): Likewise.
3609 (cmd_qtnotes): Likewise.
3610 (gdb_collect): Likewise.
3611 (initialize_tracepoint): Likewise.
3612
afbe19f8
PL
36132015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3614
3615 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
3616 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
3617 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
3618 <NOP>: New.
3619 (enum aarch64_condition_codes): New enum.
3620 (w0): New static global.
3621 (fp): Likewise.
3622 (lr): Likewise.
3623 (struct aarch64_memory_operand) <type>: New
3624 MEMORY_OPERAND_POSTINDEX type.
3625 (postindex_memory_operand): New helper function.
3626 (emit_ret): New function.
3627 (emit_load_store_pair): New function, factored out of emit_stp
3628 with support for MEMORY_OPERAND_POSTINDEX.
3629 (emit_stp): Rewrite using emit_load_store_pair.
3630 (emit_ldp): New function.
3631 (emit_load_store): Likewise.
3632 (emit_ldr): Mention post-index instruction in comment.
3633 (emit_ldrh): New function.
3634 (emit_ldrb): New function.
3635 (emit_ldrsw): Mention post-index instruction in comment.
3636 (emit_str): Likewise.
3637 (emit_subs): New function.
3638 (emit_cmp): Likewise.
3639 (emit_and): Likewise.
3640 (emit_orr): Likewise.
3641 (emit_orn): Likewise.
3642 (emit_eor): Likewise.
3643 (emit_mvn): Likewise.
3644 (emit_lslv): Likewise.
3645 (emit_lsrv): Likewise.
3646 (emit_asrv): Likewise.
3647 (emit_mul): Likewise.
3648 (emit_sbfm): Likewise.
3649 (emit_sbfx): Likewise.
3650 (emit_ubfm): Likewise.
3651 (emit_ubfx): Likewise.
3652 (emit_csinc): Likewise.
3653 (emit_cset): Likewise.
3654 (emit_nop): Likewise.
3655 (emit_ops_insns): New helper function.
3656 (emit_pop): Likewise.
3657 (emit_push): Likewise.
3658 (aarch64_emit_prologue): New function.
3659 (aarch64_emit_epilogue): Likewise.
3660 (aarch64_emit_add): Likewise.
3661 (aarch64_emit_sub): Likewise.
3662 (aarch64_emit_mul): Likewise.
3663 (aarch64_emit_lsh): Likewise.
3664 (aarch64_emit_rsh_signed): Likewise.
3665 (aarch64_emit_rsh_unsigned): Likewise.
3666 (aarch64_emit_ext): Likewise.
3667 (aarch64_emit_log_not): Likewise.
3668 (aarch64_emit_bit_and): Likewise.
3669 (aarch64_emit_bit_or): Likewise.
3670 (aarch64_emit_bit_xor): Likewise.
3671 (aarch64_emit_bit_not): Likewise.
3672 (aarch64_emit_equal): Likewise.
3673 (aarch64_emit_less_signed): Likewise.
3674 (aarch64_emit_less_unsigned): Likewise.
3675 (aarch64_emit_ref): Likewise.
3676 (aarch64_emit_if_goto): Likewise.
3677 (aarch64_emit_goto): Likewise.
3678 (aarch64_write_goto_address): Likewise.
3679 (aarch64_emit_const): Likewise.
3680 (aarch64_emit_call): Likewise.
3681 (aarch64_emit_reg): Likewise.
3682 (aarch64_emit_pop): Likewise.
3683 (aarch64_emit_stack_flush): Likewise.
3684 (aarch64_emit_zero_ext): Likewise.
3685 (aarch64_emit_swap): Likewise.
3686 (aarch64_emit_stack_adjust): Likewise.
3687 (aarch64_emit_int_call_1): Likewise.
3688 (aarch64_emit_void_call_2): Likewise.
3689 (aarch64_emit_eq_goto): Likewise.
3690 (aarch64_emit_ne_goto): Likewise.
3691 (aarch64_emit_lt_goto): Likewise.
3692 (aarch64_emit_le_goto): Likewise.
3693 (aarch64_emit_gt_goto): Likewise.
3694 (aarch64_emit_ge_got): Likewise.
3695 (aarch64_emit_ops_impl): New static global variable.
3696 (aarch64_emit_ops): New target function, return
3697 &aarch64_emit_ops_impl.
3698 (struct linux_target_ops): Install it.
3699
bb903df0
PL
37002015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3701
3702 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
3703 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
3704 aarch64-ipa.o.
3705 * linux-aarch64-ipa.c: New file.
3706 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
3707 and endian.h.
3708 (aarch64_get_thread_area): New target method.
3709 (extract_signed_bitfield): New helper function.
3710 (aarch64_decode_ldr_literal): New function.
3711 (enum aarch64_opcodes): New enum.
3712 (struct aarch64_register): New struct.
3713 (struct aarch64_operand): New struct.
3714 (x0): New static global.
3715 (x1): Likewise.
3716 (x2): Likewise.
3717 (x3): Likewise.
3718 (x4): Likewise.
3719 (w2): Likewise.
3720 (ip0): Likewise.
3721 (sp): Likewise.
3722 (xzr): Likewise.
3723 (aarch64_register): New helper function.
3724 (register_operand): Likewise.
3725 (immediate_operand): Likewise.
3726 (struct aarch64_memory_operand): New struct.
3727 (offset_memory_operand): New helper function.
3728 (preindex_memory_operand): Likewise.
3729 (enum aarch64_system_control_registers): New enum.
3730 (ENCODE): New macro.
3731 (emit_insn): New helper function.
3732 (emit_b): New function.
3733 (emit_bcond): Likewise.
3734 (emit_cb): Likewise.
3735 (emit_tb): Likewise.
3736 (emit_blr): Likewise.
3737 (emit_stp): Likewise.
3738 (emit_ldp_q_offset): Likewise.
3739 (emit_stp_q_offset): Likewise.
3740 (emit_load_store): Likewise.
3741 (emit_ldr): Likewise.
3742 (emit_ldrsw): Likewise.
3743 (emit_str): Likewise.
3744 (emit_ldaxr): Likewise.
3745 (emit_stxr): Likewise.
3746 (emit_stlr): Likewise.
3747 (emit_data_processing_reg): Likewise.
3748 (emit_data_processing): Likewise.
3749 (emit_add): Likewise.
3750 (emit_sub): Likewise.
3751 (emit_mov): Likewise.
3752 (emit_movk): Likewise.
3753 (emit_mov_addr): Likewise.
3754 (emit_mrs): Likewise.
3755 (emit_msr): Likewise.
3756 (emit_sevl): Likewise.
3757 (emit_wfe): Likewise.
3758 (append_insns): Likewise.
3759 (can_encode_int32_in): New helper function.
3760 (aarch64_relocate_instruction): New function.
3761 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
3762 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
3763 (struct linux_target_ops): Install aarch64_get_thread_area,
3764 aarch64_install_fast_tracepoint_jump_pad and
3765 aarch64_get_min_fast_tracepoint_insn_len.
3766
787749ea
PL
37672015-09-21 Pierre Langlois <pierre.langlois@arm.com>
3768
3769 * Makefile.in (aarch64-insn.o): New rule.
3770 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
3771
9812b2e6
YQ
37722015-09-21 Yao Qi <yao.qi@linaro.org>
3773
3774 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
3775
18fe412b
YQ
37762015-09-21 Yao Qi <yao.qi@linaro.org>
3777
3778 * tracepoint.c (max_jump_pad_size): Remove.
3779
a0cc84cd
YQ
37802015-09-18 Yao Qi <yao.qi@linaro.org>
3781
3782 * linux-aarch64-low.c: Don't include sys/uio.h.
3783 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
3784
d78908cf
WW
37852015-09-16 Wei-cheng Wang <cole945@gmail.com>
3786
3787 * tracepoint.c (eval_result_type): Change prototype.
3788 (condition_true_at_tracepoint): Fix argument to compiled_cond.
3789
d57e0d50
PA
37902015-09-15 Pedro Alves <palves@redhat.com>
3791
3792 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
3793 Check whether to report exec events instead of checking whether
3794 multiprocess is enabled.
3795
5a676acc
PA
37962015-09-15 Pedro Alves <palves@redhat.com>
3797
3798 PR remote/18965
3799 * remote-utils.c (prepare_resume_reply): Merge
3800 TARGET_WAITKIND_VFORK_DONE switch case with the
3801 TARGET_WAITKIND_FORKED case.
3802
7c5d0fad
YQ
38032015-09-15 Yao Qi <yao.qi@linaro.org>
3804
3805 * server.c (handle_query): Check string comparison using
3806 "else if" instead of "if".
3807
750ce8d1
YQ
38082015-09-15 Yao Qi <yao.qi@linaro.org>
3809
3810 * server.c (vCont_supported): New global variable.
3811 (handle_query): Set vCont_supported to 1 if "vContSupported+"
3812 matches. Append ";vContSupported+" to own_buf.
3813 (handle_v_requests): Append ";s;S" to own_buf if target supports
3814 hardware single step or vCont_supported is false.
3815 (capture_main): Set vCont_supported to zero.
3816
70b90b91
YQ
38172015-09-15 Yao Qi <yao.qi@linaro.org>
3818
3819 * linux-low.c (linux_supports_conditional_breakpoints): Rename
3820 it to ...
3821 (linux_supports_hardware_single_step): ... New function.
3822 (linux_target_ops): Update.
3823 * lynx-low.c (lynx_target_ops): Set field
3824 supports_hardware_single_step to target_can_do_hardware_single_step.
3825 * nto-low.c (nto_target_ops): Likewise.
3826 * spu-low.c (spu_target_ops): Likewise.
3827 * win32-low.c (win32_target_ops): Likewise.
3828 * target.c (target_can_do_hardware_single_step): New function.
3829 * target.h (struct target_ops) <supports_conditional_breakpoints>:
3830 Remove. <supports_hardware_single_step>: New field.
3831 (target_supports_conditional_breakpoints): Remove.
3832 (target_supports_hardware_single_step): New macro.
3833 (target_can_do_hardware_single_step): Declare.
3834 * server.c (handle_query): Use target_supports_hardware_single_step
3835 instead of target_supports_conditional_breakpoints.
3836
ade90bde
YQ
38372015-09-15 Yao Qi <yao.qi@linaro.org>
3838
3839 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
3840 function.
3841 (struct linux_target_ops the_low_target): Install
3842 aarch64_linux_siginfo_fixup.
3843
94585166
DB
38442015-09-11 Don Breazeal <donb@codesourcery.com>
3845 Luis Machado <lgustavo@codesourcery.com>
3846
3847 * linux-low.c (linux_mourn): Static declaration.
3848 (linux_arch_setup): Move in front of
3849 handle_extended_wait.
3850 (linux_arch_setup_thread): New function.
3851 (handle_extended_wait): Handle exec events. Call
3852 linux_arch_setup_thread. Make event_lwp argument a
3853 pointer-to-a-pointer.
3854 (check_zombie_leaders): Do not check stopped threads.
3855 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
3856 (linux_low_filter_event): Add lwp and thread for exec'ing
3857 non-leader thread if leader thread has been deleted.
3858 Refactor code into linux_arch_setup_thread and call it.
3859 Pass child lwp pointer by reference to handle_extended_wait.
3860 (linux_wait_for_event_filtered): Update comment.
3861 (linux_wait_1): Prevent clobbering exec event status.
3862 (linux_supports_exec_events): New function.
3863 (linux_target_ops) <supports_exec_events>: Initialize new member.
3864 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
3865 new member.
3866 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
3867 * server.c (report_exec_events): New global variable.
3868 (handle_query): Handle qSupported query for exec-events feature.
3869 (captured_main): Initialize report_exec_events.
3870 * server.h (report_exec_events): Declare new global variable.
3871 * target.h (struct target_ops) <supports_exec_events>: New
3872 member.
3873 (target_supports_exec_events): New macro.
3874 * win32-low.c (win32_target_ops) <supports_exec_events>:
3875 Initialize new member.
3876
0568462b
MM
38772015-09-09 Markus Metzger <markus.t.metzger@intel.com>
3878
3879 * linux-low.c (linux_low_enable_btrace): Remove.
3880 (linux_target_ops): Replace linux_low_enable_btrace with
3881 linux_enable_btrace.
3882
39edd165
YQ
38832015-09-03 Yao Qi <yao.qi@linaro.org>
3884
3885 * linux-aarch64-low.c (aarch64_insert_point): Call
3886 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
3887 returns true.
3888
1db33b5a
UW
38892015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3890
3891 * linux-low.c (check_stopped_by_breakpoint): Use
3892 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
3893
ab290430
PA
38942015-08-27 Pedro Alves <palves@redhat.com>
3895
3896 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
3897
8d749320
SM
38982015-08-26 Simon Marchi <simon.marchi@ericsson.com>
3899
6711b7f8
SM
3900 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
3901 the XNEW-family equivalent.
8d749320
SM
3902 (compile_bytecodes): Likewise.
3903 * dll.c (loaded_dll): Likewise.
3904 * event-loop.c (append_callback_event): Likewise.
3905 (create_file_handler): Likewise.
3906 (create_file_event): Likewise.
3907 * hostio.c (handle_open): Likewise.
3908 * inferiors.c (add_thread): Likewise.
3909 (add_process): Likewise.
3910 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
3911 * linux-arm-low.c (arm_new_process): Likewise.
3912 (arm_new_thread): Likewise.
3913 * linux-low.c (add_to_pid_list): Likewise.
3914 (linux_add_process): Likewise.
3915 (handle_extended_wait): Likewise.
3916 (add_lwp): Likewise.
3917 (enqueue_one_deferred_signal): Likewise.
3918 (enqueue_pending_signal): Likewise.
3919 (linux_resume_one_lwp_throw): Likewise.
3920 (linux_resume_one_thread): Likewise.
3921 (linux_read_memory): Likewise.
3922 (linux_write_memory): Likewise.
3923 * linux-mips-low.c (mips_linux_new_process): Likewise.
3924 (mips_linux_new_thread): Likewise.
3925 (mips_add_watchpoint): Likewise.
3926 * linux-x86-low.c (initialize_low_arch): Likewise.
3927 * lynx-low.c (lynx_add_process): Likewise.
3928 * mem-break.c (set_raw_breakpoint_at): Likewise.
3929 (set_breakpoint): Likewise.
3930 (add_condition_to_breakpoint): Likewise.
3931 (add_commands_to_breakpoint): Likewise.
3932 (clone_agent_expr): Likewise.
3933 (clone_one_breakpoint): Likewise.
3934 * regcache.c (new_register_cache): Likewise.
3935 * remote-utils.c (look_up_one_symbol): Likewise.
3936 * server.c (queue_stop_reply): Likewise.
3937 (start_inferior): Likewise.
3938 (queue_stop_reply_callback): Likewise.
3939 (handle_target_event): Likewise.
3940 * spu-low.c (fetch_ppc_memory): Likewise.
3941 (store_ppc_memory): Likewise.
3942 * target.c (set_target_ops): Likewise.
3943 * thread-db.c (thread_db_load_search): Likewise.
3944 (try_thread_db_load_1): Likewise.
3945 * tracepoint.c (add_tracepoint): Likewise.
3946 (add_tracepoint_action): Likewise.
3947 (create_trace_state_variable): Likewise.
3948 (cmd_qtdpsrc): Likewise.
3949 (cmd_qtro): Likewise.
3950 (add_while_stepping_state): Likewise.
3951 * win32-low.c (child_add_thread): Likewise.
3952 (get_image_name): Likewise.
3953
ed8b7b42
YQ
39542015-08-25 Yao Qi <yao.qi@linaro.org>
3955
3956 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3957
db3cb7cb
YQ
39582015-08-25 Yao Qi <yao.qi@linaro.org>
3959
3960 * Makefile.in (aarch64-linux.o): New rule.
3961 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3962 srv_tgtobj.
3963 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3964 (aarch64_init_debug_reg_state): Make it extern.
3965 (aarch64_linux_prepare_to_resume): Remove.
3966
f6011a1c
YQ
39672015-08-25 Yao Qi <yao.qi@linaro.org>
3968
3969 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3970 lwp_arch_private_info and ptid_of_lwp.
3971
88e2cf7e
YQ
39722015-08-25 Yao Qi <yao.qi@linaro.org>
3973
3974 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3975 Find proc_info by find_process_pid. All callers updated.
3976
5e35436e
YQ
39772015-08-25 Yao Qi <yao.qi@linaro.org>
3978
3979 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3980 Remove.
3981 (debug_reg_change_callback): Remove.
3982 (aarch64_notify_debug_reg_change): Remove.
3983
4a8a7965
YQ
39842015-08-25 Yao Qi <yao.qi@linaro.org>
3985
3986 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3987 Call current_lwp_ptid.
3988
32a271ee
YQ
39892015-08-25 Yao Qi <yao.qi@linaro.org>
3990
3991 * linux-aarch64-low.c (debug_reg_change_callback): Use
3992 debug_printf.
3993
0d51c8d7
YQ
39942015-08-25 Yao Qi <yao.qi@linaro.org>
3995
3996 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3997
31a43dd5
YQ
39982015-08-25 Yao Qi <yao.qi@linaro.org>
3999
4000 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
4001
8ee52567
YQ
40022015-08-25 Yao Qi <yao.qi@linaro.org>
4003
4004 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
4005 the code.
4006
ff3f0f45
YQ
40072015-08-25 Yao Qi <yao.qi@linaro.org>
4008
4009 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
4010 Remove.
4011 (debug_reg_change_callback): Remove argument entry and add argument
4012 lwp. Remove local variable thread. Don't print thread id in the
4013 debugging output. Don't check whether pid of thread equals to pid.
4014 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
4015 iterate_over_lwps instead find_inferior.
4016
3d40fbb5
PA
40172015-08-24 Pedro Alves <palves@redhat.com>
4018
4019 * inferiors.c (get_first_process): New function.
4020 * inferiors.h (get_first_process): New declaration.
4021 * remote-utils.c (read_ptid): Default to the first process in the
4022 list, instead of to the current thread's process.
4023
438e1e42
PA
40242015-08-24 Pedro Alves <palves@redhat.com>
4025
4026 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
4027 * event-loop.c: Likewise.
4028 * remote-utils.c: Likewise.
4029 * tracepoint.c: Likewise.
4030
a8c6d4fc
PA
40312015-08-24 Pedro Alves <palves@redhat.com>
4032
4033 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
4034 ptid_get_lwp.
4035
99b0bb12
PA
40362015-08-21 Pedro Alves <palves@redhat.com>
4037
4038 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
4039 instead of literal 1.
4040
f8904751
PA
40412015-08-21 Pedro Alves <palves@redhat.com>
4042
4043 * tdesc.c (default_description): Explicitly zero-initialize.
4044
465a859e
PA
40452015-08-21 Pedro Alves <palves@redhat.com>
4046
4047 PR gdb/18749
4048 * inferiors.c (remove_thread): Discard any pending stop reply for
4049 this thread.
4050 * server.c (remove_all_on_match_pid): Rename to ...
4051 (remove_all_on_match_ptid): ... this. Work with a filter ptid
4052 instead of a pid.
4053 (discard_queued_stop_replies): Change parameter to a ptid. Now
4054 extern.
4055 (handle_v_kill, kill_inferior_callback, captured_main)
4056 (process_serial_event): Adjust.
4057 * server.h (discard_queued_stop_replies): Declare.
4058
f0db101d
PA
40592015-08-21 Pedro Alves <palves@redhat.com>
4060
4061 * linux-low.c (wait_for_sigstop): Always switch to no thread
4062 selected if the previously current thread dies.
4063 * lynx-low.c (lynx_request_interrupt): Use the first thread's
4064 process instead of the current thread's.
4065 * remote-utils.c (input_interrupt): Don't check if there's no
4066 current thread.
4067 * server.c (gdb_read_memory, gdb_write_memory): If setting the
4068 current thread to the general thread fails, error out.
4069 (handle_qxfer_auxv, handle_qxfer_libraries)
4070 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
4071 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
4072 (handle_query): Check if there's a thread selected instead of
4073 checking whether there's any thread in the thread list.
4074 (handle_qxfer_threads, handle_qxfer_btrace)
4075 (handle_qxfer_btrace_conf): Don't error out early if there's no
4076 thread in the thread list.
4077 (handle_v_cont, myresume): Don't set the current thread to the
4078 continue thread.
4079 (process_serial_event) <Hg handling>: Also set thread_id if the
4080 previous general thread is still alive.
4081 (process_serial_event) <g/G handling>: If setting the current
4082 thread to the general thread fails, error out.
4083 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
4084 thread's lwp instead of the current thread's.
4085 * target.c (set_desired_thread): If the desired thread was not
4086 found, leave the current thread pointing to NULL. Return an int
4087 (boolean) indicating success.
4088 * target.h (set_desired_thread): Change return type to int.
4089
40045d91
MF
40902015-08-20 Max Filippov <jcmvbkbc@gmail.com>
4091
4092 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
4093 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
4094 #includes.
4095 (ps_get_thread_area): New function.
4096
45face3b
GB
40972015-08-19 Gary Benson <gbenson@redhat.com>
4098
4099 * hostio.c (handle_pread): Do not attempt to read more data
4100 than hostio_reply_with_data can fit in a packet.
4101
16d5f642
JB
41022015-08-18 Joel Brobecker <brobecker@adacore.com>
4103
4104 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
4105
a738da3a
MF
41062015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
4107
4108 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
4109
33ebda9d
PA
41102015-08-06 Pedro Alves <palves@redhat.com>
4111
4112 * tracepoint.c (expr_eval_result): Now an int.
4113
a44892be
PA
41142015-08-06 Pedro Alves <palves@redhat.com>
4115
4116 * gdbthread.h (struct regcache): Forward declare.
4117 (struct thread_info) <regcache_data>: Now a struct regcache
4118 pointer.
4119 * inferiors.c (inferior_regcache_data)
4120 (set_inferior_regcache_data): Now work with struct regcache
4121 pointers.
4122 * inferiors.h (struct regcache): Forward declare.
4123 (inferior_regcache_data, set_inferior_regcache_data): Now work
4124 with struct regcache pointers.
4125 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
4126 (free_register_cache_thread): Remove struct regcache pointer
4127 casts.
4128
608a1e46
PA
41292015-08-06 Pedro Alves <palves@redhat.com>
4130
4131 * server.c (captured_main): On error, print the exception message
4132 to stderr, and if run_once is set, throw a quit.
4133
f0ce0d3a
PA
41342015-08-06 Pedro Alves <palves@redhat.com>
4135
4136 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
4137 the current thread.
4138
bf47e248
PA
41392015-08-06 Pedro Alves <palves@redhat.com>
4140
4141 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
4142 reading beyond the passed in buffer length.
4143
b6b9ffcc
PL
41442015-08-06 Pierre Langlois <pierre.langlois@arm.com>
4145
4146 * tracepoint.c (symbol_list) <required>: Remove.
4147
863d01bd
PA
41482015-08-06 Pedro Alves <palves@redhat.com>
4149
4150 * linux-low.c (handle_extended_wait): Set the fork child's suspend
4151 count if stopping and suspending threads.
4152 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
4153 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
4154 (linux_detach): Complete an ongoing step-over.
4155 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
4156 throughout.
4157 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
4158 (linux_wait_1): If passing a signal to the inferior after
4159 finishing a step-over, unsuspend and re-resume all lwps. If we
4160 see a single-step event but the thread should be continuing, don't
4161 pass the trap to gdb.
4162 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
4163 internal_error instead of gdb_assert.
4164 (enqueue_pending_signal): New function.
4165 (check_ptrace_stopped_lwp_gone): Add debug output.
4166 (start_step_over): Use internal_error instead of gdb_assert.
4167 (complete_ongoing_step_over): New function.
4168 (linux_resume_one_thread): Don't resume a suspended thread.
4169 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
4170 it stepping.
4171
00db26fa
PA
41722015-08-06 Pedro Alves <palves@redhat.com>
4173
4174 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
4175 (linux_thread_alive): Use lwp_is_marked_dead.
4176 (extended_event_reported): Delete.
4177 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
4178 instead of extended_event_reported.
4179 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
4180 as well.
4181 (lwp_is_marked_dead): New function.
4182 (lwp_running): Use lwp_is_marked_dead.
4183 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
4184 comment.
4185
ad071a30
PA
41862015-08-06 Pedro Alves <palves@redhat.com>
4187
4188 * linux-low.c (linux_wait_1): Move fork event output out of the
4189 !report_to_gdb check. Pass event_child->waitstatus to
4190 target_waitstatus_to_string instead of ourstatus.
4191
524b57e6
YQ
41922015-08-04 Yao Qi <yao.qi@linaro.org>
4193
4194 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
4195 if current_thread is 32 bit.
4196
6085d6f6
YQ
41972015-08-04 Yao Qi <yao.qi@linaro.org>
4198
4199 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4200 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4201 * server.c (extended_protocol): Remove "static".
4202 * server.h (extended_protocol): Declare it.
4203
8a7e4587
YQ
42042015-08-04 Yao Qi <yao.qi@linaro.org>
4205
4206 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
4207 both aarch64 and aarch32.
4208 (aarch64_set_pc): Likewise.
4209
3b53ae99
YQ
42102015-08-04 Yao Qi <yao.qi@linaro.org>
4211
4212 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
4213 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
4214 arm-with-neon.xml to srv_xmlfiles.
4215 * linux-aarch64-low.c: Include linux-aarch32-low.h.
4216 (is_64bit_tdesc): New function.
4217 (aarch64_linux_read_description): New function.
4218 (aarch64_arch_setup): Call aarch64_linux_read_description.
4219 (regs_info): Rename to regs_info_aarch64.
4220 (aarch64_regs_info): Return right regs_info.
4221 (initialize_low_arch): Call initialize_low_arch_aarch32.
4222
bd9e6534
YQ
42232015-08-04 Yao Qi <yao.qi@linaro.org>
4224
4225 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
4226 * linux-aarch32-low.c: New file.
4227 * linux-aarch32-low.h: New file.
4228 * linux-arm-low.c (arm_fill_gregset): Move it to
4229 linux-aarch32-low.c.
4230 (arm_store_gregset): Likewise.
4231 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
4232 (arm_store_vfpregset): Call arm_store_vfpregset_num.
4233 (arm_arch_setup): Check if PTRACE_GETREGSET works.
4234 (regs_info): Rename to regs_info_arm.
4235 (arm_regs_info): Return regs_info_aarch32 if
4236 have_ptrace_getregset is 1 and target description is
4237 arm_with_neon or arm_with_vfpv3.
4238 (initialize_low_arch): Don't call init_registers_arm_with_neon.
4239 Call initialize_low_arch_aarch32 instead.
4240
ded48a5e
YQ
42412015-08-04 Yao Qi <yao.qi@linaro.org>
4242
4243 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
4244 * linux-low.c: ... here.
4245 * linux-low.h (have_ptrace_getregset): Declare it.
4246
96e9210f
PA
42472015-08-04 Pedro Alves <palves@redhat.com>
4248
4249 * thread-db.c (struct thread_db): Use new typedefs.
4250 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
4251 CHK calls.
4252 (disable_thread_event_reporting): Cast result of dlsym to
4253 destination function pointer type.
4254 (thread_db_mourn): Use td_ta_delete_ftype.
4255
af60a1ef
SL
42562015-08-03 Sandra Loosemore <sandra@codesourcery.com>
4257
4258 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
4259 arch variant.
4260 (CDX_BREAKPOINT): Define for R2.
4261 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
4262 (the_low_target): Add comments.
4263
e8b41681
YQ
42642015-07-30 Yao Qi <yao.qi@linaro.org>
4265
4266 * linux-arm-low.c (arm_hwcap): Remove it.
4267 (arm_read_description): New local variable arm_hwcap. Don't
4268 set arm_hwcap to zero.
4269
89abb039
YQ
42702015-07-30 Yao Qi <yao.qi@linaro.org>
4271
4272 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
4273 Use regcache->tdesc instead.
4274 (arm_store_wmmxregset): Likewise.
4275 (arm_fill_vfpregset): Likewise.
4276 (arm_store_vfpregset): Likewise.
4277
deca266c
YQ
42782015-07-30 Yao Qi <yao.qi@linaro.org>
4279
4280 * linux-arm-low.c: Include arch/arm.h.
4281 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
4282 (arm_store_gregset): Likewise.
4283
aa58a496
SM
42842015-07-29 Simon Marchi <simon.marchi@ericsson.com>
4285
4286 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
4287 ptrace's 4th parameter.
4288
50904b25
YQ
42892015-07-27 Yao Qi <yao.qi@linaro.org>
4290
4291 * configure.srv (case aarch64*-*-linux*): Don't set
4292 srv_linux_usrregs.
4293
5826e159
PA
42942015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
4295
4296 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
4297 sys/ptrace.h.
4298 * linux-arm-low.c: Likewise.
4299 * linux-cris-low.c: Likewise.
4300 * linux-crisv32-low.c: Likewise.
4301 * linux-low.c: Likewise.
4302 * linux-m68k-low.c: Likewise.
4303 * linux-mips-low.c: Likewise.
4304 * linux-nios2-low.c: Likewise.
4305 * linux-s390-low.c: Likewise.
4306 * linux-sparc-low.c: Likewise.
4307 * linux-tic6x-low.c: Likewise.
4308 * linux-tile-low.c: Likewise.
4309 * linux-x86-low.c: Likewise.
4310
54019719
PA
43112015-07-24 Pedro Alves <palves@redhat.com>
4312
4313 * config.in: Regenerate.
4314 * configure: Regenerate.
4315
eb7aa561
PA
43162015-07-24 Pedro Alves <palves@redhat.com>
4317
4318 * acinclude.m4: Include ../ptrace.m4.
4319 * configure.ac: Call GDB_AC_PTRACE.
4320 * config.in, configure: Regenerate.
4321
55d7b841
YQ
43222015-07-24 Yao Qi <yao.qi@linaro.org>
4323
4324 * linux-low.c (linux_create_inferior): Remove setting to
4325 proc->priv->new_inferior.
4326 (linux_attach): Likewise.
4327 (linux_low_filter_event): Likewise.
4328 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
4329
c06cbd92
YQ
43302015-07-24 Yao Qi <yao.qi@linaro.org>
4331
4332 * linux-low.c (linux_arch_setup): New function.
4333 (linux_low_filter_event): If proc->tdesc is NULL and
4334 proc->attached is true, call the_low_target.arch_setup.
4335 Otherwise, keep status pending, and return.
4336 (linux_resume_one_lwp_throw): Don't call get_pc if
4337 thread->while_stepping isn't NULL. Don't call
4338 get_thread_regcache if proc->tdesc is NULL.
4339 (need_step_over_p): Return 0 if proc->tdesc is NULL.
4340 (linux_target_ops): Install arch_setup.
4341 * server.c (start_inferior): Call the_target->arch_setup.
4342 * target.h (struct target_ops) <arch_setup>: New field.
4343 (target_arch_setup): New marco.
4344 * lynx-low.c (lynx_target_ops): Update.
4345 * nto-low.c (nto_target_ops): Update.
4346 * spu-low.c (spu_target_ops): Update.
4347 * win32-low.c (win32_target_ops): Update.
4348
5ae3ebba
YQ
43492015-07-24 Yao Qi <yao.qi@linaro.org>
4350
4351 * linux-low.c (linux_add_process): Don't set
4352 proc->priv->new_inferior.
4353 (linux_create_inferior): Set proc->priv->new_inferior to 1.
4354 (linux_attach): Likewise.
4355
eb97750b
YQ
43562015-07-24 Yao Qi <yao.qi@linaro.org>
4357
4358 * server.c (start_inferior): Code refactor.
4359
51aee833
YQ
43602015-07-24 Yao Qi <yao.qi@linaro.org>
4361
4362 * server.c (process_serial_event): Set general_thread.
4363
af1b22f3
YQ
43642015-07-21 Yao Qi <yao.qi@linaro.org>
4365
4366 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
4367 aarch64_linux_get_debug_reg_capacity.
4368
554717a3
YQ
43692015-07-17 Yao Qi <yao.qi@linaro.org>
4370
4371 * Makefile.in (aarch64-linux-hw-point.o): New rule.
4372 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
4373 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
4374 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
4375 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
4376 (AARCH64_HWP_ALIGNMENT): Likewise.
4377 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
4378 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
4379 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
4380 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
4381 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
4382 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
4383 (struct aarch64_debug_reg_state): Likewise.
4384 (struct arch_lwp_info): Likewise.
4385 (aarch64_align_watchpoint): Likewise.
4386 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
4387 (aarch64_watchpoint_length): Likewise.
4388 (aarch64_point_encode_ctrl_reg): Likewise
4389 (aarch64_point_is_aligned): Likewise.
4390 (aarch64_align_watchpoint): Likewise.
4391 (aarch64_linux_set_debug_regs):
4392 (aarch64_dr_state_insert_one_point): Likewise.
4393 (aarch64_dr_state_remove_one_point): Likewise.
4394 (aarch64_handle_breakpoint): Likewise.
4395 (aarch64_handle_aligned_watchpoint): Likewise.
4396 (aarch64_handle_unaligned_watchpoint): Likewise.
4397 (aarch64_handle_watchpoint): Likewise.
4398
c67ca4de
YQ
43992015-07-17 Yao Qi <yao.qi@linaro.org>
4400
4401 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
4402 and don't aarch64_get_debug_reg_state. All callers update.
4403 (aarch64_handle_aligned_watchpoint): Likewise.
4404 (aarch64_handle_unaligned_watchpoint): Likewise.
4405 (aarch64_handle_watchpoint): Likewise.
4406 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
4407 (aarch64_remove_point): Likewise.
4408
25abf979
YQ
44092015-07-17 Yao Qi <yao.qi@linaro.org>
4410
4411 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
4412 debug_printf.
4413 (aarch64_handle_unaligned_watchpoint): Likewise.
4414
db1ff28b
JK
44152015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4416
4417 Revert the previous 3 commits:
4418 Move gdb_regex* to common/
4419 Move linux_find_memory_regions_full & co.
4420 gdbserver build-id attribute generator
4421
700ca40f
JK
44222015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4423 Jan Kratochvil <jan.kratochvil@redhat.com>
4424
4425 gdbserver build-id attribute generator.
4426 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
4427 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
4428 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
4429 (find_phdr): New.
4430 (get_dynamic): Use find_pdhr to traverse program headers.
4431 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
4432 (compare_mapping_entry_range, struct find_memory_region_callback_data)
4433 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
4434 (get_hex_build_id): New.
4435 (linux_qxfer_libraries_svr4): Add optional build-id attribute
4436 to reply XML document.
4437
9904185c
JK
44382015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4439 Jan Kratochvil <jan.kratochvil@redhat.com>
4440
4441 * target.c: Include target/target-utils.h and fcntl.h.
4442 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
4443 (target_fileio_read_stralloc): New functions.
4444
6e5b4429
JK
44452015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
4446
4447 * Makefile.in (OBS): Add gdb_regex.o.
4448 (gdb_regex.o): New.
4449 * config.in: Rebuilt.
4450 * configure: Rebuilt.
4451
ddc98fbf
JK
44522015-07-15 Aleksandar Ristovski <aristovski@qnx.com
4453 Jan Kratochvil <jan.kratochvil@redhat.com>
4454
4455 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
4456 * Makefile.in (OBS): Add target-utils.o.
4457 (linux-maps.o, target-utils.o): New.
4458 * configure.srv (srv_linux_obj): Add linux-maps.o.
4459
e57bb7a0
PL
44602015-07-15 Pierre Langlois <pierre.langlois@arm.com>
4461
4462 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
4463 function, return 1.
4464 (the_low_target): Install it.
4465
586b02a9
PA
44662015-07-14 Pedro Alves <palves@redhat.com>
4467
4468 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
4469 Instead, ignore ECHILD, and throw an error for other errnos.
4470
58c1b36c
PA
44712015-07-10 Pedro Alves <palves@redhat.com>
4472
4473 * event-loop.c (struct callback_event) <data>: Change type to
4474 gdb_client_data instance instead of gdb_client_data pointer.
4475 (append_callback_event): Adjust.
4476
421530db
PL
44772015-07-10 Pierre Langlois <pierre.langlois@arm.com>
4478
4479 * linux-aarch64-low.c: Add comments for each linux_target_ops
4480 method. Remove comments already covered in target_ops and
4481 linux_target_ops definitions.
4482 (the_low_target): Add comments for each unimplemented method.
4483
c2d65f38
YQ
44842015-07-09 Yao Qi <yao.qi@linaro.org>
4485
4486 * linux-aarch64-low.c (aarch64_regmap): Remove.
4487 (aarch64_usrregs_info): Remove.
4488 (regs_info): Set field usrregs to NULL.
4489
b20a6524
MM
44902015-07-02 Markus Metzger <markus.t.metzger@intel.com>
4491
4492 * linux-low.c: Include "rsp-low.h"
4493 (linux_low_encode_pt_config, linux_low_encode_raw): New.
4494 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
4495 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
4496 (handle_btrace_enable_pt): New.
4497 (handle_btrace_general_set): Support "pt".
4498 (handle_btrace_conf_general_set): Support "pt:size".
4499
96c97461
PL
45002015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4501
4502 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
4503 Z_PACKET_SW_BP.
4504
37d66942
PL
45052015-06-29 Pierre Langlois <pierre.langlois@arm.com>
4506
4507 * linux-aarch64-low.c: Remove comment about endianness.
4508 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
4509 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
4510 memcmp.
4511
dc06243f
GB
45122015-06-24 Gary Benson <gbenson@redhat.com>
4513
4514 * linux-i386-ipa.c (stdint.h): Do not include.
4515 * lynx-i386-low.c (stdint.h): Likewise.
4516 * lynx-ppc-low.c (stdint.h): Likewise.
4517 * mem-break.c (stdint.h): Likewise.
4518 * thread-db.c (stdint.h): Likewise.
4519 * tracepoint.c (stdint.h): Likewise.
4520 * win32-low.c (stdint.h): Likewise.
4521
124e13d9
SM
45222015-06-18 Simon Marchi <simon.marchi@ericsson.com>
4523
4524 * server.c (write_qxfer_response): Update call to
4525 remote_escape_output.
4526
909c2cda
JK
45272015-06-15 Aleksandar Ristovski <aristovski@qnx.com
4528 Jan Kratochvil <jan.kratochvil@redhat.com>
4529
4530 Merge multiple hex conversions.
4531 * gdbreplay.c (tohex): Rename to 'fromhex'.
4532 (logchar): Use fromhex.
4533
24c05f46
JK
45342015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
4535
4536 * server.c (handle_qxfer_libraries): Set `version' attribute for
4537 <library-list>.
4538
14d2069a
GB
45392015-06-10 Gary Benson <gbenson@redhat.com>
4540
4541 * target.h (struct target_ops) <multifs_open>: New field.
4542 <multifs_unlink>: Likewise.
4543 <multifs_readlink>: Likewise.
4544 * linux-low.c (nat/linux-namespaces.h): New include.
4545 (linux_target_ops): Initialize the_target->multifs_open,
4546 the_target->multifs_unlink and the_target->multifs_readlink.
4547 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
4548 * hostio.c (hostio_fs_pid): New static variable.
4549 (hostio_handle_new_gdb_connection): New function.
4550 (handle_setfs): Likewise.
4551 (handle_open): Use the_target->multifs_open as appropriate.
4552 (handle_unlink): Use the_target->multifs_unlink as appropriate.
4553 (handle_readlink): Use the_target->multifs_readlink as
4554 appropriate.
4555 (handle_vFile): Handle vFile:setfs packets.
4556 * server.c (handle_query): Call hostio_handle_new_gdb_connection
4557 after target_handle_new_gdb_connection.
4558
4b8b5e72
GB
45592015-06-10 Gary Benson <gbenson@redhat.com>
4560
4561 * configure.ac (AC_CHECK_FUNCS): Add setns.
4562 * config.in: Regenerate.
4563 * configure: Likewise.
4564 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
4565 (linux-namespaces.o): New rule.
4566 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
4567
3ac2e371
GB
45682015-06-09 Gary Benson <gbenson@redhat.com>
4569
4570 * hostio.c (handle_open): Process mode argument with
4571 fileio_to_host_mode.
4572
ca9b78ce
YQ
45732015-06-01 Yao Qi <yao.qi@linaro.org>
4574
4575 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
4576 * linux-x86-low.c: Likewise.
4577
bfacd19d
DB
45782015-05-28 Don Breazeal <donb@codesourcery.com>
4579
4580 * linux-low.c (handle_extended_wait): Initialize
4581 thread_info.last_resume_kind for new fork children.
4582
452003ef
PA
45832015-05-15 Pedro Alves <palves@redhat.com>
4584
4585 * target.h (target_handle_new_gdb_connection): Rewrite using if
4586 wrapped in do/while.
4587
1041a03c
JB
45882015-05-14 Joel Brobecker <brobecker@adacore.com>
4589
4590 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
4591 * configure, config.in: Regenerate.
4592 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
4593 Declare typedef.
4594
c269dbdb
DB
45952015-05-12 Don Breazeal <donb@codesourcery.com>
4596
4597 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
4598 PTRACE_EVENT_VFORK_DONE.
4599 (linux_low_ptrace_options, extended_event_reported): Add vfork
4600 events.
4601 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
4602 and "vforkdone" for RSP 'T' Stop Reply Packet.
4603 * server.h (report_vfork_events): Declare
4604 global variable.
4605
3a8a0396
DB
46062015-05-12 Don Breazeal <donb@codesourcery.com>
4607
4608 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
4609 (the_low_target) <new_fork>: Initialize new member.
4610 * linux-arm-low.c (arm_new_fork): New function.
4611 (the_low_target) <new_fork>: Initialize new member.
4612 * linux-low.c (handle_extended_wait): Call new target function
4613 new_fork.
4614 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
4615 * linux-mips-low.c (mips_add_watchpoint): New function
4616 extracted from mips_insert_point.
4617 (the_low_target) <new_fork>: Initialize new member.
4618 (mips_linux_new_fork): New function.
4619 (mips_insert_point): Call mips_add_watchpoint.
4620 * linux-x86-low.c (x86_linux_new_fork): New function.
4621 (the_low_target) <new_fork>: Initialize new member.
4622
de0d863e
DB
46232015-05-12 Don Breazeal <donb@codesourcery.com>
4624
4625 * linux-low.c (handle_extended_wait): Implement return value,
4626 rename argument 'event_child' to 'event_lwp', handle
4627 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
4628 (linux_low_ptrace_options): New function.
4629 (linux_low_filter_event): Call linux_low_ptrace_options,
4630 use different argument fo linux_enable_event_reporting,
4631 use return value from handle_extended_wait.
4632 (extended_event_reported): New function.
4633 (linux_wait_1): Call extended_event_reported and set
4634 status to report fork events.
4635 (linux_write_memory): Add pid to debug message.
4636 (reset_lwp_ptrace_options_callback): New function.
4637 (linux_handle_new_gdb_connection): New function.
4638 (linux_target_ops): Initialize new structure member.
4639 * linux-low.h (struct lwp_info) <waitstatus>: New member.
4640 * lynx-low.c: Initialize new structure member.
4641 * remote-utils.c (prepare_resume_reply): Implement stop reason
4642 "fork" for "T" stop message.
4643 * server.c (handle_query): Call handle_new_gdb_connection.
4644 * server.h (report_fork_events): Declare global flag.
4645 * target.h (struct target_ops) <handle_new_gdb_connection>:
4646 New member.
4647 (target_handle_new_gdb_connection): New macro.
4648 * win32-low.c: Initialize new structure member.
4649
ddcbc397
DB
46502015-05-12 Don Breazeal <donb@codesourcery.com>
4651
4652 * mem-break.c (APPEND_TO_LIST): Define macro.
4653 (clone_agent_expr): New function.
4654 (clone_one_breakpoint): New function.
4655 (clone_all_breakpoints): New function.
4656 * mem-break.h: Declare new functions.
4657
89245bc0
DB
46582015-05-12 Don Breazeal <donb@codesourcery.com>
4659
4660 * linux-low.c (linux_supports_fork_events): New function.
4661 (linux_supports_vfork_events): New function.
4662 (linux_target_ops): Initialize new structure members.
4663 (initialize_low): Call linux_check_ptrace_features.
4664 * lynx-low.c (lynx_target_ops): Initialize new structure
4665 members.
4666 * server.c (report_fork_events, report_vfork_events):
4667 New global flags.
4668 (handle_query): Add new features to qSupported packet and
4669 response.
4670 (captured_main): Initialize new global variables.
4671 * target.h (struct target_ops) <supports_fork_events>:
4672 New member.
4673 <supports_vfork_events>: New member.
4674 (target_supports_fork_events): New macro.
4675 (target_supports_vfork_events): New macro.
4676 * win32-low.c (win32_target_ops): Initialize new structure
4677 members.
4678
835205d0
GB
46792015-05-12 Gary Benson <gbenson@redhat.com>
4680
4681 * server.c (handle_qxfer_exec_file): Use current process
4682 if annex is empty.
4683
21e94bd9
SL
46842015-05-08 Sandra Loosemore <sandra@codesourcery.com>
4685
4686 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
4687 Remove HAVE_PTRACE_GETREGS conditionals.
4688 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
4689 instead of PTRACE_GETREGS and PTRACE_SETREGS.
4690
45614f15
YQ
46912015-05-08 Yao Qi <yao.qi@linaro.org>
4692
4693 * linux-low.c (linux_supports_conditional_breakpoints): New
4694 function.
4695 (linux_target_ops): Install new target method.
4696 * lynx-low.c (lynx_target_ops): Install NULL hook for
4697 supports_conditional_breakpoints.
4698 * nto-low.c (nto_target_ops): Likewise.
4699 * spu-low.c (spu_target_ops): Likewise.
4700 * win32-low.c (win32_target_ops): Likewise.
4701 * server.c (handle_query): Check
4702 target_supports_conditional_breakpoints.
4703 * target.h (struct target_ops) <supports_conditional_breakpoints>:
4704 New field.
4705 (target_supports_conditional_breakpoints): New macro.
4706
80ad801e
PA
47072015-05-06 Pedro Alves <palves@redhat.com>
4708
4709 PR server/18081
4710 * server.c (start_inferior): If the process exits, mourn it.
4711
819843c7
GB
47122015-04-21 Gary Benson <gbenson@redhat.com>
4713
4714 * hostio.c (fileio_open_flags_to_host): Factored out to
4715 fileio_to_host_openflags in common/fileio.c. Single use
4716 updated.
4717
a2d5a9d7
MF
47182015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4719
4720 * linux-xtensa-low.c (xtensa_fill_gregset)
4721 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
4722 XCHAL_HAVE_LOOP.
4723
deb44829
MF
47242015-04-17 Max Filippov <jcmvbkbc@gmail.com>
4725
4726 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
4727 (regs_info): Replace usrregs pointer with NULL.
4728
e57f1de3
GB
47292015-04-17 Gary Benson <gbenson@redhat.com>
4730
4731 * target.h (struct target_ops) <pid_to_exec_file>: New field.
4732 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
4733 * server.c (handle_qxfer_exec_file): New function.
4734 (qxfer_packets): Add exec-file entry.
4735 (handle_query): Report qXfer:exec-file:read as supported packet.
4736
62828379
RN
47372015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
4738
4739 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
4740
b88bb450
GB
47412015-04-09 Gary Benson <gbenson@redhat.com>
4742
4743 * hostio-errno.c (errno_to_fileio_error): Remove function.
4744 Update caller to use remote_fileio_to_fio_error.
4745
c8f4bfdd
YQ
47462015-04-09 Yao Qi <yao.qi@linaro.org>
4747
4748 * linux-low.c (linux_insert_point): Call
4749 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
4750 (linux_remove_point): Call remove_memory_breakpoint if type is
4751 raw_bkpt_type_sw.
4752 * linux-x86-low.c (x86_insert_point): Don't call
4753 insert_memory_breakpoint.
4754 (x86_remove_point): Don't call remove_memory_breakpoint.
4755
41f98f02
PA
47562015-04-01 Pedro Alves <palves@redhat.com>
4757 Cleber Rosa <crosa@redhat.com>
4758
4759 * server.c (gdbserver_usage): Reorganize and extend the usage
4760 message.
4761
2bf6fb9d
PA
47622015-03-24 Pedro Alves <palves@redhat.com>
4763
4764 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
4765 output. Also dump TRAP_TRACE.
4766 (linux_low_filter_event): In debug output, distinguish a
4767 resume_stop SIGSTOP from a delayed SIGSTOP.
4768
369f6daa
GB
47692015-03-24 Gary Benson <gbenson@redhat.com>
4770
4771 * linux-x86-low.c (x86_linux_new_thread): Moved to
4772 nat/x86-linux.c.
4773 (x86_linux_prepare_to_resume): Likewise.
4774
8e5d4070
GB
47752015-03-24 Gary Benson <gbenson@redhat.com>
4776
4777 * Makefile.in (x86-linux-dregs.o): New rule.
4778 * configure.srv: Add x86-linux-dregs.o to relevant targets.
4779 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
4780 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
4781 (x86_linux_dr_get): Likewise.
4782 (x86_linux_dr_set): Likewise.
4783 (update_debug_registers_callback): Likewise.
4784 (x86_linux_dr_set_addr): Likewise.
4785 (x86_linux_dr_get_addr): Likewise.
4786 (x86_linux_dr_set_control): Likewise.
4787 (x86_linux_dr_get_control): Likewise.
4788 (x86_linux_dr_get_status): Likewise.
4789 (x86_linux_update_debug_registers): Likewise.
4790
2b95d440
GB
47912015-03-24 Gary Benson <gbenson@redhat.com>
4792
4793 * linux-x86-low.c (x86_linux_update_debug_registers):
4794 New function, factored out from...
4795 (x86_linux_prepare_to_resume): ...this.
4796
14b0bc68
GB
47972015-03-24 Gary Benson <gbenson@redhat.com>
4798
4799 * linux-x86-low.c (x86_linux_dr_get): Update comments.
4800 (x86_linux_dr_set): Likewise.
4801 (update_debug_registers_callback): Likewise.
4802 (x86_linux_dr_set_addr): Likewise.
4803 (x86_linux_dr_get_addr): Likewise.
4804 (x86_linux_dr_set_control): Likewise.
4805 (x86_linux_dr_get_control): Likewise.
4806 (x86_linux_dr_get_status): Likewise.
4807 (x86_linux_prepare_to_resume): Likewise.
4808
5dfe6ca8
GB
48092015-03-24 Gary Benson <gbenson@redhat.com>
4810
4811 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
4812 Use perror_with_name. Pass string through gettext.
4813 (x86_linux_dr_set): Likewise.
4814
d33472ad
GB
48152015-03-24 Gary Benson <gbenson@redhat.com>
4816
4817 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
4818 (x86_linux_dr_set_addr): ...this.
4819 (x86_dr_low_get_addr): Rename to...
4820 (x86_linux_dr_get_addr): ...this.
4821 (x86_dr_low_set_control): Rename to...
4822 (x86_linux_dr_set_control): ...this.
4823 (x86_dr_low_get_control): Rename to...
4824 (x86_linux_dr_get_control): ...this.
4825 (x86_dr_low_get_status): Rename to...
4826 (x86_linux_dr_get_status): ...this.
4827 (x86_dr_low): Update with new function names.
4828
4b134ca1
GB
48292015-03-24 Gary Benson <gbenson@redhat.com>
4830
4831 * Makefile.in (x86-linux.o): New rule.
4832 * configure.srv: Add x86-linux.o to relevant targets.
4833 * linux-low.c (lwp_set_arch_private_info): New function.
4834 (lwp_arch_private_info): Likewise.
4835 * linux-x86-low.c: Include nat/x86-linux.h.
4836 (arch_lwp_info): Removed structure.
4837 (update_debug_registers_callback):
4838 Use lwp_set_debug_registers_changed.
4839 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
4840 and lwp_set_debug_registers_changed.
4841 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
4842
34c703da
GB
48432015-03-24 Gary Benson <gbenson@redhat.com>
4844
4845 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
4846 * linux-arm-low.c (arm_new_thread): Likewise.
4847 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
4848 * linux-mips-low.c (mips_linux_new_thread): Likewise.
4849 * linux-x86-low.c (x86_linux_new_thread): Likewise.
4850 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
4851
cff068da
GB
48522015-03-24 Gary Benson <gbenson@redhat.com>
4853
4854 * linux-low.c (ptid_of_lwp): New function.
4855 (lwp_is_stopped): Likewise.
4856 (lwp_stop_reason): Likewise.
4857 * linux-x86-low.c (update_debug_registers_callback):
4858 Use lwp_is_stopped.
4859 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
4860 lwp_stop_reason.
4861
b2f7c7e8
GB
48622015-03-24 Gary Benson <gbenson@redhat.com>
4863
4864 * linux-low.h (linux_stop_lwp): Remove declaration.
4865
6d4ee8c6
GB
48662015-03-24 Gary Benson <gbenson@redhat.com>
4867
4868 * linux-low.h: Include nat/linux-nat.h.
4869 * linux-low.c (iterate_over_lwps_args): New structure.
4870 (iterate_over_lwps_filter): New function.
4871 (iterate_over_lwps): Likewise.
4872 * linux-x86-low.c (update_debug_registers_callback):
4873 Update signature to what iterate_over_lwps expects.
4874 Remove PID check that iterate_over_lwps now performs.
4875 (x86_dr_low_set_addr): Use iterate_over_lwps.
4876 (x86_dr_low_set_control): Likewise.
4877
70a0bb6b
GB
48782015-03-24 Gary Benson <gbenson@redhat.com>
4879
4880 * linux-x86-low.c (x86_debug_reg_state): New function.
4881 (x86_linux_prepare_to_resume): Use the above.
4882
7b669087
GB
48832015-03-24 Gary Benson <gbenson@redhat.com>
4884
4885 * linux-low.c (current_lwp_ptid): New function.
4886 * linux-x86-low.c: Include nat/linux-nat.h.
4887 (x86_dr_low_get_addr): Use current_lwp_ptid.
4888 (x86_dr_low_get_control): Likewise.
4889 (x86_dr_low_get_status): Likewise.
4890
eef49a3d
PA
48912015-03-20 Pedro Alves <palves@redhat.com>
4892
4893 * tracepoint.c (cmd_qtstatus): Make "str" const.
4894
b2333d22
PA
48952015-03-20 Pedro Alves <palves@redhat.com>
4896
4897 * server.c (handle_general_set): Make "req_str" const.
4898
23f238d3
PA
48992015-03-19 Pedro Alves <palves@redhat.com>
4900
4901 * linux-low.c (linux_resume_one_lwp): Rename to ...
4902 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
4903 instead call perror_with_name.
4904 (check_ptrace_stopped_lwp_gone): New function.
4905 (linux_resume_one_lwp): Reimplement as wrapper around
4906 linux_resume_one_lwp_throw that swallows errors if the LWP is
4907 gone.
4908
91baf43f
PA
49092015-03-19 Pedro Alves <palves@redhat.com>
4910
4911 * linux-low.c (count_events_callback, select_event_lwp_callback):
4912 No longer check whether the thread has resume_stop as last resume
4913 kind.
4914
8bf3b159
PA
49152015-03-19 Pedro Alves <palves@redhat.com>
4916
4917 * linux-low.c (count_events_callback, select_event_lwp_callback):
4918 Use the lwp's status_pending_p field, not the thread's.
4919
b90fc188
PA
49202015-03-19 Pedro Alves <palves@redhat.com>
4921
4922 * linux-low.c (select_event_lwp_callback): Update comments to
4923 no longer mention SIGTRAP.
4924
464b0089
GB
49252015-03-18 Gary Benson <gbenson@redhat.com>
4926
4927 * server.c (handle_query): Do not report vFile:fstat as supported.
4928
aa9e327f
GB
49292015-03-11 Gary Benson <gbenson@redhat.com>
4930
4931 * hostio.c (sys/types.h): New include.
4932 (sys/stat.h): Likewise.
4933 (common-remote-fileio.h): Likewise.
4934 (handle_fstat): New function.
4935 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 4936
791c0056
GB
49372015-03-11 Gary Benson <gbenson@redhat.com>
4938
4939 * configure.ac (AC_CHECK_MEMBERS): Add checks for
4940 struct stat.st_blocks and struct stat.st_blksize.
4941 * configure: Regenerate.
4942 * config.in: Likewise.
4943 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4944 (OBS): Add common-remote-fileio.o.
4945 (common-remote-fileio.o): New rule.
4946
9a9df970
PA
49472015-03-09 Pedro Alves <palves@redhat.com>
4948
4949 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4950 'struct sockaddr' pointer in 'accept' call.
4951
9eb1356e
PA
49522015-03-09 Pedro Alves <palves@redhat.com>
4953
4954 Revert:
4955 2015-03-07 Pedro Alves <palves@redhat.com>
4956 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4957 or <winsock2.h> here. Instead include "gdb_socket.h".
4958 (remote_open): Use union gdb_sockaddr_u.
4959 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4960 or <winsock2.h> here. Instead include "gdb_socket.h".
4961 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4962 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4963 or <sys/un.h>.
4964 (init_named_socket, gdb_agent_helper_thread): Use union
4965 gdb_sockaddr_u.
4966
aac331e4
PA
49672015-03-07 Pedro Alves <palves@redhat.com>
4968
4969 * configure.ac (build_warnings): Move
4970 -Wdeclaration-after-statement to the C-specific set.
4971 * configure: Regenerate.
4972
366c75fc
PA
49732015-03-07 Pedro Alves <palves@redhat.com>
4974
4975 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4976 or <winsock2.h> here. Instead include "gdb_socket.h".
4977 (remote_open): Use union gdb_sockaddr_u.
4978 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4979 or <winsock2.h> here. Instead include "gdb_socket.h".
4980 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4981 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4982 or <sys/un.h>.
4983 (init_named_socket, gdb_agent_helper_thread): Use union
4984 gdb_sockaddr_u.
4985
492d29ea
PA
49862015-03-07 Pedro Alves <palves@redhat.com>
4987
4988 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4989 instead.
4990
60a191ed
YQ
49912015-03-06 Yao Qi <yao.qi@linaro.org>
4992
4993 * linux-aarch64-low.c (aarch64_insert_point): Use
4994 show_debug_regs as a boolean.
4995 (aarch64_remove_point): Likewise.
4996
f5771b1d
PA
49972015-03-05 Pedro Alves <palves@redhat.com>
4998
4999 * lynx-low.c (lynx_target_ops): Install NULL hooks for
5000 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
5001 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
5002 * nto-low.c (nto_target_ops): Likewise.
5003 * spu-low.c (spu_target_ops): Likewise.
5004 * win32-low.c (win32_target_ops): Likewise.
5005
3e572f71
PA
50062015-03-04 Pedro Alves <palves@redhat.com>
5007
72f4393d 5008 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
5009 Decide whether a breakpoint triggered based on the SIGTRAP's
5010 siginfo.si_code.
72f4393d
L
5011 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
5012 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
5013 (linux_low_filter_event): Check for breakpoints before checking
5014 watchpoints.
5015 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
5016 siginfo.si_code.
72f4393d
L
5017 (linux_stopped_by_sw_breakpoint)
5018 (linux_supports_stopped_by_sw_breakpoint)
5019 (linux_stopped_by_hw_breakpoint)
5020 (linux_supports_stopped_by_hw_breakpoint): New functions.
5021 (linux_target_ops): Install new target methods.
3e572f71 5022
1ec68e26
PA
50232015-03-04 Pedro Alves <palves@redhat.com>
5024
5025 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
5026 * server.c (swbreak_feature, hwbreak_feature): New globals.
5027 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
5028 (captured_main): Clear swbreak_feature and hwbreak_feature.
5029 * server.h (swbreak_feature, hwbreak_feature): Declare.
5030 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
5031 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
5032 supports_stopped_by_hw_breakpoint>: New fields.
5033 (target_supports_stopped_by_sw_breakpoint)
5034 (target_stopped_by_sw_breakpoint)
5035 (target_supports_stopped_by_hw_breakpoint)
5036 (target_stopped_by_hw_breakpoint): Declare.
5037
15c66dd6
PA
50382015-03-04 Pedro Alves <palves@redhat.com>
5039
5040 enum lwp_stop_reason -> enum target_stop_reason
5041 * linux-low.c (check_stopped_by_breakpoint): Adjust.
5042 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
5043 (linux_wait_1, stuck_in_jump_pad_callback)
5044 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
5045 (linux_stopped_by_watchpoint):
5046 * linux-low.h (enum lwp_stop_reason): Delete.
5047 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
5048 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5049
98fc70d6
YQ
50502015-03-04 Yao Qi <yao.qi@linaro.org>
5051
5052 * Makefile.in (SFILES): Add linux-aarch64-low.c.
5053
dd2ac174
GB
50542015-03-03 Gary Benson <gbenson@redhat.com>
5055
5056 * hostio.c (handle_vFile): Fix prefix lengths.
5057
d68e53f4
MM
50582015-03-03 Markus Metzger <markus.t.metzger@intel.com>
5059
5060 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
5061 ptr_bits.
5062
bf2d68ab
AA
50632015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
5064
5065 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
5066 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
5067 (clean): Add "rm -f" for above C files.
5068 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
5069 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
5070 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
5071 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
5072 * linux-s390-low.c (HWCAP_S390_VX): New macro.
5073 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
5074 (init_registers_s390x_vx_linux64)
5075 (init_registers_s390x_tevx_linux64)
5076 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
5077 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
5078 declarations.
5079 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
5080 (s390_store_vxrs_high): New functions.
5081 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
5082 NT_S390_VXRS_HIGH.
5083 (s390_arch_setup): Add logic for selecting one of the new target
5084 descriptions. Activate the new vector regsets if applicable.
5085 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
5086 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
5087 and init_registers_s390x_tevx_linux64.
5088
c966a859
PA
50892015-03-01 Pedro Alves <palves@redhat.com>
5090
5091 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
5092 parameter.
5093
4180215b
PA
50942015-02-27 Pedro Alves <palves@redhat.com>
5095
5096 * linux-x86-low.c (u_debugreg_offset): New function.
5097 (x86_linux_dr_get, x86_linux_dr_set): Use it.
5098
749bab01
PA
50992015-02-27 Pedro Alves <palves@redhat.com>
5100
5101 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
5102 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
5103 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
5104 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
5105 (ps_lsetfpregs, ps_getpid)
5106 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
5107 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
5108 (ps_lsetxregs, ps_plog): Declare.
5109
3c14e5a3
PA
51102015-02-27 Pedro Alves <palves@redhat.com>
5111
5112 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
5113 IP_AGENT_EXPORT_FUNC.
5114 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
5115 IP_AGENT_EXPORT_FUNC.
5116 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
5117 (IP_AGENT_EXPORT): Delete.
5118 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5119 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5120 (gdb_trampoline_buffer_error, collecting, gdb_collect)
5121 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
5122 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
5123 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
5124 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
5125 (traceframe_read_count, traceframe_write_count)
5126 (traceframes_created, trace_state_variables, get_raw_reg)
5127 (get_trace_state_variable_value, set_trace_state_variable_value)
5128 (ust_loaded, helper_thread_id, cmd_buf): Use
5129 IPA_SYM_EXPORTED_NAME.
5130 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
5131 (tracepoints) Use IP_AGENT_EXPORT_VAR.
5132 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
5133 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5134 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
5135 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
5136 EXTERN_C_PUSH/EXTERN_C_POP.
5137 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
5138 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
5139 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5140 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
5141 (traceframe_write_count, traceframe_read_count)
5142 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
5143 (about_to_request_buffer_space, get_trace_state_variable_value)
5144 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
5145 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
5146 EXTERN_C_PUSH/EXTERN_C_POP.
5147 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
5148 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
5149 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
5150 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
5151 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
5152 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
5153 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
5154 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
5155 Define.
5156 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
5157 (IP_AGENT_EXPORT_VAR_DECL): Define.
5158 (tracing): Declare.
5159 (gdb_agent_get_raw_reg): Declare.
5160
fe978cb0
PA
51612015-02-27 Tom Tromey <tromey@redhat.com>
5162 Pedro Alves <palves@redhat.com>
5163
5164 Rename symbols whose names are reserved C++ keywords throughout.
5165
3bc3d82a
PA
51662015-02-27 Pedro Alves <palves@redhat.com>
5167
5168 * Makefile.in (COMPILER): New, get it from autoconf.
5169 (CXX): Get from autoconf instead.
5170 (COMPILE.pre): Use COMPILER.
5171 (CC-LD): Rename to ...
5172 (CC_LD): ... this. Use COMPILER.
5173 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
5174 (CXX_FOR_TARGET): Default to g++ instead of gcc.
5175 * acinclude.m4: Include build-with-cxx.m4.
5176 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
5177 Disable -Werror by default if building in C++ mode.
5178 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
5179 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
5180 the C++ compiler. Save/restore CXXFLAGS too.
5181 * configure: Regenerate.
5182
07697489
PA
51832015-02-27 Pedro Alves <palves@redhat.com>
5184
5185 * acinclude.m4: Include libiberty.m4.
5186 * configure.ac: Call libiberty_INIT.
5187 * config.in, configure: Regenerate.
5188
9beb7c4e
PA
51892015-02-26 Pedro Alves <palves@redhat.com>
5190
5191 * linux-low.c (linux_wait_1): When incrementing the PC past a
5192 program breakpoint always use the_low_target.breakpoint_len as
5193 increment, rather than the maximum between that and
5194 the_low_target.decr_pc_after_break.
5195
8090aef2
PA
51962015-02-23 Pedro Alves <palves@redhat.com>
5197
5198 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
5199 thread was doing a step-over; always adjust the PC if
5200 we stepped over a permanent breakpoint.
5201 (linux_wait_1): If we stepped over breakpoint that was on top of a
5202 permanent breakpoint, manually advance the PC past it.
5203
bc9540e8
PA
52042015-02-23 Pedro Alves <palves@redhat.com>
5205
5206 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
5207 modes.
5208 (x86_fill_gregset, x86_store_gregset): Use it when handling
5209 $orig_eax.
5210
2db9a427
PA
52112015-02-20 Pedro Alves <palves@redhat.com>
5212
5213 * thread-db.c: Include "nat/linux-procfs.h".
5214 (thread_db_init): Skip listing new threads if the kernel supports
5215 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
5216
afa8d396
PA
52172015-02-20 Pedro Alves <palves@redhat.com>
5218
5219 * linux-low.c (status_pending_p_callback): Use ptid_match.
5220
c9587f88
AT
52212015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
5222
5223 PR breakpoints/16812
5224 * linux-low.c (wstatus_maybe_breakpoint): Remove.
5225 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
5226 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
5227
b05ec7a5
AT
52282015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
5229
5230 PR breakpoints/15956
5231 * tracepoint.c (cmd_qtinit): Add check for current_thread.
5232
d33501a5
MM
52332015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5234
5235 * linux-low.c (linux_low_btrace_conf): Print size.
5236 * server.c (handle_btrace_conf_general_set): New.
5237 (hanle_general_set): Call handle_btrace_conf_general_set.
5238 (handle_query): Report Qbtrace-conf:bts:size as supported.
5239
f4abbc16
MM
52402015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5241
5242 * linux-low.c (linux_low_enable_btrace): Update parameters.
5243 (linux_low_btrace_conf): New.
5244 (linux_target_ops)<to_btrace_conf>: Initialize.
5245 * server.c (current_btrace_conf): New.
5246 (handle_btrace_enable): Rename to ...
5247 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
5248 to target_enable_btrace. Update comment. Update users.
5249 (handle_qxfer_btrace_conf): New.
5250 (qxfer_packets): Add btrace-conf entry.
5251 (handle_query): Report qXfer:btrace-conf:read as supported packet.
5252 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
5253 (target_ops)<read_btrace_conf>: New.
5254 (target_enable_btrace): Update parameters.
5255 (target_read_btrace_conf): New.
5256
043c3577
MM
52572015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5258
5259 * server.c (handle_btrace_general_set): Remove call to
5260 target_supports_btrace.
5261 (supported_btrace_packets): New.
5262 (handle_query): Call supported_btrace_packets.
5263 * target.h: include btrace-common.h.
5264 (btrace_target_info): Removed.
5265 (supports_btrace, target_supports_btrace): Update parameters.
5266
734b0e4b
MM
52672015-02-09 Markus Metzger <markus.t.metzger@intel.com>
5268
5269 * Makefile.in (SFILES): Add common/btrace-common.c.
5270 (OBS): Add common/btrace-common.o.
5271 (btrace-common.o): Add build rules.
5272 * linux-low: Include btrace-common.h.
5273 (linux_low_read_btrace): Use struct btrace_data. Call
5274 btrace_data_init and btrace_data_fini.
5275
d6c146e9
PA
52762015-02-06 Pedro Alves <palves@redhat.com>
5277
5278 * thread-db.c (find_new_threads_callback): Add debug output.
5279
20ba1ce6
PA
52802015-02-04 Pedro Alves <palves@redhat.com>
5281
5282 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
5283 (resume_stopped_resumed_lwps): New function.
5284 (linux_wait_for_event_filtered): Use it.
5285
8cc73a39
SDJ
52862015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5287
5288 * Makefile.in (SFILES): Add linux-personality.c.
5289 (linux-personality.o): New rule.
5290 * configure.srv (srv_linux_obj): Add linux-personality.o to the
5291 list of objects to be built.
5292 * linux-low.c: Include nat/linux-personality.h.
5293 (linux_create_inferior): Remove code to disable address space
5294 randomization (moved to ../nat/linux-personality.c). Create
5295 cleanup to disable address space randomization.
5296
fb23d554
SDJ
52972015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
5298
5299 * Makefile.in (posix-strerror.o): New rule.
5300 (mingw-strerror.o): Likewise.
5301 * configure: Regenerated.
5302 * configure.ac: Source file ../common/common.host. Initialize new
5303 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
5304
cdf43629
YQ
53052015-01-14 Yao Qi <yao@codesourcery.com>
5306
5307 * Makefile.in (SFILES): Add nat/ppc-linux.c.
5308 (ppc-linux.o): New rule.
5309 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
5310 * configure.ac: AC_CHECK_FUNCS(getauxval).
5311 * config.in: Re-generated.
5312 * configure: Re-generated.
5313 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
5314 ppc64_64bit_inferior_p
5315
514c5338
YQ
53162015-01-14 Yao Qi <yao@codesourcery.com>
5317
5318 * linux-ppc-low.c: Include "nat/ppc-linux.h".
5319 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
5320 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
5321 (PT_ORIG_R3, PT_TRAP): Likewise.
5322 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
5323 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
5324 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
5325
3368c1e5
JB
53262015-01-10 Joel Brobecker <brobecker@adacore.com>
5327
5328 * i387-fp.c (i387_cache_to_xsave): In look over
5329 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
5330 zmmh_low_space field by use of zmmh_high_space.
5331
582511be
PA
53322015-01-09 Pedro Alves <palves@redhat.com>
5333
5334 * linux-low.c (step_over_bkpt): Move higher up in the file.
5335 (handle_extended_wait): Don't store the stop_pc here.
5336 (get_stop_pc): Adjust comments and rename to ...
5337 (check_stopped_by_breakpoint): ... this. Record whether the LWP
5338 stopped for a software breakpoint or hardware breakpoint.
5339 (thread_still_has_status_pending_p): New function.
5340 (status_pending_p_callback): Use
5341 thread_still_has_status_pending_p. If the event is no longer
5342 interesting, resume the LWP.
5343 (handle_tracepoints): Add assert.
5344 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
5345 (wstatus_maybe_breakpoint): New function.
5346 (cancel_breakpoint): Delete function.
5347 (check_stopped_by_watchpoint): New function, factored out from
5348 linux_low_filter_event.
5349 (lp_status_maybe_breakpoint): Delete function.
5350 (linux_low_filter_event): Remove filter_ptid argument.
5351 Leave thread group exits pending here. Store the LWP's stop PC.
5352 Always leave events pending.
5353 (linux_wait_for_event_filtered): Pull all events out of the
5354 kernel, and leave them all pending.
5355 (count_events_callback, select_event_lwp_callback): Consider all
5356 events.
5357 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
5358 (select_event_lwp): Only give preference to the stepping LWP in
5359 all-stop mode. Adjust comments.
5360 (ignore_event): New function.
5361 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
5362 references to cancel_breakpoints. Adjust to renames. Also give
5363 equal priority to all LWPs that have had events in non-stop mode.
5364 If reporting a software breakpoint event, unadjust the LWP's PC.
5365 (linux_wait): If linux_wait_1 returned an ignored event, retry.
5366 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
5367 Adjust.
5368 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
5369 (resume_status_pending_p): Use thread_still_has_status_pending_p.
5370 (linux_stopped_by_watchpoint): Adjust.
5371 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
5372 * linux-low.h (enum lwp_stop_reason): New.
5373 (struct lwp_info) <stop_pc>: Adjust comment.
5374 <stopped_by_watchpoint>: Delete field.
5375 <stop_reason>: New field.
5376 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
5377 * mem-break.c (software_breakpoint_inserted_here)
5378 (hardware_breakpoint_inserted_here): New function.
5379 * mem-break.h (software_breakpoint_inserted_here)
5380 (hardware_breakpoint_inserted_here): Declare.
5381 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
5382 (cancel_breakpoints): Delete.
5383 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
5384 (upload_fast_traceframes): Remove references to
5385 cancel_breakpoints.
5386
a33e3959
PA
53872015-01-09 Pedro Alves <palves@redhat.com>
5388
5389 * thread-db.c (find_new_threads_callback): Ignore thread if the
5390 kernel thread ID is -1.
5391
8784d563
PA
53922015-01-09 Pedro Alves <palves@redhat.com>
5393
5394 * linux-low.c (linux_attach_fail_reason_string): Move to
5395 nat/linux-ptrace.c, and rename.
5396 (linux_attach_lwp): Update comment.
5397 (attach_proc_task_lwp_callback): New function.
5398 (linux_attach): Adjust to rename and use
5399 linux_proc_attach_tgid_threads.
5400 (linux_attach_fail_reason_string): Delete declaration.
5401
76f2b779
JB
54022015-01-01 Joel Brobecker <brobecker@adacore.com>
5403
5404 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
5405 * server.c (gdbserver_version): Likewise.
5406
fafcc06a
SDJ
54072014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
5408
5409 * remote-utils.c: Include ctype.h.
5410 (input_interrupt): Explicitly handle the case when the char
5411 received is the NUL byte. Improve the printing of non-ASCII
5412 characters.
5413
beed38b8
JB
54142014-12-16 Joel Brobecker <brobecker@adacore.com>
5415
5416 * linux-low.c (linux_low_filter_event): Update call to
5417 linux_enable_event_reporting following the addition of
5418 a new parameter to that function.
5419
bf330350
CU
54202014-12-16 Catalin Udma <catalin.udma@freescale.com>
5421
5422 PR server/17457
5423 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
5424 (AARCH64_FPCR_REGNO): Likewise.
5425 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
5426 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
5427 (aarch64_store_fpregset): Likewise.
5428
5227d625
JB
54292014-12-15 Joel Brobecker <brobecker@adacore.com>
5430
5431 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
5432 Remove FIXME comment about assumption about N.
5433
f93b65a0
JB
54342014-12-13 Joel Brobecker <brobecker@adacore.com>
5435
5436 * configure.ac: If large-file support is disabled in GDBserver,
5437 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
5438 * configure: Regenerate.
5439
e5a9158d
AA
54402014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5441
5442 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
5443 warning upon ENODATA from ptrace.
5444 * linux-s390-low.c (s390_store_tdb): New.
5445 (s390_regsets): Add regset for NT_S390_TDB.
5446
feea5f36
AA
54472014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5448
5449 * linux-low.c (regsets_store_inferior_registers): Skip regsets
5450 without a fill_function.
5451 * linux-s390-low.c (s390_fill_last_break): Remove.
5452 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
5453 (s390_arch_setup): Use regset's size instead of fill_function for
5454 loop end condition.
5455
098dbe61
AA
54562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5457
5458 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
5459 the regset's store function when ptrace returned an error.
5460 * regcache.c (get_thread_regcache): Invalidate register cache
5461 before fetching inferior's registers.
5462
28eef672
AA
54632014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
5464
5465 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
5466 while-loop as for-loop.
5467 (regsets_store_inferior_registers): Likewise.
5468
bdca27a2
YQ
54692014-11-28 Yao Qi <yao@codesourcery.com>
5470
5471 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
5472 * config.in, configure: Re-generate.
5473 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
5474 is defined.
5475
9c232dda
YQ
54762014-11-21 Yao Qi <yao@codesourcery.com>
5477
5478 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
5479 (AC_CHECK_HEADERS): Remove malloc.h.
5480 * configure: Re-generated.
5481 * config.in: Re-generated.
5482 * server.h: Don't include alloca.h and malloc.h.
5483 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
5484 Don't include malloc.h.
5485
43968415
JB
54862014-11-17 Joel Brobecker <brobecker@adacore.com>
5487
5488 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
5489 corresponding ERRNO check in same block.
5490
40e91bc7
PA
54912014-11-12 Pedro Alves <palves@redhat.com>
5492
5493 * server.c (cont_thread): Update comment.
5494 (start_inferior, attach_inferior): No longer clear cont_thread.
5495 (handle_v_cont): No longer set cont_thread.
5496 (captured_main): Clear cont_thread each time a GDB connects.
5497
c2c118cf
PA
54982014-11-12 Pedro Alves <palves@redhat.com>
5499
5500 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
5501 thread, and don't resume all threads if the Hc thread has exited.
5502
78708b7c
PA
55032014-11-12 Pedro Alves <palves@redhat.com>
5504
5505 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
5506 the process group instead of to a specific LWP.
5507
a2abc7de
PA
55082014-10-15 Pedro Alves <palves@redhat.com>
5509
5510 PR server/17487
5511 * win32-arm-low.c (arm_set_thread_context): Remove current_event
5512 parameter.
5513 (arm_set_thread_context): Delete.
5514 (the_low_target): Adjust.
5515 * win32-i386-low.c (debug_registers_changed)
5516 (debug_registers_used): Delete.
5517 (update_debug_registers_callback): New function.
5518 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
5519 needing to update their debug registers.
5520 (win32_get_current_dr): New function.
5521 (x86_dr_low_get_addr, x86_dr_low_get_control)
5522 (x86_dr_low_get_status): Fetch the debug register from the thread
5523 record's context.
5524 (i386_initial_stuff): Adjust.
5525 (i386_get_thread_context): Remove current_event parameter. Don't
5526 clear debug_registers_changed nor copy DR values to
5527 debug_reg_state.
5528 (i386_set_thread_context): Delete.
5529 (i386_prepare_to_resume): New function.
5530 (i386_thread_added): Mark the thread as needing to update irs
5531 debug registers.
5532 (the_low_target): Remove i386_set_thread_context and install
5533 i386_prepare_to_resume.
5534 * win32-low.c (win32_get_thread_context): Adjust.
5535 (win32_set_thread_context): Use SetThreadContext
5536 directly.
5537 (win32_prepare_to_resume): New function.
5538 (win32_require_context): New function, factored out from ...
5539 (thread_rec): ... this.
5540 (continue_one_thread): Call win32_prepare_to_resume on each thread
5541 we're about to continue.
5542 (win32_resume): Call win32_prepare_to_resume on the event thread.
5543 * win32-low.h (struct win32_thread_info)
5544 <debug_registers_changed>: New field.
5545 (struct win32_target_ops): Change prototype of set_thread_context,
5546 delete set_thread_context and add prepare_to_resume.
5547 (win32_require_context): New declaration.
5548
a442d071
GB
55492014-10-08 Gary Benson <gbenson@redhat.com>
5550
5551 * server.h: Do not include common-exceptions.h.
5552
6f1947e8
GB
55532014-10-08 Gary Benson <gbenson@redhat.com>
5554
5555 * server.h: Do not include cleanups.h.
5556
63b434a4
JH
55572014-09-30 James Hogan <james.hogan@imgtec.com>
5558
5559 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
5560 mips64-dsp-linux.c.
5561
c4d9ceb6
YQ
55622014-09-23 Yao Qi <yao@codesourcery.com>
5563
5564 * linux-low.c (lp_status_maybe_breakpoint): New function.
5565 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
5566 (count_events_callback): Likewise.
5567 (select_event_lwp_callback): Likewise.
5568 (cancel_breakpoints_callback): Likewise.
5569
89a5711c
DB
55702014-09-19 Don Breazeal <donb@codesourcery.com>
5571
5572 * linux-low.c (handle_extended_wait): Call
5573 linux_ptrace_get_extended_event.
5574 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
5575 linux_is_extended_waitstatus.
5576
bffc0964
JB
55772014-09-16 Joel Brobecker <brobecker@adacore.com>
5578
5579 * Makefile.in (CPPFLAGS): Define.
5580 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
5581 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
5582
0bfdf32f
GB
55832014-09-16 Gary Benson <gbenson@redhat.com>
5584
5585 * inferiors.h (current_inferior): Renamed as...
5586 (current_thread): New variable. All uses updated.
5587 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
5588 (maybe_move_out_of_jump_pad): Likewise.
5589 (cancel_breakpoint): Likewise.
5590 (linux_low_filter_event): Likewise.
5591 (wait_for_sigstop): Likewise.
5592 (linux_resume_one_lwp): Likewise.
5593 (need_step_over_p): Likewise.
5594 (start_step_over): Likewise.
5595 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
5596 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
5597 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
5598 and save_inferior as saved_thread.
5599 * regcache.c (get_thread_regcache): Renamed saved_inferior as
5600 saved_thread.
5601 (regcache_invalidate_thread): Likewise.
5602 * remote-utils.c (prepare_resume_reply): Likewise.
5603 * thread-db.c (thread_db_get_tls_address): Likewise.
5604 (disable_thread_event_reporting): Likewise.
5605 (remove_thread_event_breakpoints): Likewise.
5606 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
5607 as saved_thread.
5608 * target.h (set_desired_inferior): Renamed as...
5609 (set_desired_thread): New declaration. All uses updated.
5610 * server.c (myresume): Updated comment to reference thread instead
5611 of inferior.
5612 (handle_serial_event): Likewise.
5613 (handle_target_event): Likewise.
5614
361c8ade
GB
56152014-09-12 Tom Tromey <tromey@redhat.com>
5616 Gary Benson <gbenson@redhat.com>
5617
5618 * regcache.h: Include common-regcache.h.
5619 (regcache_read_pc): Don't declare.
5620 * regcache.c (get_thread_regcache_for_ptid): New function.
5621
bd9269f7
GB
56222014-09-11 Tom Tromey <tromey@redhat.com>
5623 Gary Benson <gbenson@redhat.com>
5624
5625 * symbol.c: New file.
5626 * Makefile.in (SFILES): Add symbol.c.
5627 (OBS): Add symbol.o.
5628
f8c1d06b
GB
56292014-09-11 Gary Benson <gbenson@redhat.com>
5630
5631 * target.c (target_stop_ptid, target_continue_ptid): New
5632 functions.
5633
721ec300
GB
56342014-09-11 Tom Tromey <tromey@redhat.com>
5635 Gary Benson <gbenson@redhat.com>
5636
5637 * target.h: Include target/target.h.
5638 * target.c (target_read_memory, target_read_uint32)
5639 (target_write_memory): New functions.
5640
c5e92cca
GB
56412014-09-11 Gary Benson <gbenson@redhat.com>
5642
5643 * server.h (debug_hw_points): Don't declare.
5644 * server.c (debug_hw_points): Don't define. Replace all uses
5645 with show_debug_regs.
5646 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
5647 all uses with show_debug_regs.
5648
2e4bb98a
EBM
56492014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
5650
5651 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
5652 endianness into account.
5653 (ppc_supply_ptrace_register): Likewise.
5654
ac740bc7
JH
56552014-09-03 James Hogan <james.hogan@imgtec.com>
5656
5657 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
5658 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
5659
97ea6506
GB
56602014-09-03 Gary Benson <gbenson@redhat.com>
5661
5662 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
5663 ALL_DEBUG_ADDRESS_REGISTERS.
5664
df7e5265
GB
56652014-09-02 Gary Benson <gbenson@redhat.com>
5666
5667 * i386-low.h: Renamed as...
5668 * x86-low.h: New file. All type, function and variable name
5669 prefixes changed from "i386_" to "x86_". All references updated.
5670 * i386-low.c: Renamed as...
5671 * x86-low.c: New file. All type, function and variable name
5672 prefixes changed from "i386_" to "x86_". All references updated.
5673
ed859da7
GB
56742014-09-02 Gary Benson <gbenson@redhat.com>
5675
5676 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
5677 (x86_linux_new_thread): Likewise.
5678
860789c7
GB
56792014-08-29 Gary Benson <gbenson@redhat.com>
5680
5681 * server.h (setjmp.h): Do not include.
5682 (toplevel): Do not declare.
5683 (common-exceptions.h): Include.
5684 (cleanups.h): Likewise.
5685 * server.c (toplevel): Do not define.
5686 (exit_code): New static global.
5687 (detach_or_kill_for_exit_cleanup): New function.
5688 (main): New function. Original main renamed to...
5689 (captured_main): New function.
5690 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
5691
ff55e1b5
GB
56922014-08-29 Gary Benson <gbenson@redhat.com>
5693
5694 * Makefile.in (SFILES): Add common/common-exceptions.c.
5695 (OBS): Add common-exceptions.o.
5696 (common-exceptions.o): New rule.
5697 * utils.c (prepare_to_throw_exception): New function.
5698
e9bcb658
GB
56992014-08-29 Gary Benson <gbenson@redhat.com>
5700
5701 * config.in: Regenerate.
5702 * configure: Likewise.
5703
e3180625
GB
57042014-08-29 Gary Benson <gbenson@redhat.com>
5705
5706 * Makefile.in (SFILES): Add common/cleanups.c.
5707 (OBS): cleanups.o.
5708 (cleanups.o): New rule.
5709
e3d6ba5d
GB
57102014-08-29 Gary Benson <gbenson@redhat.com>
5711
5712 * utils.c (internal_vwarning): New function.
5713
7096e886
GB
57142014-08-28 Gary Benson <gbenson@redhat.com>
5715
5716 * utils.h (fatal): Remove declaration.
5717 * utils.c (fatal): Remove function.
5718
14ce3192
GB
57192014-08-28 Gary Benson <gbenson@redhat.com>
5720
5721 * tracepoint.c (gdb_agent_init): Replace fatal with
5722 perror_with_name.
5723 (initialize_tracepoint): Likewise.
5724
50278d59
GB
57252014-08-28 Gary Benson <gbenson@redhat.com>
5726
5727 * remote-utils.c (remote_prepare): Replace fatal with error.
5728
aa96c426
GB
57292014-08-28 Gary Benson <gbenson@redhat.com>
5730
5731 * linux-low.c (linux_async): Replace fatal with warning.
5732 Tidy up and return.
5733 (linux_start_non_stop): Return -1 if linux_async failed.
5734
f7160e97
GB
57352014-08-28 Gary Benson <gbenson@redhat.com>
5736
5737 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
5738 gdb_assert.
5739 (i386_dr_low_get_addr): Remove vague comment.
5740 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
5741 gdb_assert.
5742
38e08fca
GB
57432014-08-28 Gary Benson <gbenson@redhat.com>
5744
5745 * inferiors.c (get_thread_process): Replace check with gdb_assert.
5746 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
5747 internal_error.
5748 (linux_resume_one_lwp): Likewise.
5749 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
5750 gdb_assert.
5751 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
5752 with internal_error.
5753 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
5754 (init_register_cache): Replace fatal with gdb_assert_not_reached.
5755 (find_register_by_name): Replace fatal with internal_error.
5756 (find_regno): Likewise.
5757 * tdesc.c (init_target_desc): Replace check with gdb_assert.
5758 * thread-db.c (thread_db_create_event): Likewise.
5759 (thread_db_load_search): Likewise.
5760 (try_thread_db_load_1): Likewise.
5761 * tracepoint.c (get_jump_space_head): Replace fatal with
5762 internal_error.
5763 (claim_trampoline_space): Likewise.
5764 (have_fast_tracepoint_trampoline_buffer): Likewise.
5765 (cmd_qtstart): Likewise.
5766 (stop_tracing): Likewise.
5767 (fast_tracepoint_collecting): Likewise.
5768 (target_malloc): Likewise.
5769 (download_tracepoint): Likewise.
5770 (download_trace_state_variables): Replace check with gdb_assert.
5771 (upload_fast_traceframes): Replace fatal with internal_error.
5772
34abf635
GB
57732014-08-19 Tom Tromey <tromey@redhat.com>
5774 Gary Benson <gbenson@redhat.com>
5775
5776 * Makefile.in (SFILES): Add common/common-debug.c.
5777 (OBS): Add common-debug.o.
5778 (common-debug.o): New rule.
5779 * debug.h (debug_printf): Don't declare.
5780 * debug.c (debug_printf): Renamed and rewritten as...
5781 (debug_vprintf): New function.
5782
f6e94d78
GB
57832014-08-19 Gary Benson <gbenson@redhat.com>
5784
5785 * utils.h: Do not include print-utils.h.
5786
9239eeab
GB
57872014-08-19 Tom Tromey <tromey@redhat.com>
5788 Gary Benson <gbenson@redhat.com>
5789
5790 * server.h: Add static assertion.
5791 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
5792
ef87c8bb
GB
57932014-08-19 Tom Tromey <tromey@redhat.com>
5794 Gary Benson <gbenson@redhat.com>
5795
5796 * Makefile.in (SFILES): Add common/errors.c.
5797 (OBS): Add errors.o.
5798 (IPA_OBS): Add errors-ipa.o.
5799 (errors.o): New rule.
5800 (errors-ipa.o): Likewise.
5801 * utils.h (perror_with_name, error, warning): Don't declare.
5802 * utils.c (warning): Renamed and rewritten as...
5803 (vwarning): New function.
5804 (error): Renamed and rewritten as...
5805 (verror): New function.
5806 (internal_error): Renamed and rewritten as...
5807 (internal_verror): New function.
5808
bb974a24
GB
58092014-08-07 Gary Benson <gbenson@redhat.com>
5810
5811 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
5812 * configure: Regenerate.
5813 * config.in: Likewise.
5814 * server.h: Do not include errno.h.
5815 * event-loop.c: Likewise.
5816 * hostio-errno.c: Likewise.
5817 * linux-low.c: Likewise.
5818 * remote-utils.c: Likewise.
5819 * spu-low.c: Likewise.
5820 * utils.c: Likewise.
5821 * gdbreplay.c: Unconditionally include errno.h.
5822
6d3d12eb
GB
58232014-08-07 Gary Benson <gbenson@redhat.com>
5824
5825 * server.h: Do not include string.h.
5826 * event-loop.c: Likewise.
5827 * linux-low.c: Likewise.
5828 * regcache.c: Likewise.
5829 * remote-utils.c: Likewise.
5830 * spu-low.c: Likewise.
5831 * utils.c: Likewise.
5832
dccbb609
GB
58332014-08-07 Gary Benson <gbenson@redhat.com>
5834
5835 * server.h: Do not include gdb_assert.h.
5836
e76df0d0
GB
58372014-08-07 Gary Benson <gbenson@redhat.com>
5838
5839 * server.h: Do not include common-utils.h.
5840
4cb9c816
GB
58412014-08-07 Gary Benson <gbenson@redhat.com>
5842
5843 * server.h: Do not include ptid.h.
5844 * notif.h: Likewise.
5845
3995eeee
GB
58462014-08-07 Gary Benson <gbenson@redhat.com>
5847
5848 * server.h: Do not include gdb_locale.h.
5849
cb9f1a9b
GB
58502014-08-07 Gary Benson <gbenson@redhat.com>
5851
5852 * server.h: Do not include gdb/signals.h.
5853 * win32-low.c: Likewise.
5854
a5fceff8
GB
58552014-08-07 Gary Benson <gbenson@redhat.com>
5856
5857 * server.h: Do not include pathmax.h.
5858
b9391142
GB
58592014-08-07 Gary Benson <gbenson@redhat.com>
5860
5861 * server.h: Do not include libiberty.h.
5862 * linux-bfin-low.c: Likewise.
5863
0e443c87
GB
58642014-08-07 Gary Benson <gbenson@redhat.com>
5865
5866 * server.h: Do not include ansidecl.h.
5867
8ebb3f56
GB
58682014-08-07 Gary Benson <gbenson@redhat.com>
5869
5870 * linux-x86-low.c: Do not include stddef.h.
5871 * lynx-ppc-low.c: Likewise.
5872 * tracepoint.c: Likewise.
5873
8980bdf6
GB
58742014-08-07 Gary Benson <gbenson@redhat.com>
5875
5876 * server.h: Do not include stdarg.h.
5877 * nto-low.c: Likewise.
5878
d7096f71
GB
58792014-08-07 Gary Benson <gbenson@redhat.com>
5880
5881 * server.h: Do not include stdlib.h.
5882 * inferiors.c: Likewise.
5883 * linux-low.c: Likewise.
5884 * regcache.c: Likewise.
5885 * spu-low.c: Likewise.
5886 * tracepoint.c: Likewise.
5887 * utils.c: Likewise.
5888
d02f550d
GB
58892014-08-07 Gary Benson <gbenson@redhat.com>
5890
5891 * server.h: Do not include stdio.h.
5892 * linux-low.c: Likewise.
5893 * remote-utils.c: Likewise.
5894 * spu-low.c: Likewise.
5895 * utils.c: Likewise.
5896 * wincecompat.c: Likewise.
5897
87f6c4e3
GB
58982014-08-06 Gary Benson <gbenson@redhat.com>
5899
5900 * regcache.c (init_register_cache): Move conditionals inside if.
5901
7089dca4
GB
59022014-08-06 Gary Benson <gbenson@redhat.com>
5903
5904 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
5905
462f517e
GB
59062014-07-31 Gary Benson <gbenson@redhat.com>
5907
5908 * ax.h: Do not include server.h.
5909 * gdbthread.h: Likewise.
5910 * lynx-low.h: Likewise.
5911 * notif.h: Likewise.
5912
976411d6
GB
59132014-07-30 Gary Benson <gbenson@redhat.com>
5914
5915 * server.h: Include common-defs.h.
5916 Do not include config.h or build-gnulib-gdbserver/config.h.
5917
d41f6d8e
GB
59182014-07-30 Gary Benson <gbenson@redhat.com>
5919
5920 * hostio-errno.c: Move server.h to top of includes list.
5921 * inferiors.c: Likewise.
5922 * linux-x86-low.c: Likewise.
5923 * notif.c: Include server.h.
5924
314c6a35
TT
59252014-07-24 Tom Tromey <tromey@redhat.com>
5926 Gary Benson <gbenson@redhat.com>
5927
5928 * server.h (CORE_ADDR): Now unsigned.
5929
69ff6be5
PA
59302014-07-16 Pedro Alves <palves@redhat.com>
5931
5932 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5933
ce9e3fe7
PA
59342014-07-15 Pedro Alves <palves@redhat.com>
5935
5936 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5937 copy.
5938
e76126e8
PA
59392014-07-11 Pedro Alves <palves@redhat.com>
5940
5941 * linux-low.c (kill_wait_lwp): New function, based on
5942 kill_one_lwp_callback, but use my_waitpid directly.
5943 (kill_one_lwp_callback, linux_kill): Use it.
5944
8e9db26e
PA
59452014-06-23 Pedro Alves <palves@redhat.com>
5946
5947 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5948 before setting DR0..DR3.
5949
698b3e08
GB
59502014-06-20 Gary Benson <gbenson@redhat.com>
5951
5952 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5953 * configure: Regenerated.
5954 * config.in: Likewise.
5955
125f8a3d
GB
59562014-06-20 Gary Benson <gbenson@redhat.com>
5957
5958 * Makefile.in (SFILES): Update locations for files moved
5959 from common to nat.
5960 (object file files): Reordered.
5961
42995dbd
GB
59622014-06-20 Gary Benson <gbenson@redhat.com>
5963
5964 * i386-low.h (i386_dr_low_can_set_addr): Removed.
5965 (i386_dr_low_set_addr): Likewise.
5966 (i386_dr_low_get_addr): Likewise.
5967 (i386_dr_low_can_set_control): Likewise.
5968 (i386_dr_low_set_control): Likewise.
5969 (i386_dr_low_get_control): Likewise.
5970 (i386_dr_low_get_status): Likewise.
5971 (i386_get_debug_register_length): Likewise.
5972 * linux-x86-low.c (i386_dr_low_set_addr):
5973 Changed signature. Made static.
5974 (i386_dr_low_get_addr): Likewise.
5975 (i386_dr_low_set_control): Likewise.
5976 (i386_dr_low_get_control): Likewise.
5977 (i386_dr_low_get_status): Likewise.
5978 (i386_dr_low): New global variable.
5979 * win32-i386-low.c (i386_dr_low_set_addr):
5980 Changed signature. Made static.
5981 (i386_dr_low_get_addr): Likewise.
5982 (i386_dr_low_set_control): Likewise.
5983 (i386_dr_low_get_control): Likewise.
5984 (i386_dr_low_get_status): Likewise.
5985 (i386_dr_low): New global variable.
5986
e1d2394b
MS
59872014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
5988
5989 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5990 * Makefile.in (AR, AR_FLAGS): Define.
5991 * configure: Regenerate.
5992
3a8ee006
GB
59932014-06-19 Gary Benson <gbenson@redhat.com>
5994
5995 * Makefile.in (i386-dregs.o): New rule.
5996 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5997 * i386-low.c (target.h): Remove include.
5998 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5999 (DR_CONTROL_SHIFT): Likewise.
6000 (DR_CONTROL_SIZE): Likewise.
6001 (DR_RW_EXECUTE): Likewise.
6002 (DR_RW_WRITE): Likewise.
6003 (DR_RW_READ): Likewise.
6004 (DR_RW_IORW): Likewise.
6005 (DR_LEN_1): Likewise.
6006 (DR_LEN_2): Likewise.
6007 (DR_LEN_4): Likewise.
6008 (DR_LEN_8): Likewise.
6009 (DR_LOCAL_ENABLE_SHIFT): Likewise.
6010 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
6011 (DR_ENABLE_SIZE): Likewise.
6012 (DR_LOCAL_SLOWDOWN): Likewise.
6013 (DR_GLOBAL_SLOWDOWN): Likewise.
6014 (DR_CONTROL_RESERVED): Likewise.
6015 (I386_DR_CONTROL_MASK): Likewise.
6016 (I386_DR_VACANT): Likewise.
6017 (I386_DR_LOCAL_ENABLE): Likewise.
6018 (I386_DR_GLOBAL_ENABLE): Likewise.
6019 (I386_DR_DISABLE): Likewise.
6020 (I386_DR_SET_RW_LEN): Likewise.
6021 (I386_DR_GET_RW_LEN): Likewise.
6022 (I386_DR_WATCH_HIT): Likewise.
6023 (i386_wp_op_t): Likewise.
6024 (i386_show_dr): Likewise.
6025 (i386_length_and_rw_bits): Likewise.
6026 (i386_insert_aligned_watchpoint): Likewise.
6027 (i386_remove_aligned_watchpoint): Likewise.
6028 (i386_handle_nonaligned_watchpoint): Likewise.
6029 i386_update_inferior_debug_regs(): Likewise.
6030 (i386_dr_insert_watchpoint): Likewise.
6031 (i386_dr_remove_watchpoint): Likewise.
6032 (i386_dr_region_ok_for_watchpoint): Likewise.
6033 (i386_dr_stopped_data_address): Likewise.
6034 (i386_dr_stopped_by_watchpoint): Likewise.
6035
8f26655c
GB
60362014-06-19 Gary Benson <gbenson@redhat.com>
6037
6038 * i386-low.c (i386_dr_show): Renamed to
6039 i386_show_dr and made static. All uses updated.
6040 (i386_dr_length_and_rw_bits): Renamed to
6041 i386_length_and_rw_bits and made static.
6042 All uses updated.
6043 (i386_dr_insert_aligned_watchpoint): Renamed to
6044 i386_insert_aligned_watchpoint and made static.
6045 All uses updated.
6046 (i386_dr_remove_aligned_watchpoint): Renamed to
6047 i386_remove_aligned_watchpoint and made static.
6048 All uses updated.
6049 (i386_dr_update_inferior_debug_regs): Renamed to
6050 i386_update_inferior_debug_regs and made static.
6051 All uses updated.
6052
b9228891
GB
60532014-06-18 Gary Benson <gbenson@redhat.com>
6054
5171def3
GB
6055 * i386-low.h (i386_dr_low_can_set_addr): New macro.
6056 (i386_dr_low_can_set_control): Likewise.
6057 (i386_get_debug_register_length): Likewise.
6058 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
6059 (i386_dr_low_can_set_control): Likewise.
6060 (i386_get_debug_register_length): Likewise.
6061
60622014-06-17 Gary Benson <gbenson@redhat.com>
6063
b9228891
GB
6064 * i386-low.h (i386-dregs.h): New include.
6065 (DR_FIRSTADDR): Now in i386-dregs.h.
6066 (DR_LASTADDR): Likewise.
6067 (DR_NADDR): Likewise.
6068 (DR_STATUS): Likewise.
6069 (DR_CONTROL): Likewise.
6070 (i386_debug_reg_state): Likewise.
6071 (i386_dr_insert_watchpoint): Likewise.
6072 (i386_dr_remove_watchpoint): Likewise.
6073 (i386_dr_region_ok_for_watchpoint): Likewise.
6074 (i386_dr_stopped_data_address): Likewise.
6075 (i386_dr_stopped_by_watchpoint): Likewise.
6076 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
6077
4be83cc2
GB
60782014-06-18 Gary Benson <gbenson@redhat.com>
6079
6080 * i386-low.h (i386_low_insert_watchpoint): Renamed to
6081 i386_dr_insert_watchpoint.
6082 (i386_low_remove_watchpoint): Renamed to
6083 i386_dr_remove_watchpoint.
6084 (i386_low_region_ok_for_watchpoint): Renamed to
6085 i386_dr_region_ok_for_watchpoint.
6086 (i386_low_stopped_data_address): Renamed to
6087 i386_dr_stopped_data_address.
6088 (i386_low_stopped_by_watchpoint): Renamed to
6089 i386_dr_stopped_by_watchpoint.
6090 * i386-low.c (i386_show_dr): Renamed to
6091 i386_dr_show and made nonstatic. All uses updated.
6092 (i386_length_and_rw_bits): Renamed to
6093 i386_dr_length_and_rw_bits and made nonstatic.
6094 All uses updated.
6095 (i386_insert_aligned_watchpoint): Renamed to
6096 i386_dr_insert_aligned_watchpoint and made nonstatic.
6097 All uses updated.
6098 (i386_remove_aligned_watchpoint): Renamed to
6099 i386_dr_remove_aligned_watchpoint and made nonstatic.
6100 All uses updated.
6101 (i386_update_inferior_debug_regs): Renamed to
6102 i386_dr_update_inferior_debug_regs and made nonstatic.
6103 All uses updated.
6104 (i386_low_insert_watchpoint): Renamed to
6105 i386_dr_insert_watchpoint. All uses updated.
6106 (i386_low_remove_watchpoint): Renamed to
6107 i386_dr_remove_watchpoint. All uses updated.
6108 (i386_low_region_ok_for_watchpoint): Renamed to
6109 i386_dr_region_ok_for_watchpoint. All uses updated.
6110 (i386_low_stopped_data_address): Renamed to
6111 i386_dr_stopped_data_address. All uses updated.
6112 (i386_low_stopped_by_watchpoint): Renamed to
6113 i386_dr_stopped_by_watchpoint. All uses updated.
6114
131aa0d4
GB
61152014-06-18 Gary Benson <gbenson@redhat.com>
6116
6117 * i386-low.c (i386_dr_low_can_set_addr): New macro.
6118 (i386_dr_low_can_set_control): Likewise.
6119 (i386_insert_aligned_watchpoint): New check.
6120
d9305f7f
GB
61212014-06-18 Gary Benson <gbenson@redhat.com>
6122
6123 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
6124 Renamed to state.
6125
e927c9fc
GB
61262014-06-18 Gary Benson <gbenson@redhat.com>
6127
6128 * i386-low.c (i386_length_and_rw_bits): Use internal_error
6129 instead of fatal and error.
6130 (i386_handle_nonaligned_watchpoint): Likewise.
6131
1b6d4134
GB
61322014-06-18 Gary Benson <gbenson@redhat.com>
6133
6134 * i386-low.c (i386_get_debug_register_length): New macro.
6135 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
6136 (i386_show_dr): Use debug_printf instead of fprintf. Use
6137 phex to format values.
6138
6e62758f
GB
61392014-06-18 Gary Benson <gbenson@redhat.com>
6140
6141 * i386-low.h: Comment changes.
6142 * i386-low.c: Likewise.
6143
fc6e2f03
GB
61442014-06-18 Gary Benson <gbenson@redhat.com>
6145
6146 * i386-low.c: Whitespace changes.
6147
f9d1eeed
TT
61482014-06-12 Tom Tromey <tromey@redhat.com>
6149
6150 * utils.c (freeargv): Remove.
6151
0b04e523
TT
61522014-06-12 Tom Tromey <tromey@redhat.com>
6153
6154 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
6155 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
6156 (parse_debug_format_options): Likewise.
6157 (gdbserver_usage): Likewise.
6158 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
6159 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
6160 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
6161 against libiberty.
6162 ($(LIBGNU)): Depend on libiberty.
6163 (all-lib): Recurse into all subdirs.
6164 (install-only): Invoke "install" target in subdirs.
6165 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
6166 targets.
6167 * configure: Rebuild.
6168 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
6169 for vasprintf, vsnprintf, or gettimeofday.
6170 * configure.srv: Don't add safe-ctype.o or lbasename.o to
6171 srv_tgtobj.
6172
270c9937
JB
61732014-06-05 Joel Brobecker <brobecker@adacore.com>
6174
6175 * development.sh: Delete.
6176 * Makefile.in (config.status): Adjust dependency on development.sh.
6177 * configure.ac: Adjust development.sh source call.
6178 * configure: Regenerate.
6179
0a261ed8
PA
61802014-06-02 Pedro Alves <palves@redhat.com>
6181
6182 * ax.c (gdb_free_agent_expr): New function.
6183 * ax.h (gdb_free_agent_expr): New declaration.
6184 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
6185 list.
6186 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
6187 static.
6188 (clear_breakpoint_conditions_and_commands): New function.
6189 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
6190 (clear_breakpoint_conditions_and_commands): New declaration.
6191
e9dae05e
RR
61922014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
6193
6194 * linux-aarch64-low.c (asm/ptrace.h): Include.
6195
5876f503
JK
61962014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
6197
6198 Fix TLS access for -static -pthread.
6199 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
6200 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
6201 (thread_db_load_search, try_thread_db_load_1): Initialize it.
6202
802e8e6d
PA
62032014-05-20 Pedro Alves <palves@redhat.com>
6204
6205 * linux-aarch64-low.c (aarch64_insert_point)
6206 (aarch64_remove_point): No longer check whether the type is
6207 supported here. Adjust to new interface.
6208 (the_low_target): Install aarch64_supports_z_point_type as
6209 supports_z_point_type method.
6210 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
6211 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
6212 instead of a Z packet char. Adjust.
6213 (arm_supports_z_point_type): New function.
6214 (arm_insert_point, arm_remove_point): Adjust to new interface.
6215 (the_low_target): Install arm_supports_z_point_type.
6216 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
6217 (cris_insert_point, cris_remove_point): Adjust to new interface.
6218 Don't check whether the type is supported here.
6219 (the_low_target): Install cris_supports_z_point_type.
6220 * linux-low.c (linux_supports_z_point_type): New function.
6221 (linux_insert_point, linux_remove_point): Adjust to new interface.
6222 * linux-low.h (struct linux_target_ops) <insert_point,
6223 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
6224 raw_breakpoint pointer parameter.
6225 <supports_z_point_type>: New method.
6226 * linux-mips-low.c (mips_supports_z_point_type): New function.
6227 (mips_insert_point, mips_remove_point): Adjust to new interface.
6228 Use mips_supports_z_point_type.
6229 (the_low_target): Install mips_supports_z_point_type.
6230 * linux-ppc-low.c (the_low_target): Install NULL as
6231 supports_z_point_type method.
6232 * linux-s390-low.c (the_low_target): Install NULL as
6233 supports_z_point_type method.
6234 * linux-sparc-low.c (the_low_target): Install NULL as
6235 supports_z_point_type method.
6236 * linux-x86-low.c (x86_supports_z_point_type): New function.
6237 (x86_insert_point): Adjust to new insert_point interface. Use
6238 insert_memory_breakpoint. Adjust to new
6239 i386_low_insert_watchpoint interface.
6240 (x86_remove_point): Adjust to remove_point interface. Use
6241 remove_memory_breakpoint. Adjust to new
6242 i386_low_remove_watchpoint interface.
6243 (the_low_target): Install x86_supports_z_point_type.
6244 * lynx-low.c (lynx_target_ops): Install NULL as
6245 supports_z_point_type callback.
6246 * nto-low.c (nto_supports_z_point_type): New.
6247 (nto_insert_point, nto_remove_point): Adjust to new interface.
6248 (nto_target_ops): Install nto_supports_z_point_type.
6249 * mem-break.c: Adjust intro comment.
6250 (struct raw_breakpoint) <raw_type, size>: New fields.
6251 <inserted>: Update comment.
6252 <shlib_disabled>: Delete field.
6253 (enum bkpt_type) <gdb_breakpoint>: Delete value.
6254 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
6255 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
6256 (raw_bkpt_type_to_target_hw_bp_type): New function.
6257 (find_enabled_raw_code_breakpoint_at): New function.
6258 (find_raw_breakpoint_at): New type and size parameters. Use them.
6259 (insert_memory_breakpoint): New function, based off
6260 set_raw_breakpoint_at.
6261 (remove_memory_breakpoint): New function.
6262 (set_raw_breakpoint_at): Reimplement.
6263 (set_breakpoint): New, based on set_breakpoint_at.
6264 (set_breakpoint_at): Reimplement.
6265 (delete_raw_breakpoint): Go through the_target->remove_point
6266 instead of assuming memory breakpoints.
6267 (find_gdb_breakpoint_at): Delete.
6268 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
6269 (find_gdb_breakpoint): New function.
6270 (set_gdb_breakpoint_at): Delete.
6271 (z_type_supported): New function.
6272 (set_gdb_breakpoint_1): New function, loosely based off
6273 set_gdb_breakpoint_at.
6274 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
6275 (delete_gdb_breakpoint_at): Delete.
6276 (delete_gdb_breakpoint_1): New function, loosely based off
6277 delete_gdb_breakpoint_at.
6278 (delete_gdb_breakpoint): New function.
6279 (clear_gdb_breakpoint_conditions): Rename to ...
6280 (clear_breakpoint_conditions): ... this. Don't handle a NULL
6281 breakpoint.
6282 (add_condition_to_breakpoint): Make static.
6283 (add_breakpoint_condition): Take a struct breakpoint pointer
6284 instead of an address. Adjust.
6285 (gdb_condition_true_at_breakpoint): Rename to ...
6286 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
6287 z_type parameter.
6288 (gdb_condition_true_at_breakpoint): Reimplement.
6289 (add_breakpoint_commands): Take a struct breakpoint pointer
6290 instead of an address. Adjust.
6291 (gdb_no_commands_at_breakpoint): Rename to ...
6292 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
6293 parameter. Return true if no breakpoint was found. Change debug
6294 output.
6295 (gdb_no_commands_at_breakpoint): Reimplement.
6296 (run_breakpoint_commands): Rename to ...
6297 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
6298 and change return type to boolean.
6299 (run_breakpoint_commands): New function.
6300 (gdb_breakpoint_here): Also check for Z1 breakpoints.
6301 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
6302 breakpoint. Go through the_target->remove_point instead of
6303 assuming memory breakpoint.
6304 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
6305 software and hardware breakpoints.
6306 (reinsert_raw_breakpoint): Go through the_target->insert_point
6307 instead of assuming memory breakpoint.
6308 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
6309 software and hardware breakpoints.
6310 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
6311 Check both software and hardware breakpoints.
6312 (validate_inserted_breakpoint): Assert the breakpoint is a
6313 software breakpoint. Set the inserted flag to -1 instead of
6314 setting shlib_disabled.
6315 (delete_disabled_breakpoints): Adjust.
6316 (validate_breakpoints): Only validate software breakpoints.
6317 Adjust to inserted flag change.
6318 (check_mem_read, check_mem_write): Skip breakpoint types other
6319 than software breakpoints. Adjust to inserted flag change.
6320 * mem-break.h (enum raw_bkpt_type): New enum.
6321 (raw_breakpoint, struct process_info): Forward declare.
6322 (Z_packet_to_target_hw_bp_type): Delete declaration.
6323 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
6324 (set_gdb_breakpoint, delete_gdb_breakpoint)
6325 (clear_breakpoint_conditions): New declarations.
6326 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
6327 (breakpoint_inserted_here): Update comment.
6328 (add_breakpoint_condition, add_breakpoint_commands): Replace
6329 address parameter with a breakpoint pointer parameter.
6330 (gdb_breakpoint_here): Update comment.
6331 (delete_gdb_breakpoint_at): Delete.
6332 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
6333 * server.c (process_point_options): Take a struct breakpoint
6334 pointer instead of an address. Adjust.
6335 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
6336 delete_gdb_breakpoint.
6337 * spu-low.c (spu_target_ops): Install NULL as
6338 supports_z_point_type method.
6339 * target.h: Include mem-break.h.
6340 (struct target_ops) <prepare_to_access_memory>: Update comment.
6341 <supports_z_point_type>: New field.
6342 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6343 instead of a char. Also take a raw breakpoint pointer.
6344 * win32-arm-low.c (the_low_target): Install NULL as
6345 supports_z_point_type.
6346 * win32-i386-low.c (i386_supports_z_point_type): New function.
6347 (i386_insert_point, i386_remove_point): Adjust to new interface.
6348 (the_low_target): Install i386_supports_z_point_type.
6349 * win32-low.c (win32_supports_z_point_type): New function.
6350 (win32_insert_point, win32_remove_point): Adjust to new interface.
6351 (win32_target_ops): Install win32_supports_z_point_type.
6352 * win32-low.h (struct win32_target_ops):
6353 <supports_z_point_type>: New method.
6354 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
6355 instead of a char. Also take a raw breakpoint pointer.
6356
932539e3
PA
63572014-05-20 Pedro Alves <palves@redhat.com>
6358
6359 * mem-break.h: Include break-common.h.
6360 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6361 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
6362 (Z_packet_to_target_hw_bp_type): New declaration.
6363 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
6364 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
6365 (Z_PACKET_ACCESS_WP): Delete macros.
6366 (Z_packet_to_hw_type): Delete function.
6367 * i386-low.h: Don't include break-common.h here.
6368 (Z_packet_to_hw_type): Delete declaration.
6369 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
6370 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6371 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
6372 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
6373 * linux-aarch64-low.c: Don't include break-common.h here.
6374 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
6375 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
6376 (Z_packet_to_target_hw_bp_type): Delete function.
6377 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
6378 function.
6379 (mips_insert_point, mips_remove_point): Use
6380 Z_packet_to_target_hw_bp_type.
6381
4ff0d3d8
PA
63822014-05-20 Pedro Alves <palves@redhat.com>
6383
6384 * linux-aarch64-low.c: Include break-common.h.
6385 (enum target_point_type): Delete.
6386 (Z_packet_to_point_type): Rename to ...
6387 (Z_packet_to_target_hw_bp_type): ... this, and return a
6388 target_hw_bp_type instead.
6389 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
6390 instead of an enum target_point_type.
6391 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
6392 breakpoint type.
6393 (aarch64_dr_state_insert_one_point)
6394 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
6395 (aarch64_handle_aligned_watchpoint)
6396 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
6397 Take an enum target_hw_bp_type instead of an enum
6398 target_point_type.
6399 (aarch64_supports_z_point_type): New function.
6400 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
6401 use Z_packet_to_target_hw_bp_type.
6402
786dc519
JB
64032014-05-20 Joel Brobecker <brobecker@adacore.com>
6404
6405 * configure.ac: Only use -Werror by default when DEVELOPMENT
6406 is true.
6407 * configure: Regenerate.
6408
9e0aa64f
JK
64092014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
6410
6411 Fix gdbserver qGetTLSAddr for x86_64 -m32.
6412 * linux-x86-low.c (X86_64_USER_REGS): New.
6413 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
6414
2b577b92
YQ
64152014-04-28 Yao Qi <yao@codesourcery.com>
6416
6417 * Makefile.in (i386-avx512.c): Fix the typo of generated file
6418 name.
6419
94611da2
PA
64202014-04-25 Pedro Alves <palves@redhat.com>
6421
6422 PR server/16255
6423 * linux-low.c (linux_attach_fail_reason_string): New function.
6424 (linux_attach_lwp): Delete.
6425 (linux_attach_lwp_1): Rename to ...
6426 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
6427 argument. Remove "initial" parameter. Return int instead of
6428 void. Don't error or warn here.
6429 (linux_attach): Adjust to call linux_attach_lwp. Call error on
6430 failure to attach to the tgid. Call warning when failing to
6431 attach to an lwp.
6432 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
6433 argument. Remove "initial" parameter. Return int instead of
6434 void. Don't error or warn here.
6435 (linux_attach_fail_reason_string): New declaration.
6436 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
6437 interface change. Use linux_attach_fail_reason_string.
6438
01f9f808
MS
64392014-04-24 Michael Sturm <michael.sturm@mintel.com>
6440 Walfred Tedeschi <walfred.tedeschi@intel.com>
6441
6442 * Makefile.in: Added rules to handle new files
6443 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
6444 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
6445 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
6446 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
6447 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
6448 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
6449 x32-avx512-linux.o.
6450 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
6451 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
6452 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
6453 i386/x32-avx512.xml.
6454 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
6455 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
6456 i386/x32-avx512-linux.xml.
6457 * i387-fp.c (num_avx512_k_registers): New constant for number
6458 of K registers.
6459 (num_avx512_zmmh_low_registers): New constant for number of
6460 lower ZMM registers (0-15).
6461 (num_avx512_zmmh_high_registers): New constant for number of
6462 higher ZMM registers (16-31).
6463 (num_avx512_ymmh_registers): New contant for number of higher
6464 YMM registers (ymm16-31 added by avx521 on x86_64).
6465 (num_avx512_xmm_registers): New constant for number of higher
6466 XMM registers (xmm16-31 added by AVX512 on x86_64).
6467 (struct i387_xsave): Add space for AVX512 registers.
6468 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
6469 Add code to handle AVX512 registers.
6470 (i387_xsave_to_cache): Add code to handle AVX512 registers.
6471 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
6472 prototypei from generated file.
6473 (tdesc_amd64_avx512_linux): Likewise.
6474 (init_registers_x32_avx512_linux): Likewise.
6475 (tdesc_x32_avx512_linux): Likewise.
6476 (init_registers_i386_avx512_linux): Likewise.
6477 (tdesc_i386_avx512_linux): Likewise.
6478 (x86_64_regmap): Add AVX512 registers.
6479 (x86_linux_read_description): Add code to handle AVX512 XSTATE
6480 mask.
6481 (initialize_low_arch): Add code to initialize AVX512 registers.
6482
51aa91f9
PA
64832014-04-23 Pedro Alves <palves@redhat.com>
6484
6485 * mem-break.c (find_gdb_breakpoint_at): Make static.
6486 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
6487
a4165e94
PA
64882014-04-23 Pedro Alves <palves@redhat.com>
6489
6490 * i386-low.c: Don't include break-common.h here.
6491 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6492 prototype to take target_hw_bp_type as argument instead of a Z
6493 packet char.
6494 * i386-low.h: Include break-common.h here.
6495 (Z_packet_to_hw_type): Declare.
6496 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
6497 prototypes.
6498 * linux-x86-low.c (x86_insert_point): Convert the packet number to
6499 a target_hw_bp_type before calling i386_low_insert_watchpoint.
6500 (x86_remove_point): Convert the packet number to a
6501 target_hw_bp_type before calling i386_low_remove_watchpoint.
6502 * win32-i386-low.c (i386_insert_point): Convert the packet number
6503 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
6504 (i386_remove_point): Convert the packet number to a
6505 target_hw_bp_type before calling i386_low_remove_watchpoint.
6506
b8acf843
PA
65072014-04-23 Pedro Alves <palves@redhat.com>
6508
6509 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
6510
d708bcd1
PA
65112014-04-10 Pedro Alves <palves@redhat.com>
6512
6513 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
6514 Check if the condition or command is NULL before checking if the
6515 breakpoint is known. On success, return true.
6516 * mem-break.h (add_breakpoint_condition): Document return.
6517 (add_breakpoint_commands): Add describing comment.
6518 * server.c (skip_to_semicolon): New function.
6519 (process_point_options): Use it.
6520
2eec7d5b
PA
65212014-04-09 Pedro Alves <palves@redhat.com>
6522
6523 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
6524 to lwpid_of.
6525
fa96cb38
PA
65262014-02-27 Pedro Alves <palves@redhat.com>
6527
6528 PR 12702
6529 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
6530 macros.
6531 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
6532 output.
6533 (last_thread_of_process_p): Take a PID argument instead of a
6534 thread pointer.
6535 (linux_wait_for_lwp): Delete.
6536 (num_lwps, check_zombie_leaders, not_stopped_callback): New
6537 functions.
6538 (linux_low_filter_event): New function, party factored out from
6539 linux_wait_for_event.
6540 (linux_wait_for_event): Rename to ...
6541 (linux_wait_for_event_filtered): ... this. Add new filter ptid
6542 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
6543 sigsuspend. Check for zombie leaders.
6544 (linux_wait_for_event): Reimplement as wrapper around
6545 linux_wait_for_event_filtered.
6546 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
6547 a normal or signal exit is seen, it's the whole process exiting.
6548 (wait_for_sigstop): No longer a for_each_inferior callback.
6549 Rewrite on top of linux_wait_for_event_filtered.
6550 (stop_all_lwps): Call wait_for_sigstop directly.
6551 * server.c (resume, handle_target_event): Handle
6552 TARGET_WAITKIND_NO_RESUMED.
6553
d763de10
JB
65542014-02-26 Joel Brobecker <brobecker@adacore.com>
6555
6556 * win32-low.c (psapi_get_dll_name,
6557 * win32_CreateToolhelp32Snapshot): Delete.
6558 (win32_CreateToolhelp32Snapshot, win32_Module32First)
6559 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
6560 Delete.
6561 (handle_load_dll): Add function description.
6562 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
6563
850a0f76
JB
65642014-02-26 Joel Brobecker <brobecker@adacore.com>
6565
6566 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
6567 Add comment.
6568 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
6569 base address when calling win32_add_one_solib.
6570 (handle_load_dll): Delete local variable load_addr.
6571 Remove 0x1000 offset applied to DLL base address when calling
6572 win32_add_one_solib.
6573 (handle_unload_dll): Add comment.
6574
f25b3fc3
JB
65752014-02-26 Joel Brobecker <brobecker@adacore.com>
6576
6577 * win32-low.c (win32_add_all_dlls): Renames
6578 win32_ensure_ntdll_loaded. Rewrite function documentation.
6579 Adjust implementation to always load all DLLs.
6580 Add 0x1000 offset to DLL base address when calling
6581 win32_add_one_solib.
6582 (child_initialization_done): New static global.
6583 (do_initial_child_stuff): Set child_initialization_done to
6584 zero during child initialization, and 1 after. Replace call
6585 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
6586 Add comment.
6587 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
6588 (handle_unload_dll): Add function documentation.
6589 (get_child_debug_event): Ignore load and unload DLL events
6590 during child initialization.
6591
d86d4aaf
DE
65922014-02-20 Doug Evans <dje@google.com>
6593
3bc32da3 6594 Remove global all_lwps.
d86d4aaf
DE
6595 * inferiors.h (ptid_of): Move here from linux-low.h.
6596 (pid_of, lwpid_of): Ditto.
6597 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
6598 parameter is a struct thread_info * now.
6599 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
6600 directly. Pass &all_threads to find_inferior instead of &all_lwps.
6601 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
6602 directly.
6603 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
6604 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
6605 * linux-arm-low.c (update_registers_callback): Update, "entry"
6606 parameter is a struct thread_info * now.
6607 Fetch lwpid from current_inferior directly.
6608 (arm_insert_point): Pass &all_threads to find_inferior instead of
6609 &all_lwps.
6610 (arm_remove_point): Ditto.
6611 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
6612 (arm_prepare_to_resume): Fetch pid from thread.
6613 (arm_read_description): Fetch lwpid from current_inferior directly.
6614 * linux-low.c (all_lwps): Delete.
6615 (delete_lwp): Delete call to remove_inferior.
6616 (handle_extended_wait): Fetch lwpid from thread.
6617 (add_lwp): Don't set lwp->entry.id. Remove call to
6618 add_inferior_to_list.
6619 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
6620 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
6621 (kill_one_lwp_callback): Ditto.
6622 (linux_kill): Don't dereference NULL pointer.
6623 Fetch ptid,lwpid from thread.
6624 (get_detach_signal): Fetch ptid from thread.
6625 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
6626 Simplify call to regcache_invalidate_thread.
6627 (delete_lwp_callback): Update, "entry" parameter is a
6628 struct thread_info * now. Fetch pid from thread.
6629 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
6630 (status_pending_p_callback): Update, "entry" parameter is a
6631 struct thread_info * now. Fetch ptid from thread.
6632 (find_lwp_pid): Update, "entry" parameter is a
6633 struct thread_info * now.
6634 (linux_wait_for_lwp): Fetch pid from thread.
6635 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
6636 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
6637 (enqueue_one_deferred_signal): Fetch lwpid from thread.
6638 (dequeue_one_deferred_signal): Ditto.
6639 (cancel_breakpoint): Fetch ptid from current_inferior.
6640 (linux_wait_for_event): Pass &all_threads to find_inferior,
6641 not &all_lwps. Fetch ptid, lwpid from thread.
6642 (count_events_callback): Update, "entry" parameter is a
6643 struct thread_info * now.
6644 (select_singlestep_lwp_callback): Ditto.
6645 (select_event_lwp_callback): Ditto.
6646 (cancel_breakpoints_callback): Ditto.
6647 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
6648 not &all_lwps.
6649 (select_event_lwp): Ditto. Fetch ptid from event_thread.
6650 (unsuspend_one_lwp): Update, "entry" parameter is a
6651 struct thread_info * now.
6652 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
6653 not &all_lwps.
6654 (linux_stabilize_threads): Ditto. And for for_each_inferior.
6655 Fetch lwpid from thread, not lwp.
6656 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
6657 Pass &all_threads to find_inferior, not &all_lwps.
6658 (send_sigstop): Fetch lwpid from thread, not lwp.
6659 (send_sigstop_callback): Update, "entry" parameter is a
6660 struct thread_info * now.
6661 (suspend_and_send_sigstop_callback): Ditto.
6662 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
6663 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
6664 struct thread_info * now.
6665 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
6666 from thread, lwp.
6667 (lwp_running): Update, "entry" parameter is a
6668 struct thread_info * now.
6669 (stop_all_lwps): Fetch ptid from thread.
6670 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
6671 (linux_resume_one_lwp): Fetch lwpid from thread.
6672 (linux_set_resume_request): Update, "entry" parameter is a
6673 struct thread_info * now. Fetch pid, lwpid from thread.
6674 (resume_status_pending_p): Update, "entry" parameter is a
6675 struct thread_info * now.
6676 (need_step_over_p): Ditto. Fetch lwpid from thread.
6677 (start_step_over): Fetch lwpid from thread.
6678 (linux_resume_one_thread): Update, "entry" parameter is a
6679 struct thread_info * now. Fetch lwpid from thread.
6680 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
6681 (proceed_one_lwp): Update, "entry" parameter is a
6682 struct thread_info * now. Fetch lwpid from thread.
6683 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
6684 struct thread_info * now.
6685 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
6686 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
6687 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
6688 directly.
6689 (regsets_store_inferior_registers): Ditto.
6690 (fetch_register, store_register): Ditto.
6691 (linux_read_memory, linux_write_memory): Ditto.
6692 (linux_request_interrupt): Ditto.
6693 (linux_read_auxv): Ditto.
6694 (linux_xfer_siginfo): Ditto.
6695 (linux_qxfer_spu): Ditto.
6696 (linux_qxfer_libraries_svr4): Ditto.
6697 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
6698 moved to inferiors.h.
6699 (get_lwp): Delete.
6700 (get_thread_lwp): Update.
6701 (struct lwp_info): Delete member "entry". Simplify comment for
6702 member "thread".
6703 (all_lwps): Delete.
6704 * linux-mips-low.c (mips_read_description): Fetch lwpid from
6705 current_inferior directly.
6706 (update_watch_registers_callback): Update, "entry" parameter is a
6707 struct thread_info * now. Fetch pid from thread.
6708 (mips_linux_prepare_to_resume): Fetch ptid from thread.
6709 (mips_insert_point): Fetch lwpid from current_inferior.
6710 Pass &all_threads to find_inferior, not &all_lwps.
6711 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
6712 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
6713 directly.
6714 (mips_stopped_data_address): Ditto.
6715 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
6716 directly.
6717 * linux-tile-low.c (tile_arch_setup): Ditto.
6718 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
6719 (update_debug_registers_callback): Update, "entry" parameter is a
6720 struct thread_info * now. Fetch pid from thread.
6721 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
6722 Pass &all_threads to find_inferior, not &all_lwps.
6723 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
6724 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
6725 Pass &all_threads to find_inferior, not &all_lwps.
6726 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
6727 (i386_dr_low_get_status): Ditto.
6728 (x86_linux_prepare_to_resume): Fetch ptid from thread.
6729 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
6730 (x86_linux_read_description): Ditto.
6731 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
6732
3b8361aa
DE
67332014-02-20 Doug Evans <dje@google.com>
6734
6735 * inferiors.c (get_first_inferior): Fix buglet.
6736
f7667f0d
DE
67372014-02-19 Doug Evans <dje@google.com>
6738
6739 * gdbthread.h (add_thread): Change result type to struct thread_info *.
6740 * inferiors.c (add_thread): Change result type to struct thread_info *.
6741 All callers updated.
6742 (add_lwp): Call add_thread here instead of in callers.
6743 All callers updated.
6744 * linux-low.h (get_lwp_thread): Rewrite.
6745 (struct lwp_info): New member "thread".
6746
b3312d80
DE
67472014-02-19 Doug Evans <dje@google.com>
6748
6749 * linux-low.c (add_lwp): Change result to struct lwp_info *.
6750 All callers updated.
6751
ecc6f45c
DE
67522014-02-19 Doug Evans <dje@google.com>
6753
6754 * inferiors.c (add_thread): Fix whitespace.
6755
649ebbca
DE
67562014-02-19 Doug Evans <dje@google.com>
6757
6758 * dll.c (clear_dlls): Replace accessing list implemention details
6759 with API function.
6760 * gdbthread.h (get_first_thread): Declare.
6761 * inferiors.c (for_each_inferior_with_data): New function.
6762 (get_first_thread): New function.
6763 (find_thread_ptid): Simplify.
6764 (get_first_inferior): New function.
6765 (clear_list): Delete.
6766 (one_inferior_p): New function.
6767 (clear_inferior_list): New function.
6768 (clear_inferiors): Update.
6769 * inferiors.h (for_each_inferior_with_data): Declare.
6770 (clear_inferior_list): Declare.
6771 (one_inferior_p): Declare.
6772 (get_first_inferior): Declare.
6773 * linux-low.c (linux_wait_for_event): Replace accessing list
6774 implemention details with API function.
6775 * server.c (target_running): Ditto.
6776 (accumulate_file_name_length): New function.
6777 (emit_dll_description): New function.
6778 (handle_qxfer_libraries): Replace accessing list implemention
6779 details with API function.
6780 (handle_qxfer_threads_worker): New function.
6781 (handle_qxfer_threads_proper): Replace accessing list implemention
6782 details with API function.
6783 (handle_query): Ditto.
6784 (visit_actioned_threads_callback_ftype): New typedef.
6785 (visit_actioned_threads_data): New struct.
6786 (visit_actioned_threads): Rewrite to be find_inferior callback.
6787 (resume): Call find_inferior.
6788 (handle_status): Replace accessing list implemention
6789 details with API function.
6790 (process_serial_event): Replace accessing list implemention details
6791 with API function.
6792 * target.c (set_desired_inferior): Replace accessing list implemention
6793 details with API function.
6794 * tracepoint.c (same_process_p): New function.
6795 (gdb_agent_about_to_close): Replace accessing list implemention
6796 details with API function.
6797 * win32-low.c (child_delete_thread): Replace accessing list
6798 implemention details with API function.
6799 (match_dll_by_basename): New function.
6800 (dll_is_loaded_by_basename): New function.
6801 (win32_ensure_ntdll_loaded): Replace accessing list implemention
6802 details call to dll_is_loaded_by_basename.
6803
80894984
DE
68042014-02-19 Doug Evans <dje@google.com>
6805
6806 * dll.h (struct dll_info): Add comment.
6807 * gdbthread.h (struct thread_info): Add comment.
6808 (current_ptid): Simplify.
6809 * inferiors.c (add_process): Update.
6810 (remove_process): Update.
6811 * inferiors.h (struct process_info): Rename member "head" to "entry".
6812 * linux-low.c (delete_lwp): Update.
6813 (add_lwp): Update.
6814 (last_thread_of_process_p): Update.
6815 (kill_one_lwp_callback, linux_kill): Update.
6816 (status_pending_p_callback): Update.
6817 (wait_for_sigstop): Update. Simplify read of ptid.
6818 (start_step_over): Update.
6819 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
6820 (get_lwp_thread): Update.
6821 (struct lwp_info): Rename member "head" to "entry".
6822 * regcache.h (inferior_list_entry): Delete.
6823 * server.c (kill_inferior_callback): Update.
6824 (detach_or_kill_inferior_callback): Update.
6825 (print_started_pid): Update.
6826 (print_attached_pid): Update.
6827 (process_serial_event): Simplify read of ptid.
6828 * thread-db.c (thread_db_create_event): Update.
6829 (thread_db_get_tls_address): Update.
6830 * win32-low.c (current_inferior_ptid): Simplify.
6831
46917d26
TT
68322014-02-19 Tom Tromey <tromey@redhat.com>
6833
6834 * target.h (struct target_ops) <supports_btrace>: Add target_ops
6835 argument.
6836 (target_supports_btrace): Update.
6837
0759a81e
YQ
68382014-02-14 Yao Qi <yao@codesourcery.com>
6839
6840 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
6841 (rsp-low-ipa.o): New target.
6842
a7191e8b
TT
68432014-02-12 Tom Tromey <tromey@redhat.com>
6844
6845 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
6846 convert_ascii_to_int.
6847 * regcache.c (registers_to_string): Likewise.
6848 * remote-utils.c (decode_M_packet): Likewise.
6849 * server.c (process_serial_event): Likewise.
6850
ff0e980e
TT
68512014-02-12 Tom Tromey <tromey@redhat.com>
6852
6853 * server.c (handle_query, handle_v_run): Use hex2bin, not
6854 unhexify.
6855 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
6856
e9371aff
TT
68572014-02-12 Tom Tromey <tromey@redhat.com>
6858
6859 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
6860 convert_int_to_ascii.
6861 * regcache.c (registers_to_string, collect_register_as_string):
6862 Likewise.
6863 * remote-utils.c (look_up_one_symbol, relocate_instruction):
6864 Likewise.
6865 * server.c (process_serial_event): Likewise.
6866 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
6867 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
6868
971dc0b8
TT
68692014-02-12 Tom Tromey <tromey@redhat.com>
6870
6871 * remote-utils.c (look_up_one_symbol, monitor_output): Use
6872 bin2hex, not hexify.
6873 * tracepoint.c (cmd_qtstatus): Likewise.
6874
0a822afb
TT
68752014-02-12 Tom Tromey <tromey@redhat.com>
6876
6877 * remote-utils.c (monitor_output): Pass explicit length to
6878 hexify.
6879
9c3d6531
TT
68802014-02-12 Tom Tromey <tromey@redhat.com>
6881
6882 * tracepoint.c: Include rsp-low.h.
6883 * server.c: Include rsp-low.h.
6884 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
6885 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
6886 declare.
6887 * remote-utils.c: Include rsp-low.h.
6888 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
6889 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
6890 (convert_int_to_ascii, convert_ascii_to_int): Move to
6891 common/rsp-low.c.
6892 * regcache.c: Include rsp-low.h.
6893 * ax.c: Include rsp-low.h.
6894 * Makefile.in (SFILES): Add common/rsp-low.c.
6895 (OBS): Add rsp-low.o.
6896 (rsp-low.o): New target.
6897
01fd3ea5
TT
68982014-02-12 Tom Tromey <tromey@redhat.com>
6899
6900 * utils.h (pulongest, plongest, phex_nz): Don't declare.
6901 Include print-utils.h.
6902 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
6903 (plongest, thirty_two, phex_nz): Remove.
6904 * Makefile.in (SFILES): Add common/print-utils.c.
6905 (OBS): Add print-utils.o.
6906 (print-utils-ipa.o): New target.
6907 (print-utils.o): New target.
6908 (IPA_OBJS): Add print-utils-ipa.o.
6909
e99dc820
TT
69102014-02-06 Tom Tromey <tromey@redhat.com>
6911
6912 * Makefile.in (SFILES): Fix indentation.
6913
ee1e2d4f
DE
69142014-02-05 Doug Evans <dje@google.com>
6915
6916 * linux-low.c (linux_wait_for_event): Improve comment.
6917 (linux_wait_1): Keep current_inferior in sync with event_child.
6918
f5a02773
DE
69192014-01-22 Doug Evans <dje@google.com>
6920
6921 * gdbthread.h (gdb_id_to_thread): Delete, unused.
6922
87ce2a04
DE
69232014-01-22 Doug Evans <dje@google.com>
6924
6925 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6926 * configure: Regenerate.
6927 * config.in: Regenerate.
6928 * Makefile.in (SFILES): Add debug.c.
6929 (OBS): Add debug.o.
6930 * debug.c: New file.
6931 * debug.h: New file.
6932 * linux-aarch64-low.c (*): Update all debugging printfs to use
6933 debug_printf instead of fprintf.
6934 * linux-arm-low.c (*): Ditto.
6935 * linux-cris-low.c (*): Ditto.
6936 * linux-crisv32-low.c (*): Ditto.
6937 * linux-m32r-low.c (*): Ditto.
6938 * linux-sparc-low.c (*): Ditto.
6939 * linux-x86.c (*): Ditto.
6940 * linux-low.c (*): Ditto.
6941 (linux_wait_1): Add calls to debug_enter, debug_exit.
6942 (linux_wait): Remove redundant debugging printf.
6943 (stop_all_lwps): Add calls to debug_enter, debug_exit.
6944 (linux_resume, unstop_all_lwps): Ditto.
6945 * mem-break.c (*): Update all debugging printfs to use
6946 debug_printf instead of fprintf.
6947 * remote-utils.c (*): Ditto.
6948 * thread-db.c (*): Ditto.
6949 * server.c #include <ctype.h>, "gdb_vecs.h".
6950 (debug_threads): Moved to debug.c.
6951 (*): Update all debugging printfs to use debug_printf instead of
6952 fprintf.
6953 (start_inferior): Replace call to fflush with call to debug_flush.
6954 (monitor_show_help): Mention set debug-format.
6955 (parse_debug_format_options): New function.
6956 (handle_monitor_command): Handle "monitor set debug-format".
6957 (gdbserver_usage): Mention --debug-format.
6958 (main): Parse --debug-format.
6959 * server.h (debug_threads): Declaration moved to debug.h.
6960 #include "debug.h".
6961 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6962 trace_debug_1 that uses debug_printf.
6963 (tracepoint_look_up_symbols): Update all debugging printfs to use
6964 debug_printf instead of fprintf.
6965
e671835b
BS
69662014-01-20 Baruch Siach <baruch@tkos.co.il>
6967
6968 * linux-xtensa-low.c: Include asm/ptrace.h instead of
6969 sys/ptrace.h.
6970
b5737fa9
PA
69712014-01-17 Pedro Alves <palves@redhat.com>
6972
ea38d2a9 6973 PR build/16445
c7faa97a
PA
6974 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6975 defined after including gdb_proc_service.h.
b5737fa9 6976
40ed484e
DE
69772014-01-16 Doug Evans <dje@google.com>
6978
6979 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6980 (match_dll): Use it.
6981
969c39fb
MM
69822014-01-16 Markus Metzger <markus.t.metzger@intel.com>
6983
6984 * target.h (target_ops) <read_btrace>: Change parameters and
6985 return type to allow error reporting.
6986 * server.c (handle_qxfer_btrace): Support delta reads. Pass
6987 trace reading errors on.
6988 * linux-low.c (linux_low_read_btrace): Pass trace reading
6989 errors on.
6990 (linux_low_disable_btrace): New.
6991
ab7f45ba
DE
69922014-01-15 Doug Evans <dje@google.com>
6993
6994 * inferiors.c (thread_id_to_gdb_id): Delete.
6995 * inferiors.h (thread_id_to_gdb_id): Delete.
6996
66af0f44
EZ
69972014-01-13 Eli Zaretskii <eliz@gnu.org>
6998
6999 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
7000 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
7001 versions.
7002
9939e131
PA
70032014-01-08 Pedro Alves <palves@redhat.com>
7004
7005 * server.c (handle_status): Don't discard previous queued stop
7006 replies or thread's pending status here.
7007 (main) <disconnection>: Do it here instead.
7008
b7ea362b
PA
70092014-01-08 Pedro Alves <palves@redhat.com>
7010
7011 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
7012 * server.c (visit_actioned_threads, handle_pending_status): New
7013 function.
7014 (handle_v_cont): Factor out parts to ...
7015 (resume): ... this new function. If in all-stop, and a thread
7016 being resumed has a pending status, report it without actually
7017 resuming.
7018 (myresume): Adjust to use the new 'resume' function.
7019 (clear_pending_status_callback, set_pending_status_callback)
7020 (find_status_pending_thread_callback): New functions.
7021 (handle_status): Handle the case of multiple threads having
7022 interesting statuses to report. Report threads' real last signal
7023 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
7024 with an interesting thread to report the status for, instead of
7025 always reporting the status of the first thread.
7026
28498c42
JB
70272014-01-01 Joel Brobecker <brobecker@adacore.com>
7028
7029 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
7030 * gdbreplay.c (gdbreplay_version): Likewise.
7031
f45c82da
YZ
70322013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
7033
7034 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
7035 iov.iov_len with the real length in use.
7036
379a5e2d
JB
70372013-12-13 Joel Brobecker <brobecker@adacore.com>
7038
7039 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
7040 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
7041 for all targets that use win32-low.c.
7042 * win32-low.c (win32_ensure_ntdll_loaded): New function.
7043 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
7044
4210d83e
PA
70452013-12-13 Pedro Alves <palves@redhat.com>
7046
7047 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
7048 if equal to TARGET_WAITKIND_LOADED.
7049 * win32-low.c (cached_status): New static global.
7050 (win32_wait): Add declaration.
7051 (do_initial_child_stuff): Flush all initial pending debug events
7052 up to the initial breakpoint.
7053 (win32_wait): If CACHED_STATUS was set, return that instead
7054 of doing a real wait. Remove the code resuming the execution
7055 of the inferior after receiving a TARGET_WAITKIND_LOADED event
7056 during the initial phase. Also remove the code changing
7057 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
7058 TARGET_WAITKIND_STOPPED.
7059
e7f0d979
YQ
70602013-12-11 Yao Qi <yao@codesourcery.com>
7061
7062 * notif.c (handle_notif_ack): Return 0 if no notification
7063 matches.
7064
ebcf782c
DE
70652013-11-20 Doug Evans <dje@google.com>
7066
7067 * linux-low.c (linux_set_resume_request): Fix comment.
7068
20ad9378
DE
70692013-11-20 Doug Evans <dje@google.com>
7070
7071 * linux-low.c (resume_status_pending_p): Tweak comment.
7072
a196ebeb
WT
70732013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7074
7075 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
7076 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
7077 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
7078 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
7079 (srv_amd64_regobj): Add amd64-mpx.o.
7080 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
7081 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
7082 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
7083 * i387-fp.c (num_pl_bnd_register) Added constant.
7084 (num_pl_bnd_cfg_registers) Added constant.
7085 (struct i387_xsave) Added reserved area and MPX fields.
7086 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
7087 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
7088 function.
7089 (tdesc_i386_mpx_linux): Add MPX amd64 target.
7090 (init_registers_amd64_mpx_linux): Declare new function.
7091 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
7092 (x86_64_regmap): Add MPX registers.
7093 (x86_linux_read_description): Add MPX case.
7094 (initialize_low_arch): Initialize MPX targets.
7095
0080a2f6
TT
70962013-11-18 Tom Tromey <tromey@redhat.com>
7097
7098 * configure: Rebuild.
7099 * configure.ac: Don't check for stdlib.h.
7100 * gdbreplay.c: Unconditionally include stdlib.h.
7101
2978b111
TT
71022013-11-18 Tom Tromey <tromey@redhat.com>
7103
7104 * config.in: Rebuild.
7105 * configure: Rebuild.
7106 * configure.ac: Don't use AC_HEADER_DIRENT.
7107
a3d08894
TT
71082013-11-18 Tom Tromey <tromey@redhat.com>
7109
7110 * server.h: Don't check HAVE_STRING_H.
7111 * gdbreplay.c: Don't check HAVE_STRING_H.
7112 * configure: Rebuild.
7113
0a5dd17d
TT
71142013-11-18 Tom Tromey <tromey@redhat.com>
7115
7116 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
7117 LIBGNU.
7118
1bd2f0ba
TT
71192013-11-08 Tom Tromey <tromey@redhat.com>
7120
7121 * configure, config.in: Rebuild.
7122 * configure.ac: Remove unused configury.
7123
3266f10b
TT
71242013-11-08 Tom Tromey <tromey@redhat.com>
7125
7126 * acinclude.m4: Include common.m4, codeset.m4.
7127 * configure, config.in: Rebuild.
7128 * configure.ac: Use GDB_AC_COMMON.
7129
6682d959
AA
71302013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
7131
7132 * linux-s390-low.c (HWCAP_S390_TE): New define.
7133 (s390_arch_setup): Consider the TE field in the HWCAP for
7134 determining 'have_regset_tdb'.
7135
fd0a4d76
SDJ
71362013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
7137
7138 PR gdb/16014
7139 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
7140 call to sizeof.
7141
1a3d890b
PA
71422013-10-02 Pedro Alves <palves@redhat.com>
7143
7144 * server.c (process_serial_event): Don't output "GDBserver
7145 exiting" if GDB is connected through stdio.
7146 * target.c (mywait): Likewise, be silent if GDB is connected
7147 through stdio.
7148
97ad4581
JB
71492013-10-01 Joel Brobecker <brobecker@adacore.com>
7150
7151 * lynx-low.c (lynx_add_threads_after_attach): New function.
7152 (lynx_attach): Remove call to add_thread. Add call to
7153 lynx_add_threads_after_attach instead.
7154
5b4e221c
MF
71552013-09-28 Mike Frysinger <vapier@gentoo.org>
7156
7157 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
7158 * config.in, configure: Regenerated.
7159
ee47b2f8
YQ
71602013-09-18 Yao Qi <yao@codesourcery.com>
7161
7162 PR server/15959
7163 * server.c (start_inferior): Clear 'resume_info'.
7164
d6707650 71652013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7166
d6707650
JW
7167 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
7168 for each register.
7169
9243dd0e 71702013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 7171
9243dd0e
JW
7172 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
7173 linux-tile-low.o to srv_tgtobj.
7174
c623a6ef
WN
71752013-09-16 Will Newton <will.newton@linaro.org>
7176
7177 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
7178 out regs.
7179
fb71d39e
PA
71802013-09-06 Pedro Alves <palves@redhat.com>
7181
7182 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
7183 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
7184 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
7185 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
7186 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
7187 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
7188
8e7e9910
PA
71892013-09-06 Pedro Alves <palves@redhat.com>
7190
7191 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
7192 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
7193
7c3a12ca
PA
71942013-09-06 Pedro Alves <palves@redhat.com>
7195
7196 * linux-amd64-ipa.c: Include tracepoint.h.
7197 * linux-i386-ipa.c: Include tracepoint.h.
7198
8eb3d7b6
RW
71992013-09-06 Ricard Wanderlof <ricardw@axis.com>
7200
7201 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
7202 (ps_get_thread_area): New function.
7203
eddddb9d
RW
72042013-09-06 Ricard Wanderlof <ricardw@axis.com>
7205
7206 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
7207 (initialize_low_arch): Call init_registers_crisv32 rather than
7208 init_register_crisv32.
7209
533b0600
PA
72102013-09-05 Pedro Alves <palves@redhat.com>
7211
7212 * server.h (handle_vFile, hostio_last_error_from_errno): Move
7213 to ...
7214 * hostio.h: ... this new file.
7215 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
7216 win32-low.c: Include hostio.h.
7217
0ce3d3b5
PA
72182013-09-05 Pedro Alves <palves@redhat.com>
7219
7220 * server.h (gdb_client_data, handler_func, callback_handler_func)
7221 (delete_file_handler, add_file_handler, append_callback_event)
7222 (delete_callback_event, start_event_loop, initialize_event_loop):
7223 Move to event-loop.h and include it.
7224 * event-loop.h: New file.
7225
799cdc37
PA
72262013-09-05 Pedro Alves <palves@redhat.com>
7227
7228 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
7229 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
7230 (loaded_dll, unloaded_dll): Move to ...
7231 * dll.h: ... this new file.
7232 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
7233
6a6bbd9d
PA
72342013-09-05 Pedro Alves <palves@redhat.com>
7235
7236 * server.h (current_process, get_thread_process, all_processes)
7237 (add_inferior_to_list, for_each_inferior, current_inferior)
7238 (remove_inferior, add_process, remove_process, find_process_pid)
7239 (have_started_inferiors_p, have_attached_inferiors_p)
7240 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
7241 (clear_inferiors, find_inferior, find_inferior_id)
7242 (inferior_target_data, set_inferior_target_data)
7243 (inferior_regcache_data, set_inferior_regcache_data): Move to
7244 inferiors.h, and include it.
7245 * inferiors.h: New file.
7246
f699aaba
PA
72472013-09-05 Pedro Alves <palves@redhat.com>
7248
7249 * server.h (struct emit_ops, current_insn_ptr, emit_error):
7250 Move ...
72f4393d 7251 * ax.h: ... here.
f699aaba 7252
c144c7a0
PA
72532013-09-05 Pedro Alves <palves@redhat.com>
7254
7255 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
7256 tracepoint.h.
7257 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
7258 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
7259 (handle_tracepoint_general_set, handle_tracepoint_query)
7260 (tracepoint_finished_step, tracepoint_was_hit)
7261 (release_while_stepping_state_list, current_traceframe)
7262 (in_readonly_region, traceframe_read_mem)
7263 (fetch_traceframe_registers, traceframe_read_sdata)
7264 (traceframe_read_info, struct fast_tpoint_collect_status)
7265 (fast_tracepoint_collecting, force_unlock_trace_buffer)
7266 (handle_tracepoit_bkpts, initialize_low_tracepoint)
7267 (supply_fast_tracepoint_registers)
7268 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
7269 (ipa_tdesc, claim_trampoline_space)
7270 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
7271 (agent_mem_read, agent_get_trace_state_variable_value)
7272 (agent_set_trace_state_variable_value, agent_tsv_read)
7273 (agent_mem_read_string, get_raw_reg_func_addr)
7274 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
7275 * tracepoint.h: ... this new file.
7276
ff42e6ab
PA
72772013-09-05 Pedro Alves <palves@redhat.com>
7278
7279 * server.h (perror_with_name, error, fatal, warning, paddress)
7280 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
7281 include it.
7282 * utils.h: New file.
7283
541af0f4
PA
72842013-09-05 Pedro Alves <palves@redhat.com>
7285
7286 * server.h (remote_debug, noack_mode, transport_is_reliable)
7287 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
7288 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
7289 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
7290 (write_enn, initialize_async_io, enable_async_io)
7291 (disable_async_io, check_remote_input_interrupt_request)
7292 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
7293 (dead_thread_notify, prepare_resume_reply)
7294 (decode_address_to_semicolon, decode_address, decode_m_packet)
7295 (decode_M_packet, decode_X_packet, decode_xfer_write)
7296 (decode_search_memory_packet, unhexify, hexify)
7297 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
7298 (look_up_one_symbol, relocate_instruction)
7299 (monitor_output): Move to remote-utils.h, and include it.
7300 * remote-utils.h: New file.
7301
eebdf26b
PA
73022013-09-05 Pedro Alves <palves@redhat.com>
7303
7304 * server.h (_): Delete.
7305
3aafd2ff
PA
73062013-09-02 Pedro Alves <palves@redhat.com>
7307
7308 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
7309 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
7310 allocated.
7311 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
7312
cee83bcb
PM
73132013-09-02 Pierre Muller <muller@sourceware.org>
7314
7315 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
7316 or WriteProcessMemory complete successfully and handle
7317 ERROR_PARTIAL_COPY error.
7318
9a13b2fa
PA
73192013-09-02 Pedro Alves <palves@redhat.com>
7320
7321 * server.c (gdb_read_memory): Return -1 on traceframe memory read
7322 error instead of EIO.
7323
602e3198
JK
73242013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7325
7326 PR server/15604
7327 * linux-low.c: Include filestuff.h.
7328 (linux_create_inferior) <pid == 0>: Call close_most_fds.
7329 * lynx-low.c: Include filestuff.h.
7330 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
7331 * server.c: Include filestuff.h.
7332 (main): Call notice_open_fds.
7333 * spu-low.c: Include filestuff.h.
7334 (spu_create_inferior) <pid == 0>: Call close_most_fds.
7335
96d7229d
LM
73362013-08-22 Luis Machado <lgustavo@codesourcery.com>
7337
7338 * Makefile.in: Explain why ../target and ../nat are not
7339 listed as include file search paths.
7340 (linux-waitpid.o): New object file rule.
7341 * configure.srv (srv_native_linux_obj): New variable.
7342 Replace all occurrences of linux native object files with
7343 $srv_native_linux_obj.
7344 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
7345 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
7346 (linux_enable_event_reporting): Remove declaration.
7347 (my_waitpid): Moved to common/linux-waitpid.c.
7348 (linux_wait_for_event): Pass ptid when calling
7349 linux_enable_event_reporting.
7350 (linux_supports_tracefork_flag): Remove.
7351 (linux_enable_event_reporting): Likewise.
7352 (linux_tracefork_grandchild): Remove.
7353 (STACK_SIZE): Moved to common/linux-ptrace.c.
7354 (linux_tracefork_child): Remove.
7355 (linux_test_for_tracefork): Remove.
7356 (linux_look_up_symbols): Call linux_supports_traceclone.
7357 (initialize_low): Remove call to linux_test_for_tracefork.
7358 * linux-low.h (PTRACE_TYPE_ARG3): Move to
7359 common/linux-ptrace.h.
7360 (PTRACE_TYPE_ARG4): Likewise.
7361 Include linux-ptrace.h.
7362
32940073
PA
73632013-08-21 Pedro Alves <palves@redhat.com>
7364
7365 * config.in: Renegerate.
7366
33b60d58 73672013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 7368
33b60d58
LM
7369 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
7370 (SFILES): Remove $(srcdir)/common/target-common.c and
7371 add $(srcdir)/target/waitstatus.c.
7372 (OBS): Remove target-common.o and add waitstatus.o.
7373 (server_h): Remove $(srcdir)/../common/target-common.h and
7374 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
7375 and $(srcdir)/../target/waitstatus.h.
7376 (target-common.o): Remove.
7377 (waitstatus.o): New target object file.
7378 * target.h: Do not include target-common.h and
7379 include target/resume.h, target/wait.h and
7380 target/waitstatus.h.
7381
b8e1b30e
LM
73822013-08-13 Luis Machado <lgustavo@codesourcery.com>
7383
7384 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7385 to PTRACE_TYPE_ARG3.
7386 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
7387 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
7388 PTRACE_TYPE_ARG4.
7389 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
7390 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
7391
7a60ad40
YQ
73922013-07-27 Jie Zhang <jie@codesourcery.com>
7393 Daniel Jacobowitz <dan@codesourcery.com>
7394 Yao Qi <yao@codesourcery.com>
7395
7396 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
7397 (mips-linux-watch.o): New rule.
7398 (mips_linux_watch_h): New variable.
7399 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
7400 srv_tgtobj.
7401 * linux-mips-low.c: Include mips-linux-watch.h.
7402 (struct arch_process_info, struct arch_lwp_info): New.
7403 (update_watch_registers_callback): New function.
7404 (mips_linux_new_process, mips_linux_new_thread) New functions.
7405 (mips_linux_prepare_to_resume, mips_insert_point): New
7406 functions.
7407 (mips_remove_point, mips_stopped_by_watchpoint): New
7408 functions.
7409 (rsp_bp_type_to_target_hw_bp_type): New function.
7410 (mips_stopped_data_address): New function.
7411 (the_low_target): Add watchpoint support functions.
7412
de6f69ad
YQ
74132013-07-27 Yao Qi <yao@codesourcery.com>
7414
7415 * i386-low.c: Include break-common.h.
7416 (enum target_hw_bp_type): Remove.
7417
3360c0bf
LM
74182013-07-24 Luis Machado <lgustavo@codesourcery.com>
7419
7420 * Makefile.in (SFILES): /common/target-common.c.
7421 (OBS): Add target-common.o.
7422 (server_h): Add $(srcdir)/../common/target-common.h.
7423 (target-common.o): New target.
7424 * server.c (queue_stop_reply_callback): Free
7425 status string after use.
7426 * target.c (target_waitstatus_to_string): Remove.
7427 * target.h: Include target-common.h.
7428 (resume_kind): Likewise.
7429 (target_waitkind): Likewise.
7430 (target_waitstatus): Likewise.
7431 (TARGET_WNOHANG): Likewise.
7432
bd885420
YQ
74332013-07-04 Yao Qi <yao@codesourcery.com>
7434
7435 * Makefile.in (host_alias): Use @host_noncanonical@.
7436 (target_alias): Use @target_noncanonical@.
7437 * configure.ac: Use ACX_NONCANONICAL_TARGET and
7438 ACX_NONCANONICAL_HOST.
7439 * configure: Regenerated.
7440
7441 Revert:
7442 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7443
7444 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7445 * configure: Rebuild.
7446 * Makefile.in (version_host, version_target): Get from configure.
7447 (version.c): Use $(version_host) and $(version_target).
7448
17ef446e
PA
74492013-07-03 Pedro Alves <palves@redhat.com>
7450
7451 * Makefile.in (config.status): Depend on development.sh.
7452 * acinclude.m4: Include libmcheck.m4.
7453 * configure: Regenerate.
7454
7a9a7487
MG
74552013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7456
7457 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
7458 attribute inside the parentheses.
7459 (winapi_DebugSetProcessKillOnExit): Ditto.
7460 (winapi_DebugBreakProcess): Ditto.
7461 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 7462
49b64de6
MG
74632013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
7464
7465 * notif.h (notif_event): Add a dummy member to avoid compiler
7466 errors.
7467
d5749ee7
PA
74682013-07-01 Pedro Alves <palves@redhat.com>
7469
7470 * hostio.c (HOSTIO_PATH_MAX): Define.
7471 (require_filename, handle_open, handle_unlink, handle_readlink):
7472 Use it.
7473
d8d2a3ee
PA
74742013-07-01 Pedro Alves <palves@redhat.com>
7475
7476 * server.h: Include "pathmax.h".
7477 * linux-low.c: Don't include sys/param.h.
7478 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
7479 MAXPATHLEN.
7480 * win32-low.c: Don't include sys/param.h.
7481 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
7482
bc7dea8d
PA
74832013-07-01 Pedro Alves <palves@redhat.com>
7484
7485 * event-loop.c: Don't check HAVE_UNISTD_H before including
7486 <unistd.h>.
7487 * gdbreplay.c: Likewise.
7488 * remote-utils.c: Likewise.
7489 * server.c: Likewise.
7490 * configure.ac: Don't check for unistd.h.
7491 * configure: Regenerate.
7492
d6c2da54
TT
74932013-06-28 Tom Tromey <tromey@redhat.com>
7494
7495 * Makefile.in (version.c): Use version.in, not
7496 common/version.in.
7497
257b6bec
MG
74982013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
7499
7500 * configure.ac (version_host, version_target): Set and AC_SUBST them.
7501 * configure: Rebuild.
7502 * Makefile.in (version_host, version_target): Get from configure.
7503 (version.c): Use $(version_host) and $(version_target).
7504
86ebe149
DK
75052013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7506
7507 Fix trace-status to output user name without trailing colon.
7508 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
7509
f30aa5af
DK
75102013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
7511
7512 Fix trace-status to output proper start-time and stop-time.
7513 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
7514 output start time and stop time in hex as gdb expects.
7515
28a93511
YQ
75162013-06-26 Pedro Alves <pedro@codesourcery.com>
7517
7518 * tracepoint.c (build_traceframe_info_xml): Output trace state
7519 variables present in the trace buffer.
7520
01208463
TT
75212013-06-24 Tom Tromey <tromey@redhat.com>
7522
7523 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
7524 create-version.sh.
7525 (version.o): Remove.
7526 * gdbreplay.c: Include version.h.
7527 (version, host_name): Don't declare.
7528 * server.h: Include version.h.
7529 (version, host_name): Don't declare.
7530
760256f9
PA
75312013-06-12 Pedro Alves <palves@redhat.com>
7532
7533 * linux-x86-low.c (linux_is_elf64): Delete global.
7534 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
7535 with local linux_pid_exe_is_elf_64_file use.
7536
030031ee
PA
75372013-06-11 Pedro Alves <palves@redhat.com>
7538
7539 * linux-low.c (regset_disabled, disable_regset): New functions.
7540 (regsets_fetch_inferior_registers)
7541 (regsets_store_inferior_registers): Use them.
7542 (initialize_regsets_info); Don't allocate the disabled_regsets
7543 array here.
7544 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
7545 comment.
7546
5da6eb0a
PA
75472013-06-11 Pedro Alves <palves@redhat.com>
7548
7549 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
7550 xmalloc.
7551
7e5aaa09
PA
75522013-06-11 Pedro Alves <palves@redhat.com>
7553
7554 * linux-x86-low.c (initialize_low_arch): Call
7555 init_registers_x32_avx_linux.
7556
d878444c
JK
75572013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
7558
7559 Fix compatibility with Android Bionic.
7560 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
7561 it is not empty.
7562
3aee8918
PA
75632013-06-07 Pedro Alves <palves@redhat.com>
7564
5f2b57b5 7565 PR server/14823
3aee8918
PA
7566 * Makefile.in (OBS): Add tdesc.o.
7567 (IPA_OBJS): Add tdesc-ipa.o.
7568 (tdesc-ipa.o): New rule.
7569 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
7570 interface.
7571 * linux-low.c (new_inferior): Delete.
7572 (disabled_regsets, num_regsets): Delete.
7573 (linux_add_process): Adjust to set the new per-process
7574 new_inferior flag.
7575 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
7576 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
7577 was a stop. When calling arch_setup, switch the current inferior
7578 to the thread that got an event.
7579 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
7580 (regsets_fetch_inferior_registers)
7581 (regsets_store_inferior_registers): New regsets_info parameter.
7582 Adjust to use it.
7583 (linux_register_in_regsets): New regs_info parameter. Adjust to
7584 use it.
7585 (register_addr, fetch_register, store_register): New usrregs_info
7586 parameter. Adjust to use it.
7587 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
7588 parameter regs_info. Adjust to use it.
7589 (linux_fetch_registers): Get the current inferior's regs_info, and
7590 adjust to use it.
7591 (linux_store_registers): Ditto.
7592 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
7593 (initialize_low): Don't initialize the target_regsets here. Call
7594 initialize_low_arch.
7595 * linux-low.h (target_regsets): Delete declaration.
7596 (struct regsets_info): New.
7597 (struct usrregs_info): New.
7598 (struct regs_info): New.
7599 (struct process_info_private) <new_inferior>: New field.
7600 (struct linux_target_ops): Delete the num_regs, regmap, and
7601 regset_bitmap fields. New field regs_info.
7602 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
7603 * i387-fp.c (num_xmm_registers): Delete.
7604 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
7605 calls to new interface.
7606 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
7607 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
7608 Infer the number of xmm registers from the regcache's target
7609 description.
7610 * i387-fp.h (num_xmm_registers): Delete.
7611 * inferiors.c (add_thread): Don't install the thread's regcache
7612 here.
7613 * proc-service.c (gregset_info): Fetch the current inferior's
7614 regs_info. Adjust to use it.
7615 * regcache.c: Include tdesc.h.
7616 (register_bytes, reg_defs, num_registers)
7617 (gdbserver_expedite_regs): Delete.
7618 (get_thread_regcache): If the thread doesn't have a regcache yet,
7619 create one, instead of aborting gdbserver.
7620 (regcache_invalidate_one): Rename to ...
7621 (regcache_invalidate_thread): ... this.
7622 (regcache_invalidate_one): New.
7623 (regcache_invalidate): Only invalidate registers of the current
7624 process.
7625 (init_register_cache): Add target_desc parameter, and use it.
7626 (new_register_cache): Ditto. Assert the target description has a
7627 non zero registers_size.
7628 (regcache_cpy): Add assertions. Adjust.
7629 (realloc_register_cache, set_register_cache): Delete.
7630 (registers_to_string, registers_from_string): Adjust.
7631 (find_register_by_name, find_regno, find_register_by_number)
7632 (register_cache_size): Add target_desc parameter, and use it.
7633 (free_register_cache_thread, free_register_cache_thread_one)
7634 (regcache_release, register_cache_size): New.
7635 (register_size): Add target_desc parameter, and use it.
7636 (register_data, supply_register, supply_register_zeroed)
7637 (supply_regblock, supply_register_by_name, collect_register)
7638 (collect_register_as_string, collect_register_by_name): Adjust.
7639 * regcache.h (struct target_desc): Forward declare.
7640 (struct regcache) <tdesc>: New field.
7641 (init_register_cache, new_register_cache): Add target_desc
7642 parameter.
7643 (regcache_invalidate_thread): Declare.
7644 (regcache_invalidate_one): Delete declaration.
7645 (regcache_release): Declare.
7646 (find_register_by_number, register_cache_size, register_size)
7647 (find_regno): Add target_desc parameter.
7648 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
7649 declarations.
7650 * remote-utils.c: Include tdesc.h.
7651 (outreg, prepare_resume_reply): Adjust.
7652 * server.c: Include tdesc.h.
7653 (gdbserver_xmltarget): Delete declaration.
7654 (get_features_xml, process_serial_event): Adjust.
7655 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
7656 declare.
7657 (struct process_info) <tdesc>: New field.
7658 (ipa_tdesc): Declare.
7659 * tdesc.c: New file.
7660 * tdesc.h: New file.
7661 * tracepoint.c: Include tdesc.h.
7662 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
7663 (get_context_regcache): Adjust to pass ipa_tdesc down.
7664 (do_action_at_tracepoint): Adjust to get the register cache size
7665 from the context regcache's description.
7666 (traceframe_walk_blocks): Adjust to get the register cache size
7667 from the current trace frame's description.
7668 (traceframe_get_pc): Adjust to get current trace frame's
7669 description and pass it down.
7670 (gdb_collect): Adjust to get the register cache size from the
7671 IPA's description.
7672 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
7673 (gdbserver_xmltarget): Delete.
7674 (initialize_low_tracepoint): Set the ipa's target description.
7675 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
7676 (initialize_low_tracepoint): Set the ipa's target description.
7677 * linux-x86-low.c: Include tdesc.h.
7678 [__x86_64__] (is_64bit_tdesc): New.
7679 (ps_get_thread_area, x86_get_thread_area): Use it.
7680 (i386_cannot_store_register): Rename to ...
7681 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
7682 (i386_cannot_fetch_register): Rename to ...
7683 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
7684 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
7685 to new interface.
7686 (target_regsets): Rename to ...
7687 (x86_regsets): ... this.
7688 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
7689 interface.
7690 (x86_siginfo_fixup): Use is_64bit_tdesc.
7691 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
7692 (tdesc_x32_avx_linux, tdesc_x32_linux)
7693 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
7694 Declare.
7695 (x86_linux_update_xmltarget): Delete.
7696 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
7697 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
7698 (AMD64_LINUX_USER64_CS): New.
7699 (x86_linux_read_description): New, based on
7700 x86_linux_update_xmltarget.
7701 (same_process_callback): New.
7702 (x86_arch_setup_process_callback): New.
7703 (x86_linux_update_xmltarget): New.
7704 (x86_regsets_info): New.
7705 (amd64_linux_regs_info): New.
7706 (i386_linux_usrregs_info): New.
7707 (i386_linux_regs_info): New.
7708 (x86_linux_regs_info): New.
7709 (x86_arch_setup): Reimplement.
7710 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
7711 (x86_emit_ops): Ditto.
7712 (the_low_target): Adjust. Install x86_linux_regs_info,
7713 x86_cannot_fetch_register, and x86_cannot_store_register.
7714 (initialize_low_arch): New.
7715 * linux-ia64-low.c (tdesc_ia64): Declare.
7716 (ia64_fetch_register): Adjust.
7717 (ia64_usrregs_info, regs_info): New globals.
7718 (ia64_regs_info): New function.
7719 (the_low_target): Adjust.
7720 (initialize_low_arch): New function.
7721 * linux-sparc-low.c (tdesc_sparc64): Declare.
7722 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
7723 Adjust.
7724 (sparc_arch_setup): New function.
7725 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
7726 (the_low_target): Adjust.
7727 (initialize_low_arch): New function.
7728 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
7729 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
7730 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
7731 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
7732 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
7733 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
7734 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
7735 (tdesc_powerpc_isa205_vsx64l): Declare.
7736 (ppc_cannot_store_register, ppc_collect_ptrace_register)
7737 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
7738 (ppc_set_pc, ppc_get_hwcap): Adjust.
7739 (ppc_usrregs_info): Forward declare.
7740 (!__powerpc64__) ppc_regmap_adjusted: New global.
7741 (ppc_arch_setup): Adjust to the current process'es target
7742 description.
7743 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
7744 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
7745 (ppc_store_evrregset): Adjust.
7746 (target_regsets): Rename to ...
7747 (ppc_regsets): ... this, and make static.
7748 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
7749 (ppc_regs_info): New function.
7750 (the_low_target): Adjust.
7751 (initialize_low_arch): New function.
7752 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
7753 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
7754 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
7755 (tdesc_s390x_linux64v2): Declare.
7756 (s390_collect_ptrace_register, s390_supply_ptrace_register)
7757 (s390_fill_gregset, s390_store_last_break): Adjust.
7758 (target_regsets): Rename to ...
7759 (s390_regsets): ... this, and make static.
7760 (s390_get_pc, s390_set_pc): Adjust.
7761 (s390_get_hwcap): New target_desc parameter, and use it.
7762 [__s390x__] (have_hwcap_s390_high_gprs): New global.
7763 (s390_arch_setup): Adjust to set the current process'es target
7764 description. Don't adjust the regmap.
7765 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
7766 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
7767 (regs_info_3264): New globals.
7768 (s390_regs_info): New function.
7769 (the_low_target): Adjust.
7770 (initialize_low_arch): New function.
7771 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
7772 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
7773 [__mips64] (init_registers_mips_linux)
7774 (init_registers_mips_dsp_linux): Delete defines.
7775 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
7776 (have_dsp): New global.
7777 (mips_read_description): New, based on mips_arch_setup.
7778 (mips_arch_setup): Reimplement.
7779 (get_usrregs_info): New function.
7780 (mips_cannot_fetch_register, mips_cannot_store_register)
7781 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
7782 (mips_fill_fpregset, mips_store_fpregset): Adjust.
7783 (target_regsets): Rename to ...
7784 (mips_regsets): ... this, and make static.
7785 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
7786 (dsp_regs_info, regs_info): New globals.
7787 (mips_regs_info): New function.
7788 (the_low_target): Adjust.
7789 (initialize_low_arch): New function.
7790 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
7791 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
7792 Declare.
7793 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
7794 (arm_read_description): New, with bits factored from
7795 arm_arch_setup.
7796 (arm_arch_setup): Reimplement.
7797 (target_regsets): Rename to ...
7798 (arm_regsets): ... this, and make static.
7799 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
7800 (arm_regs_info): New function.
7801 (the_low_target): Adjust.
7802 (initialize_low_arch): New function.
7803 * linux-m68k-low.c (tdesc_m68k): Declare.
7804 (target_regsets): Rename to ...
7805 (m68k_regsets): ... this, and make static.
7806 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
7807 (m68k_regs_info): New function.
7808 (m68k_arch_setup): New function.
7809 (the_low_target): Adjust.
7810 (initialize_low_arch): New function.
7811 * linux-sh-low.c (tdesc_sharch): Declare.
7812 (target_regsets): Rename to ...
7813 (sh_regsets): ... this, and make static.
7814 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
7815 (sh_regs_info, sh_arch_setup): New functions.
7816 (the_low_target): Adjust.
7817 (initialize_low_arch): New function.
7818 * linux-bfin-low.c (tdesc_bfin): Declare.
7819 (bfin_arch_setup): New function.
7820 (bfin_usrregs_info, regs_info): New globals.
7821 (bfin_regs_info): New function.
7822 (the_low_target): Adjust.
7823 (initialize_low_arch): New function.
7824 * linux-cris-low.c (tdesc_cris): Declare.
7825 (cris_arch_setup): New function.
7826 (cris_usrregs_info, regs_info): New globals.
7827 (cris_regs_info): New function.
7828 (the_low_target): Adjust.
7829 (initialize_low_arch): New function.
7830 * linux-cris-low.c (tdesc_crisv32): Declare.
7831 (cris_arch_setup): New function.
7832 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
7833 (cris_regs_info): New function.
7834 (the_low_target): Adjust.
7835 (initialize_low_arch): New function.
7836 * linux-m32r-low.c (tdesc_m32r): Declare.
7837 (m32r_arch_setup): New function.
7838 (m32r_usrregs_info, regs_info): New globals.
7839 (m32r_regs_info): Adjust.
7840 (initialize_low_arch): New function.
7841 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
7842 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
7843 (tic6x_usrregs_info): Forward declare.
7844 (tic6x_read_description): New function, based on ...
7845 (tic6x_arch_setup): ... this. Reimplement.
7846 (target_regsets): Rename to ...
7847 (tic6x_regsets): ... this, and make static.
7848 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
7849 (tic6x_regs_info): New function.
7850 (the_low_target): Adjust.
7851 (initialize_low_arch): New function.
7852 * linux-xtensa-low.c (tdesc_xtensa): Declare.
7853 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
7854 (target_regsets): Rename to ...
7855 (xtensa_regsets): ... this, and make static.
7856 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
7857 globals.
7858 (xtensa_arch_setup, xtensa_regs_info): New functions.
7859 (the_low_target): Adjust.
7860 (initialize_low_arch): New function.
7861 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
7862 (nios2_arch_setup): Set the current process'es tdesc.
7863 (target_regsets): Rename to ...
7864 (nios2_regsets): ... this.
7865 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
7866 (nios2_regs_info): New function.
7867 (the_low_target): Adjust.
7868 (initialize_low_arch): New function.
a261b8f5
PA
7869 * linux-aarch64-low.c (tdesc_aarch64): Declare.
7870 (aarch64_arch_setup): Set the current process'es tdesc.
7871 (target_regsets): Rename to ...
7872 (aarch64_regsets): ... this.
7873 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
7874 (aarch64_regs_info): New function.
7875 (the_low_target): Adjust.
7876 (initialize_low_arch): New function.
3aee8918
PA
7877 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
7878 globals.
7879 (target_regsets): Rename to ...
7880 (tile_regsets): ... this.
7881 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
7882 (tile_regs_info): New function.
7883 (tile_arch_setup): Set the current process'es tdesc.
7884 (the_low_target): Adjust.
7885 (initialize_low_arch): New function.
7886 * spu-low.c (tdesc_spu): Declare.
7887 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
7888 * win32-arm-low.c (tdesc_arm): Declare.
7889 (arm_arch_setup): New function.
7890 (the_low_target): Install arm_arch_setup instead of
7891 init_registers_arm.
7892 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
7893 (init_windows_x86): Rename to ...
7894 (i386_arch_setup): ... this. Set `win32_tdesc'.
7895 (the_low_target): Adjust.
7896 * win32-low.c (win32_tdesc): New global.
7897 (child_add_thread): Don't create the thread cache here.
7898 (do_initial_child_stuff): Set the new process'es tdesc.
7899 * win32-low.h (struct target_desc): Forward declare.
7900 (win32_tdesc): Declare.
7901 * lynx-i386-low.c (tdesc_i386): Declare global.
7902 (lynx_i386_arch_setup): Set `lynx_tdesc'.
7903 * lynx-low.c (lynx_tdesc): New global.
7904 (lynx_add_process): Set the new process'es tdesc.
7905 * lynx-low.h (struct target_desc): Forward declare.
7906 (lynx_tdesc): Declare global.
7907 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
7908 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
7909 * nto-low.c (nto_tdesc): New global.
7910 (do_attach): Set the new process'es tdesc.
7911 * nto-low.h (struct target_desc): Forward declare.
7912 (nto_tdesc): Declare.
7913 * nto-x86-low.c (tdesc_i386): Declare.
7914 (nto_x86_arch_setup): Set `nto_tdesc'.
7915
b1fbec62
GB
79162013-06-04 Gary Benson <gbenson@redhat.com>
7917
7918 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
7919 to qSupported response when appropriate.
7920 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
7921 with nonzero-length annex.
7922 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
7923 arguments supplied in annex.
7924
d1ec4ce7
DE
79252013-05-31 Doug Evans <dje@google.com>
7926
ac44adcb 7927 PR server/15594
d1ec4ce7
DE
7928 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7929 64 bits in 64-cross-32 environment.
7930
9b25f2d3
PA
79312013-05-28 Pedro Alves <palves@redhat.com>
7932
7933 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7934 (aarch64-without-fpu.c): Delete rule.
7935 * configure.srv (aarch64*-*-linux*): Remove references to
7936 aarch64-without-fpu.o and aarch64-without-fpu.xml.
7937 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7938 declaration.
7939
6740dc9c
PA
79402013-05-24 Pedro Alves <palves@redhat.com>
7941
7942 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7943 instead of strchr/decode_address. Error if the range isn't split
7944 with a ','. Don't assume there's be a ':' in the action.
7945
c2d6af84
PA
79462013-05-23 Yao Qi <yao@codesourcery.com>
7947 Pedro Alves <palves@redhat.com>
7948
7949 * linux-low.c (lwp_in_step_range): New function.
7950 (linux_wait_1): If the thread was range stepping and stopped
7951 outside the stepping range, report the stop to GDB. Otherwise,
7952 continue stepping. Add range stepping debug output.
7953 (linux_set_resume_request): Copy the step range from the resume
7954 request to the lwp.
7955 (linux_supports_range_stepping): New.
7956 (linux_target_ops) <supports_range_stepping>: Set to
7957 linux_supports_range_stepping.
7958 * linux-low.h (struct linux_target_ops)
7959 <supports_range_stepping>: New field.
7960 (struct lwp_info) <step_range_start, step_range_end>: New fields.
7961 * linux-x86-low.c (x86_supports_range_stepping): New.
7962 (the_low_target) <supports_range_stepping>: Set to
7963 x86_supports_range_stepping.
7964 * server.c (handle_v_cont): Handle 'r' action.
7965 (handle_v_requests): Append ";r" if the target supports range
7966 stepping.
7967 * target.h (struct thread_resume) <step_range_start,
7968 step_range_end>: New fields.
7969 (struct target_ops) <supports_range_stepping>:
7970 New field.
7971 (target_supports_range_stepping): New macro.
7972
58794e1a
JB
79732013-05-17 Joel Brobecker <brobecker@adacore.com>
7974
7975 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7976 confusion in comment.
7977
d631c5a7
JB
79782013-05-17 Joel Brobecker <brobecker@adacore.com>
7979
7980 * lynx-low.c (struct process_info_private): New type.
7981 (lynx_add_process): New function.
7982 (lynx_create_inferior, lynx_attach): Replace calls to
7983 add_process by calls to lynx_add_process.
7984 (lynx_resume): If PTID is null, then try using
7985 current_process()->private->last_wait_event_ptid.
7986 Add comments.
7987 (lynx_clear_inferiors): Delete. The contents of that function
7988 has been inlined in lynx_mourn;
7989 (lynx_wait_1): Save the ptid in the process's private data.
7990 (lynx_mourn): Free the process' private data. Replace call
7991 to lynx_clear_inferiors by call to clear_inferiors.
7992
96f7a20f
YQ
79932013-05-17 Yao Qi <yao@codesourcery.com>
7994
7995 * i386-low.c (i386_length_and_rw_bits): Move the comment to
7996 the right place.
7997
db0dfaa0
LM
79982013-05-16 Luis Machado <lgustavo@codesourcery.com>
7999
8000 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
8001 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
8002 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
8003 PT_TEXT_END_ADDR guards. Update comments.
8004 (linux_target_op) <read_offsets>: Conditionally define to
8005 linux_read_offsets if the target is UCLIBC and if it defines
8006 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
8007
68f5f838
SL
80082013-05-06 Sandra Loosemore <sandra@codesourcery.com>
8009 Andrew Jenner <andrew@codesourcery.com>
8010
8011 * Makefile.in (SFILES): Add linux-nios2-low.c.
8012 (clean): Add action to delete nios2-linux.c.
8013 (nios2-linux.c): New rule.
8014 * configure.srv: Add nios2*-*-linux*.
8015 * linux-nios2-low.c: New.
8016
1ebff1fd
HAQ
80172013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
8018
8019 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
8020
f6150862
HZ
80212013-04-25 Hui Zhu <hui@codesourcery.com>
8022
8023 PR gdb/15186
f6150862
HZ
8024 * ax.c (ax_printf): Add fflush.
8025
614c279d
TT
80262013-04-22 Tom Tromey <tromey@redhat.com>
8027
8028 * Makefile.in (SFILES): Add filestuff.c.
8029 (OBS): Add filestuff.o.
8030 (filestuff.o): New target.
8031 * config.in, configure: Rebuild.
8032 * configure.ac: Check for fdwalk, pipe2.
8033
7d4e5717
PA
80342013-04-17 Pedro Alves <palves@redhat.com>
8035
8036 * configure.ac (USE_THREAD_DB): Delete variable.
8037 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
8038 Don't AC_SUBST USE_THREAD_DB.
8039 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
8040 * config.in, configure: Regenerate.
8041
d5c93e41
PA
80422013-04-16 Pedro Alves <palves@redhat.com>
8043
8044 * linux-low.h (struct lwp_info) <thread_known>: Move under
8045 the USE_THREAD_DB #ifdef.
8046
04f5fe89
PA
80472013-04-16 Pedro Alves <palves@redhat.com>
8048
8049 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
8050 (linux-low.o): Delete rule.
8051 * linux-low.h: Always include "gdb_thread_db.h" instead of
8052 conditionally including thread_db.h.
8053 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
8054 HAVE_THREAD_DB_H.
8055
480b27bf
JK
80562013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8057
8058 * Makefile.in (install-only): Fix make install regression.
8059
43662968
JK
80602013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
8061
8062 Convert man pages to texinfo, new gdbinit.5 texinfo page.
8063 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
8064 installation.
8065 * gdbserver.1: Remove.
8066
3e74e146
PA
80672013-03-22 Pedro Alves <palves@redhat.com>
8068
8069 * linux-low.c (handle_extended_wait): Don't call
8070 linux_enable_event_reporting.
8071
a8347a2a
TT
80722013-03-15 Tony Theodore <tonyt@logyst.com>
8073
8074 PR build/9098:
8075 * Makefile.in (SHELL): Use @SHELL@.
8076
eeb56fa7
SDJ
80772013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
8078
8079 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
8080 compiler warning.
8081
4fa7e2ff
JB
80822013-03-13 Joel Brobecker <brobecker@adacore.com>
8083
8084 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
8085 Remove extraneous NULL element.
8086
8ddb1965
YQ
80872013-03-13 Yao Qi <yao@codesourcery.com>
8088
8089 * tracepoint.c (traceframe_read_tsv): Look for the last matched
8090 'V' block in trace frame.
8091
9accd112
MM
80922013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8093
8094 * target.h (struct target_ops): Add btrace ops.
8095 (target_supports_btrace): New macro.
8096 (target_enable_btrace): New macro.
8097 (target_disable_btrace): New macro.
8098 (target_read_btrace): New macro.
8099 * gdbthread.h (struct thread_info): Add btrace field.
8100 * server.c: Include btrace-common.h.
8101 (handle_btrace_general_set): New function.
8102 (handle_btrace_enable): New function.
8103 (handle_btrace_disable): New function.
8104 (handle_general_set): Call handle_btrace_general_set.
8105 (handle_qxfer_btrace): New function.
8106 (struct qxfer qxfer_packets[]): Add btrace entry.
8107 * inferiors.c (remove_thread): Disable btrace.
8108 * linux-low: Include linux-btrace.h.
8109 (linux_low_enable_btrace): New function.
8110 (linux_low_read_btrace): New function.
8111 (linux_target_ops): Add btrace ops.
8112 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
8113 Add srv_linux_btrace=yes.
8114 (x86_64-*-linux*): Add linux-btrace.o.
8115 Add srv_linux_btrace=yes.
8116 * configure.ac: Define HAVE_LINUX_BTRACE.
8117 * config.in: Regenerated.
8118 * configure: Regenerated.
8119
5cc22e4c
MM
81202013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8121
8122 * server.c (handle_qxfer): Preserve error message if -3 is
8123 returned.
8124 (qxfer): Document the -3 return value.
8125
7c97f91e
MM
81262013-03-11 Markus Metzger <markus.t.metzger@intel.com>
8127
8128 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
8129 (linux_btrace_h): New variable.
8130 (linux-btrace.o): New rule.
8131
be9a119c 81322013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
8133 Hafiz Abid Qadeer <abidh@codesourcery.com>
8134
8135 * tracepoint.c (trace_buffer_size): New global.
8136 (DEFAULT_TRACE_BUFFER_SIZE): New define.
8137 (init_trace_buffer): Change to one-argument function. Allocate
8138 trace buffer memory.
8139 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
8140 handle QTBuffer:size packet.
8141 (cmd_bigqtbuffer_size): New function.
8142 (initialize_tracepoint): Call init_trace_buffer with
8143 DEFAULT_TRACE_BUFFER_SIZE.
8144 * server.c (handle_query): Add QTBuffer:size in the
8145 supported packets.
8146
e64f7499
YQ
81472013-03-07 Yao Qi <yao@codesourcery.com>
8148
8149 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
8150 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
8151 of -1.
8152 (cmd_qtsp): Adjust condition. Do post increment.
8153 Set cur_action and cur_step_action back to 0.
8154
f0ae6fc3
PA
81552013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
8156
8157 PR server/15236
8158 * linux-low.c (linux_write_memory): Return early success if LEN is
8159 zero.
8160
b5b0b0af
CV
81612013-03-05 Corinna Vinschen <vinschen@redhat.de>
8162
334ad4a8 8163 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 8164
589bc927
TT
81652013-02-28 Tom Tromey <tromey@redhat.com>
8166
8167 * configure.ac: Invoke AC_SYS_LARGEFILE.
8168 * configure, config.in: Rebuild.
8169
dfe07582
CV
81702013-02-28 Corinna Vinschen <vinschen@redhat.com>
8171
8172 * win32-low.c: Throughout, fix format strings and casts of
8173 printf-like functions to avoid type related warnings on all
8174 platforms.
8175 (get_child_debug_event): Print dwDebugEventCode as hex since
8176 that's how it's usually documented.
8177
736cd585
YQ
81782013-02-28 Yao Qi <yao@codesourcery.com>
8179
8180 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
8181 pulongest.
8182
e1f58301
JW
81832013-02-27 Jiong Wang <jiwang@tilera.com>
8184
8185 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
8186 (reg-tilegx32.c): New rule.
8187 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
8188 * linux-tile-low.c (tile_arch_setup): New function. Invoke
8189 different register info initializer according to elf class.
8190 (init_registers_tilgx32): New function. The tilegx32 register info
8191 initializer.
8192 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
8193 (tile_store_gregset): Likewise.
8194
d171ca78
YQ
81952013-02-27 Yao Qi <yao@codesourcery.com>
8196
8197 * server.c (process_point_options): Print debug message when
8198 debug_threads is true.
8199
282bbdf3
YQ
82002013-02-26 Yao Qi <yao@codesourcery.com>
8201
8202 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
8203
aca22551
PA
82042013-02-19 Pedro Alves <palves@redhat.com>
8205 Kai Tietz <ktietz@redhat.com>
8206
8207 PR gdb/15161
8208
8209 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
8210 instead of strtoul to extract address from packet.
8211 (process_serial_event) <'z'>: Likewise.
8212
4f3cee1c
YQ
82132013-02-18 Yao Qi <yao@codesourcery.com>
8214
8215 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
8216
8e1d55a3
PA
82172013-02-14 Pedro Alves <palves@redhat.com>
8218
8219 Plug memory leak.
8220
8221 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
8222 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
8223
458820da
PA
82242013-02-14 Pedro Alves <palves@redhat.com>
8225
8226 * tracepoint.c (cmd_qtdpsrc): Use savestring.
8227
baea0dae
PA
82282013-02-14 Pedro Alves <palves@redhat.com>
8229
8230 * tracepoint.c (save_string): Delete.
8231 (add_tracepoint_action): Use savestring instead of save_string.
8232
0b1afbb3
PA
82332013-02-12 Pedro Alves <palves@redhat.com>
8234
8235 * linux-xtensa-low.c: Ditto.
8236 * xtensa-xtregs.c: Ditto.
8237
8a4ac37e
PA
82382013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
8239
8240 * thread-db.c (thread_db_get_tls_address): NULL pointer check
8241 thread_db.
8242
148de6bb
MS
82432013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8244
8245 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
8246 aarch64_num_wp_regs and aarch64_num_bp_regs to
8247 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
8248
55fac6e0
MS
82492013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
8250
8251 * linux-aarch64-low.c (ps_get_thread_area): Replace
8252 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
8253
176eb98c
MS
82542013-02-04 Jim MacArthur <jim.macarthur@arm.com>
8255 Marcus Shawcroft <marcus.shawcroft@arm.com>
8256 Nigel Stephens <nigel.stephens@arm.com>
8257 Yufeng Zhang <yufeng.zhang@arm.com>
8258
8259 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
8260 (aarch64.c, aarch64-without-fpu.c): New targets.
8261 * configure.srv (aarch64*-*-linux*): New.
8262 * linux-aarch64-low.c: New file.
8263
56f7af9c
MS
82642013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
8265
43aaf8b6 8266 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
8267 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
8268 (dequeue_one_deferred_signal, linux_resume_one_thread)
8269 (fetch_register, linux_write_memory, linux_enable_event_reporting)
8270 (linux_tracefork_grandchild, linux_test_for_tracefork)
8271 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
8272 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
8273 where the argument is 0.
8274
60f662b0
YQ
82752013-01-25 Yao Qi <yao@codesourcery.com>
8276
8277 * event-loop.c: Include "queue.h".
8278 (gdb_event_p): New typedef.
8279 (struct gdb_event) <next_event>: Remove.
8280 (event_queue): Change to QUEUE(gdb_event_p).
8281 (async_queue_event): Remove.
8282 (gdb_event_xfree): New.
8283 (initialize_event_loop): New.
8284 (process_event): Use API from QUEUE.
8285 (wait_for_event): Likewise.
8286 * server.c (main): Call initialize_event_loop.
8287 * server.h (initialize_event_loop): Declare.
8288
5ae4861a
YQ
82892013-01-18 Yao Qi <yao@codesourcery.com>
8290
8291 * ax.h (struct eval_agent_expr_context): New.
8292 (gdb_eval_agent_expr): Update declaration.
8293 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
8294 TFRAME. Add new argument CTX.
8295 * server.h (struct eval_agent_expr_context): Declare.
8296 (agent_mem_read, agent_tsv_read): Update declaration.
8297 (agent_mem_read_string): Likewise.
8298 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
8299 (add_traceframe_block): Add new argument TPOINT.
8300 Increase TPOINT->traceframe_usage.
8301 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
8302 eval_tracepoint_agent_expr.
8303 (condition_true_at_tracepoint): Likewise.
8304 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
8305 (agent_mem_read_string, agent_tsv_read): Likewise.
8306
85e00e85
YQ
83072013-01-16 Yao Qi <yao@codesourcery.com>
8308
8309 * linux-low.c (linux_resume_one_lwp): Don't check
8310 'lwp->bp_reinsert != 0'.
8311
4039cf45
JB
83122013-01-07 Joel Brobecker <brobecker@adacore.com>
8313 Pedro Alves <palves@redhat.com>
8314
8315 * lynx-low.c (ptrace_request_to_str): Define a temporary
8316 macro and use it to simplify this function's implementation.
8317
9044dee2
JB
83182013-01-07 Joel Brobecker <brobecker@adacore.com>
8319
8320 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
8321 sets errno.
8322
e6352c8f
JB
83232013-01-07 Joel Brobecker <brobecker@adacore.com>
8324
8325 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
8326
50681a27
JB
83272013-01-07 Joel Brobecker <brobecker@adacore.com>
8328
8329 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
8330
3f6e77ef
JB
83312013-01-07 Joel Brobecker <brobecker@adacore.com>
8332
8333 * lynx-low.c (lynx_resume): Use the resume_info parameter
8334 to determine the ptid for the lynx_ptrace call, unless
8335 it is equal to minus_one_ptid, in which case we use the
8336 ptid of the current_inferior.
8337 (lynx_wait_1): After having received a thread create/exit
8338 event, resume the inferior's execution using the signaling
8339 thread's ptid, rather than the old ptid.
8340
7fda33ae
JB
83412013-01-07 Joel Brobecker <brobecker@adacore.com>
8342
8343 * lynx-low.c (lynx_resume): Delete variable ret.
8344
b9786c74
JB
83452013-01-01 Joel Brobecker <brobecker@adacore.com>
8346
8347 * gdbreplay.c (gdbreplay_version): Update copyright year.
8348 * server.c (gdbserver_version): Likewise.
8349
8b93d60f
JB
83502012-12-17 Joel Brobecker <brobecker@adacore.com>
8351
8352 * lynx-low.c (lynx_wait_1): Add debug trace before adding
8353 new thread.
8354
037335a7
JB
83552012-12-17 Joel Brobecker <brobecker@adacore.com>
8356
8357 * lynx-low.c (ptrace_request_to_str): Add handling for
8358 PTRACE_GETTRACESIG.
8359
52d4cbd8
JB
83602012-12-17 Joel Brobecker <brobecker@adacore.com>
8361
8362 * lynx-low.c (lynx_attach): Delete variable new_process.
8363
ab8f6ca9
JB
83642012-12-17 Joel Brobecker <brobecker@adacore.com>
8365
8366 * lynx-low.c (lynx_create_inferior): Delete variable
8367 new_process.
8368
78cbc024
JB
83692012-12-17 Joel Brobecker <brobecker@adacore.com>
8370
8371 * lynx-low.c (ptrace_request_to_str): Do not handle
8372 PTRACE_GETTHREADLIST if this macro does not exist.
8373
14a00470
YQ
83742012-12-15 Yao Qi <yao@codesourcery.com>
8375
8376 * Makefile.in (OBS): Add notif.o.
8377 * notif.c, notif.h: New.
8378 * server.c: Include "notif.h".
8379 (struct vstop_notif) <next>: Remove.
8380 <base>: New field.
8381 (queue_stop_reply): Update.
8382 (push_event, send_next_stop_reply): Remove.
8383 (discard_queued_stop_replies): Update.
8384 (notif_stop): New variable.
8385 (handle_v_stopped): Remove.
8386 (handle_v_requests): Don't call handle_v_stopped. Call
8387 handle_ack_notif instead.
8388 (queue_stop_reply_callback): Call notif_event_enque instead
8389 of queue_stop_reply.
8390 (handle_status): Don't call send_next_stop_reply, call
8391 notif_write_event instead.
8392 (kill_inferior_callback): Likewise.
8393 (detach_or_kill_inferior_callback): Likewise.
8394 (main): Call initialize_notif.
8395 (process_serial_event): Call QUEUE_is_empty.
8396 (handle_target_event): Call notif_push instead of push event.
8397 * server.h (push_event): Remove declaration.
8398
61c125b9
TT
83992012-12-10 Tom Tromey <tromey@redhat.com>
8400
8401 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
8402 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
8403 macros.
8404 (.c.o): Rewrite.
8405 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
8406 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
8407 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
8408 (amd64-linux-ipa.o, ax.o): Rewrite.
8409 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
8410 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
8411 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
8412 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
8413 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
8414 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
8415 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
8416 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
8417 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
8418 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
8419 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
8420 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
8421 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
8422 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
8423 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
8424 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
8425 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
8426 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
8427 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
8428 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
8429 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
8430 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
8431 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
8432 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
8433 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
8434 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
8435 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
8436 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
8437 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
8438 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
8439 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
8440 (reg-tilegx.o): Remove.
8441 (all_object_files): New macro.
8442 Include .deps files.
8443 * aclocal.m4, configure: Rebuild.
8444 * acinclude.m4: Include depstand.m4, lead-dot.m4.
8445 * configure.ac: Invoke ZW_CREATE_DEPDIR,
8446 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
8447
e90e9ad9
TT
84482012-12-05 Tom Tromey <tromey@redhat.com>
8449
8450 PR gdb/14917:
8451 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
8452
02d403bf 84532012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
8454
8455 * configure.ac: Check for linux/perf_event.h.
8456 * config.in: Regenerated.
8457 * configure: Regenerated.
8458
0270a750
PA
84592012-11-26 Maxime Villard <rustyBSD@gmx.fr>
8460
8461 * hostio.c (handle_readlink): Decrease buffer size
8462 parameter passed to readlink by one byte.
8463
8c29b58e
YQ
84642012-11-26 Yao Qi <yao@codesourcery.com>
8465
8466 * configure.ac (build_warnings): Append '-Wempty-body'.
8467 * configure: Regenerated.
8468 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
8469 body.
8470
8bdce1ff
PM
84712012-11-15 Pierre Muller <muller@sourceware.org>
8472
8473 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
8474 * config.in: Regenerate.
8475 * configure: Regenerate.
8476 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
8477 Use "gdb_wait.h" header instead of <sys/wait.h> header.
8478 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8479 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
8480 header.
8481 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
8482 instead of <sys/wait.h> header.
8483 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
8484
02d403bf 84852012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
8486
8487 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
8488 (various make rules): Remove -DGDBSERVER
8489
fbd5db48
YQ
84902012-11-09 Yao Qi <yao@codesourcery.com>
8491
8492 * spu-low.c (current_ptid): Move it to ..
8493 * gdbthread.h: ... here. New.
8494 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
8495 * server.c (myresume, process_serial_event): Likewise.
8496 * thread-db.c (thread_db_find_new_threads): Likewise.
8497 * tracepoint.c (run_inferior_command): Likewise.
8498
b3dc46ff
AB
84992012-10-01 Andrew Burgess <aburgess@broadcom.com>
8500
8501 * server.c (handle_search_memory_1): Include access length in
8502 warning message.
8503
07c04788
HPN
85042012-09-05 Michael Brandt <michael.brandt@axis.com>
8505
8506 * linux-crisv32-low.c: Fix compile errors.
8507
918d227b
YQ
85082012-09-04 Yao Qi <yao@codesourcery.com>
8509
8510 * tracepoint.c (cmd_qtsv): Adjust debug message.
8511 Don't check CUR_TPOINT.
8512
18c1b81a
YQ
85132012-08-28 Yao Qi <yao@codesourcery.com>
8514
8515 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
8516 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
8517 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
8518 Remove declarations of xmalloc, xreallloc, xstrdup and
8519 freeargv.
8520 * Makefile.in (libiberty_h): New.
8521 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
8522 (linux-bfin-low.o): Append dependency 'libiberty.h'.
8523
dc82f37b
YQ
85242012-08-23 Yao Qi <yao@codesourcery.com>
8525
8526 * server.h: Remove declaration of 'xsnprintf'.
8527
406b1477
KS
85282012-08-22 Keith Seitz <keiths@redhat.com>
8529
8530 * server.h: Include build-gnulib-gbserver/config.h.
8531 * gdbreplay.c: Likewise.
8532
e6712ff1
DE
85332012-08-08 Doug Evans <dje@google.com>
8534
8535 * Makefile.in (SFILES): Add gdb_vecs.c.
8536 (OBS): Add gdb_vecs.o.
8537 (gdb_vecs_h, host_defs_h): New variables.
8538 (thread-db.o): Add $(gdb_vecs_h) dependency.
8539 (gdb_vecs.o): New rule.
8540 * thread-db.c: #include "gdb_vecs.h".
8541 (thread_db_load_search): Use a vector to iterate over path elements.
8542 Handle text appearing after "$pdir".
8543
8544 * configure.ac: Add check for strstr.
8545 * config.in: Regenerate.
8546 * configure: Regenerate.
8547
7c3270ae
UW
85482012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
8549
8550 * hostio.c (handle_pread): If pread fails, fall back to attempting
8551 lseek/read.
8552 (handle_pwrite): Likewise for pwrite.
8553
b62e2b27
UW
85542012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
8555
8556 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
8557 between unsupported TYPE and unimplementable ADDR/LEN combination.
8558 (arm_insert_point): Act on new return value.
8559
78a99e91
PA
85602012-07-31 Pedro Alves <palves@redhat.com>
8561
8562 * server.c (process_point_options): Only skip tokens if we find
8563 one that is unrecognized. Don't treat 'X' specially while
8564 skipping unrecognized tokens.
8565
fcf303ab
UW
85662012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
8567
8568 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
8569 to 4-byte-align HW breakpoint addresses for Thumb.
8570
7255706c
YQ
85712012-07-27 Yao Qi <yao@codesourcery.com>
8572
8573 PR remote/14161.
8574
8575 * server.h: Declare gdb_agent_about_to_close.
8576 * target.c (kill_inferior): Include "agent.h".
8577 New. Send command 'kill'.
8578 * target.h (kill_inferior): Removed macro.
8579 * tracepoint.c (gdb_agent_about_to_close): New.
8580 (gdb_agent_helper_thread): Handle command 'close'.
8581 Wait endlessly until the inferior stops.
8582 Install gdb_agent_remove_socket to atexit hook.
8583 (agent_socket_name): New static variable.
8584 (gdb_agent_socket_init): Replace local variable 'name' with
8585 'agent_socket_name'.
8586 (gdb_agent_remove_socket): New.
8587
5a3f286f
YQ
85882012-07-27 Yao Qi <yao@codesourcery.com>
8589
8590 * server.c (process_point_options): Stop at 'X' when parsing.
8591
961bd387
ME
85922012-07-19 Michael Eager <eager@eagercon.com>
8593
a261b8f5 8594 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
8595 to hw_execute.
8596 * linux-x86-low.c (x86_insert_point, x86_remove_point):
8597 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
8598 hardware breakpoint.
8599
aa7c7447
JK
86002012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8601
8602 * gdbserver/linux-low.c (initialize_low): Call
8603 linux_ptrace_init_warnings.
8604
7f216e7c
DE
86052012-07-02 Doug Evans <dje@google.com>
8606
8607 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
8608 pointer to int.
8609
d3ce09f5
SS
86102012-07-02 Stan Shebs <stan@codesourcery.com>
8611
8612 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
8613 (ax.o): Add it to build rule.
8614 (ax-ipa.o): Ditto.
8615 (OBS): Add format.o.
8616 (IPA_OBS): Add format.o.
8617 * server.c (handle_query): Claim support for breakpoint commands.
8618 (process_point_options): Add command case.
8619 (process_serial_event): Leave running if there are printfs in
8620 effect.
8621 * mem-break.h (any_persistent_commands): Declare.
8622 (add_breakpoint_commands): Declare.
8623 (gdb_no_commands_at_breakpoint): Declare.
8624 (run_breakpoint_commands): Declare.
8625 * mem-break.c (struct point_command_list): New struct.
8626 (struct breakpoint): New field command_list.
8627 (any_persistent_commands): New function.
8628 (add_commands_to_breakpoint): New function.
8629 (add_breakpoint_commands): New function.
8630 (gdb_no_commands_at_breakpoint): New function.
8631 (run_breakpoint_commands): New function.
8632 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
8633 locally.
8634 * ax.c: Include format.h.
8635 (ax_printf): New function.
8636 (gdb_eval_agent_expr): Add printf opcode.
8637
2f8f6aed
YQ
86382012-06-13 Yao Qi <yao@codesourcery.com>
8639
8640 * server.c (start_inferior): Remove duplicated writes to fields
8641 'last_resume_kind' and 'last_status' of 'current_inferior'.
8642
0c9070b3
YQ
86432012-06-12 Yao Qi <yao@codesourcery.com>
8644 Pedro Alves <palves@redhat.com>
8645
8646 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
8647 comment.
8648 * server.c (handle_v_cont): Extend comment.
8649
c52daf70
YQ
86502012-06-11 Yao Qi <yao@codesourcery.com>
8651
8652 * linux-low.c (linux_attach): Add 'static'.
8653
d38bbb0a
YQ
86542012-06-06 Yao Qi <yao@codesourcery.com>
8655
8656 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
8657
89dc0afd
JK
86582012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
8659
8660 Fix gcc -flto compilation warning.
8661 * server.c (main): Make variable multi_mode and attach volatile.
8662
75f62ce7
TJB
86632012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8664
8665 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
8666 if the platform doesn't know about it.
8667
65f479b6
PA
86682012-05-30 Jeff Kenton <jkenton@tilera.com>
8669
8670 * Makefile.in (SFILES): Add linux-tile-low.c.
8671 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
8672 * configure.srv: Handle tilegx-*-linux*.
8673 * linux-tile-low.c: New file.
8674
0c5bf5a9
JK
86752012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8676
8677 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
8678
a493e3e2
PA
86792012-05-24 Pedro Alves <palves@redhat.com>
8680
8681 PR gdb/7205
8682
43aaf8b6 8683 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 8684
2ea28649
PA
86852012-05-24 Pedro Alves <palves@redhat.com>
8686
8687 PR gdb/7205
8688
8689 Replace target_signal with gdb_signal throughout.
8690
8d409d16
MR
86912012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
8692
8693 * linux-low.c (linux_store_registers): Avoid the copying sequence
8694 when no data has been retrieved by ptrace.
8695
23512c01
MGD
86962012-05-22 Will Deacon <will.deacon@arm.com>
8697
8698 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
8699 Include asm/ptrace.h.
8700 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
8701 already defined.
8702
4934b29e
MR
87032012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
8704
8705 * linux-low.c (linux_store_registers): Don't re-retrieve data
8706 with ptrace that has already been obtained from /proc. Always
8707 copy any data retrieved with ptrace to the buffer supplied.
8708
bde24c0a
PA
87092012-05-11 Yao Qi <yao@codesourcery.com>
8710 Pedro Alves <palves@redhat.com>
8711
8712 * linux-low.c (enum stopping_threads_kind): New.
8713 (stopping_threads): Change type to `enum stopping_threads_kind'.
8714 (handle_extended_wait): If stopping and suspending threads, leave
8715 the new_lwp suspended too.
8716 (linux_wait_for_event): Adjust.
8717 (stop_all_lwps): Set `stopping_threads' to
8718 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
8719 whether we're suspending threads or just stopping them. Assert no
8720 recursion happens.
8721
623b6bdf
YQ
87222012-04-29 Yao Qi <yao@codesourcery.com>
8723
8724 * server.h: Move some code to ...
8725 * gdbthread.h: ... here. New.
8726 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
8727 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
8728 (nto-low.o, win32-low.o): Likewise.
8729 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
8730 * regcache.c, remote-utils.c, server.c: Likewise.
8731 * target.c, tracepoint.c, win32-low.c: Likewise.
8732
f15f9948
TJB
87332012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8734
8735 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
8736 (PTRACE_ARG4_TYPE): Likewise.
8737 (PTRACE_XFER_TYPE): Likewise.
8738 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
8739 ptrace to PTRACE_ARG3_TYPE.
8740 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
8741 (PTRACE_ARG4_TYPE): Likewise.
8742 (PTRACE_XFER_TYPE): Likewise.
8743 (linux_detach_one_lwp): Cast fourth argument of
8744 ptrace to long then PTRACE_ARG4_TYPE.
8745 (regsets_fetch_inferior_registers): Cast third argument of
8746 ptrace to long then PTRACE_ARG3_TYPE.
8747 (regsets_store_inferior_registers): Likewise.
8748
38ea300a
PA
87492012-04-20 Pedro Alves <palves@redhat.com>
8750
8751 * configure: Regenerate.
8752
c971b7fa
PA
87532012-04-19 Pedro Alves <palves@redhat.com>
8754
43aaf8b6 8755 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 8756 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
8757 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
8758 (all, install-only, uninstall, clean-info, all-lib, clean): No
8759 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
8760 (maintainer-clean realclean distclean): Use subdir_do.
8761 (subdir_do): New.
8762 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 8763 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
8764 * acinclude.m4: Include acx_configure_dir.m4.
8765 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
8766 calls. Call AC_PROG_RANLIB. Configure gnulib using
8767 ACX_CONFIGURE_DIR.
8768 (GNULIB): New.
8769 (GNULIB_STDINT_H): Adjust.
8770 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
8771 * gdbreplay.c: Include build-gnulib/config.h.
8772 * server.h: Likewise.
8773 * aclocal.m4: Regenerate.
8774 * config.in: Regenerate.
8775 * configure: Regenerate.
c971b7fa 8776
809277f8
PA
87772012-04-19 Pedro Alves <palves@redhat.com>
8778
8779 * Makefile.in (LIBGNU, INCGNU): Adjust.
8780 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
8781 (all, install-only, uninstall, clean-info, all-lib, clean)
8782 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
8783 * configure.ac: Adjust AC_OUTPUT output.
8784 * aclocal.m4: Regenerate.
8785 * configure: Regenerate.
8786
fd9bb8b8
PA
87872012-04-19 Pedro Alves <palves@redhat.com>
8788
8789 * Makefile.in (generated_files): New.
8790 (server_h): Remove the explicit dependency on config.h, and depend
8791 on $generated_files.
8792
1c298c66
PA
87932012-04-19 Pedro Alves <palves@redhat.com>
8794
8795 * Makefile.in (INCGNU): Add -Ignulib.
8796
57c4b50b
PA
87972012-04-19 Pedro Alves <palves@redhat.com>
8798
8799 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
8800 (INCGNU): ... this, and spell out -I here.
8801 (GNULIB_LIB): Rename to ...
8802 (LIBGNU): ... this.
8803 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
8804
1030e047
PA
88052012-04-19 Pedro Alves <palves@redhat.com>
8806
8807 * config.in: Regenerate.
8808
447d4319
PA
88092012-04-19 Pedro Alves <palves@redhat.com>
8810
8811 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
8812 * server.h (memmem): Remove declaration.
8813 * config.in: Regenerate.
8814 * configure: Regenerate.
8815
aad9eab9
YQ
88162012-04-19 Yao Qi <yao@codesourcery.com>
8817
8818 * Makefile.in (SFILES): Add common/vec.c.
8819 (OBS): Add vec.o.
8820 (vec.o): New rule.
8821
3e10640f
YQ
88222012-04-19 Yao Qi <yao@codesourcery.com>
8823
8824 * remote-utils.c (prepare_resume_reply): Replace with macro
8825 target_core_of_thread.
8826 * server.c (handle_qxfer_threads_proper): Likewise.
8827 * target.h (traget_core_of_thread): New macro.
8828
71622373
PA
88292012-04-18 Pedro Alves <palves@redhat.com>
8830
8831 * aclocal.m4: Regenerate.
8832 * configure: Regenerate.
8833
80d26939
YQ
88342012-04-16 Yao Qi <yao@codesourcery.com>
8835
8836 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
8837 duplicated on address.
8838
42476b70
YQ
88392012-04-16 Yao Qi <yao@codesourcery.com>
8840
8841 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
8842 (struct tracepoint_action_ops) <send>: New field.
8843 (m_tracepoint_action_send, r_tracepoint_action_send): New.
8844 (agent_expr_send, x_tracepoint_action_send): New.
8845 (l_tracepoint_action_send): New.
8846 (cmd_qtdp): Download and install tracepoint
8847 according to `use_agent'.
8848 (run_inferior_command): Add one more parameter `len'.
8849 Update callers.
8850 (tracepoint_send_agent): New.
8851 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
8852
7bc83639
YQ
88532012-04-16 Yao Qi <yao@codesourcery.com>
8854
8855 * tracepoint.c (download_tracepoints): Moved to ...
8856 (cmd_qtstart): ... here.
8857
5f18041e
YQ
88582012-04-14 Yao Qi <yao@codesourcery.com>
8859
8860 * tracepoint.c: Include inttypes.h.
8861 (struct collect_memory_action): Use sized types.
8862 (struct tracepoint): Likewise.
8863 (cmd_qtdp, stop_tracing): Update print specifiers.
8864 (cmd_qtp, response_tracepoint): Likewise.
8865 (collect_data_at_tracepoint): Likewise.
8866 (collect_data_at_step): Likewise.
8867
55a8c076
YQ
88682012-04-14 Yao Qi <yao@codesourcery.com>
8869
8870 Import gnulib module inttypes.
8871 * aclocal.m4, config.in, configure: Regenerated.
8872
dc750257
YQ
88732012-04-14 Yao Qi <yao@codesourcery.com>
8874
8875 * Makefile.in (maintainer-clean, realclean, distclean): Remove
8876 Makefile and config.status at last.
8877
0ab5faf9
YQ
88782012-04-13 Yao Qi <yao@codesourcery.com>
8879
8880 * tracepoint.c: Include stdint.h unconditionally.
8881
18f5fd81
TJB
88822012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8883
8884 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
8885 on BFD_HAVE_SYS_PROCFS_TYPE.
8886 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
8887 * configure: Regenerate.
8888 * config.in: Likewise.
8889
4d47af5c
L
88902012-04-13 H.J. Lu <hongjiu.lu@intel.com>
8891
8892 * Makefile.in (clean): Also remove x32.c x32-linux.c
8893 x32-avx.c x32-avx-linux.c.
8894 (x32.o): New target.
8895 (x32.c): Likewise.
8896 (x32-linux.o): Likewise.
8897 (x32-linux.c): Likewise.
8898 (x32-avx.o): Likewise.
8899 (x32-avx.c): Likewise.
8900 (x32-avx-linux.o): Likewise.
8901 (x32-avx-linux.c): Likewise.
8902
8903 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
8904 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
8905 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
8906 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
8907 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
8908 i386/x32-avx-linux.xml.
8909
8910 * linux-x86-low.c (init_registers_x32_linux): New prototype.
8911 (init_registers_x32_avx_linux): Likwise.
8912 (x86_linux_update_xmltarget): Call init_registers_x32_linux
8913 or init_registers_x32_avx_linux if linux_is_elf64 is false.
8914
ecedbe58
PA
89152012-04-13 Pedro Alves <palves@redhat.com>
8916
8917 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
8918 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
8919 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
8920 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
8921 the sub-make.
8922
c92b5177
L
89232012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8924
8925 * linux-x86-low.c (compat_x32_clock_t): New.
8926 (compat_x32_siginfo_t): Likewise.
8927 (compat_x32_siginfo_from_siginfo): Likewise.
8928 (siginfo_from_compat_x32_siginfo): Likewise.
8929 (linux_is_elf64): Likewise.
8930 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8931 and siginfo_from_compat_x32_siginfo for x32.
8932 (x86_arch_setup): Set linux_is_elf64.
8933
214d508e
L
89342012-04-12 H.J. Lu <hongjiu.lu@intel.com>
8935
8936 PR gdb/13969
8937 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8938 e_machine field.
8939 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8940 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8941 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8942 compatible with process.
8943
c9a1864a
YQ
89442012-04-12 Yao Qi <yao@codesourcery.com>
8945
8946 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8947 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8948 (install-only, install-info, clean): Handle sub dir gnulib.
8949 (all-lib, am--refresh): New targets.
8950 (memmem.o): Remove target.
8951 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8952 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
8953 (AC_REPLACE_FUNCS): Remove memmem.
8954 Invoke gl_INIT and AM_INIT_AUTOMAKE.
8955 (AC_OUTPUT): Generate Makefile in gnulib/.
8956 * aclocal.m4, config.in, configure: Regenerated.
8957
367ba2c2
MR
89582012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
8959
8960 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8961
9d236627
PA
89622012-04-05 Pedro Alves <palves@redhat.com>
8963
8964 -Werror=strict-aliasing
8965
8966 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8967 pointer.
8968
111217b3
PA
89692012-04-04 Pedro Alves <palves@redhat.com>
8970
8971 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8972 (sparc_store_gregset_from_stack, sparc_store_gregset)
8973 (sparc_breakpoint_at): Fix formatting.
8974
8365dcf5
TJB
89752012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
8976
8977 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8978 are available.
8979 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8980 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8981 * config.in: Regenerate.
8982 * configure: Likewise.
8983
689cc2ae
PA
89842012-03-29 Pedro Alves <palves@redhat.com>
8985
8986 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8987 Correct ptrace arguments.
8988
c14dfd32
PA
89892012-03-28 Pedro Alves <palves@redhat.com>
8990
8991 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8992 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8993 (IA64_FR1_REGNUM): New defines.
8994 (ia64_fetch_register): New.
8995 (the_low_target): Install it.
8996 * linux-low.h (struct linux_target_ops) <fetch_register>: New
8997 field.
8998 * linux-low.c (linux_fetch_registers): Try the
8999 the_low_target.fetch_register hook first.
9000
9001 * linux-arm-low.c (the_low_target): Adjust.
9002 * linux-bfin-low.c (the_low_target): Adjust.
9003 * linux-cris-low.c (the_low_target): Adjust.
9004 * linux-crisv32-low.c (the_low_target): Adjust.
9005 * linux-m32r-low.c (the_low_target): Adjust.
9006 * linux-m68k-low.c (the_low_target): Adjust.
9007 * linux-mips-low.c (the_low_target): Adjust.
9008 * linux-ppc-low.c (the_low_target): Adjust.
9009 * linux-s390-low.c (the_low_target): Adjust.
9010 * linux-sh-low.c (the_low_target): Adjust.
9011 * linux-sparc-low.c (the_low_target): Adjust.
9012 * linux-tic6x-low.c (the_low_target): Adjust.
9013 * linux-x86-low.c (the_low_target): Adjust.
9014 * linux-xtensa-low.c (the_low_target): Adjust.
9015
63c88e13
PA
90162012-03-26 Pedro Alves <palves@redhat.com>
9017
9018 * server.c (handle_qxfer_libraries): Don't bail early if
9019 the_target->qxfer_libraries_svr4 is not NULL.
9020
fb723180
PA
90212012-03-26 Pedro Alves <palves@redhat.com>
9022
9023 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
9024
0afae3cf
PA
90252012-03-23 Pedro Alves <palves@redhat.com>
9026
9027 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
9028 "library-list-svr4" element's start tag when the the DSO list is
9029 empty.
9030
485f1ee4
PA
90312012-03-23 Pedro Alves <palves@redhat.com>
9032
9033 * linux-low.c (read_one_ptr): Read the inferior's pointer through
9034 a variable whose type size is the same as the inferior's pointer
9035 size.
9036
a5362b9a
TS
90372012-03-21 Thomas Schwinge <thomas@codesourcery.com>
9038
9039 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
9040 struct siginfo.
9041 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
9042 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
9043 * linux-low.h: Include <signal.h>.
9044 (struct siginfo): Remove forward declaration.
9045 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
9046 struct siginfo.
9047
d226c142
MF
90482012-03-21 Mike Frysinger <vapier@gentoo.org>
9049
9050 * .gitignore: Ignore more files.
9051
122f36ef
PA
90522012-03-19 Pedro Alves <palves@redhat.com>
9053 Jan Kratochvil <jan.kratochvil@redhat.com>
9054
9055 * server.c (cont_thread, general_thread): Add describing comments.
9056 (start_inferior): Clear `cont_thread'.
9057 (handle_v_cont): Don't set `cont_thread' if resuming all threads
9058 of a process.
9059
fc3e5175
YQ
90602012-03-15 Yao Qi <yao@codesourcery.com>
9061
9062 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
9063 handling to ...
9064 (cmd_qtdp): ... here.
9065
8d0d92cd
YQ
90662012-03-15 Yao Qi <yao@codesourcery.com>
9067
9068 * tracepoint.c (struct tracepoint_action_ops): New.
9069 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
9070 (m_tracepoint_action_download): New.
9071 (r_tracepoint_action_download): New.
9072 (x_tracepoint_action_download): New.
9073 (l_tracepoint_action_download): New.
9074 (add_tracepoint_action): Install `action->ops' according type.
9075 (download_tracepoint_1): Move code `download' function pointer
9076 of various tracepoint_action_ops.
9077
87b0bb13
JK
90782012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9079
9080 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
9081 linux_ptrace_attach_warnings.
9082
5f572dec
JK
90832012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
9084
9085 * Makefile.in (linux-ptrace.o): New.
9086 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
9087 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
9088 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
9089 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
9090 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
9091 of these targets.
9092 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
9093
f4647387
YQ
90942012-03-08 Yao Qi <yao@codesourcery.com>
9095 Pedro Alves <palves@redhat.com>
9096
9097 Fix PR server/13392.
9098 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
9099 offset of JMP insn.
9100 * tracepoint.c (remove_tracepoint): New.
9101 (cmd_qtdp): Call remove_tracepoint when failed to install.
9102
9b224c5e
PA
91032012-03-07 Pedro Alves <palves@redhat.com>
9104
9105 * linux-low.c (get_detach_signal): New.
9106 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
9107 Pass on pending signals to PTRACE_DETACH. Check the result of the
9108 ptrace call.
9109 * server.c (program_signals, program_signals_p): New.
9110 (handle_general_set): Handle QProgramSignals.
9111 * server.h (program_signals, program_signals_p): Declare.
9112
e237a7e2
JK
91132012-03-05 Pedro Alves <palves@redhat.com>
9114 Jan Kratochvil <jan.kratochvil@redhat.com>
9115
9116 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
9117 New comment why.
9118
5808517f
YQ
91192012-03-03 Yao Qi <yao@codesourcery.com>
9120
9121 * tracepoint.c (tracepoint_look_up_symbols): Update call to
9122 agent_look_up_symbols.
9123
58b4daa5
YQ
91242012-03-03 Yao Qi <yao@codesourcery.com>
9125
9126 * Makefile.in (linux-low.o): Keep dependence on agent.h.
9127 (linux-x86-low.o): Likewise.
9128 * server.h: Remove in_process_agent_loaded.
9129 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
9130 common/agent.c.
9131 Update callers.
9132
8ffcbaaf
YQ
91332012-03-03 Yao Qi <yao@codesourcery.com>
9134
9135 * tracepoint.c (gdb_agent_capability): New global.
9136 (in_process_agent_loaded_ust): Renamed to
9137 `in_process_agent_supports_ust'.
9138 Update callers.
9139 (in_process_agent_supports_ust): Call agent_capability_check.
9140 (clear_installed_tracepoints): Assert that agent supports
9141 agent.
9142
d1feda86
YQ
91432012-03-03 Yao Qi <yao@codesourcery.com>
9144
9145 * linux-low.c (linux_supports_agent): New.
9146 (linux_target_ops): Initialize field `supports_agent' with
9147 linux_supports_agent.
9148 * target.h (struct target_ops) <supports_agent>: New.
9149 (target_supports_agent): New macro.
9150 * server.c (handle_general_set): Handle packet 'QAgent'.
9151 (handle_query): Send `QAgent+'.
9152 * Makefile.in (server.o): Depends on agent.h.
9153
2fa291ac
YQ
91542012-03-03 Yao Qi <yao@codesourcery.com>
9155
9156 * Makefile.in (OBS): Add agent.o.
9157 Add new rule for agent.o.
9158 Track dependence of tracepoint.c on agent.h.
9159 * tracepoint.c (run_inferior_command_1):
9160 (run_inferior_command): Call agent_run_command.
9161 (gdb_ust_connect_sync_socket): Deleted. Move it to
9162 common/agent.c.
9163 (resume_thread, stop_thread): Likewise.
9164 (gdb_ust_socket_init): Renamed to ...
9165 (gdb_agent_socket_init): ... New.
9166 (gdb_ust_thread): Renamed to ...
9167 (gdb_agent_helper_thread): ... New.
9168 (gdb_ust_init): Move some code to ...
9169 (gdb_agent_init): ... here. New.
9170 [HAVE_UST]: Call gdb_ust_init.
9171 (initialize_tracepoint_ftlib): Call gdb_agent_init.
9172 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
9173 * config.in, configure: Regenerated.
9174
05044653
PA
91752012-03-02 Pedro Alves <palves@redhat.com>
9176
9177 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
9178 * linux-low.c (struct simple_pid_list): New.
9179 (stopped_pids): New a struct simple_pid_list pointer.
9180 (add_to_pid_list, pull_pid_from_list): New.
9181 (handle_extended_wait): Don't assume the first signal new children
9182 report is SIGSTOP. Adjust call to pull_pid_from_list.
9183 (linux_wait_for_lwp): Adjust.
9184
8d00225b
YQ
91852012-03-02 Yao Qi <yao@codesourcery.com>
9186
9187 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
9188 debug log.
9189
19560ba5
YQ
91902012-03-02 Yao Qi <yao@codesourcery.com>
9191
9192 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
9193 `stop_pc' and `tpoint'. Update caller.
9194
1faeff08
MR
91952012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
9196
9197 * linux-low.h (linux_target_ops): Add regset_bitmap member.
9198 * linux-low.c (use_linux_regsets): New macro.
9199 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
9200 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
9201 (linux_register_in_regsets): New function.
9202 (usr_fetch_inferior_registers): Skip registers covered by
9203 regsets.
9204 (usr_store_inferior_registers): Likewise.
9205 (usr_fetch_inferior_registers): New macro.
9206 (usr_store_inferior_registers): Likewise.
9207 (linux_fetch_registers): Handle mixed regset/non-regset targets.
9208 (linux_store_registers): Likewise.
9209 * linux-mips-low.c (init_registers_mips_dsp_linux): New
9210 prototype.
9211 (init_registers_mips64_dsp_linux): Likewise.
9212 (init_registers_mips_linux): New macro.
9213 (init_registers_mips_dsp_linux): Likewise.
9214 (mips_dsp_num_regs): Likewise.
9215 (DSP_BASE, DSP_CONTROL): New fallback macros.
9216 (mips_base_regs): New macro.
9217 (mips_regmap): Use it. Fix the size.
9218 (mips_dsp_regmap): New variable.
9219 (mips_dsp_regset_bitmap): Likewise.
9220 (mips_arch_setup): New function.
9221 (mips_cannot_fetch_register): Use the_low_target.regmap rather
9222 than mips_regmap.
9223 (mips_cannot_store_register): Likewise.
9224 (the_low_target): Update .arch_setup, .num_regs and .regmap
9225 initializers. Add .regset_bitmap initializer.
9226 * linux-arm-low.c (the_low_target): Add .regset_bitmap
9227 initializer.
9228 * linux-bfin-low.c (the_low_target): Likewise.
9229 * linux-cris-low.c (the_low_target): Likewise.
9230 * linux-crisv32-low.c (the_low_target): Likewise.
9231 * linux-ia64-low.c (the_low_target): Likewise.
9232 * linux-m32r-low.c (the_low_target): Likewise.
9233 * linux-m68k-low.c (the_low_target): Likewise.
9234 * linux-ppc-low.c (the_low_target): Likewise.
9235 * linux-s390-low.c (the_low_target): Likewise.
9236 * linux-sh-low.c (the_low_target): Likewise.
9237 * linux-sparc-low.c (the_low_target): Likewise.
9238 * linux-tic6x-low.c (the_low_target): Likewise.
9239 * linux-x86-low.c (the_low_target): Likewise.
9240 * linux-xtensa-low.c (the_low_target): Likewise.
9241 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
9242 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
9243 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
9244 srv_xmlfiles.
9245 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
9246 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
9247
c03e6ccc
YQ
92482012-02-29 Yao Qi <yao@codesourcery.com>
9249 Pedro Alves <palves@redhat.com>
9250
9251 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
9252 `step_over_finished' is true.
9253
644cebc9
PA
92542012-02-27 Pedro Alves <palves@redhat.com>
9255
9256 * linux-low.c (pid_is_stopped): Delete, moved to common/.
9257 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
9258
c14d7ab2
PA
92592012-02-27 Pedro Alves <palves@redhat.com>
9260
9261 PR server/9684
9262 * linux-low.c (pid_is_stopped): New.
9263 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
9264
412c89dd
LM
92652012-02-25 Luis Machado <lgustavo@codesourcery.com>
9266
9267 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
9268 of conditions.
9269
b745defe
MR
92702012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
9271
9272 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
9273
9f3a5c85
LM
92742012-02-24 Luis Machado <lgustavo@codesourcery>
9275
9276 * server.c (handle_query): Advertise support for target-side
9277 breakpoint condition evaluation.
9278 (process_point_options): New function.
9279 (process_serial_event): When inserting a breakpoint, check for
9280 a target-side condition that should be evaluated.
9281
9282 * mem-break.c: Include regcache.h and ax.h.
9283 (point_cond_list_t): New data structure.
9284 (breakpoint) <cond_list>: New field.
9285 (find_gdb_breakpoint_at): Make non-static.
9286 (delete_gdb_breakpoint_at): Clear any target-side
9287 conditions.
9288 (clear_gdb_breakpoint_conditions): New function.
9289 (add_condition_to_breakpoint): Likewise.
9290 (add_breakpoint_condition): Likewise.
9291 (gdb_condition_true_at_breakpoint): Likewise.
9292 (gdb_breakpoint_here): Return result directly instead
9293 of going through a local variable.
9294
9295 * mem-break.h (find_gdb_breakpoint_at): New prototype.
9296 (clear_gdb_breakpoint_conditions): Likewise.
9297 (add_breakpoint_condition): Likewise.
9298 (gdb_condition_true_at_breakpoint): Likewise.
9299
9300 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
9301 (need_step_over_p): Take target-side breakpoint condition into
9302 consideration.
9303
5e1dc496
LM
93042012-02-24 Luis Machado <lgustavo@codesourcery>
9305
9306 * server.h: Include tracepoint.h.
9307 (agent_mem_read, agent_get_trace_state_variable_value,
9308 agent_set_trace_state_variable_value,
9309 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
9310 get_set_tsv_func_addr): New prototypes.
9311
9312 * ax.h: New include file.
9313 * ax.c: New source file.
9314
9315 * tracepoint.c: Include ax.h.
9316 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
9317 agent_expr, eval_result_type): Move to ax.h.
9318 (parse_agent_expr): Rename to ...
9319 (gdb_parse_agent_expr): ... this, make it non-static and move
9320 to ax.h.
9321 (unparse_agent_expr) Rename to ...
9322 (gdb_unparse_agent_expr): ... this, make it non-static and move
9323 to ax.h.
9324 (eval_agent_expr): Rename to ...
9325 (eval_tracepoint_agent_expr): ... this.
9326 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
9327 forward declarations.
9328 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
9329 (agent_get_trace_state_variable_value): New function.
9330 (agent_set_trace_state_variable_value): New function.
9331 (cmd_qtdp): Call gdb_parse_agent_expr (...).
9332 (response_tracepoint): Call gdb_unparse_agent_expr (...).
9333 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
9334 (condition_true_at_tracepoint): Likewise.
9335 (parse_agent_expr): Rename to ...
9336 (gdb_parse_agent_expr): ... this and move to ax.c.
9337 (unparse_agent_expr): Rename to ...
9338 (gdb_unparse_agent_expr): ... this and move to ax.c.
9339 (gdb_agent_op_name): Move to ax.c.
9340 (eval_agent_expr): Rename to ...
9341 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
9342 and move to ax.c.
9343 (eval_tracepoint_agent_expr): New function.
9344 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 9345 non-static.
5e1dc496
LM
9346 (current_insn_ptr, emit_error, struct bytecode_address): Move to
9347 ax.c.
9348 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
9349 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
9350 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
9351 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
9352 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
9353 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
9354 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
9355 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
9356 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
9357 (compile_bytecodes): Remove forward declaration.
9358 (is_goto_target): Move to ax.c.
9359 (compile_bytecodes): Move to ax.c and call
9360 agent_get_trace_state_variable_value (...) and
9361 agent_set_trace_state_variable_value (...).
9362
9363 * Makefile.in: Update ax.c and IPA dependencies.
9364
277e4e52
PA
93652012-02-24 Pedro Alves <palves@redhat.com>
9366
9367 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
9368 (cmd_bigqtbuffer_circular): ... this. Only handle
9369 'QTBuffer:circular:'.
9370 (handle_tracepoint_general_set): Adjust.
9371
bf4c19f7
YQ
93722012-02-16 Yao Qi <yao@codesourcery.com>
9373
9374 * inferiors.c: Move code to ...
9375 * dll.c: .... here. New.
9376 * server.h: Declare clear_dlls.
9377 * Makefile.in (SFILES): Add dll.c.
9378 (OBS): Add dll.o
9379 (dll.o): New rule.
9380
d73f2619
YQ
93812012-02-11 Yao Qi <yao@codesourcery.com>
9382
9383 * server.c: (handle_monitor_command): Add a new parameter
9384 `own_buf'.
9385 (handle_query): Update caller.
9386
f8255c2a
JB
93872012-02-09 Joel Brobecker <brobecker@adacore.com>
9388
9389 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
9390 * configure, config.in: Regenerate.
9391 * hostio.c: Provide an alternate implementation if HAVE_READLINK
9392 is not defined.
9393
da84f473
PA
93942012-02-02 Pedro Alves <palves@redhat.com>
9395
9396 Try SIGKILL first, then PTRACE_KILL.
9397 * linux-low.c (linux_kill_one_lwp): New.
9398 (linux_kill_one_lwp): Rename to ...
9399 (kill_one_lwp_callback): ... this. Use the new
9400 linux_kill_one_lwp.
9401
e886a173
PA
94022012-02-02 Pedro Alves <palves@redhat.com>
9403
9404 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
9405 inferior.
9406
be07f1a2
PA
94072012-01-27 Pedro Alves <palves@redhat.com>
9408
9409 * linux-low.c (linux_child_pid_to_exec_file): Delete.
9410 (elf_64_file_p): Make static.
9411 (linux_pid_exe_is_elf_64_file): New.
9412 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
9413 Delete declarations.
9414 (linux_pid_exe_is_elf_64_file): Declare.
9415 * linux-x86-low.c (x86_arch_setup): Use
9416 linux_pid_exe_is_elf_64_file.
9417
d8301ad1
JK
94182012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
9419
9420 * linux-low.c (linux_wait_for_event_1): Rename to ...
9421 (linux_wait_for_event): ... here and merge it with former
9422 linux_wait_for_event - new variable wait_ptid, use it.
9423 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
9424
01b17894
PA
94252012-01-23 Pedro Alves <palves@redhat.com>
9426
9427 * server.c (main): Avoid yet another case of infinite loop while
9428 detaching/killing after a longjmp.
9429
e825046f
JK
94302012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
9431
9432 Code cleanup.
9433 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
9434
b9e7b9c3
UW
94352012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
9436
9437 * hostio.c (handle_readlink): New function.
9438 (handle_vFile): Call it to handle "vFile:readlink" packets.
9439
901f9912
UW
94402012-01-20 Pedro Alves <palves@redhat.com>
9441 Ulrich Weigand <ulrich.weigand@linaro.org>
9442
9443 * server.c (handle_v_requests): Only support vAttach and vRun to
9444 start multiple processes when in extended protocol mode.
9445
fc1ab1a0
PA
94462012-01-17 Pedro Alves <palves@redhat.com>
9447
9448 * tracepoint.c (initialize_tracepoint): Use mmap instead of
9449 memalign plus mprotect to allocate the scratch buffer.
9450
7d5d4e98
PA
94512012-01-13 Pedro Alves <palves@redhat.com>
9452
9453 * server.c (attach_inferior): Clear `cont_thread'.
9454
f128d5e9
PA
94552012-01-13 Pedro Alves <palves@redhat.com>
9456
9457 * server.c (main): Avoid infinite loop while detaching/killing
9458 after a longjmp.
9459
06db92f0
DE
94602012-01-09 Doug Evans <dje@google.com>
9461
9462 * server.c (start_inferior): Set last_ptid in --wrapper case.
9463
32d92999
YQ
94642012-01-06 Yao Qi <yao@codesourcery.com>
9465
9466 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
9467 defined.
9468 [IN_PROCESS_AGENT] (debug_agent): New global variable.
9469
5e0a92a9
YQ
94702012-01-04 Yao Qi <yao@codesourcery.com>
9471
9472 * tracepoint.c (cmd_qtdp): Print debug message
9473 for static tracepoint.
9474
ae639e8c
YQ
94752012-01-04 Yao Qi <yao@codesourcery.com>
9476
9477 * tracepoint.c (trace_vdebug): Differentiate debug message
9478 between gdbserver and IPA.
9479
f72429c5
YQ
94802012-01-03 Yao Qi <yao@codesourcery.com>
9481
9482 * tracepoint.c (tracepoint_was_hit): Don't collect for
9483 static tracepoint.
9484
12c3e59c
JB
94852012-01-02 Joel Brobecker <brobecker@adacore.com>
9486
9487 * terminal.h: Reformat copyright header.
9488
67827812
JB
94892012-01-02 Joel Brobecker <brobecker@adacore.com>
9490
9491 * server.c (gdbserver_version): Update copyright year.
9492 * gdbreplay.c (gdbreplay_version): Likewise.
9493
3e52c33d
JK
94942011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
9495
9496 * linux-low.c (linux_create_inferior): Put empty if clause for write.
9497
9498 Revert:
9499 2011-12-18 Hui Zhu <teawater@gmail.com>
9500 * linux-low.c (linux_create_inferior): Save return value to ret.
9501
66f1260e
HZ
95022011-12-18 Hui Zhu <teawater@gmail.com>
9503
9504 * linux-low.c (linux_create_inferior): Save return value to ret.
9505
e77616d7
DE
95062011-12-16 Doug Evans <dje@google.com>
9507
e7b06c57
DE
9508 * linux-low.c (linux_create_inferior): If stdio connection,
9509 redirect stdin from /dev/null, stdout to stderr.
9510 * remote-utils.c (remote_is_stdio): New static global.
9511 (remote_connection_is_stdio): New function.
9512 (remote_prepare): Handle stdio connection.
9513 (remote_open): Ditto.
9514 (remote_close): Don't close stdin for stdio connections.
9515 (read_prim,write_prim): New functions. Replace all calls to
9516 read/write to these.
9517 * server.c (main): Watch for "-" argument. Move call to
9518 remote_prepare before start_inferior.
9519 * server.h (STDIO_CONNECTION_NAME): New macro.
9520 (remote_connection_is_stdio): Declare.
9521
e77616d7
DE
9522 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
9523 in debugging output.
9524
82067193
YQ
95252011-12-15 Yao Qi <yao@codesourcery.com>
9526
9527 * tracepoint.c: Include sys/syscall.h.
9528 (gdb_ust_thread): Remove preprocessor conditional.
9529
82bfbe7e
PA
95302011-12-14 Pedro Alves <pedro@codesourcery.com>
9531
9532 * linux-low.c (linux_detach_one_lwp): Call
9533 the_low_target.prepare_to_resume before detaching.
9534
712c6575
YQ
95352011-12-14 Yao Qi <yao@codesourcery.com>
9536
9537 * tracepoint.c (gdb_ust_thread): Don't ignore return value
9538 of write.
9539
d54d1edf
YQ
95402011-12-14 Yao Qi <yao@codesourcery.com>
9541
9542 * i386-low.c (i386_low_stopped_data_address): Initialize local
9543 variable `control'.
9544
6210a125
PA
95452011-12-13 Pedro Alves <pedro@codesourcery.com>
9546
9547 PR remote/13492
9548
9549 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
9550 DR_CONTROL unless necessary. Extend comments.
9551 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
9552 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
9553
2ece8244
YQ
95542011-12-13 Yao Qi <yao@codesourcery.com>
9555
9556 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
9557 macros.
9558 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
9559
784867a5
JK
95602011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
9561
9562 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
9563 Print new debug message for such case.
9564
6bf36717
JK
95652011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
9566
9567 Fix overlapping memcpy.
9568 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
9569 the read_inferior_memory transfer.
9570 (delete_fast_tracepoint_jump): New variable buf. Use it for the
9571 write_inferior_memory transfer.
9572 (set_fast_tracepoint_jump): New variable buf. Use it for the
9573 read_inferior_memory and write_inferior_memory transfers.
9574 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
9575 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
9576 Use it for the write_inferior_memory transfer.
9577 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
9578 buffers.
9579
50275556
MR
95802011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9581
9582 * linux-low.c (fetch_register, store_register): Make code
9583 consistent, fix formatting.
9584
7325beb4
MR
95852011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
9586
9587 * linux-low.c (usr_store_inferior_registers): Factor out code
9588 to handle individual registers into...
9589 (store_register): ... this new function.
9590
c642a434
UW
95912011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
9592
9593 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
9594 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
9595 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
9596 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
9597 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
9598 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
9599 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
9600 (srv_xmlfiles): Add new XML files.
9601
9602 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
9603 and <sys/uio.h>.
9604 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
9605 (init_registers_s390_linux32v1): Add prototype.
9606 (init_registers_s390_linux32v2): Likewise.
9607 (init_registers_s390_linux64v1): Likewise.
9608 (init_registers_s390_linux64v2): Likewise.
9609 (init_registers_s390x_linux64v1): Likewise.
9610 (init_registers_s390x_linux64v2): Likewise.
9611 (s390_num_regs): Increment to 52.
9612 (s390_regmap): Add orig_r2 register.
9613 (s390_num_regs_3264): Increment to 68.
9614 (s390_regmap_3264): Add orig_r2 register.
9615 (s390_collect_ptrace_register): Handle orig_r2 register.
9616 (s390_supply_ptrace_register): Likewise.
9617 (s390_fill_last_break): New function.
9618 (s390_store_last_break): Likewise.
9619 (s390_fill_system_call): New function.
9620 (s390_store_system_call): Likewise.
9621 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
9622 register sets.
9623 (s390_check_regset): New function.
9624 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
9625 NT_S390_SYSTEM_CALL regsets and use appropriate description.
9626 Update target_regsets for available register sets.
9627
2268b414
JK
96282011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
9629 Jan Kratochvil <jan.kratochvil@redhat.com>
9630
9631 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
9632 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
9633 New.
9634 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
9635 * linux-low.h (struct process_info_private): New member r_debug.
9636 * server.c (handle_qxfer_libraries): Call
9637 the_target->qxfer_libraries_svr4.
9638 (handle_qxfer_libraries_svr4): New function.
9639 (qxfer_packets): New entry "libraries-svr4".
9640 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
9641 * target.h (struct target_ops): New member qxfer_libraries_svr4.
9642 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
9643 PACKET_qXfer_libraries_svr4.
9644
d6db1fab
UW
96452011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
9646
9647 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
9648 PSW address/mask between 8-byte and 16-byte formats.
9649 (s390_supply_ptrace_register): Likewise.
9650 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
9651 basic addressing mode bit.
9652
242f5f1c
SS
96532011-11-24 Stan Shebs <stan@codesourcery.com>
9654
9655 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
9656
f196051f
SS
96572011-11-17 Stan Shebs <stan@codesourcery.com>
9658
9659 * tracepoint.c (struct tracepoint): New field traceframe_usage.
9660 (tracing_start_time): New global.
9661 (tracing_stop_time): New global.
9662 (tracing_user_name): New global.
9663 (tracing_notes): New global.
9664 (tracing_stop_note): New global.
9665 (cmd_qtstart): Set traceframe_usage, start_time.
9666 (stop_tracing): Set stop_time.
9667 (cmd_qtstatus): Report additional status.
9668 (cmd_qtp): New function.
9669 (handle_tracepoint_query): Call it.
9670 (cmd_qtnotes): New function.
9671 (handle_tracepoint_general_set): Call it.
9672 (get_timestamp): Rename from tsv_get_timestamp.
9673
405f8e94
SS
96742011-11-14 Stan Shebs <stan@codesourcery.com>
9675 Kwok Cheung Yeung <kcy@codesourcery.com>
9676
9677 * linux-x86-low.c (small_jump_insn): New.
9678 (i386_install_fast_tracepoint_jump_pad): Add arguments for
9679 trampoline and error message, build a trampoline and issue a small
9680 jump instruction to it.
9681 (x86_install_fast_tracepoint_jump_pad): Add arguments for
9682 trampoline and error message.
9683 (x86_get_min_fast_tracepoint_insn_len): New.
9684 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
9685 * linux-low.h (struct linux_target_ops): Add arguments to
9686 install_fast_tracepoint_jump_pad operation, add new operation.
9687 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
9688 arguments.
9689 (linux_get_min_fast_tracepoint_insn_len): New function.
9690 (linux_target_op): Add new operation.
9691 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
9692 (gdb_trampoline_buffer_end): Ditto.
9693 (gdb_trampoline_buffer_error): Ditto.
9694 (struct ipa_sym_addresses): Add fields for new IPA variables.
9695 (symbol_list): Add entries for new IPA variables.
9696 (struct tracepoint): Add fields to hold the address range of the
9697 trampoline used by the tracepoint.
9698 (trampoline_buffer_head): New static variable.
9699 (trampoline_buffer_tail): Ditto.
9700 (claim_trampoline_space): New function.
9701 (have_fast_tracepoint_trampoline_buffer): New function.
9702 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
9703 structure.
9704 (install_fast_tracepoint): Ditto, also add error buffer argument.
9705 (cmd_qtminftpilen): New function.
9706 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
9707 (fast_tracepoint_from_trampoline_address): New function.
9708 (fast_tracepoint_collecting): Handle trampoline as part of jump
9709 pad space.
9710 (set_trampoline_buffer_space): New function.
9711 (initialize_tracepoint): Initialize new IPA variables.
9712 * target.h (struct target_ops): Add arguments to
9713 install_fast_tracepoint_jump_pad operation, add new
9714 get_min_fast_tracepoint_insn_len operation.
9715 (target_get_min_fast_tracepoint_insn_len): New.
9716 (install_fast_tracepoint_jump_pad): Add arguments.
9717 * server.h (IPA_BUFSIZ): Define.
9718 * linux-i386-ipa.c: Include extra header files.
9719 (initialize_fast_tracepoint_trampoline_buffer): New function.
9720 (initialize_low_tracepoint): Call it.
9721 * server.h (set_trampoline_buffer_space): Declare.
9722 (claim_trampoline_space): Ditto.
9723 (have_fast_tracepoint_trampoline_buffer): Ditto.
9724
1e4d1764
YQ
97252011-11-14 Yao Qi <yao@codesourcery.com>
9726
9727 * server.c (handle_query): Handle InstallInTrace for qSupported.
9728 * tracepoint.c (add_tracepoint): Sort list.
9729 (install_tracepoint, download_tracepoint): New.
9730 (cmd_qtdp): Call them to install and download tracepoints.
9731 (sort_tracepoints): Removed.
9732 (cmd_qtstart): Update.
9733
5c73ff4e
YQ
97342011-11-14 Yao Qi <yao@codesourcery.com>
9735
9736 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
9737 * mem-break.h: Declare.
9738 * tracepoint.c (cmd_qtstart): Move some code to ...
9739 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
9740 New.
9741 (download_tracepoints): Move some code to ...
9742 (download_tracepoint_1): ... here. New.
9743
86a30030
YQ
97442011-11-08 Yao Qi <yao@codesourcery.com>
9745
9746 * remote-utils.c (relocate_instruction): A comment fix.
9747
8d26e50c
JB
97482011-11-07 Joel Brobecker <brobecker@adacore.com>
9749
9750 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
9751 (i386_dr_low_get_control, i386_dr_low_get_status): Use
9752 dr_status_mirror and dr_control_mirror from debug_reg_state.
9753 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
9754 (i386_initial_stuff): Remove use of deleted globals.
9755 (i386_get_thread_context, i386_set_thread_context,
9756 i386_thread_added): Use dr_status_mirror and dr_control_mirror
9757 from debug_reg_state.
9758
a59306a3
YQ
97592011-11-05 Yao Qi <yao@codesourcery.com>
9760
9761 * tracepoint.c (gdb_collect): Loop over tracepoints of same
9762 address as TPOINT's.
9763
3065dfb6
SS
97642011-11-02 Stan Shebs <stan@codesourcery.com>
9765
9766 * tracepoint.c (agent_mem_read_string): New function.
9767 (eval_agent_expr): Call it for tracenz.
9768 * server.c (handle_query): Report support for tracenz.
9769
fd0d8c7c
YQ
97702011-11-02 Yao Qi <yao@codesourcery.com>
9771
9772 * tracepoint.c (cmd_qtstart): Remove unused local variables.
9773
609086b1
YQ
97742011-11-02 Yao Qi <yao@codesourcery.com>
9775
9776 * target.h: Fix a typo in comment.
9777
b9fd1791
PA
97782011-10-31 Pedro Alves <pedro@codesourcery.com>
9779
9780 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
9781 clobber the breakpoints' shadows with fast tracepoint jumps.
9782 * mem-break.h (check_mem_write): Add `myaddr' parameter.
9783 * target.c (write_inferior_memory): Also pass MYADDR down to
9784 check_mem_write.
9785
03583c20
UW
97862011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
9787
9788 * configure.ac: Check support for personality routine.
9789 * configure: Regenerate.
9790 * config.in: Likewise.
9791 * linux-low.c: Include <sys/personality.h>.
9792 Define ADDR_NO_RANDOMIZE if necessary.
9793 (linux_create_inferior): Disable address space randomization when
9794 forking inferior, if requested.
9795 (linux_supports_disable_randomization): New function.
9796 (linux_target_ops): Install it.
9797 * server.h (disable_randomization): Declare.
9798 * server.c (disable_randomization): New global variable.
9799 (handle_general_set): Handle QDisableRandomization.
9800 (handle_query): Likewise for qSupported.
9801 (main): Support --disable-randomization and --no-disable-randomization
9802 command line arguments.
9803 * target.h (struct target_ops): Add supports_disable_randomization.
9804 (target_supports_disable_randomization): New macro.
9805
723b724b
MF
98062011-09-29 Mike Frysinger <vapier@gentoo.org>
9807
9808 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
9809 ifdef check.
9810 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
9811 [!PT_GETDSBT] (target_loadmap): New definition.
9812 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
9813 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
9814 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
9815 and PT_GETDSBT to LINUX_LOADMAP.
9816 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
9817 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
9818
55329a5c 98192011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
9820
9821 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
9822 (arm_linux_hwbp_cap): New static variable.
9823 (arm_linux_get_hwbp_cap): Replace by ...
9824 (arm_linux_init_hwbp_cap): ... this new function.
9825 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
9826 (arm_linux_get_hw_watchpoint_count): Likewise.
9827 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9828 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
9829 (arm_prepare_to_resume): Use perror_with_name instead of error.
9830
55329a5c 98312011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
9832
9833 * linux-arm-low.c: Include <signal.h>.
9834 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
9835 (struct arm_linux_hwbp_cap): New data type.
9836 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
9837 (struct arm_linux_hw_breakpoint): New data type.
9838 (MAX_BPTS, MAX_WPTS): Define.
9839 (struct arch_process_info, struct arch_lwp_info): New data types.
9840 (arm_linux_get_hwbp_cap): New function.
9841 (arm_linux_get_hw_breakpoint_count): Likewise.
9842 (arm_linux_get_hw_watchpoint_count): Likewise.
9843 (arm_linux_get_hw_watchpoint_max_length): Likewise.
9844 (arm_hwbp_control_initialize): Likewise.
9845 (arm_hwbp_control_is_enabled): Likewise.
9846 (arm_hwbp_control_is_initialized): Likewise.
9847 (arm_hwbp_control_disable): Likewise.
9848 (arm_linux_hw_breakpoint_equal): Likewise.
9849 (arm_linux_hw_point_initialize): Likewise.
9850 (struct update_registers_data): New data structure.
9851 (update_registers_callback: New function.
9852 (arm_insert_point): Likewise.
9853 (arm_remove_point): Likewise.
9854 (arm_stopped_by_watchpoint): Likewise.
9855 (arm_stopped_data_address): Likewise.
9856 (arm_new_process): Likewise.
9857 (arm_new_thread): Likewise.
9858 (arm_prepare_to_resume): Likewise.
9859 (the_low_target): Register arm_insert_point, arm_remove_point,
9860 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
9861 arm_new_thread, and arm_prepare_to_resume.
9862
6b9801d4
SS
98632011-09-15 Stan Shebs <stan@codesourcery.com>
9864
9865 * server.h (struct emit_ops): Add compare-goto fields.
9866 * tracepoint.c (gdb_agent_op_sizes): New table.
9867 (emit_eq_goto): New function.
9868 (emit_ne_goto): New function.
9869 (emit_lt_goto): New function.
9870 (emit_le_goto): New function.
9871 (emit_gt_goto): New function.
9872 (emit_ge_goto): New function.
9873 (is_goto_target): New function.
9874 (compile_bytecodes): Recognize special cases of compare-goto
9875 combinations and call specialized emitters for them.
9876 * linux-x86-low.c (amd64_emit_eq_goto): New function.
9877 (amd64_emit_ne_goto): New function.
9878 (amd64_emit_lt_goto): New function.
9879 (amd64_emit_le_goto): New function.
9880 (amd64_emit_gt_goto): New function.
9881 (amd64_emit_ge_goto): New function.
9882 (amd64_emit_ops): Add the new functions.
9883 (i386_emit_eq_goto): New function.
9884 (i386_emit_ne_goto): New function.
9885 (i386_emit_lt_goto): New function.
9886 (i386_emit_le_goto): New function.
9887 (i386_emit_gt_goto): New function.
9888 (i386_emit_ge_goto): New function.
9889 (i386_emit_ops): Add the new functions.
9890
bf15cbda
SS
98912011-09-08 Stan Shebs <stan@codesourcery.com>
9892
9893 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
9894 (i386_emit_epilogue): Restore %ebx.
9895
943ca1dd
JZ
98962011-08-31 Jie Zhang <jzhang918@gmail.com>
9897
9898 * server.c (step_thread): Remove definition.
9899 (process_serial_event): Don't handle Hs.
9900 * server.h (step_thread): Remove declaration.
9901 * target.c (set_desired_inferior): Remove use of step_thread.
9902
e3deef73
LM
99032011-08-24 Luis Machado <lgustavo@codesourcery.com>
9904
9905 * linux-low.c: Include linux-procfs.h.
9906 (linux_attach_lwp_1): Update comments.
9907 (linux_attach): Scan for existing threads when attaching to a
9908 process that is the tgid.
9909 * Makefile.in: Update dependencies.
9910
13da1c97
LM
99112011-08-24 Luis Machado <lgustavo@codesourcery.com>
9912
9913 * configure.srv: Add linux-procfs.o dependencies.
9914
881127c9
YQ
99152011-08-14 Yao Qi <yao@codesourcery.com>
9916
9917 * target.h (struct target_ops): Fix indent.
9918 * win32-low.c (win32_target_ops): Fix comment.
9919
58dbd541
YQ
99202011-08-14 Andrew Jenner <andrew@codesourcery.com>
9921 Yao Qi <yao@codesourcery.com>
9922
9923 * Makefile.in (clean): Remove tic6x-*.c files.
9924 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
9925 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9926 (tic6x-c64xp-linux.c): Likewise.
9927 * configure.srv: Add support for tic6x-*-uclinux.
9928 * linux-tic6x-low.c: New.
9929 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9930
78d85199
YQ
99312011-08-14 Andrew Stubbs <ams@codesourcery.com>
9932 Yao Qi <yao@codesourcery.com>
9933
9934 * target.h (struct target_ops): Add read_loadmap.
9935 * linux-low.c (struct target_loadseg): New type.
9936 (struct target_loadmap): New type.
9937 (linux_read_loadmap): New function.
9938 (linux_target_ops): Add linux_read_loadmap.
9939 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
9940 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9941 to NULL.
78d85199 9942
a959a88d
EZ
99432011-08-05 Eli Zaretskii <eliz@gnu.org>
9944
9945 * win32-low.c: Include <stdint.h>.
9946
1ced966e
PA
99472011-07-22 Pedro Alves <pedro@codesourcery.com>
9948
9949 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9950 to the inferior here.
9951 (i386_remove_aligned_watchpoint): Ditto.
9952 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9953 fit part of the watchpoint in the debug registers.
9954 (i386_update_inferior_debug_regs): New.
9955 (i386_low_insert_watchpoint): Work on a local mirror of the debug
9956 registers, and only update the inferior on success.
9957 (i386_low_remove_watchpoint): Ditto.
9958
d26e3629
KY
99592011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
9960
9961 * linux-low.c (compare_ints, unique, list_threads, show_process,
9962 linux_core_of_thread): Delete.
9963 (linux_target_ops): Change linux_core_of_thread to
9964 linux_common_core_of_thread.
9965 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9966 * utils.c (malloc_failure): Change type of argument.
9967 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9968 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9969 common/linux-osdata.c, common/ptid.c and common/buffer.c.
9970 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9971 (IPA_OBJS): Add common-utils-ipa.o.
9972 (ptid_h, linux_osdata_h): New macros.
9973 (server_h): Add common/common-utils.h, common/xml-utils.h,
9974 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9975 common/ptid.h.
9976 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9977 ptid.o, buffer.o): New rules.
9978 (linux-low.o): Add common/linux-osdata.h as a dependency.
9979 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9980 * configure.ac: Add AC_HEADER_DIRENT check.
9981 * config.in: Regenerate.
9982 * configure: Regenerate.
9983 * remote-utils.c (xml_escape_text): Delete.
9984 (buffer_grow, buffer_free, buffer_init, buffer_finish,
9985 buffer_xml_printf): Move to common/buffer.c.
9986 * server.c (main): Remove call to initialize_inferiors.
9987 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9988 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9989 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9990 internal_error, gdb_assert, gdb_assert_fail): Delete.
9991 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9992 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9993 common/buffer.h.
9994 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9995 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9996 initialize_inferiors): Delete.
9997
2275a1a7
PA
99982011-07-20 Pedro Alves <pedro@codesourcery.com>
9999
10000 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
10001 symbol error.
10002
0a5b1e09
PA
100032011-05-31 Pedro Alves <pedro@codesourcery.com>
10004
10005 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
10006 assertion.
10007 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
10008
6938fd34
YQ
100092011-05-26 Yao Qi <yao@codesourcery.com>
10010
10011 * Makefile.in (thread-db.o): Track dependence to
10012 common/gdb_thread_db.h.
10013 * thread-db.c: include gdb_thread_db.h from right place.
10014
b481f9e0
TT
100152011-05-16 Adrian Cornish <gnu@bluedreamer.com>
10016
10017 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
10018 __FILE__ and __LINE__ to internal_error.
10019
98a5dd13
DE
100202011-05-13 Doug Evans <dje@google.com>
10021
10022 * thread-db.c (try_thread_db_load_from_sdir): New function.
10023 (try_thread_db_load_from_dir): New function.
10024 (thread_db_load_search): Handle $sdir, ignore $pdir.
10025 Remove trying of system directories if search of
10026 libthread-db-search-path fails, that is now done via $sdir.
10027
d248b706
KY
100282011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
10029
10030 * server.c (handle_query): Add EnableDisableTracepoints to the list
10031 of supported features.
43aaf8b6 10032 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 10033 tracepoints.
43aaf8b6
PA
10034 (cmd_qtenable_disable): New.
10035 (cmd_qtstart): Install tracepoints even if disabled.
10036 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
10037 receiving a QTEnable or QTDisable packet.
10038 (gdb_collect): Skip data collection if fast tracepoint is disabled.
10039 (ust_marker_to_static_tracepoint): Do not ignore disabled static
10040 tracepoints.
10041 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 10042
84e578fb
DE
100432011-05-10 Doug Evans <dje@google.com>
10044
10045 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
10046
71f55dd8
DE
100472011-05-04 Doug Evans <dje@google.com>
10048
10049 * linux-low.c (linux_join): Skip process lookup.
10050 * spu-low.c (spu_join): Ditto.
10051 * server.c (join_inferiors_callback): Delete.
10052 (process_serial_event): For 'D' packet (detach) call join_inferior
10053 directly.
10054
4d393d60
JM
100552011-05-04 Joseph Myers <joseph@codesourcery.com>
10056
10057 * README: Don't mention xscale*-*-linux*.
10058 * configure.srv (xscale*-*-linux*): Don't handle target.
10059
b00ad6ff
NF
100602011-04-27 Nathan Froyd <froydnj@codesourcery.com>
10061
10062 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
10063 casting pointers.
10064 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
10065 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
10066 (i386_emit_void_call_2): Likewise.
10067
af96c192
YQ
100682011-04-26 Yao Qi <yao@codesourcery.com>
10069
43aaf8b6
PA
10070 * linux-low.c: Move common macros to linux-ptrace.h.
10071 Include linux-ptrace.h.
af96c192
YQ
10072 * Makefile.in (linux_ptrace_h): New.
10073 (linux-low.o): Depends on linux-ptrace.h.
10074
03f2bd59
JK
100752011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
10076
10077 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
10078 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
10079 (remote_prepare): New function with most of the TCP code from ...
10080 (remote_open): ... here. Detect PORT here unconditionally. Move also
10081 setting transport_is_reliable.
10082 * server.c (run_once): New variable.
10083 (gdbserver_usage): Document it.
10084 (main): Set run_once for `--once'. Call remote_prepare. Exit after
10085 the first run if RUN_ONCE.
10086 * server.h (run_once, remote_prepare): New declarations.
10087
7a9dd1b2
TT
100882011-04-19 Tom Tromey <tromey@redhat.com>
10089
10090 * win32-low.c (handle_load_dll): Remove duplicate "the".
10091
81239425
PM
100922011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
10093
10094 Remove support for old Cygwin 1.5 versions.
10095 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
10096 function to avoid warning.
10097 (win32_add_one_solib): Use cygwin_conv_path function to avoid
10098 warning.
10099
9e0627f1
PM
101002011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
10101
10102 * gdbserver/server.h (Macro _): Define it if not available.
10103
588eebee
MS
101042011-03-14 Michael Snyder <msnyder@vmware.com>
10105
348af9f7 10106 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 10107
43f70d4c
JB
101082011-03-10 Joel Brobecker <brobecker@adacore.com>
10109
10110 * Makefile.in (maintainer-clean realclean distclean): Remove
10111 "make ... subdir_do" command.
10112
348af9f7
MS
101132011-03-10 Michael Snyder <msnyder@vmware.com>
10114
10115 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
10116
10117 * server.c (handle_v_run): Free alloced buffer on early return.
10118
e637a4f5
YQ
101192011-03-09 Yao Qi <yao@codesourcery.com>
10120
10121 Revert:
10122 2011-03-04 Yao Qi <yao@codesourcery.com>
10123
10124 * Makefile.in: Remove GNU make feature --directory.
10125
10126 2011-03-05 Yao Qi <yao@codesourcery.com>
10127
10128 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10129 (subdir_do): New make target. Copied from gdb/Makefile.
10130 (maintainer-clean, realclean, distclean, clean): Call corresponding
10131 make targets in common/Makefile.
10132
10133 2011-02-11 Yao Qi <yao@codesourcery.com>
10134
10135 * configure.ac: Call AC_PROG_RANLIB.
10136 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10137 * configure: Regenerate.
10138
e6edda56
JK
101392011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10140
10141 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
10142
e5141119
JB
101432011-03-06 Yao Qi <yao@codesourcery.com>
10144
10145 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
10146
64794aa4
JB
101472011-03-05 Yao Qi <yao@codesourcery.com>
10148
10149 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
10150 (subdir_do): New make target. Copied from gdb/Makefile.
10151 (maintainer-clean, realclean, distclean, clean): Call corresponding
10152 make targets in common/Makefile.
10153
7a762829
YQ
101542011-03-04 Yao Qi <yao@codesourcery.com>
10155
10156 * Makefile.in: Remove GNU make feature --directory.
10157
348af9f7
MS
101582011-03-04 Michael Snyder <msnyder@vmware.com>
10159
10160 * server.c (queue_stop_reply): Call xmalloc not malloc.
10161
101622011-03-02 Michael Snyder <msnyder@vmware.com>
10163
10164 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
10165
9f72fee2
MS
101662011-02-28 Michael Snyder <msnyder@vmware.com>
10167
588eebee
MS
10168 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
10169 (cmd_qtframe): Ditto.
10170 (cmd_qtbuffer): Ditto.
10171 (cmd_bigqtbuffer): Ditto.
10172
9f72fee2
MS
10173 * utils.c (decimal2str): Initialize 'width' to nine, then
10174 don't mess with it.
10175
8040bd49
UW
101762011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10177
10178 * hostio.c (require_data): Free *data, not data.
10179
7e52cbd0
JK
101802011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10181
10182 * hostio.c (require_data): Use free, not xfree.
10183
9130f83e
MS
101842011-02-27 Michael Snyder <msnyder@vmware.com>
10185
4b812f4e
MS
10186 * server.c (handle_query): Discard unused value.
10187
9130f83e
MS
10188 * hostio.c (require_data): Free malloc memory before returning
10189 error.
10190
69d37113
MS
101912011-02-26 Michael Snyder <msnyder@vmware.com>
10192
10193 * linux-low.c (list_threads): Call closedir for dirent.
10194
35f5825a
MS
101952011-02-27 Michael Snyder <msnyder@vmware.com>
10196
2a589cef
MS
10197 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
10198 a case statement falls through.
10199
0adea5f7
MS
10200 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
10201
35f5825a
MS
10202 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
10203 in comparison.
10204
238f1c74
MS
102052011-02-26 Michael Snyder <msnyder@vmware.com>
10206
10207 * utils.c (decimal2str): Eliminate dead code and dead param.
10208 (pulongest): Drop dead param from call to decimal2str.
10209 (plongest): Ditto.
10210
633ff500
JB
102112011-02-24 Joel Brobecker <brobecker@adacore.com>
10212
10213 Revert the following patch (not approved yet):
10214 2011-02-21 Hui Zhu <teawater@gmail.com>
10215 * tracepoint.c (tp_printf): New function.
10216 (eval_agent_expr): Handle gdb_agent_op_printf.
10217
f9c6ff72
HZ
102182011-02-21 Hui Zhu <teawater@gmail.com>
10219
10220 * tracepoint.c (tp_printf): New function.
10221 (eval_agent_expr): Handle gdb_agent_op_printf.
10222
94d5e490
TT
102232011-02-18 Tom Tromey <tromey@redhat.com>
10224
10225 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
10226 (tracepoint.o): Likewise.
10227 * tracepoint.c (enum gdb_agent_op): Use ax.def.
10228 (gdb_agent_op_names): Likewise.
10229
c7f96d2b
TT
102302011-02-18 Tom Tromey <tromey@redhat.com>
10231
10232 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
10233 gdb_agent_op_rot>: New constants.
10234 (gdb_agent_op_names): Add pick and roll.
10235 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
10236 cases.
10237
0feedb2c
JK
102382011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
10239
10240 * aclocal.m4: Regenerated with aclocal-1.11.1.
10241
b3b9301e
PA
102422011-02-14 Pedro Alves <pedro@codesourcery.com>
10243
10244 * server.c (handle_qxfer_traceframe_info): New.
10245 (qxfer_packets): Register "traceframe-info".
10246 (handle_query): Report support for qXfer:traceframe-info:read+.
10247 * tracepoint.c (match_blocktype): New.
10248 (traceframe_find_block_type): Rename to ...
10249 (traceframe_walk_blocks): ... this. Add callback filter argument,
10250 and use it.
10251 (traceframe_find_block_type): New, reimplemented on top of
10252 traceframe_walk_blocks.
10253 (build_traceframe_info_xml): New.
10254 (traceframe_read_info): New.
10255 * server.h (traceframe_read_info): Declare.
10256
4f3e6fb7
YQ
102572011-02-11 Yao Qi <yao@codesourcery.com>
10258
10259 * configure.ac: Call AC_PROG_RANLIB.
10260 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
10261 * configure: Regenerate.
10262
764880b7
PA
102632011-02-07 Pedro Alves <pedro@codesourcery.com>
10264
10265 * server.c (gdb_read_memory): Change return semantics to allow
10266 partial transfers.
10267 (handle_search_memory_1): Adjust.
10268 (process_serial_event) <'m' packet>: Handle partial transfers.
10269 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
10270
1c79eb8a
PA
102712011-01-28 Pedro Alves <pedro@codesourcery.com>
10272
10273 * regcache.c (init_register_cache): Initialize
10274 regcache->register_status.
10275 (free_register_cache): Release regcache->register_status.
10276 (regcache_cpy): Copy register_status.
10277 (registers_to_string): Print 'x's for unavailable registers.
10278 (supply_register): Mark the register's status valid or
10279 unavailable, depending on whether a buffer was passed in or not.
10280 (supply_register_zeroed): New.
10281 (supply_regblock): Mark the registers' status valid or
10282 unavailable, depending on whether a buffer was passed in or not.
10283 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
10284 (struct regcache): New `register_status' field.
10285 (supply_register_zeroed): Declare.
10286 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
10287 supply_register_zeroed, rather than passing a NULL buffer to
10288 supply_register.
10289 * tracepoint.c (fetch_traceframe_registers): Update comment.
10290
85724a0e
PA
102912011-01-28 Pedro Alves <pedro@codesourcery.com>
10292
10293 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
10294 buffer explicit.
10295
d08aafef
PA
102962011-01-25 Pedro Alves <pedro@codesourcery.com>
10297
10298 * server.h (decode_xfer_write): Change prototype.
10299 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
10300 and don't extract the annex here.
10301 * server.c (decode_xfer_read): Remove `annex' parameter,
10302 and don't extract the annex here.
10303 (decode_xfer): New.
10304 (struct qxfer): New.
10305 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
10306 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
10307 (handle_qxfer_statictrace): New functions, abstracted out from
10308 handle_query, and made to use the struct qxfer interface.
10309 (handle_threads_qxfer_proper): Rename to ...
10310 (handle_qxfer_threads_proper): ... this.
10311 (handle_threads_qxfer): Rename to ...
10312 (handle_qxfer_threads): ... this. Adjust.
10313 (qxfer_packets): New array.
10314 (handle_qxfer): New function.
10315 (handle_query): Use handle_qxfer.
10316
493e2a69
MS
103172011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
10318
10319 * gdbreplay.c: Shorten lines of >= 80 columns.
10320 * linux-low.c: Ditto.
10321 * linux-ppc-low.c: Ditto.
10322 * linux-s390-low.c: Ditto.
10323 * linux-sparc-low.c: Ditto.
10324 * linux-x86-low.c: Ditto.
10325 * linux-xtensa-low.c: Ditto.
10326 * mem-break.c: Ditto.
10327 * nto-low.c: Ditto.
10328 * regcache.h: Ditto.
10329 * remote-utils.c: Ditto.
10330 * server.c: Ditto.
10331 * server.h: Ditto.
10332 * thread-db.c: Ditto.
10333 * tracepoint.c: Ditto.
10334 * utils.c: Ditto.
10335 * win32-low.h: Ditto.
10336
44944448
JB
103372011-01-05 Joel Brobecker <brobecker@adacore.com>
10338
10339 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
10340 update.
10341
71ce852c
JB
103422011-01-01 Joel Brobecker <brobecker@adacore.com>
10343
10344 * server.c (gdbserver_version): Update copyright year in version
10345 output.
10346 * gdbreplay.c (gdbreplay_version): Ditto.
10347
eb826dc6
MF
103482010-12-29 Jie Zhang <jie.zhang@analog.com>
10349
10350 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
10351 * linux-bfin-low.c: New file.
10352 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
10353 PT_DATA_ADDR for BFIN targets.
10354 * Makefile.in (SFILES): Add linux-bfin-low.c.
10355 (clean): Remove reg-bfin.c.
10356 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
10357 * README: Mention supported Blackfin targets.
10358
39ab222a
MF
103592010-12-23 Mike Frysinger <vapier@gentoo.org>
10360
10361 * .gitignore: New file.
10362
a1f2ce7d
MF
103632010-11-16 Mike Frysinger <vapier@gentoo.org>
10364
10365 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
10366
f474844c
JZ
103672010-10-22 Jie Zhang <jie@codesourcery.com>
10368
10369 * Makefile.in: Add FLAGS_TO_PASS variable.
10370 (install): Remove dependency of install-only and recursively
10371 invoke make for install-only.
10372
f1048712
DE
103732010-10-04 Doug Evans <dje@google.com>
10374
10375 * Makefile.in (uninstall): Use $(DESTDIR).
10376
b53a1623
PA
103772010-09-24 Pedro Alves <pedro@codesourcery.com>
10378
e6ee044d
PA
10379 PR gdb/11842
10380
b53a1623
PA
10381 * linux-x86-low.c (compat_siginfo_from_siginfo)
10382 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
10383 si_code is < 0. Check for si_code == SI_TIMER before checking for
10384 si_code < 0.
10385
fa1bd1e4
JB
103862010-09-13 Joel Brobecker <brobecker@adacore.com>
10387
10388 * lynx-i386-low.c: New file.
10389 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
10390
47fac8f8
JB
103912010-09-13 Joel Brobecker <brobecker@adacore.com>
10392
10393 * lynx-low.c (ptrace_request_to_str): Remove handling for
10394 request values that have been removed in LynxOS 5.x.
10395
1adfc54d
JB
103962010-09-13 Joel Brobecker <brobecker@adacore.com>
10397
10398 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
10399 <ptrace.h>
10400
c2a66c29
NS
104012010-09-09 Nathan Sidwell <nathan@codesourcery.com>
10402
10403 * configure.ac: Add --enable-inprocess-agent option.
10404 * configure: Rebuilt.
10405
32fcada3
YQ
104062010-09-06 Yao Qi <yao@codesourcery.com>
10407
10408 * linux-low.c (linux_kill): Remove unused variable.
10409 (linux_stabilize_threads): Likewise.
10410 * server.c (start_inferior): Likewise.
10411 (queue_stop_reply_callback): Likewise.
10412 * tracepoint.c (do_action_at_tracepoint): Likewise.
10413
0cccb683
YQ
104142010-09-06 Yao Qi <yao@codesourcery.com>
10415
10416 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
10417 on return.
10418
423ec54c
JK
104192010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10420
10421 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
10422
12ac6819
PA
104232010-09-06 Pedro Alves <pedro@codesourcery.com>
10424
10425 * Makefile.in (install-only): Replace $IPA_DEPFILES with
10426 "$(IPA_DEPFILES)".
10427
8ed54b31
JB
104282010-09-01 Joel Brobecker <brobecker@adacore.com>
10429
10430 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
10431 gdbserver/lynx-ppc-low.c: New files.
10432 * Makefile.in (lynx_low_h): New variable.
10433 (lynx-low.o, lynx-ppc-low.o): New rules.
10434 * configure.ac: On LynxOS, link with -lnetinet.
10435 * configure.srv: Add handling of powerpc-*-lynxos* targets.
10436 * configure: regenerate.
10437
bb0116a4
JB
104382010-09-01 Joel Brobecker <brobecker@adacore.com>
10439
10440 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
10441 * configure.ac: Add check for vasprintf and vsnprintf.
10442 * configure, config.in: Regenerate.
10443 * server.h (vasprintf, vsnprintf): Add conditional declarations.
10444
a778ab81 104452010-09-01 Joel Brobecker <brobecker@adacore.com>
10446
10447 * gdbreplay.c: Move include of alloca.h up, next to include of
10448 malloc.h.
10449 * server.h: Add include of malloc.h.
10450 * mem-break.c: Remove include of malloc.h.
10451 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
10452
8b034a19 104532010-09-01 Joel Brobecker <brobecker@adacore.com>
10454
10455 * Makefile.in (memmem.o): Build with -Wno-error.
10456
104572010-09-01 Joel Brobecker <brobecker@adacore.com>
10458
10459 * utils.c (xsnprintf): Make non-static.
10460 * server.h: Add xsnprintf declaration.
10461 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
10462 replace calls to snprintf by calls to xsnprintf throughout.
10463
104642010-09-01 Joel Brobecker <brobecker@adacore.com>
10465
10466 * configure.ac: Add configure check for alloca.
10467 * configure, config.in: Regenerate.
10468 * server.h: Include alloca.h if it exists.
10469 * gdbreplay.c: Include alloca.h if it exists.
10470
1a981360
PA
104712010-08-28 Pedro Alves <pedro@codesourcery.com>
10472
10473 * linux-low.c (__SIGRTMIN): Define if not already defined.
10474 (linux_create_inferior): Check for __ANDROID__ rather than
10475 __SIGRTMIN.
10476 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
10477 are already deferred.
10478 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
10479 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
10480 stopped and already has a pending signal to report.
10481 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
10482 a pending signal to report or is moving out of a jump pad.
10483 (linux_init_signals): Check for __ANDROID__ rather than
10484 __SIGRTMIN.
10485
b4d51a55
PA
104862010-08-28 Pedro Alves <pedro@codesourcery.com>
10487
10488 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
10489 debug_threads check. Avoid a linear search when not doing debug
10490 output.
10491
ec48365d
PA
104922010-08-27 Pedro Alves <pedro@codesourcery.com>
10493
10494 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
10495 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
10496 (struct file_handler) <fd>: Change type to gdb_fildes_t.
10497 (process_event): Change local fd's type to gdb_fildes_t.
10498 (create_file_handler): Adjust prototype.
10499 (delete_file_handler): Adjust prototype.
10500 (handle_file_event): Adjust prototype. Use pfildes.
10501 (create_file_event): Adjsut prototype.
10502 * remote-utils.c (remote_desc, listen_desc): Change type to
10503 gdb_fildes_t.
10504 * server.h: New gdb_fildes_t typedef.
10505 [USE_WIN32API]: Include winsock2.h.
10506 (delete_file_handler, add_file_handler): Adjust prototypes.
10507 (pfildes): Declare.
10508 * utils.c (pfildes): New.
10509
854d88f0
PA
105102010-08-27 Pedro Alves <pedro@codesourcery.com>
10511
10512 * configure.ac (build_warnings): Add -Wno-char-subscripts.
10513 * configure: Regenerate.
10514
0146f85b
PA
105152010-08-27 Pedro Alves <pedro@codesourcery.com>
10516
10517 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
10518 (linux_done_accessing_memory): ... this.
10519 (linux_target_ops): Adjust.
10520 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
10521 * nto-low.c (nto_target_ops): Adjust comment.
10522 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
10523 * spu-low.c (spu_target_ops): Adjust comment.
10524 * target.h (target_ops): Rename unprepare_to_access_memory field
10525 to done_accessing_memory.
10526 (unprepare_to_access_memory): Rename to ...
10527 (done_accessing_memory): ... this.
10528
90d74c30
PA
105292010-08-26 Pedro Alves <pedro@codesourcery.com>
10530
10531 * linux-low.c (linux_prepare_to_access_memory): New.
10532 (linux_unprepare_to_access_memory): New.
10533 (linux_target_ops): Install them.
10534 * server.c (read_memory): Rename to ...
10535 (gdb_read_memory): ... this. Use
10536 prepare_to_access_memory/prepare_to_access_memory.
10537 (write_memory): Rename to ...
10538 (gdb_write_memory): ... this. Use
10539 prepare_to_access_memory/prepare_to_access_memory.
10540 (handle_search_memory_1): Adjust.
10541 (process_serial_event): Adjust.
10542 * target.h (struct target_ops): New fields
10543 prepare_to_access_memory and unprepare_to_access_memory.
10544 (prepare_to_access_memory, unprepare_to_access_memory): New.
10545 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
10546 prepare_to_access_memory/prepare_to_access_memory.
10547 * nto-low.c (nto_target_ops): Adjust.
10548 * spu-low.c (spu_target_ops): Adjust.
10549 * win32-low.c (win32_target_ops): Adjust.
10550
fd467969
PA
105512010-08-26 Pedro Alves <pedro@codesourcery.com>
10552
10553 * Makefile.in (WARN_CFLAGS): Get it from configure.
10554 (WERROR_CFLAGS): New.
10555 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
10556 * configure.ac: Introduce --enable-werror, which adds -Werror to
10557 the compiler command line. Enabled by default. Disable with
10558 --disable-werror. Add -Wdeclaration-after-statement
10559 Wpointer-arith and -Wformat-nonliteral to warning flags.
10560 * configure: Regenerate.
10561
331e2f5f
PA
105622010-08-26 Pedro Alves <pedro@codesourcery.com>
10563
10564 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
10565
e581f2b4
PA
105662010-08-26 Pedro Alves <pedro@codesourcery.com>
10567
10568 * gdbreplay.c (remote_error): New.
10569 (gdbchar): New.
10570 (expect): Use gdbchar. Check for error reading from GDB.
10571 Clarify sync error output.
10572 (play): Check for errors writing to GDB.
10573 * linux-low.c (sigchld_handler): Really ignore `write' errors.
10574 * remote-utils.c (getpkt): Check for errors writing to the remote
10575 descriptor.
10576
3c11dd79
PA
105772010-08-25 Pedro Alves <pedro@codesourcery.com>
10578
10579 * linux-low.c (linux_wait_1): Move non-debugging code out of
10580 `debug_threads' control.
10581
d20a8ad9
PA
105822010-08-25 Pedro Alves <pedro@codesourcery.com>
10583
10584 * linux-low.c (linux_wait_1): Don't set last_status here.
10585 * server.c (push_event, queue_stop_reply_callback): Assert we're
10586 not pushing a TARGET_WAITKIND_IGNORE event.
10587 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
10588 (myresume, handle_target_event): Set the thread's last_resume_kind
10589 and last_status from the target returned status.
10590
964e4306
PA
105912010-08-25 Pedro Alves <pedro@codesourcery.com>
10592
10593 PR threads/10729
10594
10595 * linux-x86-low.c (update_debug_registers_callback): New.
10596 (i386_dr_low_set_addr): Use it.
10597 (i386_dr_low_get_addr): New.
10598 (i386_dr_low_set_control): Use update_debug_registers_callback.
10599 (i386_dr_low_get_control): New.
10600 (i386_dr_low_get_status): Adjust.
10601 * linux-low.c (linux_stop_lwp): New.
10602 * linux-low.h (linux_stop_lwp): Declare.
10603
10604 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
10605 argument instead of a i386_debug_reg_state.
10606 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
10607 a i386_debug_reg_state.
10608 (i386_insert_aligned_watchpoint): Adjust.
10609 (i386_remove_aligned_watchpoint): Adjust.
10610 (i386_low_stopped_data_address): Read the debug registers from the
10611 inferior instead of from the mirrors.
10612 * i386-low.h (struct i386_debug_reg_state): Extend comment.
10613 (i386_dr_low_get_addr): Declare.
10614 (i386_dr_low_get_control): Declare.
10615 (i386_dr_low_get_status): Change prototype.
10616
10617 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
10618 (i386_dr_low_get_addr): New.
10619 (i386_dr_low_get_control): New.
10620 (i386_dr_low_get_status): Adjust prototype. Return
10621 dr_status_mirror.
10622 (i386_initial_stuff): Clear dr_status_mirror and
10623 dr_control_mirror.
10624 (i386_get_thread_context): Adjust.
10625 (i386_set_thread_context): Adjust.
10626 (i386_thread_added): Adjust.
10627
5f21a75b
PA
106282010-08-24 Pedro Alves <pedro@codesourcery.com>
10629
10630 * linux-low.h (linux_thread_area): Delete declaration.
10631
3e4c1235
TS
106322010-08-11 Thomas Schwinge <thomas@codesourcery.com>
10633
10634 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
10635 after its termination.
10636
1971b033
PA
106372010-08-09 Pedro Alves <pedro@codesourcery.com>
10638
10639 * linux-low.c (gdb_wants_lwp_stopped): Delete.
10640 (gdb_wants_all_stopped): Delete.
10641 (linux_wait_1): Don't call them.
10642 * server.c (handle_v_cont): Tag all threads as want-stopped.
10643 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
10644 stopped as "client-wants-stopped".
10645
310444ac
PA
106462010-07-31 Pedro Alves <pedro@codesourcery.com>
10647
10648 * Makefile.in (signals_h): New.
10649 (server_h): Depend on it.
10650 (server.o): Don't depend on $(signals_def).
10651 (signals.o): Depend on $(signals_def).
10652
a19cae16
JK
106532010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
10654
10655 * Makefile.in (signals_def): New.
10656 (server_h): Append include/gdb/signals.h and signals_def.
10657 (server.o): Append signals_def.
10658
30d50328
JK
106592010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10660
10661 * server.c (handle_target_event): Use target_signal_to_host for
10662 resume_info.sig initialization.
10663 * target.h (struct thread_resume) <sig>: New comment.
10664
5c3216e2
OS
106652010-07-20 Ozkan Sezer <sezeroz@gmail.com>
10666
c6f46ca0
OS
10667 * server.c (handle_query): strcpy() the returned string from paddress()
10668 instead of sprintf().
5c3216e2
OS
10669 * utils.c (paddress): Return phex_nz().
10670
6bd31874
JB
106712010-07-07 Joel Brobecker <brobecker@adacore.com>
10672
10673 * server.c (handle_v_cont): Call mourn_inferior if process
10674 just exited.
10675 (myresume): Likewise.
10676
0fb4aa4b
PA
106772010-07-01 Pedro Alves <pedro@codesourcery.com>
10678
10679 Static tracepoints, and integration with UST.
10680
10681 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
10682 * mem-break.c (uninsert_all_breakpoints)
10683 (reinsert_all_breakpoints): New.
10684 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
10685 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
10686 (gdb_agent_ust_loaded, helper_thread_id)
10687 (gdb_agent_helper_thread_id): New macros.
10688 (struct ipa_sym_addresses): Add addr_ust_loaded,
10689 addr_helper_thread_id, addr_cmd_buf.
10690 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
10691 (in_process_agent_loaded_ust): New.
10692 (write_e_ust_not_loaded): New.
10693 (maybe_write_ipa_ust_not_loaded): New.
10694 (struct collect_static_trace_data_action): New.
10695 (enum tracepoint_type) <static_tracepoint>: New.
10696 (struct tracepoint) <handle>: Mention static tracepoints.
10697 (struct static_tracepoint_ctx): New.
10698 (CMD_BUF_SIZE): New.
10699 (add_tracepoint_action): Handle static tracepoint actions.
10700 (unprobe_marker_at): New.
10701 (clear_installed_tracepoints): Handle static tracepoints.
10702 (cmd_qtdp): Handle static tracepoints.
10703 (probe_marker_at): New.
10704 (cmd_qtstart): Handle static tracepoints.
10705 (response_tracepoint): Handle static tracepoints.
10706 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
10707 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
10708 (get_context_regcache): Handle static tracepoints.
10709 (do_action_at_tracepoint): Handle static tracepoint actions.
10710 (traceframe_find_block_type): Handle static trace data blocks.
10711 (traceframe_read_sdata): New.
10712 (download_tracepoints): Download static tracepoint actions.
10713 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
10714 (GDB_PROBE_NAME): New.
10715 (ust_ops): New.
10716 (GET_UST_SYM): New.
10717 (USTF): New.
10718 (dlsym_ust): New.
10719 (ust_marker_to_static_tracepoint): New.
10720 (gdb_probe): New.
10721 (collect_ust_data_at_tracepoint): New.
10722 (gdb_ust_probe): New.
10723 (UNIX_PATH_MAX, SOCK_DIR): New.
10724 (gdb_ust_connect_sync_socket): New.
10725 (resume_thread, stop_thread): New.
10726 (run_inferior_command): New.
10727 (init_named_socket): New.
10728 (gdb_ust_socket_init): New.
10729 (cstr_to_hexstr): New.
10730 (next_st): New.
10731 (first_marker, next_marker): New.
10732 (response_ust_marker): New.
10733 (cmd_qtfstm, cmd_qtsstm): New.
10734 (unprobe_marker_at, probe_marker_at): New.
10735 (cmd_qtstmat, gdb_ust_thread): New.
10736 (gdb_ust_init): New.
10737 (initialize_tracepoint_ftlib): Call gdb_ust_init.
10738 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
10739 (ST_REGENTRY): New.
10740 (x86_64_st_collect_regmap): New.
10741 (X86_64_NUM_ST_COLLECT_GREGS): New.
10742 (AMD64_RIP_REGNUM): New.
10743 (supply_static_tracepoint_registers): New.
10744 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
10745 (ST_REGENTRY): New.
10746 (i386_st_collect_regmap): New.
10747 (i386_NUM_ST_COLLECT_GREGS): New.
10748 (supply_static_tracepoint_registers): New.
10749 * server.c (handle_query): Handle qXfer:statictrace:read.
10750 <qSupported>: Report support for StaticTracepoints, and
10751 qXfer:statictrace:read features.
10752 * server.h (traceframe_read_sdata)
10753 (supply_static_tracepoint_registers): Declare.
10754 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
10755 (unpack_varlen_hex): Include in IPA build.
10756 * Makefile.in (ustlibs, ustinc): New.
10757 (IPA_OBJS): Add remote-utils-ipa.o.
10758 ($(IPA_LIB)): Link -ldl and -lpthread.
10759 (UST_CFLAGS): New.
10760 (IPAGENT_CFLAGS): Add UST_CFLAGS.
10761 * config.in, configure: Regenerate.
10762
9e4344e5
PA
107632010-06-20 Ian Lance Taylor <iant@google.com>
10764 Pedro Alves <pedro@codesourcery.com>
10765
10766 * linux-x86-low.c (always_true): Delete.
10767 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
10768 trying to fool the compiler with always_true.
10769
c6beb2cb
PA
107702010-06-20 Pedro Alves <pedro@codesourcery.com>
10771
10772 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
10773 conditions in gdbserver.
10774
d2ed6730
UW
107752010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
10776
10777 * spu-low.c (spu_read_memory): Wrap around local store limit.
10778 (spu_write_memory): Likewise.
10779
4e29fb54
PA
107802010-06-15 Pedro Alves <pedro@codesourcery.com>
10781
10782 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
10783 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
10784 LONGEST uses.
10785 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
10786 uses.
10787 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
10788 uses with LONGEST uses.
10789
6a271cae
PA
107902010-06-14 Stan Shebs <stan@codesourcery.com>
10791 Pedro Alves <pedro@codesourcery.com>
10792
10793 Bytecode compiler.
10794
10795 * linux-x86-low.c: Include limits.h.
10796 (add_insns): New.
10797 (always_true): New.
10798 (EMIT_ASM): New.
10799 (EMIT_ASM32): New.
10800 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
10801 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
10802 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
10803 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
10804 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
10805 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
10806 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
10807 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
10808 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
10809 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
10810 (amd64_emit_void_call_2): New.
10811 (amd64_emit_ops): New.
10812 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
10813 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
10814 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
10815 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
10816 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
10817 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
10818 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
10819 (i386_emit_call, i386_emit_reg, i386_emit_pop)
10820 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
10821 (i386_emit_stack_adjust, i386_emit_int_call_1)
10822 (i386_emit_void_call_2): New.
10823 (i386_emit_ops): New.
10824 (x86_emit_ops): New.
10825 (the_low_target): Install x86_emit_ops.
10826 * server.h (struct emit_ops): New.
10827 (get_raw_reg_func_addr): Declare.
10828 (current_insn_ptr, emit_error): Declare.
10829 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
10830 (set_trace_state_variable_value): New defines.
10831 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
10832 addr_get_trace_state_variable_value and
10833 addr_set_trace_state_variable_value.
10834 (symbol_list): New fields for get_raw_reg,
10835 get_trace_state_variable_value and set_trace_state_variable_value.
10836 (condfn): New typedef.
10837 (struct tracepoint): New field `compiled_cond'.
10838 (do_action_at_tracepoint): Clear compiled_cond.
10839 (get_trace_state_variable_value, set_trace_state_variable_value):
10840 Export in the IPA.
10841 (condition_true_at_tracepoint): If there's a compiled condition,
10842 run that.
10843 (current_insn_ptr, emit_error): New globals.
10844 (struct bytecode_address): New.
10845 (get_raw_reg_func_addr): New.
10846 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
10847 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
10848 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
10849 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
10850 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
10851 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
10852 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
10853 (compile_tracepoint_condition, compile_bytecodes): New.
10854 * target.h (emit_ops): Forward declare.
10855 (struct target_ops): New field emit_ops.
10856 (target_emit_ops): New.
10857 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
10858 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
10859 * linux-low.c (linux_emit_ops): New.
10860 (linux_target_ops): Install it.
10861 * linux-low.h (struct linux_target_ops): New field emit_ops.
10862
92b72907
UW
108632010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
10864
10865 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
10866 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
10867
fa593d66
PA
108682010-06-01 Pedro Alves <pedro@codesourcery.com>
10869 Stan Shebs <stan@codesourcery.com>
10870
10871 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
10872 (all): Depend on $(extra_libraries).
10873 (install-only): Install the IPA.
10874 (IPA_OBJS, IPA_LIB): New.
10875 (clean): Remove the IPA lib.
10876 (IPAGENT_CFLAGS): New.
10877 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
10878 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
10879 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
10880 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
10881 * configure.ac: Check for atomic builtins support in the compiler.
10882 (IPA_DEPFILES, extra_libraries): Define.
10883 * configure.srv (ipa_obj): Add description.
10884 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
10885 (i[34567]86-*-linux*): Set ipa_obj.
10886 (x86_64-*-linux*): Set ipa_obj.
10887 * linux-low.c (stabilizing_threads): New.
10888 (supports_fast_tracepoints): New.
10889 (linux_detach): Stabilize threads before detaching.
10890 (handle_tracepoints): Handle internal tracing breakpoints. Assert
10891 the lwp is either not stabilizing, or is moving out of a jump pad.
10892 (linux_fast_tracepoint_collecting): New.
10893 (maybe_move_out_of_jump_pad): New.
10894 (enqueue_one_deferred_signal): New.
10895 (dequeue_one_deferred_signal): New.
10896 (linux_wait_for_event_1): If moving out of a jump pad, defer
10897 pending signals to later.
10898 (linux_stabilize_threads): New.
10899 (linux_wait_1): Check if threads need moving out of jump pads, and
10900 do it if so.
10901 (stuck_in_jump_pad_callback): New.
10902 (move_out_of_jump_pad_callback): New.
10903 (lwp_running): New.
10904 (linux_resume_one_lwp): Handle moving out of jump pads.
10905 (linux_set_resume_request): Dequeue deferred signals.
10906 (need_step_over_p): Also step over fast tracepoint jumps.
10907 (start_step_over): Also uninsert fast tracepoint jumps.
10908 (finish_step_over): Also reinsert fast tracepoint jumps.
10909 (linux_install_fast_tracepoint_jump): New.
10910 (linux_target_ops): Install linux_stabilize_threads and
10911 linux_install_fast_tracepoint_jump_pad.
10912 * linux-low.h (linux_target_ops) <get_thread_area,
10913 install_fast_tracepoint_jump_pad>: New fields.
10914 (struct lwp_info) <collecting_fast_tracepoint,
10915 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
10916 (linux_get_thread_area): Declare.
10917 * linux-x86-low.c (jump_insn): New.
10918 (x86_get_thread_area): New.
10919 (append_insns): New.
10920 (push_opcode): New.
10921 (amd64_install_fast_tracepoint_jump_pad): New.
10922 (i386_install_fast_tracepoint_jump_pad): New.
10923 (x86_install_fast_tracepoint_jump_pad): New.
10924 (the_low_target): Install x86_get_thread_area and
10925 x86_install_fast_tracepoint_jump_pad.
10926 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10927 (struct fast_tracepoint_jump): New.
10928 (fast_tracepoint_jump_insn): New.
10929 (fast_tracepoint_jump_shadow): New.
10930 (find_fast_tracepoint_jump_at): New.
10931 (fast_tracepoint_jump_here): New.
10932 (delete_fast_tracepoint_jump): New.
10933 (set_fast_tracepoint_jump): New.
10934 (uninsert_fast_tracepoint_jumps_at): New.
10935 (reinsert_fast_tracepoint_jumps_at): New.
10936 (set_breakpoint_at): Use write_inferior_memory.
10937 (uninsert_raw_breakpoint): Use write_inferior_memory.
10938 (check_mem_read): Mask out fast tracepoint jumps.
10939 (check_mem_write): Mask out fast tracepoint jumps.
10940 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10941 (set_fast_tracepoint_jump): Declare.
10942 (delete_fast_tracepoint_jump)
10943 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10944 (reinsert_fast_tracepoint_jumps_at): Declare.
10945 * regcache.c: Don't compile many functions when building the
10946 in-process agent library.
10947 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10948 the register buffer in the heap.
10949 (free_register_cache): If the register buffer isn't owned by the
10950 regcache, don't free it.
10951 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10952 pre-existing register caches.
10953 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10954 type.
10955 (convert_ascii_to_int): : Constify `from' parameter type.
10956 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10957 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
10958 the needed buffer in-place.
10959 (relocate_instruction): New.
10960 * server.c (handle_query) <qSymbols>: If the target supports
10961 tracepoints, give it a chance of looking up symbols. Report
10962 support for fast tracepoints.
10963 (handle_status): Stabilize threads.
10964 (process_serial_event): Adjust.
10965 * server.h (struct fast_tracepoint_jump): Forward declare.
10966 (struct process_info) <fast_tracepoint_jumps>: New field.
10967 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10968 (decode_X_packet, decode_M_packet): Adjust.
10969 (relocate_instruction): Declare.
10970 (in_process_agent_loaded): Declare.
10971 (tracepoint_look_up_symbols): Declare.
10972 (struct fast_tpoint_collect_status): Declare.
10973 (fast_tracepoint_collecting): Declare.
10974 (force_unlock_trace_buffer): Declare.
10975 (handle_tracepoint_bkpts): Declare.
10976 (initialize_low_tracepoint)
10977 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10978 * target.h (struct target_ops) <stabilize_threads,
10979 install_fast_tracepoint_jump_pad>: New fields.
10980 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10981 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10982 [HAVE_STDINT_H]: Include stdint.h.
10983 (trace_debug_1): Rename to ...
10984 (trace_vdebug): ... this.
10985 (trace_debug): Rename to ...
10986 (trace_debug_1): ... this. Add `level' parameter.
10987 (trace_debug): New.
10988 (ATTR_USED, ATTR_NOINLINE): New.
10989 (IP_AGENT_EXPORT): New.
10990 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10991 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10992 (about_to_request_buffer_space, trace_buffer_is_full)
10993 (stopping_tracepoint, expr_eval_result, error_tracepoint)
10994 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10995 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10996 (traceframe_write_count, traceframes_created)
10997 (trace_state_variables)
10998 New renaming defines.
10999 (struct ipa_sym_addresses): New.
11000 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
11001 (symbol_list): New.
11002 (ipa_sym_addrs): New.
11003 (all_tracepoint_symbols_looked_up): New.
11004 (in_process_agent_loaded): New.
11005 (write_e_ipa_not_loaded): New.
11006 (maybe_write_ipa_not_loaded): New.
11007 (tracepoint_look_up_symbols): New.
11008 (debug_threads) [IN_PROCESS_AGENT]: New.
11009 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
11010 (UNKNOWN_SIDE_EFFECTS): New.
11011 (stop_tracing): New.
11012 (flush_trace_buffer): New.
11013 (stop_tracing_bkpt): New.
11014 (flush_trace_buffer_bkpt): New.
11015 (read_inferior_integer): New.
11016 (read_inferior_uinteger): New.
11017 (read_inferior_data_pointer): New.
11018 (write_inferior_data_pointer): New.
11019 (write_inferior_integer): New.
11020 (write_inferior_uinteger): New.
11021 (struct collect_static_trace_data_action): Delete.
11022 (enum tracepoint_type): New.
11023 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
11024 <actions_str, step_actions, step_actions_str>: Only include in
11025 GDBserver.
fa593d66
PA
11026 <orig_size, obj_addr_on_target, adjusted_insn_addr>
11027 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
11028 (tracepoints): Use IP_AGENT_EXPORT.
11029 (last_tracepoint): Don't include in the IPA.
11030 (stopping_tracepoint): Use IP_AGENT_EXPORT.
11031 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
11032 (alloced_trace_state_variables): New.
11033 (trace_state_variables): Use IP_AGENT_EXPORT.
11034 (traceframe_t): Delete unused variable.
11035 (circular_trace_buffer): Don't include in the IPA.
11036 (trace_buffer_start): Delete.
11037 (struct trace_buffer_control): New.
11038 (trace_buffer_free): Delete.
11039 (struct ipa_trace_buffer_control): New.
11040 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
11041 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
11042 New.
11043 (trace_buffer_ctrl): New.
11044 (TRACE_BUFFER_CTRL_CURR): New.
11045 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
11046 Reimplement as macros.
11047 (trace_buffer_wrap): Delete.
11048 (traceframe_write_count, traceframe_read_count)
11049 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
11050 (struct tracepoint_hit_ctx) <type>: New field.
11051 (struct fast_tracepoint_ctx): New.
11052 (memory_barrier): New.
11053 (cmpxchg): New.
11054 (record_tracepoint_error): Update atomically in the IPA.
11055 (clear_inferior_trace_buffer): New.
11056 (about_to_request_buffer_space): New.
11057 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
11058 updating the same buffer.
11059 (add_tracepoint): Default the tracepoint's type to trap
11060 tracepoint, and orig_size to -1.
11061 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
11062 internal variables.
11063 (create_trace_state_variable): New parameter `gdb'. Handle it.
11064 (clear_installed_tracepoints): Clear fast tracepoint jumps.
11065 (cmd_qtdp): Handle fast tracepoints.
11066 (cmd_qtdv): Adjust.
11067 (max_jump_pad_size): New.
11068 (gdb_jump_pad_head): New.
11069 (get_jump_space_head): New.
11070 (claim_jump_space): New.
11071 (sort_tracepoints): New.
11072 (MAX_JUMP_SIZE): New.
11073 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
11074 IPA.
11075 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
11076 support. Upload fast traceframes, and delete internal IPA
11077 breakpoints.
11078 (stop_tracing_handler): New.
11079 (flush_trace_buffer_handler): New.
11080 (cmd_qtstop): Upload fast tracepoints.
11081 (response_tracepoint): Handle fast tracepoints.
11082 (tracepoint_finished_step): Upload fast traceframes. Set the
11083 tracepoint hit context's tracepoint type.
11084 (handle_tracepoint_bkpts): New.
11085 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
11086 type. Add comment about fast tracepoints.
11087 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
11088 non-existing action_str field.
11089 (get_context_regcache): Handle fast tracepoints.
11090 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
11091 to the regcache.
11092 (fast_tracepoint_from_jump_pad_address): New.
11093 (fast_tracepoint_from_ipa_tpoint_address): New.
11094 (collecting_t): New.
11095 (force_unlock_trace_buffer): New.
11096 (fast_tracepoint_collecting): New.
11097 (collecting): New.
11098 (gdb_collect): New.
11099 (write_inferior_data_ptr): New.
11100 (target_tp_heap): New.
11101 (target_malloc): New.
11102 (download_agent_expr): New.
11103 (UALIGN): New.
11104 (download_tracepoints): New.
11105 (download_trace_state_variables): New.
11106 (upload_fast_traceframes): New.
11107 (IPA_FIRST_TRACEFRAME): New.
11108 (IPA_NEXT_TRACEFRAME_1): New.
11109 (IPA_NEXT_TRACEFRAME): New.
11110 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
11111 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
11112 (gdb_jump_pad_buffer_end): New.
11113 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
11114 (initialize_tracepoint): Adjust.
11115 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
11116 buffer. Initialize the low module.
11117 * utils.c (PREFIX, TOOLNAME): New.
11118 (malloc_failure): Use PREFIX.
11119 (error): In the IPA, an error causes an exit.
11120 (fatal, warning): Use PREFIX.
11121 (internal_error): Use TOOLNAME.
11122 (NUMCELLS): Increase to 10.
11123 * configure, config.in: Regenerate.
11124
d149dd1d
PA
111252010-06-01 Pedro Alves <pedro@codesourcery.com>
11126
11127 * server.c (handle_query) <qSupported>: Do two passes over the
11128 qSupported string to avoid nesting strtok.
11129
f6528abd
JK
111302010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11131
11132 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
11133 (CDEPS): New.
11134 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
11135 -Wl,--dynamic-list.
11136 * configure: Regenerate.
11137 * proc-service.list: New.
11138
ca2a87a0
JK
111392010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11140
11141 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
11142 New comment.
11143
363a6e9f
OS
111442010-05-26 Ozkan Sezer <sezeroz@gmail.com>
11145
11146 * gdbreplay.c (remote_open): Check error return from socket() call by
11147 its equality to -1 not by it being negative.
11148 * remote-utils.c (remote_open): Likewise.
11149
d23b6cb1
PA
111502010-05-23 Pedro Alves <pedro@codesourcery.com>
11151
11152 * config.h: Regenerate.
11153
28d3cf85
MK
111542010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11155
11156 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
11157 doesn't provide PTRACE_GET_THREAD_AREA.
11158
fea36a59
MK
111592010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
11160
11161 * linux-m68k-low.c: Include <asm/ptrace.h>
11162 (ps_get_thread_area): Implement.
11163
24b066ba
DE
111642010-05-03 Doug Evans <dje@google.com>
11165
11166 * event-loop.c (struct callback_event): New struct.
11167 (callback_list): New global.
11168 (append_callback_event, delete_callback_event): New functions.
11169 (process_callback): New function.
11170 (start_event_loop): Call it.
11171 * remote-utils.c (NOT_SCHEDULED): Define.
11172 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
11173 moved out of readchar.
11174 (readchar): Rewrite. Call reschedule before returning.
11175 (reset_readchar): New function.
11176 (remote_close): Call it.
11177 (process_remaining, reschedule): New functions.
11178 * server.h (callback_handler_func): New typedef.
11179 (append_callback_event, delete_callback_event): Declare.
11180
9836d6ea
PA
111812010-05-03 Pedro Alves <pedro@codesourcery.com>
11182
11183 * proc-service.c (ps_pglobal_lookup): Use
11184 thread_db_look_up_one_symbol.
11185 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
11186 parameter. Use it instead of all_symbols_looked_up.
11187 * server.h (struct process_info) <all_symbols_looked_up>: Delete
11188 field.
11189 (all_symbols_looked_up): Don't declare.
11190 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
11191 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
11192 field.
11193 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
11194 Set all_symbols_looked_up here.
11195 (thread_db_look_up_one_symbol): New.
11196 (thread_db_get_tls_address): Adjust.
11197 (thread_db_load_search, try_thread_db_load_1): Always allocate the
11198 thread_db object on the heap, and tentatively set it in the
11199 process structure.
11200 (thread_db_init): Don't set all_symbols_looked_up here.
11201 * linux-low.h (thread_db_look_up_one_symbol): Declare.
11202
7984d532
PA
112032010-05-03 Pedro Alves <pedro@codesourcery.com>
11204
11205 * linux-low.c (linux_kill, linux_detach): Adjust.
11206 (status_pending_p_callback): Remove redundant statement. Check
11207 for !TARGET_WAITIKIND_IGNORE, instead of
11208 TARGET_WAITKIND_STOPPED.
11209 (handle_tracepoints): Make sure LWP is locked. Adjust.
11210 (linux_wait_for_event_1): Adjust.
11211 (linux_cancel_breakpoints): New.
11212 (unsuspend_one_lwp): New.
11213 (unsuspend_all_lwps): New.
11214 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
11215 (send_sigstop_callback): Change return type to int, add new
11216 `except' parameter and handle it.
11217 (suspend_and_send_sigstop_callback): New.
11218 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
11219 pass them down. If SUSPEND, also increment the lwp's suspend
11220 count.
11221 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
11222 (need_step_over_p): Don't consider suspended LWPs.
11223 (start_step_over): Adjust.
11224 (proceed_one_lwp): Change return type to int, add new `except'
11225 parameter and handle it.
11226 (unsuspend_and_proceed_one_lwp): New.
11227 (proceed_all_lwps): Use find_inferior instead of
11228 for_each_inferior.
11229 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
11230 also decrement the suspend count of LWPs. Pass `except' down,
11231 instead of hacking its suspend count.
11232 (linux_pause_all): Add `freeze' parameter. Adjust.
11233 (linux_unpause_all): New.
11234 (linux_target_ops): Install linux_unpause_all.
11235 * server.c (handle_status): Adjust.
11236 * target.h (struct target_ops): New fields `unpause_all' and
11237 `cancel_breakpoints'. Add new parameter to `pause_all'.
11238 (pause_all): Add new `freeze' parameter.
11239 (unpause_all): New.
11240 (cancel_breakpoints): New.
11241 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
11242 cancel breakpoints.
11243 (cmd_qtstart): Pause threads.
11244 (stop_tracing): Pause threads, and cancel breakpoints.
11245 * win32-low.c (win32_target_ops): Adjust.
11246
e471f25b
PA
112472010-05-03 Pedro Alves <pedro@codesourcery.com>
11248
11249 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
11250 the inferior right away from here...
11251 (linux_wait_1): ... to here, and adjust to check the thread's
11252 last_resume_kind instead of the lwp's step or stop_expected flags.
11253
1915ef4f
PA
112542010-05-02 Pedro Alves <pedro@codesourcery.com>
11255
11256 * README: Use consistent `GDB' and `GDBserver' spellings.
11257
f9e39928
PA
112582010-05-02 Pedro Alves <pedro@codesourcery.com>
11259
11260 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
11261 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
11262 (linux_detach_one_lwp): Assume the lwp is stopped.
11263 (any_thread_of): Delete.
11264 (linux_detach): Stop all lwps here. Don't blindly delete all
11265 breakpoints.
11266 (delete_lwp_callback): New.
11267 (linux_mourn): Delete all lwps of the process that is gone.
11268 (linux_wait_1): Don't delete the last lwp of the process here.
11269 * mem-break.h (mark_breakpoints_out): Declare.
11270 * mem-break.c (mark_breakpoints_out): New.
11271 (free_all_breakpoints): Use it.
11272 * server.c (handle_target_event): If the process is gone, mark
11273 breakpoints out.
11274 * thread-db.c (struct thread_db) <create_bp>: New field.
11275 (thread_db_enable_reporting): Fix prototype. Store a thread event
11276 breakpoint reference in the thread_db struct.
11277 (thread_db_load_search): Clear the thread_db object.
11278 (try_thread_db_load_1): Ditto.
11279 (switch_to_process): New.
11280 (disable_thread_event_reporting): Use it.
11281 (remove_thread_event_breakpoints): New.
11282 (thread_db_detach, thread_db_mourn): Use it.
11283
1e7fc18c
PA
112842010-05-01 Pedro Alves <pedro@codesourcery.com>
11285
11286 * linux-low.c (linux_enable_event_reporting): New.
11287 (linux_wait_for_event_1, handle_extended_wait): Use it.
11288
02fc4de7
PA
112892010-04-30 Pedro Alves <pedro@codesourcery.com>
11290
11291 * linux-low.c (linux_kill_one_lwp, linux_kill)
11292 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
11293 (send_sigstop): Take an lwp_info as parameter instead. Queue a
11294 SIGSTOP even if the LWP is stopped.
11295 (send_sigstop_callback): New.
11296 (stop_all_lwps): Use send_sigstop_callback instead.
11297 (linux_resume_one_thread): Adjust.
11298 (proceed_one_lwp): Still proceed an LWP that the client has
11299 requested to stop, if we haven't reported it as stopped yet. Make
11300 sure that LWPs the client want stopped, have a pending SIGSTOP.
11301
bc3b5632
DE
113022010-04-26 Doug Evans <dje@google.com>
11303
ae1ada35
DE
11304 * server.c (handle_general_set): Make static.
11305
bc3b5632
DE
11306 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
11307 Print received char after testing for error/eof instead of before.
11308 (input_interrupt): Tweak comment.
11309
65730243
DE
113102010-04-23 Doug Evans <dje@google.com>
11311
11312 * server.c (start_inferior): Print inferior argv if --debug.
11313
a8ae7dc0
AR
113142010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
11315
11316 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
11317 * nto-x86-low.c: Include server.h
11318
1c07cc19
PM
113192010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
11320
11321 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
11322 be consistent with other sources of this directory.
11323 (init_registers_amd64): Correct name of source file of this function
11324 in the comment.
11325
e0a61e09
PM
113262010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11327
11328 * configure.srv (x86_64-*-mingw*): New configuration for Windows
11329 64-bit executables.
11330
54709339
PM
113312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11332
11333 * win32-i386-low.c: Add 64-bit support.
11334 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
11335 (init_registers_amd64): Declare.
11336 (mappings): Add 64-bit version of array.
11337 (init_windows_x86): New function.
11338 (the_low_target): Change init_arch field to init_windows_x86.
11339
e8f0053d
PM
113402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11341
11342 * win32-low.c: Adapt to support also 64-bit architecture.
11343 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
11344 (get_image_name): Use SIZE_T type for local variable `done'.
11345 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
11346 (toolhelp_get_dll_name): Idem.
11347 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
11348 Use uintptr_t typecast to avoid warning.
11349 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
11350 (handle_exception): Use phex_nz to avoid warning.
11351 (win32_wait): Remove unused local variable `process'.
11352
c481e77e
PM
113532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
11354
11355 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
11356 `amd64-avx.o'.
11357
12ea4b69
PM
113582010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
11359
11360 * configure.ac: Use `ws2_32' library for srv_mingw.
11361 * configure: Regenerate.
11362 * gdbreplay.c: Include winsock2.h instead of winsock.h.
11363 * remote-utils.c: Likewise.
11364
f6d1620c
L
113652010-04-17 H.J. Lu <hongjiu.lu@intel.com>
11366
11367 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
11368 if __x86_64__ is defined.
11369
8e642873
PM
113702010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11371
11372 * configure: Regenerate.
11373
711e434b
PM
113742010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
11375
11376 * server.c (handle_query): Handle 'qGetTIBAddr' query.
11377 * target.h (target_ops): New get_tib_address field.
11378 * win32-low.h (win32_thread_info): Add thread_local_base field.
11379 * win32-low.c (child_add_thread): Add tlb argument.
11380 Set thread_local_base field to TLB.
11381 (get_child_debug_event): Adapt to child_add_thread change.
11382 (win32_get_tib_address): New function.
11383 (win32_target_ops): Set get_tib_address field to
11384 win32_get_tib_address.
11385 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
11386
505106cd
PA
113872010-04-12 Pedro Alves <pedro@codesourcery.com>
11388
505106cd
PA
11389 * linux-low.c (linux_mourn): Also remove the process.
11390 * server.c (handle_target_event): Don't remove the process here.
11391 * nto-low.c (nto_mourn): New.
11392 (nto_target_ops): Install it.
11393 * spu-low.c (spu_mourn): New.
11394 (spu_target_ops): Install it.
11395 * win32-low.c (win32_mourn): New.
11396 (win32_target_ops): Install it.
11397
e8470a06
PA
113982010-04-12 Pedro Alves <pedro@codesourcery.com>
11399
11400 * server.h (buffer_xml_printf): Remove redundant `;'.
11401
45ba0d02
PA
114022010-04-12 Pedro Alves <pedro@codesourcery.com>
11403
11404 * regcache.c (set_register_cache): Invalidate regcaches before
11405 changing the register cache layout.
11406 (regcache_invalidate_one): Allow a NULL regcache.
11407 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
11408 regcaches before changing the register cache layout or the target
11409 regsets.
11410
59e04013
L
114112010-04-12 H.J. Lu <hongjiu.lu@intel.com>
11412
11413 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
11414 variable warning on Linux/x86-64.
11415
8336d594
PA
114162010-04-11 Pedro Alves <pedro@codesourcery.com>
11417
11418 GDBserver disconnected tracing support.
11419
11420 * linux-low.c (linux_remove_process): Delete.
11421 (add_lwp): Don't set last_resume_kind here.
11422 (linux_kill): Use `mourn'.
11423 (linux_detach): Use `thread_db_detach', and `mourn'.
11424 (linux_mourn): New.
11425 (linux_attach_lwp_1): Adjust comment.
11426 (linux_attach): last_resume_kind moved the thread_info; adjust.
11427 (status_pending_p_callback): Adjust.
11428 (linux_wait_for_event_1): Adjust.
11429 (count_events_callback, select_singlestep_lwp_callback)
11430 (select_event_lwp_callback, cancel_breakpoints_callback)
11431 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
11432 (proceed_one_lwp): Adjust.
11433 (linux_async): Add debug output.
11434 (linux_thread_stopped): New.
11435 (linux_pause_all): New.
11436 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
11437 linux_pause_all.
11438 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
11439 (thread_db_free): Delete declaration.
11440 (thread_db_detach, thread_db_mourn): Declare.
11441 * thread-db.c (thread_db_init): Use thread_db_mourn.
11442 (thread_db_free): Delete, split in two.
11443 (disable_thread_event_reporting): New.
11444 (thread_db_detach): New.
11445 (thread_db_mourn): New.
11446
11447 * server.h (struct thread_info) <last_resume_kind>: New field.
11448 <attached>: Add comment.
11449 <gdb_detached>: New field.
11450 (handler_func): Change return type to int.
11451 (handle_serial_event, handle_target_event): Ditto.
11452 (gdb_connected): Declare.
11453 (tracing): Delete.
11454 (disconnected_tracing): Declare.
11455 (stop_tracing): Declare.
11456
11457 * server.c (handle_query) <qSupported>: Report support for
11458 disconnected tracing.
11459 (queue_stop_reply_callback): Account for running threads.
11460 (gdb_wants_thread_stopped): New.
11461 (gdb_wants_all_threads_stopped): New.
11462 (gdb_reattached_process): New.
11463 (handle_status): Clear the `gdb_detached' flag of all processes.
11464 In all-stop, stop all threads.
11465 (main): Be sure to leave tfind mode. Handle disconnected tracing.
11466 (process_serial_event): If the remote connection breaks, or if an
11467 exit was forced with "monitor exit", force an event loop exit.
11468 Handle disconnected tracing on detach.
11469 (handle_serial_event): Adjust.
11470 (handle_target_event): If GDB isn't connected, forward events back
11471 to the inferior, unless the last process exited, in which case,
11472 exit gdbserver. Adjust interface.
11473
11474 * remote-utils.c (remote_open): Don't block in accept. Instead
11475 register an event loop source on the listen socket file
11476 descriptor. Refactor bits into ...
11477 (listen_desc): ... this new global.
11478 (gdb_connected): ... this new function.
11479 (enable_async_notification): ... this new function.
11480 (handle_accept_event): ... this new function.
11481 (remote_close): Clear remote_desc.
11482
11483 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
11484
11485 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
11486 New fields.
11487 (mourn_inferior): Define.
11488 (target_process_qsupported): Avoid the dangling else problem.
11489 (thread_stopped): Define.
11490 (pause_all): Define.
11491 (target_waitstatus_to_string): Declare.
11492 * target.c (target_waitstatus_to_string): New.
11493
11494 * tracepoint.c (tracing): Make extern.
11495 (disconnected_tracing): New.
11496 (stop_tracing): Make extern. Handle tracing stops due to GDB
11497 disconnecting.
11498 (cmd_qtdisconnected): New.
11499 (cmd_qtstatus): Report disconnected tracing status in trace reply.
11500 (handle_tracepoint_general_set): Handle QTDisconnected.
11501
11502 * event-loop.c (event_handler_func): Change return type to int.
11503 (process_event): Bail out if the event handler wants the event
11504 loop to stop.
11505 (handle_file_event): Ditto.
11506 (start_event_loop): Bail out if the event handler wants the event
11507 loop to stop.
11508
11509 * nto-low.c (nto_target_ops): Adjust.
11510 * spu-low.c (spu_wait): Don't remove the process here.
11511 (spu_target_ops): Adjust.
11512 * win32-low.c (win32_wait): Don't remove the process here.
11513 (win32_target_ops): Adjust.
11514
5d267c4c
PA
115152010-04-11 Pedro Alves <pedro@codesourcery.com>
11516
11517 * regcache.c (realloc_register_cache): Invalidate inferior's
11518 regcache before recreating it.
11519
623ccd72
PA
115202010-04-09 Pedro Alves <pedro@codesourcery.com>
11521
11522 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
11523
219f2f23
PA
115242010-04-09 Stan Shebs <stan@codesourcery.com>
11525 Pedro Alves <pedro@codesourcery.com>
11526
11527 * server.h (LONGEST): New.
11528 (struct thread_info) <while_stepping>: New field.
11529 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
11530 Declare.
11531 (initialize_tracepoint, handle_tracepoint_general_set)
11532 (handle_tracepoint_query, tracepoint_finished_step)
11533 (tracepoint_was_hit, release_while_stepping_state_list):
11534 (current_traceframe): Declare.
11535 * server.c (handle_general_set): Handle tracepoint packets.
11536 (read_memory): New.
11537 (write_memory): New.
11538 (handle_search_memory_1): Use read_memory.
11539 (handle_query): Report support for conditional tracepoints, trace
11540 state variables, and tracepoint sources. Handle tracepoint
11541 queries.
11542 (main): Initialize the tracepoints module.
11543 (process_serial_event): Handle traceframe reads/writes.
11544
11545 * linux-low.c (handle_tracepoints): New.
11546 (linux_wait_1): Call it.
11547 (linux_resume_one_lwp): Handle while-stepping.
11548 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
11549 (linux_target_ops): Install them.
11550 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
11551 New field.
11552 * linux-x86-low.c (x86_supports_tracepoints): New.
11553 (the_low_target). Install it.
11554
11555 * mem-break.h (delete_breakpoint): Declare.
11556 * mem-break.c (delete_breakpoint): Make external.
11557
11558 * target.h (struct target_ops): Add `supports_tracepoints',
11559 `read_pc', and `write_pc' fields.
11560 (target_supports_tracepoints): Define.
11561 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
11562 (phex_nz): New.
11563
11564 * regcache.h (struct regcache) <registers_owned>: New field.
11565 (init_register_cache, regcache_cpy): Declare.
11566 (regcache_read_pc, regcache_write_pc): Declare.
11567 (register_cache_size): Declare.
11568 (supply_regblock): Declare.
11569 * regcache.c (init_register_cache): New.
11570 (new_register_cache): Use it.
11571 (regcache_cpy): New.
11572 (register_cache_size): New.
11573 (supply_regblock): New.
11574 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 11575
219f2f23
PA
11576 * tracepoint.c: New.
11577
11578 * Makefile.in (OBS): Add tracepoint.o.
11579 (tracepoint.o): New rule.
11580
3a13a53b
L
115812010-04-08 H.J. Lu <hongjiu.lu@intel.com>
11582
11583 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
11584 (i386-mmx.o): New.
11585 (i386-mmx.c): Likewise.
11586 (i386-mmx-linux.o): Likewise.
11587 (i386-mmx-linux.c): Likewise.
11588
11589 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
11590 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
11591 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
11592 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
11593
11594 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
11595 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
11596 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
11597
1570b33e
L
115982010-04-07 H.J. Lu <hongjiu.lu@intel.com>
11599
11600 * Makefile.in (clean): Updated.
11601 (i386-avx.o): New.
11602 (i386-avx.c): Likewise.
11603 (i386-avx-linux.o): Likewise.
11604 (i386-avx-linux.c): Likewise.
11605 (amd64-avx.o): Likewise.
11606 (amd64-avx.c): Likewise.
11607 (amd64-avx-linux.o): Likewise.
11608 (amd64-avx-linux.c): Likewise.
11609
11610 * configure.srv (srv_i386_regobj): Add i386-avx.o.
11611 (srv_i386_linux_regobj): Add i386-avx-linux.o.
11612 (srv_amd64_regobj): Add amd64-avx.o.
11613 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
11614 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
11615 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
11616 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
11617 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
11618 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
11619 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
11620
11621 * i387-fp.c: Include "i386-xstate.h".
11622 (i387_xsave): New.
11623 (i387_cache_to_xsave): Likewise.
11624 (i387_xsave_to_cache): Likewise.
11625 (x86_xcr0): Likewise.
11626
11627 * i387-fp.h (i387_cache_to_xsave): Likewise.
11628 (i387_xsave_to_cache): Likewise.
11629 (x86_xcr0): Likewise.
11630
11631 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
11632 * linux-crisv32-low.c (target_regsets): Likewise.
11633 * linux-m68k-low.c (target_regsets): Likewise.
11634 * linux-mips-low.c (target_regsets): Likewise.
11635 * linux-ppc-low.c (target_regsets): Likewise.
11636 * linux-s390-low.c (target_regsets): Likewise.
11637 * linux-sh-low.c (target_regsets): Likewise.
11638 * linux-sparc-low.c (target_regsets): Likewise.
11639 * linux-xtensa-low.c (target_regsets): Likewise.
11640
11641 * linux-low.c: Include <sys/uio.h>.
11642 (regsets_fetch_inferior_registers): Support nt_type.
11643 (regsets_store_inferior_registers): Likewise.
11644 (linux_process_qsupported): New.
11645 (linux_target_ops): Add linux_process_qsupported.
11646
11647 * linux-low.h (regset_info): Add nt_type.
11648 (linux_target_ops): Add process_qsupported.
11649
11650 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
11651 and <sys/uio.h>.
11652 (init_registers_i386_avx_linux): New.
11653 (init_registers_amd64_avx_linux): Likewise.
11654 (xmltarget_i386_linux_no_xml): Likewise.
11655 (xmltarget_amd64_linux_no_xml): Likewise.
11656 (PTRACE_GETREGSET): Likewise.
11657 (PTRACE_SETREGSET): Likewise.
11658 (x86_fill_xstateregset): Likewise.
11659 (x86_store_xstateregset): Likewise.
11660 (use_xml): Likewise.
11661 (x86_linux_update_xmltarget): Likewise.
11662 (x86_linux_process_qsupported): Likewise.
11663 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
11664 (x86_arch_setup): Don't call init_registers_amd64_linux nor
11665 init_registers_i386_linux here. Call
11666 x86_linux_update_xmltarget.
11667 (the_low_target): Add x86_linux_process_qsupported.
11668
11669 * server.c (handle_query): Call target_process_qsupported.
11670
11671 * target.h (target_ops): Add process_qsupported.
11672 (target_process_qsupported): New.
11673
fc7238bb
PA
116742010-04-03 Pedro Alves <pedro@codesourcery.com>
11675
11676 * inferiors.c (add_thread): Set last_status kind to
11677 TARGET_WAITKIND_IGNORE.
11678 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
11679 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
11680 (linux_wait_1): Move `thread' local definition to block that uses
11681 it. Don't NULL initialize `event_child'.
11682 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
11683 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
11684 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
11685
bdabb078
PA
116862010-04-01 Pedro Alves <pedro@codesourcery.com>
11687
11688 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
11689 an extended waitstatus, or by a watchpoint.
11690 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
11691 thread was stepping or has been stopped by a watchpoint.
11692
d3bbe7a0
PA
116932010-04-01 Pedro Alves <pedro@codesourcery.com>
11694
11695 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
11696 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
11697 of another, then delete the previous, and validate all
11698 breakpoints.
11699 (validate_inserted_breakpoint): New.
11700 (delete_disabled_breakpoints): New.
11701 (validate_breakpoints): New.
11702 (check_mem_read): Validate breakpoints before trusting their
11703 shadow. Delete disabled breakpoints.
11704 (check_mem_write): Validate breakpoints before trusting they
11705 should be inserted. Delete disabled breakpoints.
11706 * mem-break.h (validate_breakpoints):
11707 * server.c (handle_query): Validate breakpoints when we see a
11708 qSymbol query.
11709
8b07ae33
PA
117102010-04-01 Pedro Alves <pedro@codesourcery.com>
11711
11712 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
11713 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
11714 if we could tell there's a GDB breakpoint at stop_pc.
11715 (need_step_over_p): Don't do a step over if we find a GDB
11716 breakpoint at the resume PC.
11717
11718 * mem-break.c (struct raw_breakpoint): New.
11719 (enum bkpt_type): New type `gdb_breakpoint'.
11720 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
11721 fields. New field `raw'.
11722 (find_raw_breakpoint_at): New.
11723 (set_raw_breakpoint_at): Handle refcounting. Create a raw
11724 breakpoint instead.
11725 (set_breakpoint_at): Adjust.
11726 (delete_raw_breakpoint): New.
11727 (release_breakpoint): New.
11728 (delete_breakpoint): Rename to...
11729 (delete_breakpoint_1): ... this. Add proc parameter. Use
11730 release_breakpoint. Return ENOENT.
11731 (delete_breakpoint): Reimplement.
11732 (find_breakpoint_at): Delete.
11733 (find_gdb_breakpoint_at): New.
11734 (delete_breakpoint_at): Delete.
11735 (set_gdb_breakpoint_at): New.
11736 (delete_gdb_breakpoint_at): New.
11737 (gdb_breakpoint_here): New.
11738 (set_reinsert_breakpoint): Use release_breakpoint.
11739 (uninsert_breakpoint): Rename to ...
11740 (uninsert_raw_breakpoint): ... this.
11741 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
11742 (reinsert_raw_breakpoint): Change parameter type to
11743 raw_breakpoint.
11744 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
11745 instead.
11746 (check_breakpoints): Adjust. Use release_breakpoint.
11747 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
11748 (breakpoint_inserted_here): Ditto.
11749 (check_mem_read): Adjust to iterate over raw breakpoints instead.
11750 Don't trust the breakpoint's shadow if it is not inserted.
11751 (check_mem_write): Adjust to iterate over raw breakpoints instead.
11752 (delete_all_breakpoints): Adjust.
11753 (free_all_breakpoints): Mark all breakpoints as uninserted, and
11754 use delete_breakpoint_1.
11755
11756 * mem-break.h (breakpoints_supported): Delete declaration.
11757 (set_gdb_breakpoint_at): Declare.
11758 (gdb_breakpoint_here): Declare.
11759 (delete_breakpoint_at): Delete.
11760 (delete_gdb_breakpoint_at): Declare.
11761
11762 * server.h (struct raw_breakpoint): Forward declare.
11763 (struct process_info): New field `raw_breakpoints'.
11764
11765 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
11766 breakpoints.
11767
6bf5e0ba
PA
117682010-03-24 Pedro Alves <pedro@codesourcery.com>
11769
11770 * linux-low.c (status_pending_p_callback): Fix comment.
11771 (linux_wait_for_event_1): Move most of the internal breakpoint
11772 handling from here...
11773 (linux_wait_1): ... to here.
11774 (count_events_callback): New.
11775 (select_singlestep_lwp_callback): New.
11776 (select_event_lwp_callback): New.
11777 (cancel_breakpoints_callback): New.
11778 (select_event_lwp): New.
11779 (linux_wait_1): Simplify internal breakpoint handling. Give equal
11780 priority to all LWPs that have had events that should be reported
11781 to the client. Cancel breakpoints when about to reporting the
11782 event to the client, not while stopping lwps. No longer cancel
11783 finished single-steps here.
11784 (cancel_finished_single_step): Delete.
11785 (cancel_finished_single_steps): Delete.
11786
414a389f
PA
117872010-03-24 Pedro Alves <pedro@codesourcery.com>
11788
11789 * mem-break.c (enum bkpt_type): New.
11790 (struct breakpoint): New field `type'.
11791 (set_breakpoint_at): Change return type to struct breakpoint
11792 pointer. Set type to `other_breakpoint' by default.
11793 (delete_breakpoint): Rewrite, supporting more than one breakpoint
11794 in the breakpoint list.
11795 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
11796 (reinsert_breakpoint): Rename to ...
11797 (reinsert_raw_breakpoint): ... this.
11798 (reinsert_breakpoints_at): Adjust.
11799 * mem-break.h (struct breakpoint): Declare.
11800 (set_breakpoint_at): Change return type to struct breakpoint
11801 pointer.
11802
2280c721
PA
118032010-03-24 Pedro Alves <pedro@codesourcery.com>
11804
11805 * server.c (handle_query): Assign, not compare.
11806
d50171e4
PA
118072010-03-24 Pedro Alves <pedro@codesourcery.com>
11808
11809 Teach linux gdbserver to step-over-breakpoints.
11810
11811 * linux-low.c (can_hardware_single_step): New.
11812 (supports_breakpoints): New.
11813 (handle_extended_wait): If stopping threads, read the stop pc of
11814 the new cloned LWP.
11815 (get_pc): New.
11816 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
11817 low target doesn't support retrieving the PC.
11818 (add_lwp): Set last_resume_kind to resume_continue.
11819 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
11820 (linux_attach): Don't clear stop_expected. Set the lwp's
11821 last_resume_kind to resume_stop.
11822 (linux_detach_one_lwp): Don't check for removed breakpoints.
11823 (check_removed_breakpoint): Delete.
11824 (status_pending_p): Rename to ...
11825 (status_pending_p_callback): ... this. Don't check for removed
11826 breakpoints. Don't consider threads that are stopped from GDB's
11827 perspective.
11828 (linux_wait_for_lwp): Always read the stop_pc here.
11829 (cancel_breakpoint): New.
11830 (step_over_bkpt): New global.
11831 (linux_wait_for_event_1): Implement stepping over breakpoints.
11832 (gdb_wants_lwp_stopped): New.
11833 (gdb_wants_all_stopped): New.
11834 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
11835 single-step traps here. Store the thread's last reported target
11836 wait status.
11837 (send_sigstop): Don't clear stop_expected. Always set it,
11838 instead.
11839 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
11840 (cancel_finished_single_step): New.
11841 (cancel_finished_single_steps): New.
11842 (wait_for_sigstop): Don't cancel finished single-step traps here.
11843 (linux_resume_one_lwp): Don't check for removed breakpoints.
11844 Don't set `step' on non-hardware step archs.
11845 (linux_set_resume_request): Ignore resume_stop requests if already
11846 stopping or stopped. Set the lwp's last_resume_kind.
11847 (resume_status_pending_p): Don't check for removed breakpoints.
11848 (need_step_over_p): New.
11849 (start_step_over): New.
11850 (finish_step_over): New.
11851 (linux_resume_one_thread): Always queue a sigstop for resume_stop
11852 requests. Clear the thread's last reported target waitstatus.
11853 Don't use the `suspended' flag. Don't consider pending breakpoints.
11854 (linux_resume): Start a step-over if necessary.
11855 (proceed_one_lwp): New.
11856 (proceed_all_lwps): New.
11857 (unstop_all_lwps): New.
11858 * linux-low.h (struct lwp_info): Rewrite comment for the
11859 `suspended' flag. Add the `stop_pc' field. Delete the
11860 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
11861 Add `'last_resume_kind' and `need_step_over' fields.
11862 * inferiors.c (struct thread_info): Delete, moved elsewhere.
11863 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
11864 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
11865 (set_raw_breakpoint_at): New.
11866 (set_breakpoint_at): Rewrite to use it.
11867 (reinsert_breakpoint_handler): Delete.
11868 (set_reinsert_breakpoint): New.
11869 (reinsert_breakpoint_by_bp): Delete.
11870 (delete_reinsert_breakpoints): New.
11871 (uninsert_breakpoint): Rewrite.
11872 (uninsert_breakpoints_at): New.
11873 (reinsert_breakpoint): Rewrite.
11874 (reinsert_breakpoints_at): New.
11875 (check_breakpoints): Rewrite.
11876 (breakpoint_here): New.
11877 (breakpoint_inserted_here): New.
11878 (check_mem_read): Adjust.
11879 * mem-break.h (breakpoints_supported, breakpoint_here)
11880 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
11881 (reinsert_breakpoint_by_bp): Delete declaration.
11882 (delete_reinsert_breakpoints): Declare.
11883 (reinsert_breakpoint): Delete declaration.
11884 (reinsert_breakpoints_at): Declare.
11885 (uninsert_breakpoint): Delete declaration.
11886 (uninsert_breakpoints_at): Declare.
11887 (check_breakpoints): Adjust prototype.
11888 * server.h: Adjust include order.
11889 (struct thread_info): Declare here. Add a `last_status' field.
11890
30ba68cb
MS
118912010-03-23 Michael Snyder <msnyder@vmware.com>
11892
11893 * server.c (crc32): New function.
11894 (handle_query): Add handling for 'qCRC:' request.
11895
b9a881c2
PA
118962010-03-23 Pedro Alves <pedro@codesourcery.com>
11897
11898 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
11899 lwp had been stopped by a watchpoint.
11900
e92d13d5
PA
119012010-03-16 Pedro Alves <pedro@codesourcery.com>
11902
11903 * server.h (internal_error): Declare.
11904 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
11905 * utils.c (internal_error): New function.
11906
64daa791
AS
119072010-03-15 Andreas Schwab <schwab@redhat.com>
11908
11909 * configure.srv: Fix typo setting srv_regobj.
11910
f52cd8cd
PA
119112010-03-15 Pedro Alves <pedro@codesourcery.com>
11912
11913 * linux-low.c (fetch_register): Avoid passing a non string literal
11914 format to `error'.
11915 (usr_store_inferior_registers): Ditto.
11916
93ae6fdc
PA
119172010-03-14 Pedro Alves <pedro@codesourcery.com>
11918
11919 * linux-low.c (linux_write_memory): Bail out early if peeking
11920 memory failed.
11921
c3adc08c
PA
119222010-03-14 Pedro Alves <pedro@codesourcery.com>
11923
11924 * linux-low.h (struct lwp_info): New fields
11925 `stopped_by_watchpoint' and `stopped_data_address'.
11926 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11927 here, and cache them in the lwp object.
11928 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11929 directly.
11930 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11931 field.
11932 (linux_stopped_by_watchpoint): Rewrite.
11933 (linux_stopped_data_address): Rewrite.
11934
bce522a2
PA
119352010-03-06 Simo Melenius <simo.melenius@iki.fi>
11936
11937 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11938 switching the current inferior, not before.
11939
90884b2b
L
119402010-03-01 H.J. Lu <hongjiu.lu@intel.com>
11941
11942 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11943 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11944 i386-linux.c and amd64-linux.c.
11945 (reg-i386.o): Removed.
11946 (reg-i386.c): Likewise.
11947 (reg-i386-linux.o): Likewise.
11948 (reg-i386-linux.c): Likewise.
11949 (reg-x86-64.o): Likewise.
11950 (reg-x86-64.c): Likewise.
11951 (reg-x86-64-linux.o): Likewise.
11952 (reg-x86-64-linux.c): Likewise.
11953 (i386.o): New.
11954 (i386.c): Likewise.
11955 (i386-linux.o): Likewise.
11956 (i386-linux.c): Likewise.
11957 (amd64.o): Likewise.
11958 (amd64.c): Likewise.
11959 (amd64-linux.o): Likewise.
11960 (amd64-linux.c): Likewise.
11961
11962 * configure.srv (srv_i386_regobj): New.
11963 (srv_i386_linux_regobj): Likewise.
11964 (srv_amd64_regobj): Likewise.
11965 (srv_amd64_linux_regobj): Likewise.
11966 (srv_i386_32bit_xmlfiles): Likewise.
11967 (srv_i386_64bit_xmlfiles): Likewise.
11968 (srv_i386_xmlfiles): Likewise.
11969 (srv_amd64_xmlfiles): Likewise.
11970 (srv_i386_linux_xmlfiles): Likewise.
11971 (srv_amd64_linux_xmlfiles): Likewise.
11972 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
11973 srv_xmlfiles to $srv_i386_xmlfiles.
11974 (i[34567]86-*-mingw32ce*): Likewise.
11975 (i[34567]86-*-mingw*): Likewise.
11976 (i[34567]86-*-nto*): Likewise.
11977 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11978 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
11979 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11980 (x86_64-*-linux*): Likewise.
11981
11982 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11983 (init_registers_amd64_linux): New.
11984 (x86_arch_setup): Replace init_registers_x86_64_linux with
11985 init_registers_amd64_linux.
11986
193f13e6
MK
119872010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
11988
11989 * configure.ac: Check for libdl. If it is not available link against
11990 static libthread_db.
11991 * configure: Regenerate.
11992
85d721b8
PA
119932010-02-22 Pedro Alves <pedro@codesourcery.com>
11994
11995 PR9605
11996
11997 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11998 handing a read watchpoint.
11999 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
12000
6076632b
DE
120012010-02-12 Doug Evans <dje@google.com>
12002
12003 * linux-low.c (linux_supports_tracefork_flag): Document.
12004 (linux_look_up_symbols): Add comment.
12005
3327ccf7
L
120062010-02-03 H.J. Lu <hongjiu.lu@intel.com>
12007
12008 * regcache.c (supply_register): Clear regcache if buf is NULL.
12009
0718675c 120102010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 12011 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
12012
12013 * inferiors.c (find_inferior): Add function documentation.
12014 (unloaded_dll): Handle the case where the unloaded dll has not
12015 been previously registered in the dll list.
12016
177321bd
DJ
120172010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12018
12019 * linux-arm-low.c (thumb_breakpoint_len): Delete.
12020 (thumb2_breakpoint): New.
12021 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
12022
2b009048
DJ
120232010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12024
12025 * linux-low.c (get_stop_pc): Check for SIGTRAP.
12026 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
12027 breakpoints.
12028
3be029c7
PA
120292010-01-21 Pedro Alves <pedro@codesourcery.com>
12030
12031 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
12032
18f5de3b
JK
120332010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
12034
12035 * linux-s390-low.c (s390_collect_ptrace_register)
12036 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
12037
3743bb4f
DE
120382010-01-21 Doug Evans <dje@google.com>
12039
14ce3065
DE
12040 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
12041 (PTRACE_ARG4_TYPE): New macro.
12042 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
12043 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
12044 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
12045 (usr_store_inferior_registers): Ditto.
12046 (linux_read_memory, linux_write_memory): Ditto.
12047 (linux_test_for_tracefork): Ditto.
12048
3743bb4f
DE
12049 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
12050 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
12051
8b315be5
PA
120522010-01-21 Pedro Alves <pedro@codesourcery.com>
12053
12054 * proc-service.c (ps_lgetregs): Don't refetch registers from the
12055 target.
12056
85492558
PA
120572010-01-21 Pedro Alves <pedro@codesourcery.com>
12058
12059 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
12060 prototype to take a regcache. Adjust.
12061
442ea881
PA
120622010-01-20 Pedro Alves <pedro@codesourcery.com>
12063
12064 * regcache.h (struct thread_info): Forward declare.
12065 (struct regcache): New.
12066 (new_register_cache): Adjust prototype.
12067 (get_thread_regcache): Declare.
12068 (free_register_cache): Adjust prototype.
12069 (registers_to_string, registers_from_string): Ditto.
12070 (supply_register, supply_register_by_name, collect_register)
12071 (collect_register_as_string, collect_register_by_name): Ditto.
12072 * regcache.c (struct inferior_regcache_data): Delete.
12073 (get_regcache): Rename to ...
12074 (get_thread_regcache): ... this. Adjust. Switch inferior before
12075 fetching registers.
12076 (regcache_invalidate_one): Adjust.
12077 (regcache_invalidate): Fix prototype.
12078 (new_register_cache): Return the new register cache.
12079 (free_register_cache): Change prototype.
12080 (realloc_register_cache): Adjust.
12081 (registers_to_string): Change prototype to take a regcache. Adjust.
12082 (registers_from_string): Ditto.
12083 (register_data): Ditto.
12084 (supply_register): Ditto.
12085 (supply_register_by_name): Ditto.
12086 (collect_register): Ditto.
12087 (collect_register_as_string): Ditto.
12088 (collect_register_by_name): Ditto.
12089 * server.c (process_serial_event): Adjust.
12090 * linux-low.h (regset_fill_func, regset_store_func): Change
12091 prototype.
12092 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
12093 Change prototype.
12094 * linux-low.c (get_stop_pc): Adjust.
12095 (check_removed_breakpoint): Adjust.
12096 (linux_wait_for_event): Adjust.
12097 (linux_resume_one_lwp): Adjust.
12098 (fetch_register): Add regcache parameter. Adjust.
12099 (usr_store_inferior_registers): Ditto.
12100 (regsets_fetch_inferior_registers): Ditto.
12101 (regsets_store_inferior_registers): Ditto.
12102 (linux_fetch_registers, linux_store_registers): Ditto.
12103 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
12104 regcache. Adjust.
43aaf8b6
PA
12105 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
12106 Ditto.
442ea881
PA
12107 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
12108 prototype to take a regcache.
12109 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
12110 * remote-utils.c (convert_ascii_to_int, outreg)
12111 (prepare_resume_reply): Change prototype to take a regcache.
12112 Adjust.
12113 * target.h (struct target_ops) <fetch_registers, store_registers>:
12114 Change prototype to take a regcache.
12115 (fetch_inferior_registers, store_inferior_registers): Change
12116 prototype to take a regcache. Adjust.
12117 * proc-service.c (ps_lgetregs): Adjust.
12118 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
12119 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
12120 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
12121 take a regcache. Adjust.
12122 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
12123 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
12124 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
12125 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
12126 * linux-cris-low.c (cris_get_pc, cris_set_pc)
12127 (cris_cannot_fetch_register):
12128 (cris_breakpoint_at): Change prototype to take a regcache.
12129 Adjust.
12130 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
12131 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
12132 to take a regcache. Adjust.
12133 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
12134 Adjust.
12135 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
12136 take a regcache. Adjust.
12137 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
12138 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
12139 (m68k_set_pc): Change prototype to take a regcache. Adjust.
12140 * linux-mips-low.c (mips_get_pc):
12141 (mips_set_pc): Change prototype to take a regcache. Adjust.
12142 (mips_reinsert_addr): Adjust.
12143 (mips_collect_register): Change prototype to take a regcache.
12144 Adjust.
12145 (mips_supply_register):
12146 (mips_collect_register_32bit, mips_supply_register_32bit)
12147 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12148 (mips_store_fpregset): Ditto.
43aaf8b6
PA
12149 * linux-ppc-low.c (ppc_supply_ptrace_register)
12150 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
12151 (parse_spufs_run): Adjust.
12152 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
12153 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
12154 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
12155 take a regcache. Adjust.
12156 * linux-s390-low.c (s390_collect_ptrace_register)
12157 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
12158 (s390_set_pc): Change prototype to take a regcache. Adjust.
12159 (s390_arch_setup): Adjust.
12160 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
12161 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
12162 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
12163 (sparc_fill_gregset, sparc_store_gregset_from_stack)
12164 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
12165 regcache. Adjust.
12166 (sparc_breakpoint_at): Adjust.
12167 * linux-xtensa-low.c (xtensa_fill_gregset):
12168 (xtensa_store_gregset):
12169 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
12170 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
12171 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
12172 prototype to take a regcache. Adjust.
12173 * win32-arm-low.c (arm_fetch_inferior_register)
12174 (arm_store_inferior_register): Change prototype to take a
12175 regcache. Adjust.
12176 * win32-i386-low.c (i386_fetch_inferior_register)
12177 (i386_store_inferior_register): Change prototype to take a
12178 regcache. Adjust.
12179 * win32-low.c (child_fetch_inferior_registers)
12180 (child_store_inferior_registers): Change prototype to take a
12181 regcache. Adjust.
12182 (win32_wait): Adjust.
12183 (win32_fetch_inferior_registers): Change prototype to take a
12184 regcache. Adjust.
12185 (win32_store_inferior_registers): Adjust.
12186 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
12187 store_inferior_register>: Change prototype to take a regcache.
12188
60c3d7b0
DE
121892010-01-20 Doug Evans <dje@google.com>
12190
12191 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
12192 #ifdef.
12193 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 12194 (W_STOPCODE): Provide definition if missing.
60c3d7b0 12195
dc146f7c
VP
121962010-01-13 Vladimir Prus <vladimir@codesourcery.com>
12197
12198 * linux-low.c (linux_core_of_thread): New.
12199 (compare_ints, show_process, list_threads): New.
12200 (linux_qxfer_osdata): Report threads and cores.
12201 (linux_target_op): Register linux_core_of_thread.
12202 * remote-utils.c (prepare_resume_reply): Report the core.
12203 (buffer_xml_printf): Support %d specifier.
12204 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
12205 New.
12206 (handle_query): Handle qXfer:threads. Announce availability
12207 thereof.
12208 * target.h (struct target_ops): New field core_of_thread.
12209
7803799a
UW
122102010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
12211
12212 * Makefile.in (clean): Remove new generated files.
12213 (reg-s390.o, reg-s390.c): Remove rules.
12214 (reg-s390x.o, reg-s390x.c): Likewise.
12215 (s390-linux32.o, s390-linux32.c): Add rules.
12216 (s390-linux64.o, s390-linux64.c): Likewise.
12217 (s390x-linux64.o, s390x-linux64.c): Likewise.
12218 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
12219 * linux-s390-low.c: Include <elf.h>.
12220 (HWCAP_S390_HIGH_GPRS): Define if undefined.
12221 (init_registers_s390): Remove prototype.
12222 (init_registers_s390x): Likewise.
12223 (init_registers_s390_linux32): Add prototype.
12224 (init_registers_s390_linux64): Likewise.
12225 (init_registers_s390x_linux64): Likewise.
12226 (s390_num_regs_3264): New define.
12227 (s390_regmap_3264): New global variable.
12228 (s390_cannot_fetch_register): Remove obsolete check.
12229 (s390_cannot_store_register): Likewise.
12230 (s390_collect_ptrace_register): Handle upper/lower register halves.
12231 (s390_supply_ptrace_register): Likewise.
12232 (s390_fill_gregset): Update to register number changes.
12233 (s390_get_hwcap): New routine.
12234 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
12235 Install appropriate regmap and register set.
12236
6e7ffa39
JB
122372010-01-01 Joel Brobecker <brobecker@adacore.com>
12238
12239 * server.c (gdbserver_version): Update copyright year to 2010.
12240 * gdbreplay.c (gdbreplay_version): Likewise.
12241
957f3f49
DE
122422009-12-28 Doug Evans <dje@google.com>
12243
12244 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
12245 elf/external.h. Include <elf.h> instead but only if necessary.
12246
ca5c370d
PA
122472009-12-28 Pedro Alves <pedro@codesourcery.com>
12248
12249 * linux-low.c (linux_remove_process): Remove `detaching'
12250 parameter. Don't release/detach from thread_db here.
12251 (linux_kill): Release/detach from thread_db here, ...
12252 (linux_detach): ... and here, before actually detaching.
12253 (linux_wait_1): ... and here, when a process exits.
12254 * thread-db.c (any_thread_of): New.
12255 (thread_db_free): Switch the current inferior to a thread of the
12256 passed in process.
12257
4ee62156
DE
122582009-12-21 Doug Evans <dje@google.com>
12259
d90e6a88
DE
12260 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
12261
c5f62d5f
DE
12262 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
12263 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
12264 warning ifndef __NR_tkill. Move setting of errno there too.
12265 Delete unnecessary resetting of errno after syscall.
12266 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
12267
10e86dd7
DE
12268 * configure.ac: Check for dladdr.
12269 * config.in: Regenerate.
12270 * configure: Regenerate.
12271 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
12272 (try_thread_db_load): Update.
12273
4ee62156
DE
12274 * linux-low.c (my_waitpid): Delete unnecessary prototype.
12275
00f515da
DE
122762009-12-18 Doug Evans <dje@google.com>
12277
e9464885
DE
12278 * event-loop.c: Include unistd.h if it exists.
12279
07d4f67e
DE
12280 * linux-low.c (my_waitpid): Move definition away from being in
12281 between linux_tracefork_child/linux_test_for_tracefork.
12282
00f515da
DE
12283 * gdb_proc_service.h (psaddr_t): Fix type.
12284 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
12285 signature to match glibc.
12286
1de1badb
DE
122872009-12-16 Doug Evans <dje@google.com>
12288
12289 * linux-low.c (linux_read_memory): Fix argument to read.
12290
aeeb81d1
PA
122912009-11-26 Pedro Alves <pedro@codesourcery.com>
12292
12293 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
12294 events, don't leave current_inferior pointing at null.
12295
10357975
PA
122962009-11-26 Pedro Alves <pedro@codesourcery.com>
12297
12298 * win32-low.c (LOG): Delete.
12299 (OUTMSG): Output to stderr.
12300 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
12301 on compile time LOG macro.
12302 (win32_wait): Fix debug output.
12303
cf6e3471
PA
123042009-11-26 Pedro Alves <pedro@codesourcery.com>
12305
12306 * win32-low.c (win32_add_one_solib): If the dll name is
12307 "ntdll.dll", prepend the system directory to the dll path.
12308
0c85e18e
MK
123092009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
12310
12311 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
12312
9ac544ce 123132009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 12314 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
12315
12316 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
12317 * configure.ac: Check for __mcoldfire__ and set
12318 gdb_cv_m68k_is_coldfire.
12319 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
12320 reg-cf.o and reg-m68k.o.
12321 * configure: Regenerated.
12322
fd7dd3e6
PA
123232009-11-16 Pedro Alves <pedro@codesourcery.com>
12324
12325 * linux-low.c (linux_remove_process): Add `detaching' parameter.
12326 Pass it to thread_db_free.
12327 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
12328 proper `detaching' argument to linux_remove_process.
12329 * linux-low.h (thread_db_free): Add `detaching' parameter.
12330 * thread-db.c (thread_db_init): Pass false as `detaching' argument
12331 to thread_db_free.
12332 (thread_db_free): Add `detaching' parameter. Only
12333 call td_ta_clear_event if detaching from process.
12334
75aa492e
MK
123352009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
12336
12337 * thread-db.c (thread_db_free): Fix typo.
12338
21e1bee4
PP
123392009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
12340
12341 PR gdb/10838
12342 * thread-db.c (thread_db_free): Call td_ta_clear_event.
12343
8838b45e
NS
123442009-11-03 Nathan Sidwell <nathan@codesourcery.com>
12345
12346 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
12347 with an i686 compiler.
12348 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
12349 needed.
12350 * configure: Rebuilt.
12351
8a35fb51
SL
123522009-10-29 Sandra Loosemore <sandra@codesourcery.com>
12353
12354 PR gdb/10783
12355
12356 * server.c (handle_search_memory_1): Correct read_addr initialization
12357 in loop for searching subsequent chunks.
12358
96f15937
PP
123592009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
12360
12361 * configure.ac: New --with-libthread-db option.
12362 * thread-db.c: Allow direct dependence on libthread_db.
12363 (thread_db_free): Adjust.
12364 * config.in: Regenerate.
12365 * configure: Likewise.
889bf7c5 12366
5f7d1694
PP
123672009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
12368
12369 PR gdb/10757
12370 * thread-db.c (attach_thread): New function.
12371 (maybe_attach_thread): Return success/failure.
12372 (find_new_threads_callback): Adjust.
889bf7c5
PA
12373 (thread_db_find_new_threads): Loop until no new threads.
12374
88e3b899
PA
123752009-10-13 Pedro Alves <pedro@codesourcery.com>
12376
12377 * proc-service.c (ps_lgetregs): Formatting.
12378
cdbfd419
PP
123792009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
12380
12381 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
12382 * configure.ac: Adjust.
12383 * linux-low.h (struct process_info_private): Move members to struct
12384 thread_db.
12385 (thread_db_free, thread_db_handle_monitor_command): New prototype.
12386 * linux-low.c (linux_remove_process): Adjust.
12387 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
12388 * server.c (handle_query): Move code ...
12389 (handle_monitor_command): ... here. New function.
12390 * target.h (struct target_ops): New member.
12391 * thread-db.c (struct thread_db): New.
12392 (libthread_db_search_path): New variable.
12393 (thread_db_create_event, thread_db_enable_reporting)
12394 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
12395 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
12396 (try_thread_db_load_1, dladdr_to_soname): New functions.
12397 (try_thread_db_load, thread_db_load_search): New functions.
12398 (thread_db_init): Search for libthread_db.
12399 (thread_db_free): New function.
12400 (thread_db_handle_monitor_command): Likewise.
12401 * config.in: Regenerate.
12402 * configure: Regenerate.
889bf7c5 12403
4168d2d6
UW
124042009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
12405
12406 * spu-low.c (spu_kill): Wait for inferior to terminate.
12407 Call clear_inferiors.
12408 (spu_detach): Call clear_inferiors.
12409
81ecdfbb
RW
124102009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12411
12412 * aclocal.m4: Regenerate.
12413 * config.in: Likewise.
12414 * configure: Likewise.
12415
0b9ff2c0
UW
124162009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12417
12418 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
12419 (parse_spufs_run): New function.
12420 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
12421 (ppc_breakpoint_at): Handle SPU breakpoints.
12422
efcbbd14
UW
124232009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12424
12425 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
12426 (SPUFS_MAGIC): Define.
12427 (spu_enumerate_spu_ids): New function.
12428 (linux_qxfer_spu): New function.
12429 (linux_target_ops): Install linux_qxfer_spu.
12430
f4d9bade
UW
124312009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
12432
12433 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
12434 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
12435 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
12436 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
12437 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
12438 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
12439 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
12440 (init_registers_powerpc_cell32l): Add prototype.
12441 (init_registers_powerpc_cell64l): Likewise.
12442 (ppc_arch_setup): Detect Cell/B.E. architecture.
12443
96e946ca
RW
124442009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
12445
12446 * Makefile.in (datarootdir): New variable.
12447
58d6951d
DJ
124482009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12449
12450 * linux-low.c (linux_write_memory): Update debugging output.
12451 * Makefile.in (clean): Add new descriptions.
12452 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
12453 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
12454 * configure.srv: Add new files for arm*-*-linux*.
12455 * linux-arm-low.c: Add new declarations.
12456 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
12457 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
12458 (HWCAP_VFPv3D16): New.
12459 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
12460 instead of __IWMMXT__.
12461 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
12462 (arm_arch_setup): New.
12463 (target_regsets): Remove #ifdef. Add VFP regset.
12464 (the_low_target): Use arm_arch_setup.
12465
12b42a12
DJ
124662009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
12467
12468 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
12469 the main thread again.
12470
ac8c974e
AR
124712009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
12472
12473 Adding Neutrino gdbserver.
12474 * configure: Regenerated.
12475 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
12476 * configure.srv (i[34567]86-*-nto*): New target.
12477 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
12478 * remote-utils.c [__QNX__]: Include sys/iomgr.h
12479 (nto_comctrl) [__QNX__]: New function.
12480 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
12481
4424e0c3 124822009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
12483
12484 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
12485 srv_tgtobj.
12486
912cf4ba
PA
124872009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
12488 Pedro Alves <pedro@codesourcery.com>
12489
12490 * win32-i386-low.c (i386_get_thread_context): Handle systems that
12491 don't support CONTEXT_EXTENDED_REGISTERS.
12492 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
12493 (the_low_target): Install them.
12494 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
12495 failing with ERROR_PIPE_NOT_CONNECTED.
12496
aa5ca48f
DE
124972009-06-30 Doug Evans <dje@google.com>
12498 Pierre Muller <muller@ics.u-strasbg.fr>
12499
12500 Add h/w watchpoint support to x86-linux, win32-i386.
12501 * Makefile.in (SFILES): Add i386-low.c
12502 (i386_low_h): Define.
12503 (i386-low.o): Add dependencies.
12504 (linux-x86-low.o): Add i386-low.h dependency.
12505 (win32-i386-low.o): Ditto.
12506 * i386-low.c: New file.
12507 * i386-low.h: New file.
12508 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
12509 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
12510 * linux-low.c (linux_add_process): Initialize arch_private.
12511 (linux_remove_process): Free arch_private.
12512 (add_lwp): Initialize arch_private.
12513 (delete_lwp): Free arch_private.
12514 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
12515 provided.
12516 * linux-low.h (process_info_private): New member arch_private.
12517 (lwp_info): New member arch_private.
12518 (linux_target_ops): New members new_process, new_thread,
12519 prepare_to_resume.
12520 (ptid_of): New macro.
12521 * linux-x86-low.c: Include stddef.h, i386-low.h.
12522 (arch_process_info): New struct.
12523 (arch_lwp_info): New struct.
12524 (x86_linux_dr_get, x86_linux_dr_set): New functions.
12525 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12526 (i386_dr_low_get_status): New function.
12527 (x86_insert_point, x86_remove_point): New functions.
12528 (x86_stopped_by_watchpoint): New function.
12529 (x86_stopped_data_address): New function.
12530 (x86_linux_new_process, x86_linux_new_thread): New functions.
12531 (x86_linux_prepare_to_resume): New function.
12532 (the_low_target): Add entries for insert_point, remove_point,
12533 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
12534 prepare_to_resume.
12535 * server.c (debug_hw_points): New global.
12536 (monitor_show_help): Document set debug-hw-points.
12537 (handle_query): Process "set debug-hw-points".
12538 * server.h (debug_hw_points): Declare.
12539 (paddress): Declare.
12540 * utils.c (NUMCELLS, CELLSIZE): New macros.
12541 (get_sell, xsnprintf, paddress): New functions.
12542 * win32-arm-low.c (the_low_target): Add entries for insert_point,
12543 remove_point, stopped_by_watchpoint, stopped_data_address.
12544 * win32-i386-low.c: Include i386-low.h.
12545 (debug_reg_state): Replaces dr.
12546 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
12547 (i386_dr_low_get_status): New function.
12548 (i386_insert_point, i386_remove_point): New functions.
12549 (i386_stopped_by_watchpoint): New function.
12550 (i386_stopped_data_address): New function.
12551 (i386_initial_stuff): Update.
12552 (get_thread_context,set_thread_context,i386_thread_added): Update.
12553 (the_low_target): Add entries for insert_point,
12554 remove_point, stopped_by_watchpoint, stopped_data_address.
12555 * win32-low.c (win32_insert_watchpoint): New function.
12556 (win32_remove_watchpoint): New function.
12557 (win32_stopped_by_watchpoint): New function.
12558 (win32_stopped_data_address): New function.
12559 (win32_target_ops): Add entries for insert_watchpoint,
12560 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
12561 * win32-low.h (win32_target_ops): New members insert_point,
12562 remove_point, stopped_by_watchpoint, stopped_data_address.
12563
d993e290
PA
125642009-06-25 Pedro Alves <pedro@codesourcery.com>
12565
12566 * server.c (process_serial_event): Re-return unsupported, not
12567 error, if the type isn't recognized. Re-allow supporting only
12568 insert or remove packets. Also call require_running for
12569 breakpoints. Add missing break statement to default case. Tidy.
12570 * target.h (struct target_ops): Rename insert_watchpoint to
12571 insert_point, and remove_watchpoint to remove_point.
12572
12573 * linux-low.h (struct linux_target_ops): Likewise.
12574 * linux-low.c (linux_insert_watchpoint): Rename to ...
12575 (linux_insert_point): ... this. Adjust.
12576 (linux_remove_watchpoint): Rename to ...
12577 (linux_remove_point): ... this. Adjust.
12578 (linux_target_ops): Adjust.
12579 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
12580 (cris_insert_point): ... this.
12581 (cris_remove_watchpoint): Rename to ...
12582 (cris_remove_point): ... this.
12583 (the_low_target): Adjust.
12584
0f54c268
PM
125852009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
12586
12587 * server.c (handle_v_kill): Pass signal_pid to
12588 kill_inferior if multi_process is zero.
12589
c6314022
AR
125902009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
12591
12592 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
12593 * target.h (target_ops): Comment for *_watchpoint to make it clear
12594 the functions can get types '0' and '1'.
12595
4463ce24
AR
125962009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
12597
12598 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
12599 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
12600 * regcache.c (get_regcache): Likewise.
12601 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
12602 * win32-low.c (child_fetch_inferior_registers): Remove check for
12603 regno 0.
12604
cf8fd78b
PA
126052009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
12606 Pedro Alves <pedro@codesourcery.com>
12607
12608 * target.h (struct target_ops) <supports_multi_process>: New
12609 callback.
12610 (target_supports_multi_process): New.
12611 * server.c (handle_query): Even if GDB reports support, only
12612 enable multi-process if the target also supports it. Report
12613 multi-process support only if the target backend supports it.
12614 * linux-low.c (linux_supports_multi_process): New function.
12615 (linux_target_ops): Install it as target_supports_multi_process
12616 callback.
12617
47c0c975
DE
126182009-05-24 Doug Evans <dje@google.com>
12619
e09875d4
DE
12620 Global renaming of find_thread_pid to find_thread_ptid.
12621 * server.h (find_thread_ptid): Renamed from find_thread_pid.
12622 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
12623 All callers updated.
12624
e27d73f6
DE
12625 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
12626 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
12627 directly.
12628
47c0c975
DE
12629 * linux-low.c (get_stop_pc): Print pc if debug_threads.
12630 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
12631 (linux_resume_one_lwp): Ditto.
12632
2acc282a
DE
126332009-05-23 Doug Evans <dje@google.com>
12634
12635 * linux-low.c (linux_resume_one_lwp): Change type of first arg
12636 from struct inferior_list_entry * to struct lwp_info *.
12637 All callers updated.
12638
9f1036c1
DE
126392009-05-13 Doug Evans <dje@google.com>
12640
12641 * linux-x86-low.c: Don't include assert.h.
12642 (x86_siginfo_fixup): Use fatal, not assert.
12643 (x86_arch_setup): Fix comment.
12644
d0722149
DE
126452009-05-12 Doug Evans <dje@google.com>
12646
12647 Biarch support for i386/amd64 gdbserver.
12648 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
12649 Add linux-x86-low.c.
12650 (linux-i386-low.o, linux-x86-64-low.o): Delete.
12651 (linux-x86-low.o): Add.
12652 * linux-x86-64-low.c: Delete.
12653 * linux-i386-low.c: Delete.
12654 * linux-x86-low.c: New file.
12655 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
12656 linux-x86-low.o.
12657 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
12658 linux-x86-low.o.
12659 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
12660 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
12661 (linux_child_pid_to_exec_file): New function.
12662 (elf_64_header_p, elf_64_file_p): New functions.
12663 (siginfo_fixup): New function.
12664 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
12665 give target a chance to convert layout.
12666 * linux-low.h (linux_target_ops): New member siginfo_fixup.
12667 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
12668
fdeb2a12
DE
126692009-05-07 Doug Evans <dje@google.com>
12670
12671 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
12672 (regsets_store_inferior_registers): Ditto.
12673
a6dbe5df
PA
126742009-05-06 Pedro Alves <pedro@codesourcery.com>
12675
12676 PR server/10048
12677
12678 * linux-low.c (must_set_ptrace_flags): Delete.
12679 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
12680 of the global.
12681 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
12682 `lwp->must_set_ptrace_flags' instead.
ba42693b 12683 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
12684 (linux_wait_1): ... not here.
12685
5091eb23
DE
126862009-04-30 Doug Evans <dje@google.com>
12687
9f767825
DE
12688 * inferiors.c (started_inferior_callback): New function.
12689 (attached_inferior_callback): New function.
12690 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
12691 * server.c (print_started_pid, print_attached_pid): New functions.
12692 (detach_or_kill_for_exit): New function.
12693 (main): Call it instead of for_each_inferior (kill_inferior_callback).
12694 * server.h (have_started_inferiors_p): Declare.
12695 (have_attached_inferiors_p): Declare.
12696
5091eb23
DE
12697 * inferiors.c (remove_process): Fix memory leak, free process.
12698 * linux-low.c (linux_remove_process): New function.
12699 (linux_kill): Call it instead of remove_process.
12700 (linux_detach, linux_wait_1): Ditto.
12701
155c8968
PA
127022009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
12703
12704 * configure.srv: Add x86 Windows CE target.
12705
7fe519cb
UW
127062009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12707
12708 * inferiors.c (get_thread_process): Make global.
12709 * server.h (get_thread_process): Add prototype.
12710 * thread-db.c (find_one_thread): Use get_thread_process
12711 instead of current_process.
12712 (thread_db_get_tls_address): Do not crash if called when
12713 thread layer is not yet initialized.
12714
5472f405
UW
127152009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
12716
12717 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
12718 * spu-low.c (current_tid): Rename to ...
12719 (current_ptid): ... this.
12720 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
12721 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
12722 ptid_get_lwp (current_ptid) instead of current_tid.
12723 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
12724 instead of current_tid. Use find_process_pid to verify pid
12725 argument is valid. Pass proper argument to remove_process.
12726 (spu_thread_alive): Compare current_ptid instead of current_tid.
12727 (spu_resume): Likewise.
12728
55ac2b99
PA
127292009-04-02 Pedro Alves <pedro@codesourcery.com>
12730
12731 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
12732 variable.
12733
95954743
PA
127342009-04-01 Pedro Alves <pedro@codesourcery.com>
12735
12736 Implement the multiprocess extensions, and add linux multiprocess
12737 support.
12738
12739 * server.h (ULONGEST): Declare.
12740 (struct ptid, ptid_t): New.
12741 (minus_one_ptid, null_ptid): Declare.
12742 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12743 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
12744 (struct inferior_list_entry): Change `id' type from unsigned from
12745 to ptid_t.
12746 (struct sym_cache, struct breakpoint, struct
12747 process_info_private): Forward declare.
12748 (struct process_info): Declare.
12749 (current_process): Declare.
12750 (all_processes): Declare.
12751 (initialize_inferiors): Declare.
12752 (add_thread): Adjust to use ptid_t.
12753 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
12754 (add_process, remove_process, find_thread_pid): Declare.
12755 (find_inferior_id): Adjust to use ptid_t.
12756 (cont_thread, general_thread, step_thread): Change type to ptid_t.
12757 (multi_process): Declare.
12758 (push_event): Adjust to use ptid_t.
12759 (read_ptid, write_ptid): Declare.
12760 (prepare_resume_reply): Adjust to use ptid_t.
12761 (clear_symbol_cache): Declare.
12762 * inferiors.c (all_processes): New.
12763 (null_ptid, minus_one_ptid): New.
12764 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
12765 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
12766 (add_thread): Change unsigned long to ptid. Remove gdb_id
12767 parameter. Adjust.
12768 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
12769 (gdb_id_to_thread): Rename to ...
12770 (find_thread_pid): ... this. Change unsigned long to ptid.
12771 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
12772 (loaded_dll, pull_pid_from_list): Adjust.
12773 (add_process, remove_process, find_process_pid)
12774 (get_thread_process, current_process, initialize_inferiors): New.
12775 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
12776 (struct target_waitstatus) <related_pid>: Ditto.
12777 (struct target_ops) <kill, detach>: Add `pid' argument. Change
12778 return type to int.
12779 (struct target_ops) <join>: Add `pid' argument.
12780 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
12781 (struct target_ops) <wait>: Add `ptid' field. Change return type
12782 to ptid.
12783 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
12784 (mywait): Add `ptid' argument. Change return type to ptid_t.
12785 (target_pid_to_str): Declare.
12786 * target.c (set_desired_inferior): Adjust to use ptids.
12787 (mywait): Add new `ptid' argument. Adjust.
12788 (target_pid_to_str): New.
12789 * mem-break.h (free_all_breakpoints): Declare.
12790 * mem-break.c (breakpoints): Delelete.
12791 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
12792 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
12793 to use per-process breakpoint list.
12794 (free_all_breakpoints): New.
12795 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
12796 (symbol_cache, all_symbols_looked_up): Delete.
12797 (hexchars): New.
12798 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
12799 read_ptid): New.
12800 (prepare_resume_reply): Change ptid argument's type from unsigned
12801 long to ptid_t. Adjust. Implement W;process and X;process.
12802 (free_sym_cache, clear_symbol_cache): New.
12803 (look_up_one_symbol): Adjust to per-process symbol cache. *
12804 * server.c (cont_thread, general_thread, step_thread): Change type
12805 to ptid_t.
12806 (attached): Delete.
12807 (multi_process): New.
12808 (last_ptid): Change type to ptid_t.
12809 (struct vstop_notif) <ptid>: Change type to ptid_t.
12810 (queue_stop_reply, push_event): Change `ptid' argument's type to
12811 ptid_t.
12812 (discard_queued_stop_replies): Add `pid' argument.
12813 (start_inferior): Adjust to use ptids. Adjust to mywait interface
12814 changes. Don't reference the `attached' global.
12815 (attach_inferior): Adjust to mywait interface changes.
12816 (handle_query): Adjust to use ptids. Parse GDB's qSupported
12817 features. Handle and report "multiprocess+". Handle
12818 "qAttached:PID".
12819 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
12820 changes.
12821 (handle_v_kill): New.
12822 (handle_v_stopped): Adjust to use target_pid_to_str.
12823 (handle_v_requests): Allow multiple attaches and runs when
12824 multiprocess extensions are in effect. Handle "vKill".
12825 (myresume): Adjust to use ptids.
12826 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
12827 (handle_status): Adjust to discard_queued_stop_replies interface
12828 change.
12829 (first_thread_of, kill_inferior_callback)
12830 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
12831 (main): Call initialize_inferiors. Adjust to use ptids, killing
12832 and detaching from all inferiors. Handle multiprocess packet
12833 variants.
12834 * linux-low.h: Include gdb_proc_service.h.
12835 (struct process_info_private): New.
12836 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
12837 <lwpid_of>: Use ptid_get_lwp.
12838 (get_lwp_thread): Adjust.
12839 (struct lwp_info): Add `dead' member.
12840 (find_lwp_pid): Declare.
12841 * linux-low.c (thread_db_active): Delete.
12842 (new_inferior): Adjust comment.
12843 (inferior_pid): Delete.
12844 (linux_add_process): New.
12845 (handle_extended_wait): Adjust.
12846 (add_lwp): Change unsigned long to ptid.
12847 (linux_create_inferior): Add process to processes table. Adjust
12848 to use ptids. Don't set new_inferior here.
12849 (linux_attach_lwp): Rename to ...
12850 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
12851 it. Adjust to use ptids.
12852 (linux_attach_lwp): New.
12853 (linux_attach): Add process to processes table. Don't set
12854 new_inferior here.
12855 (struct counter): New.
12856 (second_thread_of_pid_p, last_thread_of_process_p): New.
12857 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
12858 multiple processes.
12859 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
12860 processes. Remove process from process table.
12861 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
12862 to multiple processes.
12863 (any_thread_of): New.
12864 (linux_detach): Add `pid' argument, and handle it. Remove process
12865 from processes table.
12866 (linux_join): Add `pid' argument. Handle it.
12867 (linux_thread_alive): Change unsighed long argument to ptid_t.
12868 Consider dead lwps as not being alive.
12869 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
12870 threads we're not interested in.
12871 (same_lwp, find_lwp_pid): New.
12872 (linux_wait_for_lwp): Change `pid' argument's type from int to
12873 ptid_t. Adjust.
12874 (linux_wait_for_event): Rename to ...
12875 (linux_wait_for_event_1): ... this. Change `pid' argument's type
12876 from int to ptid_t. Adjust.
12877 (linux_wait_for_event): New.
12878 (linux_wait_1): Add `ptid' argument. Change return type to
12879 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
12880 that exit from the process table.
12881 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
12882 Adjust.
12883 (mark_lwp_dead): New.
12884 (wait_for_sigstop): Adjust to use ptids. If a process exits while
12885 stopping all threads, mark its main lwp as dead.
12886 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
12887 ptids.
12888 (fetch_register, usr_store_inferior_registers)
12889 (regsets_fetch_inferior_registers)
12890 (regsets_store_inferior_registers, linux_read_memory)
12891 (linux_write_memory): Inline `inferior_pid'.
12892 (linux_look_up_symbols): Adjust to use per-process
12893 `thread_db_active'.
12894 (linux_request_interrupt): Adjust to use ptids.
12895 (linux_read_auxv): Inline `inferior_pid'.
12896 (initialize_low): Don't reference thread_db_active.
12897 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
12898 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
12899 (ps_getpid): Return the pid of the current inferior.
12900 * thread-db.c (proc_handle, thread_agent): Delete.
12901 (thread_db_create_event, thread_db_enable_reporting): Adjust to
12902 per-process data.
12903 (find_one_thread): Change argument type to ptid_t. Adjust to
12904 per-process data.
12905 (maybe_attach_thread): Adjust to per-process data and ptids.
12906 (thread_db_find_new_threads): Ditto.
12907 (thread_db_init): Ditto.
12908 * spu-low.c (spu_create_inferior, spu_attach): Add process to
12909 processes table. Adjust to use ptids.
12910 (spu_kill, spu_detach): Adjust interface. Remove process from
12911 processes table.
12912 (spu_join, spu_thread_alive): Adjust interface.
12913 (spu_wait): Adjust interface. Remove process from processes
12914 table. Adjust to use ptids.
12915 * win32-low.c (current_inferior_tid): Delete.
12916 (current_inferior_ptid): New.
12917 (debug_event_ptid): New.
12918 (thread_rec): Take a ptid. Adjust.
12919 (child_add_thread): Add `pid' argument. Adjust to use ptids.
12920 (child_delete_thread): Ditto.
12921 (do_initial_child_stuff): Add `attached' argument. Add process to
12922 processes table.
12923 (child_fetch_inferior_registers, child_store_inferior_registers):
12924 Adjust.
12925 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12926 (win32_attach): Pass 1 to do_initial_child_stuff.
12927 (win32_kill): Adjust interface. Remove process from processes
12928 table.
12929 (win32_detach): Ditto.
12930 (win32_join): Adjust interface.
12931 (win32_thread_alive): Take a ptid.
12932 (win32_resume): Adjust to use ptids.
12933 (get_child_debug_event): Ditto.
12934 (win32_wait): Adjust interface. Remove exiting process from
12935 processes table.
12936
bd99dc85
PA
129372009-04-01 Pedro Alves <pedro@codesourcery.com>
12938
12939 Non-stop mode support.
12940
12941 * server.h (non_stop): Declare.
12942 (gdb_client_data, handler_func): Declare.
12943 (delete_file_handler, add_file_handler, start_event_loop):
12944 Declare.
12945 (handle_serial_event, handle_target_event, push_event)
12946 (putpkt_notif): Declare.
12947 * target.h (enum resume_kind): New.
12948 (struct thread_resume): Replace `step' field by `kind' field.
12949 (TARGET_WNOHANG): Define.
12950 (struct target_ops) <wait>: Add `options' argument.
12951 <supports_non_stop, async, start_non_stop>: New fields.
12952 (target_supports_non_stop, target_async): New.
12953 (start_non_stop): Declare.
12954 (mywait): Add `options' argument.
12955 * target.c (mywait): Add `options' argument. Print child exit
12956 notifications here.
12957 (start_non_stop): New.
12958 * server.c (non_stop, own_buf, mem_buf): New globals.
12959 (struct vstop_notif): New.
12960 (notif_queue): New global.
12961 (queue_stop_reply, push_event, discard_queued_stop_replies)
12962 (send_next_stop_reply): New.
12963 (start_inferior): Adjust to use resume_kind. Adjust to mywait
12964 interface changes.
12965 (attach_inferior): In non-stop mode, don't wait for the target
12966 here.
12967 (handle_general_set): Handle QNonStop.
12968 (handle_query): When handling qC, return the current general
12969 thread, instead of the first thread of the list.
12970 (handle_query): If the backend supports non-stop mode, include
12971 QNonStop+ in the qSupported query response.
12972 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
12973 and non-stop mode.
12974 (handle_v_attach, handle_v_run): Handle non-stop mode.
12975 (handle_v_stopped): New.
12976 (handle_v_requests): Report support for vCont;t. Handle vStopped.
12977 (myresume): Adjust to use resume_kind. Handle non-stop.
12978 (queue_stop_reply_callback): New.
12979 (handle_status): Handle non-stop mode.
12980 (main): Clear non_stop flag on reconnection. Use the event-loop.
12981 Refactor serial protocol handling from here ...
12982 (process_serial_event): ... to this new function. When GDB
12983 selects any thread, select one here. In non-stop mode, wait until
12984 GDB acks all pending events before exiting.
12985 (handle_serial_event, handle_target_event): New.
12986 * remote-utils.c (remote_open): Install remote_desc in the event
12987 loop.
12988 (remote_close): Remove remote_desc from the event loop.
12989 (putpkt_binary): Rename to...
12990 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
12991 (putpkt_binary): New as wrapper around putpkt_binary_1.
12992 (putpkt_notif): New.
12993 (prepare_resume_reply): In non-stop mode, don't change the
12994 general_thread.
12995 * event-loop.c: New.
12996 * Makefile.in (OBJ): Add event-loop.o.
12997 (event-loop.o): New rule.
12998
12999 * linux-low.h (pid_of): Moved here.
13000 (lwpid_of): New.
13001 (get_lwp_thread): Use lwpid_of.
13002 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
13003 * linux-low.c (pid_of): Delete.
13004 (inferior_pid): Use lwpid_of.
13005 (linux_event_pipe): New.
13006 (target_is_async_p): New.
13007 (delete_lwp): New.
13008 (handle_extended_wait): Use lwpid_of.
13009 (add_lwp): Don't set lwpid field.
13010 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
13011 (linux_kill_one_lwp): If killing a running lwp, stop it first.
13012 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
13013 (linux_detach_one_lwp): If detaching from a running lwp, stop it
13014 first. Adjust to linux_wait_for_event interface changes. Use
13015 lwpid_of.
13016 (linux_detach): Don't delete the main lwp here.
13017 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
13018 (status_pending_p): Don't consider explicitly suspended lwps.
13019 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
13020 pointer. Add OPTIONS argument. Change return type to int. Use
13021 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
13022 (linux_wait_for_event): Take an integer pid instead of a lwp_info
13023 pointer. Add status pointer argument. Return a pid instead of a
13024 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
13025 changes. In non-stop mode, don't switch to a random thread.
13026 (linux_wait): Rename to...
13027 (linux_wait_1): ... this. Add target_options argument, and handle
13028 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
13029 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
13030 clean exit and signal exit code. Don't stop all threads in
13031 non-stop mode. In all-stop mode, only stop all threads when
13032 reporting a stop to GDB. Handle explicit thread stop requests.
13033 (async_file_flush, async_file_mark): New.
13034 (linux_wait): New.
13035 (send_sigstop): Use lwpid_of.
13036 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
13037 interface changes. In non-stop mode, don't switch to a random
13038 thread.
13039 (linux_resume_one_lwp): Use lwpid_of.
13040 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
13041 (linux_resume_one_thread): ... this. Handle resume_stop. In
13042 non-stop mode, don't look for pending flag in all threads.
13043 (resume_status_pending_p): Don't consider explicitly suspended
13044 threads.
13045 (my_waitpid): Reimplement. Emulate __WALL.
13046 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13047 Use lwpid_of.
13048 (sigchld_handler, linux_supports_non_stop, linux_async)
13049 (linux_start_non_stop): New.
13050 (linux_target_ops): Register linux_supports_non_stop, linux_async
13051 and linux_start_non_stop.
13052 (initialize_low): Install SIGCHLD handler.
13053 * thread-db.c (thread_db_create_event, find_one_thread)
13054 (thread_db_get_tls_address): Use lwpid_of.
13055 * win32-low.c (win32_detach): Adjust to use resume_kind.
13056 (win32_wait): Add `options' argument.
13057 * spu-low.c (spu_resume): Adjust to use resume_kind.
13058 (spu_wait): Add `options' argument.
13059
5b1c542e
PA
130602009-04-01 Pedro Alves <pedro@codesourcery.com>
13061
13062 Decouple target code from remote protocol.
13063
13064 * target.h (enum target_waitkind): New.
13065 (struct target_waitstatus): New.
13066 (struct target_ops) <wait>: Return an unsigned long. Take a
13067 target_waitstatus pointer instead of a char pointer.
13068 (mywait): Likewise.
13069 * target.c (mywait): Change prototype to return an unsigned long.
13070 Take a target_waitstatus pointer instead of a char pointer. Adjust.
13071 * server.h (thread_from_wait, old_thread_from_wait): Delete
13072 declarations.
13073 (prepare_resume_reply): Change prototype to take a
13074 target_waitstatus.
13075 * server.c (thread_from_wait, old_thread_from_wait): Delete.
13076 (last_status, last_ptid): New.
13077 (start_inferior): Remove "statusptr" argument. Adjust. Return a
13078 pid instead of a signal.
13079 (attach_inferior): Remove "status" and "signal" parameters.
13080 Adjust.
13081 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
13082 not as an address.
13083 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
13084 (handle_v_requests, myresume): Remove "status" and "signal"
13085 parameters. Adjust.
13086 (handle_status): New.
13087 (main): Delete local `status'. Adjust.
13088 * remote-utils.c: Include target.h.
13089 (prepare_resume_reply): Change prototype to take a
13090 target_waitstatus. Adjust.
13091
13092 * linux-low.c (linux_wait): Adjust to new target_ops->wait
13093 interface.
13094 * spu-low.c (spu_wait): Adjust.
13095 * win32-low.c (enum target_waitkind, struct target_waitstatus):
13096 Delete.
13097 (win32_wait): Adjust.
13098
2bd7c093
PA
130992009-04-01 Pedro Alves <pedro@codesourcery.com>
13100
13101 * target.h (struct thread_resume): Delete leave_stopped member.
13102 (struct target_ops): Add a `n' argument to the `resume' callback.
13103 * server.c (start_inferior): Adjust.
13104 (handle_v_cont, myresume): Adjust.
13105 * linux-low.c (check_removed_breakpoint): Adjust to resume
13106 interface change, and to removed leave_stopped field.
13107 (resume_ptr): Delete.
13108 (struct thread_resume_array): New.
13109 (linux_set_resume_request): Add new `arg' parameter. Adjust to
13110 resume interface change.
13111 (linux_continue_one_thread, linux_queue_one_thread)
13112 (resume_status_pending_p): Check if the resume field is NULL
13113 instead of checking the leave_stopped member.
13114 (linux_resume): Adjust to the target resume interface change.
13115 * spu-low.c (spu_resume): Adjust to the target resume interface
13116 change.
13117 * win32-low.c (win32_detach, win32_resume): Ditto.
13118
c35fafde
PA
131192009-04-01 Pedro Alves <pedro@codesourcery.com>
13120
13121 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
13122 flag.
13123 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
13124 pending.
13125 (linux_continue_one_thread): Only preserve the stepping flag if
13126 there's a pending breakpoint.
13127
0a59d50b
PA
131282009-03-31 Pedro Alves <pedro@codesourcery.com>
13129
13130 * server.c (main): After the inferior having exited, call
13131 remote_close before exiting gdbserver.
13132
f04c6d38
TJB
131332009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
13134
13135 Fix size of FPSCR in Power 7 processors.
13136 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
13137 (PPC_FEATURE_HAS_DFP): New #define.
13138 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
13139 size of the FPSCR.
13140
78e5cee6
PA
131412009-03-23 Pedro Alves <pedro@codesourcery.com>
13142
13143 * server.c (handle_query) Whitespace and formatting.
13144
1b3f6016
PA
131452009-03-22 Pedro Alves <pedro@codesourcery.com>
13146
13147 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
13148 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
13149 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
13150 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
13151 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
13152 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
13153 Makefile.in, configure.ac: Fix whitespace throughout.
13154 * configure: Regenerate.
13155
a07b2135
PA
131562009-03-22 Pedro Alves <pedro@codesourcery.com>
13157
13158 * inferiors.c (find_inferior): Make it safe for the callback
13159 function to delete the currently iterated inferior.
13160
67cc2626
PA
131612009-03-22 Pedro Alves <pedro@codesourcery.com>
13162
13163 * Makefile.in (linuw_low_h): Move higher.
13164 (thread-db.o): Depend on $(linux_low_h).
13165
54a0b537
PA
131662009-03-17 Pedro Alves <pedro@codesourcery.com>
13167
13168 Rename "process" to "lwp" throughout.
13169
13170 * linux-low.c (all_processes): Rename to...
13171 (all_lwps): ... this.
13172 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
13173 (add_process): Rename to ...
13174 (add_lwp): ... this. Adjust.
13175 (linux_create_inferior): Adjust.
13176 (linux_attach_lwp): Adjust.
13177 (linux_attach): Adjust.
13178 (linux_kill_one_process): Rename to ...
13179 (linux_kill_one_lwp): ... this. Adjust.
13180 (linux_kill): Adjust.
13181 (linux_detach_one_process): Rename to ...
13182 (linux_detach_one_lwp): ... this. Adjust.
13183 (linux_detach): Adjust.
13184 (check_removed_breakpoint): Adjust.
13185 (status_pending_p): Adjust.
13186 (linux_wait_for_process): Rename to ...
13187 (linux_wait_for_lwp): ... this. Adjust.
13188 (linux_wait_for_event): Adjust.
13189 (send_sigstop): Adjust.
13190 (wait_for_sigstop): Adjust.
13191 (stop_all_processes): Rename to ...
13192 (stop_all_lwps): ... this.
13193 (linux_resume_one_process): Rename to ...
13194 (linux_resume_one_lwp): ... this. Adjust.
13195 (linux_set_resume_request, linux_continue_one_thread)
13196 (linux_queue_one_thread, resume_status_pending_p)
13197 (usr_store_inferior_registers, regsets_store_inferior_registers)
13198 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
13199 Adjust.
13200 * linux-low.h (get_process): Rename to ...
13201 (get_lwp): ... this. Adjust.
13202 (get_thread_process): Rename to ...
13203 (get_thread_lwp): ... this. Adjust.
13204 (get_process_thread): Rename to ...
13205 (get_lwp_thread): ... this. Adjust.
13206 (struct process_info): Rename to ...
13207 (struct lwp_info): ... this.
13208 (all_processes): Rename to ...
13209 (all_lwps): ... this.
13210 * proc-service.c (ps_lgetregs): Adjust.
13211 * thread-db.c (thread_db_create_event, find_one_thread)
13212 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
13213
0b16c5cf
PA
132142009-03-14 Pedro Alves <pedro@codesourcery.com>
13215
13216 * server.c (handle_query): Handle "qAttached".
13217
32de4b9d
NS
132182009-03-13 Nathan Sidwell <nathan@codesourcery.com>
13219
13220 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
13221 GPLv3, update license URL.
13222
2aecd87f
DE
132232009-03-01 Doug Evans <dje@google.com>
13224
93efd302 13225 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
13226 (server_h): Add gdb_signals.h.
13227 (signals.o): Update.
13228 * server.h (target_signal_from_host,target_signal_to_host_p)
13229 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
13230
86b1f9c5
PM
132312009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
13232
13233 * remote-utils.c (getpkt): Also generate remote-debug
13234 information if noack_mode is set.
13235
4aa995e1
PA
132362009-02-06 Pedro Alves <pedro@codesourcery.com>
13237
13238 * server.c (handle_query): Report qXfer:siginfo:read and
13239 qXfer:siginfo:write as supported and handle them.
13240 * target.h (struct target_ops) <qxfer_siginfo>: New field.
13241 * linux-low.c (linux_xfer_siginfo): New.
13242 (linux_target_ops): Set it.
13243
62709adf
PA
132442009-01-26 Pedro Alves <pedro@codesourcery.com>
13245
13246 * server.c (gdbserver_usage): Mention --remote-debug.
13247 (main): Accept '--remote-debug' switch.
13248
aef93bd7
DE
132492009-01-18 Doug Evans <dje@google.com>
13250
13251 * regcache.c (new_register_cache): No need to check result of xcalloc.
13252 * server.c (handle_search_memory): Back out calls to xmalloc,
13253 result is checked and error is returned to user upon failure.
13254 (handle_query): Ditto. Add more checks for result of malloc.
13255 (handle_v_cont): Check result of malloc, report error back to
13256 user upon failure.
13257 (handle_v_run): Ditto. Call freeargv.
13258 * server.h (freeargv): Declare.
13259 * utils.c (freeargv): New fn.
13260
54363045
DE
132612009-01-15 Doug Evans <dje@google.com>
13262
f626972c
DE
13263 * gdbreplay.c (perror_with_name): Make arg const char *.
13264 * server.h (target_signal_to_name): Make return type const char *.
0842e787 13265 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 13266 * utils.c (perror_with_name): Make arg const char *.
54363045 13267
18aae699
PA
132682009-01-14 Pedro Alves <pedro@codesourcery.com>
13269
13270 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
13271 when handling a EXIT_PROCESS_DEBUG_EVENT.
13272
ff703abe
JB
132732009-01-06 Joel Brobecker <brobecker@adacore.com>
13274
13275 * gdbreplay.c (gdbreplay_version): Update copyright year.
13276 * server.c (gdbserver_version): Likewise.
13277
f21cc1a2 132782009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
13279
13280 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 13281 (handle_extended_wait): Improve comment.
0e21c1ec 13282
bca929d3
DE
132832008-12-13 Doug Evans <dje@google.com>
13284
13285 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
13286 * server.h (ATTR_MALLOC): New macro.
13287 (xmalloc,xcalloc,xstrdup): Declare.
13288 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
13289 * inferiors.c: Ditto.
13290 * linux-low.c: Ditto.
13291 * mem-break.c: Ditto.
13292 * regcache.c: Ditto.
13293 * remote-utils.c: Ditto.
13294 * server.c: Ditto.
13295 * target.c: Ditto.
13296 * win32-low.c: Ditto.
13297
97438e3f
DE
132982008-12-12 Doug Evans <dje@google.com>
13299
896c7fbb
DE
13300 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
13301 in debugging printf.
13302
97438e3f
DE
13303 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
13304
e3b886f8
DE
133052008-12-09 Doug Evans <dje@google.com>
13306
13307 * linux-low.h (struct process_info): Delete member tid, unused.
13308 * thread-db.c (find_one_thread): Update.
13309 (maybe_attach_thread): Update.
13310
07e059b5
VP
133112008-12-02 Pedro Alves <pedro@codesourcery.com>
13312
889bf7c5
PA
13313 * target.h (struct target_ops): Add qxfer_osdata member.
13314 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
13315 and dirent.h.
13316 (linux_qxfer_osdata): New functions.
13317 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
13318 callback.
13319 * server.c (handle_query): Handle "qXfer:osdata:read:".
13320 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
13321 (buffer_xml_printf): New functions.
13322 * server.h (struct buffer): New.
13323 (buffer_grow_str, buffer_grow_str0): New macros.
13324 (buffer_grow, buffer_free, buffer_init, buffer_finish)
13325 (buffer_xml_printf): Declare.
07e059b5 13326
4cab47ab
DE
133272008-11-24 Doug Evans <dje@google.com>
13328
13329 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
13330
f142445f
DJ
133312008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
13332
13333 * server.c (handle_v_run): Always use the supplied argument list.
13334
d0107bb6 133352008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 13336
d0107bb6
BW
13337 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
13338 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 13339
2c4ad781
TJB
133402008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
13341
13342 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
13343 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
13344 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
13345 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
13346 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
13347 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
13348 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
13349 XML target descriptions.
13350 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
13351 when inferior is running on an ISA 2.05 or later processor. Add
13352 special case to return offset for full 64-bit slot of FPSCR when
13353 in 32-bits.
13354
dfb64f85
DJ
133552008-11-14 Daniel Gutson <dgutson@codesourcery.com>
13356
13357 * Makefile.in (SFILES, clean): Added sparc64 files.
13358 (reg-sparc64.o, reg-sparc64.c): New.
13359 * configure.srv (sparc*-*-linux*): New configuration.
13360 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
13361 syscall arguments for SPARC.
13362 (regsets_store_inferior_registers): Likewise.
13363 * linux-sparc-low.c: New file.
13364
66b6e1dd
DE
133652008-10-21 Doug Evans <dje@google.com>
13366
13367 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
13368 (READLINE_DIR,READLINE_DEP): Delete.
13369 (INTERNAL_CFLAGS): Update.
13370 (LINTFLAGS): Update.
13371
9b710a42
PA
133722008-10-10 Pedro Alves <pedro@codesourcery.com>
13373
13374 * server.c (handle_v_run): If GDB didn't specify an argv, use the
13375 whole argv from the last run, not just argv[0].
13376
5822d809
PA
133772008-09-08 Pedro Alves <pedro@codesourcery.com>
13378
13379 * regcache.c (new_register_cache): Return NULL if the register
13380 cache size isn't known yet.
13381 (free_register_cache): Avoid dereferencing a NULL regcache.
13382
74aac56f
DJ
133832008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
13384
13385 * configure.srv: Merge MIPS and MIPS64.
13386
400b20f5
MR
133872008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
13388
13389 * Makefile.in (uninstall): Apply $(EXEEXT) too.
13390
677c5bb1
LM
133912008-08-18 Luis Machado <luisgpm@br.ibm.com>
13392
13393 * Makefile.in: Add required vsx dependencies.
13394
13395 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
13396 Declare init_registers_powerpc_vsx32l.
13397 Declare init_registers_powerpc_vsx64l.
13398 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
13399 (ppc_arch_setup): Check for VSX in hwcap.
13400 (ppc_fill_vsxregset): New function.
13401 (ppc_store_vsxregset): New function.
13402 Add new VSX entry in regset_info target_regsets.
13403
13404 * configure.srv: Add new VSX dependencies.
13405
a6f3e723
SL
134062008-08-12 Pedro Alves <pedro@codesourcery.com>
13407
13408 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
13409 (remote_open): Set or clear transport_is_reliable.
13410 (putpkt_binary): Don't expect acks in noack mode.
13411 (getpkt): Don't send ack/nac in noack mode.
13412 * server.c (handle_general_set): Handle QStartNoAckMode.
13413 (handle_query): If connected by tcp pass QStartNoAckMode+ in
13414 qSupported.
13415 (main): Reset noack_mode on every connection.
13416 * server.h (noack_mode): Declare.
13417
a417dc56
RW
134182008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13419
13420 * Makefile.in (GDBREPLAY_OBS): New variable.
13421 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
13422
3221518c
UW
134232008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
13424 Daniel Jacobowitz <dan@codesourcery.com>
13425
13426 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
13427 (usr_store_inferior_registers): Likewise.
13428 (regsets_store_inferior_registers): Likewise.
13429
ec56be1b
PA
134302008-07-31 Rolf Jansen <rj@surtec.com>
13431 Pedro Alves <pedro@codesourcery.com>
13432
13433 * configure.ac: Check for memmem declaration.
13434 * server.c [HAVE_MALLOC_H]: Include malloc.h.
13435 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
13436 (disable_packet_qfThreadInfo): Unconditionally compile.
13437 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
13438 * configure, config.in: Regenerate.
13439
2fe5e3ff
DE
134402008-07-28 Doug Kwan <dougkwan@google.com>
13441
13442 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
13443 (linux_write_memory): Remove declaration of errno.
13444
836acd6d
UW
134452008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
13446
13447 * linux-low.c (handle_extended_wait): Do not use "status"
13448 variable uninitialized.
13449
aeba519e
PA
134502008-07-07 Pedro Alves <pedro@codesourcery.com>
13451
13452 * server.c (handle_v_attach): Inhibit reporting dll changes.
13453
db42f210
PA
134542008-06-27 Pedro Alves <pedro@codesourcery.com>
13455
13456 * remote-utils.c (prepare_resume_reply): If requested, don't
13457 output "thread:TID" in the T stop reply.
13458
13459 * server.c (disable_packet_vCont, disable_packet_Tthread)
13460 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
13461 (handle_query): If requested, disable support for qC, qfThreadInfo
13462 and qsThreadInfo.
13463 (handle_v_requests): If requested, disable support for vCont.
13464 (gdbserver_show_disableable): New.
13465 (main): Handle --disable-packet and --disable-packet=LIST.
13466
13467 * server.h (disable_packet_vCont, disable_packet_Tthread)
13468 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
13469
8e4c5421
CD
134702008-06-20 Carlos O'Donell <carlos@codesourcery.com>
13471
13472 * server.c (gdbserver_usage): Mention --version.
13473
6e23a804
DJ
134742008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
13475
13476 * Makefile.in (gdbreplay.o): New rule.
13477
90aa6a40
JM
134782008-06-06 Joseph Myers <joseph@codesourcery.com>
13479
13480 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
13481 message, not gdbserver.
13482
c16158bc 134832008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
13484 Nathan Sidwell <nathan@codesourcery.com>
13485 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
13486
13487 * acinclude.m4: Include ../../config/acx.m4.
13488 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
13489 * configure, config.in: Regenerate.
13490 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
13491 * server.c (gdbserver_version): Print PKGVERSION.
13492 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
13493 (main): Adjust gdbserver_usage calls.
13494 * gdbreplay.c (version, host_name): Add declarations.
13495 (gdbreplay_version, gdbreplay_usage): New.
13496 (main): Accept --version and --help options.
13497
aeb75bf5
DJ
134982008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
13499
13500 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
13501 (arm_breakpoint_at): Handle Thumb.
13502 (the_low_target): Add comment.
13503
76b233dd
UW
135042008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
13505
13506 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
13507
08388c79
DE
135082008-05-09 Doug Evans <dje@google.com>
13509
a3c83fae
DE
13510 * server.h (decode_search_memory_packet): Declare.
13511 * remote-utils.c (decode_search_memory_packet): New fn.
13512 * server.c (handle_search_memory_1): New fn.
08388c79
DE
13513 (handle_search_memory): New fn.
13514 (handle_query): Process qSearch:memory packets.
13515
bb9c3d36
UW
135162008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
13517
13518 * regcache.c (registers_length): Remove.
13519 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
13520 full register packet.
13521 * regcache.h (registers_length): Remove prototype.
13522 * server.h (PBUFSIZ): Define to 16384.
13523
7284e1be
UW
135242008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
13525
13526 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
13527 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
13528 powerpc-64l.o, and powerpc-altivec64l.o.
13529 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
13530 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
13531 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
13532 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
13533 rs6000/power-linux.xml, and rs6000/power64-linux.xml
13534 to srv_xmlfiles.
13535
13536 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
13537 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
13538 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
13539 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
13540 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
13541 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
13542 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
13543 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
13544 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
13545 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
13546 (clean): Update.
13547
13548 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
13549 (init_registers_powerpc_32l): ... this new prototype.
13550 (init_registers_powerpc_32): Remove, replace by ...
13551 (init_registers_powerpc_altivec32l): ... this new prototype.
13552 (init_registers_powerpc_e500): Remove, replace by ...
13553 (init_registers_powerpc_e500l): ... this new prototype.
13554 (init_registers_ppc64): Remove, replace by ...
13555 (init_registers_powerpc_64l): ... this new prototype.
13556 (init_registers_powerpc_64): Remove, replace by ...
13557 (init_registers_powerpc_altivec64l): ... this new prototype.
13558 (ppc_num_regs): Set to 73.
13559 (PT_ORIG_R3, PT_TRAP): Define if necessary.
13560 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
13561 (ppc_cannot_store_register): Handle orig_r3 and trap.
13562 (ppc_arch_setup): Update init_registers_... calls.
13563 (ppc_fill_gregset): Handle orig_r3 and trap.
13564
13565 * inferiors.c (clear_inferiors): Reset current_inferior.
13566
fdc59709
PB
135672008-04-23 Paolo Bonzini <bonzini@gnu.org>
13568
889bf7c5
PA
13569 * acinclude.m4: Add override.m4.
13570 * configure: Regenerate.
fdc59709 13571
c9b2f845
UW
135722008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13573
13574 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
13575 initial call to init_register_ppc64.
13576
550512b8
UW
135772008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
13578
43aaf8b6
PA
13579 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
13580 single powerpc*-*-linux* case.
550512b8
UW
13581 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
13582
b6430ec3
UW
135832008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
13584
13585 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 13586 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
13587 from reg_xmlfiles.
13588 * linux-ppc-low.c: Include <elf.h>.
13589 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
13590 (ppc_hwcap): New global variable.
13591 (ppc_regmap): Remove __SPE__ #ifdef sections.
13592 (ppc_regmap_e500): New global variable.
13593 (ppc_cannot_store_register): Update __SPE__ special case.
13594 (ppc_get_hwcap): New function.
13595 (ppc_arch_setup): Use it to determine whether inferior supports
13596 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
13597 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
13598 Do not access registers if target does not support AltiVec.
13599 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
13600 Do not access registers if target does not support SPE.
13601 (target_regsets): Unconditionally include AltiVec and SPE regsets.
13602
52fa2412
UW
136032008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
13604
13605 * linux-low.c (disabled_regsets, num_regsets): New.
13606 (use_regsets_p): Delete.
13607 (linux_wait_for_process): Clear disabled_regsets.
13608 (regsets_fetch_inferior_registers): Check and set it.
13609 (regsets_store_inferior_registers): Likewise.
13610 (linux_fetch_registers, linux_store_registers): Do not use
13611 use_regsets_p.
13612 (initialize_low): Allocate disabled_regsets.
13613
e28b3332
DJ
136142008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
13615
13616 * Makefile.in (LIBOBJS): New.
13617 (OBS): Use LIBOBJS.
13618 (memmem.o): New rule.
13619 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
13620 * configure: Regenerated.
13621
4536995d
UW
136222008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
13623
13624 * server.c (handle_query): Never return "unsupported" for
13625 qXfer:features:read queries.
13626
221c031f
UW
136272008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
13628
13629 * server.c (get_features_xml): Fix inverted condition.
13630 (handle_query): Always support qXfer:feature:read.
13631
ccd213ac
DJ
136322008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
13633
13634 * server.c (wrapper_argv): New.
13635 (start_inferior): Handle wrapper_argv. If set, expect an extra
13636 trap.
13637 (gdbserver_usage): Document --wrapper.
13638 (main): Parse --wrapper.
13639
6fe305f7
UW
136402008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13641
13642 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
13643 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
13644 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
13645 (ppc_set_pc): Likewise.
13646 (ppc_arch_setup): New function.
13647 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
13648 of collect_register.
889bf7c5 13649 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 13650
5b0a002e
UW
136512008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13652
13653 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
13654 instead of linux-ppc64-low.o.
13655 * linux-ppc64-low.c: Remove file.
13656 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
13657 (linux-ppc64-low.o): Remove rule.
13658
13659 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
13660 (init_registers_powerpc_64): Likewise.
13661 (ppc_regmap): Conditionally define depending on __powerpc64__.
13662 (ppc_cannot_store_register): Do not special-case "fpscr" when
13663 compiled on __powerpc64__.
13664 (ppc_collect_ptrace_register): New function.
13665 (ppc_supply_ptrace_register): New function.
13666 (ppc_breakpoint): Change type to "unsigned int".
13667 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
13668 (the_low_target): Conditionally provide initializers for the
889bf7c5 13669 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
13670 collect_ptrace_register and supply_ptrace_register members.
13671
9b4b61c8
UW
136722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
13673
13674 * regcache.h (gdbserver_xmltarget): Add extern declaration.
13675 * server.c (gdbserver_xmltarget): Define.
13676 (get_features_xml): Use it to replace "target.xml" and arch_string.
13677
13678 * configure.srv: Remove srv_xmltarget. Add XML files that were
13679 mentioned there to srv_xmlfiles instead. Remove conditional tests
13680 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
13681 srv_xmlfiles and srv_regobj to include all possible choices.
13682 * configure.ac (srv_xmltarget): Remove.
13683 (srv_xmlfiles): Do not add "target.xml".
13684 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
13685 checks for supplementary target information.
13686 * configure: Regenerate.
13687 * Makefile.in (XML_TARGET): Remove.
13688 (target.xml): Remove rule.
13689 (clean): Do not clean up target.xml.
13690 (.PRECIOUS): Do not mention target.xml.
13691
13692 * target.h (struct target_ops): Remove arch_string member.
13693 * linux-low.c (linux_arch_string): Remove.
13694 (linux_target_ops): Remove arch_string initializer.
13695 * linux-low.h (struct linux_target_ops): Remove arch_string member.
13696 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
13697 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
13698 * spu-low.c (spu_arch_string): Remove.
13699 (spu_target_ops): Remove arch_string initializer.
13700 * win32-low.c (win32_arch_string): Remove.
13701 (win32_target_ops): Remove arch_string initializer.
13702 * win32-low.h (struct win32_target_ops): Remove arch_string member.
13703 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
13704 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
13705
ee1a7ae4
UW
137062008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13707
13708 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
13709 by collect_ptrace_register and supply_ptrace_register hooks.
13710 * linux-low.c (fetch_register): Use supply_ptrace_register callback
13711 instead of checking for the_low_target.left_pad_xfer.
13712 (usr_store_inferior_registers): Use collect_ptrace_register callback
13713 instead of checking for the_low_target.left_pad_xfer.
13714
13715 * linux-s390-low.c (s390_collect_ptrace_register): New function.
13716 (s390_supply_ptrace_register): Likewise.
13717 (s390_fill_gregset): Call s390_collect_ptrace_register.
13718 (the_low_target): Update.
13719
13720 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
13721 (ppc_supply_ptrace_register): Likewise.
13722 (the_low_target): Update.
13723
13724 * linux-i386-low.c (the_low_target): Update.
13725 * linux-x86-64-low.c (the_low_target): Update.
13726
d61ddec4
UW
137272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13728
13729 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
13730 reg-s390.o and reg-s390x.o.
13731
13732 * linux-low.c (new_inferior): New global variable.
13733 (linux_create_inferior, linux_attach): Set it.
13734 (linux_wait_for_process): Call the_low_target.arch_setup after the
13735 target has stopped for the first time.
13736 (initialize_low): Do not call the_low_target.arch_setup.
13737
13738 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
13739 (s390_set_pc): Likewise.
13740 (s390_arch_setup): New function.
13741 (the_low_target): Use s390_arch_setup as arch_setup routine.
13742
13743 * regcache.c (realloc_register_cache): New function.
13744 (set_register_cache): Call it for each existing regcache.
13745
d05b4ac3
UW
137462008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
13747
13748 * server.h (init_registers): Remove prototype.
13749
13750 * linux-low.h (struct linux_target_ops): Add arch_setup field.
13751 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
13752 instead of init_registers ().
13753 * linux-arm-low.c (init_registers_arm): Add prototype.
13754 (init_registers_arm_with_iwmmxt): Likewise.
13755 (the_low_target): Add initializer for arch_setup field.
13756 * linux-cris-low.c (init_registers_cris): Add prototype.
13757 (the_low_target): Add initializer for arch_setup field.
13758 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
13759 (the_low_target): Add initializer for arch_setup field.
13760 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
13761 (the_low_target): Add initializer for arch_setup field.
13762 * linux-ia64-low.c (init_registers_ia64): Add prototype.
13763 (the_low_target): Add initializer for arch_setup field.
13764 * linux-m32r-low.c (init_registers_m32r): Add prototype.
13765 (the_low_target): Add initializer for arch_setup field.
13766 * linux-m68k-low.c (init_registers_m68k): Add prototype.
13767 (the_low_target): Add initializer for arch_setup field.
13768 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
13769 (init_registers_mips64_linux): Likewise.
13770 (the_low_target): Add initializer for arch_setup field.
13771 * linux-ppc-low.c (init_registers_ppc): Add prototype.
13772 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
13773 (the_low_target): Add initializer for arch_setup field.
13774 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
13775 (init_registers_powerpc_64): Likewise.
13776 (the_low_target): Add initializer for arch_setup field.
13777 * linux-s390-low.c (init_registers_s390): Add prototype.
13778 (init_registers_s390x): Likewise.
13779 (the_low_target): Add initializer for arch_setup field.
13780 * linux-sh-low.c (init_registers_sh): Add prototype.
13781 (the_low_target): Add initializer for arch_setup field.
13782 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
13783 (the_low_target): Add initializer for arch_setup field.
13784 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
13785 (the_low_target): Add initializer for arch_setup field.
13786
13787 * win32-low.h (struct win32_target_ops): Add arch_setup field.
13788 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
13789 instead of init_registers ().
13790 * win32-arm-low.c (init_registers_arm): Add prototype.
13791 (the_low_target): Add initializer for arch_setup field.
13792 * win32-i386-low.c (init_registers_i386): Add prototype.
13793 (the_low_target): Add initializer for arch_setup field.
13794
13795 * spu-low.c (init_registers_spu): Add prototype.
13796 (initialize_low): Call initialie_registers_spu () instead of
13797 initialize_registers ().
13798
fd96d250
PA
137992008-02-19 Pedro Alves <pedro@codesourcery.com>
13800
13801 * server.c (handle_v_requests): When handling the vRun and vAttach
13802 packets, if already debugging a process, don't kill it. Return an
13803 error instead.
13804
d41b6bb4
DJ
138052008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
13806
13807 * server.c (handle_query): Correct length check.
13808
5ac588cf
PA
138092008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
13810
13811 * win32-low.c (do_initial_child_stuff): Add process handle
13812 parameter. Set current_process_handle and current_process_id from the
13813 parameters. Clear globals.
13814 (win32_create_inferior): Don't set current_process_handle and
13815 current_process_id here. Instead pass them on the call to
13816 do_initial_child_stuff.
13817 (win32_attach): Likewise.
13818 (win32_clear_inferiors): New.
13819 (win32_kill): Don't close the current process handle or the
13820 current thread handle here. Instead call win32_clear_inferiors.
13821 (win32_detach): Don't open a new handle to the process. Call
13822 win32_clear_inferiors.
13823 (win32_join): Don't rely on current_process_handle; open a new
13824 handle using the process id.
13825 (win32_wait): Call win32_clear_inferiors when the inferior process
13826 has exited.
13827
ecd7ecbc
DJ
138282008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
13829
13830 * server.c (monitor_show_help): Add "exit".
13831
1525d545
MG
138322008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
13833
ecd7ecbc 13834 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
13835 (clean): Add reg-xtensa.c.
13836 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
13837 * configure.srv (xtensa*-*-linux*) New target.
13838 * linux-xtensa-low.c: New.
13839 * xtensa-xtregs.c: New.
1525d545 13840
59a016f0
PA
138412008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
13842
13843 * hostio.c: Don't include errno.h.
13844 (errno_to_fileio_errno): Move to hostio-errno.
13845 * hostio.c: (hostio_error): Remove the error parameter. Defer the
13846 error number outputting to the target->hostio_last_error callback.
13847 (hostio_packet_error): Use FILEIO_EINVAL directly.
13848 (handle_open, handle_pread, hostio_error, handle_unlink): Update
13849 calls to hostio_error.
13850 * hostio-errno.c: New.
13851 * server.h (hostio_last_error_from_errno): Declare.
13852 * target.h (target_ops): Add hostio_last_error member.
13853 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
13854 as hostio_last_error handler.
889bf7c5 13855 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
13856 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
13857 (wince_hostio_last_error): New functions.
13858 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
13859 as hostio_last_error handler.
13860 (win32_target_ops) [!_WIN32_WCE]: Register
13861 hostio_last_error_from_errno as hostio_last_error handler.
13862 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
13863 (hostio-errno.o): New rule.
13864 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
13865 * configure.srv (srv_hostio_err_objs): New variable. Default to
13866 hostio-errno.o.
13867 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
13868 * configure: Regenerate.
13869
2d717e4f
DJ
138702008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13871
13872 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
13873 (linux_kill, linux_detach): Clean up the process list.
13874 * remote-utils.c (remote_open): Improve port number parsing.
13875 (putpkt_binary, input_interrupt): Only send interrupts if the target
13876 is running.
13877 * server.c (extended_protocol): Make static.
13878 (attached): Define earlier.
13879 (exit_requested, response_needed, program_argv): New variables.
13880 (target_running): New.
13881 (start_inferior): Clear attached here.
13882 (attach_inferior): Set attached here.
13883 (require_running): Define.
13884 (handle_query): Use require_running and target_running. Implement
13885 "monitor exit".
13886 (handle_v_attach, handle_v_run): New.
13887 (handle_v_requests): Use require_running. Handle vAttach and vRun.
13888 (gdbserver_usage): Update.
13889 (main): Redo argument parsing. Handle --debug and --multi. Handle
13890 --attach along with other options or after the port. Save
13891 program_argv. Support no initial program. Resynchronize
13892 communication with GDB after an error. Handle "monitor exit".
13893 Use require_running and target_running. Always allow the extended
13894 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
13895 restart in extended mode.
13896 * README: Refer to the GDB manual. Update --attach usage.
13897
7407e2de
AS
138982007-12-20 Andreas Schwab <schwab@suse.de>
13899
13900 * linux-low.c (STACK_SIZE): Define.
13901 (linux_tracefork_child): Use it. Use __clone2 on ia64.
13902 (linux_test_for_tracefork): Likewise.
13903
b65d95c5
DJ
139042007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
13905
13906 * linux-low.c (linux_wait_for_event): Update messages. Do not
13907 reinsert auto-delete breakpoints.
13908 * mem-break.c (struct breakpoint): Change return type of handler to
13909 int.
13910 (set_breakpoint_at): Update handler type.
13911 (reinsert_breakpoint_handler): Return 1 instead of calling
13912 delete_breakpoint.
13913 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
13914 setting a new one.
13915 (check_breakpoints): Delete auto-delete breakpoints and return 2.
13916 * mem-break.h (set_breakpoint_at): Update handler type.
13917 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
13918 * win32-low.c (auto_delete_breakpoint): New.
13919 (get_child_debug_event): Use it.
13920
4e799345
DJ
139212007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
13922
13923 * configure.ac: Check for pread and pwrite.
13924 * hostio.c (handle_pread): Fall back to lseek and read.
13925 (handle_pwrite): Fall back to lseek and write.
13926 * config.in, configure: Regenerated.
13927
27524b67
DJ
139282007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
13929
13930 * server.c (myresume): Add own_buf argument.
13931 (main): Update calls.
13932
a20d5e98
DJ
139332007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
13934
13935 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13936 * remote-utils.c (remote_open): Do not call disable_async_io.
13937 (block_async_io): Delete.
13938 (unblock_async_io): Make static.
13939 (initialize_async_io): New.
13940 * server.c (handle_v_cont): Handle async I/O here.
13941 (myresume): Likewise. Move other common resume tasks here...
13942 (main): ... from here. Call initialize_async_io. Disable async
13943 I/O before the main loop.
13944 * server.h (initialize_async_io): Declare.
13945 (block_async_io, unblock_async_io): Delete prototypes.
13946 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13947
b79d787e
DJ
139482007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
13949
13950 * remote-utils.c (readchar): Allow binary data in received messages.
13951
d97903b2
PA
139522007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13953
13954 * win32-low.c (attaching): New global.
13955 (win32_create_inferior): Clear the `attaching' global.
13956 (win32_attach): Set the `attaching' global.
13957 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13958 attaching. Only set a breakpoint at the entry point if not
13959 attaching.
13960
311de423
PA
139612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13962
13963 * server.c (main): Don't report dll events on the initial
13964 connection on attaches.
13965
6c2d16d2
PA
139662007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13967
13968 * server.c (main): Relax numerical bases supported for the pid of
13969 the --attach command line argument.
13970
5ca906e6
PA
139712007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13972
13973 * win32-low.c (win32_attach): Call OpenProcess before
13974 DebugActiveProcess, not after. Add last error output to error
13975 call.
13976
9c6c8194
PA
139772007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
13978
13979 * win32-low.c (win32_get_thread_context)
13980 (win32_set_thread_context): New functions.
13981 (thread_rec): Use win32_get_thread_context.
13982 (continue_one_thread, win32_resume): Use win32_set_thread_context.
13983 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13984 field.
13985
4d5d1aaa
PA
139862007-12-03 Leo Zayas
13987 Pedro Alves <pedro_alves@portugalmail.pt>
13988
13989 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13990 global variables.
13991 (child_add_thread): Minor cleanup.
13992 (child_continue): Resume artificially suspended threads before
13993 calling ContinueDebugEvent.
13994 (suspend_one_thread): New.
13995 (fake_breakpoint_event): New.
13996 (get_child_debug_event): Change return type to int. Check here if
13997 gdb sent an interrupt request. If a soft interrupt was requested,
13998 fake a breakpoint event. Return 0 if there is no event to handle,
13999 and 1 otherwise.
14000 (win32_wait): Don't check here if gdb sent an interrupt request.
14001 Ensure there is a valid event to handle.
14002 (win32_request_interrupt): Add soft interruption method as last
14003 resort.
14004
c436e841
PA
140052007-12-03 Leo Zayas
14006 Pedro Alves <pedro_alves@portugalmail.pt>
14007
14008 * win32-low.h (win32_thread_info): Add descriptions to the
14009 structure members. Replace `suspend_count' counter by a
14010 `suspended' flag.
14011 * win32-low.c (thread_rec): Update condition of when to get the
14012 context from the inferior. Rely on ContextFlags being set if it
14013 has already been retrieved. Only suspend the inferior thread if
14014 we haven't already. Warn if that fails.
14015 (continue_one_thread): s/suspend_count/suspended/. Only call
14016 ResumeThread once. Warn if that fails.
14017
e7b5fa67
PA
140182007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14019
14020 * win32-low.c (win32_wait): Don't read from the inferior when it
14021 has already exited.
14022
a385171d
PA
140232007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
14024
14025 * Makefile.in (win32_low_h): New variable.
14026 (win32-low.o): Add dependency on $(win32_low_h).
14027 (win32-arm-low.o, win32-i386-low.o): New rules.
14028
f80c84b3
DJ
140292007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14030
14031 * hostio.c: Correct copyright year.
14032
a6b151f1
DJ
140332007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
14034
14035 * Makefile.in (OBS): Add hostio.o.
14036 (hostio.o): New rule.
14037 * server.h (handle_vFile): Declare.
14038 * hostio.c: New file.
14039 * server.c (handle_v_requests): Take packet_len and new_packet_len
14040 for binary packets. Call handle_vFile.
14041 (main): Update call to handle_v_requests.
14042
f9387fc3
DJ
140432007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
14044
14045 * linux-low.c: Include <sched.h>.
14046
51c2684e
DJ
140472007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
14048
14049 * linux-low.c (linux_tracefork_grandchild): New.
14050 (linux_tracefork_child): Use clone.
14051 (linux_test_for_tracefork): Use clone; allocate and free a stack.
14052
75f83163
JB
140532007-10-31 Joel Brobecker <brobecker@adacore.com>
14054
14055 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
14056
da5898ce
DJ
140572007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
14058
14059 * linux-low.c (handle_extended_wait): Handle unexpected signals.
14060
24a09b5f
DJ
140612007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
14062
14063 * inferiors.c (change_inferior_id): Delete.
14064 (add_pid_to_list, pull_pid_from_list): New.
14065 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
14066 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
14067 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
14068 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
14069 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
14070 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
14071 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
14072 (using_threads): Always set to 1.
14073 (handle_extended_wait): New.
14074 (add_process): Do not set TID.
14075 (linux_create_inferior): Set must_set_ptrace_flags.
14076 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
14077 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
14078 (linux_thread_alive): Rename TID argument to LWPID.
14079 (linux_wait_for_process): Handle unknown processes. Do not use TID.
14080 (linux_wait_for_event): Do not use TID or check using_threads. Update
14081 call to dead_thread_notify. Call handle_extended_wait.
14082 (linux_create_inferior): Use PTRACE_SETOPTIONS.
14083 (send_sigstop): Delete sigstop_sent.
14084 (wait_for_sigstop): Avoid TID.
14085 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
14086 (linux_test_for_tracefork): New.
14087 (linux_lookup_signals): Use thread_db_active and
14088 linux_supports_tracefork_flag.
14089 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
14090 * linux-low.h (get_process_thread): Avoid TID.
14091 (struct process_ifo): Move thread_known and tid to the end. Remove
14092 sigstop_sent.
14093 (linux_attach_lwp, thread_db_init): Update prototypes.
14094 * server.h (change_inferior_id): Delete prototype.
14095 (add_pid_to_list, pull_pid_from_list): New prototypes.
14096 * thread-db.c (thread_db_use_events): New.
14097 (find_first_thread): Rename to...
14098 (find_one_thread): ...this. Update callers and messages. Do not
14099 call fatal. Check thread_db_use_events. Do not call
14100 change_inferior_id or new_thread_notify.
14101 (maybe_attach_thread): Update. Do not call new_thread_notify.
14102 (thread_db_init): Set thread_db_use_events. Check use_events.
14103 * utils.c (fatal, warning): Correct message prefix.
14104
30ed0a8f
DJ
141052007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
14106
14107 * Makefile.in (clean): Remove new files.
14108 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
14109 (powerpc-64.o, powerpc-64.c): New rules.
14110 * configure.srv: Use alternate register sets for powerpc64-*-linux*
14111 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
14112 with SPE.
14113 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
14114 SPE targets.
14115 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
14116 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
14117 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
14118 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
14119 (target_regsets): Add AltiVec and SPE register sets.
14120 * configure.ac: Check for AltiVec and SPE.
14121 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
14122 (ppc_fill_vrregset, ppc_store_vrregset): New.
14123 (target_regsets): Add AltiVec register set.
14124 * configure: Regenerated.
14125
fd462a61
DJ
141262007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
14127
14128 * linux-low.c (O_LARGEFILE): Define.
14129 (linux_read_memory): Use /proc/PID/mem.
14130 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
14131 * configure, config.in: Regenerated.
14132
69f223ed
DJ
141332007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14134
14135 * linux-low.c (linux_wait_for_event): Do not pass signals while
14136 single-stepping.
14137
aec18585
PA
141382007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14139
14140 * win32-low.c (create_process): New.
14141 (win32_create_inferior): Use create_process instead of
14142 CreateProcess. If create_process failed retry appending an ".exe"
14143 suffix. Store the GetLastError result immediatelly after
14144 create_process calls and use it on the call to error.
14145
34d86ddd
PA
141462007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
14147
14148 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
14149
5a0e3bd0
JB
141502007-08-23 Joel Brobecker <brobecker@adacore.com>
14151
14152 * configure.ac: Switch license to GPLv3.
14153
f88c79e6
MS
141542007-08-01 Michael Snyder <msnyder@access-company.com>
14155
14156 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
14157
6b3d9b83
PA
141582007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
14159
14160 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
14161 typedef.
14162 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
14163 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
14164 CloseToolhelp32Snapshot.
14165 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
14166 CloseToolhelp32Snapshot.
14167
c588c53c
MS
141682007-07-27 Michael Snyder <michael.snyder@access-company.com>
14169
14170 * server.c (main): Check for inferior exit before main loop.
14171
aa0403d9
PA
141722007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
14173
14174 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
14175 instead of on tmp_desc.
14176
255e7678
DJ
141772007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
14178 Daniel Jacobowitz <dan@codesourcery.com>
14179
14180 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
14181 (add_thread): Minor cleanups.
14182 (clear_inferiors): Move lower in the file. Clear the DLL
14183 list.
14184 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
14185 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
14186 (xml_escape_text): New.
14187 * server.c (handle_query): Handle qXfer:libraries:read. Report it
14188 for qSupported.
14189 (handle_v_cont): Report errors.
14190 (gdbserver_version): Update.
14191 (main): Correct size of own_buf. Do not report initial DLL events.
14192 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
14193 (unloaded_dll, xml_escape_text): New.
14194 * win32-low.c (enum target_waitkind): Update comments.
14195 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
14196 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
14197 (win32_EnumProcessModules, win32_GetModuleInformation)
14198 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
14199 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
14200 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
14201 (win32_Module32First, win32_Module32Next, load_toolhelp)
14202 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
14203 (get_child_debug_event): Handle DLL events.
14204 (win32_wait): Likewise.
14205
0d37add9
DJ
142062007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14207
14208 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
14209 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
14210
45e2715e
PA
142112007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14212
14213 * win32-low.c (handle_output_debug_string): Ignore event if not
14214 waiting.
14215
c5674cf1
PA
142162007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
14217
14218 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
14219
2bbe3cc1
DJ
142202007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
14221
14222 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
14223
ae13219e
DJ
142242007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
14225
14226 * inferiors.c (change_inferior_id): Add comment.
14227 * linux-low.c (check_removed_breakpoint): Add an early
14228 prototype. Improve debug output.
14229 (linux_attach): Doc update.
14230 (linux_detach_one_process, linux_detach): Clean up before releasing
14231 each process.
14232 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
14233 * linux-low.h (struct process_info): Doc improvement.
14234 * mem-break.c (delete_all_breakpoints): New.
14235 * mem-break.h (delete_all_breakpoints): New prototype.
14236 * thread-db.c (find_first_thread): New.
14237 (thread_db_create_event): Call it instead of
14238 thread_db_find_new_threads. Clean up unused variables.
14239 (maybe_attach_thread): Remove first thread handling.
14240 (thread_db_find_new_threads): Use find_first_thread.
14241 (thread_db_get_tls_address): Likewise.
14242
4105de34
DJ
142432007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
14244
14245 * thread-db.c (thread_db_find_new_threads): Add prototype.
14246 (thread_db_create_event): Check for the main thread before adding
14247 a new thread.
14248 (maybe_attach_thread): Only enable event reporting if TID == 0.
14249 (thread_db_get_tls_address): Check for new threads.
14250
2b876972
DJ
142512007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
14252
14253 * linux-low.c (linux_create_inferior): Try execv before execvp.
14254 * spu-low.c (spu_create_inferior): Likewise.
14255
7a245884
DJ
142562007-06-13 Mike Frysinger <vapier@gentoo.org>
14257
14258 * linux-low.c (linux_create_inferior): Change execv to execvp.
14259 * spu-low.c (spu_create_inferior): Likewies.
14260
117ce543
DJ
142612007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
14262
14263 * Makefile.in (clean): Clean new files instead of deleted ones.
14264 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
14265 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
14266 rules.
14267 * configure.srv: Specify XML files and new regformats for MIPS and
14268 MIPS64 GNU/Linux.
14269 * linux-mips-low.c (mips_num_regs): Set to only used registers.
14270 (mips_regmap): Do not fetch $0. Remove unused registers. Add
14271 an entry for the restart register.
14272 (mips_cannot_fetch_register, mips_cannot_store_register)
14273 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
14274 register names to match the XML descriptions.
14275 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
14276 restart register instead of $0.
14277
0e7f50da
UW
142782007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14279 Markus Deuling <deuling@de.ibm.com>
14280
14281 * remote-utils.c (decode_xfer_write): New function.
14282 * server.h (decode_xfer_write): Add prototype.
14283 * server.c (handle_query): Add PACKET_LEN argument. Support
14284 qXfer:spu:read and qXfer:spu:write packets.
14285 (main): Pass packet_len to handle_query.
14286 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
14287 * target.h (target_ops): Add qxfer_spu.
14288
374c1d38
UW
142892007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
14290
14291 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
14292 accessing non-seekable spufs files.
14293
bb63802a
UW
142942007-05-16 Markus Deuling <deuling@de.ibm.com>
14295
889bf7c5 14296 * server.c (handle_query): Add reply for qC packet.
bb63802a 14297
7390519e
PA
142982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14299 Leo Zayas <lerele@champenstudios@com>
14300
14301 * server.h (check_remote_input_interrupt_request): New function.
14302 * remote_utils.c (INVALID_DESCRIPTOR): New define.
14303 (remote_desc): Initialize with INVALID_DESCRIPTOR.
14304 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
14305 (check_remote_input_interrupt_request): New function.
14306 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 14307 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
14308 winapi_GenerateConsoleCtrlEvent): New typedefs.
14309 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
14310 to 250 ms.
14311 (win32_wait): Check for remote interrupt request
14312 with check_remote_input_interrupt_request.
14313 (win32_request_interrupt): New function.
14314 (win32_target_op): Set request_interrupt to win32_request_interrupt.
14315
34b34921
PA
143162007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14317
14318 * win32-low.c (debug_registers_changed,
14319 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
14320 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
14321 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
14322 (thread_rec): Get context using the low target.
14323 (child_add_thread): Call thread_added on the low target,
14324 which does the same thing.
14325 (regptr): Delete.
14326 (do_initial_child_stuff): Remove debug registers references.
14327 Set context using the low target. Resume threads after
14328 setting the contexts.
14329 (child_continue): Remove dead variable. Remove debug
14330 registers references.
14331 (child_fetch_inferior_registers): Go through the low target.
14332 (do_child_store_inferior_registers): Remove.
14333 (child_store_inferior_registers): Go through the low target.
14334 (win32_resume): Remove debug registers references.
14335 Set context using the low target.
14336 (handle_exception): Change return type to void. Don't record
14337 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
14338 first chance exception.
889bf7c5 14339 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
14340 goto loop. Always return after waiting for debug event.
14341 (win32_wait): Convert to switch statement. Handle spurious
14342 events.
14343
14344 * win32-i386-low.c (debug_registers_changed,
14345 debug_registers_used): New.
14346 (initial_stuff): Rename to ...
14347 (i386_initial_stuff): ... this. Clear debug registers
14348 state variables.
14349 (store_debug_registers): Delete.
14350 (i386_get_thread_context): New.
14351 (load_debug_registers): Delete.
14352 (i386_set_thread_context): New.
14353 (i386_thread_added): New.
14354 (single_step): Rename to ...
14355 (i386_single_step): ... this.
14356 (do_fetch_inferior_registers): Rename to ...
14357 (i386_fetch_inferior_register): ... this.
14358 (i386_store_inferior_register): New.
14359 (the_low_target): Adapt to new interface.
14360
14361 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
14362 (arm_get_thread_context): New.
14363 (arm_set_thread_context): New.
14364 (regptr): New.
14365 (do_fetch_inferior_registers): Rename to ...
14366 (arm_fetch_inferior_register): ... this.
14367 (arm_store_inferior_register): New.
14368 (arm_wince_breakpoint): Reimplement as unsigned long.
14369 (arm_wince_breakpoint_len): Define.
14370 (the_low_target): Adapt to new interface.
14371
14372 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
14373 load_debug_registers. Add get_thread_context, set_thread_context,
14374 thread_added and store_inferior_register. Rename
14375 fetch_inferior_registers to fetch_inferior_register.
14376 (regptr): Remove declaration.
14377
dd6953e1
PA
143782007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14379
14380 * linux-low.c (linux_detach): Change return type to int. Return 0.
14381 * spu-low.c (spu_detach): Likewise.
14382
444d6139
PA
143832007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14384
14385 * target.h (target_ops): Change return type of detach to int.
14386 Add join.
14387 (join_inferior): New.
14388 * server.c (main): Don't skip detach support on mingw32.
14389 If the inferior doesn't support detaching return error.
14390 Call join_inferior instead of using waitpid.
14391 * linux-low.c (linux_join): New.
14392 (linux_target_op): Add linux_join.
14393 * spu-low.c (spu_join): New.
14394 (spu_target_ops): Add spu_join.
14395 * win32-low.c (win32_detach): Adapt to new interface.
14396 Reopen current_process_handle before detaching. Issue a child
14397 resume before detaching.
14398 (win32_join): New.
14399 (win32_target_op): Add win32_join.
14400
1d5315fe
PA
144012007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14402
14403 * win32-low.c (win32-attach): Fix return value.
14404 * target.h (target_ops): Describe ATTACH return values.
14405
bf914831
PA
144062007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14407
14408 * win32-low.c (GETPROCADDRESS): Define.
14409 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
14410 (winapi_DebugSetProcessKillOnExit): Likewise.
14411 (win32_create_inferior): Force usage of ansi CreateProcessA.
14412 (win32_attach): Use GETPROCADDRESS.
14413 (win32_detach): Likewise.
14414
f72f3e60
PA
144152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
14416
14417 * win32-low.c (win32_wait): Don't use WSTOPSIG.
14418
ed50f18f
PA
144192007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
14420
14421 * win32-low.c: Commit leftover changes from 2007-03-29.
14422
0c2ead7e
DJ
144232007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14424
14425 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
14426 fields short instead of int. Add explicit padding.
14427 (i387_cache_to_fsave): Remove unnecessary casts.
14428 (i387_fsave_to_cache): Doc fix.
14429 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
14430
73725ff3
DJ
144312007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
14432
14433 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
14434 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
14435
d99f33d8
PA
144362007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14437
14438 * configure.srv (arm*-*-mingw32ce*): Move near the other
14439 arm targets.
14440
68070c10
PA
144412007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
14442
2482afc6 14443 * configure.ac: Add errno checking.
68070c10
PA
14444 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
14445 sys/file.h and malloc.h.
14446 (AC_CHECK_DECLS): Add perror.
14447 (srv_mingwce): Handle.
2482afc6 14448 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
14449 win32-i386-low.o to srv_tgtobj.
14450 (i[34567]86-*-mingw*): Likewise.
14451 (arm*-*-mingw32ce*): Add case.
14452 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14453 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
14454 [__MINGW32CE__] (strerror): New function.
14455 [__MINGW32CE__] (errno): Define to GetLastError.
14456 [__MINGW32CE__] (COUNTOF): New macro.
14457 (remote_open): Remove extra close call.
14458 * mem-break.c (delete_breakpoint_at): New function.
14459 * mem-break.h (delete_breakpoint_at): Declare.
14460 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
14461 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
14462 [USE_WIN32API] (read, write): Add char* casts.
14463 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
14464 * server.h: Include wincecompat.h on Windows CE.
14465 [HAVE_ERRNO_H]: Check.
14466 (perror): Declare if not declared.
14467 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
14468 (perror_with_name): Remove errno declaration.
14469 * wincecompat.h: New.
14470 * wincecompat.c: New.
14471 * win32-low.h: New.
14472 * win32-arm-low.c: New.
14473 * win32-i386-low.c: New.
14474 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
14475 (OUTMSG2): Make it safe.
14476 (_T): New macro.
14477 (COUNTOF): New macro.
14478 (NUM_REGS): Get it from the low target.
14479 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
14480 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
14481 (thread_rec): Let low target handle debug registers.
14482 (child_add_thread): Likewise.
14483 (child_init_thread_list): Likewise.
14484 (continue_one_thread): Likewise.
14485 (regptr): New.
14486 (do_child_fetch_inferior_registers): Move to ...
14487 * win32-i386-low.c: ... here, and rename to ...
14488 (do_fetch_inferior_registers): ... this.
889bf7c5 14489 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
14490 Go through the low target.
14491 (do_child_store_inferior_registers): Use regptr.
14492 (strwinerror): New function.
14493 (win32_create_inferior): Handle Windows CE.
14494 Use strwinerror instead of strerror on Windows error
14495 codes. Add program to the error output.
14496 Don't close the main thread handle on Windows CE.
14497 (win32_attach): Use coredll.dll on Windows CE.
14498 (win32_kill): Close current process and current
14499 thread handles.
14500 (win32_detach): Use coredll.dll on Windows CE.
14501 (win32_resume): Let low target handle debug registers, and
14502 step request.
14503 (handle_exception): Add/Remove initial breakpoint. Avoid
14504 non-existant WSTOPSIG on Windows CE.
14505 (win32_read_inferior_memory): Cast to remove warning.
14506 (win32_arch_string): Go through the low target.
14507 (initialize_low): Call set_breakpoint_data with the low
14508 target's breakpoint.
14509 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
14510 FOP_REGNUM, mappings): Move to ...
14511 * win32-i386-low.c: ... here.
14512 * win32-low.c (win32_thread_info): Move to ...
14513 * win32-low.h: ... here.
14514 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
14515 win32-arm-low.c and wincecompat.c.
14516 (all:): Add $EXEEXT.
14517 (install-only:): Likewise.
14518 (gdbserver:): Likewise.
14519 (gdbreplay:): Likewise.
14520 * config.in: Regenerate.
14521 * configure: Regenerate.
14522
41093d81
PA
145232007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14524
14525 * win32-low.c: Rename typedef thread_info to
14526 win32_thread_info throughout.
14527
544afa54
PA
145282007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
14529
14530 * win32-i386-low.c: Rename to ...
14531 * win32-low.c: ... this.
14532 * configure.srv: Replace win32-i386-low.o with win32-low.o.
14533 * Makefile.in: Likewise.
14534
bce7165d
PA
145352007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
14536
14537 * remote-utils.c (monitor_output): Constify msg parameter.
14538 * server.h (monitor_output): Likewise.
14539 * win32-i386-low.c (handle_output_debug_string): New.
14540 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
14541 handle_output_debug_string.
14542 (get_child_debug_event): Likewise.
14543
506c7aa0
DJ
145442007-03-27 Mat Hostetter <mat@lcs.mit.edu>
14545
14546 * server.c (main): Correct strtoul check.
14547
42c81e2a
DJ
145482007-03-27 Jon Ringle <jon@ringle.org>
14549
14550 * linux-low.c: Check __ARCH_HAS_MMU__ also.
14551
9453113a
DJ
145522007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
14553
14554 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
14555
64a69107
DJ
145562007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
14557
14558 * terminal.h: Check HAVE_SGTTY_H.
14559
145602007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
14561
14562 * remote-utils.c (remote_open): Print out the assigned port number.
14563
c74d0ad8
DJ
145642007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
14565
14566 * remote-utils.c (monitor_output): New function.
14567 * server.c (debug_threads): Define here.
14568 (monitor_show_help): New function.
14569 (handle_query): Handle qRcmd.
14570 (main): Do not handle 'd' packet.
14571 * server.h (debug_threads, remote_debug, monitor_output): Declare.
14572 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
14573 of debug_threads.
14574
de7c3b4a
PA
145752007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14576
14577 * Makefile.in (EXEEXT): New.
14578 (clean): Use $(EXEEXT).
14579
ef57601b
PA
145802007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14581
14582 * target.h (target_ops): Rename send_signal to request_interrupt,
14583 and remove enum target_signal parameter.
14584 * linux-low.c (linux_request_interrupt): Rename from
14585 linux_send_signal, and always send SIGINT.
14586 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
14587 and always send SIGINT.
14588 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
14589 of send_signal.
14590 (input_interrupt): Likewise.
14591
820f2bda
PA
145922007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
14593
14594 * server.c (get_features_xml): Check if target implemented
14595 arch_string.
14596 * win32-i386-low.c (win32_arch_string): New.
14597 (win32_target_ops): Add win32_arch_string as arch_string member.
14598
ab39bf24
UW
145992007-02-22 Markus Deuling <deuling@de.ibm.com>
14600
14601 * spu-low.c (spu_arch_string): New.
14602 (spu_target_ops): Add spu_arch_string.
14603
61ff6e04
DJ
146042007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
14605
14606 * remote-utils.c: Remove HAVE_TERMINAL_H check.
14607 * configure.ac: Do not check for terminal.h.
14608 * configure, config.in: Regenerated.
14609
fb1e4ffc
DJ
146102007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14611
14612 * Makefile.in (OBS): Add $(XML_BUILTIN).
14613 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
14614 (clean): Update.
14615 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
14616 (arm-with-iwmmxt.c): New.
14617 * config.in, configure: Regenerate.
14618 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
14619 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
14620 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
14621 (arm*-*-linux*): Add iWMMXt and regset support.
14622 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
14623 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
14624 (arm_store_wmmxregset, target_regsets): New.
14625 * server.c (get_features_xml): Take annex argument. Check builtin
14626 XML documents.
14627 (handle_query): Handle multiple annexes.
14628
0f48aa01
DJ
146292007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
14630
14631 * remote-utils.c [USE_WIN32API] (read, write): Define.
14632 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
14633 write.
14634
23181151
DJ
146352007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
14636
14637 * linux-i386-low.c (the_low_target): Set arch_string.
14638 * linux-x86-64-low.c (the_low_target): Likewise.
14639 * linux-low.c (linux_arch_string): New.
14640 (linux_target_ops): Add it.
14641 * linux-low.h (struct linux_target_ops): Add arch_string.
14642 * server.c (write_qxfer_response): Use const void * for DATA.
14643 (get_features_xml): New.
14644 (handle_query): Handle qXfer:features:read. Report it for qSupported.
14645 * target.h (struct target_ops): Add arch_string method.
14646
9d606399
DJ
146472007-01-03 Denis Pilat <denis.pilat@st.com>
14648 Daniel Jacobowitz <dan@codesourcery.com>
14649
14650 * linux-low.c (linux_kill): Handle being called with no threads.
14651 * win32-i386-low.c (win32_kill): Likewise.
14652 (get_child_debug_event): Clear current_process_handle.
14653
146542006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
14655 Daniel Jacobowitz <dan@codesourcery.com>
14656
14657 * remote-utils.c (remote_open): Check the type of specified
14658 serial port devices before opening them.
14659 * server.c (main): Kill the inferior if an error occurs during
14660 the first remote_open.
14661
a5e13d24
DJ
146622006-12-05 Markus Deuling <deuling@de.ibm.com>
14663
14664 * README: Update supported targets.
14665
186947f7
DJ
146662006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
14667
14668 * Makefile.in (clean): Remove reg-mips64.c.
14669 (reg-mips64.c, reg-mips64.o): New rules.
14670 * configure.srv: Handle mips64. Include regset support for mips.
14671 * linux-mips-low.c (union mips_register): New.
14672 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
14673 (mips_breakpoint, mips_breakpoint_at): Use int.
14674 (mips_collect_register, mips_supply_register)
14675 (mips_collect_register_32bit, mips_supply_register_32bit)
14676 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
14677 (mips_store_fpregset, target_regsets): New.
14678 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
14679
a13e2c95
UW
146802006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
14681
14682 * configure.srv: Add target "spu*-*-*".
14683 * Makefile.in (clean): Remove reg-spu.c.
14684 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
14685 * spu-low.c: New file.
14686
cb7283db
DJ
146872006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14688
14689 * configure.ac: Correct td_thr_tls_get_addr test.
14690 * configure: Regenerated.
14691
89be2091
DJ
146922006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
14693
14694 * linux-low.c (linux_wait_for_event): Reformat. Use the
14695 pass_signals array.
14696 * remote-utils.c (decode_address_to_semicolon): New.
14697 * server.c (pass_signals, handle_general_set): New.
14698 (handle_query): Mention QPassSignals for qSupported.
14699 (main): Call handle_general_set.
14700 * server.h (pass_signals, decode_address_to_semicolon): New.
14701
000ef4f0
DJ
147022006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
14703
14704 * server.c (handle_query): Correct error handling for read_auxv.
14705
b7149293
UW
147062005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
14707
14708 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
14709 and srv_linux_thread_db to yes.
14710 * linux-s390-low.c (s390_fill_gregset): New function.
14711 (target_regsets): Define data structure.
14712
dae5f5cf
DJ
147132006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
14714
14715 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
14716 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
14717 * config.in, configure: Regenerated.
14718 * inferiors.c (gdb_id_to_thread): New function.
14719 (gdb_id_to_thread_id): Use it.
14720 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
14721 * linux-low.h (struct process_info): Add th member.
14722 (thread_db_get_tls_address): New prototype.
14723 * remote-utils.c (decode_address): Make non-static.
14724 * server.c (handle_query): Handle qGetTLSAddr.
14725 * server.h (gdb_id_to_thread, decode_address): New prototypes.
14726 * target.h (struct target_ops): Add get_tls_address.
14727 * thread-db.c (maybe_attach_thread): Save the thread handle.
14728 (thread_db_get_tls_address): New.
14729
32ca6d61
DJ
147302006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
14731
14732 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
14733 (linux_resume_one_process): Take a siginfo_t *. Update all
14734 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
14735 (struct pending_signals): Add a siginfo_t.
14736 (linux_wait_for_process): Always set last_status.
14737 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
14738 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
14739 * linux-low.h (struct process_info): Add last_status.
14740
5ffff7c1
DJ
147412006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
14742
14743 * remote-utils.c (try_rle): New function.
14744 (putpkt_binary): Use it.
14745
8695c747
DJ
147462006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
14747
14748 * Makefile.in (clean): Clean reg-x86-64-linux.c.
14749 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
14750 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
14751 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
14752 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
14753 point registers.
14754
290fadea
RS
147552006-08-08 Richard Sandiford <richard@codesourcery.com>
14756
14757 * server.c (terminal_fd): New variable.
14758 (old_foreground_pgrp): Likewise.
14759 (restore_old_foreground_pgrp): New function.
14760 (start_inferior): Record the terminal file descriptor in terminal_fd
14761 and its original foreground group in old_foreground_pgrp. Register
14762 restore_old_foreground_pgrp with atexit().
14763
9f2e1e63
DJ
147642006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
14765
14766 * server.c (handle_query): Correct qPart to qXfer.
14767
b80864fb
DJ
147682006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
14769
14770 * configure.ac: Check for more headers which are missing on
14771 Windows. Automatically supply -lwsock32 and USE_WIN32API.
14772 * configure.srv: Add Cygwin and mingw32.
14773 * remote-utils.c: Don't include headers unconditionally which
14774 are missing on mingw32. Include <winsock.h> for mingw32.
14775 (remote_open): Adjust for mingw32 support. Flush
14776 standard error after writing to it.
14777 (remote_close, putpkt_binary, input_interrupt, block_async_io)
14778 (unblock_async_io, enable_async_io, disable_async_io)
14779 (readchar, getpkt): Update for Winsock support.
14780 (prepare_resume_reply): Expect a protocol signal number.
14781 * server.c: Disable <sys/wait.h> on mingw32.
14782 (start_inferior): Adjust for mingw32 support. Flush
14783 standard error after writing to it.
14784 (attach_inferior): Likewise. Use protocol signal
14785 numbers.
14786 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
14787 and names.
14788 * win32-i386-low.c: New file.
14789 * Makefile.in (XM_CLIBS): Set.
14790 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
14791 (win32-i386-low.o): New dependency rule.
14792 * linux-low.c (linux_wait): Use target signal numbers.
14793 * target.h (struct target_ops): Doc fix.
14794 * server.h (target_signal_to_name): New prototype.
14795 * gdbreplay.c: Don't include headers unconditionally which
14796 are missing on mingw32. Include <winsock.h> for mingw32.
14797 (remote_close, remote_open): Adjust for Winsock support.
14798 * configure, config.in: Regenerated.
14799
0876f84a
DJ
148002006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
14801
14802 * server.c (decode_xfer_read, write_qxfer_response): New.
14803 (handle_query): Take a packet length argument. Handle
14804 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
14805 the qSupported response.
14806 (main): Update call to handle_query.
14807
01f9e8fa
DJ
148082006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
14809
14810 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
14811 (putpkt_binary): Renamed from putpkt and adjusted for binary
14812 data.
14813 (putpkt): New wrapper for putpkt_binary.
14814 (readchar): Don't mask off the high bit.
14815 (decode_X_packet): New function.
14816 * server.c (main): Call putpkt_binary if a handler sets the packet
14817 length. Save the length of the incoming packet. Handle 'X'.
14818 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
14819
be2a5f71
DJ
148202006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
14821
14822 * server.c (handle_query): Handle qSupported.
14823
ea025f5f
DJ
148242006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14825
14826 * remote-utils.c (all_symbols_looked_up): New variable.
14827 (look_up_one_symbol): Check it.
14828 * server.h (look_up_one_symbol): New declaration.
14829 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
14830
9308fc88
DJ
148312006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
14832
14833 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 14834 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
14835 (PTRACE_GET_THREAD_AREA): Define.
14836 (ps_get_thread_area): New function.
14837
52fb6437
NS
148382006-05-09 Nathan Sidwell <nathan@codesourcery.com>
14839
14840 * configure.srv (m68k*-*-uclinux*): New target.
14841 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
14842 (linux_resume_one_process): Remove extraneous cast.
14843 (linux_read_offsets): New.
14844 (linux_target_op): Add linux_read_offsets on mmuless systems.
14845 * server.c (handle_query): Add qOffsets logic.
14846 * target.h (struct target_ops): Add read_offsets.
14847
21b0f40c
DJ
148482006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14849
14850 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
14851 (PTRACE_GET_THREAD_AREA): Define.
14852 (ps_get_thread_area): New function.
14853 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
14854 (linux-x86-64-low.o): Update.
14855
0050a760
DJ
148562006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
14857
14858 * configure.ac: Remove checks for prfpregset_t.
14859 * gdb_proc_service.h: New file.
14860 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
14861 new "gdb_proc_service.h".
14862 * proc-service.c: Likewise.
14863 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
14864 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
14865 * Makefile.in (gdb_proc_service_h): Updated.
14866 * configure, config.in: Regenerated.
14867
b92a518e
DJ
148682006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
14869
14870 * remote-utils.c (prepare_resume_reply): Move declaration
14871 of gdb_id_from_wait to the top of the block.
14872
545587ee
DJ
148732006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
14874
14875 * linux-low.c (regsets_store_inferior_registers): Read the regset
14876 from the target before filling it.
14877
9db87ebd
DJ
148782006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
14879
14880 * server.c (attach_inferior): Return SIGTRAP for a successful
14881 attach.
14882
dd24457d
DJ
148832006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
14884
14885 * Makefile.in (OBS): Add version.o.
14886 (STAGESTUFF): Delete.
14887 (version.o): Add dependencies.
14888 (version.c): Replace rule.
14889 (clean): Remove version.c.
14890 * server.c (gdbserver_version): New.
14891 (gdbserver_usage): Use printf.
14892 (main): Handle --version and --help.
14893 * server.h (version, host_name): Add declarations.
14894
6f0f660e
EZ
148952005-12-23 Eli Zaretskii <eliz@gnu.org>
14896
889bf7c5
PA
14897 * linux-arm-low.c:
14898 * linux-arm-low.c:
14899 * inferiors.c:
14900 * i387-fp.h:
14901 * i387-fp.c:
14902 * gdbreplay.c:
14903 * regcache.c:
14904 * proc-service.c:
14905 * mem-break.h:
14906 * mem-break.c:
14907 * linux-x86-64-low.c:
14908 * linux-sh-low.c:
14909 * linux-s390-low.c:
14910 * linux-ppc64-low.c:
14911 * linux-ppc-low.c:
14912 * linux-mips-low.c:
14913 * linux-m68k-low.c:
14914 * linux-m32r-low.c:
14915 * linux-low.h:
14916 * linux-low.c:
14917 * linux-ia64-low.c:
14918 * linux-i386-low.c:
14919 * linux-crisv32-low.c:
14920 * thread-db.c:
14921 * terminal.h:
14922 * target.h:
14923 * target.c:
14924 * server.h:
14925 * server.c:
14926 * remote-utils.c:
14927 * regcache.h:
14928 * utils.c:
14929 * Makefile.in:
14930 * configure.ac:
6f0f660e
EZ
14931 * gdbserver.1: Add (C) after Copyright. Update the FSF
14932 address.
14933
9d1fb177
DJ
149342005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
14935
14936 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14937 (arm_breakpoint_at): Recognize both breakpoints.
14938 (the_low_target): Use the correct breakpoint instruction.
14939
011a70c2
DJ
149402005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
14941
14942 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14943 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14944 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14945 (the_low_target): Update.
14946
7fb85e41
AS
149472005-10-25 Andreas Schwab <schwab@suse.de>
14948
14949 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14950
14951 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14952 (ia64_num_regs): Reduce to 462.
14953
3db0444b
DJ
149542005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
14955
14956 * acinclude.m4: Correct quoting.
14957 * aclocal.m4: Regenerated.
14958
14959 Suggested by SZOKOVACS Robert <szo@ies.hu>:
14960 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14961 (thread_db_init): Call thread_db_err_str.
14962 * configure.ac: Check for TD_VERSION.
14963 * config.in, configure: Regenerated.
14964
bee0189a
DJ
149652005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
14966
14967 * server.h (error, fatal, warning): Add ATTR_FORMAT.
14968
e9d25b98
DJ
149692005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14970
14971 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14972 is not available. Define HAVE_PTRACE_GETREGS if it is.
14973 * config.in, configure: Regenerated.
14974 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14975 * linux-i386-low.c, linux-m68k-low.c: Update to use
14976 HAVE_PTRACE_GETREGS.
14977 * linux-low.c (regsets_fetch_inferior_registers)
14978 (regsets_store_inferior_registers): Only return 0 if we processed
14979 GENERAL_REGS.
14980 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14981 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14982
a06660f7
DJ
149832005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14984
14985 * inferiors.c (struct thread_info): Add gdb_id.
14986 (add_thread): Add gdb_id argument.
14987 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14988 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14989 calls to add_thread.
14990 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14991 * server.c (handle_query): Use thread_to_gdb_id.
14992 (handle_v_cont, main): Use gdb_id_to_thread_id.
14993 * server.h (add_thread): Update prototype.
14994 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14995 prototypes.
14996
5a1f5858
DJ
149972005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
14998
14999 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
15000 left-padded registers.
15001 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
15002 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
15003
e122f1f5
SE
150042005-07-01 Steve Ellcey <sje@cup.hp.com>
15005
15006 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
15007 * configure: Regenerate.
15008 * config.in: Regenerate.
15009 * server.h (NEED_DECLARATION_STRERROR):
15010 Replace with !HAVE_DECL_STRERROR.
15011
d592fa2f
DJ
150122005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
15013
15014 * linux-low.c (linux_wait, linux_send_signal): Don't test
15015 an unsigned long variable for > 0 if it could be MAX_ULONG.
15016 * server.c (myresume): Likewise.
15017 * target.c (set_desired_inferior): Likewise.
15018
ccbd4912
MK
150192005-06-13 Mark Kettenis <kettenis@gnu.org>
15020
15021 * configure.ac: Simplify and improve check for socklen_t.
15022 * configure, config.in: Regenerate.
15023
f450004a
DJ
150242005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
15025
15026 * acconfig.h: Remove.
15027 * configure.ac: Add a test for socklen_t. Use three-argument
15028 AC_DEFINE throughout.
15029 * config.in: Regenerated using autoheader 2.59.
15030 * configure: Regenerated.
15031
15032 * gdbreplay.c (socklen_t): Provide a default.
15033 (remote_open): Use socklen_t.
15034 * remote-utils.c (socklen_t): Provide a default.
15035 (remote_open): Use socklen_t.
15036 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
15037 unsigned char.
15038
15039 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
15040 char for buffers.
15041 * linux-low.c (linux_read_memory, linux_write_memory)
15042 (linux_read_auxv): Likewise.
15043 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
15044 (check_mem_write): Likewise.
15045 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
15046 Likewise.
15047 * regcache.c (struct inferior_rgcache_data, registers_to_string)
15048 (registers_from_string, register_data): Likewise.
15049 * server.c (handle_query, main): Likewise.
15050 * server.h (convert_ascii_to_int, convert_int_to_ascii)
15051 (decode_M_packet): Likewise.
15052 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
15053 * target.h (struct target_ops): Update read_memory, write_memory,
15054 and read_auxv.
15055 (read_inferior_memory, write_inferior_memory): Update.
15056 * linux-low.h (struct linux_target_ops): Change type of breakpoint
15057 to unsigned char *.
15058 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
15059 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
15060 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
15061 linux-s390-low.c, linux-sh-low.c: Update for changes in
15062 read_inferior_memory and the_low_target->breakpoint.
15063
eee84df1
DJ
150642005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
15065
15066 * Makefile.in (SFILES): Add linux-ppc64-low.c.
15067 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
15068 * configure.srv: Add powerpc64-*-linux*.
15069 * linux-ppc64-low.c: New file.
15070
45b134e5
OF
150712005-05-23 Orjan Friberg <orjanf@axis.com>
15072
15073 * linux-cris-low.c: New file with support for CRIS.
15074 * linux-crisv32-low.c: Ditto for CRISv32.
15075 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
15076 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 15077 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
15078 reg-crisv32.o, and reg-crisv32.c to make rules.
15079 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
15080 recognized targets.
15081
48d93c75
UW
150822005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
15083
15084 * linux-low.c (fetch_register): Ensure buffer size is a multiple
15085 of sizeof (PTRACE_XFER_TYPE).
15086 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
15087
e013ee27
OF
150882005-05-12 Orjan Friberg <orjanf@axis.com>
15089
889bf7c5 15090 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
15091 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
15092 pointers for hardware watchpoint support.
15093 * linux-low.h (struct linux_target_ops): Ditto.
15094 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
15095 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
15096 to linux_target_ops.
15097 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
15098 reply packet.
15099 * server.c (main): Recognize 'Z' and 'z' packets.
15100
b0ded00b
UW
151012005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
15102
15103 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
15104 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
15105 (the_low_target): Add new members.
15106
8643e2ad
DJ
151072005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15108
15109 * proc-service.c (ps_lgetregs): Search all_processes instead of
15110 all_threads.
15111
fc620387
DJ
151122005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
15113
15114 * server.c (start_inferior): Change return type to int.
15115 (attach_inferior): Change sigptr to int *.
15116 (handle_v_cont, handle_v_requests): Change signal to int *.
15117 (main): Change signal to int.
15118
151192005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
15120
15121 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
15122 * configure.srv: Add m32r*-*-linux*.
15123 * linux-m32r-low.c: New file.
15124
e0e76420
DJ
151252005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
15126
15127 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
15128
a1928bad
DJ
151292005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
15130
15131 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
15132 Take unsigned long arguments for PIDs.
15133 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
15134 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
15135 (wait_for_sigstop, linux_resume_one_process)
15136 (regsets_fetch_inferior_registers, linux_send_signal)
15137 (linux_read_auxv): Likewise. Update the types of variables holding
15138 PIDs. Update format string specifiers.
15139 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
15140 * remote-utils.c (prepare_resume_reply): Likewise.
15141 * server.c (cont_thread, general_thread, step_thread)
15142 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
15143 unsigned long.
15144 (handle_query): Update format specifiers.
15145 (handle_v_cont, main): Use strtoul for thread IDs.
15146 * server.h (struct inferior_list_entry): Use unsigned long for ID.
15147 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
15148 (general_thread, step_thread, thread_from_wait)
15149 (old_thread_from_wait): Update.
15150 * target.h (struct thread_resume): Use unsigned long for THREAD.
15151 (struct target_ops): Use unsigned long for arguments to attach and
15152 thread_alive.
15153
dcdb98d2
DJ
151542005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
15155
15156 * acinclude.m4: Include bfd/bfd.m4 directly.
15157 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
15158 <agriffis@toolchain.org>.
15159 * aclocal.m4, configure: Regenerated.
15160
bec39cab
AC
151612005-01-07 Andrew Cagney <cagney@gnu.org>
15162
15163 * configure.ac: Rename configure.in, require autoconf 2.59.
15164 * configure: Re-generate.
15165
434c4c77
DJ
151662004-12-08 Daniel Jacobowitz <dan@debian.org>
15167
15168 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
15169 LIBS when finished.
15170 * aclocal.m4: Regenerated.
15171 * configure: Regenerated.
15172
db1d3e1b
AS
151732004-11-21 Andreas Schwab <schwab@suse.de>
15174
15175 * linux-m68k-low.c (m68k_num_gregs): Define.
15176 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
15177 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
15178 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
15179 (m68k_breakpoint_at): New. Add to the_low_target.
15180
15181 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
15182 srv_linux_thread_db to yes.
15183
43360365
JB
151842004-10-20 Joel Brobecker <brobecker@gnat.com>
15185
15186 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
15187 (ARCH_SET_FS): Likewise.
15188 (ARCH_GET_FS): Likewise.
15189 (ARCH_GET_GS): Likewise.
15190
fd500816
DJ
151912004-10-16 Daniel Jacobowitz <dan@debian.org>
15192
15193 * linux-i386-low.c (ps_get_thread_area): New.
15194 * linux-x86-64-low.c (ps_get_thread_area): New.
15195 * linux-low.c: Include <sys/syscall.h>.
15196 (linux_kill_one_process): Don't kill the first thread here.
15197 (linux_kill): Kill the first thread here.
15198 (kill_lwp): New function.
15199 (send_sigstop, linux_send_signal): Use it.
15200 * proc-service.c: Clean up #ifdefs.
15201 (fpregset_info): Delete.
15202 (ps_lgetregs): Update and enable implementation.
15203 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
15204 implementations.
15205 * remote-utils.c (struct sym_cache, symbol_cache): New.
15206 (input_interrupt): Print a clearer message.
15207 (async_io_enabled): New variable.
15208 (enable_async_io, disable_async_io): Use it. Update comments.
15209 (look_up_one_symbol): Use the symbol cache.
15210 * thread-db.c (thread_db_look_up_symbols): New function.
15211 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
15212
f6de3c42
DJ
152132004-10-16 Daniel Jacobowitz <dan@debian.org>
15214
15215 * configure.in: Test for -rdynamic.
15216 * configure: Regenerated.
15217 * Makefile (INTERNAL_LDFLAGS): New.
15218 (gdbserver, gdbreplay): Use it.
15219
2c0fc042
AC
152202004-09-02 Andrew Cagney <cagney@gnu.org>
15221
15222 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
15223
075b3282
DJ
152242004-03-23 Daniel Jacobowitz <drow@mvista.com>
15225
15226 * linux-low.c (linux_wait): Clear all_processes list also.
15227
fa6a77dc
DJ
152282004-03-12 Daniel Jacobowitz <drow@mvista.com>
15229
15230 * linux-low.c: Include <errno.h>. Remove extern declaration of
15231 errno.
15232
6d782a97
DJ
152332004-03-12 Daniel Jacobowitz <drow@mvista.com>
15234
15235 * gdbreplay.c, server.h, utils.c: Update copyright years.
15236
3a7fb99b
DJ
152372004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15238
15239 * server.c (main): Print child status or termination signal from
15240 variable 'signal', not 'sig'.
15241
c3e735a6
DJ
152422004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
15243
15244 * linux-low.c (linux_read_memory): Change return type to
15245 int. Check for and return error from ptrace().
15246 * target.c (read_inferior_memory): Change return type to int. Pass
15247 back return status from the_target->read_memory().
15248 * target.h (struct target_ops): Adapt *read_memory() prototype.
15249 Update comment.
15250 (read_inferior_memory): Adapt prototype.
15251 * server.c (main): Return an error packet if
15252 read_inferior_memory() returns an error.
15253
a59d1c82
DJ
152542004-03-04 Daniel Jacobowitz <drow@mvista.com>
15255
15256 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
15257 Unify with other clean targets.
15258
dc3f8883
DJ
152592004-02-29 Daniel Jacobowitz <drow@mvista.com>
15260
15261 * server.c (handle_v_cont): Call set_desired_inferior.
15262
89a208da
DJ
152632004-02-29 Daniel Jacobowitz <drow@mvista.com>
15264
15265 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
15266
62ea82f5
DJ
152672004-02-29 Daniel Jacobowitz <drow@mvista.com>
15268
15269 * linux-low.c (linux_wait): Unblock async I/O.
15270 (linux_resume): Block and enable async I/O.
15271 * remote-utils.c (block_async_io, unblock_async_io): New functions.
15272 * server.h (block_async_io, unblock_async_io): Add prototypes.
15273
6910d122
DJ
152742004-02-29 Daniel Jacobowitz <drow@mvista.com>
15275
15276 * remote-utils.c (remote_open): Print a status notice after
15277 opening a TCP port.
15278 * server.c (attach_inferior): Print a status notice after
15279 attaching.
15280
152812004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
15282
15283 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
15284
c89dc5d4
DJ
152852004-02-26 Daniel Jacobowitz <drow@mvista.com>
15286
15287 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
15288 error packet.
15289 * server.c, target.h: Update copyright years.
15290
4b8dad4a
RM
152912004-02-25 Roland McGrath <roland@redhat.com>
15292
15293 * target.h (struct target_ops): New member `read_auxv'.
15294 * server.c (handle_query): Handle qPart:auxv:read: query using that.
15295 * linux-low.c (linux_read_auxv): New function.
15296 (linux_target_ops): Initialize `read_auxv' member to that.
15297
d7446758
JB
152982004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
15299
15300 Committed by Jim Blandy <jimb@redhat.com>.
15301
15302 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 15303 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
15304 instead of GPR_SIZE to distiguish s390 and s390x targets.
15305
5544ad89
DJ
153062004-01-31 Daniel Jacobowitz <drow@mvista.com>
15307
15308 * linux-low.c: Update copyright year.
15309 (check_removed_breakpoint): Clear pending_is_breakpoint.
15310 (linux_set_resume_request, linux_queue_one_thread)
15311 (resume_status_pending_p): New functions.
15312 (linux_continue_one_thread): Use process->resume.
15313 (linux_resume): Only resume threads if there are no pending events.
15314 * linux-low.h (struct process_info): Add resume request
15315 pointer.
15316
2a68b70e
DJ
153172004-01-30 Daniel Jacobowitz <drow@mvista.com>
15318
15319 * regcache.c (new_register_cache): Clear the allocated register
15320 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
15321
64386c31
DJ
153222003-10-13 Daniel Jacobowitz <drow@mvista.com>
15323
15324 * linux-low.c (linux_resume): Take a struct thread_resume *
15325 argument.
15326 (linux_wait): Update call.
15327 (resume_ptr): New static variable.
15328 (linux_continue_one_thread): Renamed from
15329 linux_continue_one_process. Use resume_ptr.
15330 (linux_resume): Use linux_continue_one_thread.
15331 * server.c (handle_v_cont, handle_v_requests): New functions.
15332 (myresume): New function.
15333 (main): Handle 'v' case.
15334 * target.h (struct thread_resume): New type.
15335 (struct target_ops): Change argument of "resume" to struct
15336 thread_resume *.
15337 (myresume): Delete macro.
15338
c938e9b0
L
153392003-08-08 H.J. Lu <hongjiu.lu@intel.com>
15340
15341 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
15342 (uninstall): Support DESTDIR.
15343
7f313d07
BC
15344Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
15345
15346 * configure.srv: Add xscale*linux copy of arm*linux entry.
15347
3b2fc2ea
DJ
153482003-07-24 Daniel Jacobowitz <drow@mvista.com>
15349
15350 * linux-arm-low.c (arm_reinsert_addr): New function.
15351 (the_low_target): Add arm_reinsert_addr.
15352
1c0a559e
MK
153532003-07-08 Mark Kettenis <kettenis@gnu.org>
15354
15355 * mem-break.c: Remove whitespace at end of file.
15356
43d5792c
DJ
153572003-06-28 Daniel Jacobowitz <drow@mvista.com>
15358
15359 * configure.in: Check whether we need to prototype strerror.
15360 * server.h: Optionally prototype strerror.
15361 * gdbreplay.c (perror_with_name): Use strerror.
15362 * linux-low.c (linux_attach_lwp): Use strerror.
15363 * utils.c (perror_with_name): Use strerror.
15364 * config.in, configure: Regenerated.
15365
c8a86edf
DJ
153662003-06-28 Daniel Jacobowitz <drow@mvista.com>
15367
15368 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
15369 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
15370
73d37363
DJ
153712003-06-20 Daniel Jacobowitz <drow@mvista.com>
15372
15373 * Makefile.in (SFILES): Update.
15374 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
15375 low-sun3.c: Remove files.
15376
6ad8ae5c
DJ
153772003-06-17 Daniel Jacobowitz <drow@mvista.com>
15378
15379 * linux-low.c: Move comment to linux_thread_alive where it belonged.
15380 (linux_detach_one_process, linux_detach): New functions.
15381 (linux_target_ops): Add linux_detach.
15382 * server.c (main): Handle 'D' packet.
15383 * target.h (struct target_ops): Add "detach" member.
15384 (detach_inferior): Define.
15385
1581182a
MK
153862003-06-13 Mark Kettenis <kettenis@gnu.org>
15387
15388 From Kelley Cook <kelleycook@wideopenwest.com>:
15389 * configure.srv: Accept i[34567]86 variants.
15390
e5379b03
DJ
153912003-06-05 Daniel Jacobowitz <drow@mvista.com>
15392
15393 * linux-low.c (linux_wait_for_event): Correct comment typos.
15394 (linux_resume_one_process): Call check_removed_breakpoint.
15395 (linux_send_signal): New function.
15396 (linux_target_ops): Add linux_send_signal.
15397 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
15398 of kill.
15399 * target.h (struct target_ops): Add send_signal.
15400
2ff29de4
JB
154012003-05-29 Jim Blandy <jimb@redhat.com>
15402
15403 * linux-low.c (usr_store_inferior_registers): Transfer buf in
15404 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
15405 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
15406 away part of the register's value.
15407
254787d4
DJ
154082003-03-26 Daniel Jacobowitz <drow@mvista.com>
15409
15410 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
15411 (linux_wait_for_event, linux_init_signals): Likewise.
15412
94e10508
DJ
154132003-03-17 Daniel Jacobowitz <drow@mvista.com>
15414
15415 * configure.in: Check for stdlib.h.
15416 * configure: Regenerated.
15417 * config.in: Regenerated.
15418
4c0711e0
DJ
154192003-01-04 Andreas Schwab <schwab@suse.de>
15420
15421 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
15422
ef66e766
AC
154232003-01-02 Andrew Cagney <ac131313@redhat.com>
15424
15425 * Makefile.in: Remove obsolete code.
15426
a1358604
DJ
154272002-11-20 Daniel Jacobowitz <drow@mvista.com>
15428
15429 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
15430 defined(PT_FPR0_HI).
15431
23ce3b1c
DJ
154322002-11-17 Stuart Hughes <seh@zee2.com>
15433
15434 * linux-arm-low.c (arm_num_regs): Increase.
15435 (arm_regmap): Include status register.
15436
154372002-11-17 Daniel Jacobowitz <drow@mvista.com>
15438
15439 * linux-low.c (register_addr): Remove incorrect -1 check.
15440
a9fa9f7d
DJ
154412002-08-29 Daniel Jacobowitz <drow@mvista.com>
15442
15443 * linux-low.c (linux_create_inferior): Call setpgid. Return
15444 the new PID.
15445 (unstopped_p, linux_signal_pid): Remove.
15446 (linux_target_ops): Remove linux_signal_pid.
15447 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
15448 global instead of target method.
15449 * target.h (struct target_ops): Remove signal_pid. Update comment
15450 for create_inferior.
15451 * server.c (signal_pid): New variable.
15452 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 15453 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
15454 (attach_inferior): Set signal_pid.
15455
17574093
DJ
154562002-08-23 Daniel Jacobowitz <drow@mvista.com>
15457
15458 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
15459
154602002-08-20 Jim Blandy <jimb@redhat.com>
15461
15462 * Makefile.in (LDFLAGS): Allow the configure script to establish a
15463 default for this.
15464
154652002-08-01 Andrew Cagney <cagney@redhat.com>
15466
15467 * Makefile.in: Make chill references obsolete.
15468
154692002-07-24 Kevin Buettner <kevinb@redhat.com>
15470
15471 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
15472 * configure: Regenerate.
15473 * config.in: Regenerate.
15474
154752002-07-09 David O'Brien <obrien@FreeBSD.org>
15476
15477 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
15478 (perror_with_name, remote_close, remote_open, expect, play): Static.
15479
154802002-07-04 Michal Ludvig <mludvig@suse.cz>
15481
4b8dad4a 15482 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
15483 byte offsets instead of an array of indexes.
15484 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
15485
154862002-06-13 Daniel Jacobowitz <drow@mvista.com>
15487
15488 * regcache.c: Add comment.
15489
154902002-06-11 Daniel Jacobowitz <drow@mvista.com>
15491
15492 * thread-db.c: New file.
15493 * proc-service.c: New file.
15494 * acinclude.m4: New file.
15495 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
15496 proc-service.o, and thread-db.o.
15497 (linux-low.o): Add USE_THREAD_DB.
15498 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
15499 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
15500 * aclocal.m4: Regenerated.
15501 * config.in: Regenerated.
15502 * configure: Regenerated.
15503 * configure.in: Check for proc_service.h, sys/procfs.h,
15504 thread_db.h, and linux/elf.h headrs.
15505 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
15506 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
15507 Check for -lthread_db and thread support.
15508 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
15509 PowerPC, and SuperH.
15510 * i387-fp.c: Constify arguments.
15511 * i387-fp.h: Likewise.
15512 * inferiors.c: (struct thread_info): Renamed from
15513 `struct inferior_info'. Remove PID member. Use generic inferior
15514 list header. All uses updated.
15515 (inferiors, signal_pid): Removed.
15516 (all_threads): New variable.
15517 (get_thread): Define.
15518 (add_inferior_to_list): New function.
15519 (for_each_inferior): New function.
15520 (change_inferior_id): New function.
15521 (add_inferior): Removed.
15522 (remove_inferior): New function.
15523 (add_thread): New function.
15524 (free_one_thread): New function.
15525 (remove_thread): New function.
15526 (clear_inferiors): Use for_each_inferior and free_one_thread.
15527 (find_inferior): New function.
15528 (find_inferior_id): New function.
15529 (inferior_target_data): Update argument type.
15530 (set_inferior_target_data): Likewise.
15531 (inferior_regcache_data): Likewise.
15532 (set_inferior_regcache_data): Likewise.
15533 * linux-low.c (linux_bp_reinsert): Remove.
15534 (all_processes, stopping_threads, using_thrads)
15535 (struct pending_signals, debug_threads, pid_of): New.
15536 (inferior_pid): Replace with macro.
15537 (struct inferior_linux_data): Remove.
15538 (get_stop_pc, add_process): New functions.
15539 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
15540 Use add_process and add_thread.
15541 (linux_attach_lwp): New function, based on old linux_attach. Use
15542 add_process and add_thread. Set stop_expected for new threads.
15543 (linux_attach): New function.
15544 (linux_kill_one_process): New function.
15545 (linux_kill): Kill all LWPs.
15546 (linux_thread_alive): Use find_inferior_id.
15547 (check_removed_breakpoints, status_pending_p): New functions.
15548 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
15549 Update. Use WNOHANG. Wait for cloned processes also. Update process
15550 struct for the found process.
15551 (linux_wait_for_event): New function.
15552 (linux_wait): Use it. Support LWPs.
15553 (send_sigstop, wait_for_sigstop, stop_all_processes)
15554 (linux_resume_one_process, linux_continue_one_process): New functions.
15555 (linux_resume): Support LWPs.
15556 (REGISTER_RAW_SIZE): Remove.
15557 (fetch_register): Use register_size instead. Call supply_register.
15558 (usr_store_inferior_registers): Likewise. Call collect_register.
15559 Fix recursive case.
15560 (regsets_fetch_inferior_registers): Improve error message.
15561 (regsets_store_inferior_registers): Add debugging.
15562 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
15563 (unstopped_p, linux_signal_pid): New functions.
15564 (linux_target_ops): Add linux_signal_pid.
15565 (linux_init_signals): New function.
15566 (initialize_low): Call it. Initialize using_threads.
15567 * regcache.c (inferior_regcache_data): Add valid
15568 flag.
15569 (get_regcache): Fetch registers lazily. Add fetch argument
15570 and update all callers.
15571 (regcache_invalidate_one, regcache_invalidate): New
15572 functions.
15573 (new_register_cache): Renamed from create_register_cache.
15574 Return the new regcache.
15575 (free_register_cache): Change argument to a void *.
15576 (registers_to_string, registers_from_string): Call get_regcache
15577 with fetch flag set.
15578 (register_data): Make static. Pass fetch flag to get_regcache.
15579 (supply_register): Call get_regcache with fetch flag clear.
15580 (collect_register): Call get_regcache with fetch flag set.
15581 (collect_register_as_string): New function.
15582 * regcache.h: Update.
15583 * remote-utils.c (putpkt): Flush after debug output and use
15584 stderr.
15585 Handle input interrupts while waiting for an ACK.
15586 (input_interrupt): Use signal_pid method.
15587 (getpkt): Flush after debug output and use stderr.
15588 (outreg): Use collect_register_as_string.
15589 (new_thread_notify, dead_thread_notify): New functions.
15590 (prepare_resume_reply): Check using_threads. Set thread_from_wait
15591 and general_thread.
15592 (look_up_one_symbol): Flush after debug output.
15593 * server.c (step_thread, server_waiting): New variables.
15594 (start_inferior): Don't use signal_pid. Update call to mywait.
15595 (attach_inferior): Update call to mywait.
15596 (handle_query): Handle qfThreadInfo and qsThreadInfo.
15597 (main): Don't fetch/store registers explicitly. Use
15598 set_desired_inferior. Support proposed ``Hs'' packet. Update
15599 calls to mywait.
15600 * server.h: Update.
15601 (struct inferior_list, struct_inferior_list_entry): New.
15602 * target.c (set_desired_inferior): New.
15603 (write_inferior_memory): Constify.
15604 (mywait): New function.
15605 * target.h: Update.
15606 (struct target_ops): New signal_pid method.
15607 (mywait): Removed macro, added prototype.
15608
15609 * linux-low.h (regset_func): Removed.
15610 (regset_fill_func, regset_store_func): New.
15611 (enum regset_type): New.
15612 (struct regset_info): Add type field. Use new operation types.
15613 (struct linux_target_ops): stop_pc renamed to get_pc.
15614 Add decr_pc_after_break and breakpoint_at.
15615 (get_process, get_thread_proess, get_process_thread)
15616 (strut process_info, all_processes, linux_attach_lwp)
15617 (thread_db_init): New.
15618
15619 * linux-arm-low.c (arm_get_pc, arm_set_pc,
15620 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
15621 (the_low_target): Add new members.
15622 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
15623 (i386_store_fpxregset): Constify.
15624 (target_regsets): Add new kind identifier.
15625 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
15626 (i386_set_pc): Add debugging.
15627 (i386_breakpoint_at): New function.
15628 (the_low_target): Add new members.
15629 * linux-mips-low.c (mips_get_pc, mips_set_pc)
15630 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
15631 (mips_breakpoint_at): New.
15632 (the_low_target): Add new members.
15633 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
15634 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
15635 (the_low_target): Add new members.
15636 * linux-sh-low.c (sh_get_pc, sh_set_pc)
15637 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
15638 (the_low_target): Add new members.
15639 * linux-x86-64-low.c (target_regsets): Add new kind
15640 identifier.
15641
156422002-05-15 Daniel Jacobowitz <drow@mvista.com>
15643
15644 From Martin Pool <mbp@samba.org>:
15645 * server.c (gdbserver_usage): New function.
15646 (main): Call it.
15647
156482002-05-14 Daniel Jacobowitz <drow@mvista.com>
15649
15650 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
15651 stop_at -> stop_pc.
15652
156532002-05-04 Andrew Cagney <ac131313@redhat.com>
15654
15655 * Makefile.in: Remove obsolete code.
15656
156572002-04-24 Michal Ludvig <mludvig@suse.cz>
15658
15659 * linux-low.c (regsets_fetch_inferior_registers),
15660 (regsets_store_inferior_registers): Removed cast to int from
15661 ptrace() calls.
15662 * regcache.h: Added declaration of struct inferior_info.
15663
156642002-04-20 Daniel Jacobowitz <drow@mvista.com>
15665
15666 * inferiors.c (struct inferior_info): Add regcache_data.
15667 (add_inferior): Call create_register_cache.
15668 (clear_inferiors): Call free_register_cache.
15669 (inferior_regcache_data, set_inferior_regcache_data): New functions.
15670 * regcache.c (struct inferior_regcache_data): New.
15671 (registers): Remove.
15672 (get_regcache): New function.
15673 (create_register_cache, free_register_cache): New functions.
15674 (set_register_cache): Don't initialize the register cache here.
15675 (registers_to_string, registers_from_string, register_data): Call
15676 get_regcache.
15677 * regcache.h: Add prototypes.
15678 * server.h: Likewise.
15679
156802002-04-20 Daniel Jacobowitz <drow@mvista.com>
15681
15682 * mem-break.c: New file.
15683 * mem-break.h: New file.
15684 * Makefile.in: Add mem-break.o rule; update server.h
15685 dependencies.
15686 * inferiors.c (struct inferior_info): Add target_data
15687 member.
15688 (clear_inferiors): Free target_data member if set.
15689 (inferior_target_data, set_inferior_target_data): New functions.
15690 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
15691 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
15692 * linux-low.c (linux_bp_reinsert): New variable.
15693 (struct inferior_linux_data): New.
15694 (linux_create_inferior): Use set_inferior_target_data.
15695 (linux_attach): Likewise. Call add_inferior.
15696 (linux_wait_for_one_inferior): New function.
15697 (linux_wait): Call it.
15698 (linux_write_memory): Add const.
15699 (initialize_low): Call set_breakpoint_data.
15700 * linux-low.h (struct linux_target_ops): Add breakpoint
15701 handling members.
15702 * server.c (attach_inferior): Remove extra add_inferior
15703 call.
15704 * server.h: Include mem-break.h. Update inferior.c
15705 prototypes.
15706 * target.c (read_inferior_memory)
15707 (write_inferior_memory): New functions.
15708 * target.h (read_inferior_memory)
15709 (write_inferior_memory): Change macros to prototypes.
15710 (struct target_ops): Update comments. Add const to write_memory
15711 definition.
15712
157132002-04-11 Daniel Jacobowitz <drow@mvista.com>
15714
15715 * linux-low.c (usr_store_inferior_registers): Support
15716 registers which are allowed to fail to store.
15717 * linux-low.h (linux_target_ops): Likewise.
15718 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
15719 (ppc_cannot_store_register): FPSCR may not be storable.
15720
157212002-04-09 Daniel Jacobowitz <drow@mvista.com>
15722
15723 * server.h: Include <string.h> if HAVE_STRING_H.
15724 * ChangeLog: Correct paths in last ChangeLog entry.
15725
157262002-04-09 Daniel Jacobowitz <drow@mvista.com>
15727
15728 * linux-low.h: Remove obsolete prototypes.
15729 (struct linux_target_ops): New.
15730 (extern the_low_target): New.
15731 * linux-low.c (num_regs, regmap): Remove declarations.
15732 (register_addr): Use the_low_target explicitly.
15733 (fetch_register): Likewise.
15734 (usr_fetch_inferior_registers): Likewise.
15735 (usr_store_inferior_registers): Likewise.
15736 * linux-arm-low.c (num_regs): Remove.
15737 (arm_num_regs): Define.
15738 (arm_regmap): Renamed from regmap, made static.
15739 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
15740 made static.
15741 (arm_cannot_store_register): Renamed from cannot_store_register,
15742 made static.
15743 (the_low_target): New.
15744 * linux-i386-low.c (num_regs): Remove.
15745 (i386_num_regs): Define.
15746 (i386_regmap): Renamed from regmap, made static.
15747 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
15748 made static.
15749 (i386_cannot_store_register): Renamed from cannot_store_register,
15750 made static.
15751 (the_low_target): New.
15752 * linux-ia64-low.c (num_regs): Remove.
15753 (ia64_num_regs): Define.
15754 (ia64_regmap): Renamed from regmap, made static.
15755 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
15756 made static.
15757 (ia64_cannot_store_register): Renamed from cannot_store_register,
15758 made static.
15759 (the_low_target): New.
15760 * linux-m68k-low.c (num_regs): Remove.
15761 (m68k_num_regs): Define.
15762 (m68k_regmap): Renamed from regmap, made static.
15763 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
15764 made static.
15765 (m68k_cannot_store_register): Renamed from cannot_store_register,
15766 made static.
15767 (the_low_target): New.
15768 * linux-mips-low.c (num_regs): Remove.
15769 (mips_num_regs): Define.
15770 (mips_regmap): Renamed from regmap, made static.
15771 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
15772 made static.
15773 (mips_cannot_store_register): Renamed from cannot_store_register,
15774 made static.
15775 (the_low_target): New.
15776 * linux-ppc-low.c (num_regs): Remove.
15777 (ppc_num_regs): Define.
15778 (ppc_regmap): Renamed from regmap, made static.
15779 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
15780 made static.
15781 (ppc_cannot_store_register): Renamed from cannot_store_register,
15782 made static.
15783 (the_low_target): New.
15784 * linux-s390-low.c (num_regs): Remove.
15785 (s390_num_regs): Define.
15786 (s390_regmap): Renamed from regmap, made static.
15787 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
15788 made static.
15789 (s390_cannot_store_register): Renamed from cannot_store_register,
15790 made static.
15791 (the_low_target): New.
15792 * linux-sh-low.c (num_regs): Remove.
15793 (sh_num_regs): Define.
15794 (sh_regmap): Renamed from regmap, made static.
15795 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
15796 made static.
15797 (sh_cannot_store_register): Renamed from cannot_store_register,
15798 made static.
15799 (the_low_target): New.
15800 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
15801 (the_low_target): New.
15802
158032002-04-09 Daniel Jacobowitz <drow@mvista.com>
15804
15805 * Makefile.in: Add stamp-h target.
15806 * configure.in: Create stamp-h.
15807 * configure: Regenerated.
15808
158092002-04-09 Daniel Jacobowitz <drow@mvista.com>
15810
15811 * inferiors.c: New file.
15812 * target.c: New file.
15813 * target.h: New file.
15814 * Makefile.in: Add target.o and inferiors.o. Update
15815 dependencies.
15816 * linux-low.c (inferior_pid): New static variable,
15817 moved from server.c.
15818 (linux_create_inferior): Renamed from create_inferior.
15819 Call add_inferior. Return 0 on success instead of a PID.
15820 (linux_attach): Renamed from myattach.
15821 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
15822 (linux_thread_alive): Renamed from mythread_alive.
15823 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
15824 child dies.
15825 (linux_resume): Renamed from myresume. Add missing ``return 0''.
15826 (regsets_store_inferior_registers): Correct error message.
15827 Add missing ``return 0''.
15828 (linux_fetch_registers): Renamed from fetch_inferior_registers.
15829 (linux_store_registers): Renamed from store_inferior_registers.
15830 (linux_read_memory): Renamed from read_inferior_memory.
15831 (linux_write_memory): Renamed from write_inferior_memory.
15832 (linux_target_ops): New structure.
15833 (initialize_low): Call set_target_ops ().
15834 * remote-utils.c (unhexify): New function.
15835 (hexify): New function.
15836 (input_interrupt): Send signals to ``signal_pid''.
15837 * server.c (inferior_pid): Remove.
15838 (start_inferior): Update create_inferior call.
15839 (attach_inferior): Call add_inferior.
15840 (handle_query): New function.
15841 (main): Call handle_query for `q' packets.
15842 * server.h: Include "target.h". Remove obsolete prototypes.
15843 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
15844
158452002-04-09 Daniel Jacobowitz <drow@mvista.com>
15846
15847 * Makefile.in: Add WARN_CFLAGS. Update configury
15848 dependencies.
15849 * configure.in: Check for <string.h>
15850 * configure: Regenerate.
15851 * config.in: Regenerate.
15852 * gdbreplay.c: Include needed system headers.
15853 (remote_open): Remove strchr prototype.
15854 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
15855 * regcache.c (supply_register): Change buf argument to const void *.
15856 (supply_register_by_name): Likewise.
15857 (collect_register): Change buf argument to void *.
15858 (collect_register_by_name): Likewise.
15859 * regcache.h: Add missing prototypes.
15860 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
15861 * server.c (handle_query): New function.
15862 (attached): New static variable, moved out of main.
15863 (main): Quiet longjmp clobber warnings.
15864 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
15865 * utils.c (error): Remove NORETURN.
15866 (fatal): Likewise.
This page took 2.220059 seconds and 4 git commands to generate.